diff options
author | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2018-11-18 23:15:08 +0000 |
---|---|---|
committer | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2018-11-18 23:15:08 +0000 |
commit | 9bc3bd97e43658c5252af9276d01598236e4165b (patch) | |
tree | 1e7eeb98fe956633aa133716f8c4ff285bd906e1 /Build/source/texk | |
parent | f128a308cbb33d054c841016aea7b327f5d4ae8f (diff) |
remove unused functions for XeTeX
git-svn-id: svn://tug.org/texlive/trunk@49190 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk')
-rw-r--r-- | Build/source/texk/web2c/ChangeLog | 4 | ||||
-rw-r--r-- | Build/source/texk/web2c/lib/ChangeLog | 6 | ||||
-rw-r--r-- | Build/source/texk/web2c/lib/texmfmp.c | 22 | ||||
-rw-r--r-- | Build/source/texk/web2c/texmfmp.h | 2 |
4 files changed, 30 insertions, 4 deletions
diff --git a/Build/source/texk/web2c/ChangeLog b/Build/source/texk/web2c/ChangeLog index d80ed5d7e9c..72a389f4274 100644 --- a/Build/source/texk/web2c/ChangeLog +++ b/Build/source/texk/web2c/ChangeLog @@ -1,3 +1,7 @@ +2018-11-19 Akira Kakuto <kakuto@fuk.kindai.ac.jp> + + * texmfmp.h: Remove unused functions in XeTeX. + 2018-11-17 Joseph Wright <joseph.wright@morningstar2.co.uk> * texmfmp.h: Support some primitives from pdfTeX in XeTeX. diff --git a/Build/source/texk/web2c/lib/ChangeLog b/Build/source/texk/web2c/lib/ChangeLog index 36c380d7b46..00ddce68bef 100644 --- a/Build/source/texk/web2c/lib/ChangeLog +++ b/Build/source/texk/web2c/lib/ChangeLog @@ -1,3 +1,9 @@ +2018-11-19 Akira Kakuto <kakuto@fuk.kindai.ac.jp> + + * texmfmp.c: Remove unused functions for XeTeX. + Check kpse_in_name_ok() in getfilesize(), getfiledump(), + and getmd5sum(). + 2018-11-18 Akira Kakuto <kakuto@fuk.kindai.ac.jp> * texmfmp.c: Make necessary changes for XeTeX in diff --git a/Build/source/texk/web2c/lib/texmfmp.c b/Build/source/texk/web2c/lib/texmfmp.c index c404020bd0b..329a3f9222d 100644 --- a/Build/source/texk/web2c/lib/texmfmp.c +++ b/Build/source/texk/web2c/lib/texmfmp.c @@ -3077,6 +3077,7 @@ void initstarttime(void) } } +#if !defined(XeTeX) char *makecstring(integer s) { static char *cstrbuf = NULL; @@ -3125,6 +3126,7 @@ char *makecfilename(integer s) *q = '\0'; return name; } +#endif /* !XeTeX */ void getcreationdate(void) { @@ -3213,6 +3215,9 @@ void getfilesize(integer s) if (file_name == NULL) { return; /* empty string */ } + if (! kpse_in_name_ok(file_name)) { + return; /* no permission */ + } recorder_record_input(file_name); /* get file status */ @@ -3251,13 +3256,15 @@ void getfiledump(integer s, int offset, int length) { FILE *f; int read, i; - poolpointer data_ptr; - poolpointer data_end; - char *file_name; #if defined(XeTeX) char *readbuffer, strbuf[3]; int j, k; -#endif +#else + poolpointer data_ptr; + poolpointer data_end; +#endif /* XeTeX */ + char *file_name; + if (length == 0) { /* empty result string */ return; @@ -3278,6 +3285,9 @@ void getfiledump(integer s, int offset, int length) if (file_name == NULL) { return; /* empty string */ } + if (! kpse_in_name_ok(file_name)) { + return; /* no permission */ + } /* read file data */ f = fopen(file_name, FOPEN_RBIN_MODE); @@ -3371,6 +3381,10 @@ void getmd5sum(strnumber s, boolean file) if (file_name == NULL) { return; /* empty string */ } + if (! kpse_in_name_ok(file_name)) { + return; /* no permission */ + } + /* in case of error the empty string is returned, no need for xfopen that aborts on error. */ diff --git a/Build/source/texk/web2c/texmfmp.h b/Build/source/texk/web2c/texmfmp.h index 1dd7c56d019..5aead37b11d 100644 --- a/Build/source/texk/web2c/texmfmp.h +++ b/Build/source/texk/web2c/texmfmp.h @@ -126,8 +126,10 @@ extern void pdftex_fail(const char *fmt, ...); #endif extern char start_time_str[]; extern void initstarttime(void); +#if !defined(XeTeX) extern char *makecstring(integer s); extern char *makecfilename(integer s); +#endif /* !XeTeX */ extern void getcreationdate(void); extern void getfilemoddate(integer s); extern void getfilesize(integer s); |