/* * magic.c: embedded m4 script for magicfilter-2. * * generated on Fri Feb 25 10:17:46 PST 2000 from magic.m4 */ char *m4template[] = { "dnl\n", "dnl Build the output-postscript filter; if this is a postscript file,\n", "dnl just dump it to the printer, otherwise if a DEVICE is specified\n", "dnl and either DPI or PSfilter_OPTIONS are set, run ghostscripts, else fall\n", "dnl over dead.\n", "dnl\n", "define(PSopts,-q -dSAFER -dNOPAUSE ifdef(`DEVICE',`-sDEVICE='DEVICE,) ifdef(`DPI', `-r'DPI) defn(PS_OPTIONS) -sOutputFile=- - -c quit)dnl\n", "define(PSfilter,ifelse(POSTSCRIPT,true,\n", " postscript defn(`TEXT_ARGS'),\n", " ifdef(`DEVICE', filter gs PSopts,\n", " ifdef(`PS_OPTIONS', filter gs PSopts,\n", " reject ) ) ) )dnl\n", "define(PCLfilter, ifdef(`PCL',cat,reject))dnl\n", "define(PJLfilter, ifdef(`PJL',cat,ifdef(`PCL',cat,reject)))dnl\n", "define(Comment, `# magicfilter for the 'PrinterInfo)\n", "#\n", "Comment\n", "#\n", "\n", "ifelse(defn(`PSfilter'),reject,,\n", "#\n", "# Portable imagemaps.\n", "#\n", "/p[gbp]m/ pipe/postscript/ pnmtops\n", "\n", "#\n", "# picture formats.\n", "#\n", "/gif/ pipe/p[gbp]m/ giftopnm\n", "/jpeg/ pipe/p[gbp]m/ djpeg -pnm\n", "/tiff/ pipe/p[gbp]m/ tifftopnm\n", "/bmp/ pipe/p[gbp]m/ bmptoppm\n", "\n", "#\n", "# Miscellaneous formats.\n", "#\n", "/fig/ pipe/postscript/ fig2dev -Lps -P -l dummy\n", "/dvi/ fpipe/postscript/ dvips ifdef(`XDPI',-X XDPI -Y YDPI, -D DPI) -R -q -f\n", "/fax.*normal/ pipe/p[gbp]m/ g3topbm -stretch\n", "/fax/ pipe/p[gbp]m/ g3topbm\n", ")dnl\n", "\n", "/pdf/ filter gs -q ifdef(`DEVICE',,`-sDEVICE=psgray') PSopts\n", "\n", "#\n", "# compressed formats.\n", "#\n", "/gzip/ pipe zcat\n", "/compress/ pipe zcat\n", "/packed/ pipe gzip -dc\n", "/frozen/ pipe gzip -dc\n", "/lzh/ pipe gzip -dc\n", "\n", "dnl\n", "dnl after everything else, put out the methods for printing postscript,\n", "dnl pcl, and pjl.\n", "dnl\n", "#\n", "# printer languages.\n", "#\n", "/postscript/ PSfilter\n", "/pcl/ PCLfilter\n", "/pjl/ PJLfilter\n", "\n", "dnl\n", "dnl default print policy: if HANDLE_TEXT is defined, use that to\n", "dnl print the file, otherwise if TEXT is not false, just cat it, otherwise\n", "dnl if a PS filter is defined, use pstext, else else reject it\n", "dnl\n", "#\n", "# text, finally\n", "#\n", "/text/ ifdef(`HANDLE_TEXT', defn(`HANDLE_TEXT'),\n", " ifelse(defn(`TEXT'),false,\n", " ifelse(defn(`PSfilter'),reject,\n", " reject,\n", " ifelse(POSTSCRIPT,true,\n", " `filter/postscript/',\n", " `pipe') pstext),\n", " text defn(`TEXT_ARGS')))\n", "# EOF\n", 0 };