3 --- foomaticrip.c.orig 2012-07-02 14:50:46.000000000 +0000
5 @@ -180,7 +180,7 @@ char cupsfilterpath[PATH_MAX] = "/usr/lo
7 "/usr/lib/cups/filter";
9 -char modern_shell[64] = "/bin/bash";
10 +char modern_shell[64] = "/bin/sh";
12 void config_set_option(const char *key, const char *value)
14 @@ -1014,7 +1014,7 @@ int print_file(const char *filename, int
16 if (!ppd_supports_pdf())
18 - char pdf2ps_cmd[PATH_MAX];
19 + char pdf2ps_cmd[FM_CMDLINE_MAX];
22 char tmpfilename[PATH_MAX] = "";
23 @@ -1060,12 +1060,12 @@ int print_file(const char *filename, int
24 We give priority to Ghostscript here and use Poppler if
25 Ghostscript is not available. */
26 if (spooler == SPOOLER_CUPS)
27 - snprintf(pdf2ps_cmd, PATH_MAX,
28 + snprintf(pdf2ps_cmd, FM_CMDLINE_MAX,
29 "pdftops '%s' '%s' '%s' '%s' '%s' '%s'",
30 job->id, job->user, job->title, "1", job->optstr->data,
33 - snprintf(pdf2ps_cmd, PATH_MAX,
34 + snprintf(pdf2ps_cmd, FM_CMDLINE_MAX,
35 "gs -q -sstdout=%%stderr -sDEVICE=ps2write -sOutputFile=- "
36 "-dBATCH -dNOPAUSE -dPARANOIDSAFER -dNOINTERPOLATE %s 2>/dev/null || "
37 "pdftops -level2 -origpagesizes %s - 2>/dev/null",
38 @@ -1076,6 +1076,7 @@ int print_file(const char *filename, int
39 if (dup2(fileno(out), fileno(stdin)) < 0)
40 rip_die(EXIT_PRNERR_NORETRY_BAD_SETTINGS,
41 "Couldn't dup stdout of pdf-to-ps\n");
44 ret = print_file("<STDIN>", 0);
46 @@ -1107,6 +1108,7 @@ int print_file(const char *filename, int
47 /* Read further data from the file converter and not from STDIN */
48 if (dup2(fileno(fchandle), fileno(stdin)) < 0)
49 rip_die(EXIT_PRNERR_NORETRY_BAD_SETTINGS, "Couldn't dup fileconverterhandle\n");
52 ret = print_file("<STDIN>", 0);