]> wimlib.net Git - wimlib/blobdiff - wimlib_tchar.h
wimlib.h: Update wimlib_add_image() docs
[wimlib] / wimlib_tchar.h
index 75f8e8160909cb9c1137ca35bc9e8463898c9885..e902fab39a4e2227cb92888a0e0f346f28c5d5c3 100644 (file)
@@ -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
@@ -40,6 +41,7 @@ typedef wchar_t tchar;
 #  define tputs                _putws
 #  define tfputs       fputws
 #  define tfopen       _wfopen
+#  define topen                _wopen
 #  define tstat                _wstati64
 #  define tstrtol      wcstol
 #  define tstrtod      wcstod
@@ -52,7 +54,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 +67,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
@@ -94,6 +97,7 @@ typedef char tchar;
 #  define tputs                puts
 #  define tfputs       fputs
 #  define tfopen       fopen
+#  define topen                open
 #  define tstat                stat
 #  define tunlink      unlink
 #  define tstrerror    strerror