117 |
FLIMAGE_IO *fileIO; |
FLIMAGE_IO *fileIO; |
118 |
int status, n; |
int status, n; |
119 |
|
|
120 |
snprintf(name, sizeof(name), "%s/%s_%d", sp->tmpdir, sp->prefix, pageNo); |
fl_snprintf(name, sizeof(name), "%s/%s_%d", sp->tmpdir, sp->prefix, pageNo); |
121 |
|
|
122 |
if (sp->verbose) |
if (sp->verbose) |
123 |
M_err("LoadPage", "loading %s", name); |
M_err("LoadPage", "loading %s", name); |
164 |
|
|
165 |
for (i = 1; i <= n; i++) |
for (i = 1; i <= n; i++) |
166 |
{ |
{ |
167 |
snprintf(name, sizeof(name), "%s/%s_%d", sp->tmpdir, sp->prefix, i); |
fl_snprintf(name, sizeof(name), "%s/%s_%d", sp->tmpdir, sp->prefix, i); |
168 |
if (sp->verbose) |
if (sp->verbose) |
169 |
M_err("Cleanup", "deleting %s", name); |
M_err("Cleanup", "deleting %s", name); |
170 |
remove(name); |
remove(name); |
194 |
int old_sort; |
int old_sort; |
195 |
|
|
196 |
/* the tmp file pattern will be /tmp/gs_$InputFile_$pid_pageNO */ |
/* the tmp file pattern will be /tmp/gs_$InputFile_$pid_pageNO */ |
197 |
snprintf(prefix, sizeof(prefix), |
fl_snprintf(prefix, sizeof(prefix), |
198 |
"gs_%s_%d", file_tail(im->infile), (int) fl_getpid()); |
"gs_%s_%d", file_tail(im->infile), (int) fl_getpid()); |
199 |
|
|
200 |
sp->prefix = strdup(prefix); |
sp->prefix = strdup(prefix); |
202 |
if (sp->verbose) |
if (sp->verbose) |
203 |
M_err("LoadPS", "prefix=%s", sp->prefix); |
M_err("LoadPS", "prefix=%s", sp->prefix); |
204 |
|
|
205 |
snprintf(cmd, sizeof(cmd), |
fl_snprintf(cmd, sizeof(cmd), |
206 |
"gs -sDEVICE=%s %s -r%dx%d -sOutputFile=%s/%s_%%d -- %s %s", |
"gs -sDEVICE=%s %s -r%dx%d -sOutputFile=%s/%s_%%d -- %s %s", |
207 |
GS_DEVICE, GS_OPTION, (int) sp->xdpi, (int) sp->ydpi, |
GS_DEVICE, GS_OPTION, (int) sp->xdpi, (int) sp->ydpi, |
208 |
sp->tmpdir, sp->prefix, im->infile, |
sp->tmpdir, sp->prefix, im->infile, |