diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2009-01-02 19:06:00 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2009-01-02 19:06:00 +0000 |
commit | b72c064e50b47e2535098fce0089481bae19efed (patch) | |
tree | 001aba3514eb2de73e21e178a5ba1d8d826683f1 /converter/ppm/picttoppm.c | |
parent | 86f29c0eb54d03d4a5c8703cf8386ee5cb7a95c5 (diff) | |
download | netpbm-mirror-b72c064e50b47e2535098fce0089481bae19efed.tar.gz netpbm-mirror-b72c064e50b47e2535098fce0089481bae19efed.tar.xz netpbm-mirror-b72c064e50b47e2535098fce0089481bae19efed.zip |
Release 10.45.01
git-svn-id: http://svn.code.sf.net/p/netpbm/code/advanced@812 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'converter/ppm/picttoppm.c')
-rw-r--r-- | converter/ppm/picttoppm.c | 21 |
1 files changed, 19 insertions, 2 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); |