diff options
-rw-r--r-- | converter/ppm/picttoppm.c | 21 | ||||
-rw-r--r-- | doc/HISTORY | 5 |
2 files changed, 23 insertions, 3 deletions
diff --git a/converter/ppm/picttoppm.c b/converter/ppm/picttoppm.c index 6f34dae4..a89c3086 100644 --- a/converter/ppm/picttoppm.c +++ b/converter/ppm/picttoppm.c @@ -4056,6 +4056,23 @@ interpret_pict(FILE * const ofP) { +static void +loadDefaultFontDir(void) { +/*---------------------------------------------------------------------------- + Load the fonts from the font directory file "fontdir" (in the current + directory), if it exists. +-----------------------------------------------------------------------------*/ + struct stat statbuf; + int rc; + + rc = stat("fontdir", &statbuf); + + if (rc == 0) + load_fontdir("fontdir"); +} + + + int main(int argc, char * argv[]) { int argn; @@ -4092,8 +4109,6 @@ main(int argc, char * argv[]) { ++argn; } - load_fontdir("fontdir"); - if (argn < argc) { ifp = pm_openr(argv[argn]); ++argn; @@ -4103,6 +4118,8 @@ main(int argc, char * argv[]) { if (argn != argc) pm_usage(usage); + loadDefaultFontDir(); + if (header) { stage = "Reading 512 byte header"; skip(512); diff --git a/doc/HISTORY b/doc/HISTORY index 3a560145..538176d6 100644 --- a/doc/HISTORY +++ b/doc/HISTORY @@ -1,4 +1,4 @@ -ee http://netpbm.sourceforge.net/history.html for a general history of +See http://netpbm.sourceforge.net/history.html for a general history of Netpbm. CHANGE HISTORY @@ -6,6 +6,9 @@ CHANGE HISTORY not yet BJH Release 10.46.00 + picttoppm: Don't fail if 'fontdir' file doesn't exist. Bug + from 10.44. + ilbmtoppm: fix bug: appends color map PPM to output if input has color map; fails if input doesn't have color map. Broken in 10.18. |