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

Commit

Permalink
update with upstream.
Browse files Browse the repository at this point in the history
git-svn-id: https://serveur-svn.lri.fr/svn/modhel/luatex/trunk@7355 0b2b3880-5936-4365-a048-eb17d2e5a6bf
  • Loading branch information
luigiScarso committed Apr 26, 2020
1 parent 1237885 commit 80eda19
Show file tree
Hide file tree
Showing 24 changed files with 259 additions and 71 deletions.
2 changes: 1 addition & 1 deletion source/configure
Original file line number Diff line number Diff line change
Expand Up @@ -4040,7 +4040,7 @@ test "x$enable_web2c" = xno || {
need_zlib=yes
}

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

Expand Down
2 changes: 1 addition & 1 deletion source/libs/configure
Original file line number Diff line number Diff line change
Expand Up @@ -3220,7 +3220,7 @@ test "x$enable_web2c" = xno || {
need_zlib=yes
}

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

Expand Down
2 changes: 1 addition & 1 deletion source/m4/kpse-pkgs.m4
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# $Id: kpse-pkgs.m4 49640 2019-01-08 18:57:53Z karl $
# $Id: kpse-pkgs.m4 54824 2020-04-21 18:43:36Z lscarso $
# Private Autoconf macros for the TeX Live (TL) tree.
# Copyright 2016-2019 Karl Berry <tex-live@tug.org>
# Copyright 2009-2015 Peter Breitenlohner <tex-live@tug.org>
Expand Down
2 changes: 1 addition & 1 deletion source/texk/configure
Original file line number Diff line number Diff line change
Expand Up @@ -3220,7 +3220,7 @@ test "x$enable_web2c" = xno || {
need_zlib=yes
}

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

Expand Down
7 changes: 7 additions & 0 deletions source/texk/kpathsea/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
2020-04-26 Akira Kakuto <kakuto@w32tex.org>

* readable.c, knj.c: Support very long input path name,
longer than _MAX_PATH for Windows, if it really exists and
input name is given in full-absolute path in a command line.
(Windows only).

2020-04-10 Karl Berry <karl@tug.org>

* version.ac: now 6.3.3/dev since TL'20 is released.
Expand Down
56 changes: 51 additions & 5 deletions source/texk/kpathsea/knj.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,12 +116,35 @@ kpathsea_fsyscp_xfopen (kpathsea kpse, const char *filename, const char *mode)
FILE *f;
wchar_t *fnamew, modew[4];
int i;

unsigned char *fnn;
unsigned char *p;
assert(filename && mode);

fnamew = get_wstring_from_mbstring(kpse->File_system_codepage, filename, fnamew=NULL);
/*
Support very long input path name, longer than _MAX_PATH for
Windows, if it really exists and input name is given in
full-absolute path in a command line.
*/
fnn = xmalloc(strlen(filename) + 10);
if ((filename[0] == '/' && filename[1] == '/') ||
(filename[0] == '\\' && filename[1] == '\\')) {
filename += 2;
strcpy (fnn, "\\\\?\\UNC\\");
strcat (fnn, filename);
} else if (filename[1] == ':') {
strcpy (fnn, "\\\\?\\");
strcat (fnn, filename);
} else {
strcpy (fnn, filename);
}
for (p = fnn; *p; p++) {
if (*p == '/')
*p = '\\';
}

fnamew = get_wstring_from_mbstring(kpse->File_system_codepage, fnn, fnamew=NULL);
for(i=0; (modew[i]=(wchar_t)mode[i]); i++) {} /* mode[i] must be ASCII */
f = _wfopen(fnamew, modew);
free (fnn);
if (f == NULL)
FATAL_PERROR(filename);
if (KPATHSEA_DEBUG_P (KPSE_DEBUG_FOPEN)) {
Expand Down Expand Up @@ -149,12 +172,35 @@ kpathsea_fsyscp_fopen (kpathsea kpse, const char *filename, const char *mode)
FILE *f;
wchar_t *fnamew, modew[4];
int i;

unsigned char *fnn;
unsigned char *p;
assert(filename && mode);
/*
Support very long input path name, longer than _MAX_PATH for
Windows, if it really exists and input name is given in
full-absolute path in a command line.
*/
fnn = xmalloc(strlen(filename) + 10);
if ((filename[0] == '/' && filename[1] == '/') ||
(filename[0] == '\\' && filename[1] == '\\')) {
filename += 2;
strcpy (fnn, "\\\\?\\UNC\\");
strcat (fnn, filename);
} else if (filename[1] == ':') {
strcpy (fnn, "\\\\?\\");
strcat (fnn, filename);
} else {
strcpy (fnn, filename);
}
for (p = fnn; *p; p++) {
if (*p == '/')
*p = '\\';
}

fnamew = get_wstring_from_mbstring(kpse->File_system_codepage, filename, fnamew=NULL);
fnamew = get_wstring_from_mbstring(kpse->File_system_codepage, fnn, fnamew=NULL);
for(i=0; (modew[i]=(wchar_t)mode[i]); i++) {} /* mode[i] must be ASCII */
f = _wfopen(fnamew, modew);
free (fnn);
if (f != NULL) {
if (KPATHSEA_DEBUG_P (KPSE_DEBUG_FOPEN)) {
DEBUGF_START ();
Expand Down
29 changes: 28 additions & 1 deletion source/texk/kpathsea/readable.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,33 @@ static boolean
READABLE(kpathsea kpse, const_string fn, unsigned int st)
{
wchar_t *fnw;
fnw = get_wstring_from_mbstring(kpse->File_system_codepage, fn, fnw=NULL);
unsigned char *fnn;
unsigned char *p;

fnn = xmalloc(strlen(fn) + 10);
/*
Support very long input path name, longer than _MAX_PATH for
Windows, if it really exists and input name is given in
full-absolute path in a command line.
*/
if ((fn[0] == '/' && fn[1] == '/') ||
(fn[0] == '\\' && fn[1] == '\\')) {
fn += 2;
strcpy (fnn, "\\\\?\\UNC\\");
strcat (fnn, fn);
} else if (fn[1] == ':') {
strcpy (fnn, "\\\\?\\");
strcat (fnn, fn);
} else {
strcpy (fnn, fn);
}

for (p = fnn; *p; p++) {
if (*p == '/')
*p = '\\';
}

fnw = get_wstring_from_mbstring(kpse->File_system_codepage, fnn, fnw=NULL);
if ((st = GetFileAttributesW(fnw)) != 0xFFFFFFFF) {
/* succeeded */
errno = 0;
Expand All @@ -58,6 +84,7 @@ READABLE(kpathsea kpse, const_string fn, unsigned int st)
break;
}
}
free (fnn);
if (fnw)
free (fnw);
return ((st != 0xFFFFFFFF) && !(st & FILE_ATTRIBUTE_DIRECTORY));
Expand Down
10 changes: 10 additions & 0 deletions source/texk/web2c/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
2020-04-23 Tomas Rokicki <rokicki@gmail.com>
and Karl Berry <karl@freefriends.org>

* patgen.web,
* pktogf.web,
* pktype.web: fix trivial typos and clarify public domain status.
No code changes.
(These .web files are not maintained by DEK, per
https://tug.org/TUGbpat/tb35-1/tb109knut.pdf page 2.)

2020-04-13 Andreas Scherer <https://ascherer.github.io>

* ctangleboot.cin: Add comment for section 6.
Expand Down
2 changes: 1 addition & 1 deletion source/texk/web2c/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## $Id: Makefile.am 51577 2019-07-08 06:07:11Z lscarso $
## $Id: Makefile.am 54824 2020-04-21 18:43:36Z lscarso $
## Makefile.am for the TeX Live subdirectory texk/web2c/.
##
## Copyright 2017 Karl Berry <tex-live@tug.org>
Expand Down
2 changes: 1 addition & 1 deletion source/texk/web2c/ac/web2c.ac
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# $Id: web2c.ac 53078 2019-12-10 18:39:13Z karl $
# $Id: web2c.ac 54824 2020-04-21 18:43:36Z lscarso $
# texk/web2c/ac/web2c.ac: configure.ac fragment for the TeX Live subdirectory texk/web2c/
dnl
dnl Copyright 2016-2019 Karl Berry <tex-live@tug.org>
Expand Down
2 changes: 1 addition & 1 deletion source/texk/web2c/configure
Original file line number Diff line number Diff line change
Expand Up @@ -18604,7 +18604,7 @@ fi

# Include additional code for web2c.

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

Expand Down
2 changes: 1 addition & 1 deletion source/texk/web2c/configure.ac
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
dnl $Id: configure.ac 51470 2019-06-26 16:09:52Z karl $
dnl $Id: configure.ac 54824 2020-04-21 18:43:36Z lscarso $
dnl Process this file with Autoconf to produce a configure script for Web2c.
dnl
dnl Copyright 2018-2019 Karl Berry <tex-live@tug.org>
Expand Down
22 changes: 11 additions & 11 deletions source/texk/web2c/ctangleboot.cin
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#line 83 "cwebdir/ctangle.w"

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

#ifndef HAVE_GETTEXT
#define HAVE_GETTEXT 0
Expand Down Expand Up @@ -166,7 +166,7 @@
#line 66 "cwebdir/ctangle.w"

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

typedef bool boolean;
typedef uint8_t eight_bits;
Expand All @@ -175,23 +175,23 @@ extern int program;
extern int phase;

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

extern char section_text[];
extern char*section_text_end;
extern char*id_first;
extern char*id_loc;

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

extern char buffer[];
extern char*buffer_end;
extern char*loc;
extern char*limit;

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

typedef struct name_info{
char*byte_start;
Expand Down Expand Up @@ -225,7 +225,7 @@ extern void print_section_name(name_pointer);
extern void sprint_section_name(char*,name_pointer);

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

extern int history;
extern int wrap_up(void);
Expand All @@ -234,7 +234,7 @@ extern void fatal(const char*,const char*);
extern void overflow(const char*);

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

extern int include_depth;
extern FILE*file[];
Expand All @@ -258,22 +258,22 @@ extern void check_complete(void);
extern void reset_input(void);

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

extern sixteen_bits section_count;
extern boolean changed_section[];
extern boolean change_pending;
extern boolean print_where;

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

extern int argc;
extern char**argv;
extern boolean flags[];

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

extern FILE*C_file;
extern FILE*tex_file;
Expand All @@ -283,7 +283,7 @@ extern FILE*check_file;
extern FILE*active_file;

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

extern void common_init(void);
extern void print_stats(void);
Expand Down
6 changes: 6 additions & 0 deletions source/texk/web2c/ctiedir/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
2020-04-26 Andreas Scherer <https://ascherer.github.io>

* ctie-k.ch: Fix several typos in ctie.w.
Use British English also in the changefile.
Make the result TeXable, preserving section numbers.

2014-06-18 Peter Breitenlohner <peb@mppmu.mpg.de>

* ctie-k.ch: Avoid useless char subscript warnings.
Expand Down
Loading

0 comments on commit 80eda19

Please sign in to comment.