diff options
author | Karl Berry <karl@freefriends.org> | 2010-03-28 18:14:06 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2010-03-28 18:14:06 +0000 |
commit | 20a73306c88f8fdb131482213e9b1b6a8c5e729b (patch) | |
tree | be5857d40602520beebe30c48e31306bbc0e9d17 /Build/source/texk/dvipsk/dvips.c | |
parent | 549a764cf19a1f244d773ab70965eadeef67d5a8 (diff) |
eliminate spaces before semicolons
git-svn-id: svn://tug.org/texlive/trunk@17592 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/dvipsk/dvips.c')
-rw-r--r-- | Build/source/texk/dvipsk/dvips.c | 954 |
1 files changed, 477 insertions, 477 deletions
diff --git a/Build/source/texk/dvipsk/dvips.c b/Build/source/texk/dvipsk/dvips.c index 95259ab05a3..fe6f0283f6d 100644 --- a/Build/source/texk/dvipsk/dvips.c +++ b/Build/source/texk/dvipsk/dvips.c @@ -18,7 +18,7 @@ #else /* ! KPATHSEA */ #include <stdlib.h> /* for malloc, etc. */ #if !defined(SYSV) && !defined(WIN32) -extern char *strtok() ; /* some systems don't have this in strings.h */ +extern char *strtok(); /* some systems don't have this in strings.h */ #endif #if defined(WIN32) #include <io.h> @@ -61,70 +61,70 @@ extern char *strtok() ; /* some systems don't have this in strings.h */ /* PS fonts fully downloaded as headers */ char *downloadedpsnames[DOWNLOADEDPSSIZE]; -int unused_top_of_psnames ; /* unused top number of downloadedpsnames[#] */ -fontdesctype *fonthead ; /* list of all fonts mentioned so far */ -fontdesctype *curfnt ; /* the currently selected font */ -sectiontype *sections ; /* sections to process document in */ -Boolean partialdownload = 1 ; /* turn on partial downloading */ -Boolean manualfeed ; /* manual feed? */ -Boolean compressed ; /* compressed? */ -Boolean downloadpspk ; /* use PK for downloaded PS fonts? */ -Boolean safetyenclose ; /* enclose in save/restore for stupid spoolers? */ -Boolean removecomments = 0 ; /* remove comments from included PS? */ -Boolean nosmallchars ; /* disable small char optimization for X4045? */ -Boolean cropmarks ; /* add cropmarks? */ -Boolean abspage = 0 ; /* are page numbers absolute? */ -Boolean tryepsf = 0 ; /* should we try to make it espf? */ -int secure = 1 ; /* make safe for suid */ +int unused_top_of_psnames; /* unused top number of downloadedpsnames[#] */ +fontdesctype *fonthead; /* list of all fonts mentioned so far */ +fontdesctype *curfnt; /* the currently selected font */ +sectiontype *sections; /* sections to process document in */ +Boolean partialdownload = 1; /* turn on partial downloading */ +Boolean manualfeed; /* manual feed? */ +Boolean compressed; /* compressed? */ +Boolean downloadpspk; /* use PK for downloaded PS fonts? */ +Boolean safetyenclose; /* enclose in save/restore for stupid spoolers? */ +Boolean removecomments = 0; /* remove comments from included PS? */ +Boolean nosmallchars; /* disable small char optimization for X4045? */ +Boolean cropmarks; /* add cropmarks? */ +Boolean abspage = 0; /* are page numbers absolute? */ +Boolean tryepsf = 0; /* should we try to make it espf? */ +int secure = 1; /* make safe for suid */ int secure_option = 0; /* set by -R */ -int collatedcopies = 1 ; /* how many collated copies? */ -int sectioncopies = 1 ; /* how many times to repeat each section? */ -integer pagecopies = 1 ; /* how many times to repeat each page? */ -shalfword linepos = 0 ; /* where are we on the line being output? */ -integer maxpages ; /* the maximum number of pages */ -Boolean notfirst, notlast ; /* true if a first page was specified */ -Boolean evenpages, oddpages ; /* true if doing only even/only odd pages */ -Boolean pagelist ; /* true if using page ranges */ -Boolean sendcontrolD ; /* should we send a control D at end? */ -Boolean shiftlowchars ; /* shift [0-32, 127] characters higher? */ -integer firstpage ; /* the number of the first page if specified */ -integer lastpage ; -integer firstseq ; -integer lastseq ; -integer hpapersize, vpapersize ; /* horizontal and vertical paper size */ -integer hoff, voff ; /* horizontal and vertical offsets */ +int collatedcopies = 1; /* how many collated copies? */ +int sectioncopies = 1; /* how many times to repeat each section? */ +integer pagecopies = 1; /* how many times to repeat each page? */ +shalfword linepos = 0; /* where are we on the line being output? */ +integer maxpages; /* the maximum number of pages */ +Boolean notfirst, notlast; /* true if a first page was specified */ +Boolean evenpages, oddpages; /* true if doing only even/only odd pages */ +Boolean pagelist; /* true if using page ranges */ +Boolean sendcontrolD; /* should we send a control D at end? */ +Boolean shiftlowchars; /* shift [0-32, 127] characters higher? */ +integer firstpage; /* the number of the first page if specified */ +integer lastpage; +integer firstseq; +integer lastseq; +integer hpapersize, vpapersize; /* horizontal and vertical paper size */ +integer hoff, voff; /* horizontal and vertical offsets */ integer maxsecsize = 0; /* the maximum size of a section */ -integer firstboploc ; /* where the first bop is */ -Boolean sepfiles ; /* each section in its own file? */ -int numcopies ; /* number of copies of each page to print */ -const char *oname ; /* output file name */ -char *iname ; /* dvi file name */ -char *fulliname ; /* same, with current working directory */ -char *strings ; /* strings for program */ -char *nextstring, *maxstring ; /* string pointers */ -FILE *dvifile, *bitfile ; /* dvi and output files */ -quarterword *curpos ; /* current position in virtual character packet */ -quarterword *curlim ; /* final byte in virtual character packet */ -fontmaptype *ffont ; /* first font in current frame */ -real conv ; /* conversion ratio, pixels per DVI unit */ -real vconv ; /* conversion ratio, pixels per DVI unit */ -real alpha ; /* conversion ratio, DVI unit per TFM unit */ -double mag ; /* the magnification of this document */ -integer num, den ; /* the numerator and denominator */ -int overridemag ; /* substitute for mag value in DVI file? */ -int actualdpi = DEFRES ; /* the actual resolution of the printer */ -int vactualdpi = DEFRES ; /* the actual resolution of the printer */ -int maxdrift ; /* max pixels away from true rounded position */ -int vmaxdrift ; /* max pixels away from true rounded position */ -char *paperfmt ; /* command-line paper format */ -int landscape = 0 ; /* landscape mode */ -integer fontmem ; /* memory remaining in printer */ -integer pagecount ; /* page counter for the sections */ -integer pagenum ; /* the page number we currently look at */ -long bytesleft ; /* number of bytes left in raster */ -quarterword *raster ; /* area for raster manipulations */ -integer hh, vv ; /* horizontal and vertical pixel positions */ -Boolean noomega = 0 ; /* Omega extensions are enabled */ +integer firstboploc; /* where the first bop is */ +Boolean sepfiles; /* each section in its own file? */ +int numcopies; /* number of copies of each page to print */ +const char *oname; /* output file name */ +char *iname; /* dvi file name */ +char *fulliname; /* same, with current working directory */ +char *strings; /* strings for program */ +char *nextstring, *maxstring; /* string pointers */ +FILE *dvifile, *bitfile; /* dvi and output files */ +quarterword *curpos; /* current position in virtual character packet */ +quarterword *curlim; /* final byte in virtual character packet */ +fontmaptype *ffont; /* first font in current frame */ +real conv; /* conversion ratio, pixels per DVI unit */ +real vconv; /* conversion ratio, pixels per DVI unit */ +real alpha; /* conversion ratio, DVI unit per TFM unit */ +double mag; /* the magnification of this document */ +integer num, den; /* the numerator and denominator */ +int overridemag; /* substitute for mag value in DVI file? */ +int actualdpi = DEFRES; /* the actual resolution of the printer */ +int vactualdpi = DEFRES; /* the actual resolution of the printer */ +int maxdrift; /* max pixels away from true rounded position */ +int vmaxdrift; /* max pixels away from true rounded position */ +char *paperfmt; /* command-line paper format */ +int landscape = 0; /* landscape mode */ +integer fontmem; /* memory remaining in printer */ +integer pagecount; /* page counter for the sections */ +integer pagenum; /* the page number we currently look at */ +long bytesleft; /* number of bytes left in raster */ +quarterword *raster; /* area for raster manipulations */ +integer hh, vv; /* horizontal and vertical pixel positions */ +Boolean noomega = 0; /* Omega extensions are enabled */ /*-----------------------------------------------------------------------* * The PATH definitions cannot be defined on the command line because so many @@ -134,7 +134,7 @@ Boolean noomega = 0 ; /* Omega extensions are enabled */ #include "vms_gcc_paths.h" #endif -const char *infont ; /* is the file we are downloading a font? */ +const char *infont; /* is the file we are downloading a font? */ #ifndef KPATHSEA #ifdef ATARIST # define TFMPATH "." @@ -144,12 +144,12 @@ const char *infont ; /* is the file we are downloading a font? */ # define HEADERPATH "." # define CONFIGPATH "." #endif -char *tfmpath = TFMPATH ; /* pointer to directories for tfm files */ -char *pkpath = PKPATH ; /* pointer to directories for pk files */ -char *vfpath = VFPATH ; /* pointer to directories for vf files */ -char *figpath = FIGPATH ; /* pointer to directories for figure files */ -char *headerpath = HEADERPATH ; /* pointer to directories for header files */ -char *configpath = CONFIGPATH ; /* where to find config files */ +char *tfmpath = TFMPATH; /* pointer to directories for tfm files */ +char *pkpath = PKPATH; /* pointer to directories for pk files */ +char *vfpath = VFPATH; /* pointer to directories for vf files */ +char *figpath = FIGPATH; /* pointer to directories for figure files */ +char *headerpath = HEADERPATH; /* pointer to directories for header files */ +char *configpath = CONFIGPATH; /* where to find config files */ #ifndef PICTPATH #ifndef __THINK__ #define PICTPATH "." @@ -157,39 +157,39 @@ char *configpath = CONFIGPATH ; /* where to find config files */ #define PICTPATH ":" #endif #endif -char *pictpath = PICTPATH ; /* where IFF/etc. pictures are found */ +char *pictpath = PICTPATH; /* where IFF/etc. pictures are found */ #ifdef SEARCH_SUBDIRECTORIES -char *fontsubdirpath = FONTSUBDIRPATH ; +char *fontsubdirpath = FONTSUBDIRPATH; #endif #endif /* ! KPATHSEA */ #ifdef FONTLIB -char *flipath = FLIPATH ; /* pointer to directories for fli files */ -char *fliname = FLINAME ; /* pointer to names of fli files */ +char *flipath = FLIPATH; /* pointer to directories for fli files */ +char *fliname = FLINAME; /* pointer to names of fli files */ #endif -integer swmem ; /* font memory in the PostScript printer */ -int quiet ; /* should we only print errors to stderr? */ -int filter ; /* act as filter default output to stdout, +integer swmem; /* font memory in the PostScript printer */ +int quiet; /* should we only print errors to stderr? */ +int filter; /* act as filter default output to stdout, default input to stdin? */ -int dvips_debug_flag ; /* output config and map files to stderr if 1 */ -int prettycolumn ; /* the column we are at when running pretty */ -int gargc ; /* global argument count */ -char **gargv ; /* global argument vector */ -int totalpages = 0 ; /* total number of pages */ -Boolean reverse ; /* are we going reverse? */ -Boolean usesPSfonts ; /* do we use local PostScript fonts? */ -Boolean usesspecial ; /* do we use \special? */ -Boolean headers_off ; /* do we send headers or not? */ -Boolean usescolor ; /* IBM: color - do we use colors? */ -const char *headerfile ; /* default header file */ -char *warningmsg ; /* a message to write, if set in config file */ -Boolean multiplesects ; /* more than one section? */ -Boolean disablecomments ; /* should we suppress any EPSF comments? */ -char *printer ; /* what printer to send this to? */ -char *mfmode ; /* default MF mode */ -char *mflandmode ; /* allow an optional landscape mode def */ +int dvips_debug_flag; /* output config and map files to stderr if 1 */ +int prettycolumn; /* the column we are at when running pretty */ +int gargc; /* global argument count */ +char **gargv; /* global argument vector */ +int totalpages = 0; /* total number of pages */ +Boolean reverse; /* are we going reverse? */ +Boolean usesPSfonts; /* do we use local PostScript fonts? */ +Boolean usesspecial; /* do we use \special? */ +Boolean headers_off; /* do we send headers or not? */ +Boolean usescolor; /* IBM: color - do we use colors? */ +const char *headerfile; /* default header file */ +char *warningmsg; /* a message to write, if set in config file */ +Boolean multiplesects; /* more than one section? */ +Boolean disablecomments; /* should we suppress any EPSF comments? */ +char *printer; /* what printer to send this to? */ +char *mfmode; /* default MF mode */ +char *mflandmode; /* allow an optional landscape mode def */ int mfmode_option; /* set by -mode command-line option */ int oname_option; /* set by -o option */ -frametype frames[MAXFRAME] ; /* stack for virtual fonts */ +frametype frames[MAXFRAME]; /* stack for virtual fonts */ integer pagecost; /* memory used on the page being prescanned */ int delchar; /* characters to delete from prescanned page */ integer fsizetol; /* max dvi units error for psfile font sizes */ @@ -197,12 +197,12 @@ Boolean includesfonts; /* are fonts used in included psfiles? */ fontdesctype *fonthd[MAXFONTHD];/* list headers for included fonts of 1 name */ int nextfonthd; /* next unused fonthd[] index */ char xdig[256]; /* table for reading hexadecimal digits */ -char banner[] = BANNER ; /* our startup message */ -char banner2[] = BANNER2 ; /* our second startup message */ -Boolean noenv = 0 ; /* ignore PRINTER envir variable? */ -Boolean dopprescan = 0 ; /* do we do a scan before the prescan? */ -struct papsiz *papsizes ; /* all available paper size */ -int headersready ; /* ready to check headers? */ +char banner[] = BANNER; /* our startup message */ +char banner2[] = BANNER2; /* our second startup message */ +Boolean noenv = 0; /* ignore PRINTER envir variable? */ +Boolean dopprescan = 0; /* do we do a scan before the prescan? */ +struct papsiz *papsizes; /* all available paper size */ +int headersready; /* ready to check headers? */ #if defined(MSDOS) || defined(OS2) || defined(ATARIST) char *mfjobname = NULL; /* name of mfjob file if given */ FILE *mfjobfile = NULL; /* mfjob file for font making instructions */ @@ -215,7 +215,7 @@ int qargc; char *qargv[32]; char queryoptions; #ifdef HPS -Boolean HPS_FLAG = 0 ; +Boolean HPS_FLAG = 0; #endif /* Declare the routine to get the current working directory. */ @@ -297,7 +297,7 @@ static const char *helparr[] = { /*"- Interactive query of options", */ " # = number f = file s = string * = suffix, `0' to turn off", " c = comma-separated dimension pair (e.g., 3.2in,-32.1cm)", -" l = comma-separated list of page ranges (e.g., 1-4,7-9)", 0} ; +" l = comma-separated list of page ranges (e.g., 1-4,7-9)", 0}; void help(int status) @@ -327,7 +327,7 @@ freememforpsnames(void) * character is !, it aborts the job. */ -static char *progname ; +static char *progname; void error_with_perror(const char *s, const char *fname) @@ -335,7 +335,7 @@ error_with_perror(const char *s, const char *fname) if (prettycolumn > 0) fprintf(stderr,"\n"); prettycolumn = 0; - (void)fprintf(stderr, "%s: %s", progname, s) ; + (void)fprintf(stderr, "%s: %s", progname, s); if (fname) { putc (' ', stderr); perror (fname); @@ -344,11 +344,11 @@ error_with_perror(const char *s, const char *fname) } if (*s=='!') { - freememforpsnames() ; + freememforpsnames(); if (bitfile != NULL) { - cleanprinter() ; + cleanprinter(); } - exit(1) ; /* fatal */ + exit(1); /* fatal */ } } @@ -402,45 +402,45 @@ check_checksum(unsigned c1, unsigned c2, const char *name) * is when repacking *huge* characters anyway. */ #ifdef DEBUG -static integer totalalloc = 0 ; +static integer totalalloc = 0; #endif char * mymalloc(integer n) { - char *p ; + char *p; #ifdef SMALLMALLOC if (n > 65500L) - error("! can't allocate more than 64K!") ; + error("! can't allocate more than 64K!"); #endif if (n <= 0) /* catch strange 0 mallocs in flib.c without breaking code */ - n = 1 ; + n = 1; #ifdef DEBUG - totalalloc += n ; + totalalloc += n; if (dd(D_MEM)) { #ifdef SHORTINT - fprintf(stderr, "Alloc %ld\n", n) ; + fprintf(stderr, "Alloc %ld\n", n); #else - fprintf(stderr, "Alloc %d\n", n) ; + fprintf(stderr, "Alloc %d\n", n); #endif } #endif - p = (char *) malloc(n) ; + p = (char *) malloc(n); if (p == NULL) - error("! no memory") ; - return p ; + error("! no memory"); + return p; } void morestrings(void) { - strings = mymalloc((integer)STRINGSIZE) ; - nextstring = strings ; - maxstring = strings + STRINGSIZE - 200 ; - *nextstring++ = 0 ; + strings = mymalloc((integer)STRINGSIZE); + nextstring = strings; + maxstring = strings + STRINGSIZE - 200; + *nextstring++ = 0; } void checkstrings(void) { if (nextstring - strings > STRINGSIZE / 2) - morestrings() ; + morestrings(); } /* * Initialize sets up all the globals and data structures. @@ -460,23 +460,23 @@ initialize(void) i = 10; for (s="abcdef"; *s!=0; s++) xdig[(int)*s] = i++; - for(i=0 ; i < DOWNLOADEDPSSIZE; i++) + for(i=0; i < DOWNLOADEDPSSIZE; i++) downloadedpsnames[i] = NULL; unused_top_of_psnames = 0; - morestrings() ; - maxpages = 100000 ; - numcopies = 1 ; - iname = fulliname = strings ; - bitfile = NULL ; - bytesleft = 0 ; - swmem = SWMEM ; - oname = OUTPATH ; - sendcontrolD = 0 ; - shiftlowchars = 0 ; - multiplesects = 0 ; - disablecomments = 0 ; - maxdrift = -1 ; - vmaxdrift = -1 ; + morestrings(); + maxpages = 100000; + numcopies = 1; + iname = fulliname = strings; + bitfile = NULL; + bytesleft = 0; + swmem = SWMEM; + oname = OUTPATH; + sendcontrolD = 0; + shiftlowchars = 0; + multiplesects = 0; + disablecomments = 0; + maxdrift = -1; + vmaxdrift = -1; dontmakefont = !MAKE_TEX_PK_BY_DEFAULT; } /* @@ -485,47 +485,47 @@ initialize(void) char * newstring(const char *s) { - int l ; - char *q ; + int l; + char *q; if (s == NULL) - return(NULL) ; - l = strlen(s) ; + return(NULL); + l = strlen(s); if (nextstring + l >= maxstring) - morestrings() ; + morestrings(); if (nextstring + l >= maxstring) - error("! out of string space") ; - (void)strcpy(nextstring, s) ; - q = nextstring ; - nextstring += l + 1 ; - return(q) ; + error("! out of string space"); + (void)strcpy(nextstring, s); + q = nextstring; + nextstring += l + 1; + return(q); } void newoutname(void) { - static int seq = 0 ; - static char *seqptr = 0 ; - char *p, *q ; + static int seq = 0; + static char *seqptr = 0; + char *p, *q; if (oname == 0 || *oname == 0) - error("! need an output file name to specify separate files") ; + error("! need an output file name to specify separate files"); if (*oname != '!' && *oname != '|') { if (seqptr == 0) { - q = newstring(oname) ; + q = newstring(oname); for (p = q; *p; p++) /* find last dot after last slash */ if (*p == '.') - seqptr = p + 1 ; + seqptr = p + 1; else if (*p == '/') - seqptr = 0 ; + seqptr = 0; #ifdef DOSISH else if (*p == '\\') - seqptr = 0 ; + seqptr = 0; #endif if (seqptr == 0) - seqptr = p ; - nextstring += 5 ; /* make room for the number, up to five digits */ - oname = q ; + seqptr = p; + nextstring += 5; /* make room for the number, up to five digits */ + oname = q; } - sprintf(seqptr, "%03d", ++seq) ; + sprintf(seqptr, "%03d", ++seq); } } /* @@ -536,16 +536,16 @@ VOID * revlist(VOID *p) { struct list { - struct list *next ; - } *pp = (struct list *)p, *qq = 0, *tt ; + struct list *next; + } *pp = (struct list *)p, *qq = 0, *tt; while (pp) { - tt = pp->next ; - pp->next = qq ; - qq = pp ; - pp = tt ; + tt = pp->next; + pp->next = qq; + qq = pp; + pp = tt; } - return (VOID *)qq ; + return (VOID *)qq; } /* this asks for a new set of arguments from the command line */ void @@ -573,11 +573,11 @@ int main(int argc, char **argv) #endif { - int i, lastext = -1 ; + int i, lastext = -1; #ifdef MVSXA - int firstext = -1 ; + int firstext = -1; #endif - sectiontype *sects ; + sectiontype *sects; #ifdef KPATHSEA kpse_set_program_name (argv[0], "dvips"); @@ -585,14 +585,14 @@ main(int argc, char **argv) #endif #ifdef __THINK__ - argc = dcommand(&argv) ; /* do I/O stream redirection */ + argc = dcommand(&argv); /* do I/O stream redirection */ #endif #ifdef VMS /* Grab the command-line buffer */ short len_arg; $DESCRIPTOR( verb_dsc, "DVIPS "); /* assume the verb is always DVIPS */ struct dsc$descriptor_d temp_dsc = { 0, DSC$K_DTYPE_T, DSC$K_CLASS_D, 0}; - progname = &thh[0] ; + progname = &thh[0]; strcpy(progname,"DVIPS%ERROR"); lib$get_foreign( &temp_dsc, 0, &len_arg, 0); /* Get the command line */ @@ -600,20 +600,20 @@ main(int argc, char **argv) len_arg += verb_dsc.dsc$w_length; /* update the length */ temp_dsc.dsc$a_pointer[len_arg] = '\0'; /* terminate the string */ gargv = &temp_dsc.dsc$a_pointer; /* point to the buffer */ - gargc = 1 ; /* only one big argv */ + gargc = 1; /* only one big argv */ #else - progname = argv[0] ; - gargv = argv ; - gargc = argc ; + progname = argv[0]; + gargv = argv; + gargc = argc; /* we sneak a look at the first arg in case it's debugging */ #ifdef DEBUG if (argc > 1 && strncmp(argv[1], "-d", 2)==0) { if (argv[1][2]==0 && argc > 2) { if (sscanf(argv[2], "%d", &debug_flag)==0) - debug_flag = 0 ; + debug_flag = 0; } else { if (sscanf(argv[1]+2, "%d", &debug_flag)==0) - debug_flag = 0 ; + debug_flag = 0; } } #if defined(KPATHSEA) && defined(KPSE_DEBUG) @@ -643,35 +643,35 @@ Primary author of Dvips: T. Rokicki."); exit (0); } if (argc == 2 && strncmp(argv[1], "-?", 2) == 0) { - printf("%s %s\n", banner, banner2) ; + printf("%s %s\n", banner, banner2); help(0); exit(0); } if (argc == 2 && strncmp(argv[1], "-v", 2) == 0) { - printf("%s %s\n", banner, banner2) ; + printf("%s %s\n", banner, banner2); exit(0); } } #endif #endif - dvips_debug_flag = 0 ; + dvips_debug_flag = 0; { /* for compilers incompatible with c99 */ - char *s = (char *)getenv ("DVIPSDEBUG") ; + char *s = (char *)getenv ("DVIPSDEBUG"); if (s) { - dvips_debug_flag = 1 ; - free (s) ; + dvips_debug_flag = 1; + free (s); } else { - s = (char *) getenv ("KPATHSEA_DEBUG") ; + s = (char *) getenv ("KPATHSEA_DEBUG"); if (s) { - dvips_debug_flag = 1 ; - free (s) ; + dvips_debug_flag = 1; + free (s); } } } - initialize() ; - checkenv(0) ; - getdefaults(CONFIGFILE) ; - getdefaults((char *)0) ; + initialize(); + checkenv(0); + getdefaults(CONFIGFILE); + getdefaults((char *)0); /* * This next whole big section of code is straightforward; we just scan * the options. An argument can either immediately follow its option letter @@ -681,41 +681,41 @@ Primary author of Dvips: T. Rokicki."); */ #ifdef VMS vmscli(void); - papsizes = (struct papsiz *)revlist((void *)papsizes) ; /* Added by PWD 21-Mar-1997 */ + papsizes = (struct papsiz *)revlist((void *)papsizes); /* Added by PWD 21-Mar-1997 */ #else queryoptions = 0; do { for (i=1; i<argc; i++) { if (*argv[i]=='-') { - char *p=argv[i]+2 ; - char c=argv[i][1] ; + char *p=argv[i]+2; + char c=argv[i][1]; switch (c) { case '-': queryoptions = 1; break; case 'a': - dopprescan = (*p != '0') ; - break ; + dopprescan = (*p != '0'); + break; case 'b': if (*p == 0 && argv[i+1]) - p = argv[++i] ; + p = argv[++i]; if (sscanf(p, "%d", &pagecopies)==0) - error("! Bad number of page copies option (-b).") ; + error("! Bad number of page copies option (-b)."); if (pagecopies < 1 || pagecopies > 1000) - error("! can only print one to a thousand page copies") ; - break ; + error("! can only print one to a thousand page copies"); + break; case 'c' : if (*p == 0 && argv[i+1]) - p = argv[++i] ; + p = argv[++i]; if (sscanf(p, "%d", &numcopies)==0) - error("! Bad number of copies option (-c).") ; - break ; + error("! Bad number of copies option (-c)."); + break; case 'd' : #ifdef DEBUG { - int old_debug = debug_flag ; - static int warned_already = 0 ; + int old_debug = debug_flag; + static int warned_already = 0; if (*p == 0 && argv[i+1]) p = argv[++i]; @@ -723,130 +723,130 @@ case 'd' : error("! Bad debug option (-d)."); if (debug_flag != old_debug && warned_already++ == 0) { fprintf(stderr, - "I found a debug option that was not the first argument to the dvips\n") ; + "I found a debug option that was not the first argument to the dvips\n"); fprintf(stderr, - "command. Some debugging output may have been lost because of this.\n") ; + "command. Some debugging output may have been lost because of this.\n"); } break; } #else - error("not compiled in debug mode") ; - break ; + error("not compiled in debug mode"); + break; #endif /* DEBUG */ case 'e' : if (*p == 0 && argv[i+1]) - p = argv[++i] ; + p = argv[++i]; if (sscanf(p, "%d", &maxdrift)==0 || maxdrift<0) - error("! Bad maxdrift option (-e).") ; + error("! Bad maxdrift option (-e)."); vmaxdrift = maxdrift; - break ; + break; case 'f' : - filter = (*p != '0') ; + filter = (*p != '0'); if (filter) - oname = "" ; - noenv = 1 ; - sendcontrolD = 0 ; - break ; + oname = ""; + noenv = 1; + sendcontrolD = 0; + break; case 'u' : { - char PSname[300] ; + char PSname[300]; if (*p == 0 && argv[i+1]) - p = argv[++i] ; - strcpy(PSname, p) ; + p = argv[++i]; + strcpy(PSname, p); if (!strchr(PSname, '.')) - strcat(PSname, ".map") ; /* default extension */ + strcat(PSname, ".map"); /* default extension */ if (PSname[0] == '+') - getpsinfo(PSname+1) ; + getpsinfo(PSname+1); else - psmapfile = strdup(PSname) ; /* a cute small memory leak (just as in 'p' option handling in resident.c) */ + psmapfile = strdup(PSname); /* a cute small memory leak (just as in 'p' option handling in resident.c) */ } - break ; + break; case 'h' : case 'H' : if (*p == 0 && argv[i+1]) - p = argv[++i] ; + p = argv[++i]; if (strcmp(p, "-") == 0) - headers_off = 1 ; + headers_off = 1; else - (void)add_header(p) ; - break ; + (void)add_header(p); + break; case 'i': - sepfiles = (*p != '0') ; + sepfiles = (*p != '0'); if (sepfiles && maxsecsize == 0) { maxsecsize = 1; /* default section size to one page/file */ } - break ; + break; case 'j': - partialdownload = (*p != '0') ; - break ; + partialdownload = (*p != '0'); + break; case 'k': - cropmarks = (*p != '0') ; - break ; + cropmarks = (*p != '0'); + break; case 'R': if (*p == '0') { - secure = 0 ; + secure = 0; } else if (*p == '2') { - secure = 2 ; + secure = 2; } else { - secure = 1 ; + secure = 1; } if (secure) - secure_option = 1 ; /* Never used */ - break ; + secure_option = 1; /* Never used */ + break; case 'S': if (*p == 0 && argv[i+1]) - p = argv[++i] ; + p = argv[++i]; if (sscanf(p, "%d", &maxsecsize)==0) - error("! Bad section size arg (-S).") ; - break ; + error("! Bad section size arg (-S)."); + break; case 'm' : if (STREQ (p, "ode") && argv[i+1]) { mfmode = argv[++i]; mfmode_option = 1; } else - manualfeed = (*p != '0') ; - break ; + manualfeed = (*p != '0'); + break; case 'n' : if (STREQ (p, "oomega")) { - noomega = 1 ; + noomega = 1; } else { if (*p == 0 && argv[i+1]) - p = argv[++i] ; + p = argv[++i]; #ifdef SHORTINT if (sscanf(p, "%ld", &maxpages)==0) #else /* ~SHORTINT */ if (sscanf(p, "%d", &maxpages)==0) #endif /* ~SHORTINT */ - error("! Bad number of pages option (-n).") ; + error("! Bad number of pages option (-n)."); } - break ; + break; case 'o' : if (*p == 0 && argv[i+1] && (STREQ (argv[i+1], "-") || argv[i+1][0] != '-')) - p = argv[++i] ; + p = argv[++i]; oname_option = 1; - oname = p ; - noenv = 1 ; - sendcontrolD = 0 ; + oname = p; + noenv = 1; + sendcontrolD = 0; #if defined(MSDOS) || defined(OS2) if (*oname && oname[strlen(oname)-1] == ':') oname[strlen(oname)-1] = 0; /* strip ':' off */ #endif - break ; + break; case 'O' : if (*p == 0 && argv[i+1]) - p = argv[++i] ; - handlepapersize(p, &hoff, &voff) ; - break ; + p = argv[++i]; + handlepapersize(p, &hoff, &voff); + break; case 'T' : if (*p == 0 && argv[i+1]) - p = argv[++i] ; - handlepapersize(p, &hpapersize, &vpapersize) ; + p = argv[++i]; + handlepapersize(p, &hpapersize, &vpapersize); if (landscape) { error( - "both landscape and papersize specified; ignoring landscape") ; - landscape = 0 ; + "both landscape and papersize specified; ignoring landscape"); + landscape = 0; } - break ; + break; case 'p' : #if defined(MSDOS) || defined(OS2) || defined(ATARIST) /* check for emTeX job file (-pj=filename) */ @@ -860,264 +860,264 @@ case 'p' : /* must be page number instead */ #endif if (*p == 'p') { /* a -pp specifier for a page list? */ - p++ ; + p++; if (*p == 0 && argv[i+1]) - p = argv[++i] ; + p = argv[++i]; if (ParsePages(p)) - error("! Bad page list specifier (-pp).") ; - pagelist = 1 ; - break ; + error("! Bad page list specifier (-pp)."); + pagelist = 1; + break; } if (*p == 0 && argv[i+1]) - p = argv[++i] ; + p = argv[++i]; if (*p == '=') { - abspage = 1 ; - p++ ; + abspage = 1; + p++; } #ifdef SHORTINT switch(sscanf(p, "%ld.%ld", &firstpage, &firstseq)) { #else /* ~SHORTINT */ switch(sscanf(p, "%d.%d", &firstpage, &firstseq)) { #endif /* ~SHORTINT */ -case 1: firstseq = 0 ; -case 2: break ; +case 1: firstseq = 0; +case 2: break; default: #ifdef KPATHSEA - error(concat3 ("! Bad first page option (-p ", p, ").")) ; + error(concat3 ("! Bad first page option (-p ", p, ").")); #else - error("! Bad first page option (-p).") ; + error("! Bad first page option (-p)."); #endif } - notfirst = 1 ; - break ; + notfirst = 1; + break; case 'l': if (*p == 0 && argv[i+1]) - p = argv[++i] ; + p = argv[++i]; if (*p == '=') { - abspage = 1 ; - p++ ; + abspage = 1; + p++; } #ifdef SHORTINT switch(sscanf(p, "%ld.%ld", &lastpage, &lastseq)) { #else /* ~SHORTINT */ switch(sscanf(p, "%d.%d", &lastpage, &lastseq)) { #endif /* ~SHORTINT */ -case 1: lastseq = 0 ; -case 2: break ; +case 1: lastseq = 0; +case 2: break; default: #ifdef KPATHSEA - error(concat3 ("! Bad last page option (-l ", p, ").")) ; + error(concat3 ("! Bad last page option (-l ", p, ").")); #else - error("! Bad last page option (-l).") ; + error("! Bad last page option (-l)."); #endif } - notlast = 1 ; - break ; + notlast = 1; + break; case 'A': - oddpages = 1 ; - break ; + oddpages = 1; + break; case 'B': - evenpages = 1 ; - break ; + evenpages = 1; + break; case 'q' : case 'Q' : - quiet = (*p != '0') ; - break ; + quiet = (*p != '0'); + break; case 'r' : - reverse = (*p != '0') ; - break ; + reverse = (*p != '0'); + break; case 't' : if (*p == 0 && argv[i+1]) - p = argv[++i] ; + p = argv[++i]; if (strcmp(p, "landscape") == 0) { if (hpapersize || vpapersize) error( - "both landscape and papersize specified; ignoring landscape") ; + "both landscape and papersize specified; ignoring landscape"); else - landscape = 1 ; + landscape = 1; } else - paperfmt = p ; - break ; + paperfmt = p; + break; case 'v': printf ("%s %s\n", banner, banner2); exit (0); break; case 'x' : case 'y' : if (*p == 0 && argv[i+1]) - p = argv[++i] ; + p = argv[++i]; if (sscanf(p, "%lg", &mag)==0 || mag < 1 || mag > 1000000) - error("! Bad magnification parameter (-x or -y).") ; - overridemag = (c == 'x' ? 1 : -1) ; - break ; + error("! Bad magnification parameter (-x or -y)."); + overridemag = (c == 'x' ? 1 : -1); + break; case 'C' : if (*p == 0 && argv[i+1]) - p = argv[++i] ; + p = argv[++i]; if (sscanf(p, "%d", &collatedcopies)==0) - error("! Bad number of collated copies option (-C).") ; - break ; + error("! Bad number of collated copies option (-C)."); + break; case 'D' : if (*p == 0 && argv[i+1]) - p = argv[++i] ; + p = argv[++i]; if (sscanf(p, "%d", &actualdpi)==0 || actualdpi < 10 || actualdpi > 10000) - error("! Bad dpi parameter (-D).") ; + error("! Bad dpi parameter (-D)."); vactualdpi = actualdpi; /* If we had the mode from config.ps, don't use it. If they specified one with -mode, keep it. */ if (!mfmode_option) mfmode = NULL; - break ; + break; case 'E' : - tryepsf = (*p != '0') ; + tryepsf = (*p != '0'); removecomments = disablecomments = 0; if (tryepsf && maxsecsize == 0) - maxsecsize = 1 ; - break ; + maxsecsize = 1; + break; case 'K' : - removecomments = (*p != '0') ; - break ; + removecomments = (*p != '0'); + break; case 'U' : - nosmallchars = (*p != '0') ; - break ; + nosmallchars = (*p != '0'); + break; case 'X' : if (*p == 0 && argv[i+1]) - p = argv[++i] ; + p = argv[++i]; if (sscanf(p, "%d", &actualdpi)==0 || actualdpi < 10 || actualdpi > 10000) - error("! Bad dpi parameter (-D).") ; - break ; + error("! Bad dpi parameter (-D)."); + break; case 'Y' : if (*p == 0 && argv[i+1]) - p = argv[++i] ; + p = argv[++i]; if (sscanf(p, "%d", &vactualdpi)==0 || vactualdpi < 10 || vactualdpi > 10000) - error("! Bad dpi parameter (-D).") ; + error("! Bad dpi parameter (-D)."); vactualdpi = vactualdpi; - break ; + break; case 'F' : - sendcontrolD = (*p != '0') ; - break ; + sendcontrolD = (*p != '0'); + break; case 'G' : shiftlowchars = (*p != '0'); break; case 'M': - dontmakefont = (*p != '0') ; + dontmakefont = (*p != '0'); #ifdef KPATHSEA kpse_set_program_enabled (kpse_pk_format, !dontmakefont, kpse_src_cmdline); #endif - break ; + break; case 'N' : - disablecomments = (*p != '0') ; - break ; + disablecomments = (*p != '0'); + break; case 'P' : { - struct papsiz *opapsiz = papsizes ; - struct papsiz *npapsiz ; - papsizes = 0 ; + struct papsiz *opapsiz = papsizes; + struct papsiz *npapsiz; + papsizes = 0; if (*p == 0 && argv[i+1]) - p = argv[++i] ; - printer = p ; - noenv = 1 ; + p = argv[++i]; + printer = p; + noenv = 1; if (!getdefaults("")) { /* If no config file, default the output name. */ oname = concat ("| lpr -P", printer); } - npapsiz = opapsiz ; + npapsiz = opapsiz; while (npapsiz && npapsiz->next) - npapsiz = npapsiz->next ; + npapsiz = npapsiz->next; if (npapsiz) { - npapsiz->next = papsizes ; - papsizes = opapsiz ; + npapsiz->next = papsizes; + papsizes = opapsiz; } } - break ; + break; case 's': - safetyenclose = (*p != '0') ; - break ; + safetyenclose = (*p != '0'); + break; case 'V': - downloadpspk = (*p != '0') ; - break ; + downloadpspk = (*p != '0'); + break; case 'Z': - compressed = (*p != '0') ; - break ; + compressed = (*p != '0'); + break; #ifdef HPS case 'z': - HPS_FLAG = (*p != '0') ; - break ; + HPS_FLAG = (*p != '0'); + break; #endif case '?': - break ; /* We print the banner and help msg below. */ + break; /* We print the banner and help msg below. */ default: #ifdef KPATHSEA error(concat3 ("! Invalid option `", argv[i], "'. Try --help for more information.")); #else error( - "! Bad option, not one of acdefhijklmnopqrstxyzABCDEFKMNOPSTUXYZ?") ; + "! Bad option, not one of acdefhijklmnopqrstxyzABCDEFKMNOPSTUXYZ?"); #endif } } else { if (*iname == 0) { - register char *p ; + register char *p; - lastext = 0 ; - iname = nextstring ; - p = argv[i] ; + lastext = 0; + iname = nextstring; + p = argv[i]; if (NAME_BEGINS_WITH_DEVICE(p)) { /* get past DOSISH drive */ - *nextstring++ = *p++ ; - *nextstring++ = *p++ ; + *nextstring++ = *p++; + *nextstring++ = *p++; } while (*p) { - *nextstring = *p++ ; + *nextstring = *p++; if (*nextstring == '.') - lastext = nextstring - iname ; + lastext = nextstring - iname; else if (IS_DIR_SEP(*nextstring)) - lastext = 0 ; - nextstring++ ; + lastext = 0; + nextstring++; } - *nextstring++ = '.' ; - *nextstring++ = 'd' ; - *nextstring++ = 'v' ; - *nextstring++ = 'i' ; - *nextstring++ = 0 ; + *nextstring++ = '.'; + *nextstring++ = 'd'; + *nextstring++ = 'v'; + *nextstring++ = 'i'; + *nextstring++ = 0; } else #ifdef KPATHSEA error(concat3("! Second input filename (", argv[i], - ") specified.")) ; + ") specified.")); #else - error("! Two input file names specified.") ; + error("! Two input file names specified."); #endif } } if (noenv == 0) { - register char *p ; - struct papsiz *opapsiz = papsizes ; - papsizes = 0 ; + register char *p; + struct papsiz *opapsiz = papsizes; + papsizes = 0; if (0 != (p = getenv("PRINTER"))) { #if defined(MSDOS) || defined(OS2) - strcpy(nextstring, p) ; - strcat(nextstring, ".cfg") ; + strcpy(nextstring, p); + strcat(nextstring, ".cfg"); #else - strcpy(nextstring, "config.") ; - strcat(nextstring, p) ; + strcpy(nextstring, "config."); + strcat(nextstring, p); #endif - getdefaults(nextstring) ; + getdefaults(nextstring); } { - struct papsiz *npapsiz = opapsiz ; + struct papsiz *npapsiz = opapsiz; while (npapsiz && npapsiz->next) - npapsiz = npapsiz->next ; + npapsiz = npapsiz->next; if (npapsiz) { - npapsiz->next = papsizes ; - papsizes = opapsiz ; + npapsiz->next = papsizes; + papsizes = opapsiz; } } } - papsizes = (struct papsiz *)revlist((void *)papsizes) ; + papsizes = (struct papsiz *)revlist((void *)papsizes); if (queryoptions != 0) { /* get new options */ - (void)fprintf(stderr, "%s %s\n", banner, banner2) ; - help(1) ; + (void)fprintf(stderr, "%s %s\n", banner, banner2); + help(1); queryargs(); if (qargc == 1) queryoptions = 0; @@ -1127,7 +1127,7 @@ default: argv=qargv; } } - } while (queryoptions != 0) ; + } while (queryoptions != 0); #endif #if defined(KPATHSEA) && defined(KPSE_DEBUG) && defined(DEBUG) /* this should really be part of a subroutine */ if (dd(D_FILES)) KPSE_DEBUG_SET (KPSE_DEBUG_FOPEN); @@ -1137,7 +1137,7 @@ default: if (dd(D_EXPAND)) KPSE_DEBUG_SET (KPSE_DEBUG_EXPAND); if (dd(D_SEARCH)) KPSE_DEBUG_SET (KPSE_DEBUG_SEARCH); #endif /* KPATHSEA && KPSE_DEBUG && DEBUG */ - checkenv(1) ; + checkenv(1); #ifdef KPATHSEA kpse_init_prog ("DVIPS", actualdpi, mfmode, "cmr10"); kpse_make_tex_discard_errors = quiet; @@ -1150,42 +1150,42 @@ default: * the hash chain. We do this by reversing the lists, adding them * to the front, and then reversing them again. */ - revpslists() ; - getpsinfo((char *)NULL) ; - revpslists() ; + revpslists(); + getpsinfo((char *)NULL); + revpslists(); if (dvips_debug_flag) { if (!quiet) - (void)fprintf(stderr, "\n%s %s\n", banner, banner2) ; - prettycolumn = 0 ; + (void)fprintf(stderr, "\n%s %s\n", banner, banner2); + prettycolumn = 0; } else { if (!quiet) - (void)fprintf(stderr, "%s %s\n", banner, banner2) ; + (void)fprintf(stderr, "%s %s\n", banner, banner2); } if (*iname) { - dvifile = fopen(iname, READBIN) ; + dvifile = fopen(iname, READBIN); /* * Allow names like a.b. */ if (dvifile == 0) { - iname[strlen(iname)-4] = 0 ; /* remove the .dvi suffix */ - dvifile = fopen(iname, READBIN) ; + iname[strlen(iname)-4] = 0; /* remove the .dvi suffix */ + dvifile = fopen(iname, READBIN); } } if (oname[0] == '-' && oname[1] == 0) - oname = "" ; + oname = ""; else if (*oname == 0 && ! filter && *iname) { /* determine output name from input name */ - oname = nextstring ; + oname = nextstring; #ifndef VMCMS /* get stuff before LAST "." */ - lastext = strlen(iname) - 1 ; + lastext = strlen(iname) - 1; while (iname[lastext] != '.' && lastext > 0) - lastext-- ; + lastext--; if (iname[lastext] != '.') - lastext = strlen(iname) - 1 ; + lastext = strlen(iname) - 1; #else /* for VM/CMS we take the stuff before FIRST "." */ - lastext = strchr(iname,'.') - iname ; + lastext = strchr(iname,'.') - iname; if ( lastext <= 0 ) /* if no '.' in "iname" */ - lastext = strlen(iname) -1 ; + lastext = strlen(iname) -1; #endif #ifdef MVSXA /* IBM: MVS/XA */ if (strchr(iname, '(') != NULL && @@ -1197,7 +1197,7 @@ default: if (strrchr(iname, '.') != NULL) { lastext = strrchr(iname, '.') - iname - 1; } - else lastext = strlen(iname) - 1 ; + else lastext = strlen(iname) - 1; if (strchr(iname, '\'') != NULL) firstext = strchr(iname, '.') - iname + 1; else firstext = 0; @@ -1208,28 +1208,28 @@ default: #else for (i=0; i<=lastext; i++) #endif - *nextstring++ = iname[i] ; + *nextstring++ = iname[i]; if (iname[lastext] != '.') - *nextstring++ = '.' ; + *nextstring++ = '.'; #ifndef VMCMS - *nextstring++ = 'p' ; - *nextstring++ = 's' ; + *nextstring++ = 'p'; + *nextstring++ = 's'; #else /* might as well keep things uppercase */ - *nextstring++ = 'P' ; - *nextstring++ = 'S' ; + *nextstring++ = 'P'; + *nextstring++ = 'S'; #endif - *nextstring++ = 0 ; + *nextstring++ = 0; /* * Now we check the name, and `throw away' any prefix information. * This means throwing away anything before (and including) a colon * or slash. */ { - const char *p = NAME_BEGINS_WITH_DEVICE(oname) ? oname + 2 : oname ; + const char *p = NAME_BEGINS_WITH_DEVICE(oname) ? oname + 2 : oname; for (oname=p; *p && p[1]; p++) if (IS_DIR_SEP(*p)) - oname = p + 1 ; + oname = p + 1; } } #ifdef DEBUG @@ -1239,15 +1239,15 @@ default: #else /* ~SHORTINT */ (void)fprintf(stderr,"input file %s output file %s swmem %d\n", #endif /* ~SHORTINT */ - iname, oname, swmem) ; + iname, oname, swmem); #ifndef KPATHSEA - (void)fprintf(stderr,"tfm path %s\npk path %s\n", tfmpath, pkpath) ; - (void)fprintf(stderr,"fig path %s\nvf path %s\n", figpath, vfpath) ; + (void)fprintf(stderr,"tfm path %s\npk path %s\n", tfmpath, pkpath); + (void)fprintf(stderr,"fig path %s\nvf path %s\n", figpath, vfpath); (void)fprintf(stderr,"config path %s\nheader path %s\n", - configpath, headerpath) ; + configpath, headerpath); #endif #ifdef FONTLIB - (void)fprintf(stderr,"fli path %s\nfli names %s\n", flipath, fliname) ; + (void)fprintf(stderr,"fli path %s\nfli names %s\n", flipath, fliname); #endif } /* dd(D_PATHS) */ #endif /* DEBUG */ @@ -1255,72 +1255,72 @@ default: * Now we try to open the dvi file. */ if (!quiet && warningmsg) - error(warningmsg) ; - headersready = 1 ; - headerfile = (compressed? CHEADERFILE : HEADERFILE) ; - (void)add_header(headerfile) ; + error(warningmsg); + headersready = 1; + headerfile = (compressed? CHEADERFILE : HEADERFILE); + (void)add_header(headerfile); if (*iname != 0) { - fulliname = nextstring ; + fulliname = nextstring; #ifndef IGNORE_CWD if (!IS_DIR_SEP(*iname) && !NAME_BEGINS_WITH_DEVICE(iname)) { getcwd(nextstring, MAXPATHLEN + 2); - while (*nextstring++) ; + while (*nextstring++); #ifdef VMS /* VMS doesn't need the '/' character appended */ nextstring--; /* so just back up one byte. */ #else - *(nextstring-1) = '/' ; + *(nextstring-1) = '/'; #endif } #endif - strcpy(nextstring,iname) ; - while (*nextstring++) ; /* advance nextstring past iname */ + strcpy(nextstring,iname); + while (*nextstring++); /* advance nextstring past iname */ } else if (filter) { - dvifile = stdin ; + dvifile = stdin; if (O_BINARY && !isatty(fileno(stdin))) - SET_BINARY(fileno(stdin)) ; + SET_BINARY(fileno(stdin)); } else { #ifdef KPATHSEA fprintf (stderr, "dvips: Missing DVI file argument (or -f).\n"); fprintf (stderr, "dvips: Try --help for more information.\n"); #else - help(1) ; + help(1); #endif - exit(1) ; + exit(1); } if (dvifile==NULL) { error_with_perror("DVI file can't be opened:", iname); exit(1); } if (fseek(dvifile, 0L, 0) < 0) - error("! DVI file must not be a pipe.") ; + error("! DVI file must not be a pipe."); - initcolor() ; + initcolor(); #ifdef FONTLIB fliload(); /* read the font libaries */ #endif /* * Now we do our main work. */ - swmem += fontmem ; + swmem += fontmem; if (maxdrift < 0) { if (actualdpi <= 599) - maxdrift = actualdpi / 100 ; + maxdrift = actualdpi / 100; else if (actualdpi < 1199) - maxdrift = actualdpi / 200 + 3 ; + maxdrift = actualdpi / 200 + 3; else - maxdrift = actualdpi / 400 + 6 ; + maxdrift = actualdpi / 400 + 6; } if (vmaxdrift < 0) { if (vactualdpi <= 599) - vmaxdrift = vactualdpi / 100 ; + vmaxdrift = vactualdpi / 100; else if (vactualdpi < 1199) - vmaxdrift = vactualdpi / 200 + 3 ; + vmaxdrift = vactualdpi / 200 + 3; else - vmaxdrift = vactualdpi / 400 + 6 ; + vmaxdrift = vactualdpi / 400 + 6; } if (dopprescan) - pprescanpages() ; - prescanpages() ; + pprescanpages(); + prescanpages(); #if defined MSDOS || defined OS2 || defined(ATARIST) if (mfjobfile != (FILE*)NULL) { char answer[5]; @@ -1333,104 +1333,104 @@ default: } #endif if (includesfonts) - (void)add_header(IFONTHEADER) ; + (void)add_header(IFONTHEADER); if (usesPSfonts) - (void)add_header(PSFONTHEADER) ; + (void)add_header(PSFONTHEADER); if (usesspecial) - (void)add_header(SPECIALHEADER) ; + (void)add_header(SPECIALHEADER); if (usescolor) /* IBM: color */ - (void)add_header(COLORHEADER) ; + (void)add_header(COLORHEADER); #ifdef HPS if (HPS_FLAG) - (void)add_header(HPSHEADER) ; + (void)add_header(HPSHEADER); #endif - sects = sections ; - totalpages *= collatedcopies ; + sects = sections; + totalpages *= collatedcopies; if (sects == NULL || sects->next == NULL) { - sectioncopies = collatedcopies ; - collatedcopies = 1 ; + sectioncopies = collatedcopies; + collatedcopies = 1; } else { if (! sepfiles) - multiplesects = 1 ; + multiplesects = 1; } - totalpages *= pagecopies ; + totalpages *= pagecopies; if (tryepsf) { if (paperfmt || landscape || manualfeed || collatedcopies > 1 || numcopies > 1 || cropmarks || *iname == 0 || (totalpages > 1 && !(sepfiles && maxsecsize == 1))) { - error("Can't make it EPSF, sorry") ; - tryepsf = 0 ; + error("Can't make it EPSF, sorry"); + tryepsf = 0; } } #ifdef HPS if (HPS_FLAG) - set_bitfile("head.tmp", 0) ; + set_bitfile("head.tmp", 0); #endif if (! sepfiles) { - initprinter(sections) ; - outbangspecials() ; + initprinter(sections); + outbangspecials(); } for (i=0; i<collatedcopies; i++) { - sects = sections ; + sects = sections; while (sects != NULL) { if (sepfiles) { - newoutname() ; + newoutname(); if (! quiet) { if (prettycolumn + strlen(oname) + 6 > STDOUTSIZE) { - fprintf(stderr, "\n") ; - prettycolumn = 0 ; + fprintf(stderr, "\n"); + prettycolumn = 0; } - (void)fprintf(stderr, "(-> %s) ", oname) ; - prettycolumn += strlen(oname) + 6 ; + (void)fprintf(stderr, "(-> %s) ", oname); + prettycolumn += strlen(oname) + 6; } #ifdef HPS if (HPS_FLAG) - set_bitfile("head.tmp", 0) ; + set_bitfile("head.tmp", 0); #endif - initprinter(sects) ; - outbangspecials() ; + initprinter(sects); + outbangspecials(); } else if (! quiet) { if (prettycolumn > STDOUTSIZE) { - fprintf(stderr, "\n") ; - prettycolumn = 0 ; + fprintf(stderr, "\n"); + prettycolumn = 0; } - (void)fprintf(stderr, ". ") ; - prettycolumn += 2 ; + (void)fprintf(stderr, ". "); + prettycolumn += 2; } - (void)fflush(stderr) ; - dosection(sects, sectioncopies) ; - sects = sects->next ; + (void)fflush(stderr); + dosection(sects, sectioncopies); + sects = sects->next; if (sepfiles) { #ifdef HPS if (HPS_FLAG) - finish_hps() ; + finish_hps(); #endif - cleanprinter() ; + cleanprinter(); } } } - freememforpsnames() ; + freememforpsnames(); if (! sepfiles) { #ifdef HPS if (HPS_FLAG) - finish_hps() ; + finish_hps(); #endif - cleanprinter() ; + cleanprinter(); } if (! quiet) - (void)fprintf(stderr, "\n") ; + (void)fprintf(stderr, "\n"); #ifdef DEBUG if (dd(D_MEM)) { #ifdef SHORTINT - fprintf(stderr, "Total memory allocated: %ld\n", totalalloc) ; + fprintf(stderr, "Total memory allocated: %ld\n", totalalloc); #else - fprintf(stderr, "Total memory allocated: %d\n", totalalloc) ; + fprintf(stderr, "Total memory allocated: %d\n", totalalloc); #endif } #endif - return 0 ; + return 0; /*NOTREACHED*/ } #ifdef VMS |