From 4d5de479f15b3829f09a2ea7f95a4dc02f2a173d Mon Sep 17 00:00:00 2001 From: Peter Breitenlohner Date: Tue, 26 Mar 2013 15:48:24 +0000 Subject: (x)dvipdfmx: Avoid gcc warnings git-svn-id: svn://tug.org/texlive/trunk@29515 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/texk/dvipdfmx/ChangeLog | 4 ++++ Build/source/texk/dvipdfmx/src/dpxfile.c | 4 ++-- Build/source/texk/dvipdfmx/src/dpxfile.h | 2 +- Build/source/texk/xdvipdfmx/ChangeLog | 6 ++++++ Build/source/texk/xdvipdfmx/src/dpxfile.c | 12 ++++++------ Build/source/texk/xdvipdfmx/src/dpxfile.h | 2 +- 6 files changed, 20 insertions(+), 10 deletions(-) diff --git a/Build/source/texk/dvipdfmx/ChangeLog b/Build/source/texk/dvipdfmx/ChangeLog index 670008ef74a..d9bc001fe66 100644 --- a/Build/source/texk/dvipdfmx/ChangeLog +++ b/Build/source/texk/dvipdfmx/ChangeLog @@ -1,3 +1,7 @@ +2013-03-26 Peter Breitenlohner + + * src/dpxfile.[ch]: Synch with ../xdvipdfmx. + 2013-03-26 Akira Kakuto * src/dvi.c: Correct my mistake to delete RELEASE(q). diff --git a/Build/source/texk/dvipdfmx/src/dpxfile.c b/Build/source/texk/dvipdfmx/src/dpxfile.c index dcb520577d2..0ce27b6ce02 100644 --- a/Build/source/texk/dvipdfmx/src/dpxfile.c +++ b/Build/source/texk/dvipdfmx/src/dpxfile.c @@ -815,7 +815,7 @@ dpx_create_temp_file (void) #endif /* 0 */ char * -dpx_create_fix_temp_file (char *filename) +dpx_create_fix_temp_file (const char *filename) { #define PREFIX "dvipdfmx." static const char *dir = NULL; @@ -835,7 +835,7 @@ dpx_create_fix_temp_file (char *filename) MD5_init(&state); MD5_write(&state, (unsigned char *)cwd, strlen(cwd)); - MD5_write(&state, (unsigned char *)filename, strlen(filename)); + MD5_write(&state, (unsigned const char *)filename, strlen(filename)); MD5_final(digest, &state); ret = NEW(strlen(dir)+1+strlen(PREFIX)+MAX_KEY_LEN*2 + 1, char); diff --git a/Build/source/texk/dvipdfmx/src/dpxfile.h b/Build/source/texk/dvipdfmx/src/dpxfile.h index 53b9fc7855e..df95b8c5411 100644 --- a/Build/source/texk/dvipdfmx/src/dpxfile.h +++ b/Build/source/texk/dvipdfmx/src/dpxfile.h @@ -57,7 +57,7 @@ extern int dpx_file_apply_filter (const char *cmdtmpl, const char *input, const char *output, unsigned char version); extern char *dpx_create_temp_file (void); -extern char *dpx_create_fix_temp_file (char *filename); +extern char *dpx_create_fix_temp_file (const char *filename); extern void dpx_delete_old_cache (int life); extern void dpx_delete_temp_file (char *tmp, int force); /* tmp freed here */ diff --git a/Build/source/texk/xdvipdfmx/ChangeLog b/Build/source/texk/xdvipdfmx/ChangeLog index 80920c21040..9d20d94184a 100644 --- a/Build/source/texk/xdvipdfmx/ChangeLog +++ b/Build/source/texk/xdvipdfmx/ChangeLog @@ -1,3 +1,9 @@ +2013-03-26 Peter Breitenlohner + + * data/dvipdfmx.cfg: Synch with ../dvipdfmx/. + + * src/dpxfile.[ch]: Avoid gcc warnings. + 2013-03-26 Akira Kakuto * src/dpxfile.c, src/dpxfile.h, src/dvi.c, src/dvicodes.h diff --git a/Build/source/texk/xdvipdfmx/src/dpxfile.c b/Build/source/texk/xdvipdfmx/src/dpxfile.c index 56d2f899d64..3a77e21e098 100644 --- a/Build/source/texk/xdvipdfmx/src/dpxfile.c +++ b/Build/source/texk/xdvipdfmx/src/dpxfile.c @@ -748,7 +748,7 @@ dpx_find_dfont_file (const char *filename) return fqpn; } -static char * +static const char * dpx_get_tmpdir (void) { # ifdef WIN32 @@ -756,7 +756,7 @@ dpx_get_tmpdir (void) # else /* WIN32 */ # define __TMPDIR "/tmp" #endif /* WIN32 */ - char *_tmpd; + const char *_tmpd; # ifdef HAVE_GETENV _tmpd = getenv("TMPDIR"); @@ -838,10 +838,10 @@ dpx_create_temp_file (void) #endif /* 0 */ char * -dpx_create_fix_temp_file (char *filename) +dpx_create_fix_temp_file (const char *filename) { #define PREFIX "xdvipdfmx." - static char *dir = NULL; + static const char *dir = NULL; static char *cwd = NULL; char *ret, *s; int i; @@ -858,7 +858,7 @@ dpx_create_fix_temp_file (char *filename) MD5_init(&state); MD5_write(&state, (unsigned char *)cwd, strlen(cwd)); - MD5_write(&state, (unsigned char *)filename, strlen(filename)); + MD5_write(&state, (unsigned const char *)filename, strlen(filename)); MD5_final(digest, &state); ret = NEW(strlen(dir)+1+strlen(PREFIX)+MAX_KEY_LEN*2 + 1, char); @@ -880,7 +880,7 @@ dpx_create_fix_temp_file (char *filename) return ret; } -int +static int dpx_clear_cache_filter (const struct dirent *ent) { int plen = strlen(PREFIX); if (strlen(ent->d_name) != plen + MAX_KEY_LEN * 2) return 0; diff --git a/Build/source/texk/xdvipdfmx/src/dpxfile.h b/Build/source/texk/xdvipdfmx/src/dpxfile.h index 04d812156cd..e4ae4c0a679 100644 --- a/Build/source/texk/xdvipdfmx/src/dpxfile.h +++ b/Build/source/texk/xdvipdfmx/src/dpxfile.h @@ -62,7 +62,7 @@ extern int dpx_file_apply_filter (const char *cmdtmpl, const char *input, const char *output, unsigned char version); extern char *dpx_create_temp_file (void); -extern char *dpx_create_fix_temp_file (char *filename); +extern char *dpx_create_fix_temp_file (const char *filename); extern void dpx_delete_old_cache (int life); extern void dpx_delete_temp_file (char *tmp, int force); /* tmp freed here */ -- cgit v1.2.3