texlive[69670] Build/source/texk/ptexenc/ptekf.c: ptekf.c: enable to
commits+kakuto at tug.org
commits+kakuto at tug.org
Fri Feb 2 04:02:24 CET 2024
Revision: 69670
https://tug.org/svn/texlive?view=revision&revision=69670
Author: kakuto
Date: 2024-02-02 04:02:24 +0100 (Fri, 02 Feb 2024)
Log Message:
-----------
ptekf.c: enable to compile on Windows (Windows only)
Modified Paths:
--------------
trunk/Build/source/texk/ptexenc/ptekf.c
Modified: trunk/Build/source/texk/ptexenc/ptekf.c
===================================================================
--- trunk/Build/source/texk/ptexenc/ptekf.c 2024-02-02 00:43:58 UTC (rev 69669)
+++ trunk/Build/source/texk/ptexenc/ptekf.c 2024-02-02 03:02:24 UTC (rev 69670)
@@ -5,7 +5,9 @@
*/
+#ifndef _WIN32
#include <unistd.h>
+#endif
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
@@ -13,7 +15,12 @@
#include <kpathsea/getopt.h>
#include <kpathsea/progname.h>
#include <kpathsea/lib.h>
-
+#ifdef _WIN32
+#include <kpathsea/knj.h>
+#ifndef CP_UTF8
+#define CP_UTF8 65001
+#endif
+#endif
#include <ptexenc/ptexenc.h>
#include <c-auto.h>
@@ -65,7 +72,7 @@
char *outfname;
FILE *infp, *outfp;
-#if defined(WIN32)
+#if defined(_WIN32)
#define R_MODE "rb"
#define W_MODE "wb"
#else
@@ -101,10 +108,10 @@
return 0;
}
kpse_set_program_name(argv[0], "ptekf");
-#if defined(WIN32)
+#if defined(_WIN32)
{
int ac;
- char **av, *enc;
+ char **av;
file_system_codepage = CP_UTF8;
is_cp932_system = 0;
if (get_command_line_args_utf8("utf-8", &ac, &av)) {
More information about the tex-live-commits
mailing list.