OSDN Git Service

updated codes.
authormaqiyuan <maqiyuan@users.sourceforge.jp>
Mon, 2 Jun 2014 16:50:26 +0000 (00:50 +0800)
committermaqiyuan <maqiyuan@users.sourceforge.jp>
Mon, 2 Jun 2014 16:50:26 +0000 (00:50 +0800)
src/dvisourc/dvianal.c
src/dvisourc/dviextra.c
src/dvisourc/dvipslog.c
src/dvisourc/dvipsone.bat [deleted file]
src/dvisourc/dvipsone.c
src/dvisourc/dvipsone.h
src/dvisourc/dvispeci.c
src/dvisourc/dvispeci.h
src/dvisourc/dvitiff.c
src/dvisourc/makedll [deleted file]
src/dvisourc/makefile

index c72a4a2..d6b6331 100644 (file)
 *
 **********************************************************************/
 
-/* Revised 1999 June 13 to run in DLL form */
-
-#ifdef _WINDOWS
-#define NOCOMM
-#define NOSOUND
-#define NODRIVERS
-#define STRICT
-#include <windows.h>
-#endif
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <malloc.h>
-#include <setjmp.h>
-
-#ifdef _WINDOWS
-  #define MYLIBAPI __declspec(dllexport)
-#endif
-
 #include "dvipsone.h"
 
-#ifdef _WINDOWS
-  #pragma warning(disable:4100) // unreferenced formal variable
-#endif
-
-#pragma warning(disable:4996)
-#pragma warning(disable:4127) // conditional expression is constant
-
 /* NOTE: S = s w, T = s x, W = w<n>, X = x<n>, Y = y<n>, Z = z<n> */
 /* bp = bop, ep = eop, pr = put_rule, sr = set_rule */
 
@@ -836,7 +809,7 @@ void do_bop(FILE *output, FILE *input)
 /*  else pageno = (long) pagenumber; */
   else pageno = (long) page;        /* 1993/Aug/28 */
 
-  skipflag = skipthispage(pageno);
+  skipflag = skip_this_page(pageno);
 /*  following is the logic for two-sided printing */
 /*  if (skipflag != 0) evenlast = 1; oddlast = 1; */
   if (skipflag != 0) firstpage = -1;    /* reset for next group */
index 385a216..7e7b7e8 100644 (file)
 *
 **********************************************************************/
 
-/* Revised 1999 June 13 to run in DLL form */
-
-#ifdef _WINDOWS
-#define NOCOMM
-#define NOSOUND
-#define NODRIVERS
-#define STRICT
-#include <windows.h>
-#endif
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <malloc.h>
-#include <setjmp.h>
-
-#ifdef _WINDOWS
-  #define MYLIBAPI __declspec(dllexport)
-#endif
-
 #include "dvipsone.h"
 
-#ifdef _WINDOWS
-#pragma warning(disable:4100) // unreferenced formal variable 
-#endif
-
-#pragma warning(disable:4996)
-#pragma warning(disable:4127) // conditional expression is constant
-
-#pragma hdrstop
-
-/* malloc.h not really needed */
-
 #define ZEROS 512     /* 512 zeros required at end of eexec section */
 #define ZEROSPERLINE 64   /* 64 zeros per line for safety */
 #define NOTDEF 256      /* special code for .notdef = MAXCHRS */
@@ -128,18 +97,6 @@ char *syntheticfonts[] =
 
 /* char *notbasecharacters="bfmpqvxBFMPQVX"; */ /* ??? */
 
-/* aceinousyz 10 for standard 58 ISO Latin 1 */
-/* acdeilnorustyz 14 also includes ISO Latin 2 */
-/* acdeghijklnorstuwyz 19 full set */ /* omit bfmpqvx 7 cheaper to compute */
-
-/* #define NUMACCENTS 14 */ /* use them straight out of standardencoding */
-
-/* accents are at 193 to 207 */
-/* static char *standardaccents[] =
-{ "grave", "acute", "circumflex", "tilde", "macron", "breve", "dotaccent",
- "dieresis", "ring", "cedilla", "hungarumlaut", "ogonek", "caron",
- "dotlessi"}; */ /* well, this one is actually a base character */
-
 /* font substitution table - obtained from file */
 /* fontsubprop small enough to keep in near space - rest banished to far */
 
index ce295fe..625bd80 100644 (file)
 *
 **********************************************************************/
 
-/* Revised 1999 June 13 to run in DLL form */
-
-#ifdef _WINDOWS
-#define NOCOMM
-#define NOSOUND
-#define NODRIVERS
-#define STRICT
-#include <windows.h>
-#endif
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <malloc.h>
-#include <setjmp.h>
-
-#ifdef _WINDOWS
-// We must define MYLIBAPI as __declspec(dllexport) before including
-// dvipsone.h, then dvipsone.h will see that we have already
-// defined MYLIBAPI and will not (re)define it as __declspec(dllimport)
-#define MYLIBAPI __declspec(dllexport)
-// #include "dvipsone.h"
-#endif
-
 #include "dvipsone.h"
 
-#ifdef _WINDOWS
-#pragma warning(disable:4100) // unreferenced formal variable 
-#endif
-
-#pragma warning(disable:4996)
-#pragma warning(disable:4127) // conditional expression is constant
-
-#pragma hdrstop
-
-#include <io.h>         /* for _access */
+#include <io.h> /* for _access */
                 /* for _findfirst, _findnext, _findclose */
 
 /* #define DEBUGALIAS */
@@ -485,36 +452,6 @@ void logdo_put2(FILE *infile)
   logdo_putsub(ureadtwo(infile));
 }
 
-#ifdef IGNORED
-void logdo_put2(FILE *infile)
-{
-  unsigned int c;
-  c = ureadtwo(infile);
-  if (skipflag == 0) {
-/*    if (ff < 0) invalidset((int) c); */
-    if (ff == BLANKFONT) invalidset((int) c);
-    else if (c < 256) {
-/*      if (bRemapControl && c < MAXREMAP) c = remaptable[c]; */
-      if (bRemapControl || bRemapFont) {
-        if (c < MAXREMAP) c = remaptable[c];
-#if MAXREMAP < 128
-        else if (c == 32) c = 195;
-        else if (c == 127) c = 196;
-#endif
-      }
-      else if (bRemapSpace && c <= 32) {      /* 1995/Oct/17 */
-        if (c == 32) c = 195;   /* not 160 */
-        else if (c == 13) c = 176;  /* 1996/June/4 */
-        else if (c == 10) c = 173;  /* 1996/June/4 */
-        else if (c == 9) c = 170;   /* 1996/June/4 */
-        else if (c == 0) c = 161;
-      }
-      currentfont[c] = 1;
-    }
-  }
-}
-#endif
-
 void logdo_put3(FILE *infile)
 {
   logdo_putsub(ureadthree(infile));
@@ -546,7 +483,7 @@ int pagesequence;   /* count of ascending page sequence */
 
 /* returns zero if page is to be printed */ /* non-zero if to be skipped */
 
-int skipthispage(long pageno)
+int skip_this_page(long pageno)
 {
   int k;
 /*  int hitrange=0; */
@@ -607,7 +544,7 @@ void logdo_bop(FILE *infile) /* beginning of page */
 /*  skipflag = 0; */
   if (countzeroflag != 0) pageno = counter[0];
   else pageno = (long) pagenumber;
-  skipflag = skipthispage(pageno);  /* figure out if skipped */
+  skipflag = skip_this_page(pageno);  /* figure out if skipped */
 /*  if (beginpage != -LINFINITY && pageno < beginpage)  skipflag++;
   if (endpage != LINFINITY && pageno > endpage) skipflag++;  */
 /*  following is the logic for two-sided printing */
@@ -798,7 +735,7 @@ void logdo_z4(FILE *infile)
   (void) getc(infile); (void) getc(infile);
 }
 
-void logswitchfont(int fn, FILE *infile) /* switching to other font */
+void log_switch_font(int fn, FILE *infile) /* switching to other font */
 {
   int c;
   ff = fn;      /* set state */
@@ -835,7 +772,7 @@ void logdo_fnt1(FILE *infile) /* switch fonts */
 /*  fn = ureadone(infile); */
   fn = getc(infile);
 /*  if (skipflag == 0) */
-  logswitchfont(fn, infile);
+  log_switch_font(fn, infile);
 }
 
 void logdo_fnt2(FILE *infile) /* switch fonts */
@@ -844,14 +781,14 @@ void logdo_fnt2(FILE *infile) /* switch fonts */
   fn = ureadtwo(infile);
 /*  if (skipflag == 0) */
   if (fn >= MAXFONTNUMBERS) fn = MAXFONTNUMBERS-1;
-  logswitchfont((int) fn, infile);
+  log_switch_font((int) fn, infile);
 }
 
 void logdo_fntsub(unsigned long fn, FILE *infile) /* switch fonts */
 {
 /*  if (skipflag == 0) */
   if (fn >= MAXFONTNUMBERS) fn = MAXFONTNUMBERS-1;
-  logswitchfont((int) fn, infile);
+  log_switch_font((int) fn, infile);
 }
 
 void logdo_fnt3(FILE *infile) /* switch fonts */
@@ -872,13 +809,13 @@ void logdo_fnt4(FILE *infile) /* switch fonts */
 
 /* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
 
-void getheadername (FILE *infile) /* new version 95/Aug/30 */
+void get_header_name (FILE *infile) /* new version 95/Aug/30 */
 {
   char fname[FNAMELEN];     /* buffer to get token into */
   char *s;
 
-/*  if (gettoken(infile, headerfile, FNAMELEN) == 0) {*/
-  if (gettoken(infile, fname, sizeof(fname)) == 0) {  /* FNAMELEN */
+/*  if (get_token(infile, headerfile, FNAMELEN) == 0) {*/
+  if (get_token(infile, fname, sizeof(fname)) == 0) {  /* FNAMELEN */
     showline(" Can't find header\n", 1);
     errcount(0); 
     return;
@@ -931,7 +868,7 @@ void getheadername (FILE *infile) /* new version 95/Aug/30 */
 
 /* get name of file with DSC header comments */ /* only one allowed */
 
-void getcustomname (FILE *infile)
+void get_custom_name (FILE *infile)
 {
 /*  int n=0; */
 
@@ -940,8 +877,8 @@ void getcustomname (FILE *infile)
     errcount(0);
     return;
   }
-/*  if (gettoken(infile, line, MAXLINE) == 0) { */
-  if (gettoken(infile, line, sizeof(line)) == 0) { /* MAXLINE */
+/*  if (get_token(infile, line, MAXLINE) == 0) { */
+  if (get_token(infile, line, sizeof(line)) == 0) { /* MAXLINE */
     showline(" Can't find header\n", 1);
     errcount(0); 
   }
@@ -952,7 +889,7 @@ void getcustomname (FILE *infile)
 
 /* accumulate verbatim PS header text for prolog */
 
-void getheadertext (FILE *infile)   /* new 1993/Dec/29 */
+void get_header_text (FILE *infile)   /* new 1993/Dec/29 */
 {
   char *headernew;
   char *u;
@@ -965,7 +902,7 @@ void getheadertext (FILE *infile)   /* new 1993/Dec/29 */
   headernew = realloc (headertext, n);
   if (headernew == NULL) {
     showline(" Unable to allocate memory\n", 1);
-/*    flushspecial(infile); */
+/*    flush_special(infile); */
 /*    errcount(0); */
 /*    return; */
     checkexit(1);             /* 1995/July/15 */
@@ -980,7 +917,7 @@ void getheadertext (FILE *infile)   /* new 1993/Dec/29 */
 
 /* accumulate command line args for DVIPSONE - passed through DVI file */
 
-void getcommandspec (FILE *infile)    // 99/Sept/6
+void get_command_spec (FILE *infile)    // 99/Sept/6
 {
   char *commandnew;
   char *u;
@@ -1002,7 +939,7 @@ void getcommandspec (FILE *infile)    // 99/Sept/6
 
 /* accumulate verbatim PS header text for prolog */
 
-void getcustomtext (FILE *infile)     /* new 1995/July/15 */
+void get_custom_text (FILE *infile)     /* new 1995/July/15 */
 {
   int c, n, needpercent=0;
   char *customnew;
@@ -1018,7 +955,7 @@ void getcustomtext (FILE *infile)     /* new 1995/July/15 */
   customnew = realloc (dsccustom, n);
   if (customnew == NULL) {
     showline(" Unable to allocate memory\n", 1);
-/*    flushspecial(infile); */
+/*    flush_special(infile); */
 /*    errcount(0); */
 /*    return; */
     checkexit(1);             /* 1995/July/15 */
@@ -1035,26 +972,26 @@ void getcustomtext (FILE *infile)     /* new 1995/July/15 */
   *u++ = '\n'; *u++ = '\0';       /* terminating linefeed and \0 */
 }
 
-void getbbox (FILE *infile) /* Use for CropBox pdfmark not tested */
+void get_bbox (FILE *infile) /* Use for CropBox pdfmark not tested */
 {
 /*  Right now this is in PS coordinates, should be in TeX coordinates */
-  if (gettoken(infile, line, sizeof(line)) != 0) { /* MAXLINE */
+  if (get_token(infile, line, sizeof(line)) != 0) { /* MAXLINE */
     sscanf(line, "%d", &BBxll);
   }
-  if (gettoken(infile, line, sizeof(line)) != 0) { /* MAXLINE */
+  if (get_token(infile, line, sizeof(line)) != 0) { /* MAXLINE */
     sscanf(line, "%d", &BByll);
   }
-  if (gettoken(infile, line, sizeof(line)) != 0) { /* MAXLINE */
+  if (get_token(infile, line, sizeof(line)) != 0) { /* MAXLINE */
     sscanf(line, "%d", &BBxur);
   }
-  if (gettoken(infile, line, sizeof(line)) != 0) { /* MAXLINE */
+  if (get_token(infile, line, sizeof(line)) != 0) { /* MAXLINE */
     sscanf(line, "%d", &BByur);
   }
 } 
 
 /* accumulate Keywords for DOCINFO pdfmark */
 
-void getkeywords (FILE *infile)     /* 1996/May/10 */
+void get_keywords (FILE *infile)     /* 1996/May/10 */
 {
   char *keywordsnew;
   char *u;
@@ -1075,7 +1012,7 @@ void getkeywords (FILE *infile)     /* 1996/May/10 */
   keywordsnew = realloc (keywords, n);
   if (keywordsnew == NULL) {
     showline(" Unable to allocate memory\n", 1);
-/*    flushspecial(infile); */
+/*    flush_special(infile); */
 /*    errcount(0); */
 /*    return; */
     checkexit(1);             /* 1995/July/15 */
@@ -1092,11 +1029,11 @@ void getkeywords (FILE *infile)     /* 1996/May/10 */
   *u++ = '\0';        /* terminating \0 */
 }
 
-// void getcommonstring (FILE *infile, char *newstring) 
-char *getcommonstring (FILE *infile)
+// void get_common_string (FILE *infile, char *newstring) 
+char *get_common_string (FILE *infile)
 {
   char *u;
-  char *newstring = malloc ((size_t) (nspecial+1));
+  char *newstring = (char *)malloc ((size_t) (nspecial+1));
   if (newstring == NULL) {
     showline(" Unable to allocate memory\n", 1);
     checkexit(1);
@@ -1110,63 +1047,63 @@ char *getcommonstring (FILE *infile)
 
 // unadvertized ability to change Creator fieldin DocInfo
 
-void getcreator (FILE *infile)
+void get_creator (FILE *infile)
 {
   if (creatorstring != NULL) return;  /* ignore all but first */
 //  creatorstring = malloc ((size_t) (nspecial+1));
-//  getcommonstring(infile, creatorstring);
-  creatorstring = getcommonstring(infile);
+//  get_common_string(infile, creatorstring);
+  creatorstring = get_common_string(infile);
 }
 
-void gettitle (FILE *infile)
+void get_title (FILE *infile)
 {
   if (titlestring != NULL) return;  /* ignore all but first */
 //  titlestring = malloc ((size_t) (nspecial+1));
-//  getcommonstring(infile, titlestring);
-  titlestring = getcommonstring(infile);
+//  get_common_string(infile, titlestring);
+  titlestring = get_common_string(infile);
 }
 
-void getsubject (FILE *infile)
+void get_subject (FILE *infile)
 {
   if (subjectstring != NULL) return;  /* ignore all but first */
 //  subjectstring = malloc ((size_t) (nspecial+1));
-//  getcommonstring(infile, subjectstring);
-  subjectstring = getcommonstring(infile);
+//  get_common_string(infile, subjectstring);
+  subjectstring = get_common_string(infile);
 }
 
-void getauthor (FILE *infile)
+void get_author (FILE *infile)
 {
   if (authorstring != NULL) return; /* ignore all but first */
 //  authorstring = malloc ((size_t) (nspecial+1));
-//  getcommonstring(infile, authorstring);
-  authorstring = getcommonstring(infile);
+//  get_common_string(infile, authorstring);
+  authorstring = get_common_string(infile);
 }
 
 void getbase (FILE *infile)
 {
   if (basestring != NULL) return; /* ignore all but first */
 //  basestring = malloc ((size_t) (nspecial+1));
-//  getcommonstring(infile, basestring);
-  basestring = getcommonstring(infile);
+//  get_common_string(infile, basestring);
+  basestring = get_common_string(infile);
 }
 
-void getpagemode (FILE *infile)
+void get_page_mode (FILE *infile)
 {
   if (pagemode != NULL) return; /* ignore all but first */
 //  pagemode = malloc ((size_t) (nspecial+1));
-//  getcommonstring(infile, pagemode);
-  pagemode = getcommonstring(infile);
+//  get_common_string(infile, pagemode);
+  pagemode = get_common_string(infile);
 }
 
 /* example \special{papersize=5.04in,3.751in} */
 
-void getpapersize (FILE *infile)
+void get_paper_size (FILE *infile)
 {
 //  if (strcmp(papersize,"") != 0) return;  /* ignore all but first */
   if (papersize != NULL) return;
 //  papersize = malloc ((size_t) (nspecial+1));
-//  getcommonstring(infile, papersize);
-  papersize = getcommonstring(infile);
+//  get_common_string(infile, papersize);
+  papersize = get_common_string(infile);
 }
 
 /* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
@@ -1184,14 +1121,14 @@ void DoBackGround (FILE *infile, int c)
 
   if (bBackGroundFlag == 0)
   {
-    flushspecial(infile);
+    flush_special(infile);
     return;
   }
 
   s = line + strlen(line);
   if (c > 0) *s++ = (char) c;       /* stick in terminator */
   *s = '\0';                /* just in case */
-  (void) scanspecial(input, line, MAXLINE);
+  (void) scan_special(input, line, MAXLINE);
 
   if (traceflag)
   {
@@ -1323,7 +1260,7 @@ void logdo_com (FILE *infile)
 
   if (bIgnoreSpecials)
   {
-    flushspecial(infile);
+    flush_special(infile);
     return;
   }
   nspecialsav = nspecial;       /* 99/Feb/21 */
@@ -1331,19 +1268,19 @@ void logdo_com (FILE *infile)
   c = getc(infile);         /* peek ahead for ! */
   ungetc (c, infile);
   if (c == 0 && bFirstNull) {     /* is first byte null ? 96/Aug/29 */
-    flushspecial(infile);
+    flush_special(infile);
     return;
   }
   if (c == '!') {
 /*    if (verbatimflag != 0) { */   /* flushed 97/Mar/9 */
       c = getc(infile); nspecial--;
-      getheadertext(infile);
+      get_header_text(infile);
 /*    } */
-    flushspecial(infile);
+    flush_special(infile);
     return;
   }
-/*  c = getalphatoken(infile, line, MAXLINE); */
-  c = getalphatoken(infile, line, sizeof(line)); /* MAXLINE */
+/*  c = get_alpha_token(infile, line, MAXLINE); */
+  c = get_alpha_token(infile, line, sizeof(line)); /* MAXLINE */
 #ifdef TPIC
 /*  check whether maybe a TPIC \special */
   if (allowtpic != 0 && needtpic == 0 && (c == ' ' || c == 0)) {
@@ -1371,46 +1308,46 @@ void logdo_com (FILE *infile)
     }
   }
 /*  check whether a special calling for a header or prolog file */
-/*  if(c == '=' && strcmp(line, "header") == 0) getheadername(infile); */
+/*  if(c == '=' && strcmp(line, "header") == 0) get_header_name(infile); */
 /*  Separator is `=' */
   if(c == '=') {            /* extended 93/Dec/29 */
-/*    if (strcmp(line, "header") == 0) getheadername(infile); */
-    if (_strcmpi(line, "header") == 0) getheadername(infile);
-/*    else if (strcmp(line, "headertext") == 0) getheadertext(infile); */
-    else if (_strcmpi(line, "headertext") == 0) getheadertext(infile);
+/*    if (strcmp(line, "header") == 0) get_header_name(infile); */
+    if (_strcmpi(line, "header") == 0) get_header_name(infile);
+/*    else if (strcmp(line, "headertext") == 0) get_header_text(infile); */
+    else if (_strcmpi(line, "headertext") == 0) get_header_text(infile);
 /*    following added in 1995 July */
-    else if (strcmp(line, "DSCheader") == 0) getcustomname(infile);
-    else if (strcmp(line, "DSCtext") == 0) getcustomtext(infile);
-    else if (strcmp(line, "papersize") == 0) getpapersize(infile);
-    else if (strcmp(line, "DVIPSONE") == 0) getcommandspec(infile);
-    else if (strcmp(line, "DVIWindo") == 0) flushspecial(infile);
+    else if (strcmp(line, "DSCheader") == 0) get_custom_name(infile);
+    else if (strcmp(line, "DSCtext") == 0) get_custom_text(infile);
+    else if (strcmp(line, "papersize") == 0) get_paper_size(infile);
+    else if (strcmp(line, "DVIPSONE") == 0) get_command_spec(infile);
+    else if (strcmp(line, "DVIWindo") == 0) flush_special(infile);
 /*    else complain ??? */
   }
 /*  else if (c == ':' && strcmp(line, "dvitops") == 0) { */
 /*  Separator is `:' */
   else if (c == ':') {
     if (strcmp(line, "dvitops") == 0) {
-/*      (void) getalphatoken(infile, line, MAXLINE); */
-      (void) getalphatoken(infile, line, sizeof(line)); /* MAXLINE */
-      if (strcmp(line, "prolog") == 0) getheadername(infile);
+/*      (void) get_alpha_token(infile, line, MAXLINE); */
+      (void) get_alpha_token(infile, line, sizeof(line)); /* MAXLINE */
+      if (strcmp(line, "prolog") == 0) get_header_name(infile);
     }
     else if (strcmp(line, "PDF") == 0) {    /* 1996/July/4 */
-      c = getalphatoken(infile, line, sizeof(line));   /* MAXLINE */
+      c = get_alpha_token(infile, line, sizeof(line));   /* MAXLINE */
       if (c == ' ' || c == '=') {
-        if (_strcmpi(line, "Keywords") == 0) getkeywords(infile);
-        else if (strcmp(line, "BBox") == 0) getbbox(infile); 
-        else if (_strcmpi(line, "Creator") == 0) getcreator(infile);
-        else if (_strcmpi(line, "Title") == 0) gettitle(infile);
-        else if (_strcmpi(line, "Subject") == 0) getsubject(infile);
-        else if (_strcmpi(line, "Author") == 0) getauthor(infile);
+        if (_strcmpi(line, "Keywords") == 0) get_keywords(infile);
+        else if (strcmp(line, "BBox") == 0) get_bbox(infile); 
+        else if (_strcmpi(line, "Creator") == 0) get_creator(infile);
+        else if (_strcmpi(line, "Title") == 0) get_title(infile);
+        else if (_strcmpi(line, "Subject") == 0) get_subject(infile);
+        else if (_strcmpi(line, "Author") == 0) get_author(infile);
         else if (_strcmpi(line, "Base") == 0) getbase(infile);
-        else if (_strcmpi(line, "PageMode") == 0) getpagemode(infile);
+        else if (_strcmpi(line, "PageMode") == 0) get_page_mode(infile);
       }
     }
 /*    check whether TIFF image inserted re level2 features 96/Dec/20 */
     else if (strcmp(line, "insertimage") == 0)  bInsertImage++;
   }
-  flushspecial(infile);
+  flush_special(infile);
 }
 
 void logdo_xxxi(FILE *infile, unsigned int n)
@@ -1958,7 +1895,7 @@ int scanlogfileaux(FILE *fp_in)
     }
     else if (c >= 171 && c <= 234) { /* switch to font (c - 171) */
       fn = (c - 171);
-      logswitchfont(fn, fp_in);
+      log_switch_font(fn, fp_in);
     }
     else {
       switch(c) {
diff --git a/src/dvisourc/dvipsone.bat b/src/dvisourc/dvipsone.bat
deleted file mode 100644 (file)
index 47f5cfe..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-@echo off
-rem show current directory and command line
-rem Copyright (C) 2006 TeX Users Group.
-rem You may freely use, modify and/or distribute this file.
-chdir
-echo %0 %1 %2 %3 %4 %5 %6 %7 %8 %9
-
-C:\yandy\dvipsone\dvipsone.exe %1 %2 %3 %4 %5 %6 %7 %8 %9
-if not errorlevel 1 goto end
-
-rem pause, but only when run from command prompt in Windows
-rem set | find "windir=" > NUL
-rem if not errorlevel 1 pause
-
-:end
index ff58589..75a1404 100644 (file)
 *
 **********************************************************************/
 
-/* Revised 1999 June 13 to run in DLL form */
-
-#ifdef _WINDOWS
-#define NOCOMM
-#define NOSOUND
-#define NODRIVERS
-#define STRICT
-#include <windows.h>
-#endif
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <malloc.h>
-#include <setjmp.h>
-
-#ifdef _WINDOWS
-  // We must define MYLIBAPI as __declspec(dllexport) before including
-  // dvipsone.h, then dvipsone.h will see that we have already
-  // defined MYLIBAPI and will not (re)define it as __declspec(dllimport)
-  #define MYLIBAPI __declspec(dllexport)
-  // #include "dvipsone.h"
-#endif
-
 #include "dvipsone.h"
 
-#ifdef _WINDOWS
-  #pragma warning(disable:4100) // unreferenced formal variable 
-#endif
-
-#pragma warning(disable:4996)
-#pragma warning(disable:4127) // conditional expression is constant
-
-#pragma hdrstop
-
-#include <time.h>
-#include <signal.h>
-#include <direct.h>     /* for _getcwd(); */
-
-#ifndef _WINDOWS
-  #pragma warning(disable:4032) // different type when promoted
-  #include <conio.h>
-  #pragma warning(default:4032) // different type when promoted
-#endif
-
-#ifdef _WINDOWS
-  #pragma message("DLL Version")
-#else
-  #pragma message("EXE Version")
-#endif
-
-#ifdef _WINDOWS
-// int (* PScallback) (const char *) = NULL;    // callback for PS strings
-  int (* PScallback) (const char *, int) = NULL;    // callback for PS strings
-#endif
-
 #define NEEDATMINI
 
 #define CONTROLBREAK    /* handle control break */
 /* newmagic is the old hexmagic string with 8 preliminary bytes added */
 /* four are the author signature, four are the serial number * REEXEC */
 
-long serialnumber=0;
-
-#define hexmagic (newmagic+8) /* start of encrypted owner etc */
-
 /* now required by packdatetime for PDFmark 95/Feb/25 */
 
 char *months="JanFebMarAprMayJunJulAugSepOctNovDec";  /* 1994/June/8 */
@@ -192,18 +134,6 @@ int bInsertImage=0;     /* if \special{insertimage: ... } seen dvipslog */
 long postposition;      /* position of post op in DVI */
 int badpathwarn=0;      /* warned yet about bad path in search ? */
 
-#ifdef _WINDOWS
-int usecallbackflag=0;    // nonzero -> use callback rather than file output
-#endif
-
-#ifdef ALLOWDEMO
-int bDemoFlag = 0;          /* non-zero => DEMO version */
-                  /* as determined by user string DEMO */
-time_t dtime=0;           /* seconds since customized, now global */
-#define oneday (86400)        /* one day in seconds */
-#define onemonth (86400 * 31)   /* one month in seconds */
-#endif
-
 int textures=0;       /* non-zero => textures style DVI file */
 /* int flipflag=0; */   /* non-zero => flip horizontally */
 int makeepsf=0;       /* non-zero => output intended as EPS file */
@@ -262,20 +192,27 @@ int remaptable[MAXREMAP];         /* 1994/June/20 */
 
 /* added A2 and B3 1994/Dec/10 */
 
-char *papertypes[] = {
-"letter", "note", "legal", "folio", "ledger", "tabloid", "executive", 
-"a2", "a3", "a4", "a5",
-"b3", "b4", "b5", "quarto", ""};
+char *papertypes[] = 
+{
+  "letter", "note", "legal", "folio", "ledger", "tabloid", "executive",
+  "a2", "a3", "a4", "a5", "b3", "b4", "b5", "quarto", ""
+};
 
-double pagewidths[] = { /* in inches */
- 8.5, 8.5, 8.5, 8.5, 11, 11, 7.25, 
-420/25.4, 297/25.4, 210/25.4, 148/25.4,
-354/25.4, 250/25.4, 176/25.4, 215/25.4, 1};
+/* in inches */
+double pagewidths[] = 
+{
+  8.5, 8.5, 8.5, 8.5, 11, 11, 7.25,
+  420/25.4, 297/25.4, 210/25.4, 148/25.4,
+  354/25.4, 250/25.4, 176/25.4, 215/25.4, 1
+};
 
-double pageheights[] = { /* in inches */
- 11,  11,  14,  13,  17, 17, 10.5,
-594/25.4, 420/25.4, 297/25.4, 210/25.4,
-500/25.4, 354/25.4, 250/25.4, 275/25.4, 1};
+/* in inches */
+double pageheights[] =
+{
+  11, 11, 14, 13, 17, 17, 10.5,
+  594/25.4, 420/25.4, 297/25.4, 210/25.4,
+  500/25.4, 354/25.4, 250/25.4, 275/25.4, 1
+};
 
 /* `statement' 5 1/2 x 8 1/2 */
 
@@ -475,19 +412,13 @@ char *copyright = "\nCopyright (C) 1990--2000, Y&Y, Inc.\n"
                   //"it under the terms of the GNU General Public License as published by\n"
                   //"the Free Software Foundation; either version 2 of the License, or\n"
                   //"(at your option) any later version.\n\n";
-/* #define COPYHASH 8075316 */
-/* #define COPYHASH 12093609 */
-/* #define COPYHASH 12526110 */
-/* #define COPYHASH 12958611 */
-/* #define COPYHASH 8401139 */
-#define COPYHASH 7034257
+
 
 /* char *company="Y&&Y, Inc. USA"; */ /* double percent for Acrobat Info */
 
 /* char *company="Y&Y, Inc. USA"; */  /* 97/Jan/30 */
 
 char *company = "Y&Y, Inc.";  /* 97/Apr/29 */
-char *phone   = "(978) 371-3286"; /* for Acrobat Info */
 char *URL     = ""; /* string in binary ... */
 
 char *filenamex=NULL;     /* remember full file name here */
@@ -726,17 +657,6 @@ FILE *output  = NULL;  /* used by `interrupt handler' */
 
 char fn_in[FNAMELEN], fn_out[FNAMELEN];   /* 1994/Mar/1 */
 
-/****************************************************************************/
-
-#ifdef _WINDOWS
-// int ShowLine(char *, int);
-void ShowLine(char *, int);
-#endif
-
-/* Output to screen -  stdout or errout - and optionally logfile 99/Apr/23 */
-
-/************************************************************************/
-
 void perrormod (char *s)
 {
   sprintf(logline, "`%s': %s\n", s, strerror(errno));
@@ -958,18 +878,13 @@ int setupdviwindo (void)
 
 int useatmini = 1;       /* use [Setup] section in `atm.ini' */
                          /* reset if setup of atm.ini file fails */
-// char *atmini = "";    /* full file name for atm.ini, with path */
 char *atmini=NULL;       /* full file name for atm.ini, with path */
 int useatmreg=1;         /* use ATMREG.ATM for %%IncludeFont */
                          /* reset if setup of ATMREG.ATM file fails */
 int usepsfontname=1;     /* allow use of PS FontName in DVI TFM */
-// char *szATMRegAtm=""; /* full file name for ATMREG.ATM, with path */
 char *szATMRegAtm=NULL;  /* full file name for ATMREG.ATM, with path */
 int useatmfontsmap=1;    /* zero if tried and failed to find atmfonts.map */
-// char *atmfontsmap=""; /* file name and path to ATMFONTS.MAP */
- char *atmfontsmap=NULL; /* file name and path to ATMFONTS.MAP */
-
-// char *atmininame = "atm.ini";  /* name of ini file we are looking for */
+char *atmfontsmap=NULL; /* file name and path to ATMFONTS.MAP */
 
 char *atmsection="[Setup]";   /* ATM.INI section */
 
@@ -1212,8 +1127,8 @@ int getrealline (FILE *input, char *buff)
 void extension (char *fname, char *ext)
 {
   char *s, *t;
-  if ((s = strrchr(fname, '.')) == NULL ||
-      ((t = strrchr(fname, '\\')) != NULL && s < t))
+
+  if ((s = strrchr(fname, '.')) == NULL || ((t = strrchr(fname, '\\')) != NULL && s < t))
   {
     strcat(fname, ".");
     strcat(fname, ext);
@@ -1224,14 +1139,14 @@ void extension (char *fname, char *ext)
 void forceexten (char *fname, char *ext)
 {
   char *s, *t;
-  if ((s = strrchr(fname, '.')) == NULL ||
-      ((t = strrchr(fname, '\\')) != NULL && s < t))
+
+  if ((s = strrchr(fname, '.')) == NULL || ((t = strrchr(fname, '\\')) != NULL && s < t))
   {
     strcat(fname, ".");
     strcat(fname, ext);
   }
   else
-    strcpy(s+1, ext);    /* give it default extension */
+    strcpy(s + 1, ext);    /* give it default extension */
 }
 
 /* remove extension if present */
@@ -1271,9 +1186,8 @@ char *extractfilename (char *pathname)
 void showusage (char *program)
 {
   int k;
-  char *s=logline;
+  char *s = logline;
 
-//  abortflag++;
   sprintf(s, "%s [-{vrgh}] [-b=<begin>] [-e=<end>]\n"
       "[-m=<mag>] [-o=<orient>] [-x=<xoff>] [-y=<yoff>] [-c=<num>]\n"
       "[-f=<fontpath>] [-i=<epspath>] [-s=<sub>] [-l=<paper>]\n"
@@ -1283,7 +1197,7 @@ void showusage (char *program)
 
   if (! detailflag)
   {
-    return;     // 2000 June 18
+    return;
   }
 //  s += strlen(s);
   sprintf(s, ""
@@ -1406,19 +1320,12 @@ int decodeflag (int c, int toggle)
   switch(c) {
     case '?': detailflag = 1; return 0;
     case 'q': quietflag++; return 0;
-/*    case 'v': verboseflag = (1 - verboseflag); return 0; */
     case 'v': changeflag(&verboseflag, toggle, 0); return 0; 
-/*    case 'V': showflag = (1 - showflag); return 0;    */
     case 'V': changeflag(&showfontflag, toggle, 0); return 0;
-/*    case 'r': reverseflag = (1 - reverseflag); return 0;*/
     case 'r': changeflag(&reverseflag, toggle, 0); return 0;
-/*    case 'g': oddpageflag = (1 - oddpageflag); return 0;*/
     case 'g': changeflag(&oddpageflag, toggle, 0); return 0;
-/*    case 'h': evenpageflag = (1 - evenpageflag); */
-/*          reverseflag = (1 - reverseflag); return 0; */
     case 'h': changeflag(&evenpageflag, toggle, 0); 
           changeflag(&reverseflag, toggle, 0);  return 0;
-/*    case 'z': makeepsf = (1 - makeepsf); return 0;*/
     case 'z': changeflag(&makeepsf, toggle, 0); return 0;
 /*    case 'k': forcereside = (1 - forcereside); return 0;*/
     case 'k': changeflag(&forcereside, toggle, 0); return 0;
@@ -1815,9 +1722,6 @@ void cleanup (void)
 
 void abortjob (void)
 {
-#ifdef _WINDOWS
-  showline("ABORTJOB", 1);  // debugging only - can't happen
-#endif
   cleanup();
   checkexit(3);
 //  return -1;
@@ -2101,7 +2005,6 @@ int decodepapersize (char *papersize, double *pagewidth, double *pageheight)
 /* PS letter, note, legal, ledger ? */
 /* use table for neatness */
 
-/* void analpapertype(char *papertype) { */ /* 94/May/6 */
 int analpapertype (char *papertype, double *pagewidth, double *pageheight)
 {
   int k;
@@ -2245,7 +2148,7 @@ char *stampit (char *line, int dateflag)
 //  Have to make copy of comma separated headerfile list 
 //  because strtok messes it up, and the list is needed again later
 
-void prologcomments (char *headerfile, FILE *outfile) /* 1993/Nov/15 */
+void prolog_comments (char *headerfile, FILE *outfile) /* 1993/Nov/15 */
 {
   char *s;
   char filename[MAXLINE];     /* need to work on copy since modify */
@@ -2448,12 +2351,12 @@ void writestruct (FILE *outfile)
 
   for (k = 0; k < prologfileindex; k++)  /* 1993/Dec/21 */
   {
-    prologcomments (prologfile[k], outfile);
+    prolog_comments (prologfile[k], outfile);
   }
 
 /*  should have version and revision? */
   if (headerfile != NULL)
-    prologcomments(headerfile, outfile);  /* 1993/Nov/15 */
+    prolog_comments(headerfile, outfile);  /* 1993/Nov/15 */
 
   if (missing != 0) /* not reliable - may be non-zero yet nothing? */
   {
@@ -3872,9 +3775,6 @@ void uppercase (char *t, char *s)
   *t = '\0';
 }
 
-/*  problem:        wants void (__cdecl *)(int); */
-/*  gets #define SIG_IGN (void (__cdecl *)(int))1 */
-
 #undef SIG_IGN
 #define SIG_IGN (void (__cdecl *)(int))1L
 
@@ -4338,24 +4238,10 @@ void writesetup (FILE *output, char *filename)
 
   if (makeepsf == 0)
   {
-/*    replaceletter(fn_in, '\\', '/'); */ /*  backslash to slash ? */
-/*    must avoid backslash in string ... */ /* fn_in */
-/*    Note: fn_in may still contain a colon! */ 
-/*    which is not good when jobname is sent back over link */
-/*    since assumed syntax of such messages if key: value; */
-/*    fprintf(output, "statusdict /jobname\n(%s SN %ld %s ", 
-      programversion, serialnumber/REEXEC, filename); */
-//    fputs("statusdict /jobname\n(DVIPSONE ", output);
     PSputs("statusdict /jobname\n(DVIPSONE ", output);
-/*    fprintf(output, "0.%d.%d SN %ld ", */
     sprintf(logline, "%d.%d.%d ", version, revision, subrevision);
     PSputs(logline, output);
-//    if (subrevision != 0) fprintf(output, ".%d", subrevision);
-//    sprintf(logline, " SN %ld ", serialnumber/REEXEC);
-//    PSputs(logline, output);
-//    fputs(filename, output);
     PSputs(filename, output);
-//    putc(' ', output);
     PSputc(' ', output);
 /*    not clear need to really avoid jobname setting in EPS mode... */
 
@@ -4531,7 +4417,7 @@ void writesetup (FILE *output, char *filename)
 
 /* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
 
-void setupremap (void)
+void setup_remap (void)
 {
   int k;
 #if MAXREMAP > 32
@@ -4587,7 +4473,7 @@ int dodefaults (void)     /* moved out 1994/May/23 */
   int flag=1;
 
 
-  setupremap ();        /* may as well always do this 95/Oct/15 */
+  setup_remap ();        /* may as well always do this 95/Oct/15 */
 
   if (xmagnification == 0.0)
     xmagnification = 1.0;
@@ -4953,12 +4839,6 @@ int dvibody (int argc, char *argv[])
   if (expandpageranges() < 0)
     return -1;
 
-//  for (k = 0; k < maxranges; k++) { /* install defaults */
-//    beginpages[k] = -LINFINITY;
-//    endpages[k] = LINFINITY;
-//    pagerangeseq[k] = -1;     /* 94/March/15 */
-//  }
-
   prologfileindex = 0;        /* 1993/Dec/21 */
   
   readcommands(dvipsonecmd);      /* dvipsone.cmd file *first* if any */
@@ -5059,40 +4939,6 @@ int dvibody (int argc, char *argv[])
       *s = '\0';
   }
 
-// debugging checks -- no longer significant
-#ifdef IGNORED
-#ifdef _WINDOWS
-  if (outputfile != NULL && strcmp(outputfile, "PASSBACK") != 0)
-  {
-    if (usecallbackflag)
-    {
-      sprintf(logline, "INCONSISTENT: -d=%s passback=%d\n", outputfile, usecallbackflag);
-      showline(logline, 0);
-    }
-  }
-  else
-  {
-    if (usecallbackflag == 0)
-    {
-      sprintf(logline, "INCONSISTENT: -d=%s passback=%d\n",
-          (outputfile == NULL) ? "<absent>" : outputfile, usecallbackflag);
-      showline(logline, 0);
-    }
-  }
-#endif
-#endif
-
-#ifdef _WINDOWS
-//  May need to do something if -d=PASSBACK specified from  DVIWindo ???
-  if (outputfile != NULL && strcmp(outputfile, "PASSBACK") == 0)
-  {
-    if (usecallbackflag == 0)
-    {
-      outputfile = NULL;    // 2000/Feb/14 ???
-    }
-  }
-#endif
-
 /*  if output file specified, open only ONCE (for all input files) */
 /*  also, don't force extension if an extension was specified */
 /*  also, try and figure out if going direct to a printer */
@@ -5782,352 +5628,6 @@ int main (int argc, char *argv[]) /* main program entry point */
 #endif
 }
 
-////////////////////////////////////////////////////////////////////////////
-
-#ifdef _WINDOWS
-
-// stuff to buffer up PS code to avoid calling too often
-// assumes null terminated strings 
-// may want to use both for EXE and DLL version ...
-
-unsigned int psbufpos=0;      // index to next available in psbuffer
-
-char psbuffer[PSBUFLEN]="";     // for buffering up PS output
-
-// Modified to pass actual length (rather than null terminate) 2000/Feb/14
-
-void sendpsbuffer (FILE *output)
-{
-  unsigned int k;
-
-//  if (psbufpos == 0) return;
-//  if (output == NULL) return;
-  psbuffer[psbufpos] = '\0';  // terminate - just in case
-
-  if (usecallbackflag)
-  {
-    if (PScallback(psbuffer, psbufpos) != 0)
-    {
-      sprintf(logline, "PScallback failed %s %d", psbuffer, psbufpos);
-      showline(logline, 1); // debugging only
-      uexit(1);
-    }
-  }
-  else if (output != NULL)  // printing to FILE from DLL
-  {
-    if (strlen(psbuffer) == psbufpos)
-      fputs(psbuffer, output);  // no embedded nulls
-    else
-    {
-      for (k = 0; k < psbufpos; k++)
-        putc(psbuffer[k], output);
-    }
-  }
-  psbufpos = 0;         // reset buffer
-//  *psbuffer = '\0';
-}
-
-void psputs (char *str, FILE *output)
-{
-  int nlen =  strlen(str);
-
-//  if (PScallback == NULL) return;     // sanity check
-  if (*str == '\0')  // special case clean out buffer
-  {
-    sendpsbuffer(output);
-    return;
-  }
-
-//  if new stuff won't fit in buffer, clear the buffer first
-  if (psbufpos+nlen+2 >= PSBUFLEN)
-    sendpsbuffer(output);
-
-//  if new stuff won't fit in buffer, send it directly
-  if (nlen+2 >= PSBUFLEN)
-  {
-    if (usecallbackflag)
-    {
-      if (PScallback(str, nlen) != 0)
-      {
-        sprintf(logline, "PScallback failed %s %d", str, nlen);
-        showline(logline, 1); // debugging only
-        uexit(1);
-      }
-    }
-    else if (output != NULL)    // sanity check
-      fputs(str, output);
-  }
-  else
-  {
-//  else append it to the buffer --- and send if it ends in newline
-    strcpy(psbuffer+psbufpos, str);
-    psbufpos += nlen;
-    if (psbuffer[psbufpos-1] == '\n')
-      sendpsbuffer(output);
-  }
-}
-
-// psputc done as macro in order to gain some speed
-
-// void psputc (int c) {
-// do{psbuffer[psbufpos++] = (char) chr; \
-//    if ((psbufpos+2 >= PSBUFLEN) || (chr == '\n')) sendpsbuffer(output);}while(0)
-// }
-
-#endif
-
-// Here follows the new stuff for the DLL version
-
-#ifdef _WINDOWS
-    
-#define WHITESPACE " \t\n\r"
-
-HINSTANCE hInstanceDLL=NULL;    /* remember for this DLL */
-
-/* This is the callback function for the EDITTEXT Control in CONSOLETEXT */
-
-#define GET_WM_COMMAND_CMD(wParam, lParam)  (HIWORD(wParam))
-#define GET_WM_COMMAND_ID(wParam, lParam) (LOWORD(wParam))
-#define GET_WM_COMMAND_HWND(wParam, lParam) ((HWND)lParam)
-
-HWND hConsoleWnd=NULL;    /* Console Text Window Handle passed from DVIWindo */
-
-// In DLL version, this is what "showline" (lc) calls ...
-
-// int ShowLine (char *line, int errflag)       /* 99/June/11 */
-void ShowLine (char *line, int errflag) {     /* 99/June/11 */
-  int ret;
-
-  if (IsWindow(hConsoleWnd) == 0) {   // in case the other end died
-    sprintf(line, "NO CONSOLE WINDOW? %08X %s", hConsoleWnd, line);
-    ret = MessageBox(NULL, line, "DVIPSONE",
-             MB_ICONSTOP | MB_OKCANCEL | MB_TASKMODAL);
-    hConsoleWnd = NULL;
-//    abortflag++;            // kill job in this case ???
-    return;
-  }
-
-//  if (showlineinx > 0) ClearShowBuffer();
-
-  if (hConsoleWnd != NULL)
-    SendMessage(hConsoleWnd, ICN_ADDTEXT, (WPARAM) line, 0L);
-
-  if (errflag) {
-    errlevel++;
-    ret =  MessageBox(NULL, line, "DVIPSONE",
-              MB_ICONSTOP | MB_OKCANCEL | MB_TASKMODAL);
-    if (ret == IDCANCEL && jumpused == 0) {
-//      abortflag++;
-      uexit(1);   // dangerous reentry possibility ?
-    }
-  }
-}
-
-void winshow (char *line)
-{
-  (void) MessageBox(NULL, line, "DVIPSONE",
-      MB_ICONINFORMATION | MB_OK | MB_TASKMODAL);
-}
-
-void winerror (char *line)
-{
-  int ret;
-  ret = MessageBox(NULL, line, "DVIPSONE",
-      MB_ICONSTOP | MB_OKCANCEL | MB_TASKMODAL);
-  if (ret == IDCANCEL && jumpused == 0) {
-//    abortflag++;
-    uexit(1);
-  }
-}
-
-// argument info constructed from command line
-
-int argc;
-
-char **argv=NULL;
-
-// Need to be careful here because of quoted args with spaces in them
-// e.g. -d="G:\Program Files\Adobe\Acrobat\*.pdf"
-// needs to be counted as one argument only,
-// and needs to have " stripped out
-
-// int makecommandargs (char *line) 
-int makecommandargs (unsigned char *line)
-{
-  int argc=0;
-//  char *s, *t;
-  unsigned char *s, *t;       // fixed 2000 June 18
-  
-  if (line == NULL) return -1;    /* sanity check */
-
-//  first figure out how many arguments are on command line
-  s = line;
-  while (*s != '\0') {
-    while (*s <= 32 && *s > 0) s++;     // step over white space
-    if (*s == '\0') break;          // hit the end
-    t = s;
-    while (*t > 32 && *t != '\"') t++;    // step over argument
-    if (*t == '\"') {           // if "... delimited
-      t++;
-      while (*t > 0 && *t != '\"') t++; // search for ..."
-      if (*t == '\0') break;        // hit the end
-      t++;
-    }
-//    argv[argc] = s;
-    argc++;
-    if (*t == '\0') break;
-//    *t = '\0';
-    s = t+1;              // look for next argument
-  }
-
-  if (argc == 0) return -1;     /* nothing to do */
-
-  argv = (char **) malloc(argc * sizeof(char *));
-  if (argv == NULL) {
-    sprintf(logline, "ERROR: Unable to allocate memory for %s\n", "arguments");
-    winerror(logline);
-    return -1;
-  }
-
-//  Now extract argc arguments and put in argv array
-  argc = 0;
-  s = line;
-  while (*s != '\0') {
-    while (*s <= ' ' && *s > '\0') s++;   // step over white space
-    if (*s == '\0') break;          // hit the end
-    t = s;
-    while (*t > ' ' && *t != '\"') t++;   // step over argument
-    if (*t == '\"') {           // if "... delimited
-      t++;
-//      strcpy(t, t+1);           // flush "... 2000 May 27
-      while (*t > 0 && *t != '\"') t++; // search for ..."
-      if (*t == '\0') break;        // hit the end
-      t++;
-//      strcpy(t, t+1);           // flush ..." 2000 May 27
-    }
-    argv[argc] = s;             // next argument
-    argc++;
-    if (*t == '\0') break;
-    *t = '\0';
-    s = t+1;                // look for next argument
-  }
-
-#ifdef DEBUGGING
-  s = logline;
-  *s = '\0';
-  for (k = 0; k < argc; k++) {
-    sprintf(s, "%d\t%s\n", k, argv[k]);
-    s += strlen(s);
-  }
-  winshow(logline);
-#endif
-  return argc;
-}
-
-//  This is the new entry point of DLL called from DVIWindo 
-//  ARGS: console window to send messages to, command line, callback fun
-//  no console window output if hConsole is NULL
-//  callback function is NULL if DVIPSONE prints direct to port or file
-//  returns -1 if it fails --- returns 0 if it succeeds
-
-// int dvipsone (HWND hConsole, char *line, int (* PScall) (const char *))
-int dvipsone (HWND hConsole, char *line, int (* PScall) (const char *, int))
-{
-  int firstarg=0;
-  int flag;
-
-  abortflag = 0;            // redundant
-  hConsoleWnd = NULL;         // redundant
-
-  usecallbackflag = (PScall != NULL);
-
-  hConsoleWnd = hConsole;       // remember console window handle
-  PScallback = PScall;        // remember callback function
-  psbufpos = 0;           // reset buffer
-
-//  sprintf(logline, "DVIPSONE %s callbackflag: %d\n", line, usecallbackflag);
-//  sprintf(logline, "%s\n", line);
-//  showline(logline, 0);         // debugging only
-
-  argc = makecommandargs(line);     // sets up global *argv[]
-
-  if (argc < 0) return -1;        // sanity check
-
-  firstarg = commandline(argc, argv, firstarg); // analyze args
-
-  if (firstarg >= argc) {
-    sprintf(logline, "ERROR: Too few arguments in %s\n", line);
-    winerror(logline);
-    return -1;
-  }
-  
-  if (hConsoleWnd != NULL) 
-    SendMessage(hConsoleWnd, ICN_SETTITLE, (WPARAM) "DVIPSONE", 0L);
-//  SendMessage(hConsoleWnd, ICN_RESET, 0, 0L); // if want to clear window
-
-  if (usecallbackflag) {
-    showline("Passing PS back to Windows from DVIPSONE.DLL\n", 0);
-  }
-  else {
-    showline("Printing directly from DVIPSONE.DLL\n", 0);
-  }
-
-  (void) main(argc, argv);      // now run DVIPSONE proper 
-
-  if (errlevel > 0 || abortflag > 0)
-  {
-    sprintf(logline, "ERRORS in Processing (err %d abort %d)\n",
-        errlevel, abortflag);
-    winerror(logline);        // debugging output ?
-  }
-
-//  if (psbufpos > 0) sendpsbuffer(output);   // empty out PS buffer
-//  if (psbufpos > 0) PSputs("", output);   // output already closed
-  
-  if (hConsoleWnd != NULL)
-  {
-    if (errlevel > 0 || abortflag > 0) flag = 1;
-    else flag = 0;              // pass along error indication
-    SendMessage(hConsoleWnd, ICN_DONE, flag, 0);  // flush out console buffer
-  }
-  PScallback = NULL;
-  hConsoleWnd = NULL;
-
-  if (argv != NULL) free(argv);
-  if (abortflag) return -1;
-  else return 0;
-}
-
-BOOL WINAPI DllMain (HINSTANCE hInstDll, DWORD fdwReason, LPVOID fImpLoad)
-{
-  switch (fdwReason)
-  {
-    case DLL_PROCESS_ATTACH:
-      // The DLL is being mapped into the process's address space
-      // place to allocate memory ???
-      // return FALSE if this fails
-      hInstanceDLL = hInstDll;    /* remember it */
-      break;
-
-    case DLL_THREAD_ATTACH:
-      // A thread is being created
-      break;
-
-    case DLL_THREAD_DETACH:
-      // A thread is exiting cleanly
-      break;
-
-    case DLL_PROCESS_DETACH:
-      // The DLL is being unmapped from the process's address space
-      // place to free any memory allocated
-      // but make sure it in fact *was* allocated
-      hInstanceDLL = NULL;    /* forget it */
-      break;
-  }
-  return(TRUE); // used only for DLL_PROCESS_ATTACH
-}
-#endif  // end of new stuff for DLL version
-
 //////////////////////////////////////////////////////////////////////////////
 
 /* Things to do or to worry about: */
@@ -6282,4 +5782,4 @@ BOOL WINAPI DllMain (HINSTANCE hInstDll, DWORD fdwReason, LPVOID fImpLoad)
 /* print /p "%1" */
 /* printo /t "%1" "%2" "%3" "%4" */
 /* where %1 is the file name */
-/* and %2 %3 %4 are printer, driver, and port presumably */
+/* and %2 %3 %4 are printer, driver, and port presumably */
\ No newline at end of file
index 2b33d72..07d84c3 100644 (file)
 
 /////////////////////////////////////////////////////////
 
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <malloc.h>
+#include <setjmp.h>
+#include <time.h>
+#include <signal.h>
+#include <sys/types.h>
+#include <sys/stat.h>   /* for _stat etc. */
+#include <sys/utime.h>  /* for _utimbuf etc. */
+#include <direct.h>     /* for _getcwd(); */
+#include <conio.h>
+
+
+#ifdef _WINDOWS
+  #pragma warning(disable:4100) // unreferenced formal variable
+#endif
+
+#pragma warning(disable:4996)
+#pragma warning(disable:4127) // conditional expression is constant
+
 #ifdef _WINDOWS
 
 // MYLIBAPI is defined as __declspec(dllexport) in the
@@ -341,8 +362,8 @@ extern long gotopost(FILE *);     /* in dvianal.c */
 /* extern FILE *findepsfile(char *, int); */  /* in dvispeci.c */
 /* extern FILE *findepsfile(char *, int, char *); *//* in dvispeci.c */
 extern FILE *findepsfile(char *, char *, int, int); /* in dvispeci.c */
-extern int scanspecial(FILE *, char *, int);  /* in dvispeci.c */
-extern int scanspecialraw(FILE *, char *, int); /* in dvispeci.c */
+extern int scan_special(FILE *, char *, int);  /* in dvispeci.c */
+extern int scan_special_raw(FILE *, char *, int); /* in dvispeci.c */
 extern FILE *fopenfont (char *, char *, int); /* in dvispeci.c */
 extern int FindMMBaseFile (int k);        /* in dvispeci.c */
 extern int checkCTM(FILE *);          /* in dvispeci.c */
@@ -362,10 +383,10 @@ extern void giveup(int);
 extern void tellwhere(FILE *, int);
 extern void ShowLine(char *, int);      /* new in dvipsone.c */
 
-extern int getalphatoken(FILE *, char *, int);
-extern int gettoken(FILE *, char *, int);
-extern void flushspecial(FILE *);
-extern int skipthispage(long);
+extern int get_alpha_token(FILE *, char *, int);
+extern int get_token(FILE *, char *, int);
+extern void flush_special(FILE *);
+extern int skip_this_page(long);
 extern int readspecial(FILE *, FILE *, unsigned long);
 extern void prereadspecial(FILE *, unsigned long);
 extern void lowercase(char *, char *);
index 8a18260..9520d7c 100644 (file)
    02110-1301 USA.
 ****************************************************************************/
 
-/* Revised 1999 June 13 to run in DLL form */
-
-#ifdef _WINDOWS
-#define NOCOMM
-#define NOSOUND
-#define NODRIVERS
-#define STRICT
-#include <windows.h>
-#endif
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <malloc.h>
-#include <setjmp.h>
-
-#ifdef _WINDOWS
-  #define MYLIBAPI __declspec(dllexport)
-#endif
-
 #include "dvipsone.h"
 
-#ifdef _WINDOWS
-#pragma warning(disable:4100) // unreferenced formal variable 
-#endif
-
-#pragma warning(disable:4996)
-#pragma warning(disable:4127) // conditional expression is constant
-
-#pragma hdrstop
-
-#include <time.h>     /* for struct tm etc. */
-#include <sys/types.h>
-#include <sys/stat.h>   /* for _stat etc. */
-#include <sys/utime.h>    /* for _utimbuf etc. */
-
 #define AllowCTM
 
-/* double convdeg (double angle) {  return (angle * 180 / 3.141592653); } */
-
-/* #define CONVDEG(x) (x * 180 / 3.141529865358) */
-
 #define PI (3.141592653)
 
 #define CONVDEG(x) ((x) * 180 / 3.141592653)
@@ -69,9 +31,9 @@
 /* multiply all quantities in DVI file by this to get 10^{-7} meters */
 /* in TeX, this is normally set to 25400000/473628672 */ 
 
-int psfigstyle=0;   /* non-zero if new style DVI2PS special */
-int pstagstyle=0;   /* non-zero if new style DVIPS special */
-int pssvbstyle=0;   /* non-zero if new style DVIPS special */
+int psfigstyle = 0;   /* non-zero if new style DVI2PS special */
+int pstagstyle = 0;   /* non-zero if new style DVIPS special */
+int pssvbstyle = 0;   /* non-zero if new style DVIPS special */
 
 static char filename[FNAMELEN]; /* name of special file for error message */
 
@@ -104,7 +66,9 @@ double xll, yll, xur, yur;
 char *showbeginning (char *s, char *t, int n)
 {
   int k;
-  for (k=0; k < n; k++) *s++ = *t++;
+
+  for (k=0; k < n; k++)
+    *s++ = *t++;
 //  fputs("...\n", output);
   strcat(s, "..\n");
   s += strlen(s);
@@ -115,7 +79,7 @@ char *showbeginning (char *s, char *t, int n)
 /* returns 0 if no more tokens found - else returns terminator */
 /* what to do if error ? */
 
-int getalphatoken (FILE *input, char *token, int nmax)
+int get_alpha_token (FILE *input, char *token, int nmax)
 {
   int c, k = 0;
   char *s = token;
@@ -123,12 +87,12 @@ int getalphatoken (FILE *input, char *token, int nmax)
   *s = '\0';              /* in case we pop out 96/Aug/29 */
   if (nspecial <= 0) return 0;    /* nothing more in \special */
   if (nmax <= 0) {          /* 95/Aug/30 */
-    flushspecial(input);
+    flush_special(input);
     return 0;           /* error overflow */
   }
   c = getc(input); --nspecial;
   if (c == 0) {
-    flushspecial(input);
+    flush_special(input);
     return 0;           /* first byte is null 96/Aug/29 */
   }
   while (c <= ' ' && nspecial > 0) {  /* over initial white space */
@@ -148,7 +112,7 @@ int getalphatoken (FILE *input, char *token, int nmax)
       showline(logline, 1);
 //      if (logfileflag) showbeginning(logfile, token, nmax/2);
       errcount(0);    /* ??? */
-      flushspecial(input);          /* 95/Aug/30 */
+      flush_special(input);          /* 95/Aug/30 */
       c = 0;      /* so we return 0 */  /* 95/Aug/30 */
 /*      c = getc(input); --nspecial;
       while (((c >= 'a' && c <= 'z')  || (c >= 'A' && c <= 'Z')  ||
@@ -173,7 +137,7 @@ int getalphatoken (FILE *input, char *token, int nmax)
 
 /* flush rest of special to get back to rest of DVI code */
 
-void flushspecial(FILE *input)
+void flush_special (FILE *input)
 {
   int c;
   if (nspecial <= 0) return;
@@ -186,7 +150,7 @@ void flushspecial(FILE *input)
 /* - either up to white space - or - double quote delimited */
 /* returns 0 if no more tokens found - else returns terminator */
 
-int gettoken (FILE *input, char *buff, int nmax)
+int get_token (FILE *input, char *buff, int nmax)
 {
   int c, k=0, marker=' ';   // end of token marker
   char *s=buff;
@@ -194,7 +158,7 @@ int gettoken (FILE *input, char *buff, int nmax)
   *s = '\0';            // in case pop out right away
   if (nspecial <= 0) return 0;    /* nothing more in \special */
   if (nmax <= 0) {          /* 95/Aug/30 */
-    flushspecial(input);
+    flush_special(input);
     return 0;           /* error overflow */
   }
   c = getc(input);
@@ -224,7 +188,7 @@ int gettoken (FILE *input, char *buff, int nmax)
       showline(logline, 1);
 //      if (logfileflag) showbeginning(logfile, buff, nmax/2);
       errcount(0);    /* ??? */
-      flushspecial(input);          /* 95/Aug/30 */
+      flush_special(input);          /* 95/Aug/30 */
       c = 0;      /* so we return 0 */  /* 95/Aug/30 */
 /*      c = getc(input); --nspecial;
       while (c > ' ' && nspecial > 0) { 
@@ -253,7 +217,7 @@ int gettoken (FILE *input, char *buff, int nmax)
 /* copy special into line buffer for sscanf */
 /* - either double quote delimited - or - up to end of special */
 
-int scanspecial (FILE *input, char *buff, int nmax)
+int scan_special (FILE *input, char *buff, int nmax)
 {
   int c, k=0;
   char *s=buff;
@@ -278,7 +242,7 @@ int scanspecial (FILE *input, char *buff, int nmax)
       if (k >= nmax) {
 /*        showbeginning(errout, buff, nmax/2); */
 /*        errcount(0); */ /* ??? */
-        flushspecial(input);
+        flush_special(input);
         return nmax;
       }
       *s++ = (char) c;
@@ -293,7 +257,7 @@ int scanspecial (FILE *input, char *buff, int nmax)
       if (k >= nmax) {
 /*        showbeginning(errout, buff, nmax/2); */
 /*        errcount(0); */ /* ??? */
-        flushspecial(input);
+        flush_special(input);
         return nmax;
       }
       *s++ = (char) c;
@@ -306,7 +270,7 @@ int scanspecial (FILE *input, char *buff, int nmax)
 
 /* As above, but do not fiddle with "..." 97/Nov/11 needed for "mark" */
 
-int scanspecialraw (FILE *input, char *buff, int nmax)
+int scan_special_raw (FILE *input, char *buff, int nmax)
 {
   int c, k=0;
   char *s=buff;
@@ -330,7 +294,7 @@ int scanspecialraw (FILE *input, char *buff, int nmax)
     if (k >= nmax) {
 /*      showbeginning(errout, buff, nmax/2); */
 /*      errcount(0); */ /* ??? */
-      flushspecial(input);
+      flush_special(input);
       return nmax;
     }
     *s++ = (char) c;
@@ -342,10 +306,10 @@ int scanspecialraw (FILE *input, char *buff, int nmax)
 }
 
 /* read (short) double-quote-delimited string from special string */
-/* possibly just use scanspecial or gettoken instead ? */
+/* possibly just use scan_special or get_token instead ? */
 /* return value seems to be mostly ignored */
 
-int getstring (FILE *input, char *buff, int nmax)
+int get_string (FILE *input, char *buff, int nmax)
 {
   int c, k = 0;
   char *s=buff;
@@ -380,7 +344,7 @@ int getstring (FILE *input, char *buff, int nmax)
 }
 
 /* skip forward to comma in special string */
-void skiptocomma(FILE *input)
+void skip_to_comma(FILE *input)
 {
   int c;
   if (nspecial <= 0) return;
@@ -391,7 +355,7 @@ void skiptocomma(FILE *input)
 }
   
 /* skip over double-quote-delimited string in special string */
-void flushstring (FILE *input)
+void flush_string (FILE *input)
 {
   int c;
   if (nspecial <= 0) return;
@@ -411,10 +375,10 @@ void flushstring (FILE *input)
 /* - otherwise copy to end of special */
 
 /* This skips over leading white space */
-/* copystring starts by emitting '\n' */
-/* copystring ends by emitting '\n' when it is done */
+/* copy_string starts by emitting '\n' */
+/* copy_string ends by emitting '\n' when it is done */
 
-void copystring (FILE *output, FILE *input)
+void copy_string (FILE *output, FILE *input)
 {
   int c;
   int column=0;
@@ -505,7 +469,7 @@ void copystring (FILE *output, FILE *input)
 /* copy verbatim PostScript - but strip bracket enclosed crap first */
 /* global | local | inline | asis | begin | end <user PS> ??? */
  
-void stripbracket (FILE *output, FILE *input)
+void strip_bracket (FILE *output, FILE *input)
 {
   int c;
 
@@ -522,7 +486,7 @@ void stripbracket (FILE *output, FILE *input)
     nspecial++;
   }
 /*  putc('\n', output);  */ /* 94/Jun/25 */
-  copystring(output, input); 
+  copy_string(output, input); 
 /*  putc('\n', output);   */    /* 1993/June/3 */
 }
 
@@ -534,7 +498,7 @@ void stripbracket (FILE *output, FILE *input)
 /* try and find bbox at end of file */
 /* the following may inefficiently read stuff several times, but, so what */ 
 
-int findbboxatend (FILE *special, char *fname, long pslength)
+int find_bbox_at_end (FILE *special, char *fname, long pslength)
 {
   int k, foundit = 0;
 
@@ -574,7 +538,7 @@ int skiphpjunkathead (FILE *, int);
 
 /* extract bounding box from inserted eps file and offset */
 
-int readbbox (FILE *special, char *fname, long pslength)
+int read_bbox (FILE *special, char *fname, long pslength)
 {
   char *s;
   int c, k;
@@ -617,7 +581,7 @@ int readbbox (FILE *special, char *fname, long pslength)
 /*      if (strstr(line, "(at end)") != NULL) */ /* BoundingBox at end */
       if (strstr(line, "(atend)") != NULL ||
         strstr(line, "(at end)") != NULL)   /* 94/Aug/12 */
-        k = findbboxatend(special, fname, pslength);
+        k = find_bbox_at_end(special, fname, pslength);
       break;
     }
     if ((k = getline(special, line)) == 0) break;   /* EOF */
@@ -652,9 +616,9 @@ int readbbox (FILE *special, char *fname, long pslength)
 /* if needshift < 0 then (xll, yur) is at TeX's current point  */
 /* - last one only used by DVIALW ? */
 
-void dealwithbbox (FILE *output, FILE *special, char *fname, long pslength, int needshift)
+void deal_with_bbox (FILE *output, FILE *special, char *fname, long pslength, int needshift)
 {
-  if (readbbox(special, fname, pslength) > 0) {
+  if (read_bbox(special, fname, pslength) > 0) {
 /*    now perform shift - if asked for it */
     if (needshift > 0) {
 //      fprintf(output, "%lg %lg translate ", -xll, -yll); 
@@ -730,8 +694,7 @@ int FindFileName (char *fontname, char *filename) /* experiment 94/Aug/15 */
 
 /* Emits on stdout the font file name (minus trailing _) unless mmflag set */
 
-char *fopenfont_sub (FILE *atmfile, char *FontName, char *pfbname,
-           int atmflag, int mmflag)
+char *fopenfont_sub (FILE *atmfile, char *FontName, char *pfbname, int atmflag, int mmflag)
 {
 /*  FILE *atmfile; */
 /*  char atmini[FNAMELEN]; */
@@ -886,42 +849,51 @@ char *fopenfont_sub (FILE *atmfile, char *FontName, char *pfbname,
 /* maybe don't look along PSFONTS path if pfbname contains \ or / ? */
 /* changed to look in current directory first 98/Jul/20 */
 
-FILE *findpfbfile (char *pfbname, char *FileName) /* 1994/Aug/18 */
+FILE * find_pfb_file (char *pfbname, char *FileName)
 {
   FILE *pfbfile;
-  char filename[FNAMELEN];      /* used for PFB file name ? */
+  char filename[FNAMELEN]; /* used for PFB file name ? */
 
   strcpy(filename, pfbname);
   extension(filename, "pfb");
 
-  if ((pfbfile = fopen(filename, "rb")) != NULL) {
-    strcpy (FileName, filename);  /* 1994/Feb/10 */
-    return pfbfile;       /* we found it */
+  if ((pfbfile = fopen(filename, "rb")) != NULL)
+  {
+    strcpy (FileName, filename);
+    return pfbfile;
   }
-/*  not found as given */
-  if (fontpath == NULL) return NULL;
-  if (traceflag) showline(fontpath, 0); /* debugging only */
-/*  pfbfile = findandopen(filename, fontpath, NULL, "rb", 0); */
+
+  if (fontpath == NULL)
+    return NULL;
+
+  if (traceflag)
+    showline(fontpath, 0);
+
   pfbfile = findandopen(filename, fontpath, NULL, "rb", currentfirst);
-  if (pfbfile != NULL) {
+
+  if (pfbfile != NULL)
+  {
     strcpy(FileName, filename);
     return pfbfile;
   }
-/*  underscore(filename); */    /* OK, try now with underscores */
-  if (underscore(filename)) {   /* 95/May/28 */
-/*    pfbfile = findandopen(filename, fontpath, NULL, "rb", 0); */
+
+  if (underscore(filename))
+  {
     pfbfile = findandopen(filename, fontpath, NULL, "rb", currentfirst);
-    if (pfbfile != NULL) {
+
+    if (pfbfile != NULL)
+    {
       strcpy(FileName, filename);
       return pfbfile;
     }
   }
-  return NULL;        /* PFB not found in any of the directories */
+
+  return NULL;
 }
 
 #else
 
-FILE *findpfbfile (char *pfbname, char *FileName)
+FILE *find_pfb_file (char *pfbname, char *FileName)
 {
   FILE *pfbfile;
   char *searchpath;
@@ -966,7 +938,7 @@ FILE *findpfbfile (char *pfbname, char *FileName)
 
 /* find the atmfonts.map file and get its full path */
 
-int setupatmfontsmap (void)
+int setup_atm_fonts_map (void)
 {
   FILE *atmfile=NULL;
   char atmfilename[FNAMELEN];
@@ -1056,14 +1028,14 @@ FILE *fopenfont (char *FontName, char *FileName, int mmflag)
       strcpy(FileName, pfbfilename);
       return NULL;
     }     /* special case - font is resident ??? 98/Jan/9 */
-    pfbfile = findpfbfile(pfbfilename, FileName); /* look for PFB file */
+    pfbfile = find_pfb_file(pfbfilename, FileName); /* look for PFB file */
     return pfbfile;     /* NULL if not found */
   }
 
   if (traceflag) showline(" STAGE II", 1);  /* debugging 95/May/25 */
 /*  Stage II Stage II Stage II Stage II Stage II Stage II Stage II Stage II */
 /*  Try and use ATMFONTS.MAP */
-  if (useatmfontsmap) setupatmfontsmap();
+  if (useatmfontsmap) setup_atm_fonts_map();
 
   if ((atmfile = fopen(atmfontsmap, "r")) != NULL) {
 /*  try and find line `FontName=<pfb-file>' - PFB name return in pfbfilename */
@@ -1075,7 +1047,7 @@ FILE *fopenfont (char *FontName, char *FileName, int mmflag)
     if (s != NULL)  {         /* found in this file ? */
       if (strcmp(s, "nul") == 0)    /* special case 1994/Feb/17 */
         return NULL;        /* *resident* ??? */
-      pfbfile = findpfbfile(pfbfilename, FileName);
+      pfbfile = find_pfb_file(pfbfilename, FileName);
       return pfbfile;         /* NULL if not found */
     }     /* end of pfb file name found in ATMFONTS.MAP */
   }
@@ -1138,7 +1110,7 @@ FILE *fopenfont (char *FontName, char *FileName, int mmflag)
 /*  Works for CM, AMS, EM, extra LaTeX, MathTime */
 
   strcpy(pfbfilename, FontName);
-  pfbfile = findpfbfile(pfbfilename, FileName); /* look for PFB file */
+  pfbfile = find_pfb_file(pfbfilename, FileName); /* look for PFB file */
   if (pfbfile != NULL) return pfbfile;
 
   return NULL;          /* entry not found in ATM.INI either */
@@ -1406,7 +1378,7 @@ void copyepsfilesub (FILE *output, FILE *special, long pslength)
   int plainpsflag=0;
 
   if (! bPassEPSF) {        /* 1994/Mar/9 */
-    flushspecial(special);
+    flush_special(special);
     return;
   }
 
@@ -1783,7 +1755,7 @@ int copyepsfilesimple (FILE *output, FILE *special, long pslength)
   int c;
 
   if (! bPassEPSF) {        /* 1994/Mar/9 */
-    flushspecial(special);
+    flush_special(special);
     return 0;
   }
 
@@ -2066,7 +2038,7 @@ int setupbbox(char *epsfilename) {
 
   if((special = findepsfile(epsfilename, "eps", 0, 0)) == NULL) return 0;
   pslength = checkpcform(special, epsfilename);
-  readbbox(special, epsfilename, pslength);
+  read_bbox(special, epsfilename, pslength);
   fclose(special);
 } */
 
@@ -2092,7 +2064,7 @@ void copyepsfile (FILE *output, char *epsfilename, int inclflag, int needshift)
 /*    fprintf(output, "undscl ");  */ /* currentpoint translate ? */
     if (needshift) {
       pslength =  checkpcform(special, filename);   
-      dealwithbbox(output, special, filename, pslength, needshift);
+      deal_with_bbox(output, special, filename, pslength, needshift);
 /*      rewind(special);  */
     }
   }
@@ -2151,13 +2123,13 @@ void endspecial (FILE *output)
 
 #define MAXCOMPLAIN 127
 
-void complainspecial (FILE *input) /* list contents and do flushspecial */
+void complainspecial (FILE *input) /* list contents and do flush_special */
 {
   int c, k=0;
 /*  long specnow; */
 
   if (quietflag != 0) {     /* easy if output suppressed */
-    flushspecial(input); return;
+    flush_special(input); return;
   }
 /*  specnow = ftell(input); */      /* save current position */
 
@@ -2198,7 +2170,7 @@ void complainjflag (FILE *input)          /* 1993/Oct/17 */
 /*  if (complainedaboutj++ > 0) return; */
   if (complainedaboutj++ == 0) 
     showline(" WARNING: verbatim PS - use `j' flag?", 1);
-  if (nspecial > 0) flushspecial(input);      /* 1999/Mar/18 */
+  if (nspecial > 0) flush_special(input);      /* 1999/Mar/18 */
 }
 
 /* Textures style include eps file */ /* added "scaled <double>" ? */
@@ -2210,19 +2182,19 @@ void readtextures (FILE *output, FILE *input) /* Texture style special ? */
   double scale=1.0;
   char epsname[MAXLINE]="";
 
-/*  c = gettoken(input, line, MAXLINE); */
-  c = gettoken(input, line, sizeof(line));  /* MAXLINE */
+/*  c = get_token(input, line, MAXLINE); */
+  c = get_token(input, line, sizeof(line));  /* MAXLINE */
 
   colontoslash(epsname, line);  /* deal with Mac font names */
 
   startspecial(output); 
   if (c > 0 && nspecial > 0) { /* anything left in special ? */
 /*     read next token, see whether perhaps `scaled' or `clip' */
-/*    (void) gettoken(input, line, MAXLINE); */
-    (void) gettoken(input, line, sizeof(line)); /* MAXLINE */
+/*    (void) get_token(input, line, MAXLINE); */
+    (void) get_token(input, line, sizeof(line)); /* MAXLINE */
     if (strcmp(line, "scaled") == 0) {
-/*      (void) gettoken(input, line, MAXLINE); */
-      (void) gettoken(input, line, sizeof(line)); /* MAXLINE */
+/*      (void) get_token(input, line, MAXLINE); */
+      (void) get_token(input, line, sizeof(line)); /* MAXLINE */
       if(sscanf(line, "%lg", &scale) > 0) {
 /*        printf(" SCALE %lg ", scale); */
         if (scale > 33.333) scale = scale/1000.0;
@@ -2231,8 +2203,8 @@ void readtextures (FILE *output, FILE *input) /* Texture style special ? */
       }
 /*      else {  } */ /* error, can't read the scale */
 /*       read next token, see whether perhaps `clip' */
-/*      if (nspecial > 0) (void) gettoken(input, line, MAXLINE); */
-      if (nspecial > 0) (void) gettoken(input, line, sizeof(line));
+/*      if (nspecial > 0) (void) get_token(input, line, MAXLINE); */
+      if (nspecial > 0) (void) get_token(input, line, sizeof(line));
     }
     if (strcmp(line, "clip") == 0) clipflag = 1;  /* 1995/July/12 */
   }
@@ -2248,7 +2220,7 @@ void readtextures (FILE *output, FILE *input) /* Texture style special ? */
     if ((special = findepsfile(epsname, "eps", 1, 1)) != NULL) {
       xll = yll = xur = yur = 0.0;
       pslength = checkpcform(special, epsname);
-      if (readbbox(special, epsname, pslength) == 0) {
+      if (read_bbox(special, epsname, pslength) == 0) {
         sprintf(logline, "BoundingBox not found in %s ", epsname);
         showline(logline, 1);
       }
@@ -2272,7 +2244,7 @@ void readtextures (FILE *output, FILE *input) /* Texture style special ? */
   } /* end of clipflag code introduced 95/July/12 */
   copyepsfile(output, epsname, 1, 1);   /* include and shift */
   endspecial(output);
-  flushspecial(input);          /* flush whatever is left */
+  flush_special(input);          /* flush whatever is left */
 } 
 
 /* Textures style "postscript" - direct inclusion of PostScript code */
@@ -2292,8 +2264,8 @@ void copypostscript (FILE *output, FILE *input, int rawflag) /* 1994/July/4 */
 //    fputs("gsave undsclx ", output);
     PSputs("gsave undsclx ", output);
   }
-/*  copystring now inserts a `\n' here */   /* 1994/June/25 */
-  copystring(output, input);
+/*  copy_string now inserts a `\n' here */   /* 1994/June/25 */
+  copy_string(output, input);
 /*  putc('\n', output); */        /* 93/June/3 */
 /*  if (sebastianflag) putc('\n', output); else */
   if (rawflag == 0) {           /* 94/July/3 */
@@ -2315,12 +2287,12 @@ void readpostscript (FILE *output, FILE *input, int rawflag) /* 1994/July/5 */
   double scale=1.0;
   char epsname[FNAMELEN]="";
   
-/*  (void) gettoken(input, epsname, FNAMELEN); */
-  (void) gettoken(input, epsname, sizeof(epsname)); /* FNAMELEN */
-/*  if (gettoken(input, line, MAXLINE) != 0 && */
-  if (gettoken(input, line, sizeof(line)) != 0 &&
+/*  (void) get_token(input, epsname, FNAMELEN); */
+  (void) get_token(input, epsname, sizeof(epsname)); /* FNAMELEN */
+/*  if (get_token(input, line, MAXLINE) != 0 && */
+  if (get_token(input, line, sizeof(line)) != 0 &&
     strcmp(line, "scaled") == 0 &&
-      gettoken(input, line, sizeof(line)) != 0 &&
+      get_token(input, line, sizeof(line)) != 0 &&
         sscanf(line, "%lg", &scale) > 0) {
   }
 /*  fprintf(output, "\nsb "); */
@@ -2365,14 +2337,14 @@ int readandrew (FILE *output, FILE *input)
 
   fseek(input, specstart, SEEK_SET);  /* start over again */
   nspecial = nspecialsav;       /* restore length */
-/*  if (gettoken(input, epsfilename, FNAMELEN) == 0) { */
-  if (gettoken(input, epsfilename, sizeof(epsfilename)) == 0) { /* FNAMELEN */
-    flushspecial(input);
+/*  if (get_token(input, epsfilename, FNAMELEN) == 0) { */
+  if (get_token(input, epsfilename, sizeof(epsfilename)) == 0) { /* FNAMELEN */
+    flush_special(input);
     return 0;       /* fail, no token following */
   }
 /*  if ((special = findepsfile(epsfilename, 0, "eps")) == NULL) { */
   if ((special = findepsfile(epsfilename, "eps", 0, 0)) == NULL) {
-    flushspecial(input);
+    flush_special(input);
     if (traceflag) {      /* debug output 95/July/15 */
       sprintf(logline, " can't find %s, or unknown \\special ",
           epsfilename); /* 95/June/21 */
@@ -2384,10 +2356,10 @@ int readandrew (FILE *output, FILE *input)
   startspecial(output);
 /*  fprintf(output, "undscl "); */    /* currentpoint translate ? */
 /*  pslength = checkpcform(special, filename);     */
-/*  dealwithbbox(output, special, filename, pslength, 1); */ 
+/*  deal_with_bbox(output, special, filename, pslength, 1); */ 
 /* -1, 0, or +1 ? */
 /*  putc('\n', output); */      /* 1994/June/25 */
-  copystring(output, input);    /* copy rest of special */
+  copy_string(output, input);    /* copy rest of special */
 /*  putc('\n', output); */      /* 1993/June/3 */
 /*  copyepsfile(output, epsfilename, 1, 0);  */
 /*  copyepsfile(output, epsfilename, 0, 0);   */
@@ -2411,13 +2383,13 @@ int readdvialw (FILE *output, FILE *input)
 
   while (nspecial > 0) {    /* gather up information first */
 /*    if (firsttime != 0) firsttime = 0; 
-    else if (getalphatoken(input, line, MAXLINE) == 0) break; */
+    else if (get_alpha_token(input, line, MAXLINE) == 0) break; */
     if (firsttime == 0)
-/*      if (getalphatoken(input, line, MAXLINE) == 0) break;  */
-      if (getalphatoken(input, line, sizeof(line)) == 0) break; 
+/*      if (get_alpha_token(input, line, MAXLINE) == 0) break;  */
+      if (get_alpha_token(input, line, sizeof(line)) == 0) break; 
     if (strcmp(line, "language") == 0) { 
 /*      strcmp(line, "LANGUAGE") == 0) { */
-      (void) getstring(input, line, MAXLINE);
+      (void) get_string(input, line, MAXLINE);
       if (strcmp(line, "PS") == 0 ||
         strcmp(line, "PostScript") == 0) {
         /* we like PS, so no need to do anything ! */
@@ -2429,25 +2401,25 @@ int readdvialw (FILE *output, FILE *input)
     }
     else if (strcmp(line, "include") == 0) {
 /*           || strcmp(line, "INCLUDE") == 0) { */
-      (void) getstring(input, epsfilename, FNAMELEN);
+      (void) get_string(input, epsfilename, FNAMELEN);
       includeflag = 1; fileflag = 1;
     }
     else if (strcmp(line, "overlay") == 0) {
 /*        || strcmp(line, "OVERLAY") == 0 ) { */
-      (void) getstring(input, epsfilename, FNAMELEN);
+      (void) get_string(input, epsfilename, FNAMELEN);
       includeflag = 0;  fileflag = 1;
     }
     else if (strcmp(line, "literal") == 0) {
 /*        || strcmp(line, "LITERAL") == 0) { */
       flitpos = ftell(input);   /* remember where this was */
       nliteral = nspecial;
-/*      copystring(output, input); */
+/*      copy_string(output, input); */
     }
 /*    GRAPHICS and OPTIONS not yet defined - so flag as errors */   
     else if (strcmp(line, "boundingbox") == 0) {
 /*  actually, this may involve TeX dimensions, see decodeunits? */
 /*  - that seems truly bizarre, so ignore that possibility */
-      (void) getstring(input, line, MAXLINE);
+      (void) get_string(input, line, MAXLINE);
       if (sscanf(line, "%lg %lg %lg %lg", &xll, &yll, &xur, &yur) == 4)
 /*  this should override bounding box in eps file if given */
         bboxflag = 1;
@@ -2459,7 +2431,7 @@ int readdvialw (FILE *output, FILE *input)
       }
     }
     else if (strcmp(line, "message") == 0) {
-      (void) getstring(input, line, MAXLINE);
+      (void) get_string(input, line, MAXLINE);
 /*      printf("%s\n", line); */
 /*      putc(' ', stdout); */   /* 93/June/3 */
       showline(" ", 0);
@@ -2476,10 +2448,10 @@ int readdvialw (FILE *output, FILE *input)
           " Unrecognized \\special keyword: %s ", line);
         showline(logline, 1);
       }
-      flushstring(input); /*  errcount(0);  */
+      flush_string(input); /*  errcount(0);  */
     }
     if (nspecial == 0) break;
-    else skiptocomma(input);  /* look for next key value pair */
+    else skip_to_comma(input);  /* look for next key value pair */
     if (firsttime != 0) firsttime = 0; 
   }
   
@@ -2514,7 +2486,7 @@ int readdvialw (FILE *output, FILE *input)
     fseek(input, flitpos, SEEK_SET);  /* go back to where literal was */
     nspecial = nliteral;        /* reset nspecial */
 /*    putc('\n', output); */      /* 1994/June/25 */
-    copystring(output, input);
+    copy_string(output, input);
 /*    putc('\n', output); */        /* 1993/June/3 */
     fseek(input, fendspec, SEEK_SET); /* back to end of special */
     nspecial = 0;
@@ -2616,7 +2588,7 @@ void rescaletexfig (char *line)
 void cantfind (FILE *input, char *s, char *line) { /* complain about missing field */
   sprintf(logline, " Can't find `%s' (in `%s') ", s, line);
   showline(logline, 1);
-  flushspecial(input);
+  flush_special(input);
   errcount(0); 
 }
 
@@ -2686,17 +2658,17 @@ int readdvi2ps (FILE *output, FILE *input)
 
   while (nspecial > 0) {    /* gather up parameters */
     if (firsttime != 0) firsttime = 0;
-/*    else if (getalphatoken(input, line, MAXLINE) == 0) break; */
-    else if (getalphatoken(input, line, sizeof(line)) == 0) break;
+/*    else if (get_alpha_token(input, line, MAXLINE) == 0) break; */
+    else if (get_alpha_token(input, line, sizeof(line)) == 0) break;
 /*    deal with new PSFIG DVI2PS style useage */
     if (strcmp(line, "pstext") == 0) {
 /*      ||  strcmp(line, "PSTEXT") == 0) { */
-      if (scanspecial(input, line, MAXLINE) == MAXLINE) {
+      if (scan_special(input, line, MAXLINE) == MAXLINE) {
         if (verbatimflag) {       /* long pstext= verbatim */
           fseek(input, fliteral, SEEK_SET);
           nspecial = nliteral;
-/*          copystring now emits '\n' here */   /* 1994/June/25 */
-          copystring(output, input);  /* revscl - forscl PSTEXT */
+/*          copy_string now emits '\n' here */   /* 1994/June/25 */
+          copy_string(output, input);  /* revscl - forscl PSTEXT */
 /*          putc('\n', output); */    /* 1993/June/3 */
         }
         else complainspecial(input); /* TOO DAMN LONG ! */
@@ -2730,7 +2702,7 @@ int readdvi2ps (FILE *output, FILE *input)
       else if (verbatimflag) verbout(output, line); 
       else complainjflag(input);    /* 1993/Oct/17 */
 /*      else complainspecial(input); */
-      flushspecial(input);    /* ignore the rest */
+      flush_special(input);    /* ignore the rest */
     } /* end of PSTEXT= code */
 /*    kludge to allow insertion of header information - NO PROTECTION ! */
     else if (_strcmpi(line, "header") == 0 ||
@@ -2742,7 +2714,7 @@ int readdvi2ps (FILE *output, FILE *input)
          strcmp(line, "DVIWindo") == 0      /* 99/Sep/6 */
         ) {
 /*    ignore now, already taken care of in dvipslog ! */
-        flushspecial(input);  /* taken care of in dvipslog */
+        flush_special(input);  /* taken care of in dvipslog */
     }
 /*    kludge to change to PS default coordinates - NO PROTECTION ! */
     else if (strcmp(line, "verbatim") == 0 
@@ -2751,105 +2723,105 @@ int readdvi2ps (FILE *output, FILE *input)
       PSputc('\n', output);       // always on new line ?
       PSputs("revsclx ", output);
       if (preservefont) PSputs("currentfont ", output);
-      copystring(output, input);
+      copy_string(output, input);
       if (preservefont) PSputs("setfont ", output);
       PSputs("forsclx ", output);
     }
 /*    deal with old PSFIG DVI2PS style useage - case sensitive */
     else if (strcmp(line, "psfile") == 0) {
-/*      if (gettoken(input, epsfilename, MAXFILENAME) == 0) */
-      if (gettoken(input, epsfilename, sizeof(epsfilename)) == 0) /* FNAMELEN */
+/*      if (get_token(input, epsfilename, MAXFILENAME) == 0) */
+      if (get_token(input, epsfilename, sizeof(epsfilename)) == 0) /* FNAMELEN */
         cantfind(input, line, epsfilename);
       else psepsfstyle=0;
     }
     else if (strcmp(line, "hsize") == 0) {
-/*      if (gettoken(input, line, MAXLINE) == 0 || */
-      if (gettoken(input, moreline, sizeof(moreline)) == 0 ||
+/*      if (get_token(input, line, MAXLINE) == 0 || */
+      if (get_token(input, moreline, sizeof(moreline)) == 0 ||
         sscanf(line, "%lg", &hsize) == 0) 
           cantfind(input, line, moreline);
       else psepsfstyle=0;
     }
     else if (strcmp(line, "vsize") == 0) {
-/*      if (gettoken(input, line, MAXLINE) == 0 || */
-      if (gettoken(input, moreline, sizeof(moreline)) == 0 ||
+/*      if (get_token(input, line, MAXLINE) == 0 || */
+      if (get_token(input, moreline, sizeof(moreline)) == 0 ||
         sscanf(line, "%lg", &vsize) == 0) 
           cantfind(input, line, moreline);
       else psepsfstyle=0;
     }
     else if (strcmp(line, "hoffset") == 0) {
-/*      if (gettoken(input, line, MAXLINE) == 0 || */
-      if (gettoken(input, moreline, sizeof(moreline)) == 0 ||
+/*      if (get_token(input, line, MAXLINE) == 0 || */
+      if (get_token(input, moreline, sizeof(moreline)) == 0 ||
         sscanf(line, "%lg", &hoffset) == 0) 
           cantfind(input, line, moreline);
       else psepsfstyle=0;
     }
     else if (strcmp(line, "voffset") == 0) {
-/*      if (gettoken(input, line, MAXLINE) == 0 || */
-      if (gettoken(input, moreline, sizeof(moreline)) == 0 ||
+/*      if (get_token(input, line, MAXLINE) == 0 || */
+      if (get_token(input, moreline, sizeof(moreline)) == 0 ||
         sscanf(line, "%lg", &voffset) == 0) 
           cantfind(input, line, moreline);
       else psepsfstyle=0;
     }
     else if (strcmp(line, "hscale") == 0) {
-/*      if (gettoken(input, line, MAXLINE) == 0 || */
-      if (gettoken(input, moreline, sizeof(moreline)) == 0 ||
+/*      if (get_token(input, line, MAXLINE) == 0 || */
+      if (get_token(input, moreline, sizeof(moreline)) == 0 ||
         sscanf(line, "%lg", &hscale) == 0) 
           cantfind(input, line, moreline);
       else psepsfstyle=0;
     }
     else if (strcmp(line, "vscale") == 0) {
-/*      if (gettoken(input, line, MAXLINE) == 0 || */
-      if (gettoken(input, moreline, sizeof(moreline)) == 0 ||
+/*      if (get_token(input, line, MAXLINE) == 0 || */
+      if (get_token(input, moreline, sizeof(moreline)) == 0 ||
           sscanf(line, "%lg", &vscale) == 0) 
         cantfind(input, line, moreline);
       else psepsfstyle=0;
     }
     else if (strcmp(line, "rotation") == 0
         || strcmp(line, "angle") == 0) {
-/*      if (gettoken(input, line, MAXLINE) == 0 || */
-      if (gettoken(input, moreline, sizeof(moreline)) == 0 ||
+/*      if (get_token(input, line, MAXLINE) == 0 || */
+      if (get_token(input, moreline, sizeof(moreline)) == 0 ||
         sscanf(line, "%lg", &rotation) == 0) 
           cantfind(input, line, moreline);
       else psepsfstyle=0;
     }
 /* Now for Rokicki EPSF.TEX style --- case sensitive */
     else if (strcmp(line, "PSfile") == 0) { /* EPSF style - note uc/lc */
-/*      if (gettoken(input, epsfilename, MAXFILENAME) == 0)  */
-      if (gettoken(input, epsfilename, sizeof(epsfilename)) == 0) 
+/*      if (get_token(input, epsfilename, MAXFILENAME) == 0)  */
+      if (get_token(input, epsfilename, sizeof(epsfilename)) == 0) 
         cantfind(input, line, moreline);
       else psepsfstyle=1;
     }
     else if (strcmp(line, "llx") == 0) {
-/*      if (gettoken(input, line, MAXLINE) == 0 || */
-      if (gettoken(input, moreline, sizeof(moreline)) == 0 ||
+/*      if (get_token(input, line, MAXLINE) == 0 || */
+      if (get_token(input, moreline, sizeof(moreline)) == 0 ||
         sscanf(line, "%lg", &xll) == 0) 
           cantfind(input, line, moreline);
       else psepsfstyle=1;
     }
     else if (strcmp(line, "lly") == 0) {
-/*      if (gettoken(input, line, MAXLINE) == 0 || */
-      if (gettoken(input, moreline, sizeof(moreline)) == 0 ||
+/*      if (get_token(input, line, MAXLINE) == 0 || */
+      if (get_token(input, moreline, sizeof(moreline)) == 0 ||
         sscanf(line, "%lg", &yll) == 0) 
           cantfind(input, line, moreline);
       else psepsfstyle=1;
     }
     else if (strcmp(line, "urx") == 0) {
-/*      if (gettoken(input, line, MAXLINE) == 0 || */
-      if (gettoken(input, moreline, sizeof(moreline)) == 0 ||
+/*      if (get_token(input, line, MAXLINE) == 0 || */
+      if (get_token(input, moreline, sizeof(moreline)) == 0 ||
         sscanf(line, "%lg", &xur) == 0) 
           cantfind(input, line, moreline);
       else psepsfstyle=1;
     }
     else if (strcmp(line, "ury") == 0) {
-/*      if (gettoken(input, line, MAXLINE) == 0 || */
-      if (gettoken(input, moreline, sizeof(moreline)) == 0 ||
+/*      if (get_token(input, line, MAXLINE) == 0 || */
+      if (get_token(input, moreline, sizeof(moreline)) == 0 ||
         sscanf(line, "%lg", &yur) == 0) 
           cantfind(input, line, moreline);
       else psepsfstyle=1;
     }
     else if (strcmp(line, "rwi") == 0) {
-/*      if (gettoken(input, line, MAXLINE) == 0 || */
-      if (gettoken(input, moreline, sizeof(moreline)) == 0 ||
+/*      if (get_token(input, line, MAXLINE) == 0 || */
+      if (get_token(input, moreline, sizeof(moreline)) == 0 ||
         sscanf(line, "%lg", &rwi) == 0) 
           cantfind(input, line, moreline);
       else psepsfstyle=1;
@@ -2857,8 +2829,8 @@ int readdvi2ps (FILE *output, FILE *input)
 /*    else if (strcmp(line, "rhe") == 0) { */   /* ??? */
     else if (strcmp(line, "rhe") == 0 ||
            strcmp(line, "rhi") == 0) {    /* 1994/Mar/1 */
-/*      if (gettoken(input, line, MAXLINE) == 0 || */
-      if (gettoken(input, moreline, sizeof(moreline)) == 0 ||
+/*      if (get_token(input, line, MAXLINE) == 0 || */
+      if (get_token(input, moreline, sizeof(moreline)) == 0 ||
         sscanf(line, "%lg", &rhe) == 0) 
           cantfind(input, line, moreline);
       else psepsfstyle=1;
@@ -2918,7 +2890,7 @@ int readdvi2ps (FILE *output, FILE *input)
     }
     copyepsfile(output, epsfilename, 0, 0);
     endspecial(output);
-    flushspecial(input);
+    flush_special(input);
   }
 /*  NOW old UNIX DVI2PS (psadobe) ? */
   else {
@@ -2957,7 +2929,7 @@ int readdvi2ps (FILE *output, FILE *input)
 /*    the above needs testing ? */
     endspecial(output);   
   }
-  flushspecial(input);    /* ignore the rest ? */
+  flush_special(input);    /* ignore the rest ? */
   if (abortflag) return -1;
   else return 0;
 }
@@ -3127,8 +3099,8 @@ void doColor (FILE *output, FILE *input, int c, int outflag)  /* 95/Mar/1 */
   s = line + strlen(line);
   *s++ = (char) c;            /* stick in terminator */
   *s = '\0';                /* just in case */
-/*  (void) scanspecial(input, s, MAXLINE); */     /* read rest of line ? */
-  (void) scanspecial(input, line, MAXLINE);   /* read rest of line */
+/*  (void) scan_special(input, s, MAXLINE); */     /* read rest of line ? */
+  (void) scan_special(input, line, MAXLINE);   /* read rest of line */
   if (traceflag) {
     sprintf(logline, "\n(index %d outflag %d) %s ", colorindex, outflag, line); /* debugging */
     showline(logline, 0);
@@ -3400,7 +3372,7 @@ void doCTM (FILE *output, FILE *input)  /* \special{CTM: } 96/Oct/10 */
   int n, flag;
   double dx, dy, sx, sy, theta, m11, m12, m21, m22, m31, m32;
 
-  (void) scanspecial(input, line, MAXLINE); /* read rest of line */
+  (void) scan_special(input, line, MAXLINE); /* read rest of line */
   s = line;
 //  putc('\n', output);           /* separate from previous */
   PSputc('\n', output);           /* separate from previous */
@@ -3492,7 +3464,7 @@ void doCTM (FILE *output, FILE *input)  /* \special{CTM: } 96/Oct/10 */
     s += n;               /* step over arguments */
   }
 /*  putc('\n', output); */          /* separate from following */
-  flushspecial(input);
+  flush_special(input);
 }
 #endif
 
@@ -3549,7 +3521,7 @@ void doClipBox (FILE *output, FILE *input, int c) /* 98/Sep/8 */
   int n, flag, subtract, stroke;
 
 /*  if (c == '*') subtract=1; */    /* subtract rather than intersect */
-  (void) scanspecial(input, line, MAXLINE);   /* read rest of line */
+  (void) scan_special(input, line, MAXLINE);   /* read rest of line */
   s = line;
 /*  printf("LINE: %s\n", line); */
 /*  while (*s != ' ' && *s != '\0') s++; */
@@ -3664,23 +3636,23 @@ int readdvitops (FILE *output, FILE *input, int pctexflag)
   FILE *special;
 
   if (pctexflag == 0) { /* if dvitops: check "import" next */
-/*    if (getalphatoken(input, line, MAXLINE) == 0) */
-    if (getalphatoken(input, line, sizeof(line)) == 0) {
+/*    if (get_alpha_token(input, line, MAXLINE) == 0) */
+    if (get_alpha_token(input, line, sizeof(line)) == 0) {
       complainspecial(input);
       return -1;
     }
   }
 /*  if (strcmp(line, "import") == 0) */
   if (pctexflag || strcmp(line, "import") == 0) {
-/*    if(gettoken(input, epsfilename, FNAMELEN) == 0) */
-    if(gettoken(input, epsfilename, sizeof(epsfilename)) == 0) {  /* FNAMELEN */
+/*    if(get_token(input, epsfilename, FNAMELEN) == 0) */
+    if(get_token(input, epsfilename, sizeof(epsfilename)) == 0) {  /* FNAMELEN */
       dvitopsmiss();
       errcount(0);
-      flushspecial(input);
+      flush_special(input);
       return -1;
     }
 /*    see if width and height specified in dvitops: import */
-    if (scanspecial(input, line, MAXLINE) == MAXLINE) {
+    if (scan_special(input, line, MAXLINE) == MAXLINE) {
       complainspecial(input); /* TOO DAMN LONG ! */
     }
 /*    scale specified width and height to PS points */
@@ -3713,7 +3685,7 @@ int readdvitops (FILE *output, FILE *input, int pctexflag)
         return -1;
       pslength = checkpcform(special, epsfilename);   /* ??? */
 /*      should failure to read BBox be considered OK here ? */
-      if (readbbox(special, epsfilename, pslength) == 0) {
+      if (read_bbox(special, epsfilename, pslength) == 0) {
 /*        may want to suppress error message ? */
 /*        fprintf(errout, "BBox not found in %s ", epsfilename); */
         sprintf(logline, "BoundingBox not found in %s ", epsfilename);
@@ -3786,7 +3758,7 @@ int readdvitops (FILE *output, FILE *input, int pctexflag)
         PSputs("currentfont ", output); 
       }
 /*      putc('\n', output); */      /* 1994/June/25 */
-      copystring(output, input);  /* just copy what follows ! */
+      copy_string(output, input);  /* just copy what follows ! */
 /*      putc('\n', output); */      /* 1993/June/3 */
 /*      if (preservefont) fprintf(output, "setfont "); */
       if (preservefont) {
@@ -3802,7 +3774,7 @@ int readdvitops (FILE *output, FILE *input, int pctexflag)
     texlandscape(output);         /* 1992/Nov/28 */
   }
   else complainspecial(input);
-  flushspecial(input);
+  flush_special(input);
   if (abortflag) return -1;
   else return 0;
 }
@@ -3828,8 +3800,8 @@ void reademtex (FILE *output, FILE *input)
   char units[3];
   int n;
 
-/*  if (getalphatoken(input, line, MAXLINE) == 0) { */
-  if (getalphatoken(input, line, sizeof(line)) == 0)
+/*  if (get_alpha_token(input, line, MAXLINE) == 0) { */
+  if (get_alpha_token(input, line, sizeof(line)) == 0)
   {
     complainspecial(input);
     return;
@@ -3838,13 +3810,13 @@ void reademtex (FILE *output, FILE *input)
   {
 //    putc(' ', stdout);  
     showline(" ", 0); 
-    (void) scanspecial(input, line, MAXLINE);
+    (void) scan_special(input, line, MAXLINE);
 //    fputs(line, stdout);
 //    PSputs(line, stdout);
     showline(line, 0);
   }
   else if (strcmp(line, "linewidth") == 0) {
-    (void) scanspecial(input, line, MAXLINE);
+    (void) scan_special(input, line, MAXLINE);
     s = line;
     if (sscanf(s, "%lg%n", &linewidth, &n) == 0) {
       showline("linewidth not specified", 1); /* used default */
@@ -3898,40 +3870,40 @@ int readdvitps (FILE *output, FILE *input)
   FILE *special;
 /*  char *s=line; */
   
-/*  if (getalphatoken(input, line, MAXLINE) == 0) {*//* get DVITPS command */
-  if (getalphatoken(input, line, sizeof(line)) == 0) {  /* get DVITPS command */
+/*  if (get_alpha_token(input, line, MAXLINE) == 0) {*//* get DVITPS command */
+  if (get_alpha_token(input, line, sizeof(line)) == 0) {  /* get DVITPS command */
     complainspecial(input);
     return -1;
   }
   if (strcmp(line, "Include1") == 0) {      /* insert figure here */
-/*    if(gettoken(input, epsfilename, FNAMELEN) == 0) {   */
-    if(gettoken(input, epsfilename, sizeof(epsfilename)) == 0) {  
+/*    if(get_token(input, epsfilename, FNAMELEN) == 0) {   */
+    if(get_token(input, epsfilename, sizeof(epsfilename)) == 0) {  
 /*      fputs(" File name missing in DVITPS special ", errout); */
       dvitopsmiss();
       errcount(0);
-      flushspecial(input);
+      flush_special(input);
       return -1;
     }
 /*    see if width and height specified in dvitops: import */
-    if(scanspecial(input, line, MAXLINE) == MAXLINE) {
+    if(scan_special(input, line, MAXLINE) == MAXLINE) {
       complainspecial(input); /* TOO DAMN LONG ! */
     }
 /*    if ((special = findepsfile(epsfilename, 1, "eps")) == NULL) */
     if ((special = findepsfile(epsfilename, "eps", 1, 0)) == NULL)
       return -1;
     pslength = checkpcform(special, epsfilename);   /* ??? */
-/*    if (readbbox(special, epsfilename, pslength) == 0) {
+/*    if (read_bbox(special, epsfilename, pslength) == 0) {
       fprintf(errout, "BoundingBox not found in %s ", epsfilename);
     }  */
     copyepsfileaux(output, special, epsfilename);
     fclose(special);
   }
   else if (strcmp(line, "Include0") == 0) { /* read PS header or such */
-/*    if(gettoken(input, epsfilename, FNAMELEN) == 0) {   */
-    if(gettoken(input, epsfilename, sizeof(epsfilename)) == 0) {  
+/*    if(get_token(input, epsfilename, FNAMELEN) == 0) {   */
+    if(get_token(input, epsfilename, sizeof(epsfilename)) == 0) {  
       dvitopsmiss();
       errcount(0);
-      flushspecial(input);
+      flush_special(input);
       return -1;
     }
 /*    if ((special = findepsfile(epsfilename, 1, "eps")) == NULL) */
@@ -3942,11 +3914,11 @@ int readdvitps (FILE *output, FILE *input)
   }
   else if (strcmp(line, "Literal") == 0) {
 /*    putc('\n', output); */    /* 1994/June/25 */
-    copystring(output, input);  /* just copy what follows ! */
+    copy_string(output, input);  /* just copy what follows ! */
 /*    putc('\n', output); */    /* 1993/June/3 */
   }
   else complainspecial(input);
-  flushspecial(input);
+  flush_special(input);
   if (abortflag) return -1;
   else return 0;
 }
@@ -3966,15 +3938,15 @@ int readdvips (FILE *output, FILE *input)
 
   if (c == ':') {   /* a second colon --- deal with ps:: type command */
 /*  global | local | inline | asis | begin | end <user PS> ??? */
-/*    (void) gettoken(input, line, MAXLINE); */ 
-/*    if (verbatimflag) stripbracket(output, intput);  */
+/*    (void) get_token(input, line, MAXLINE); */ 
+/*    if (verbatimflag) strip_bracket(output, intput);  */
     fliteral = ftell(input);    /* remember where this was */
     nliteral = nspecial;      /* and how many bytes left */
-    if (scanspecial(input, line, MAXLINE) == MAXLINE) {
+    if (scan_special(input, line, MAXLINE) == MAXLINE) {
       if (verbatimflag) {     /* long ps:: type verbatim */
         fseek(input, fliteral, SEEK_SET);
         nspecial = nliteral;
-        stripbracket(output, input);   /* revscl - forscl ??? */
+        strip_bracket(output, input);   /* revscl - forscl ??? */
       }
 /*      complainspecial(input); */      /* TOO DAMN LONG ! */
 /*      else complainspecial(input); */   /* 1993/Jan/23 */
@@ -4016,36 +3988,36 @@ int readdvips (FILE *output, FILE *input)
     else verbout(output, line);   /* 98/Jun/5 */
 /*    verbatim PostScript --- 1993/Aug/15 */
 /*    else complainjflag(input); */ /* 98/Jun/5 */
-    flushspecial(input);  /* flush the rest if any */
+    flush_special(input);  /* flush the rest if any */
   } /* end of code for ps:: case */
   else {    /*  deal with ps: plotfile or ps: overlay etc */
     (void) ungetc(c, input); nspecial++;
     fliteral = ftell(input);    /* remember where this was */
     nliteral = nspecial;      /* 1992/Sep/25 */ 
-/*    if (getalphatoken(input, line, MAXLINE) == 0) { */
-/*    if (bSciWord) flag = gettoken(input, line, MAXLINE); */
-    if (bSciWord) flag = gettoken(input, line, sizeof(line));
-/*    else flag = getalphatoken(input, line, MAXLINE); */
-    else flag = getalphatoken(input, line, sizeof(line));
+/*    if (get_alpha_token(input, line, MAXLINE) == 0) { */
+/*    if (bSciWord) flag = get_token(input, line, MAXLINE); */
+    if (bSciWord) flag = get_token(input, line, sizeof(line));
+/*    else flag = get_alpha_token(input, line, MAXLINE); */
+    else flag = get_alpha_token(input, line, sizeof(line));
     if (flag == 0) {        /* 1994/Apr/22 */
       showline("Premature end of special\n", 1);
       return -1;
     }
     if (strcmp(line, "plotfile") == 0) { /* deal with plotfile */
-/*      while (getalphatoken(input, line, MAXLINE) > 0) { */
+/*      while (get_alpha_token(input, line, MAXLINE) > 0) { */
 /*  deal with filename | global | local | inline | asis ??? */
-/*      (void) gettoken(input, epsfilename, FNAMELEN); */ /* file name */
-      (void) gettoken(input, epsfilename, sizeof(epsfilename));  /* file name */
+/*      (void) get_token(input, epsfilename, FNAMELEN); */ /* file name */
+      (void) get_token(input, epsfilename, sizeof(epsfilename));  /* file name */
       if (pstagstyle != 0)  { /*  only if between [begin] & [end] */
 /*        actually, now do nothing except copy the file ! */
         copyepsfile(output, epsfilename, 1, 0); /* incl & no shift */
       }
     } /* end of "plotfile" case */
     else if (strcmp(line, "overlay") == 0) { /* deal with overlay */
-/*      while (getalphatoken(input, line, MAXLINE) > 0) { */
+/*      while (get_alpha_token(input, line, MAXLINE) > 0) { */
 /*  deal with filename | on | off ??? */
-/*      (void) gettoken(input, epsfilename, FNAMELEN); */  /* file name */ 
-      (void) gettoken(input, epsfilename, sizeof(epsfilename));   /* file name */
+/*      (void) get_token(input, epsfilename, FNAMELEN); */  /* file name */ 
+      (void) get_token(input, epsfilename, sizeof(epsfilename));   /* file name */
       if (pstagstyle != 0)  { /*  only if between [begin] & [end] */
 /*        actually, now do nothing except copy the file ! */
 /*        fprintf(output, "dviso "); ? */
@@ -4055,12 +4027,12 @@ int readdvips (FILE *output, FILE *input)
     }   /* end of "overlay" case */
     else if (strcmp(line, "epsfile") == 0) {     /* ArborText ? */
 /*         strcmp(line, "EPSFILE") == 0  */
-/*      if(gettoken(input, epsfilename, FNAMELEN) > 0) { */ /* file name */
-      if(gettoken(input, epsfilename, sizeof(epsfilename)) > 0) {  /* file name */
+/*      if(get_token(input, epsfilename, FNAMELEN) > 0) { */ /* file name */
+      if(get_token(input, epsfilename, sizeof(epsfilename)) > 0) {  /* file name */
         startspecial(output);
 /* ArborText scale may be per mille */
-/*        if(gettoken(input, line, MAXLINE) > 0) { */ /* scale ? */ 
-        if(gettoken(input, line, sizeof(line)) > 0) { /* scale ? */
+/*        if(get_token(input, line, MAXLINE) > 0) { */ /* scale ? */ 
+        if(get_token(input, line, sizeof(line)) > 0) { /* scale ? */
           if(sscanf(line, "%lg", &scale) > 0) {
             if (scale > 33.33) scale = scale/1000.0;
             sprintf(logline, "%lg dup scale \n", scale);
@@ -4074,8 +4046,8 @@ int readdvips (FILE *output, FILE *input)
       else complainspecial(input);
     }   /* end of "epsfile" case */
     else if (strcmp(line, "include") == 0) {    
-/*      if(gettoken(input, epsfilename, FNAMELEN) > 0) {   */
-      if(gettoken(input, epsfilename, sizeof(epsfilename)) > 0) {  
+/*      if(get_token(input, epsfilename, FNAMELEN) > 0) {   */
+      if(get_token(input, epsfilename, sizeof(epsfilename)) > 0) {  
         if (pssvbstyle != 0) /* only if after startTexFig */
           copyepsfile(output, epsfilename, 0, 0); 
           /* no inc & no shift */
@@ -4090,16 +4062,16 @@ int readdvips (FILE *output, FILE *input)
     else if (strcmp(line, "literal") == 0) { /* DVI2PS-SVB */
 /*      printf(" LITERAL: pssvbstyle %d", pssvbstyle); */
 /*      if (verbatimflag != 0) {
-        copystring(output, input);  
+        copy_string(output, input);  
       } */
-      if (scanspecial(input, line, MAXLINE) == MAXLINE) {
+      if (scan_special(input, line, MAXLINE) == MAXLINE) {
         if (verbatimflag != 0) { /* long ps: literal verbatim */
           fseek(input, fliteral, SEEK_SET);
           nspecial = nliteral;
           PSputc('\n', output);       // always on new line ?
           PSputs("revsclx ", output);
           if (preservefont) PSputs("currentfont ", output);
-          copystring(output, input);
+          copy_string(output, input);
           if (preservefont) PSputs("setfont ", output);
           PSputs("forsclx ", output); 
         }
@@ -4131,13 +4103,13 @@ int readdvips (FILE *output, FILE *input)
       else complainjflag(input);      /* 93/Oct/17 */
 /*      else complainspecial(input); */
 /*      if (pssvbstyle == 0) fprintf(output, "\nrevscl\n");  */
-/*      copystring(output, input);   */
+/*      copy_string(output, input);   */
 /*      if (pssvbstyle == 0) fprintf(output, "forscl\n");  */
     } /* end of "literal" case */
 /*    could check for presence of : or / here */
 /*    how does SciWord deal with scaling ? */
     else if (bSciWord != 0) { /* just has the EPS file name here */
-/*      if (gettoken(input, epsfilename, FNAMELEN) > 0) {   */
+/*      if (get_token(input, epsfilename, FNAMELEN) > 0) {   */
       if (strcmp(line, "") != 0 && strlen(line) < sizeof(epsfilename)) {
         strcpy(epsfilename, line);
         startspecial(output);
@@ -4169,10 +4141,10 @@ int readdvips (FILE *output, FILE *input)
       fseek(input, fliteral, SEEK_SET);
       nspecial = nliteral;
       if (bOldDVIPSFlag || bOldDVIPSFlip) { /* the old way */
-        copystring(output, input);  
+        copy_string(output, input);  
       }
       else {              /* new 96/Nov/11 */
-        if (scanspecial(input, line, MAXLINE) != MAXLINE) {
+        if (scan_special(input, line, MAXLINE) != MAXLINE) {
           t = s = line;
 /* precede each `rotate' by `neg' */
           while ((s = strstr(t, "rotate")) != NULL) {
@@ -4196,7 +4168,7 @@ int readdvips (FILE *output, FILE *input)
         else {    /* it was too long - so just copy the damn thing */
           fseek(input, fliteral, SEEK_SET);
           nspecial = nliteral;
-          copystring(output, input);
+          copy_string(output, input);
         }
       }
       if (bOldDVIPSFlag) {      /* 94/Oct/4 */
@@ -4218,7 +4190,7 @@ int readdvips (FILE *output, FILE *input)
     }
 /*    else complainspecial(input); */
   }
-  flushspecial(input);
+  flush_special(input);
   return 0;
 }
 
@@ -4229,7 +4201,7 @@ void DoScr (FILE *output, FILE *input)     /* 98/Nov/4 */
   int lineno=0;
   char srcfile[FILENAME_MAX]="";
 
-  (void) scanspecial(input, line, MAXLINE); /* read rest of line */
+  (void) scan_special(input, line, MAXLINE); /* read rest of line */
   if (sscanf(line, "%d%s", &lineno, srcfile) > 1) {
     if (stripcomment == 0) {
       PSputc('\n', output); // always on new line ?
@@ -4254,14 +4226,14 @@ int readdvilaserps (FILE *output, FILE *input)
 /*  Is it one of DVIWINDO's specials ? */ /* colon after `color' 95/June/21 */
   else if (strcmp(line, "color") == 0) doColor(output, input, ':', 1);
   else if (strcmp(line, "clip") == 0) doClipBox(output, input, ':');
-  else if (strcmp(line, "comment") == 0) flushspecial(input); /* 95/June/21*/
-  else if (strcmp(line, "PDF") == 0) flushspecial(input);   /* 95/July/4 */
+  else if (strcmp(line, "comment") == 0) flush_special(input); /* 95/June/21*/
+  else if (strcmp(line, "PDF") == 0) flush_special(input);   /* 95/July/4 */
 #ifdef AllowCTM
   else if (strcmp(line, "CTM") == 0) doCTM(output, input);  /* 95/Oct/10 */
 #endif
   else if (strcmp(line, "message") == 0) {  /* 1995/June/21 */
     showline(" ", 0);
-    (void) scanspecial(input, line, MAXLINE);
+    (void) scan_special(input, line, MAXLINE);
     showline(line, 0);
   }
 #ifdef TIFF
@@ -4274,19 +4246,19 @@ int readdvilaserps (FILE *output, FILE *input)
     strcmp(line, "button") == 0 ||
     strcmp(line, "mark") == 0 ||      
     strcmp(line, "insertimage") == 0) { 
-      flushspecial(input);
+      flush_special(input);
       if (quietflag == 0)
         showline(" Ignoring DVIWindo \\special", 1);
 /*    strcmp(line, "insertmf") == 0) {} */ /* error in DVIPSONE */
   }
 #endif
   else if (strcmp(line, "revset") == 0) { /* HP TAG revset: 4pt \special */
-    flushspecial(input);
+    flush_special(input);
     if (traceflag) showline(" Ignoring revset", 1);
   }
   else if (strcmp(line, "src") == 0) {  /* 98/Nov/4 */
     if (stripcomment == 0)  DoScr(output, input);
-    else flushspecial(input);
+    else flush_special(input);
   }
 /*  Try Andrew Treverrow file inclusion, but only if -j used */
   else if (verbatimflag && readandrew(output, input)) {  /*  try OzTeX ? go south ! */
@@ -4319,7 +4291,7 @@ long xold=0, yold=0;      /* last point placed in path */
 
 // Now adds a space at end in case raw PS follows from \special 2000/Feb/16
 // On entry contains TPIC command token in line
-// If it takes arguments, scanspecial is used to read in the rest
+// If it takes arguments, scan_special is used to read in the rest
 
 int readtpic (FILE *output, FILE *input)
 {
@@ -4344,7 +4316,7 @@ int readtpic (FILE *output, FILE *input)
   PSputc('\n', output);
 
   if (strcmp(line, "pn") == 0) {  /* pn n - set pen width */
-    (void) scanspecial(input, line, MAXLINE);
+    (void) scan_special(input, line, MAXLINE);
     if (sscanf (line, "%lg", &z) < 1) { /* complain if < 1 ? */
     }
 /*    pen width NORMALLY is in milli-inches */
@@ -4361,7 +4333,7 @@ int readtpic (FILE *output, FILE *input)
     PSputs(logline, output);
   }
   else if (strcmp(line, "pa") == 0) { /* pa x y - add point to path */
-    (void) scanspecial(input, line, MAXLINE);
+    (void) scan_special(input, line, MAXLINE);
     if (sscanf (line, "%ld %ld", &x, &y) < 2) { /* complain if < 2 ? */
     }
 #ifdef ALLOWSCALE
@@ -4382,7 +4354,7 @@ int readtpic (FILE *output, FILE *input)
   else if (strcmp(line, "da") == 0 ||
          strcmp(line, "dt") == 0) { /* da/dt l - stroke dashed/dotted */
     strcpy(temp, line);
-    (void) scanspecial(input, line, MAXLINE); /* complain if < 1 ? */
+    (void) scan_special(input, line, MAXLINE); /* complain if < 1 ? */
     if (sscanf (line, "%lg", &z) < 1) {
     }
 /*    dash/dot interval NORMALLY is in inches */
@@ -4403,7 +4375,7 @@ int readtpic (FILE *output, FILE *input)
     xold = 0; yold = 0;       /* reset path */
   }
   else if (strcmp(line, "sp") == 0) { /* sp [l] - stroke quadratic spline */
-    (void) scanspecial(input, line, MAXLINE);
+    (void) scan_special(input, line, MAXLINE);
     if (sscanf (line, "%lg", &z) > 0) {   // has an argument ?
 /*      dash/dot interval NORMALLY is in inches */
       if (z > -MINMILLI && z < MINMILLI)  z = z * 1000.0; /* inches */
@@ -4430,7 +4402,7 @@ int readtpic (FILE *output, FILE *input)
   else if (strcmp(line, "ar") == 0 ||
          strcmp(line, "ia") == 0) { /* ar/ia x y xr yr sa ea */
     strcpy(temp, line);       // either "ar" or "ia"
-    (void) scanspecial(input, line, MAXLINE);
+    (void) scan_special(input, line, MAXLINE);
     sa = 0.0; ea = 2.0 * PI;      /* in case angles omitted */
     if (sscanf(line, "%ld %ld %ld %ld %lg %lg",
       &x, &y, &xr, &yr, &sa, &ea) < 6) {
@@ -4461,7 +4433,7 @@ int readtpic (FILE *output, FILE *input)
   }
   else if (strcmp(line, "sh") == 0 ||
     strcmp(line, "cl") == 0) { /* sh [s] */
-    (void) scanspecial(input, line, MAXLINE);
+    (void) scan_special(input, line, MAXLINE);
 /*    deal with color specification using three values ? */
 /*    grey = 0.5; */
     if (sscanf(line, "%lg %lg %lg", &r, &g, &b) < 3) {
@@ -4498,7 +4470,7 @@ int readtpic (FILE *output, FILE *input)
     PSputs(line, output);
   }
   else if (strcmp(line, "tx") == 0) { /* tx */
-    (void) scanspecial(input, line, MAXLINE);
+    (void) scan_special(input, line, MAXLINE);
 /* need to count bits in hexadecimal mask pattern here */
     bitsone=0; bitstot=0;
     s = line;
@@ -4520,7 +4492,7 @@ int readtpic (FILE *output, FILE *input)
   }
   if (needtpic == 0) 
     showline(" ERROR: TPIC failure\n", 1); /* debugging */
-  flushspecial(input);  /* clean out the rest */
+  flush_special(input);  /* clean out the rest */
   return -1;
 }
 
@@ -4533,7 +4505,7 @@ int readspecial (FILE *output, FILE *input, unsigned long ns)
   int c;
 
   if (bIgnoreSpecials != 0) { /* ignore \specials ? */
-    flushspecial(input);
+    flush_special(input);
     return 0;
   }
 
@@ -4549,7 +4521,7 @@ int readspecial (FILE *output, FILE *input, unsigned long ns)
   c = getc(input);
   --nspecial;
   if (c == 0 && bFirstNull) {   /* flush if first byte is null 96/Aug/29 */
-    flushspecial(input);
+    flush_special(input);
     return 0;
   }
 
@@ -4562,7 +4534,7 @@ int readspecial (FILE *output, FILE *input, unsigned long ns)
       PSputs("/showpage{}def ", output);  /* 97/Mar/9 */
     if (bProtectStack) PSputs("[ ", output);      /* 97/Nov/24 */
     if (bStoppedContext) PSputs("{ ", output);    /* 97/Nov/24 */
-    copystring(output, input);
+    copy_string(output, input);
     if (bStoppedContext) PSputs(" } stopped", output);  /* 97/Nov/24 */
     if (bProtectStack) PSputs(" cleartomark", output);  /* 97/Nov/24 */
     PSputs(" restore", output);       /* 93/Oct/17 */
@@ -4574,13 +4546,13 @@ int readspecial (FILE *output, FILE *input, unsigned long ns)
 /*  support for `literal macros' kludge in dvips - start with ! */
   if (c == '!') {               /* 94/Jan/28 */
 /*    ignore now, already taken care of in dvipslog ! as headertext=... */
-    flushspecial(input);
+    flush_special(input);
     return 0;
   }         
 
   (void) ungetc(c, input);      /* put back the first byte */
   nspecial++;
-  if ((c = getalphatoken(input, line, sizeof(line))) == 0)
+  if ((c = get_alpha_token(input, line, sizeof(line))) == 0)
   {
     if (quietflag == 0) showline(" Blank special", 1);
     return 0;         /* found nothing ! */
@@ -4589,10 +4561,10 @@ int readspecial (FILE *output, FILE *input, unsigned long ns)
 
   if (strncmp(line, "if", 2) == 0) {  /* new conditional option 99/July/2 */
     if (strcmp(line+2, "print") != 0) { /* ignore all but ifprint */
-      flushspecial(input);  /* not for DVIPSONE */
+      flush_special(input);  /* not for DVIPSONE */
       return 0;
     }
-    else if ((c = getalphatoken(input, line, sizeof(line))) == 0) { /* recurse */
+    else if ((c = get_alpha_token(input, line, sizeof(line))) == 0) { /* recurse */
       if (quietflag == 0) showline(" Blank special", 1);
       return 0;         /* found nothing ! */
     }
@@ -4619,10 +4591,10 @@ int readspecial (FILE *output, FILE *input, unsigned long ns)
   else if (strcmp(line, "color") == 0) doColor(output, input, c, 1); 
   else if (strcmp(line, "clip") == 0) doClipBox(output, input, c); /* 98/Sep/12 */
   else if (strcmp(line, "background") == 0) /* used only during prescan ? */
-    flushspecial(input);    /* 98/Jun/30 */
+    flush_special(input);    /* 98/Jun/30 */
   else if (strcmp(line, "landscape") == 0)
 /*    texlandscape(output); */  /* no, used only in prescan foils.cls */
-    flushspecial(input);    /* 99/Apr/5 */
+    flush_special(input);    /* 99/Apr/5 */
 /*  have to do DVIPS / Texture style FIRST, or they get caught by following: */
   else if (c == ' ' && nspecial > 0) {
     if (allowtpic == 0 || readtpic(output, input) == 0) {
@@ -4652,7 +4624,7 @@ void prereadspecial (FILE *input, unsigned long ns)
   int c;
 
   if (bIgnoreSpecials != 0) { /* ignore \specials ? */
-    flushspecial(input);
+    flush_special(input);
     return;
   }
 
@@ -4670,21 +4642,21 @@ void prereadspecial (FILE *input, unsigned long ns)
   }
 
   if (c == 0 && bFirstNull) {   /* flush if first byte is null 96/Aug/29 */
-    flushspecial(input);
+    flush_special(input);
     return;
   }
 /*  support for `literal graphics' kludge in dvips - start with " */
   if (c == '\"') {  
-    flushspecial(input);
+    flush_special(input);
     return;
   }
 /*  support for `literal macros' kludge in dvips - start with ! */
   if (c == '!') { 
-    flushspecial(input);  /* taken care of in dvipslog */
+    flush_special(input);  /* taken care of in dvipslog */
     return;
   }         
   (void) ungetc(c, input); nspecial++;  /* put it back */
-  if ((c = getalphatoken(input, line, sizeof(line))) == 0) {
+  if ((c = get_alpha_token(input, line, sizeof(line))) == 0) {
     return;         /* found nothing ! */
   }
   if (c == ' ' || c == ':') {
@@ -4692,7 +4664,7 @@ void prereadspecial (FILE *input, unsigned long ns)
       doColor(NULL, input, c, 0);   /* no PS output */
     }
   }
-  else flushspecial(input);
+  else flush_special(input);
   return;
 }
 
@@ -4715,18 +4687,18 @@ void reademtex (FILE *output, FILE *input)
   char units[3];
   int n;
 
-/*  if (getalphatoken(input, line, MAXLINE) == 0) { */
-  if (getalphatoken(input, line, sizeof(line)) == 0) {
+/*  if (get_alpha_token(input, line, MAXLINE) == 0) { */
+  if (get_alpha_token(input, line, sizeof(line)) == 0) {
     complainspecial(input);
     return;
   }
   if (strcmp(line, "message") == 0) {
     showline(" ", 0);
-    (void) scanspecial(input, line, MAXLINE);
+    (void) scan_special(input, line, MAXLINE);
     showline(line, 0);
   }
   else if (strcmp(line, "linewidth") == 0) {
-    (void) scanspecial(input, line, MAXLINE);
+    (void) scan_special(input, line, MAXLINE);
     s = line;
     if (sscanf(s, "%lg%n", &linewidth, &n) == 0) {
       showline("linewidth not specified", 0); /* used default */
index 5374907..733d5c0 100644 (file)
 #define TIFF_VERSION 42
 
 /* TIFF file value type codes: */
-
-#define TYPE_BYTE 1
-#define TYPE_ASCII 2
-#define TYPE_SHORT 3
-#define TYPE_LONG 4
-#define TYPE_RATIO 5
-
+#define TYPE_BYTE       1
+#define TYPE_ASCII      2
+#define TYPE_SHORT      3
+#define TYPE_LONG       4
+#define TYPE_RATIO      5
 /* following added in TIFF 6.0 */
-
-#define TYPE_SBYTE 6           /* An 8-bit signed (twos-complement) integer */
-#define TYPE_UNDEFINED 7       /* An 8-bit byte that may contain anything */
-#define TYPE_SSHORT 8          /* A 16-bit (2-byte) signed (twos-complement) integer */
-#define TYPE_SLONG 9           /* A 32-bit (4-byte) signed (twos-complement) integer */
-#define TYPE_SRATIONAL 10      /* Two SLONG\92s: numerator and denominator */
-#define TYPE_FLOAT 11          /* Single precision (4-byte) IEEE format */
-#define TYPE_DOUBLE 12         /* Double precision (8-byte) IEEE format */
+#define TYPE_SBYTE      6  /* An 8-bit signed (twos-complement) integer */
+#define TYPE_UNDEFINED  7  /* An 8-bit byte that may contain anything */
+#define TYPE_SSHORT     8  /* A 16-bit (2-byte) signed (twos-complement) integer */
+#define TYPE_SLONG      9  /* A 32-bit (4-byte) signed (twos-complement) integer */
+#define TYPE_SRATIONAL  10 /* Two SLONG\92s: numerator and denominator */
+#define TYPE_FLOAT      11 /* Single precision (4-byte) IEEE format */
+#define TYPE_DOUBLE     12 /* Double precision (8-byte) IEEE format */
 
 /* TIFF file tags */
 
-#define        NEWSUBFILETYPE          254
-#define        SUBFILETYPE                     255
-#define        IMAGEWIDTH                      256
-#define        IMAGELENGTH                     257
-#define        BITSPERSAMPLE           258
-#define        COMPRESSION                     259
-#define        PHOTOMETRICINTERPRETATION       262
-#define        THRESHHOLDING           263
-#define        CELLWIDTH                       264
-#define        CELLLENGTH                      265
-#define        FILLORDER                       266
-#define        DOCUMENTNAME            269
-#define        IMAGEDESCRIPTION        270
-#define        MAKE                            271
-#define        MODEL                           272
-#define        STRIPOFFSETS            273
-#define        ORIENTATION                     274
-#define        SAMPLESPERPIXEL         277
-#define        ROWSPERSTRIP            278
-#define        STRIPBYTECOUNTS         279
-#define        MINSAMPLEVALUE          280
-#define        MAXSAMPLEVALUE          281
-#define        XRESOLUTION                     282
-#define        YRESOLUTION                     283
-#define        PLANARCONFIG            284
-#define        PAGENAME                        285
-#define        XPOSITION                       286
-#define        YPOSITION                       287
-#define        FREEOFFSETS                     288
-#define        FREEBYTECOUNTS          289
-#define        GRAYRESPONSEUNIT        290
-#define        GRAYRESPONSECURVE       291
-#define        GROUP3OPTIONS           292
-#define        GROUP4OPTIONS           293
-#define        RESOLUTIONUNIT          296
-#define        PAGENUMBER                      297
-#define        COLORRESPONSECURVES     301
-#define        SOFTWARE                        305
-#define        DATETIME                        306
-#define        ARTIST                          315
-#define        HOSTCOMPUTER            316
-#define        PREDICTOR                       317
-#define        WHITE                           318
-#define        COLORLIST                       319
-#define        PRIMARYCHROMATICITIES   319
-#define        COLORMAP                        320
-
+#define NEWSUBFILETYPE            254
+#define SUBFILETYPE               255
+#define IMAGEWIDTH                256
+#define IMAGELENGTH               257
+#define BITSPERSAMPLE             258
+#define COMPRESSION               259
+#define PHOTOMETRICINTERPRETATION 262
+#define THRESHHOLDING             263
+#define CELLWIDTH                 264
+#define CELLLENGTH                265
+#define FILLORDER                 266
+#define DOCUMENTNAME              269
+#define IMAGEDESCRIPTION          270
+#define MAKE                      271
+#define MODEL                     272
+#define STRIPOFFSETS              273
+#define ORIENTATION               274
+#define SAMPLESPERPIXEL           277
+#define ROWSPERSTRIP              278
+#define STRIPBYTECOUNTS           279
+#define MINSAMPLEVALUE            280
+#define MAXSAMPLEVALUE            281
+#define XRESOLUTION               282
+#define YRESOLUTION               283
+#define PLANARCONFIG              284
+#define PAGENAME                  285
+#define XPOSITION                 286
+#define YPOSITION                 287
+#define FREEOFFSETS               288
+#define FREEBYTECOUNTS            289
+#define GRAYRESPONSEUNIT          290
+#define GRAYRESPONSECURVE         291
+#define GROUP3OPTIONS             292
+#define GROUP4OPTIONS             293
+#define RESOLUTIONUNIT            296
+#define PAGENUMBER                297
+#define COLORRESPONSECURVES       301
+#define SOFTWARE                  305
+#define DATETIME                  306
+#define ARTIST                    315
+#define HOSTCOMPUTER              316
+#define PREDICTOR                 317
+#define WHITE                     318
+#define COLORLIST                 319
+#define PRIMARYCHROMATICITIES     319
+#define COLORMAP                  320
 /* following added in TIFF 6.0 */
-
-#define HALFTONEHINTS          321
-#define TILEWIDTH                      322
-#define TILELENGTH                     323
-#define TILEOFFSETS                    324
-#define TILEBYTECOUNTS         325
-#define INKSETS                                332
-#define INKNAMES                       333
-#define NUMBEROFINKS           334
-#define DOTRANGE                       336
-#define TARGETPRINTER          337
-#define EXTRASAMPLES           338
-#define SMINSAMPLEVALUE                340
-#define SMAXSAMPLEVALUE                341
-#define TRANSFERRANGE          342
-
-#define JPEGPROC                       512
-#define JPEGINTERCHANGEFORMAT  513
-#define JPEGINTERCHANGEFORMATLNGTH     514
-#define JPEGRESTARTINTERVAL    515
-#define JPEGLOSSLESSPREDICTORS 517
-#define JPEGPOINTTRANSFORMS    518
-#define JPEGQTABLES                    519
-#define JPEGDCTABLES           520
-#define JPEGACTABLES           521
-#define YCBCRCOEFFICIENTS      529
-#define YCBCRSUBSAMPLING       530
-#define YCBCRPOSITIONING       531
-#define REFERENCEBLACK         532
-
-#define COPYRIGHT                      33432
+#define HALFTONEHINTS             321
+#define TILEWIDTH                 322
+#define TILELENGTH                323
+#define TILEOFFSETS               324
+#define TILEBYTECOUNTS            325
+#define INKSETS                   332
+#define INKNAMES                  333
+#define NUMBEROFINKS              334
+#define DOTRANGE                  336
+#define TARGETPRINTER             337
+#define EXTRASAMPLES              338
+#define SMINSAMPLEVALUE           340
+#define SMAXSAMPLEVALUE           341
+#define TRANSFERRANGE             342
+
+#define JPEGPROC                    512
+#define JPEGINTERCHANGEFORMAT       513
+#define JPEGINTERCHANGEFORMATLNGTH  514
+#define JPEGRESTARTINTERVAL         515
+#define JPEGLOSSLESSPREDICTORS      517
+#define JPEGPOINTTRANSFORMS         518
+#define JPEGQTABLES                 519
+#define JPEGDCTABLES                520
+#define JPEGACTABLES                521
+#define YCBCRCOEFFICIENTS           529
+#define YCBCRSUBSAMPLING            530
+#define YCBCRPOSITIONING            531
+#define REFERENCEBLACK              532
+
+#define COPYRIGHT     33432
 
 #define NOCOMPRESSION     1
 #define TIFF_CCITT        2
index 0ad4617..163227b 100644 (file)
 \r
 /* Also, code for some other DVIWindo \specials */\r
 \r
-/* Revised 1999 June 13 to run in DLL form */\r
-\r
-#ifdef _WINDOWS\r
-  #define NOCOMM\r
-  #define NOSOUND\r
-  #define NODRIVERS\r
-  #define STRICT\r
-  #include <windows.h>\r
-#endif\r
-\r
-#include <stdio.h>\r
-#include <stdlib.h>\r
-#include <string.h>\r
-#include <malloc.h>\r
-#include <setjmp.h>\r
-\r
-#ifdef _WINDOWS\r
-  // We must define MYLIBAPI as __declspec(dllexport) before including\r
-  // dvipsone.h, then dvipsone.h will see that we have already\r
-  // defined MYLIBAPI and will not (re)define it as __declspec(dllimport)\r
-  #define MYLIBAPI __declspec(dllexport)\r
-  // #include "dvipsone.h"\r
-#endif\r
-\r
 #include "dvipsone.h"\r
-\r
-#ifdef _WINDOWS\r
-  #pragma warning(disable:4100) // unreferenced formal variable \r
-#endif\r
-\r
-#pragma warning(disable:4996)\r
-#pragma warning(disable:4127) // conditional expression is constant\r
-\r
-#pragma hdrstop\r
-\r
-#include <time.h>\r
-\r
 #include "dvispeci.h"\r
 \r
 #define DEBUGTIFF         /* to get in extra tracing code */\r
@@ -5380,7 +5344,7 @@ int oldcolor (FILE *output, FILE  *input)
   int n;\r
 /*  old text color support */\r
   if (strcmp(line, "textcolor") == 0) {\r
-    (void) scanspecial (input, line, MAXLINE);\r
+    (void) scan_special (input, line, MAXLINE);\r
     if (traceflag) {\r
       sprintf(logline, " %s ", line);\r
       showline(logline, 0);\r
@@ -5422,7 +5386,7 @@ int oldcolor (FILE *output, FILE  *input)
   }\r
   /*  old rule color support */\r
   else if (strcmp(line, "rulecolor") == 0) {\r
-    (void) scanspecial (input, line, MAXLINE);\r
+    (void) scan_special (input, line, MAXLINE);\r
 #ifdef DEBUGTIFF\r
     if (traceflag) {\r
       sprintf(logline, " %s ", line);\r
@@ -5454,7 +5418,7 @@ int oldcolor (FILE *output, FILE  *input)
   }\r
 /*  old figurecolor support */\r
   else if (strcmp(line, "figurecolor") == 0) {\r
-    (void) scanspecial (input, line, MAXLINE);\r
+    (void) scan_special (input, line, MAXLINE);\r
 #ifdef DEBUGTIFF\r
     if (traceflag) {\r
       sprintf(logline, " %s ", line);\r
@@ -5500,7 +5464,7 @@ int oldcolor (FILE *output, FILE  *input)
   }\r
 /*  old reverse video support */\r
   else if (strcmp(line, "reversevideo") == 0) {\r
-    (void) scanspecial (input, line, MAXLINE);\r
+    (void) scan_special (input, line, MAXLINE);\r
 #ifdef DEBUGTIFF\r
     if (traceflag) {\r
       sprintf(logline, " %s ", line);\r
@@ -5590,8 +5554,8 @@ int newspecials (FILE *output, FILE *input)
 /*  insert TIFF or BMP image */\r
   if (strcmp(line, "insertimage") == 0)\r
   {\r
-/*    (void) scanspecial (input, line, MAXLINE); */\r
-    (void) scanspecialraw (input, line, MAXLINE);\r
+/*    (void) scan_special (input, line, MAXLINE); */\r
+    (void) scan_special_raw (input, line, MAXLINE);\r
 #ifdef DEBUGTIFF\r
     if (traceflag)\r
     {\r
@@ -5637,11 +5601,11 @@ int newspecials (FILE *output, FILE *input)
 /*  mark: name --- mark: "<File Open>" */ /* turn into named destination */\r
   else if (strcmp(line, "mark") == 0) {\r
     if (bPDFmarks == 0) {\r
-      flushspecial(input);\r
+      flush_special(input);\r
       return 1;   /* we recognize it, but ignore it */\r
     }\r
-/*    (void) scanspecial (input, line, MAXLINE);  */\r
-    (void) scanspecialraw (input, line, MAXLINE); /* fix 97/Nov/11 */\r
+/*    (void) scan_special (input, line, MAXLINE);  */\r
+    (void) scan_special_raw (input, line, MAXLINE); /* fix 97/Nov/11 */\r
     if (traceflag) {\r
       sprintf(logline, " %s ", line);\r
       showline(logline, 0);\r
@@ -5676,11 +5640,11 @@ int newspecials (FILE *output, FILE *input)
 /*  we are ignoring for the moment file: ... and launch: ... */\r
   else if (strcmp(line, "button") == 0) {\r
     if (bPDFmarks == 0) {\r
-      flushspecial(input);\r
+      flush_special(input);\r
       return 1;   /* we recognize it, but ignore it */\r
     }\r
-/*    (void) scanspecial (input, line, MAXLINE); */\r
-    (void) scanspecialraw (input, line, MAXLINE); \r
+/*    (void) scan_special (input, line, MAXLINE); */\r
+    (void) scan_special_raw (input, line, MAXLINE); \r
     if (traceflag) {\r
       sprintf(logline, " %s ", line);\r
       showline(logline, 0);\r
@@ -5688,11 +5652,11 @@ int newspecials (FILE *output, FILE *input)
     if (sscanf(line, "%ld %ld%n", &dwidth, &dheight, &n) < 2) {\r
       showline(" ERROR: button ", 1); /* error output */\r
       showline(line, 1);\r
-      flushspecial(input);\r
+      flush_special(input);\r
       return 1;   /* it does not have required width and height ! */\r
     }\r
 /*    if (strstr(line, "launch:") != NULL) {\r
-      flushspecial(input);\r
+      flush_special(input);\r
       return 1;\r
     } */\r
     sname = line + n;         /* now after width and height */\r
@@ -5888,7 +5852,7 @@ int newspecials (FILE *output, FILE *input)
   }\r
   else if (strcmp(line, "viewrule") == 0 || /* 95/Mar/27 */\r
        strcmp(line, "viewtext") == 0) { /* 95/Mar/27 */\r
-     flushspecial(input);\r
+     flush_special(input);\r
      return 1;    /* we recognize it, but ignore it */\r
   }\r
 #ifdef DEBUGTIFF\r
@@ -5915,7 +5879,7 @@ int dohptag (FILE *output, FILE *input)
   char *s, *t;\r
   char filename[FILENAME_MAX];\r
 \r
-  (void) scanspecial (input, line, MAXLINE);\r
+  (void) scan_special (input, line, MAXLINE);\r
   if ((s = strchr(line, ' ')) != NULL) *s = '\0';\r
   if ((t = strrchr(line, '/')) != NULL) strcpy(filename, t+1);\r
   else if (strlen(line) < sizeof(filename)) strcpy(filename, line);\r
diff --git a/src/dvisourc/makedll b/src/dvisourc/makedll
deleted file mode 100644 (file)
index 926ed3b..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-# Copyright 2007 TeX Users Group
-# Copyright 2014 Clerk Ma
-# You may freely use, modify and/or distribute this file.
-
-# Makefile for DVIPSONE
-
-# TO SET UP DEBUGGING INFO:
-# (1) add -Zi to CFLAGS for CL
-# (2) add /MAP /DEBUG /PDB:dvipsone.pdb for LINK
-
-CC = cl
-
-LINK = link
-
-# Need not define MSDOS, since compiler already takes care of that...
-
-# -Gf saves about 7k bytes in EXE file
-# For production (-Bd show compiler passes)
-# ASSUMING WE WORK WITH MS COMPILER AND LINKER ONLY use -Gy and -Gf
-# CFLAGS=-c  -Ox -Gy -Gf -W3
-# -c compile only, no link
-# -F 6000 change stack allocation ? passed to LINK ?
-# -YX auto precompiled header
-# -Ox == /Ogityb1 /Gs
-# -Ge stack checking (remove later for speed) -Gs maybe?
-# -Gy separate functions for linker
-# -Gf enable string pooling
-# -Zd line number information for debugging ?
-# -Zi generate debugging information 98/March/5
-# Release version
-# CFLAGS=/c /YX /Ox /Ge /Gy /Gf /W4
-CFLAGS=/c /MT /W4 /GX /Ox /O2 /DMT  /D_X86=1 /DWIN32 /D_WIN32 /DNDEBUG /D_WINDOWS /YX
-# Debugging version
-# CFLAGS=/c /YX /Ge /Gy /Gf /W4 /Od /Zi
-# CFLAGS=/c /Zi /MT /W4 /GX /Od /DMT  /D_X86=1 /DWIN32 /D_WIN32 /D_WINDOWS /YX
-
-# NOTE: -Ox => -Ogityb1 -Gs
-
-# /MAP create map file
-# Release version
-# LFLAGS=/MAP /RELEASE
-LFLAGS=/RELEASE /MAP:dvipsonedll.map  /DLL /subsystem:windows kernel32.lib gdi32.lib user32.lib
-# Debugging version
-# LFLAGS=/MAP /DEBUG /PDB:dvipsone.pdb
-# LFLAGS=/DEBUG /MAP:dvipsonedll.map /PDB:dvipsonedll.pdb /DLL /subsystem:windows kernel32.lib gdi32.lib user32.lib 
-
-# objs = cextra.obj citex.obj openinou.obj local.obj \
-objs =         dvipsone.obj  dviextra.obj \
-        dvianal.obj dvispeci.obj dvitiff.obj dvipslog.obj 
-
-# ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ###
-
-# dvipsone.exe: $(objs) lib/libdos.lib
-dvipsone.dll: $(objs) 
-#      $(LINK) $(LFLAGS) dvipsone dvipslog dviextra dvianal dvispeci dvitiff
-       $(LINK) $(LFLAGS) $(objs) setargv.obj
-       copy dvipsone.dll d:\winsourc /Y
-#      copy dvipsone.dll c:\winsourc /Y
-
-# ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ###
-
-dvipsone.obj: dvipsone.c dvipsone.h
-       $(CC) $(CFLAGS) dvipsone.c
-
-dvipslog.obj: dvipslog.c dvipsone.h
-       $(CC) $(CFLAGS) dvipslog.c
-
-dviextra.obj: dviextra.c dvipsone.h
-       $(CC) $(CFLAGS) dviextra.c
-
-dvianal.obj: dvianal.c dvipsone.h
-       $(CC) $(CFLAGS) dvianal.c
-
-dvispeci.obj: dvispeci.c dvipsone.h
-       $(CC) $(CFLAGS) dvispeci.c
-
-dvitiff.obj: dvitiff.c dvipsone.h
-       $(CC) $(CFLAGS) dvitiff.c
-
-.SUFFIXES:
-.SUFFIXES: .obj .c
-
-c..obj:
-       $(CC) $(CFLAGS) $*.c
-
index d70606a..7daeb89 100644 (file)
@@ -28,7 +28,7 @@ LINK = link
 # -Zd line number information for debugging ?
 # -Zi generate debugging information 98/March/5
 # Release version
-CFLAGS=/c /Ox /GF /Gy /W4
+CFLAGS=/nologo /c /Ox /GF /Gy /W4
 # Debugging version
 # CFLAGS=/c /YX /Ge /Gy /Gf /W4 /Od /Zi
 
@@ -36,7 +36,7 @@ CFLAGS=/c /Ox /GF /Gy /W4
 
 # /MAP create map file
 # Release version
-LFLAGS=/MAP /RELEASE
+LFLAGS=/nologo /MAP /RELEASE
 # Debugging version
 # LFLAGS=/MAP /DEBUG /PDB:dvipsone.pdb
 
@@ -49,7 +49,7 @@ objs = dvipsone.obj  dviextra.obj \
 # dvipsone.exe: $(objs) lib/libdos.lib
 dvipsone.exe: $(objs) 
 #      $(LINK) $(LFLAGS) dvipsone dvipslog dviextra dvianal dvispeci dvitiff
-       $(LINK) $(LFLAGS) $(objs) setargv.obj
+       $(LINK) $(LFLAGS) $(objs)
        copy dvipsone.exe ..\yandy\bin\dvipsone.exe
 
 
@@ -74,7 +74,7 @@ dvitiff.obj: dvitiff.c dvipsone.h
        $(CC) $(CFLAGS) dvitiff.c
 
 dvipsone.res: dvipsone.rc
-       rc dvipsone.rc
+       rc /nologo dvipsone.rc
 
 .SUFFIXES:
 .SUFFIXES: .obj .c