diff -cN dvips/Makefile.vms vms-dvips/Makefile.vms *** dvips/Makefile.vms Wed Dec 31 19:00:00 1969 --- vms-dvips/Makefile.vms Fri Sep 15 09:34:06 1989 *************** *** 0 **** --- 1,139 ---- + # + # Makefile for dvips + # + + # C compiler + CC = gcc + + # where the installed binary goes + BINDIR = usr:[angel.bin] + + # where the TFM files go + TFMDIR = /tex_fonts + # the default path to search for TFM files + TFMPATH = .,$(TFMDIR) + + # where the PK files go + PKDIR = /tex_fonts + # the default path to search for PK files + PKPATH = .,$(PKDIR) + + # where the config files go + CONFIGDIR = /tex_ps + # the default path to search for config files + CONFIGPATH = .,$(CONFIGDIR) + + # where the header PS files go + HEADERDIR = /tex_ps + # the default path to search for header files + HEADERPATH = .,$(HEADERDIR) + + # where epsf.tex goes (usually the TeX macros directory) + TEXMACRODIR = /tex_inputs + + # where the manual page goes + MANDIR = /usr/man/manl + + # add -DDEBUG to turn on debugging capability + # add -DTPIC for tpic support + # if the default resolution is not 300 dpi, + # add -DEFRES=400 or whatever is required + DEFS= /def=("TPIC") + + # either use + #OPT = -g + # or + OPT = /debug + + # libraries to include + FLIBS= -lm + + PATHS = /define=("TFMPATH=""$(TFMPATH)""",\ + "PKPATH=""$(PKPATH)""",\ + "HEADERPATH=""$(HEADERPATH)""",\ + "CONFIGPATH=""$(CONFIGPATH)""") + + CFLAGS = $(DEFS) $(PATHS) $(OPT) + + SRC = dospecial.c dviinput.c fontdef.c loadfont.c dvips.c tfmload.c \ + download.c prescan.c scanpage.c skippage.c output.c scalewidth.c \ + dosection.c dopage.c resident.c search.c unpack.c drawPS.c \ + header.c dpicheck.c makefont.c repack.c + + OBJ = dospecial.obj, dviinput.obj, fontdef.obj, loadfont.obj, dvips.obj, tfmload.obj, \ + download.obj, prescan.obj, scanpage.obj, skippage.obj, output.obj, scalewidth.obj, \ + dosection.obj, dopage.obj, resident.obj, search.obj, unpack.obj, drawPS.obj, \ + header.obj, dpicheck.obj, makefont.obj, repack.obj + + # files required to make a distribution + CONFIGFILES = config.ps psfonts.map + HEADERFILES = tex.lpro texc.lpro texps.lpro + FILES = $(CONFIGFILES) $(HEADERFILES) $(SRC) \ + Makefile INSTALLATION README \ + MakeTeXPK epsf.tex dvips.1 \ + paths.h debug.h structures.h squeeze.c afm2tfm.c + + all : afm2tfm.exe dvips.exe tex.pro texps.pro texc.pro + + dvips.exe : $(OBJ) + link/exe=$@ $(OBJ), vaxcrtl/opt + + afm2tfm.exe: afm2tfm.obj + link/exe=$@ afm2tfm.obj, vaxcrtl/opt + + $(OBJ) : structures.h + resident.o dvips.o loadfont.o tfmload.o : paths.h + + squeeze.exe : squeeze.obj + link/exe=$@ squeeze, vaxcrtl/opt + + tex.pro : tex.lpro squeeze.exe + def/user sys$$input tex.lpro;\ + def/user sys$$output tex.pro;\ + run squeeze + + texc.pro: texc.lpro squeeze.exe + def/user sys$$input texc.lpro;\ + def/user sys$$output texc.pro;\ + run squeeze + + texps.pro : texps.lpro squeeze.exe + def/user sys$$input texps.lpro;\ + def/user sys$$output texps.pro;\ + run squeeze + + install : afm2tfm dvips MakeTeXPK \ + tex.pro texc.pro texps.pro \ + config.ps psfonts.map epsf.tex + - mkdir $(BINDIR) + - mkdir $(HEADERDIR) + - mkdir $(CONFIGDIR) + - mkdir $(MANDIR) + - mkdir $(TEXMACRODIR) + install -c -m 755 afm2tfm $(BINDIR)/afm2tfm + install -c -m 755 dvips $(BINDIR)/dvips + install -c -m 755 MakeTeXPK $(BINDIR)/MakeTeXPK + install -c -m 644 tex.pro $(HEADERDIR) + install -c -m 644 texc.pro $(HEADERDIR) + install -c -m 644 texps.pro $(HEADERDIR) + install -c -m 644 config.ps $(CONFIGDIR) + install -c -m 644 psfonts.map $(CONFIGDIR) + install -c -m 644 dvips.1 $(MANDIR) + install -c -m 644 epsf.tex $(TEXMACRODIR) + + veryclean : + -delete *.obj.*,dvips.exe.*,squeeze.exe.*,afm2tfm.exe.*,tex.pro.*,texc.pro.*,texps.pro.* + + clean : + -delete *.obj.*,squeeze.exe.* + + lint : + lint $(DEFS) $(PATHS) $(SRC) + lint $(DEFS) squeeze.c + lint $(DEFS) afm2tfm.c + + shar : + shar $(FILES) > dvips.shar + + dist : + tar cf - $(FILES) | compress > dvips.tar.Z diff -cN dvips/afm2tfm.c vms-dvips/afm2tfm.c *** dvips/afm2tfm.c Sat Sep 2 00:15:27 1989 --- vms-dvips/afm2tfm.c Fri Sep 15 09:38:03 1989 *************** *** 7,12 **** --- 7,20 ---- #include #include + #ifdef VMS + #define GOOD_EXIT_STATUS 1 + #define BAD_EXIT_STATUS 44 + #else + #define GOOD_EXIT_STATUS 0 + #define BAD_EXIT_STATUS 1 + #endif + char *text[] = { "Gamma", "Delta", "Theta", "Lambda", "Xi", "Pi", "Sigma", "Upsilon", "Phi", "Psi", "Omega", "ff", "fi", "fl", "ffi", "ffl", "dotlessi", "dotlessj", "grave", "acute", "caron", "breve", "macron", *************** *** 96,102 **** (void)fprintf(stderr, "^\n") ; } if (*s == '!') ! exit(1) ; } int --- 104,110 ---- (void)fprintf(stderr, "^\n") ; } if (*s == '!') ! exit(BAD_EXIT_STATUS) ; } int *************** *** 841,847 **** if (argc == 1) { (void)printf("afm2tfm 0.6, Copyright 1989 by Radical Eye Software\n") ; ! exit(0) ; } if (strcmp(argv[1], "-c")==0) { argv++ ; --- 849,855 ---- if (argc == 1) { (void)printf("afm2tfm 0.6, Copyright 1989 by Radical Eye Software\n") ; ! exit(GOOD_EXIT_STATUS) ; } if (strcmp(argv[1], "-c")==0) { argv++ ; *************** *** 887,892 **** assignchars() ; buildtfm() ; writetfm() ; ! exit(0) ; /*NOTREACHED*/ } --- 895,900 ---- assignchars() ; buildtfm() ; writetfm() ; ! exit(GOOD_EXIT_STATUS) ; /*NOTREACHED*/ } diff -cN dvips/dospecial.c vms-dvips/dospecial.c *** dvips/dospecial.c Fri Sep 8 13:27:38 1989 --- vms-dvips/dospecial.c Fri Sep 15 09:39:49 1989 *************** *** 397,402 **** --- 397,403 ---- return( 1 ); } + #ifndef VMS /* * compare strings, ignore case */ *************** *** 408,413 **** --- 409,416 ---- else return(c) ; } + #endif + int IsSame(a, b) char *a, *b; { diff -cN dvips/dvips.c vms-dvips/dvips.c *** dvips/dvips.c Mon Sep 11 19:18:35 1989 --- vms-dvips/dvips.c Fri Sep 15 09:42:21 1989 *************** *** 15,20 **** --- 15,29 ---- #ifndef DEFPFMT #define DEFPFMT "@letter" #endif + + #ifdef VMS + #define GOOD_EXIT_STATUS 1 + #define BAD_EXIT_STATUS 44 + #else + #define GOOD_EXIT_STATUS 0 + #define BAD_EXIT_STATUS 1 + #endif + /* * Main routine for dvips.c. (C) 1987 Radical Eye Software. */ *************** *** 103,109 **** if (bitfile != NULL) { cleanprinter() ; } ! exit(1) ; } } /* --- 112,118 ---- if (bitfile != NULL) { cleanprinter() ; } ! exit(BAD_EXIT_STATUS) ; } } /* *************** *** 167,172 **** --- 176,200 ---- int i, lastext = -1 ; register sectiontype *sects ; + #ifdef VMS + { + /* + Remove the directory information from argv[0]: + + Ugly but the output of perror won't fit on one line. + */ + char *s; + char *strrchr(); + + if (!(s = strrchr(argv[0], ']'))) + s = strrchr(argv[0], ':'); + if (s) + strcpy(argv[0], s+1); + if (s = strrchr(argv[0], '.')) + *s = '\0'; + } + #endif + progname = argv[0] ; sendcontrolD = 0 ; initialize() ; *************** *** 342,348 **** --- 370,380 ---- headerfile = (compressed? CHEADERFILE : HEADERFILE) ; add_header(headerfile) ; if (*iname != 0) + #ifdef VMS + dvifile = fopen(iname, "r", "ctx=stm") ; + #else dvifile = fopen(iname, "r") ; + #endif else if (filter) dvifile = stdin; else *************** *** 381,386 **** cleanprinter() ; if (! quiet) (void)fprintf(stderr, "\n") ; ! exit(0) ; /*NOTREACHED*/ } --- 413,418 ---- cleanprinter() ; if (! quiet) (void)fprintf(stderr, "\n") ; ! exit(GOOD_EXIT_STATUS) ; /*NOTREACHED*/ } diff -cN dvips/makefont.c vms-dvips/makefont.c *** dvips/makefont.c Mon Sep 11 19:04:23 1989 --- vms-dvips/makefont.c Fri Sep 15 09:42:55 1989 *************** *** 51,56 **** --- 51,57 ---- char *name ; int dpi, bdpi ; { + #ifndef VMS register char *p, *q ; register int m, n ; *************** *** 128,131 **** --- 129,133 ---- if (! quiet) (void)fprintf(stderr, "- %s\n", buf) ; (void)system(buf) ; + #endif } diff -cN dvips/output.c vms-dvips/output.c *** dvips/output.c Thu Sep 7 11:10:06 1989 --- vms-dvips/output.c Fri Sep 15 09:43:29 1989 *************** *** 326,332 **** --- 326,334 ---- * point, and popen if so. */ if (*oname == '!' || *oname == '|') { + #ifndef VMS if ((bitfile=popen(oname+1, "w"))==NULL) + #endif error("! couldn't open output pipe") ; } else { if ((bitfile=fopen(oname,"w"))==NULL) diff -cN dvips/readme.vms vms-dvips/readme.vms *** dvips/readme.vms Wed Dec 31 19:00:00 1969 --- vms-dvips/readme.vms Fri Sep 15 10:55:37 1989 *************** *** 0 **** --- 1,10 ---- + 15 September 1989 + + Once needs to change the file Makefile.vms to reflect the directories + where the .pk and .tfm files are stored. Paths are specified with a + comma-separated list. + + There is no support for printers and piping to a filter. + + Angel Li + angel@flipper.miami.edu diff -cN dvips/search.c vms-dvips/search.c *** dvips/search.c Mon Aug 28 15:35:28 1989 --- vms-dvips/search.c Fri Sep 15 09:44:29 1989 *************** *** 14,21 **** --- 14,25 ---- #include #define MAXPATHLEN (128) #else /* ~SYSV */ + #ifdef VMS + #define MAXPATHLEN (256) + #else #include /* for MAXPATHLEN */ #include /* for strlen */ + #endif #endif /* ~SYSV */ #include "structures.h" #include "debug.h" *************** *** 27,33 **** --- 31,41 ---- /* argument to fopen */ #define READ "r" /* directories are separated in the path by PATHSEP */ + #ifdef VMS + #define PATHSEP ',' + #else #define PATHSEP ':' + #endif /* DIRSEP is the char that separates directories from files */ #define DIRSEP '/' extern void error() ; diff -cN dvips/squeeze.c vms-dvips/squeeze.c *** dvips/squeeze.c Sat Sep 2 00:14:58 1989 --- vms-dvips/squeeze.c Fri Sep 15 09:45:17 1989 *************** *** 6,12 **** * This routine squeezes a PostScript file down to it's * minimum. We parse and then output it. */ ! #include "stdio.h" #define LINELENGTH (78) #define BUFLENGTH (1000) #undef putchar --- 6,21 ---- * This routine squeezes a PostScript file down to it's * minimum. We parse and then output it. */ ! #include ! ! #ifdef VMS ! #define GOOD_EXIT_STATUS 1 ! #define BAD_EXIT_STATUS 44 ! #else ! #define GOOD_EXIT_STATUS 0 ! #define BAD_EXIT_STATUS 1 ! #endif ! #define LINELENGTH (78) #define BUFLENGTH (1000) #undef putchar *************** *** 75,81 **** if (argc > 3 || (in=(argc < 2 ? stdin : fopen(argv[1], "r")))==NULL || (out=(argc < 3 ? stdout : fopen(argv[2], "w")))==NULL) { (void)fprintf(stderr, "Usage: squeeze [infile [outfile]]\n") ; ! exit(1) ; } (void)fprintf(out, "%%!\n") ; while (1) { --- 84,90 ---- if (argc > 3 || (in=(argc < 2 ? stdin : fopen(argv[1], "r")))==NULL || (out=(argc < 3 ? stdout : fopen(argv[2], "w")))==NULL) { (void)fprintf(stderr, "Usage: squeeze [infile [outfile]]\n") ; ! exit(BAD_EXIT_STATUS) ; } (void)fprintf(out, "%%!\n") ; while (1) { *************** *** 106,116 **** c = getc(in) ; if (b > buf + BUFLENGTH) { (void)fprintf(stderr, "Overran buffer seeking %n", seeking) ; ! exit(1) ; } if (b > buf + BUFLENGTH) { (void)fprintf(stderr, "Overran buffer\n") ; ! exit(1) ; } *b++ = c ; if (c=='\\') --- 115,125 ---- c = getc(in) ; if (b > buf + BUFLENGTH) { (void)fprintf(stderr, "Overran buffer seeking %n", seeking) ; ! exit(BAD_EXIT_STATUS) ; } if (b > buf + BUFLENGTH) { (void)fprintf(stderr, "Overran buffer\n") ; ! exit(BAD_EXIT_STATUS) ; } *b++ = c ; if (c=='\\') *************** *** 130,136 **** } if (b == buf) { (void)fprintf(stderr, "Oops! Missed a case: %c.\n", c) ; ! exit(1) ; } *b++ = 0 ; (void)ungetc(c, in) ; --- 139,145 ---- } if (b == buf) { (void)fprintf(stderr, "Oops! Missed a case: %c.\n", c) ; ! exit(BAD_EXIT_STATUS) ; } *b++ = 0 ; (void)ungetc(c, in) ; *************** *** 139,144 **** } if (linepos != 0) putchar('\n') ; ! exit(0) ; /*NOTREACHED*/ } --- 148,153 ---- } if (linepos != 0) putchar('\n') ; ! exit(GOOD_EXIT_STATUS) ; /*NOTREACHED*/ } diff -cN dvips/vaxcrtl.opt vms-dvips/vaxcrtl.opt *** dvips/vaxcrtl.opt Wed Dec 31 19:00:00 1969 --- vms-dvips/vaxcrtl.opt Fri Sep 15 09:34:14 1989 *************** *** 0 **** --- 1,1 ---- + sys$share:vaxcrtl/share