diff options
Diffstat (limited to 'Build/source/texk')
-rw-r--r-- | Build/source/texk/kpathsea/ChangeLog | 4 | ||||
-rw-r--r-- | Build/source/texk/kpathsea/knj.c | 10 | ||||
-rw-r--r-- | Build/source/texk/ptexenc/ptexenc/unicode.h | 2 |
3 files changed, 10 insertions, 6 deletions
diff --git a/Build/source/texk/kpathsea/ChangeLog b/Build/source/texk/kpathsea/ChangeLog index ba5d395ecc4..df7baac43d1 100644 --- a/Build/source/texk/kpathsea/ChangeLog +++ b/Build/source/texk/kpathsea/ChangeLog @@ -1,3 +1,7 @@ +2014-01-04 Peter Breitenlohner <peb@mppmu.mpg.de> + + * knj.c: Keep non-utf8 command line. Avoid compiler warnings. + 2014-01-01 TANAKA Takuji <KXD02663@nifty.ne.jp> * knj.c, knj.h: Use cast for ASCII string conversion diff --git a/Build/source/texk/kpathsea/knj.c b/Build/source/texk/kpathsea/knj.c index e077aac7ad7..8cb5ff54817 100644 --- a/Build/source/texk/kpathsea/knj.c +++ b/Build/source/texk/kpathsea/knj.c @@ -110,7 +110,7 @@ fsyscp_xfopen (const char *filename, const char *mode) assert(filename && mode); fnamew = get_wstring_from_fsyscp(filename, fnamew=NULL); - for(i=0; modew[i]=(wchar_t)mode[i]; i++) {} /* mode[i] must be ASCII */ + for(i=0; (modew[i]=(wchar_t)mode[i]); i++) {} /* mode[i] must be ASCII */ f = _wfopen(fnamew, modew); if (f == NULL) FATAL_PERROR(filename); @@ -144,7 +144,7 @@ fsyscp_fopen (const char *filename, const char *mode) assert(filename && mode); fnamew = get_wstring_from_fsyscp(filename, fnamew=NULL); - for(i=0; modew[i]=(wchar_t)mode[i]; i++) {} /* mode[i] must be ASCII */ + for(i=0; (modew[i]=(wchar_t)mode[i]); i++) {} /* mode[i] must be ASCII */ f = _wfopen(fnamew, modew); #if defined (KPSE_COMPAT_API) if (f != NULL) { @@ -174,11 +174,11 @@ get_command_line_args_utf8 (const_string enc, int *p_ac, char ***p_av) fprintf(stderr, "command_line_encoding (%s)\n", enc); #endif /* DEBUG */ if (!(strncmp(enc,"utf8",5) && strncmp(enc,"utf-8",6))) { - DWORD ret; LPWSTR *argvw; INT argcw, i; string s; #ifdef DEBUG + DWORD ret; HANDLE hStderr; hStderr = GetStdHandle( STD_ERROR_HANDLE ); #endif /* DEBUG */ @@ -197,7 +197,7 @@ get_command_line_args_utf8 (const_string enc, int *p_ac, char ***p_av) #endif /* DEBUG */ } argv[argcw] = NULL; + *p_ac = argc; + *p_av = argv; } - *p_ac = argc; - *p_av = argv; } diff --git a/Build/source/texk/ptexenc/ptexenc/unicode.h b/Build/source/texk/ptexenc/ptexenc/unicode.h index c5f2826966d..9e4c91ff3fb 100644 --- a/Build/source/texk/ptexenc/ptexenc/unicode.h +++ b/Build/source/texk/ptexenc/ptexenc/unicode.h @@ -52,6 +52,6 @@ extern long UPTEXtoUCS(long uptex); #define UTF32toUTF16LS(x) (0xdc00 + ( (x) & 0x3ff)) /* UTF-16 surrogate pair -> UTF-32 over U+FFFF */ -#define UTF16StoUTF32(x,y) ((((x) & 0x3ff) << 10) + ((y) & 0x3ff) +0x10000) +#define UTF16StoUTF32(x,y) ((((x) & 0x3ff) << 10) + ((y) & 0x3ff) + 0x10000) #endif /* PTEXENC_UNICODE_H */ |