X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=src%2Fpdf2swf.c;h=6e1c09635f22676701a0210f61d2b6b70c00d5b2;hb=20d1aafd684a9e78d141bd511597282e7f9b2d81;hp=4241b559be2258ff0563ede1b5d49c382618e105;hpb=e1b0e6caeec7eba3ba7e5441e80f95fae4c8ca78;p=swftools.git diff --git a/src/pdf2swf.c b/src/pdf2swf.c index 4241b55..6e1c096 100644 --- a/src/pdf2swf.c +++ b/src/pdf2swf.c @@ -28,9 +28,6 @@ #ifdef HAVE_DIRENT_H #include #endif -#ifdef HAVE_SYS_STAT_H -#include -#endif #include "../lib/args.h" #include "../lib/os.h" #include "../lib/rfxswf.h" @@ -486,24 +483,12 @@ int main(int argn, char *argv[]) int nup_pos = 0; int x,y; char* installPath = getInstallationPath(); - char* fontdir = 0; initLog(0,-1,0,0,-1,loglevel); -#if defined(WIN32) && defined(HAVE_STAT) && defined(HAVE_SYS_STAT_H) if(installPath) { - fontdir = concatPaths(installPath, "fonts"); - FILE*test = fopen(concatPaths(fontdir,"\\d050000l.afm"), "rb"); - if(!test) { - fprintf(stderr, "Couldn't find file %s - pdf2swf not installed properly? OS says:\n", concatPaths(fontdir, "\\d050000l.afm")); - perror("open"); - exit(1); - } - fclose(test); + fontpaths[fontpathpos++] = concatPaths(installPath, "fonts"); } -#else - fontdir = concatPaths(installPath, "fonts"); -#endif #ifdef HAVE_SRAND48 srand48(time(0)); @@ -553,9 +538,6 @@ int main(int argn, char *argv[]) } /* add fonts */ - if(fontdir) { - driver->set_parameter("fontdir", fontdir); - } for(t=0;tset_parameter("fontdir", fontpaths[t]); } @@ -687,7 +669,7 @@ int main(int argn, char *argv[]) pdf->destroy(pdf); - char*zip = ""; + const char*zip = ""; if(zlib) { zip = "-z"; }