diff options
author | Karl Berry <karl@freefriends.org> | 2007-03-23 19:01:22 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2007-03-23 19:01:22 +0000 |
commit | f0c9e514f6a42d6df94a4d458f2ee97f355f1822 (patch) | |
tree | 4b52438fe38a2f3332c2019115d9ac2bedf0e6dc | |
parent | 67530ee162aa3756a2b324eed8774d6e5223b9f9 (diff) |
more pathname reporting, if DVIPS_DEBUG is set
git-svn-id: svn://tug.org/texlive/trunk@4079 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r-- | Build/source/texk/dvipsk/ChangeLog | 7 | ||||
-rw-r--r-- | Build/source/texk/dvipsk/dvips.c | 19 | ||||
-rw-r--r-- | Build/source/texk/dvipsk/loadfont.c | 11 | ||||
-rw-r--r-- | Build/source/texk/dvipsk/resident.c | 24 |
4 files changed, 55 insertions, 6 deletions
diff --git a/Build/source/texk/dvipsk/ChangeLog b/Build/source/texk/dvipsk/ChangeLog index d404c720f47..eaf47cea1bb 100644 --- a/Build/source/texk/dvipsk/ChangeLog +++ b/Build/source/texk/dvipsk/ChangeLog @@ -1,7 +1,12 @@ +2007-03-23 Karl Berry <karl@tug.org> + + * dvips.c, loadfont.c, resident.c: also report map files + and config files, if the envvar DVIPS_DEBUG is set. From Akira. + 2007-03-20 Karl Berry <karl@tug.org> * download.c, output.c, emspecial.c: report full pathnames, - to help debugging and for consistency with TeX. + to help debugging and for consistency with TeX. From Akira. 2007-03-19 Karl Berry <karl@tug.org> diff --git a/Build/source/texk/dvipsk/dvips.c b/Build/source/texk/dvipsk/dvips.c index 8a8134c7fae..0a29f382efd 100644 --- a/Build/source/texk/dvipsk/dvips.c +++ b/Build/source/texk/dvipsk/dvips.c @@ -159,6 +159,7 @@ integer swmem ; /* font memory in the PostScript printer */ int quiet ; /* should we only print errors to stderr? */ int filter ; /* act as filter default output to stdout, default input to stdin? */ +int dvips_debug_flag ; /* output config and map files to stderr if 1 */ int prettycolumn ; /* the column we are at when running pretty */ int gargc ; /* global argument count */ char **gargv ; /* global argument vector */ @@ -630,6 +631,14 @@ Primary author of Dvips: T. Rokicki; -k maintainer: T. Kacvinsky/ S. Rahtz."); } #endif #endif + dvips_debug_flag = 0 ; + { /* for compilers incompatible with c99 */ + char *s = (char *)getenv ("DVIPS_DEBUG") ; + if (s) { + dvips_debug_flag = 1 ; + free (s) ; + } + } initialize() ; checkenv(0) ; getdefaults(CONFIGFILE) ; @@ -1116,8 +1125,14 @@ default: revpslists() ; getpsinfo((char *)NULL) ; revpslists() ; - if (!quiet) - (void)fprintf(stderr, "%s %s\n", banner, banner2) ; + if (dvips_debug_flag) { + if (!quiet) + (void)fprintf(stderr, "\n%s %s\n", banner, banner2) ; + prettycolumn = 0 ; + } else { + if (!quiet) + (void)fprintf(stderr, "%s %s\n", banner, banner2) ; + } if (*iname) { dvifile = fopen(iname, READBIN) ; /* diff --git a/Build/source/texk/dvipsk/loadfont.c b/Build/source/texk/dvipsk/loadfont.c index 1151ae2210c..1c22de9d062 100644 --- a/Build/source/texk/dvipsk/loadfont.c +++ b/Build/source/texk/dvipsk/loadfont.c @@ -333,6 +333,9 @@ loadfont P1C(register fontdesctype *, curfnt) register chardesctype *cd = 0 ; int maxcc = 0 ; int munged = 0 ; + extern int prettycolumn ; + extern int quiet ; + extern char *realnameoffile ; /* * We clear out some pointers: */ @@ -358,6 +361,14 @@ loadfont P1C(register fontdesctype *, curfnt) tfmload(curfnt) ; return ; } + if (!quiet) { + if (strlen(realnameoffile) + prettycolumn > STDOUTSIZE) { + fprintf(stderr, "\n") ; + prettycolumn = 0 ; + } + (void)fprintf(stderr, "<%s>", realnameoffile); + prettycolumn += strlen(realnameoffile) + 2 ; + } #ifdef DEBUG if (dd(D_FONTS)) (void)fprintf(stderr,"Loading pk font %s at %.1fpt\n", diff --git a/Build/source/texk/dvipsk/resident.c b/Build/source/texk/dvipsk/resident.c index e6644932fcd..c117be9ac76 100644 --- a/Build/source/texk/dvipsk/resident.c +++ b/Build/source/texk/dvipsk/resident.c @@ -32,6 +32,8 @@ struct resfont *reshash[RESHASHPRIME] ; * These are the external variables we use. */ extern char *realnameoffile ; +extern int prettycolumn ; +extern int dvips_debug_flag ; #ifdef DEBUG extern integer debug_flag; #endif /* DEBUG */ @@ -441,6 +443,14 @@ getdefaults P1C(char *, s) #else if ((deffile=search(d,PSname,READ))!=NULL) { #endif + if (dvips_debug_flag && !quiet) { + if (strlen(realnameoffile) + prettycolumn > STDOUTSIZE) { + fprintf(stderr, "\n") ; + prettycolumn = 0 ; + } + (void)fprintf(stderr, "{%s}", realnameoffile); + prettycolumn += strlen(realnameoffile) + 2 ; + } #ifdef DEBUG if (dd (D_CONFIG)) { fprintf (stderr, "Reading dvips config file `%s':\n", realnameoffile); @@ -845,9 +855,9 @@ default: */ void getpsinfo P1C(char *, name) { - FILE *deffile ; - register char *p ; - char *specinfo, *downloadinfo ; + FILE *deffile ; + register char *p ; + char *specinfo, *downloadinfo ; char downbuf[500] ; char specbuf[500] ; int slen ; @@ -855,6 +865,14 @@ void getpsinfo P1C(char *, name) if (name == 0) name = psmapfile ; if ((deffile=search(mappath, name, READ))!=NULL) { + if (dvips_debug_flag && !quiet) { + if (strlen(realnameoffile) + prettycolumn > STDOUTSIZE) { + fprintf(stderr, "\n") ; + prettycolumn = 0 ; + } + (void)fprintf(stderr, "{%s}", realnameoffile); + prettycolumn += strlen(realnameoffile) + 2 ; + } while (fgets(was_inline, INLINE_SIZE, deffile)!=NULL) { p = was_inline ; if (*p > ' ' && *p != '*' && *p != '#' && *p != ';' && *p != '%') { |