summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c
diff options
context:
space:
mode:
authorAkira Kakuto <kakuto@fuk.kindai.ac.jp>2013-12-01 22:36:39 +0000
committerAkira Kakuto <kakuto@fuk.kindai.ac.jp>2013-12-01 22:36:39 +0000
commitd45f96bd51a09fecd9331f5d99ddc94621d82486 (patch)
tree83ef3cb926b8fe2d6759170d6eb5e1f3a6c65986 /Build/source/texk/web2c
parent4813cb6776a1c73bf8e5fea4eec861bb5aec7467 (diff)
Revert
git-svn-id: svn://tug.org/texlive/trunk@32291 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c')
-rw-r--r--Build/source/texk/web2c/lib/ChangeLog5
-rw-r--r--Build/source/texk/web2c/lib/openclose.c26
-rw-r--r--Build/source/texk/web2c/lib/texmfmp.c39
3 files changed, 3 insertions, 67 deletions
diff --git a/Build/source/texk/web2c/lib/ChangeLog b/Build/source/texk/web2c/lib/ChangeLog
index dc177684c14..3d19d8073b4 100644
--- a/Build/source/texk/web2c/lib/ChangeLog
+++ b/Build/source/texk/web2c/lib/ChangeLog
@@ -1,8 +1,3 @@
-2013-12-01 TANAKA Takuji <KXD02663@nifty.ne.jp>
-
- * openclose.c, texmfmp.c: Support KANJI file name in
- (e)up-TeX on Windows.
-
2013-06-11 Peter Breitenlohner <peb@mppmu.mpg.de>
Update to e-pTeX and e-upTeX 130605 from Hironori Kitagawa.
diff --git a/Build/source/texk/web2c/lib/openclose.c b/Build/source/texk/web2c/lib/openclose.c
index 1d545358d22..2620b8894bd 100644
--- a/Build/source/texk/web2c/lib/openclose.c
+++ b/Build/source/texk/web2c/lib/openclose.c
@@ -56,13 +56,9 @@ recorder_start(void)
free(recorder_name);
recorder_name = temp;
}
-
-#if defined(WIN32)
- recorder_file = fsyscp_xfopen(recorder_name, FOPEN_W_MODE);
-#else
+
recorder_file = xfopen(recorder_name, FOPEN_W_MODE);
-#endif
-
+
cwd = xgetcwd();
fprintf(recorder_file, "PWD %s\n", cwd);
free(cwd);
@@ -105,7 +101,7 @@ recorder_change_filename (string new_name)
/* reopen the recorder file by FOPEN_A_MODE. */
#if defined(WIN32)
- recorder_file = fsyscp_xfopen (recorder_name, FOPEN_A_MODE);
+ recorder_file = fopen (recorder_name, FOPEN_A_MODE);
#endif
if (temp)
@@ -169,11 +165,7 @@ open_input (FILE **f_ptr, int filefmt, const_string fopen_mode)
them from there. We only look for the name as-is. */
if (output_directory && !kpse_absolute_p (nameoffile+1, false)) {
fname = concat3 (output_directory, DIR_SEP_STRING, nameoffile + 1);
-#if defined(WIN32)
- *f_ptr = fsyscp_xfopen (fname, fopen_mode);
-#else
*f_ptr = fopen (fname, fopen_mode);
-#endif
if (*f_ptr) {
free (nameoffile);
namelength = strlen (fname);
@@ -190,11 +182,7 @@ open_input (FILE **f_ptr, int filefmt, const_string fopen_mode)
/* A negative FILEFMT means don't use a path. */
if (filefmt < 0) {
/* no_file_path, for BibTeX .aux files and MetaPost things. */
-#if defined(WIN32)
- *f_ptr = fsyscp_xfopen(nameoffile + 1, fopen_mode);
-#else
*f_ptr = fopen(nameoffile + 1, fopen_mode);
-#endif
/* FIXME... fullnameoffile = xstrdup(nameoffile + 1); */
} else {
/* The only exception to `must_exist' being true is \openin, for
@@ -239,11 +227,7 @@ open_input (FILE **f_ptr, int filefmt, const_string fopen_mode)
*f_ptr = nkf_open (nameoffile + 1, fopen_mode);
} else
#endif
-#if defined(WIN32)
- *f_ptr = fsyscp_xfopen (nameoffile + 1, fopen_mode);
-#else
*f_ptr = xfopen (nameoffile + 1, fopen_mode);
-#endif
}
}
}
@@ -291,11 +275,7 @@ open_output (FILE **f_ptr, const_string fopen_mode)
}
/* Is the filename openable as given? */
-#if defined(WIN32)
- *f_ptr = fsyscp_xfopen (fname, fopen_mode);
-#else
*f_ptr = fopen (fname, fopen_mode);
-#endif
if (!*f_ptr) {
/* Can't open as given. Try the envvar. */
diff --git a/Build/source/texk/web2c/lib/texmfmp.c b/Build/source/texk/web2c/lib/texmfmp.c
index 4696eefd429..515d68b0b50 100644
--- a/Build/source/texk/web2c/lib/texmfmp.c
+++ b/Build/source/texk/web2c/lib/texmfmp.c
@@ -628,9 +628,6 @@ void
maininit (int ac, string *av)
{
string main_input_file;
-#if IS_upTeX && defined(WIN32)
- string enc;
-#endif
/* Save to pass along to topenin. */
argc = ac;
@@ -658,47 +655,11 @@ maininit (int ac, string *av)
kpse_set_program_name (argv[0], NULL);
initkanji ();
#endif
-#if IS_upTeX && defined(WIN32)
- enc = kpse_var_value("command_line_encoding");
- if (enc) {
-#ifdef DEBUG
- 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
- HANDLE hStderr;
- hStderr = GetStdHandle( STD_ERROR_HANDLE );
-#endif /* DEBUG */
- file_system_codepage = CP_UTF8;
- is_cp932_system = 0;
- argvw = CommandLineToArgvW(GetCommandLineW(), &argcw);
- argc = argcw;
- argv = xmalloc(sizeof(char *)*(argcw+1));
- for (i=0; i<argcw; i++) {
- s = get_utf8_from_wstring(argvw[i], s=NULL);
- argv[i] = s;
-#ifdef DEBUG
- fprintf(stderr, "Commandline arguments %d:(%s) [", i, argv[i]);
- WriteConsoleW( hStderr, argvw[i], wcslen(argvw[i]), &ret, NULL);
- fprintf(stderr, "]\n");
-#endif /* DEBUG */
- }
- }
- }
-#endif
/* If the user says --help or --version, we need to notice early. And
since we want the --ini option, have to do it before getting into
the web (which would read the base file, etc.). */
-#if IS_upTeX && defined(WIN32)
- parse_options (argc, argv);
-#else
parse_options (ac, av);
-#endif
#if IS_pTeX
/* In pTeX and friends, texmf.cnf is not recorded in the case of --recorder,