diff options
Diffstat (limited to 'Build/source/texk/dvipsk')
-rw-r--r-- | Build/source/texk/dvipsk/ChangeLog | 10 | ||||
-rw-r--r-- | Build/source/texk/dvipsk/afm2tfm.c | 6 | ||||
-rwxr-xr-x | Build/source/texk/dvipsk/configure | 29 | ||||
-rw-r--r-- | Build/source/texk/dvipsk/loadfont.c | 2 | ||||
-rw-r--r-- | Build/source/texk/dvipsk/protos.h | 2 | ||||
-rw-r--r-- | Build/source/texk/dvipsk/resident.c | 2 | ||||
-rw-r--r-- | Build/source/texk/dvipsk/search.c | 2 | ||||
-rwxr-xr-x | Build/source/texk/dvipsk/squeeze/configure | 29 |
8 files changed, 49 insertions, 33 deletions
diff --git a/Build/source/texk/dvipsk/ChangeLog b/Build/source/texk/dvipsk/ChangeLog index 9e9e0cd8bf7..7c3f2a03d5c 100644 --- a/Build/source/texk/dvipsk/ChangeLog +++ b/Build/source/texk/dvipsk/ChangeLog @@ -1,3 +1,13 @@ +2011-06-16 Peter Breitenlohner <peb@mppmu.mpg.de> + + * afm2tfm.c (openfiles), resident.c (residentfont): Allow + find_suffix() to return a const string. + +2011-06-16 Peter Breitenlohner <peb@mppmu.mpg.de> + + * protos.h, loadfont.c (pkopen), search.c (pksearch): Declare + font name as const. + 2011-05-06 Karl Berry <karl@tug.org> * writet1.c: update copyright as in pdftexdir. diff --git a/Build/source/texk/dvipsk/afm2tfm.c b/Build/source/texk/dvipsk/afm2tfm.c index 2147e366167..e9ef486151b 100644 --- a/Build/source/texk/dvipsk/afm2tfm.c +++ b/Build/source/texk/dvipsk/afm2tfm.c @@ -1567,7 +1567,7 @@ openfiles(int argc, char **argv) const char *q; #endif register int i; - char *p; + const char *p; int arginc; tfmout = (FILE *)NULL; @@ -1699,7 +1699,7 @@ default: fprintf(stderr, "Unknown option %s %s ignored.\n", argv[2], argv[3]); #ifdef KPATHSEA if ((p = find_suffix(outname)) != NULL) - *(p-1) = 0; + outname[p-outname-1] = 0; strcat(outname, ".tfm"); if (tfmout == NULL && (tfmout=fopen(outname, WRITEBIN))==NULL) error("! can't open tfm output file"); @@ -1709,7 +1709,7 @@ default: fprintf(stderr, "Unknown option %s %s ignored.\n", argv[2], argv[3]); */ if (p == NULL) p = find_suffix(outname); - *(p-1) = 0; + outname[p-outname-1] = 0; q = xbasename(outname); strcpy(tmpstr, q); /* be careful, q and outname are overlapping */ diff --git a/Build/source/texk/dvipsk/configure b/Build/source/texk/dvipsk/configure index e324cea278a..fb287974011 100755 --- a/Build/source/texk/dvipsk/configure +++ b/Build/source/texk/dvipsk/configure @@ -12634,39 +12634,42 @@ $as_echo_n "checking what warning flags to pass to the C compiler... " >&6; } if ${kpse_cv_warning_cflags+:} false; then : $as_echo_n "(cached) " >&6 else - if test "x$enable_compiler_warnings" = xno; then + if test "x$GCC" = xyes; then kpse_cv_warning_cflags= -elif test "x$GCC" = xyes; then +if test "x$enable_compiler_warnings" != xno; then kpse_cv_warning_cflags="-Wimplicit -Wreturn-type" -case `$CC -dumpversion` in #( + case `$CC -dumpversion` in #( 3.4.* | 4.*) : kpse_cv_warning_cflags="$kpse_cv_warning_cflags -Wdeclaration-after-statement" ;; #( *) : ;; esac -case `$CC -dumpversion` in #( + case `$CC -dumpversion` in #( 3.[234].* | 4.*) : kpse_cv_warning_cflags="$kpse_cv_warning_cflags -Wno-unknown-pragmas" ;; #( *) : ;; esac -if test "x$enable_compiler_warnings" != xmin; then - kpse_cv_warning_cflags="-Wall -Wunused $kpse_cv_warning_cflags" - kpse_cv_warning_cflags="$kpse_cv_warning_cflags -Wmissing-prototypes -Wmissing-declarations" - if test "x$enable_compiler_warnings" != xyes; then - kpse_cv_warning_cflags="$kpse_cv_warning_cflags -Wparentheses -Wswitch -Wtrigraphs -Wpointer-arith" - kpse_cv_warning_cflags="$kpse_cv_warning_cflags -Wcast-qual -Wcast-align -Wwrite-strings" - case `$CC -dumpversion` in #( + if test "x$enable_compiler_warnings" != xmin; then + kpse_cv_warning_cflags="-Wall -Wunused $kpse_cv_warning_cflags" + kpse_cv_warning_cflags="$kpse_cv_warning_cflags -Wmissing-prototypes -Wmissing-declarations" + if test "x$enable_compiler_warnings" != xyes; then + kpse_cv_warning_cflags="$kpse_cv_warning_cflags -Wparentheses -Wswitch -Wtrigraphs -Wpointer-arith" + kpse_cv_warning_cflags="$kpse_cv_warning_cflags -Wcast-qual -Wcast-align -Wwrite-strings" + case `$CC -dumpversion` in #( 3.4.* | 4.*) : kpse_cv_warning_cflags="$kpse_cv_warning_cflags -Wold-style-definition" ;; #( *) : ;; esac - if test "x$enable_compiler_warnings" != xmax; then - kpse_cv_warning_cflags="$kpse_cv_warning_cflags -Wshadow" + if test "x$enable_compiler_warnings" != xmax; then + kpse_cv_warning_cflags="$kpse_cv_warning_cflags -Wshadow" + fi fi fi fi +elif test "x$enable_compiler_warnings" = xno; then + kpse_cv_warning_cflags= else kpse_cv_warning_cflags= # FIXME: warning flags for non-GNU C compilers fi diff --git a/Build/source/texk/dvipsk/loadfont.c b/Build/source/texk/dvipsk/loadfont.c index ab1d7fe6c55..dee7f1f2cfc 100644 --- a/Build/source/texk/dvipsk/loadfont.c +++ b/Build/source/texk/dvipsk/loadfont.c @@ -109,7 +109,7 @@ static Boolean pkopen(register fontdesctype *fd) { register char *d, *n; - char *name_ret; + const char *name_ret; #ifdef KPATHSEA int dpi_ret; #else diff --git a/Build/source/texk/dvipsk/protos.h b/Build/source/texk/dvipsk/protos.h index 3429da3a3b3..a027b207b4a 100644 --- a/Build/source/texk/dvipsk/protos.h +++ b/Build/source/texk/dvipsk/protos.h @@ -194,7 +194,7 @@ extern short scanpage(void); /* prototypes for functions from search.c */ #ifdef KPATHSEA extern FILE *search(kpse_file_format_type format, const char *file, const char *mode); -extern FILE *pksearch(const char *file, const char *mode, halfword dpi, char **name_ret, int *dpi_ret); +extern FILE *pksearch(const char *file, const char *mode, halfword dpi, const char **name_ret, int *dpi_ret); #else /* !KPATSHEA */ extern FILE *search(char *path, const char *file, const char *mode); extern FILE *pksearch(char *path, const char *file, const char *mode, char *n, halfword dpi, halfword vdpi); diff --git a/Build/source/texk/dvipsk/resident.c b/Build/source/texk/dvipsk/resident.c index a82a801ed4e..474ef9a7e27 100644 --- a/Build/source/texk/dvipsk/resident.c +++ b/Build/source/texk/dvipsk/resident.c @@ -877,7 +877,7 @@ getpsinfo(const char *name) out what to do; couldn't do this above since we want to check the suffix. */ if (hdr_name) { - char *suffix = find_suffix (hdr_name); + const char *suffix = find_suffix (hdr_name); if (encoding_p || STREQ (suffix, "enc")) { /* (SPQR) if it is a reencoding, pass on to FontPart, and download as usual */ diff --git a/Build/source/texk/dvipsk/search.c b/Build/source/texk/dvipsk/search.c index ec37f8b3e5e..7ef93ba5d36 100644 --- a/Build/source/texk/dvipsk/search.c +++ b/Build/source/texk/dvipsk/search.c @@ -195,7 +195,7 @@ search(kpse_file_format_type format, const char *file, const char *mode) FILE * pksearch(const char *file, const char *mode, halfword dpi, - char **name_ret, int *dpi_ret) + const char **name_ret, int *dpi_ret) { FILE *ret; kpse_glyph_file_type font_file; diff --git a/Build/source/texk/dvipsk/squeeze/configure b/Build/source/texk/dvipsk/squeeze/configure index 0d2597f81d1..2f64866be30 100755 --- a/Build/source/texk/dvipsk/squeeze/configure +++ b/Build/source/texk/dvipsk/squeeze/configure @@ -3302,39 +3302,42 @@ $as_echo_n "checking what warning flags to pass to the C compiler... " >&6; } if ${kpse_cv_warning_cflags+:} false; then : $as_echo_n "(cached) " >&6 else - if test "x$enable_compiler_warnings" = xno; then + if test "x$GCC" = xyes; then kpse_cv_warning_cflags= -elif test "x$GCC" = xyes; then +if test "x$enable_compiler_warnings" != xno; then kpse_cv_warning_cflags="-Wimplicit -Wreturn-type" -case `$CC -dumpversion` in #( + case `$CC -dumpversion` in #( 3.4.* | 4.*) : kpse_cv_warning_cflags="$kpse_cv_warning_cflags -Wdeclaration-after-statement" ;; #( *) : ;; esac -case `$CC -dumpversion` in #( + case `$CC -dumpversion` in #( 3.[234].* | 4.*) : kpse_cv_warning_cflags="$kpse_cv_warning_cflags -Wno-unknown-pragmas" ;; #( *) : ;; esac -if test "x$enable_compiler_warnings" != xmin; then - kpse_cv_warning_cflags="-Wall -Wunused $kpse_cv_warning_cflags" - kpse_cv_warning_cflags="$kpse_cv_warning_cflags -Wmissing-prototypes -Wmissing-declarations" - if test "x$enable_compiler_warnings" != xyes; then - kpse_cv_warning_cflags="$kpse_cv_warning_cflags -Wparentheses -Wswitch -Wtrigraphs -Wpointer-arith" - kpse_cv_warning_cflags="$kpse_cv_warning_cflags -Wcast-qual -Wcast-align -Wwrite-strings" - case `$CC -dumpversion` in #( + if test "x$enable_compiler_warnings" != xmin; then + kpse_cv_warning_cflags="-Wall -Wunused $kpse_cv_warning_cflags" + kpse_cv_warning_cflags="$kpse_cv_warning_cflags -Wmissing-prototypes -Wmissing-declarations" + if test "x$enable_compiler_warnings" != xyes; then + kpse_cv_warning_cflags="$kpse_cv_warning_cflags -Wparentheses -Wswitch -Wtrigraphs -Wpointer-arith" + kpse_cv_warning_cflags="$kpse_cv_warning_cflags -Wcast-qual -Wcast-align -Wwrite-strings" + case `$CC -dumpversion` in #( 3.4.* | 4.*) : kpse_cv_warning_cflags="$kpse_cv_warning_cflags -Wold-style-definition" ;; #( *) : ;; esac - if test "x$enable_compiler_warnings" != xmax; then - kpse_cv_warning_cflags="$kpse_cv_warning_cflags -Wshadow" + if test "x$enable_compiler_warnings" != xmax; then + kpse_cv_warning_cflags="$kpse_cv_warning_cflags -Wshadow" + fi fi fi fi +elif test "x$enable_compiler_warnings" = xno; then + kpse_cv_warning_cflags= else kpse_cv_warning_cflags= # FIXME: warning flags for non-GNU C compilers fi |