Skip to content
This repository was archived by the owner on Mar 6, 2023. It is now read-only.

Commit 80eda19

Browse files
committed
update with upstream.
git-svn-id: https://serveur-svn.lri.fr/svn/modhel/luatex/trunk@7355 0b2b3880-5936-4365-a048-eb17d2e5a6bf
1 parent 1237885 commit 80eda19

24 files changed

+259
-71
lines changed

source/configure

+1-1
Original file line numberDiff line numberDiff line change
@@ -4040,7 +4040,7 @@ test "x$enable_web2c" = xno || {
40404040
need_zlib=yes
40414041
}
40424042

4043-
# $Id: web2c.ac 53078 2019-12-10 18:39:13Z karl $
4043+
# $Id: web2c.ac 54824 2020-04-21 18:43:36Z lscarso $
40444044
# texk/web2c/ac/web2c.ac: configure.ac fragment for the TeX Live subdirectory texk/web2c/
40454045
## configure options for TeX and MF
40464046

source/libs/configure

+1-1
Original file line numberDiff line numberDiff line change
@@ -3220,7 +3220,7 @@ test "x$enable_web2c" = xno || {
32203220
need_zlib=yes
32213221
}
32223222

3223-
# $Id: web2c.ac 53078 2019-12-10 18:39:13Z karl $
3223+
# $Id: web2c.ac 54824 2020-04-21 18:43:36Z lscarso $
32243224
# texk/web2c/ac/web2c.ac: configure.ac fragment for the TeX Live subdirectory texk/web2c/
32253225
## configure options for TeX and MF
32263226

source/m4/kpse-pkgs.m4

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# $Id: kpse-pkgs.m4 49640 2019-01-08 18:57:53Z karl $
1+
# $Id: kpse-pkgs.m4 54824 2020-04-21 18:43:36Z lscarso $
22
# Private Autoconf macros for the TeX Live (TL) tree.
33
# Copyright 2016-2019 Karl Berry <tex-live@tug.org>
44
# Copyright 2009-2015 Peter Breitenlohner <tex-live@tug.org>

source/texk/configure

+1-1
Original file line numberDiff line numberDiff line change
@@ -3220,7 +3220,7 @@ test "x$enable_web2c" = xno || {
32203220
need_zlib=yes
32213221
}
32223222

3223-
# $Id: web2c.ac 53078 2019-12-10 18:39:13Z karl $
3223+
# $Id: web2c.ac 54824 2020-04-21 18:43:36Z lscarso $
32243224
# texk/web2c/ac/web2c.ac: configure.ac fragment for the TeX Live subdirectory texk/web2c/
32253225
## configure options for TeX and MF
32263226

source/texk/kpathsea/ChangeLog

+7
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
2020-04-26 Akira Kakuto <kakuto@w32tex.org>
2+
3+
* readable.c, knj.c: Support very long input path name,
4+
longer than _MAX_PATH for Windows, if it really exists and
5+
input name is given in full-absolute path in a command line.
6+
(Windows only).
7+
18
2020-04-10 Karl Berry <karl@tug.org>
29

310
* version.ac: now 6.3.3/dev since TL'20 is released.

source/texk/kpathsea/knj.c

+51-5
Original file line numberDiff line numberDiff line change
@@ -116,12 +116,35 @@ kpathsea_fsyscp_xfopen (kpathsea kpse, const char *filename, const char *mode)
116116
FILE *f;
117117
wchar_t *fnamew, modew[4];
118118
int i;
119-
119+
unsigned char *fnn;
120+
unsigned char *p;
120121
assert(filename && mode);
121-
122-
fnamew = get_wstring_from_mbstring(kpse->File_system_codepage, filename, fnamew=NULL);
122+
/*
123+
Support very long input path name, longer than _MAX_PATH for
124+
Windows, if it really exists and input name is given in
125+
full-absolute path in a command line.
126+
*/
127+
fnn = xmalloc(strlen(filename) + 10);
128+
if ((filename[0] == '/' && filename[1] == '/') ||
129+
(filename[0] == '\\' && filename[1] == '\\')) {
130+
filename += 2;
131+
strcpy (fnn, "\\\\?\\UNC\\");
132+
strcat (fnn, filename);
133+
} else if (filename[1] == ':') {
134+
strcpy (fnn, "\\\\?\\");
135+
strcat (fnn, filename);
136+
} else {
137+
strcpy (fnn, filename);
138+
}
139+
for (p = fnn; *p; p++) {
140+
if (*p == '/')
141+
*p = '\\';
142+
}
143+
144+
fnamew = get_wstring_from_mbstring(kpse->File_system_codepage, fnn, fnamew=NULL);
123145
for(i=0; (modew[i]=(wchar_t)mode[i]); i++) {} /* mode[i] must be ASCII */
124146
f = _wfopen(fnamew, modew);
147+
free (fnn);
125148
if (f == NULL)
126149
FATAL_PERROR(filename);
127150
if (KPATHSEA_DEBUG_P (KPSE_DEBUG_FOPEN)) {
@@ -149,12 +172,35 @@ kpathsea_fsyscp_fopen (kpathsea kpse, const char *filename, const char *mode)
149172
FILE *f;
150173
wchar_t *fnamew, modew[4];
151174
int i;
152-
175+
unsigned char *fnn;
176+
unsigned char *p;
153177
assert(filename && mode);
178+
/*
179+
Support very long input path name, longer than _MAX_PATH for
180+
Windows, if it really exists and input name is given in
181+
full-absolute path in a command line.
182+
*/
183+
fnn = xmalloc(strlen(filename) + 10);
184+
if ((filename[0] == '/' && filename[1] == '/') ||
185+
(filename[0] == '\\' && filename[1] == '\\')) {
186+
filename += 2;
187+
strcpy (fnn, "\\\\?\\UNC\\");
188+
strcat (fnn, filename);
189+
} else if (filename[1] == ':') {
190+
strcpy (fnn, "\\\\?\\");
191+
strcat (fnn, filename);
192+
} else {
193+
strcpy (fnn, filename);
194+
}
195+
for (p = fnn; *p; p++) {
196+
if (*p == '/')
197+
*p = '\\';
198+
}
154199

155-
fnamew = get_wstring_from_mbstring(kpse->File_system_codepage, filename, fnamew=NULL);
200+
fnamew = get_wstring_from_mbstring(kpse->File_system_codepage, fnn, fnamew=NULL);
156201
for(i=0; (modew[i]=(wchar_t)mode[i]); i++) {} /* mode[i] must be ASCII */
157202
f = _wfopen(fnamew, modew);
203+
free (fnn);
158204
if (f != NULL) {
159205
if (KPATHSEA_DEBUG_P (KPSE_DEBUG_FOPEN)) {
160206
DEBUGF_START ();

source/texk/kpathsea/readable.c

+28-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,33 @@ static boolean
4141
READABLE(kpathsea kpse, const_string fn, unsigned int st)
4242
{
4343
wchar_t *fnw;
44-
fnw = get_wstring_from_mbstring(kpse->File_system_codepage, fn, fnw=NULL);
44+
unsigned char *fnn;
45+
unsigned char *p;
46+
47+
fnn = xmalloc(strlen(fn) + 10);
48+
/*
49+
Support very long input path name, longer than _MAX_PATH for
50+
Windows, if it really exists and input name is given in
51+
full-absolute path in a command line.
52+
*/
53+
if ((fn[0] == '/' && fn[1] == '/') ||
54+
(fn[0] == '\\' && fn[1] == '\\')) {
55+
fn += 2;
56+
strcpy (fnn, "\\\\?\\UNC\\");
57+
strcat (fnn, fn);
58+
} else if (fn[1] == ':') {
59+
strcpy (fnn, "\\\\?\\");
60+
strcat (fnn, fn);
61+
} else {
62+
strcpy (fnn, fn);
63+
}
64+
65+
for (p = fnn; *p; p++) {
66+
if (*p == '/')
67+
*p = '\\';
68+
}
69+
70+
fnw = get_wstring_from_mbstring(kpse->File_system_codepage, fnn, fnw=NULL);
4571
if ((st = GetFileAttributesW(fnw)) != 0xFFFFFFFF) {
4672
/* succeeded */
4773
errno = 0;
@@ -58,6 +84,7 @@ READABLE(kpathsea kpse, const_string fn, unsigned int st)
5884
break;
5985
}
6086
}
87+
free (fnn);
6188
if (fnw)
6289
free (fnw);
6390
return ((st != 0xFFFFFFFF) && !(st & FILE_ATTRIBUTE_DIRECTORY));

source/texk/web2c/ChangeLog

+10
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
2020-04-23 Tomas Rokicki <rokicki@gmail.com>
2+
and Karl Berry <karl@freefriends.org>
3+
4+
* patgen.web,
5+
* pktogf.web,
6+
* pktype.web: fix trivial typos and clarify public domain status.
7+
No code changes.
8+
(These .web files are not maintained by DEK, per
9+
https://tug.org/TUGbpat/tb35-1/tb109knut.pdf page 2.)
10+
111
2020-04-13 Andreas Scherer <https://ascherer.github.io>
212

313
* ctangleboot.cin: Add comment for section 6.

source/texk/web2c/Makefile.am

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## $Id: Makefile.am 51577 2019-07-08 06:07:11Z lscarso $
1+
## $Id: Makefile.am 54824 2020-04-21 18:43:36Z lscarso $
22
## Makefile.am for the TeX Live subdirectory texk/web2c/.
33
##
44
## Copyright 2017 Karl Berry <tex-live@tug.org>

source/texk/web2c/ac/web2c.ac

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# $Id: web2c.ac 53078 2019-12-10 18:39:13Z karl $
1+
# $Id: web2c.ac 54824 2020-04-21 18:43:36Z lscarso $
22
# texk/web2c/ac/web2c.ac: configure.ac fragment for the TeX Live subdirectory texk/web2c/
33
dnl
44
dnl Copyright 2016-2019 Karl Berry <tex-live@tug.org>

source/texk/web2c/configure

+1-1
Original file line numberDiff line numberDiff line change
@@ -18604,7 +18604,7 @@ fi
1860418604

1860518605
# Include additional code for web2c.
1860618606

18607-
# $Id: web2c.ac 53078 2019-12-10 18:39:13Z karl $
18607+
# $Id: web2c.ac 54824 2020-04-21 18:43:36Z lscarso $
1860818608
# texk/web2c/ac/web2c.ac: configure.ac fragment for the TeX Live subdirectory texk/web2c/
1860918609
## configure options for TeX and MF
1861018610

source/texk/web2c/configure.ac

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
dnl $Id: configure.ac 51470 2019-06-26 16:09:52Z karl $
1+
dnl $Id: configure.ac 54824 2020-04-21 18:43:36Z lscarso $
22
dnl Process this file with Autoconf to produce a configure script for Web2c.
33
dnl
44
dnl Copyright 2018-2019 Karl Berry <tex-live@tug.org>

source/texk/web2c/ctangleboot.cin

+11-11
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#line 83 "cwebdir/ctangle.w"
99

1010
/*:2*//*6:*/
11-
#line 111 "cwebdir/ctang-w2c.ch"
11+
#line 52 "cwebdir/comm-w2c.h"
1212

1313
#ifndef HAVE_GETTEXT
1414
#define HAVE_GETTEXT 0
@@ -166,7 +166,7 @@
166166
#line 66 "cwebdir/ctangle.w"
167167

168168
/*5:*/
169-
#line 111 "cwebdir/ctang-w2c.ch"
169+
#line 37 "cwebdir/comm-w2c.h"
170170

171171
typedef bool boolean;
172172
typedef uint8_t eight_bits;
@@ -175,23 +175,23 @@ extern int program;
175175
extern int phase;
176176

177177
/*:5*//*7:*/
178-
#line 111 "cwebdir/ctang-w2c.ch"
178+
#line 86 "cwebdir/comm-w2c.h"
179179

180180
extern char section_text[];
181181
extern char*section_text_end;
182182
extern char*id_first;
183183
extern char*id_loc;
184184

185185
/*:7*//*8:*/
186-
#line 111 "cwebdir/ctang-w2c.ch"
186+
#line 101 "cwebdir/comm-w2c.h"
187187

188188
extern char buffer[];
189189
extern char*buffer_end;
190190
extern char*loc;
191191
extern char*limit;
192192

193193
/*:8*//*9:*/
194-
#line 111 "cwebdir/ctang-w2c.ch"
194+
#line 116 "cwebdir/comm-w2c.h"
195195

196196
typedef struct name_info{
197197
char*byte_start;
@@ -225,7 +225,7 @@ extern void print_section_name(name_pointer);
225225
extern void sprint_section_name(char*,name_pointer);
226226

227227
/*:9*//*10:*/
228-
#line 111 "cwebdir/ctang-w2c.ch"
228+
#line 157 "cwebdir/comm-w2c.h"
229229

230230
extern int history;
231231
extern int wrap_up(void);
@@ -234,7 +234,7 @@ extern void fatal(const char*,const char*);
234234
extern void overflow(const char*);
235235

236236
/*:10*//*11:*/
237-
#line 111 "cwebdir/ctang-w2c.ch"
237+
#line 172 "cwebdir/comm-w2c.h"
238238

239239
extern int include_depth;
240240
extern FILE*file[];
@@ -258,22 +258,22 @@ extern void check_complete(void);
258258
extern void reset_input(void);
259259

260260
/*:11*//*12:*/
261-
#line 111 "cwebdir/ctang-w2c.ch"
261+
#line 195 "cwebdir/comm-w2c.h"
262262

263263
extern sixteen_bits section_count;
264264
extern boolean changed_section[];
265265
extern boolean change_pending;
266266
extern boolean print_where;
267267

268268
/*:12*//*13:*/
269-
#line 111 "cwebdir/ctang-w2c.ch"
269+
#line 208 "cwebdir/comm-w2c.h"
270270

271271
extern int argc;
272272
extern char**argv;
273273
extern boolean flags[];
274274

275275
/*:13*//*14:*/
276-
#line 111 "cwebdir/ctang-w2c.ch"
276+
#line 220 "cwebdir/comm-w2c.h"
277277

278278
extern FILE*C_file;
279279
extern FILE*tex_file;
@@ -283,7 +283,7 @@ extern FILE*check_file;
283283
extern FILE*active_file;
284284

285285
/*:14*//*15:*/
286-
#line 111 "cwebdir/ctang-w2c.ch"
286+
#line 230 "cwebdir/comm-w2c.h"
287287

288288
extern void common_init(void);
289289
extern void print_stats(void);

source/texk/web2c/ctiedir/ChangeLog

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
2020-04-26 Andreas Scherer <https://ascherer.github.io>
2+
3+
* ctie-k.ch: Fix several typos in ctie.w.
4+
Use British English also in the changefile.
5+
Make the result TeXable, preserving section numbers.
6+
17
2014-06-18 Peter Breitenlohner <peb@mppmu.mpg.de>
28

39
* ctie-k.ch: Avoid useless char subscript warnings.

0 commit comments

Comments
 (0)