1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-09 09:27:59 +00:00

Windows: add filename_to_wstr().

The wide-string version of filename_to_str(): given a Filename, return
a reference to its contained wchar_t string form.
This commit is contained in:
Simon Tatham 2024-12-13 19:19:08 +00:00
parent 1ef0fbaafc
commit 22dfc46fb2
2 changed files with 6 additions and 0 deletions

View File

@ -66,6 +66,7 @@ struct Filename {
char *cpath, *utf8path;
};
Filename *filename_from_wstr(const wchar_t *str);
const wchar_t *filename_to_wstr(const Filename *fn);
FILE *f_open(const Filename *filename, const char *mode, bool isprivate);
#ifndef SUPERSEDE_FONTSPEC_FOR_TESTING

View File

@ -47,6 +47,11 @@ const char *filename_to_str(const Filename *fn)
return fn->cpath; /* FIXME */
}
const wchar_t *filename_to_wstr(const Filename *fn)
{
return fn->wpath;
}
bool filename_equal(const Filename *f1, const Filename *f2)
{
/* wpath is primary: two filenames refer to the same file if they