X-Git-Url: https://wimlib.net/git/?p=wimlib;a=blobdiff_plain;f=wimlib_tchar.h;h=b27fbeabf8bb994116e1fe2759f669c5411d2ef7;hp=75f8e8160909cb9c1137ca35bc9e8463898c9885;hb=48c05c63f94c294d4b9982a228682c27e8d41dd2;hpb=650997e4865a090b6856c7ca34b02f42994e8e29 diff --git a/wimlib_tchar.h b/wimlib_tchar.h index 75f8e816..b27fbeab 100644 --- a/wimlib_tchar.h +++ b/wimlib_tchar.h @@ -14,6 +14,7 @@ typedef wchar_t tchar; # define _T(text) L##text # define T(text) _T(text) /* Make a string literal into a wide string */ # define TS "ls" /* Format a string of "tchar" */ +# define TC "lc" /* Format a "tchar" */ # define WS "ls" /* Format a UTF-16LE string (same as above) */ /* For Windows builds, the following definitions replace the "tchar" functions @@ -52,7 +53,7 @@ typedef wchar_t tchar; * function defined ourselves. */ # define TSTRDUP WSTRDUP # define tmkdir(path, mode) _wmkdir(path) -# define tstrerror_r(errnum, buf, bufsize) _wcserror_s(buf, bufsize, errnum) +# define tstrerror_r win32_strerror_r_replacement # define trename win32_rename_replacement # define ttruncate win32_truncate_replacement #else /* __WIN32__ */ @@ -65,6 +66,7 @@ typedef char tchar; char */ # define TS "s" /* Similarly, a string of "tchar" is printed just as a normal string. */ +# define TC "c" /* Print a single character */ # define WS "W" /* UTF-16LE strings must be printed using a special extension implemented by wimlib itself. Note that "ls" will not work here because a string of wide