texlive[49190] Build/source/texk/web2c: remove unused functions for
commits+kakuto at tug.org
commits+kakuto at tug.org
Mon Nov 19 00:15:09 CET 2018
Revision: 49190
http://tug.org/svn/texlive?view=revision&revision=49190
Author: kakuto
Date: 2018-11-19 00:15:08 +0100 (Mon, 19 Nov 2018)
Log Message:
-----------
remove unused functions for XeTeX
Modified Paths:
--------------
trunk/Build/source/texk/web2c/ChangeLog
trunk/Build/source/texk/web2c/lib/ChangeLog
trunk/Build/source/texk/web2c/lib/texmfmp.c
trunk/Build/source/texk/web2c/texmfmp.h
Modified: trunk/Build/source/texk/web2c/ChangeLog
===================================================================
--- trunk/Build/source/texk/web2c/ChangeLog 2018-11-18 22:49:29 UTC (rev 49189)
+++ trunk/Build/source/texk/web2c/ChangeLog 2018-11-18 23:15:08 UTC (rev 49190)
@@ -1,3 +1,7 @@
+2018-11-19 Akira Kakuto <kakuto at fuk.kindai.ac.jp>
+
+ * texmfmp.h: Remove unused functions in XeTeX.
+
2018-11-17 Joseph Wright <joseph.wright at morningstar2.co.uk>
* texmfmp.h: Support some primitives from pdfTeX in XeTeX.
Modified: trunk/Build/source/texk/web2c/lib/ChangeLog
===================================================================
--- trunk/Build/source/texk/web2c/lib/ChangeLog 2018-11-18 22:49:29 UTC (rev 49189)
+++ trunk/Build/source/texk/web2c/lib/ChangeLog 2018-11-18 23:15:08 UTC (rev 49190)
@@ -1,3 +1,9 @@
+2018-11-19 Akira Kakuto <kakuto at 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 at fuk.kindai.ac.jp>
* texmfmp.c: Make necessary changes for XeTeX in
Modified: trunk/Build/source/texk/web2c/lib/texmfmp.c
===================================================================
--- trunk/Build/source/texk/web2c/lib/texmfmp.c 2018-11-18 22:49:29 UTC (rev 49189)
+++ trunk/Build/source/texk/web2c/lib/texmfmp.c 2018-11-18 23:15:08 UTC (rev 49190)
@@ -3077,6 +3077,7 @@
}
}
+#if !defined(XeTeX)
char *makecstring(integer s)
{
static char *cstrbuf = NULL;
@@ -3125,6 +3126,7 @@
*q = '\0';
return name;
}
+#endif /* !XeTeX */
void getcreationdate(void)
{
@@ -3213,6 +3215,9 @@
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 @@
{
FILE *f;
int read, i;
+#if defined(XeTeX)
+ char *readbuffer, strbuf[3];
+ int j, k;
+#else
poolpointer data_ptr;
poolpointer data_end;
+#endif /* XeTeX */
char *file_name;
-#if defined(XeTeX)
- char *readbuffer, strbuf[3];
- int j, k;
-#endif
+
if (length == 0) {
/* empty result string */
return;
@@ -3278,6 +3285,9 @@
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 @@
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.
*/
Modified: trunk/Build/source/texk/web2c/texmfmp.h
===================================================================
--- trunk/Build/source/texk/web2c/texmfmp.h 2018-11-18 22:49:29 UTC (rev 49189)
+++ trunk/Build/source/texk/web2c/texmfmp.h 2018-11-18 23:15:08 UTC (rev 49190)
@@ -126,8 +126,10 @@
#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);
More information about the tex-live-commits
mailing list