Only in ps2pk16beta1: INSTALL Only in ps2pk16beta1: KPATHSEA.notes Only in ps2pk16beta1: Makefile.in diff -cr ../ps2pk15/PSres/Makefile.emx ps2pk16beta1/PSres/Makefile.emx *** ../ps2pk15/PSres/Makefile.emx Mon Nov 13 23:41:24 1995 --- ps2pk16beta1/PSres/Makefile.emx Fri Feb 6 17:18:02 1998 *************** *** 1,7 **** # # Makefile for EMX/gcc (dmake) # ! # Version 1.5: Nov. 1995 # # emTeX root directory --- 1,7 ---- # # Makefile for EMX/gcc (dmake) # ! # Version 1.6: Feb. 1995 # # emTeX root directory *************** *** 57,63 **** ${INSTALL} mkpsres.exe $(BINDIR)\mkpsres.exe ${INSTALL} mkpsres.doc $(MANDIR)\mkpsres.doc ! clean: ! [ ! rm -f *.o *.exe psres.a psres.dpr ! ] --- 57,67 ---- ${INSTALL} mkpsres.exe $(BINDIR)\mkpsres.exe ${INSTALL} mkpsres.doc $(MANDIR)\mkpsres.doc ! mostlyclean: ! -rm -f *.o psres.dpr ! ! maintainer-clean clean: ! -rm -f *.o psres.dpr psres.a *.exe ! ! distclean: ! -rm -f *.o psres.dpr psres.a *.exe *~ *.bak Makefile Only in ps2pk16beta1/PSres: Makefile.in diff -cr ../ps2pk15/PSres/Makefile.unx ps2pk16beta1/PSres/Makefile.unx *** ../ps2pk15/PSres/Makefile.unx Thu Feb 15 09:30:22 1996 --- ps2pk16beta1/PSres/Makefile.unx Thu Feb 26 16:41:30 1998 *************** *** 1,7 **** # # Makefile for UNIX # ! # Version 1.0 (November 1995) # # TeX root --- 1,7 ---- # # Makefile for UNIX # ! # Version 1.1 (Februari 1998) # # TeX root *************** *** 47,51 **** ${INSTALL} mkpsres $(BINDIR)/mkpsres ${INSTALL} -m 644 mkpsres.1 $(MANDIR)/mkpsres.1 ! clean: ! rm -f *.o mkpsres libpsres.a *~ --- 47,57 ---- ${INSTALL} mkpsres $(BINDIR)/mkpsres ${INSTALL} -m 644 mkpsres.1 $(MANDIR)/mkpsres.1 ! mostlyclean: ! -rm -f *.o ! ! maintainer-clean clean: ! -rm -f *.o mkpsres libpsres.a ! ! distclean: ! -rm -f *.o mkpsres libpsres.a *~ *.bak Makefile *.orig *.diff Only in ps2pk16beta1/PSres: configure Only in ps2pk16beta1/PSres: configure.in diff -cr ../ps2pk15/PSres/mkpsres.c ps2pk16beta1/PSres/mkpsres.c *** ../ps2pk15/PSres/mkpsres.c Thu Feb 22 11:35:20 1996 --- ps2pk16beta1/PSres/mkpsres.c Thu Feb 26 16:43:29 1998 *************** *** 45,50 **** --- 45,54 ---- * ! changed fscanf(file,"%256s",...) on some places into more portable code * * Modifier: Piet Tutelaers (Februari 1996) + * + * Februari 1998: bugfixes + * NB: Nelson Beebe + * SK: Siep Kroonenberg */ #include *************** *** 1581,1587 **** fontName = PFMname(fileName); if (fontName == NULL) { ! printf("Can not identify %s file\n", fileName); return false; } AddResource("FontPFM", fontName, fileName, false); --- 1585,1593 ---- fontName = PFMname(fileName); if (fontName == NULL) { ! /* NB: added condition */ ! if (issueWarnings) ! printf("Can not identify %s file\n", fileName); return false; } AddResource("FontPFM", fontName, fileName, false); *************** *** 1663,1668 **** --- 1669,1676 ---- } ResourceKey; static ResourceKey resourceTypes[] = { + /* SK: added "%!FontType1-" for BaKoMa and cjk outile fonts */ + {"%!FontType1-", 12, NULL, 0, ProcessFont}, {"%!PS-AdobeFont-", 15, NULL, 0, ProcessFont}, {"%!PS-Adobe-", 11, " Resource-", 10, ProcessResource}, {"STARTFONT", 9, NULL, 0, ProcessBDF}, *************** *** 2403,2410 **** PFM = fopen(name, RB); if (PFM == NULL) { ! printf("%s: no such file\n", name); ! exit(1); } /* read complete PFM font and check file length */ --- 2411,2419 ---- PFM = fopen(name, RB); if (PFM == NULL) { ! /* NB: improved `no file' handling */ ! HandleUnopenableUPRFile(name, errno); ! return NULL; } /* read complete PFM font and check file length */ *************** *** 2420,2426 **** if (buffer[i] != '\0') buffer[i++] = '\0'; p = (char *) malloc(i - fontname_offset); if (p == NULL) { printf("Out of memory\n"); exit(1); } ! strncpy(p, &buffer[fontname_offset], i - fontname_offset); return p; badpfm: --- 2429,2436 ---- if (buffer[i] != '\0') buffer[i++] = '\0'; p = (char *) malloc(i - fontname_offset); if (p == NULL) { printf("Out of memory\n"); exit(1); } ! /* NB: added (char*) cast */ ! strncpy(p, (char*)&buffer[fontname_offset], i - fontname_offset); return p; badpfm: Only in ps2pk16beta1: RELNOTES.16 diff -cr ../ps2pk15/common/Makefile.emx ps2pk16beta1/common/Makefile.emx *** ../ps2pk15/common/Makefile.emx Mon Nov 13 23:41:46 1995 --- ps2pk16beta1/common/Makefile.emx Thu Feb 26 16:44:07 1998 *************** *** 1,7 **** # # Makefile for EMX / dmake # ! # Version 1.0: Nov 1995 # # Compiler directives and other goodies --- 1,7 ---- # # Makefile for EMX / dmake # ! # Version 1.1: Feb 1998 # # Compiler directives and other goodies *************** *** 30,34 **** texfiles.o: texfiles.c $(CC) $(CFLAGS) -c texfiles.c ! clean: ! rm -f *.o common.a --- 30,40 ---- texfiles.o: texfiles.c $(CC) $(CFLAGS) -c texfiles.c ! mostlyclean: ! -rm -f *.o ! ! maintainer-clean clean: ! -rm -f *.o common.a ! ! distclean: clean ! -rm -f *.o common.a *~ *.bak Makefile Only in ps2pk16beta1/common: Makefile.in diff -cr ../ps2pk15/common/Makefile.unx ps2pk16beta1/common/Makefile.unx *** ../ps2pk15/common/Makefile.unx Wed Feb 7 15:38:13 1996 --- ps2pk16beta1/common/Makefile.unx Thu Feb 26 16:44:40 1998 *************** *** 1,14 **** # # Makefile for UNIX # ! # Version 1.0: Nov 1995 # # Compiler directives and other goodies SYSTEM = UNIX DEBUG = -g OPTIMIZE = -O ! CFLAGS = -D$(SYSTEM) $(DEBUG) $(OPTIMIZE) libcommon.a: basics.o filenames.o psearch.o strexpr.o texfiles.o -rm -f libcommon.a --- 1,14 ---- # # Makefile for UNIX # ! # Version 1.1: Feb 1998 # # Compiler directives and other goodies SYSTEM = UNIX DEBUG = -g OPTIMIZE = -O ! CFLAGS = -D$(SYSTEM) $(DEBUG) $(OPTIMIZE) $(EXTRA) libcommon.a: basics.o filenames.o psearch.o strexpr.o texfiles.o -rm -f libcommon.a *************** *** 30,34 **** texfiles.o: texfiles.c $(CC) $(CFLAGS) -c texfiles.c ! clean: ! rm -f *.o libcommon.a --- 30,40 ---- texfiles.o: texfiles.c $(CC) $(CFLAGS) -c texfiles.c ! mostlyclean: ! -rm -f *.o ! ! maintainer-clean clean: ! -rm -f *.o libcommon.a ! ! distclean: ! -rm -f *.o libcommon.a *~ *.bak Makefile *.orig *.diff diff -cr ../ps2pk15/common/basics.c ps2pk16beta1/common/basics.c *** ../ps2pk15/common/basics.c Thu Nov 9 01:57:24 1995 --- ps2pk16beta1/common/basics.c Thu Feb 26 16:47:42 1998 *************** *** 1,18 **** /* FILE: basics.c * PURPOSE: basic functions * AUTHOR: Piet Tutelaers ! * VERSION: 1.0 (September 1995) */ #include #include #include #include /* stat() */ /* Give up ... */ void fatal(char *fmt, ...) { va_list args; va_start(args, fmt); vfprintf(stderr, fmt, args); va_end(args); --- 1,31 ---- /* FILE: basics.c * PURPOSE: basic functions * AUTHOR: Piet Tutelaers ! * VERSION: 1.1 (Februari 1998) */ #include #include + #include #include #include /* stat() */ + /* provide a pointer to a cleanup() function in fatal() */ + static void (*cleanup)() = NULL; + + void set_cleanup(void (*func)()) { + cleanup = func; + } + + void reset_cleanup() { + cleanup = NULL; + } + /* Give up ... */ void fatal(char *fmt, ...) { va_list args; + if (cleanup != NULL) cleanup(); va_start(args, fmt); vfprintf(stderr, fmt, args); va_end(args); *************** *** 30,36 **** --- 43,53 ---- } /* default FILE opener */ + #ifdef WIN32 /* FP added WIN32 */ + FILE* (__cdecl * pfopen) (const char *, const char *) = fopen; + #else FILE * (*pfopen)(const char *, const char *) = fopen; + #endif /* A verbose fopen() function */ FILE *my_fopen(const char *path, const char *mode) *************** *** 44,50 **** --- 61,71 ---- } /* default stat-ter */ + #ifdef WIN32 /* FP added WIN32 */ + int (__cdecl * pstat)(const char *, struct stat *) = stat; + #else int (*pstat)(const char *, struct stat *) = stat; + #endif /* verbose stat function */ int my_stat(const char *path, struct stat *buf) diff -cr ../ps2pk15/common/basics.h ps2pk16beta1/common/basics.h *** ../ps2pk15/common/basics.h Thu Nov 9 05:10:02 1995 --- ps2pk16beta1/common/basics.h Thu Feb 26 16:54:07 1998 *************** *** 1,22 **** /* FILE: basics.h * PURPOSE: basic definitions * AUTHOR: Piet Tutelaers ! * VERSION: 1.0 (September 1995) */ #ifndef NOBASICS ! #ifdef MSDOS ! #define PATHSEP ';' ! #define DIRSEP '\\' ! #define ESCAPECHAR '!' ! #define RECURSIVE "!!" ! #define PSRES_NAME "psres.dpr" ! #define RB "rb" ! #define WB "wb" #endif ! #ifndef PATHSEP #define PATHSEP ':' #endif --- 1,23 ---- /* FILE: basics.h * PURPOSE: basic definitions * AUTHOR: Piet Tutelaers ! * VERSION: 1.1 (Februari 1998) */ #ifndef NOBASICS ! #if defined(MSDOS) || defined(WIN32) /* FP added WIN32 */ ! # define PATHSEP ';' ! # define DIRSEP '\\' ! # define DEVSEP ':' ! # define ESCAPECHAR '!' ! # define RECURSIVE "!!" ! # define PSRES_NAME "psres.dpr" ! # define RB "rb" ! # define WB "wb" #endif ! #ifndef PATHSEP #define PATHSEP ':' #endif *************** *** 25,30 **** --- 26,35 ---- #define DIRSEP '/' #endif + #ifndef DEVSEP /* no logical devices on UNIX */ + #define DEVSEP 0 + #endif + #ifndef ESCAPECHAR #define ESCAPECHAR '\\' #endif *************** *** 59,64 **** --- 64,76 ---- #include + /* + * Set_cleanup(cleanup) installs a cleanup() function which is called + * before calling exit() in fatal(). Reset_cleanup() resets to NULL + * funcion. + */ + void set_cleanup(void (*func)()); + void reset_cleanup(); void fatal(char *fmt, ...); void msg(char *fmt, ...); Only in ps2pk16beta1/common: configure Only in ps2pk16beta1/common: configure.in diff -cr ../ps2pk15/common/filenames.c ps2pk16beta1/common/filenames.c *** ../ps2pk15/common/filenames.c Mon Jan 22 09:49:06 1996 --- ps2pk16beta1/common/filenames.c Fri Feb 13 10:02:46 1998 *************** *** 1,24 **** /* FILE: filenames.c * PURPOSE: some handy functions for working with TeXfiles * AUTHOR: Piet Tutelaers (internet: rcpt@urc.tue.nl) ! * VERSION: 1.3 (August 1992) ! * VERSION: 1.4 (January 1994) ! * VERSION: 1.5 (September 1995) */ #include #include #include ! #include #include "basics.h" /* basic definitions and fatal() */ /* for those systems that don't provide an ANSI strchr() */ ! static char *charptr(char *name, char c) { while (*name != c && *name != '\0') name++; if (*name == '\0') return NULL; else return name; } /* comparing names (system dependant) */ int equal(char *s, char *t) --- 1,24 ---- /* FILE: filenames.c * PURPOSE: some handy functions for working with TeXfiles * AUTHOR: Piet Tutelaers (internet: rcpt@urc.tue.nl) ! * VERSION: 1.6 (Februari 1998) */ #include #include #include ! #include /* strchr(), strncpy() ... */ #include "basics.h" /* basic definitions and fatal() */ /* for those systems that don't provide an ANSI strchr() */ ! #ifndef HAVE_STRCHR ! static char *strchr(char *name, char c) { while (*name != c && *name != '\0') name++; if (*name == '\0') return NULL; else return name; } + #endif /* comparing names (system dependant) */ int equal(char *s, char *t) *************** *** 70,83 **** } /* ! * Derived from BSD basename */ ! char *basename(char *str, char *suffix){ char *p, *t; int len = 0; char *base; ! for (p = base = str; *p;) { ! if (*p++ == DIRSEP) { base = p; len = 0; } else len++; } if (suffix != NULL) { --- 70,87 ---- } /* ! * Derived from BSD basename. We call it baseName to avoid clashes with ! * existing basename()'s. Consider everything before a DEVSEP as ! * a devicename (eg. c:\win95\command.com or amigaTeX:pk). */ ! char *baseName(char *str, char *suffix){ char *p, *t; int len = 0; char *base; ! for (p = base = str; *p; p++) { ! if (*p == DIRSEP || *p == DEVSEP) { ! base = p+1; len = 0; ! } else len++; } if (suffix != NULL) { *************** *** 103,109 **** * (no extension and no absolute pathname). */ int ps_resource(char *name) { ! if (charptr(name, '.')) return 0 ; ! if (charptr(name, DIRSEP)) return 0 ; return 1; } --- 107,114 ---- * (no extension and no absolute pathname). */ int ps_resource(char *name) { ! if (strchr(name, '.')) return 0 ; ! if (strchr(name, DIRSEP)) return 0 ; ! if (DEVSEP != 0 && strchr(name, DEVSEP)) return 0 ; return 1; } diff -cr ../ps2pk15/common/filenames.h ps2pk16beta1/common/filenames.h *** ../ps2pk15/common/filenames.h Fri Nov 3 18:16:16 1995 --- ps2pk16beta1/common/filenames.h Thu Feb 26 17:06:46 1998 *************** *** 1,8 **** /* FILE: filenames.h * PURPOSE: functions for handling file names ! * VERSION: 1.3 (August 1992) ! * VERSION: 1.4 (January 1994) ! * VERSION: 1.5 (September 1995) */ /* --- 1,6 ---- /* FILE: filenames.h * PURPOSE: functions for handling file names ! * VERSION: 1.6 (Februari 1998) */ /* *************** *** 16,22 **** * a new string is allocated so that the original value of str is * not changed. */ ! char *basename(char *str, char *suffix); /* * Newname builds a new filename by adding or replacing the extension --- 14,20 ---- * a new string is allocated so that the original value of str is * not changed. */ ! char *baseName(char *str, char *suffix); /* * Newname builds a new filename by adding or replacing the extension diff -cr ../ps2pk15/common/psearch.c ps2pk16beta1/common/psearch.c *** ../ps2pk15/common/psearch.c Tue Jan 16 10:44:07 1996 --- ps2pk16beta1/common/psearch.c Thu Feb 26 17:07:59 1998 *************** *** 1,8 **** /* * FILE: psearch.c * PURPOSE: PATH search module - * VERSION: 1.0 (Nov. 1995) * AUTHOR: Piet Tutelaers (rcpt@urc.tue.nl) */ #define _POSIX_SOURCE 1 --- 1,8 ---- /* * FILE: psearch.c * PURPOSE: PATH search module * AUTHOR: Piet Tutelaers (rcpt@urc.tue.nl) + * VERSION: 1.0 (Nov. 1995) */ #define _POSIX_SOURCE 1 Only in ps2pk16beta1: configure Only in ps2pk16beta1: configure.in diff -cr ../ps2pk15/misc/Makefile.emx ps2pk16beta1/misc/Makefile.emx *** ../ps2pk15/misc/Makefile.emx Mon Nov 13 23:56:58 1995 --- ps2pk16beta1/misc/Makefile.emx Thu Feb 26 17:10:55 1998 *************** *** 1,7 **** # # Makefile for EMX / dmake # ! # Version 1.0: Nov 1995 # # emTeX root directory --- 1,7 ---- # # Makefile for EMX / dmake # ! # Version 1.1: Feb 1998 # # emTeX root directory *************** *** 148,160 **** $(INSTALL) pfb2pfa.exe ${BINDIR}/pfb2pfa $(INSTALL) pfb2pfa.doc ${MANDIR}/pfb2pfa.doc ! clean: [ ! rm -f *.exe *.o ! rm -f config.ps utopia.map PSres.dpr cd ..\common ! $(MAKE) -f Makefile.emx clean cd ..\PSres ! $(MAKE) -f Makefile.emx clean ] --- 148,180 ---- $(INSTALL) pfb2pfa.exe ${BINDIR}/pfb2pfa $(INSTALL) pfb2pfa.doc ${MANDIR}/pfb2pfa.doc ! mostlyclean: [ ! -rm -f *.o config.ps utopia.map PSres.dpr cd ..\common ! -$(MAKE) -f Makefile.emx mostlyclean cd ..\PSres ! -$(MAKE) -f Makefile.emx mostlyclean ! ] ! ! maintainer-clean clean: ! [ ! -rm -f *.o config.ps utopia.map PSres.dpr ! -rm -f *.*pk *.exe ! cd ..\common ! -$(MAKE) -f Makefile.emx clean ! cd ..\PSres ! -$(MAKE) -f Makefile.emx clean ! ] ! ! distclean: ! [ ! -rm -f *.o config.ps utopia.map PSres.dpr ! -rm -f *.*pk *.exe ! -rm -f *~ *.bak Makefile ! cd ..\common ! -$(MAKE) -f Makefile.emx distclean ! cd ..\PSres ! -$(MAKE) -f Makefile.emx distclean ] diff -cr ../ps2pk15/misc/Makefile.unx ps2pk16beta1/misc/Makefile.unx *** ../ps2pk15/misc/Makefile.unx Thu Feb 15 10:27:09 1996 --- ps2pk16beta1/misc/Makefile.unx Thu Feb 26 17:12:22 1998 *************** *** 1,7 **** # # Makefile for UNIX # ! # Version 1.0: Oct 1995 # SHELL = /bin/sh --- 1,7 ---- # # Makefile for UNIX # ! # Version 1.1: Feb 1998 # SHELL = /bin/sh *************** *** 22,27 **** --- 22,29 ---- SYSTEM = UNIX DEBUG = -g OPTIMIZE = -O + #EXTRA = -DHAVE_STRCHR + EXTRA = -DSTDC_HEADERS -DHAVE_DIRENT_H CFLAGS = -D$(SYSTEM) $(DEBUG) $(OPTIMIZE) $(COMMONHDR) $(EXTRA) makeargs = RANLIB='$(RANLIB)' CFLAGS='$(CFLAGS)' SYSTEM='$(SYSTEM)' *************** *** 130,137 **** $(INSTALL) pfb2pfa ${BINDIR}/pfb2pfa $(INSTALL) -m 644 pfb2pfa.1 ${MANDIR}/pfb2pfa.1 ! clean: ! rm -f basename lspsres mag pfb2pfa psargs psearch sexpr *.o ! rm -f config.ps utopia.map PSres.upr PSres.upr~ ! (cd ../common; $(MAKE) -f Makefile.unx clean) ! (cd ../PSres; $(MAKE) -f Makefile.unx clean) --- 132,151 ---- $(INSTALL) pfb2pfa ${BINDIR}/pfb2pfa $(INSTALL) -m 644 pfb2pfa.1 ${MANDIR}/pfb2pfa.1 ! mostlyclean: ! -rm -f *.o config.ps utopia.map PSres.upr ! -(cd ../common; $(MAKE) -f Makefile.unx mostlyclean) ! -(cd ../PSres; $(MAKE) -f Makefile.unx mostlyclean) ! ! maintainer-clean clean: ! -rm -f *.o config.ps utopia.map PSres.upr ! -rm -f *.*pk basename lspsres mag pfb2pfa psargs psearch sexpr ! -(cd ../common; $(MAKE) -f Makefile.unx clean) ! -(cd ../PSres; $(MAKE) -f Makefile.unx clean) ! ! distclean: ! -rm -f *.o config.ps utopia.map PSres.upr ! -rm -f *.*pk basename lspsres mag pfb2pfa psargs psearch sexpr ! -rm -f *~ *.bak Makefile *.orig *.diff ! -(cd ../common; $(MAKE) -f Makefile.unx distclean) ! -(cd ../PSres; $(MAKE) -f Makefile.unx distclean) diff -cr ../ps2pk15/misc/basename.c ps2pk16beta1/misc/basename.c *** ../ps2pk15/misc/basename.c Tue Oct 17 07:06:10 1995 --- ps2pk16beta1/misc/basename.c Thu Feb 12 16:05:35 1998 *************** *** 4,14 **** * used as a function in other programs (see filenames.c and * filenames.h) * AUTHOR: Piet Tutelaers ! * VERSION: 1.0 (Sept. 1995) */ #include /* printf() */ #include "basics.h" /* fatal() */ ! #include "filenames.h" /* basename() */ main(int argc, char **argv) { --- 4,14 ---- * used as a function in other programs (see filenames.c and * filenames.h) * AUTHOR: Piet Tutelaers ! * VERSION: 1.1 (Febr. 1998) */ #include /* printf() */ #include "basics.h" /* fatal() */ ! #include "filenames.h" /* baseName() */ main(int argc, char **argv) { *************** *** 16,23 **** fatal("Usage: basename string [suffix]\n"); if (argc == 2) ! printf("%s\n", basename(argv[1], NULL)); else ! printf("%s\n", basename(argv[1], argv[2])); exit(0); } --- 16,23 ---- fatal("Usage: basename string [suffix]\n"); if (argc == 2) ! printf("%s\n", baseName(argv[1], NULL)); else ! printf("%s\n", baseName(argv[1], argv[2])); exit(0); } diff -cr ../ps2pk15/misc/pfb2pfa.c ps2pk16beta1/misc/pfb2pfa.c *** ../ps2pk15/misc/pfb2pfa.c Sun Sep 24 13:57:04 1995 --- ps2pk16beta1/misc/pfb2pfa.c Thu Feb 26 17:13:49 1998 *************** *** 17,32 **** * Piet Tutelaers (rcpt@urc.tue.nl) */ - #ifdef MSDOS - #define NEWLINE '\012' - #else - #define NEWLINE '\n' - #endif - #include #include #include "basics.h" /* basic definitions and fatal() */ #include "filenames.h" /* newname() */ #define HEX_PER_LINE 30 --- 17,32 ---- * Piet Tutelaers (rcpt@urc.tue.nl) */ #include #include #include "basics.h" /* basic definitions and fatal() */ #include "filenames.h" /* newname() */ + + #if defined(MSDOS) || defined(DOSISH) /* FP added DOSISH */ + #define NEWLINE '\012' + #else + #define NEWLINE '\n' + #endif #define HEX_PER_LINE 30 diff -cr ../ps2pk15/mtpk/INSTALL ps2pk16beta1/mtpk/INSTALL *** ../ps2pk15/mtpk/INSTALL Thu Feb 15 11:02:48 1996 --- ps2pk16beta1/mtpk/INSTALL Fri Feb 6 17:17:03 1998 *************** *** 21,26 **** --- 21,28 ---- - `make -f Makefile.unx test' (`make -f Makefile.unx RANLIB=touch test' on SYS5) (`make -f Makefile.unx CC=gcc EXTRA=-DNOSTRERROR test' on SunOS4.1.3) + (`make -f Makefile.unx EXTRA="-YPOSIX -DCHARSPRINTF" DEBUG=-g3 test' + on Ultrix 4.4) The test is succeeded if the PK font ./putro8r.329pk is created properly. The test expects the new version of ps2pk in your diff -cr ../ps2pk15/mtpk/Makefile.emx ps2pk16beta1/mtpk/Makefile.emx *** ../ps2pk15/mtpk/Makefile.emx Tue Dec 5 13:27:51 1995 --- ps2pk16beta1/mtpk/Makefile.emx Thu Feb 26 17:15:57 1998 *************** *** 1,7 **** # # Makefile for EMX/gcc (dmake) # ! # Version 1.5: Nov. 1995 # # emTeX root directory --- 1,7 ---- # # Makefile for EMX/gcc (dmake) # ! # Version 1.6: Feb. 1998 # # emTeX root directory *************** *** 42,50 **** all: mtpk.exe pkfonts.exe ! mtpk.exe: mtpk.o cfg.o psinfo.o system.o $(COMMON-LIB) $(PSRES-LIB) ! $(CC) -o mtpk.exe mtpk.o cfg.o psinfo.o system.o $(COMMONLIB) \ ! $(PSRESLIB) -lm psinfo.o: psinfo.c $(COMMON-LIB) $(CC) $(CFLAGS) $(COMMONHDR) -c psinfo.c --- 42,57 ---- all: mtpk.exe pkfonts.exe ! mtpk.exe: mtpk.o cfg.o psinfo.o system.o ..\ps2pk\encoding.o \ ! $(COMMON-LIB) $(PSRES-LIB) ! $(CC) -o mtpk.exe mtpk.o cfg.o psinfo.o system.o ..\ps2pk\encoding.o \ ! $(COMMONLIB) $(PSRESLIB) -lm ! ! ..\ps2pk\encoding.o: ..\ps2pk\encoding.c ! [ ! cd ..\ps2pk ! make -f Makefile.emx encoding.o ! ] psinfo.o: psinfo.c $(COMMON-LIB) $(CC) $(CFLAGS) $(COMMONHDR) -c psinfo.c *************** *** 74,91 **** cfg.o: cfg.c cfg.h $(COMMON-LIB) Makefile.emx $(CC) $(CFLAGS) $(COMMONHDR) -DMTPKCFG=\"$(MTPKCFG)\" -c cfg.c ! test: mtpk.exe config.ps utopia.map psres.dpr ! @+echo === testing: mtpk -v putro8r 330 300 ======= ! @.\mtpk.exe -v putro8r 330 300 psres.dpr: ..\PSres\mkpsres.exe ! ..\PSres\mkpsres ..\PSources config.ps: ! @+echo p +utopia.map > config.ps utopia.map: ! @+echo putro8r Utopia-Regular " .167 SlantFont TeXBase1Encoding \ ReEncodeFont " > utopia.map ..\PSres\mkpsres.exe: ..\PSres\mkpsres.c --- 81,98 ---- cfg.o: cfg.c cfg.h $(COMMON-LIB) Makefile.emx $(CC) $(CFLAGS) $(COMMONHDR) -DMTPKCFG=\"$(MTPKCFG)\" -c cfg.c ! test: mtpk.exe config.ps utopia.map psres.dpr ..\ps2pk\ps2pk.exe ! echo === testing: mtpk -v putro8r 330 300 ======= ! @+.\mtpk.exe -v putro8r 330 300 psres.dpr: ..\PSres\mkpsres.exe ! @+..\PSres\mkpsres ..\PSources config.ps: ! echo p +utopia.map > config.ps utopia.map: ! echo putro8r Utopia-Regular " .167 SlantFont TeXBase1Encoding \ ReEncodeFont " > utopia.map ..\PSres\mkpsres.exe: ..\PSres\mkpsres.c *************** *** 94,99 **** --- 101,112 ---- $(MAKE) -f Makefile.emx mkpsres.exe ] + ..\ps2pk\ps2pk.exe: ..\ps2pk\ps2pk.c + [ + cd ..\ps2pk + $(MAKE) -f Makefile.emx ps2pk.exe + ] + install: pkfonts.exe mtpk.exe mtpk.dos $(INSTALL) pkfonts.exe ${BINDIR}\pkfonts.exe $(INSTALL) mtpk.emx ${MTPKCFG} *************** *** 125,136 **** $(MAKE) -f Makefile.emx $(COMMONLIBRARY) ] ! clean: [ ! rm -f *.exe *.o ! rm -f psres.dpr config.ps utopia.map cd ..\common ! $(MAKE) -f Makefile.emx clean cd ..\PSres ! $(MAKE) -f Makefile.emx clean ] --- 138,169 ---- $(MAKE) -f Makefile.emx $(COMMONLIBRARY) ] ! mostlyclean: ! [ ! -rm -f *.o psres.dpr config.ps utopia.map ! cd ..\common ! -$(MAKE) -f Makefile.emx mostlyclean ! cd ..\PSres ! -$(MAKE) -f Makefile.emx mostlyclean ! ] ! ! maintainer-clean clean: ! [ ! -rm -f *.o psres.dpr config.ps utopia.map ! -rm -f *.exe ! cd ..\common ! -$(MAKE) -f Makefile.emx clean ! cd ..\PSres ! -$(MAKE) -f Makefile.emx clean ! ] ! ! distclean: [ ! rm -f *.o psres.dpr config.ps utopia.map ! rm -f *.exe ! rm -f *~ *.bak Makefile cd ..\common ! $(MAKE) -f Makefile.emx distclean cd ..\PSres ! $(MAKE) -f Makefile.emx distclean ] Only in ps2pk16beta1/mtpk: Makefile.in diff -cr ../ps2pk15/mtpk/Makefile.unx ps2pk16beta1/mtpk/Makefile.unx *** ../ps2pk15/mtpk/Makefile.unx Thu Feb 22 17:15:43 1996 --- ps2pk16beta1/mtpk/Makefile.unx Thu Feb 26 17:19:37 1998 *************** *** 1,7 **** # # Makefile for UNIX # ! # Version 1.0: Nov 1995 # # Avoid built-in nonstandard echo --- 1,7 ---- # # Makefile for UNIX # ! # Version 1.1: Feb 1998 # # Avoid built-in nonstandard echo *************** *** 12,20 **** # MTPKCFG absolute path for configuration file # ====== final version =========== ! #MTPKCFG = ${TEXROOT}/ini/mtpk.cfg@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ # ====== test version === ! MTPKCFG = `pwd`/mtpk.unx # Here we install the binaries: BINDIR = ${TEXROOT}/bin --- 12,21 ---- # MTPKCFG absolute path for configuration file # ====== final version =========== ! #MTPKCFG = ${TEXROOT}/ini/mtpk.cfg ! #MTPKCFGSTR = ${MTPKCFG}@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ # ====== test version === ! MTPKCFGSTR = `pwd`/mtpk.unx # Here we install the binaries: BINDIR = ${TEXROOT}/bin *************** *** 30,35 **** --- 31,37 ---- # Compiler directives and other goodies #EXTRA = -DCHARSPRINTF -DNOSTRERROR # On SunOS Release 4.1.3_U1 + EXTRA = -DHAVE_STRCHR #RANLIB = touch # When no ranlib RANLIB = ranlib SYSTEM = UNIX *************** *** 52,59 **** all: mtpk pkfonts ! mtpk: mtpk.o cfg.o psinfo.o $(COMMON-LIB) $(PSRES-LIB) ! $(CC) -o mtpk mtpk.o cfg.o psinfo.o $(COMMONLIB) $(PSRESLIB) -lm psinfo.o: psinfo.c $(COMMON-LIB) $(CC) $(CFLAGS) $(COMMONHDR) -c psinfo.c --- 54,65 ---- all: mtpk pkfonts ! mtpk: mtpk.o cfg.o psinfo.o ../ps2pk/encoding.o $(COMMON-LIB) $(PSRES-LIB) ! $(CC) -o mtpk mtpk.o cfg.o psinfo.o ../ps2pk/encoding.o \ ! $(COMMONLIB) $(PSRESLIB) -lm ! ! ../ps2pk/encoding.o: ../ps2pk/encoding.c ! (cd ../ps2pk; make -f Makefile.unx encoding.o) psinfo.o: psinfo.c $(COMMON-LIB) $(CC) $(CFLAGS) $(COMMONHDR) -c psinfo.c *************** *** 77,87 **** $(CC) $(CFLAGS) $(COMMONHDR) -c printcfg.c cfg.o: cfg.c cfg.h $(COMMON-LIB) Makefile.unx ! $(CC) $(CFLAGS) $(COMMONHDR) -DMTPKCFG=\"$(MTPKCFG)\" -c cfg.c ! test: mtpk config.ps utopia.map PSres.upr @echo "=== testing: mtpk -v putro8r 330 300 =======" ! @./mtpk -v putro8r 330 300 PSres.upr: ../PSres/mkpsres ../PSres/mkpsres ../PSources --- 83,95 ---- $(CC) $(CFLAGS) $(COMMONHDR) -c printcfg.c cfg.o: cfg.c cfg.h $(COMMON-LIB) Makefile.unx ! $(CC) $(CFLAGS) $(COMMONHDR) -DMTPKCFG=\"$(MTPKCFGSTR)\" -c cfg.c ! test: mtpk config.ps utopia.map PSres.upr ../ps2pk/ps2pk @echo "=== testing: mtpk -v putro8r 330 300 =======" ! (PATH=../ps2pk:$(PATH); PSRESOURCEPATH=`pwd`; \ ! export PATH PSRESOURCEPATH; \ ! ./mtpk -dv putro8r 330 300) PSres.upr: ../PSres/mkpsres ../PSres/mkpsres ../PSources *************** *** 94,104 **** ReEncodeFont \" <8r.enc" > utopia.map ../PSres/mkpsres: ../PSres/mkpsres.c ! cd ../PSres; $(MAKE) -f Makefile.unx $(makeargs) mkpsres install: pkfonts mtpk mtpk.unx $(INSTALL) pkfonts ${BINDIR}/pkfonts ! $(INSTALL) mtpk.unx ${MTPKCFG} $(INSTALL) mtpk ${BINDIR}/mtpk chown ${PKUSER} ${BINDIR}/mtpk chmod u+s ${BINDIR}/mtpk --- 102,115 ---- ReEncodeFont \" <8r.enc" > utopia.map ../PSres/mkpsres: ../PSres/mkpsres.c ! (cd ../PSres; $(MAKE) -f Makefile.unx $(makeargs) mkpsres) ! ! ../ps2pk/ps2pk: ../ps2pk/ps2pk.c ! (cd ../ps2pk; $(MAKE) -f Makefile.unx $(makeargs) ps2pk) install: pkfonts mtpk mtpk.unx $(INSTALL) pkfonts ${BINDIR}/pkfonts ! # $(INSTALL) mtpk.unx ${MTPKCFG} $(INSTALL) mtpk ${BINDIR}/mtpk chown ${PKUSER} ${BINDIR}/mtpk chmod u+s ${BINDIR}/mtpk *************** *** 123,130 **** $(COMMON-LIB): $(HEADERS) $(SOURCES) cd ../common; $(MAKE) -f Makefile.unx $(makeargs) $(COMMONLIBRARY) ! clean: ! rm -f mtpk pkfonts printcfg *.o ! rm -f PSres.upr config.ps utopia.map *[0-9]pk ! (cd ../common; $(MAKE) -f Makefile.unx clean) ! (cd ../PSres; $(MAKE) -f Makefile.unx clean) --- 134,153 ---- $(COMMON-LIB): $(HEADERS) $(SOURCES) cd ../common; $(MAKE) -f Makefile.unx $(makeargs) $(COMMONLIBRARY) ! mostlyclean: ! -rm -f *.o rm -f PSres.upr config.ps utopia.map *[0-9]pk ! -(cd ../common; $(MAKE) -f Makefile.unx mostlyclean) ! -(cd ../PSres; $(MAKE) -f Makefile.unx mostlyclean) ! ! maintainer-clean clean: ! -rm -f *.o rm -f PSres.upr config.ps utopia.map *[0-9]pk ! -rm -f mtpk pkfonts printcfg ! -(cd ../common; $(MAKE) -f Makefile.unx clean) ! -(cd ../PSres; $(MAKE) -f Makefile.unx clean) ! ! distclean: ! -rm -f *.o rm -f PSres.upr config.ps utopia.map *[0-9]pk ! -rm -f mtpk pkfonts printcfg ! -rm -f mtpk.unx *~ *.bak Makefile *.orig *.diff ! -(cd ../common; $(MAKE) -f Makefile.unx distclean) ! -(cd ../PSres; $(MAKE) -f Makefile.unx distclean) Only in ps2pk16beta1/mtpk: configure Only in ps2pk16beta1/mtpk: configure.in Only in ps2pk16beta1/mtpk: encoding.c diff -cr ../ps2pk15/mtpk/mtpk.c ps2pk16beta1/mtpk/mtpk.c *** ../ps2pk15/mtpk/mtpk.c Thu Feb 15 10:55:07 1996 --- ps2pk16beta1/mtpk/mtpk.c Fri Feb 27 14:22:38 1998 *************** *** 49,54 **** --- 49,57 ---- #ifdef MSDOS #define THROWAWAY "> NUL" + /* _getcwd2() and _chdir2() can handle drive names */ + #define getcwd _getcwd2 + #define chdir _chdir2 #include "system.h" /* emx_system() */ #endif *************** *** 70,83 **** char *tfmpath; char *tolerance; char *res; - int oldfonts = 0; int bdpi = 0; int margin; int dpi, pkdest_dirtype, rm_forgedir = 0; ! char *texfont, *mag, *fliname, *tfmfile, *psname = NULL, *mapinfo = NULL; ! char currentdir[MAXSTRLEN], forgedir[MAXSTRLEN]; ! int real_uid = -1, eff_uid = -1; char *pkuser; /* prototypes of the functions we use */ void cleanup(char *dirname); --- 73,87 ---- char *tfmpath; char *tolerance; char *res; int bdpi = 0; int margin; int dpi, pkdest_dirtype, rm_forgedir = 0; ! float efactor = 1.0; ! char *texfont, *mag, *fliname, *tfmfile, *encfile = NULL, *afmfile, ! *psname = NULL, *mapinfo = NULL; ! char *currentdir = NULL, forgedir[MAXSTRLEN]; ! uid_t real_uid = -1, eff_uid = -1; char *pkuser; /* prototypes of the functions we use */ void cleanup(char *dirname); *************** *** 86,91 **** --- 90,96 ---- char *magnification (int dpi, int BDPI); void makefont(int cnt, char cmd[2][80], char target[2][80]); int matching(char *font, int size); + void restorewd(); main(int argc, char *argv[]) { char *pkname, *p, *rendors, *plus; *************** *** 170,188 **** fatal("definition of tfmpath missing in mtpk.cfg\n"); if (debug) msg("tfmpath = %s\n", tfmpath); ! /* check for `oldfonts' */ ! { char *old_fonts; ! ! old_fonts = cfg_value("oldfonts"); ! if (old_fonts != NULL && strcmp(old_fonts, "1") == 0) { ! oldfonts = 1; ! if (debug) msg("old style checksums will be used\n"); ! } ! } ! ! /* remember current directory */ ! if (getcwd(currentdir, MAXSTRLEN) == NULL) ! fatal("Could not determine current dir (%s)\n", strerror(errno)); /* When a directory in the PK path has write permission by * `pkuser' it will be considered as PUBLIC if this program has --- 175,182 ---- fatal("definition of tfmpath missing in mtpk.cfg\n"); if (debug) msg("tfmpath = %s\n", tfmpath); ! /* check if we have a TFM font before we leave the current dir */ ! tfmfile = search_file(tfmpath, newname(texfont, ".tfm"), NONFATAL); /* When a directory in the PK path has write permission by * `pkuser' it will be considered as PUBLIC if this program has *************** *** 197,215 **** if ((pwe = getpwnam(pkuser)) == NULL) msg("mtpk.cfg: pkuser = %s (undefined login)\n", pkuser); else { ! eff_uid = pwe->pw_uid; ! if (seteuid(eff_uid) == -1) { ! eff_uid = -1; ! if (debug) msg("mtpk: can not get x-permission for %s\n", pkuser); } else { ! if (debug) msg("mtpk: x-permission for %s\n", pkuser); ! seteuid(real_uid); } } } #endif rendors = cfg_value("rendors"); if (rendors == NULL) rendors = RENDORS; --- 191,217 ---- if ((pwe = getpwnam(pkuser)) == NULL) msg("mtpk.cfg: pkuser = %s (undefined login)\n", pkuser); else { ! eff_uid = geteuid(); ! if (eff_uid != pwe->pw_uid) { ! if (debug) msg("mtpk: no set-uid permission for %s\n", pkuser); } else { ! if (debug) msg("mtpk: set-uid permission for %s\n", pkuser); } + /* Change to the `real user' now; later when we install the font + * or update the logfile we will change back to the eff_uid. + */ + if (seteuid(real_uid) == -1) + fatal("mtpk (seteuid(%d->%d)): %s\n", eff_uid, + real_uid, strerror(errno)); } } #endif + /* remember current directory */ + if ((currentdir = (char *) getcwd(NULL, MAXSTRLEN)) == NULL) + fatal("Could not determine current dir (%s)\n", strerror(errno)); + rendors = cfg_value("rendors"); if (rendors == NULL) rendors = RENDORS; *************** *** 284,290 **** } void try_ps2pk() { ! char *psrespath, **names, **files, args[80]; int count; /* Get ps2pk arguments from mapinfo */ --- 286,292 ---- } void try_ps2pk() { ! char *pargs, *psrespath, **names, **files, args[80]; int count; /* Get ps2pk arguments from mapinfo */ *************** *** 295,300 **** --- 297,338 ---- fatal("psrespath undefined in mtpk.cfg\n"); if (debug) msg("psrespath = %s\n", psrespath); + /* do we need an encoding file? */ + if ((pargs = strstr(args, "-e")) != NULL) { + char encname[MAXPATHLEN]; int i; + pargs+=2; while (isspace(*pargs)) pargs++; + i = 0; + while ((*pargs != '\0') && !isspace(*pargs)) + encname[i++] = *(pargs++); + encname[i] = '\0'; + count = ListPSResourceFiles(psrespath, NULL, + "Encoding", encname, &names, &files); + if (count == 0) + fatal("No encoding for %s found\n", encname); + else { + encfile = *files; + if (count > 1) + msg("Warning: there are %d encodings for %s!\n", + count, encname); + } + } + + /* get expansion factor */ + if ((pargs = strstr(args, "-E")) != NULL) { + efactor = atof(pargs); + } + + /* find the AFMfile */ + count = ListPSResourceFiles(psrespath, NULL, + "FontAFM", psname, &names, &files); + if (count == 0) + fatal("No AFM for %s found\n", psname); + else { + afmfile = *files; + if (count > 1) + msg("Warning: there are %d AFMfiles for %s!\n", count, psname); + } + /* Do we have an outline font? */ count = ListPSResourceFiles(psrespath, NULL, "FontOutline", psname, &names, &files); *************** *** 311,322 **** if ((yres = cfg_value("yres")) != NULL) sprintf(cmds[0], "ps2pk %s%s-X%d -Y%s %s%s %s %s", ! debug ? "-v " : "", oldfonts ? "-O " : "", dpi, yres, args, psname, targets[0], debug ? "" : THROWAWAY); else sprintf(cmds[0], "ps2pk %s%s-X%d %s%s %s %s", ! debug ? "-v " : "", oldfonts ? "-O " : "", dpi, args, psname, targets[0], debug ? "" : THROWAWAY); makefont(1, cmds, targets); --- 349,360 ---- if ((yres = cfg_value("yres")) != NULL) sprintf(cmds[0], "ps2pk %s%s-X%d -Y%s %s%s %s %s", ! debug ? "-v " : "", oldfonts() ? "-O " : "", dpi, yres, args, psname, targets[0], debug ? "" : THROWAWAY); else sprintf(cmds[0], "ps2pk %s%s-X%d %s%s %s %s", ! debug ? "-v " : "", oldfonts() ? "-O " : "", dpi, args, psname, targets[0], debug ? "" : THROWAWAY); makefont(1, cmds, targets); *************** *** 400,408 **** char *forge; unsigned int unique(); - /* check if we have a TFM font before we leave the current dir */ - tfmfile = search_file(tfmpath, newname(texfont, ".tfm"), NONFATAL); - /* make an unique font forge directory */ if (forge = cfg_value("forge")) { i = 0; --- 438,443 ---- *************** *** 424,429 **** --- 459,468 ---- } if (chdir(forgedir) == -1) fatal("%s: could not chdir (%s)\n", forgedir, strerror(errno)); + if (debug) msg("chdir %s\n", forgedir); + #ifdef MSDOS + set_cleanup(restorewd); + #endif } else strcpy(forgedir, currentdir); *************** *** 683,689 **** if (pstat(pkdir, &status) != 0) fatal("%s: can not stat\n", pkdir); if (status.st_uid == eff_uid) { if (seteuid(eff_uid) == -1) ! fatal("%s: can't get SUID permissions\n", pkdir); /* No user interrupts */ signal(SIGINT, SIG_IGN); --- 722,729 ---- if (pstat(pkdir, &status) != 0) fatal("%s: can not stat\n", pkdir); if (status.st_uid == eff_uid) { if (seteuid(eff_uid) == -1) ! fatal("mtpk (seteuid(%d->%d)): %s\n", real_uid, ! eff_uid, strerror(errno)); /* No user interrupts */ signal(SIGINT, SIG_IGN); *************** *** 710,715 **** --- 750,758 ---- /* copy font (atomic action) */ copy(pkfile, pkdest); + #ifdef HAVE_XDVIK + printf("%s\n", pkdest); /* added Anton Stoorvogel */ + #endif if (verbose) msg("%s: installed\n", pkdest); /* log PK font (atomic action) */ *************** *** 746,751 **** --- 789,795 ---- #endif clean_up: + reset_cleanup(); if (debug != 1 && strcmp(currentdir, forgedir) != 0) { if (chdir(currentdir) == -1) fatal("%s: could not chdir (%s)\n", currentdir, strerror(errno)); *************** *** 872,874 **** --- 916,1009 ---- #endif } + /* + * In MSDOS we need to restore the working directory explicitly. + */ + void restorewd() { + if (debug) msg("chdir %s\n", currentdir); + if (chdir(currentdir) == -1) + msg("%s: could not chdir (%s)\n", currentdir, strerror(errno)); + } + + typedef char *encoding[256]; + + /* + * The checksum should garantee that our PK file belongs to the correct TFM + * file! Exactly the same as the afm2tfm (dvips5487) calculation. + */ + UINT32 checksum(encoding ev, int width[256]) + { + int i, leftbit ; + UINT32 s1 = 0, s2 = 0; + char *p ; + + for (i=0; i<256; i++) { + if (ev[i] == NULL) continue; + s1 = (s1<<1) ^ width[i]; /* left shift */ + for (p=ev[i]; *p; p++) + s2 = s2 * 3 + *p ; + } + return (s1<<1) ^ s2 ; + } + + /* + * The proposed new checksum algorithm. + */ + UINT32 new_checksum(encoding ev, int width[256]) + { + int i, leftbit ; + UINT32 s1 = 0, s2 = 0; + char *p ; + + for (i=0; i<256; i++) { + if (ev[i] == NULL) continue; + s1 = ((s1<<1) ^ (s1>>31)) ^ width[i]; /* cyclic left shift */ + for (p=ev[i]; *p; p++) + s2 = s2 * 3 + *p ; + } + return (s1<<1) ^ s2 ; + } + + /* Determine what kind of checksums we have to use! */ + int oldfonts() { + char *old_fonts; + int oldstyle; + + /* check for `oldfonts' in mtpk.cfg */ + old_fonts = cfg_value("oldfonts"); + if (old_fonts != NULL && strcmp(old_fonts, "1") == 0) + oldstyle = 1; + else + oldstyle = 0; + + if (tfmfile != NULL) { + UINT32 cs; + encoding ev; + int i, WX[256]; + char *AFM_fontname = NULL, *encodingscheme = ""; + void getenc(char **, char **, encoding, int [256]); + + /* get checksum of TFM file */ + (void) checksum_texfont(tfmfile, &cs); + + getenc(&AFM_fontname, &encodingscheme, ev, WX); + if (efactor != 1.0) + for (i=0; i < 256; i++) { + if (ev[i] == NULL) continue; + WX[i] = WX[i] * efactor + 0.5; + } + + if (new_checksum(ev, WX) == cs) { + if (oldstyle && debug) + msg("TFM file does use new checksum\n"); + return 0; + } + if (checksum(ev, WX) == cs) { + if (debug && !oldstyle) + msg("TFM file does use old checksum\n"); + return 1; + } + } + if (debug && oldstyle) msg("Old style checksum will be used\n"); + return oldstyle; + } diff -cr ../ps2pk15/mtpk/psinfo.c ps2pk16beta1/mtpk/psinfo.c *** ../ps2pk15/mtpk/psinfo.c Tue Jan 16 11:47:54 1996 --- ps2pk16beta1/mtpk/psinfo.c Fri Feb 6 17:17:15 1998 *************** *** 130,136 **** *mapinfo = malloc(n + 1); if (mapinfo == NULL) fatal("Out of memory\n"); strncpy(*mapinfo, line, n); ! return ppsfont; } --- 130,137 ---- *mapinfo = malloc(n + 1); if (mapinfo == NULL) fatal("Out of memory\n"); strncpy(*mapinfo, line, n); ! *(*mapinfo + n) = '\0'; /* 970520: patch Vladimir Sarkisov ! */ return ppsfont; } diff -cr ../ps2pk15/ps2pk/CHANGES ps2pk16beta1/ps2pk/CHANGES *** ../ps2pk15/ps2pk/CHANGES Thu Feb 1 09:39:57 1996 --- ps2pk16beta1/ps2pk/CHANGES Fri Feb 27 14:07:26 1998 *************** *** 49,51 **** --- 49,55 ---- - new checksum algorithm (old still available with -O flag) - ps2pk.1 updated - added PK specials (Pierre MacKay) + + 98-02: Version 1.6 + - added autoconf stuff: Makefile.in configure.in + - KPATHSEA patches from Pierre MacKay and Fabrice Popineau diff -cr ../ps2pk15/ps2pk/Makefile.emx ps2pk16beta1/ps2pk/Makefile.emx *** ../ps2pk15/ps2pk/Makefile.emx Mon Nov 13 23:42:36 1995 --- ps2pk16beta1/ps2pk/Makefile.emx Fri Feb 27 09:57:27 1998 *************** *** 1,7 **** # # Makefile for EMX/gcc (dmake) # ! # Version 1.5: Nov. 1995 # # emTeX root directory --- 1,7 ---- # # Makefile for EMX/gcc (dmake) # ! # Version 1.6: Feb. 1998 # # emTeX root directory *************** *** 117,129 **** copy ps2pk.doc $(MANDIR) copy pk2bm.doc $(MANDIR) ! clean: [ ! rm -f *.exe *.o psres.dpr cd ..\type1 ! $(MAKE) -f Makefile.emx clean cd ..\common ! $(MAKE) -f Makefile.emx clean cd ..\PSres ! $(MAKE) -f Makefile.emx clean ] --- 117,154 ---- copy ps2pk.doc $(MANDIR) copy pk2bm.doc $(MANDIR) ! mostlyclean: [ ! -rm -f *.o psres.dpr cd ..\type1 ! -$(MAKE) -f Makefile.emx mostlyclean cd ..\common ! -$(MAKE) -f Makefile.emx mostlyclean cd ..\PSres ! -$(MAKE) -f Makefile.emx mostlyclean ! ] ! ! maintainer-clean clean: ! [ ! -rm -f *.o psres.dpr ! -rm -f *.exe ! cd ..\type1 ! -$(MAKE) -f Makefile.emx clean ! cd ..\common ! -$(MAKE) -f Makefile.emx clean ! cd ..\PSres ! -$(MAKE) -f Makefile.emx clean ! ] ! ! distclean: ! [ ! -rm -f *.o psres.dpr ! -rm -f *.exe ! -rm -f *~ *.bak Makefile ! cd ..\type1 ! -$(MAKE) -f Makefile.emx distclean ! cd ..\common ! -$(MAKE) -f Makefile.emx distclean ! cd ..\PSres ! -$(MAKE) -f Makefile.emx distclean ] Only in ps2pk16beta1/ps2pk: Makefile.in diff -cr ../ps2pk15/ps2pk/Makefile.unx ps2pk16beta1/ps2pk/Makefile.unx *** ../ps2pk15/ps2pk/Makefile.unx Thu Feb 15 10:27:51 1996 --- ps2pk16beta1/ps2pk/Makefile.unx Fri Feb 27 09:57:46 1998 *************** *** 1,7 **** # # Makefile for UNIX # ! # Version 1.5: November 1995 # # TeX root --- 1,7 ---- # # Makefile for UNIX # ! # Version 1.6: Februari 1998 # # TeX root *************** *** 119,126 **** $(INSTALL) -m 644 ps2pk.1 $(MANDIR)/ps2pk.1 $(INSTALL) -m 644 pk2bm.1 $(MANDIR)/pk2bm.1 ! clean: ! rm -f *.o *.*pk pktest ps2pk pk2bm *.upr *~ ! (cd ../common; $(MAKE) -f Makefile.unx clean) ! cd ../type1; $(MAKE) -f Makefile.unx clean ! cd ../PSres; $(MAKE) -f Makefile.unx clean --- 119,141 ---- $(INSTALL) -m 644 ps2pk.1 $(MANDIR)/ps2pk.1 $(INSTALL) -m 644 pk2bm.1 $(MANDIR)/pk2bm.1 ! mostlyclean: ! -rm -f *.o *.*pk *.upr ! -(cd ../common; $(MAKE) -f Makefile.unx mostlyclean) ! -(cd ../type1; $(MAKE) -f Makefile.unx mostlyclean) ! -(cd ../PSres; $(MAKE) -f Makefile.unx mostlyclean) ! ! maintainer-clean clean: ! -rm -f *.o *.*pk *.upr ! -rm -f pktest ps2pk pk2bm ! -(cd ../common; $(MAKE) -f Makefile.unx clean) ! -(cd ../type1; $(MAKE) -f Makefile.unx clean) ! -(cd ../PSres; $(MAKE) -f Makefile.unx clean) ! ! distclean: ! -rm -f *.o *.*pk *.upr ! -rm -f pktest ps2pk pk2bm ! -rm -f *~ *.bak Makefile *.diff *.orig ! -(cd ../common; $(MAKE) -f Makefile.unx distclean) ! -(cd ../type1; $(MAKE) -f Makefile.unx distclean) ! -(cd ../PSres; $(MAKE) -f Makefile.unx distclean) Only in ps2pk16beta1/ps2pk: configure Only in ps2pk16beta1/ps2pk: configure.in diff -cr ../ps2pk15/ps2pk/encoding.c ps2pk16beta1/ps2pk/encoding.c *** ../ps2pk15/ps2pk/encoding.c Thu Jan 25 15:42:20 1996 --- ps2pk16beta1/ps2pk/encoding.c Fri Feb 27 10:06:55 1998 *************** *** 106,113 **** continue; } if (!isalpha(*pline)) fatal("invalid name in %s\n", encfile); ! while (isalnum(*pline) || *pline == '-') the_nextname[i++] = *pline++; the_nextname[i] = '\0'; name = malloc(i+1); if (name == NULL) fatal("Out of memory\n"); --- 106,122 ---- continue; } if (!isalpha(*pline)) fatal("invalid name in %s\n", encfile); ! while (isalnum(*pline) || *pline == '-') { ! if (i > MAXSTRLEN-2) ! fatal("name too long in %s (%s)\n", line, encfile); the_nextname[i++] = *pline++; + if (*pline == '\0') { + if (fgets(line, LINEBUF-1, enc) == NULL) + fatal("unexpected EOF while reading %s\n", encfile); + pline = line; + continue; + } + } the_nextname[i] = '\0'; name = malloc(i+1); if (name == NULL) fatal("Out of memory\n"); diff -cr ../ps2pk15/ps2pk/pk2bm.c ps2pk16beta1/ps2pk/pk2bm.c *** ../ps2pk15/ps2pk/pk2bm.c Thu Jun 4 12:58:32 1992 --- ps2pk16beta1/ps2pk/pk2bm.c Fri Feb 6 17:17:35 1998 *************** *** 33,38 **** --- 33,43 ---- #include #include "pkin.h" + /* forward */ + void usage(); + + char *myname = "pk2bm"; + main(argc, argv) int argc; char *argv[]; { *************** *** 42,48 **** quarterword lsbf(); void dots(); chardesc cd; ! char *myname = "pk2bm", *pkname; int atoo(char *); while (--argc > 0 && (*++argv)[0] == '-') { --- 47,53 ---- quarterword lsbf(); void dots(); chardesc cd; ! char *pkname; int atoo(char *); while (--argc > 0 && (*++argv)[0] == '-') { *************** *** 53,70 **** --- 58,78 ---- if (*++argv[0] == '\0') { argc--; argv++; } + if (argc == 0) usage(); C = *argv[0]; done = 1; break; case 'o': if (*++argv[0] == '\0') { argc--; ++argv; } + if (argc == 0) usage(); C = atoo(argv[0]); done = 1; break; case 'H': if (*++argv[0] == '\0') { argc--; argv++; } + if (argc == 0) usage(); h = atoi(argv[0]); done=1; break; *************** *** 72,77 **** --- 80,86 ---- if (*++argv[0] == '\0') { argc--; argv++; } + if (argc == 0) usage(); w = atoi(argv[0]); done=1; break; *************** *** 87,96 **** } } ! if (argc == 0) { ! printf("Usage: %s [-bh] {-c char|-o octchar} [-W width -H height] pkfile\n", myname); ! exit(1); ! } pkname = argv[0]; --- 96,102 ---- } } ! if (argc == 0) usage(); pkname = argv[0]; *************** *** 203,206 **** --- 209,217 ---- { int octal = 0; while (*oct != '\0') octal = 8*octal + (*oct++) - '0'; return octal & 0xff; + } + + void usage() { + fatal("Usage: %s [-bh] {-c char|-o octchar} [-W width -H height] pkfile\n", + myname); } diff -cr ../ps2pk15/ps2pk/pkin.c ps2pk16beta1/ps2pk/pkin.c *** ../ps2pk15/ps2pk/pkin.c Sun Oct 15 06:48:24 1995 --- ps2pk16beta1/ps2pk/pkin.c Fri Feb 6 17:17:36 1998 *************** *** 9,14 **** --- 9,19 ---- * which is available as pktype.weave as part of the METAFONTware. * What was needed to implement readchar() is rearranged in pkfile.c to * get more modularity in the style of MODULA2. + * BUGFIXES + * May 1997: Eric Delaunay reports a + * problem with huge fonts (greater than 1008 DPI). The code for + * handling PK characters in `extended format' was wrongly derived + * from dvips. Made some minor improvements regarding error handling. * REDESIGN * Piet Tutelaers * rcpt@urc.tue.nl *************** *** 23,33 **** #include "pkin.h" /* - * Forward declaration - */ - static void error(); - - /* * Now we have some routines to get stuff from the pk file. pkbyte returns * the next byte from the pk file. */ --- 28,33 ---- *************** *** 40,46 **** register shalfword i ; if ((i=getc(pkfile))==EOF) ! error("! unexpected eof in pk file") ; return(i) ; } --- 40,46 ---- register shalfword i ; if ((i=getc(pkfile))==EOF) ! fatal("unexpected eof in pk file\n") ; return(i) ; } *************** *** 89,97 **** char name[] ; { if ((pkfile=fopen(name, RB))==NULL) { ! (void)sprintf(errbuf, "Could not open %s", name) ; ! error(errbuf) ; ! return(0) ; } else return(1) ; } --- 89,95 ---- char name[] ; { if ((pkfile=fopen(name, RB))==NULL) { ! fatal("Could not open %s\n", name) ; } else return(1) ; } *************** *** 191,197 **** return ( i ) ; } } else { ! error("! shouldn't happen") ; } /*NOTREACHED*/ } --- 189,195 ---- return ( i ) ; } } else { ! fatal("shouldn't happen\n") ; } /*NOTREACHED*/ } *************** *** 236,242 **** i = 2 ; cd->raster = (halfword *)malloc((unsigned)i) ; if (cd->raster == NULL) ! error("! out of memory during allocation") ; raster = cd->raster; realfunc = pkpackednum ; dynf = flagbyte / 16 ; --- 234,240 ---- i = 2 ; cd->raster = (halfword *)malloc((unsigned)i) ; if (cd->raster == NULL) ! fatal("out of memory during allocation\n"); raster = cd->raster; realfunc = pkpackednum ; dynf = flagbyte / 16 ; *************** *** 309,316 **** turnon = ! turnon ; } putchar('\n') ; ! if ( ( rowsleft != 0 ) || ( hbit != cd->cwidth ) ) ! error ( "! error while unpacking; more bits than required" ) ; } } --- 307,314 ---- turnon = ! turnon ; } putchar('\n') ; ! if ( ( rowsleft != 0 ) || ( (unsigned)hbit != cd->cwidth ) ) ! fatal( "error while unpacking; more bits than required\n"); } } *************** *** 334,342 **** * Check the preamble of the pkfile */ if (pkbyte()!=247) ! error("! bad pk file, expected pre") ; if (pkbyte()!=89) ! error("! bad version of pk file") ; for(i=pkbyte(); i>0; i--) /* creator of pkfile */ (void)pkbyte() ; (void)pkquad(); /* design size */ --- 332,340 ---- * Check the preamble of the pkfile */ if (pkbyte()!=247) ! fatal("bad pk file, expected pre\n") ; if (pkbyte()!=89) ! fatal("bad version of pk file\n") ; for(i=pkbyte(); i>0; i--) /* creator of pkfile */ (void)pkbyte() ; (void)pkquad(); /* design size */ *************** *** 355,378 **** (void) pktrio() ; /* TFMwidth */ (void) pkbyte() ; /* pixel width */ break ; ! case 4: ! length = pkbyte() * 256 ; ! length = length + pkbyte() - 5 ; cd->charcode = pkbyte() ; ! (void) pktrio() ; /* TFMwidth */ i = pkbyte() ; ! i = i * 256 + pkbyte() ; /* pixelwidth */ break ; - case 5: case 6: - error("! lost sync in pk file (character too big)") ; case 7: length = pkquad() - 12 ; cd->charcode = pkquad() ; (void) pkquad() ; /* TFMwidth */ - /* cd->pixelwidth = (pkquad() + 32768) >> 16 ; */ (void) pkquad(); /* pixelwidth */ k = pkquad() ; } if (cd->charcode == c) { if (flagbyte & 4) { if ((flagbyte & 7) == 7) { /* long format */ --- 353,375 ---- (void) pktrio() ; /* TFMwidth */ (void) pkbyte() ; /* pixel width */ break ; ! case 4: case 5: case 6: ! length = (flagbyte & 3) * 65536L + pkbyte() * 256L ; ! length = length + pkbyte() - 5L ; cd->charcode = pkbyte() ; ! (void) pktrio() ; /* TFMwidth */ i = pkbyte() ; ! i = i * 256 + pkbyte() ; /* pixelwidth */ break ; case 7: length = pkquad() - 12 ; cd->charcode = pkquad() ; (void) pkquad() ; /* TFMwidth */ (void) pkquad(); /* pixelwidth */ k = pkquad() ; } + if (length <= 0) + fatal("packet length (%d) too small\n", length) ; if (cd->charcode == c) { if (flagbyte & 4) { if ((flagbyte & 7) == 7) { /* long format */ *************** *** 381,390 **** cd->xoff = pklong() ; cd->yoff = pklong() ; } else { /* extended format */ ! cd->cwidth = pkquad(); ; ! cd->cheight = pkquad() ; ! cd->xoff = pkquad() ; ! cd->yoff = pkquad() ; } } else { /* short format */ cd->cwidth = pkbyte() ; --- 378,387 ---- cd->xoff = pklong() ; cd->yoff = pklong() ; } else { /* extended format */ ! cd->cwidth = pkbyte() * 256 + pkbyte() ; ! cd->cheight = pkbyte() * 256 + pkbyte() ; ! cd->xoff = pkbyte() * 256 + pkbyte() ; ! cd->yoff = pkbyte() * 256 + pkbyte() ; } } else { /* short format */ cd->cwidth = pkbyte() ; *************** *** 424,440 **** case 246: break ; default: ! error("! lost sync in pk file") ; } } } (void)fclose(pkfile) ; return(0); /* character not found */ - } - - static void error(s) - char s[]; - { - fprintf(stderr, "%s\n", s); - exit(1); } --- 421,430 ---- case 246: break ; default: ! fatal("unexpected command (%d)\n", flagbyte) ; } } } (void)fclose(pkfile) ; return(0); /* character not found */ } diff -cr ../ps2pk15/ps2pk/pkin.h ps2pk16beta1/ps2pk/pkin.h *** ../ps2pk15/ps2pk/pkin.h Tue Mar 10 10:22:20 1992 --- ps2pk16beta1/ps2pk/pkin.h Sat Feb 7 19:01:04 1998 *************** *** 37,43 **** */ #include ! /* * Type declarations. integer must be a 32-bit signed; shalfword must * be a sixteen-bit signed; halfword must be a sixteen-bit unsigned; --- 37,43 ---- */ #include ! #include /* * Type declarations. integer must be a 32-bit signed; shalfword must * be a sixteen-bit signed; halfword must be a sixteen-bit unsigned; diff -cr ../ps2pk15/ps2pk/pkout.c ps2pk16beta1/ps2pk/pkout.c *** ../ps2pk15/ps2pk/pkout.c Thu Feb 15 10:25:40 1996 --- ps2pk16beta1/ps2pk/pkout.c Fri Feb 27 10:23:38 1998 *************** *** 497,503 **** * Compute METAFONT magnification string for */ ! int INT(float x) { return (int) x; } --- 497,503 ---- * Compute METAFONT magnification string for */ ! static int INT(float x) { return (int) x; } *************** *** 514,537 **** while (dpi < size) { size = size / 1.095445115; magstep -= 0.5; ! if (dpi == INT(size + 0.5)) { sprintf(mag_str, "magstep(%.1f)", magstep); return mag_str; } if (dpi > size) { ! sprintf(mag_str, "%d+%d/%d", INT(dpi/BDPI), dpi%BDPI, BDPI); return mag_str; } } while (dpi > size) { size = size * 1.095445115; magstep += 0.5; ! if (dpi == INT(size + 0.5)) { sprintf(mag_str, "magstep(%.1f)", magstep); return mag_str; } if (dpi < size) { ! sprintf(mag_str, "%d+%d/%d", INT(dpi/BDPI), dpi%BDPI, BDPI); return mag_str; } } --- 514,537 ---- while (dpi < size) { size = size / 1.095445115; magstep -= 0.5; ! if (dpi == PSPKINT(size + 0.5)) { sprintf(mag_str, "magstep(%.1f)", magstep); return mag_str; } if (dpi > size) { ! sprintf(mag_str, "%d+%d/%d", PSPKINT(dpi/BDPI), dpi%BDPI, BDPI); return mag_str; } } while (dpi > size) { size = size * 1.095445115; magstep += 0.5; ! if (dpi == PSPKINT(size + 0.5)) { sprintf(mag_str, "magstep(%.1f)", magstep); return mag_str; } if (dpi < size) { ! sprintf(mag_str, "%d+%d/%d", PSPKINT(dpi/BDPI), dpi%BDPI, BDPI); return mag_str; } } diff -cr ../ps2pk15/ps2pk/ps2pk.c ps2pk16beta1/ps2pk/ps2pk.c *** ../ps2pk15/ps2pk/ps2pk.c Wed Feb 4 11:36:53 1998 --- ps2pk16beta1/ps2pk/ps2pk.c Fri Feb 27 10:25:19 1998 *************** *** 176,181 **** --- 176,182 ---- * 1.3 (August 1992) * 1.4 (December 1994) * 1.5 (Januari 1996) + * 1.6 (Februari 1998) * AUTHOR * Piet Tutelaers * rcpt@urc.tue.nl *************** *** 204,209 **** --- 205,215 ---- /* end interface to type 1 software */ + #ifdef KPATHSEA + #include + #include + #endif + char *encfile = NULL, *afmfile; char ps2pk_args[MAXSTRLEN] = "none"; /* essential ps2pk arguments */ *************** *** 235,241 **** char *myname = "ps2pk", *psname, *psbasename, *afmname = NULL, *encname = NULL, *psfile = NULL, *psfilebn, pkname[80], *t1inputs, *psrespath, *resourcedb, *AFM_fontname = NULL, ! *encodingscheme = ""; FontPtr fontptr; unsigned char glyphcode[1]; /* must be an array */ --- 241,247 ---- char *myname = "ps2pk", *psname, *psbasename, *afmname = NULL, *encname = NULL, *psfile = NULL, *psfilebn, pkname[80], *t1inputs, *psrespath, *resourcedb, *AFM_fontname = NULL, ! *encodingscheme = NULL; FontPtr fontptr; unsigned char glyphcode[1]; /* must be an array */ *************** *** 342,348 **** } if (argc < 1 || argc >2) { ! msg ("Ps2pk: version 1.5 (1992-96)\n"); msg ("Usage: %s [ options ] type1font [pkname]\n", myname); msg ("options: -d -v -e -X -E -S\n"); fatal("options: -O -P -Y -a -R\n"); --- 348,358 ---- } if (argc < 1 || argc >2) { ! #ifdef KPATHSEA ! msg ("Ps2pk: version 1.6k (1992-98)\n"); ! #else ! msg ("Ps2pk: version 1.6 (1992-98)\n"); ! #endif msg ("Usage: %s [ options ] type1font [pkname]\n", myname); msg ("options: -d -v -e -X -E -S\n"); fatal("options: -O -P -Y -a -R\n"); *************** *** 350,355 **** --- 360,369 ---- psname = argv[0]; argc--; argv++; + #ifdef KPATHSEA + kpse_set_progname(myname); + #endif + if (ps_resource(psname)) { /* if psname does neither contain a DIRSEP or `.' character * then find the filename of this resource in one of the PS *************** *** 407,413 **** } } else { /* No PS resource database or no resource for type1font */ ! t1inputs = path(T1INPUTS, getenv("T1INPUTS")); if (verbose) msg("T1INPUTS := %s\n", t1inputs); --- 421,428 ---- } } else { /* No PS resource database or no resource for type1font */ ! ! #ifndef KPATHSEA t1inputs = path(T1INPUTS, getenv("T1INPUTS")); if (verbose) msg("T1INPUTS := %s\n", t1inputs); *************** *** 423,438 **** encfile = search_file(t1inputs, encname, FATAL); if (verbose) msg("Encoding file <%s>\n", encfile); } ! psbasename = basename(psname, extension(psname)); } ! psfilebn = basename(psfile, NULL); if (pointsize == 0.0) pointsize = DEFAULTPOINTSIZE; if (x_resolution == 0) x_resolution = DEFAULTRES; if (y_resolution == 0) y_resolution = x_resolution; if (verbose) msg("Loading encoding vector from %s ...", ! encname? encname: basename(afmfile, NULL)); getenc(&AFM_fontname, &encodingscheme, ev, WX); if (efactor != 1.0) for (i=0; i < 256; i++) { --- 438,479 ---- encfile = search_file(t1inputs, encname, FATAL); if (verbose) msg("Encoding file <%s>\n", encfile); } ! #else /* KPATHSEA */ ! psfile = kpse_find_file(psname,kpse_type1_format,0); ! if (!psfile) { ! /* kpse_find_file does not look for alternate suffixes */ ! char *altname = newname(psname, ".pfb"); ! psfile = kpse_find_file(altname, kpse_type1_format, 0); ! free(altname); ! } ! if (!psfile) ! fatal("%s: PS file %s not found!\n", program_invocation_name, psname); ! if (afmname == NULL) ! afmname = newname(psname, ".afm"); ! afmfile = kpse_find_file(afmname,kpse_afm_format,0); ! if (!afmfile) ! fatal("%s: AFM file %s not found!\n", program_invocation_name, ! afmname); ! if (encname) { ! encfile = kpse_find_file(encname,kpse_tex_ps_header_format,0); ! if (!encfile) ! fatal("%s: enc file %s not found!\n", program_invocation_name, ! encname); ! } ! else ! encfile = NULL; ! #endif /* KPATHSEA */ ! psbasename = baseName(psname, extension(psname)); } ! ! psfilebn = baseName(psfile, NULL); if (pointsize == 0.0) pointsize = DEFAULTPOINTSIZE; if (x_resolution == 0) x_resolution = DEFAULTRES; if (y_resolution == 0) y_resolution = x_resolution; if (verbose) msg("Loading encoding vector from %s ...", ! encname? encname: baseName(afmfile, NULL)); getenc(&AFM_fontname, &encodingscheme, ev, WX); if (efactor != 1.0) for (i=0; i < 256; i++) { diff -cr ../ps2pk15/type1/CHANGES ps2pk16beta1/type1/CHANGES *** ../ps2pk15/type1/CHANGES Mon Jan 15 12:21:02 1996 --- ps2pk16beta1/type1/CHANGES Fri Feb 27 14:07:37 1998 *************** *** 69,71 **** --- 69,75 ---- - bzero() dropped in favour of ANSI C's memset() - Improved cooperation between the master makefile and its depending makefiles (thanks ) + + 98-02 Version 1.6 + - added autoconf stuff: Makefile.in configure.in + - Fabrice Popineau (marked FP) WIN32 patches diff -cr ../ps2pk15/type1/Makefile.emx ps2pk16beta1/type1/Makefile.emx *** ../ps2pk15/type1/Makefile.emx Mon Nov 13 23:42:50 1995 --- ps2pk16beta1/type1/Makefile.emx Fri Feb 6 17:18:38 1998 *************** *** 2,7 **** --- 2,8 ---- # Makefile for MSDOS/EMX (dmake) # # Version 1.4: Jan. 1994 + # Version 1.5: Feb. 1998 # OBJ = arith.o curves.o fontfcn.o hints.o lines.o objects.o paths.o \ *************** *** 25,32 **** $(CC) -o t1test t1test.o type1.a emxbind -b $(EMX) t1test ! clean: ! rm -f *.o type1.a t1test.exe # Dependencies arith.o: arith.c types.h objects.h spaces.h arith.h --- 26,39 ---- $(CC) -o t1test t1test.o type1.a emxbind -b $(EMX) t1test ! mostlyclean: ! -rm -f *.o ! ! maintainer-clean clean: ! -rm -f *.o type1.a t1test.exe ! ! distclean: ! -rm -f *.o type1.a t1test.exe *~ *.bak Makefile # Dependencies arith.o: arith.c types.h objects.h spaces.h arith.h Only in ps2pk16beta1/type1: Makefile.in diff -cr ../ps2pk15/type1/Makefile.unx ps2pk16beta1/type1/Makefile.unx *** ../ps2pk15/type1/Makefile.unx Mon Jan 15 11:38:06 1996 --- ps2pk16beta1/type1/Makefile.unx Fri Feb 27 10:26:20 1998 *************** *** 1,7 **** # # Makefile for UNIX (called from Makefile in ../src directory) # ! # Version 1.5: Jan. 1996 # OBJ = arith.o curves.o fontfcn.o hints.o lines.o objects.o paths.o \ --- 1,7 ---- # # Makefile for UNIX (called from Makefile in ../src directory) # ! # Version 1.6: Feb. 1998 # OBJ = arith.o curves.o fontfcn.o hints.o lines.o objects.o paths.o \ *************** *** 16,23 **** t1test: t1test.o libtype1.a $(CC) $(CFLAGS) -o t1test t1test.o ./libtype1.a ! clean: ! -rm -f *.o *.a t1test # Dependencies arith.o: arith.c types.h objects.h spaces.h arith.h --- 16,29 ---- t1test: t1test.o libtype1.a $(CC) $(CFLAGS) -o t1test t1test.o ./libtype1.a ! mostlyclean: ! -rm -f *.o ! ! maintainer-clean clean: ! -rm -f *.o libtype1.a t1test ! ! distclean: ! -rm -f *.o libtype1.a t1test *~ *.bak Makefile *.orig *.diff # Dependencies arith.o: arith.c types.h objects.h spaces.h arith.h diff -cr ../ps2pk15/type1/arith.h ps2pk16beta1/type1/arith.h *** ../ps2pk15/type1/arith.h Sat Jan 1 04:13:02 1994 --- ps2pk16beta1/type1/arith.h Wed Feb 25 16:35:01 1998 *************** *** 38,43 **** --- 38,48 ---- /*END SHARED*/ /*SHARED*/ + + /* FP: MAXSHORT may be defined by */ + #ifdef MAXSHORT + #undef MAXSHORT + #endif #define SHORTSIZE (sizeof(SHORT)*8) #define LONGSIZE (SHORTSIZE*2) Only in ps2pk16beta1/type1: configure Only in ps2pk16beta1/type1: configure.in diff -cr ../ps2pk15/type1/fontfcn.c ps2pk16beta1/type1/fontfcn.c *** ../ps2pk15/type1/fontfcn.c Sun Jan 9 03:58:02 1994 --- ps2pk16beta1/type1/fontfcn.c Wed Feb 25 16:35:11 1998 *************** *** 133,140 **** int *lenP; int *mode; { path updateWidth(); ! psobj *charnameP; /* points to psobj that is name of character*/ int N; unsigned char *s; /* used to search the name for '|' */ --- 133,141 ---- int *lenP; int *mode; { + #if 0 /* FP: not used */ path updateWidth(); ! #endif psobj *charnameP; /* points to psobj that is name of character*/ int N; unsigned char *s; /* used to search the name for '|' */ diff -cr ../ps2pk15/type1/fontmisc.h ps2pk16beta1/type1/fontmisc.h *** ../ps2pk15/type1/fontmisc.h Sun Jan 2 22:40:32 1994 --- ps2pk16beta1/type1/fontmisc.h Wed Feb 25 16:35:30 1998 *************** *** 54,59 **** --- 54,63 ---- #define lowbit(x) ((x) & (~(x) + 1)) + #if defined(assert) /* FP */ + #undef assert + #endif + #define assert(x) #endif /* _FONTMISC_H_ */ diff -cr ../ps2pk15/type1/objects.c ps2pk16beta1/type1/objects.c *** ../ps2pk15/type1/objects.c Sat Jan 8 08:09:18 1994 --- ps2pk16beta1/type1/objects.c Wed Feb 25 16:35:51 1998 *************** *** 288,294 **** register int extra; /* any extra uninitialized bytes needed contiguously */ { extern char *Xalloc(); /* standard C routine */ ! register struct xobject *r; /* --- 288,294 ---- register int extra; /* any extra uninitialized bytes needed contiguously */ { extern char *Xalloc(); /* standard C routine */ ! register struct xobject *r; /* *************** *** 1031,1051 **** is returned to the caller in case MustCrash is FALSE and ArgErr returns to its caller. */ ! ! struct xobject *ArgErr(string, obj, ret) /* non-ANSI avoids overly strict type checking */ ! char *string; /* description of error */ struct xobject *obj; /* object, if any, that was in error */ struct xobject *ret; /* object returned to caller or NULL */ { if (MustCrash) LineIOTrace = TRUE; ! IfTrace1(TRUE,"ARGUMENT ERROR-- %s.\n", string); if (obj != NULL) ObjectPostMortem(obj); if (MustCrash) abort("Terminating because of CrashOnUserError..."); else ! ErrorMessage = string; return(ret); } --- 1031,1052 ---- is returned to the caller in case MustCrash is FALSE and ArgErr returns to its caller. */ ! ! /* FP: changed string into str */ ! struct xobject *ArgErr(str, obj, ret) /* non-ANSI avoids overly strict type checking */ ! char *str; /* description of error */ struct xobject *obj; /* object, if any, that was in error */ struct xobject *ret; /* object returned to caller or NULL */ { if (MustCrash) LineIOTrace = TRUE; ! IfTrace1(TRUE,"ARGUMENT ERROR-- %s.\n", str); if (obj != NULL) ObjectPostMortem(obj); if (MustCrash) abort("Terminating because of CrashOnUserError..."); else ! ErrorMessage = str; return(ret); } *************** *** 1059,1069 **** static int test = 0; /*ARGSUSED*/ ! void abort(string) ! char *string; { LineIOTrace = TRUE; ! IfTrace1(TRUE,"\nABORT: reason='%s'\n", string); TraceClose(); test = 1/test; exit(99); --- 1060,1070 ---- static int test = 0; /*ARGSUSED*/ ! void abort(str) /* FP: changed string to str */ ! char *str; { LineIOTrace = TRUE; ! IfTrace1(TRUE,"\nABORT: reason='%s'\n", str); TraceClose(); test = 1/test; exit(99); *************** *** 1123,1129 **** /* :h4.reportusage() - A Stub to Get a Clean Link with Portable PMP */ ! reportusage() { return; } --- 1124,1130 ---- /* :h4.reportusage() - A Stub to Get a Clean Link with Portable PMP */ ! void reportusage() /* FP: added void */ { return; } diff -cr ../ps2pk15/type1/regions.c ps2pk16beta1/type1/regions.c *** ../ps2pk15/type1/regions.c Sat Jan 1 02:33:34 1994 --- ps2pk16beta1/type1/regions.c Wed Feb 25 16:36:35 1998 *************** *** 52,65 **** #include "hints.h" #include "strokes.h" /* to pick up 'DoStroke' */ static Unwind(); ! static int newfilledge(); static struct edgelist *splitedge(); ! static int vertjoin(); static int touches(); static int crosses(); static int edgemin(); static int edgemax(); ! static discard(); static edgecheck(); static struct edgelist *NewEdge(); --- 52,65 ---- #include "hints.h" #include "strokes.h" /* to pick up 'DoStroke' */ static Unwind(); ! static void newfilledge(); static struct edgelist *splitedge(); ! static void vertjoin(); static int touches(); static int crosses(); static int edgemin(); static int edgemax(); ! static void discard(); static edgecheck(); static struct edgelist *NewEdge(); *************** *** 305,312 **** (sizeof(long) - 1)--if non zero, the xvalues are not aligned well. We set 'iy' to the ymin value that would give us good alignment: */ iy = ymin - (((int) xvalues) & (sizeof(LONG) - 1)) / sizeof(pel); ! r = (struct edgelist *)Allocate(sizeof(struct edgelist), &template, (ymax - iy) * sizeof(pel)); --- 305,315 ---- (sizeof(long) - 1)--if non zero, the xvalues are not aligned well. We set 'iy' to the ymin value that would give us good alignment: */ + #if defined (__alpha) /* FP: added __alpha */ + iy = ymin - (((long) xvalues) & (sizeof(LONG) - 1)) / sizeof(pel); + #else iy = ymin - (((int) xvalues) & (sizeof(LONG) - 1)) / sizeof(pel); ! #endif r = (struct edgelist *)Allocate(sizeof(struct edgelist), &template, (ymax - iy) * sizeof(pel)); *************** *** 680,687 **** abort("negative sized edge?"); (*R->newedgefcn)(R, R->edgexmin, R->edgexmax, ymin, ymax, ! R->lastdy > 0, x_at_ymin, x_at_ymax); } --- 683,691 ---- abort("negative sized edge?"); + /* FP: FIXME not as much parameters as here. */ (*R->newedgefcn)(R, R->edgexmin, R->edgexmax, ymin, ymax, ! R->lastdy > 0 /*, x_at_ymin, x_at_ymax*/); } *************** *** 732,738 **** up to date. */ ! static int newfilledge(R, xmin, xmax, ymin, ymax, isdown) register struct region *R; /* region being built */ fractpel xmin,xmax; /* X range of this edge */ fractpel ymin,ymax; /* Y range of this edge */ --- 736,743 ---- up to date. */ ! /* FP: return type void (was int) */ ! static void newfilledge(R, xmin, xmax, ymin, ymax, isdown) register struct region *R; /* region being built */ fractpel xmin,xmax; /* X range of this edge */ fractpel ymin,ymax; /* Y range of this edge */ *************** *** 976,982 **** The two edges must be disjoint vertically. */ ! static int vertjoin(top, bottom) register struct edgelist *top; /* uppermost region */ register struct edgelist *bottom; /* bottommost region */ { --- 981,987 ---- The two edges must be disjoint vertically. */ ! static void vertjoin(top, bottom) /* FP: return type void */ register struct edgelist *top; /* uppermost region */ register struct edgelist *bottom; /* bottommost region */ { *************** *** 1345,1351 **** of the list and set ymin=ymax. */ ! static discard(left, right) register struct edgelist *left,*right; /* all edges between here exclusive */ /* should be discarded */ { --- 1350,1356 ---- of the list and set ymin=ymax. */ ! static void discard(left, right) /* FP: return type void */ register struct edgelist *left,*right; /* all edges between here exclusive */ /* should be discarded */ { diff -cr ../ps2pk15/type1/regions.h ps2pk16beta1/type1/regions.h *** ../ps2pk15/type1/regions.h Thu Aug 13 08:39:26 1992 --- ps2pk16beta1/type1/regions.h Wed Feb 25 16:36:45 1998 *************** *** 134,140 **** struct edgelist *lastedge,*firstedge; /* last and first edges in subpath */ pel *edge; /* pointer to array of X values for edge */ fractpel edgeYstop; /* Y value where 'edges' array ends */ ! int (*newedgefcn)(); /* function to use when building a new edge */ struct strokeinfo *strokeinfo; /* scratchpad info during stroking only */ } ; /* --- 134,141 ---- struct edgelist *lastedge,*firstedge; /* last and first edges in subpath */ pel *edge; /* pointer to array of X values for edge */ fractpel edgeYstop; /* Y value where 'edges' array ends */ ! /* FP: int return type changed to void */ ! void (*newedgefcn)(); /* function to use when building a new edge */ struct strokeinfo *strokeinfo; /* scratchpad info during stroking only */ } ; /* diff -cr ../ps2pk15/type1/spaces.c ps2pk16beta1/type1/spaces.c *** ../ps2pk15/type1/spaces.c Sun Jan 2 20:45:14 1994 --- ps2pk16beta1/type1/spaces.c Wed Feb 25 16:36:59 1998 *************** *** 46,53 **** #include "arith.h" #include "trig.h" ! static FindFfcn(); ! static FindIfcn(); /* :h3.Entry Points Provided to the TYPE1IMAGER User */ --- 46,53 ---- #include "arith.h" #include "trig.h" ! static void FindFfcn(); /* FP: added void */ ! static void FindIfcn(); /* FP: added void */ /* :h3.Entry Points Provided to the TYPE1IMAGER User */ *************** *** 543,549 **** being zero: */ ! static FindFfcn(cx, cy, fcnP) register DOUBLE cx,cy; /* x and y coefficients */ register fractpel (**fcnP)(); /* pointer to function to set */ { --- 543,549 ---- being zero: */ ! static void FindFfcn(cx, cy, fcnP) /* FP: added void */ register DOUBLE cx,cy; /* x and y coefficients */ register fractpel (**fcnP)(); /* pointer to function to set */ { *************** *** 566,572 **** floating point. */ ! static FindIfcn(cx, cy, icxP, icyP, fcnP) register DOUBLE cx,cy; /* x and y coefficients */ register fractpel *icxP,*icyP; /* fixed point coefficients to set */ register fractpel (**fcnP)(); /* pointer to function to set */ --- 566,572 ---- floating point. */ ! static void FindIfcn(cx, cy, icxP, icyP, fcnP) /* FP: added void */ register DOUBLE cx,cy; /* x and y coefficients */ register fractpel *icxP,*icyP; /* fixed point coefficients to set */ register fractpel (**fcnP)(); /* pointer to function to set */ *************** *** 962,969 **** */ #define FRACTMASK ((1<> FRACTBITS, s); } /* --- 980,986 ---- sprintf(temp, "000%x", fpel & FRACTMASK); s = temp + strlen(temp) - (FRACTBITS/4); ! sprintf(str, "%s%d.%sx", sign, fpel >> FRACTBITS, s); } /* diff -cr ../ps2pk15/type1/t1info.c ps2pk16beta1/type1/t1info.c *** ../ps2pk15/type1/t1info.c Mon Jan 15 12:04:10 1996 --- ps2pk16beta1/type1/t1info.c Sun Feb 15 13:05:29 1998 *************** *** 353,359 **** LONG fmask = 0; int ret; ! ret = Type1OpenScalable(fpe, &pfont, flags, entry, fileName, Vals, format, fmask); if (ret != Successful) return ret; *pInfo = pfont->info; --- 353,359 ---- LONG fmask = 0; int ret; ! ret = Type1OpenScalable(fpe, &pfont, flags, entry, fileName, Vals, format, fmask, 1.0, 0.0); /* FP */ if (ret != Successful) return ret; *pInfo = pfont->info; diff -cr ../ps2pk15/type1/t1io.c ps2pk16beta1/type1/t1io.c *** ../ps2pk15/type1/t1io.c Thu Aug 13 09:10:22 1992 --- ps2pk16beta1/type1/t1io.c Sun Feb 15 13:05:29 1998 *************** *** 70,76 **** Decrypt = 0; /* We know we are only reading */ ! #if defined(MSDOS) || defined(VMS) if ((of->fd=open(fn, O_RDONLY | O_BINARY)) < 0) return NULL; #else if ((of->fd=open(fn, O_RDONLY)) < 0) return NULL; --- 70,76 ---- Decrypt = 0; /* We know we are only reading */ ! #if defined(MSDOS) || defined(VMS) || defined(WIN32) /* FP */ if ((of->fd=open(fn, O_RDONLY | O_BINARY)) < 0) return NULL; #else if ((of->fd=open(fn, O_RDONLY)) < 0) return NULL; diff -cr ../ps2pk15/type1/type1.c ps2pk16beta1/type1/type1.c *** ../ps2pk15/type1/type1.c Thu Aug 10 20:29:38 1995 --- ps2pk16beta1/type1/type1.c Wed Feb 25 16:28:22 1998 *************** *** 129,134 **** --- 129,149 ---- #define Error0(errmsg) { CC; IfTrace0(TRUE, errmsg); Error;} #define Error1(errmsg,arg) { CC; IfTrace1(TRUE, errmsg, arg); Error;} + + /********************/ + /* global typedefs */ + /********************/ + + /* FP: Definition of a PostScript FONT */ + typedef struct ps_font { + char *vm_start; + psobj FontFileName; + psobj Subrs; + psdict *CharStringsP; + psdict *Private; + psdict *fontInfoP; + struct blues_struct *BluesP; + } psfont; /********************/ /* global variables */ *************** *** 153,159 **** /*************************************************/ /* Global variables to hold Type1Char parameters */ /*************************************************/ ! static char *Environment; static struct XYspace *CharSpace; static psobj *CharStringP, *SubrsP, *OtherSubrsP; static int *ModeP; --- 168,174 ---- /*************************************************/ /* Global variables to hold Type1Char parameters */ /*************************************************/ ! static psfont *Environment; static struct XYspace *CharSpace; static psobj *CharStringP, *SubrsP, *OtherSubrsP; static int *ModeP; *************** *** 161,185 **** /************************/ /* Forward declarations */ /************************/ static DOUBLE Div(); static DOUBLE PSFakePop(); ! static DoCommand(); ! static Escape(); ! static HStem(); ! static VStem(); ! static RLineTo(); ! static RRCurveTo(); ! static DoClosePath(); ! static CallSubr(); ! static Return(); ! static EndChar(); ! static RMoveTo(); ! static DotSection(); ! static Seac(); ! static Sbw(); ! static CallOtherSubr(); ! static SetCurrentPoint(); ! /*****************************************/ /* statics for Flex procedures (FlxProc) */ /*****************************************/ --- 176,202 ---- /************************/ /* Forward declarations */ /************************/ + #ifdef WIN32 /* FP: Unfortunately, there is such a function in the Win32 API */ + #define Escape Type1Escape + #endif static DOUBLE Div(); static DOUBLE PSFakePop(); ! static void DoCommand(); ! static void Escape(); ! static void HStem(); ! static void VStem(); ! static void RLineTo(); ! static void RRCurveTo(); ! static void DoClosePath(); ! static void CallSubr(); ! static void Return(); ! static void EndChar(); ! static void RMoveTo(); ! static void DotSection(); ! static void Seac(); ! static void Sbw(); ! static void CallOtherSubr(); ! static void SetCurrentPoint(); /*****************************************/ /* statics for Flex procedures (FlxProc) */ /*****************************************/ *************** *** 300,306 **** /* Compute the dislocation that a stemhint should cause for points */ /* inside the stem. */ /*******************************************************************/ ! static ComputeStem(stemno) int stemno; { int verticalondevice, idealwidth; --- 317,323 ---- /* Compute the dislocation that a stemhint should cause for points */ /* inside the stem. */ /*******************************************************************/ ! static void ComputeStem(stemno) /* FP void */ int stemno; { int verticalondevice, idealwidth; *************** *** 695,718 **** static DOUBLE PSFakeStack[MAXPSFAKESTACK]; static int PSFakeTop; ! static ClearStack() { Top = -1; } ! static Push(Num) DOUBLE Num; { if (++Top < MAXSTACK) Stack[Top] = Num; else Error0("Push: Stack full\n"); } ! static ClearCallStack() { CallTop = -1; } ! static PushCall(CurrStrP, CurrIndex, CurrKey) psobj *CurrStrP; int CurrIndex; unsigned short CurrKey; --- 712,735 ---- static DOUBLE PSFakeStack[MAXPSFAKESTACK]; static int PSFakeTop; ! static void ClearStack() /* FP void */ { Top = -1; } ! static void Push(Num) /* FP void */ DOUBLE Num; { if (++Top < MAXSTACK) Stack[Top] = Num; else Error0("Push: Stack full\n"); } ! static void ClearCallStack() /* FP void */ { CallTop = -1; } ! static void PushCall(CurrStrP, CurrIndex, CurrKey) /* FP void */ psobj *CurrStrP; int CurrIndex; unsigned short CurrKey; *************** *** 725,731 **** else Error0("PushCall: Stack full\n"); } ! static PopCall(CurrStrPP, CurrIndexP, CurrKeyP) psobj **CurrStrPP; int *CurrIndexP; unsigned short *CurrKeyP; --- 742,748 ---- else Error0("PushCall: Stack full\n"); } ! static void PopCall(CurrStrPP, CurrIndexP, CurrKeyP) /* FP void */ psobj **CurrStrPP; int *CurrIndexP; unsigned short *CurrKeyP; *************** *** 738,750 **** else Error0("PopCall: Stack empty\n"); } ! static ClearPSFakeStack() { PSFakeTop = -1; } /* PSFakePush: Pushes a number onto the fake PostScript stack */ ! static PSFakePush(Num) DOUBLE Num; { if (++PSFakeTop < MAXPSFAKESTACK) PSFakeStack[PSFakeTop] = Num; --- 755,767 ---- else Error0("PopCall: Stack empty\n"); } ! static void ClearPSFakeStack() /* FP void */ { PSFakeTop = -1; } /* PSFakePush: Pushes a number onto the fake PostScript stack */ ! static void PSFakePush(Num) /* FP void */ DOUBLE Num; { if (++PSFakeTop < MAXPSFAKESTACK) PSFakeStack[PSFakeTop] = Num; *************** *** 865,871 **** Error0("StartDecrypt: Premature end of CharString\n"); } ! static Decode(Code) int Code; { int Code1, Code2, Code3, Code4; --- 882,888 ---- Error0("StartDecrypt: Premature end of CharString\n"); } ! static void Decode(Code) /* FP void */ int Code; { int Code1, Code2, Code3, Code4; *************** *** 895,901 **** } /* Interpret a command code */ ! static DoCommand(Code) int Code; { switch(Code) { --- 912,918 ---- } /* Interpret a command code */ ! static void DoCommand(Code) /* FP void */ int Code; { switch(Code) { *************** *** 1013,1019 **** } } ! static Escape(Code) int Code; { int i, Num; --- 1030,1036 ---- } } ! static void Escape(Code) /* FP void */ int Code; { int i, Num; *************** *** 1108,1114 **** /* Declares the vertical range of a horizontal stem zone */ /* between coordinates y and y + dy */ /* y is relative to the left sidebearing point */ ! static HStem(y, dy) DOUBLE y, dy; { IfTrace2((FontDebug), "Hstem %f %f\n", &y, &dy); --- 1125,1131 ---- /* Declares the vertical range of a horizontal stem zone */ /* between coordinates y and y + dy */ /* y is relative to the left sidebearing point */ ! static void HStem(y, dy) /* FP void */ DOUBLE y, dy; { IfTrace2((FontDebug), "Hstem %f %f\n", &y, &dy); *************** *** 1129,1135 **** /* Declares the horizontal range of a vertical stem zone */ /* between coordinates x and x + dx */ /* x is relative to the left sidebearing point */ ! static VStem(x, dx) DOUBLE x, dx; { IfTrace2((FontDebug), "Vstem %f %f\n", &x, &dx); --- 1146,1152 ---- /* Declares the horizontal range of a vertical stem zone */ /* between coordinates x and x + dx */ /* x is relative to the left sidebearing point */ ! static void VStem(x, dx) /* FP void */ DOUBLE x, dx; { IfTrace2((FontDebug), "Vstem %f %f\n", &x, &dx); *************** *** 1148,1154 **** /* |- dx dy RLINETO |- */ /* Behaves like RLINETO in PostScript */ ! static RLineTo(dx, dy) DOUBLE dx, dy; { struct segment *B; --- 1165,1171 ---- /* |- dx dy RLINETO |- */ /* Behaves like RLINETO in PostScript */ ! static void RLineTo(dx, dy) /* FP void */ DOUBLE dx, dy; { struct segment *B; *************** *** 1171,1177 **** /* Relative RCURVETO, equivalent to dx1 dy1 */ /* (dx1+dx2) (dy1+dy2) (dx1+dx2+dx3) */ /* (dy1+dy2+dy3) RCURVETO in PostScript */ ! static RRCurveTo(dx1, dy1, dx2, dy2, dx3, dy3) DOUBLE dx1, dy1, dx2, dy2, dx3, dy3; { struct segment *B, *C, *D; --- 1188,1194 ---- /* Relative RCURVETO, equivalent to dx1 dy1 */ /* (dx1+dx2) (dy1+dy2) (dx1+dx2+dx3) */ /* (dy1+dy2+dy3) RCURVETO in PostScript */ ! static void RRCurveTo(dx1, dy1, dx2, dy2, dx3, dy3) /* FP void */ DOUBLE dx1, dy1, dx2, dy2, dx3, dy3; { struct segment *B, *C, *D; *************** *** 1204,1210 **** /* - CLOSEPATH |- */ /* Closes a subpath WITHOUT repositioning the */ /* current point */ ! static DoClosePath() { struct segment *CurrentPoint; --- 1221,1227 ---- /* - CLOSEPATH |- */ /* Closes a subpath WITHOUT repositioning the */ /* current point */ ! static void DoClosePath() /* FP void */ { struct segment *CurrentPoint; *************** *** 1217,1223 **** /* subr# CALLSUBR - */ /* Calls a CharString subroutine with index */ /* subr# from the Subrs array */ ! static CallSubr(subrno) int subrno; { IfTrace1((FontDebug), "CallSubr %d\n", subrno); --- 1234,1240 ---- /* subr# CALLSUBR - */ /* Calls a CharString subroutine with index */ /* subr# from the Subrs array */ ! static void CallSubr(subrno) /* FP void */ int subrno; { IfTrace1((FontDebug), "CallSubr %d\n", subrno); *************** *** 1231,1237 **** /* - RETURN - */ /* Returns from a Subrs array CharString */ /* subroutine called with CALLSUBR */ ! static Return() { IfTrace0((FontDebug), "Return\n"); PopCall(&CharStringP, &strindex, &r); --- 1248,1254 ---- /* - RETURN - */ /* Returns from a Subrs array CharString */ /* subroutine called with CALLSUBR */ ! static void Return() /* FP void */ { IfTrace0((FontDebug), "Return\n"); PopCall(&CharStringP, &strindex, &r); *************** *** 1245,1251 **** /* HSBW or SBW. It then calls a special version of FILL */ /* or STROKE depending on the value of PaintType in the */ /* font dictionary */ ! static EndChar() { IfTrace0((FontDebug), "EndChar\n"); --- 1262,1268 ---- /* HSBW or SBW. It then calls a special version of FILL */ /* or STROKE depending on the value of PaintType in the */ /* font dictionary */ ! static void EndChar() /* FP void */ { IfTrace0((FontDebug), "EndChar\n"); *************** *** 1262,1268 **** /* |- dx dy RMOVETO |- */ /* Behaves like RMOVETO in PostScript */ ! static RMoveTo(dx,dy) DOUBLE dx,dy; { struct segment *B; --- 1279,1285 ---- /* |- dx dy RMOVETO |- */ /* Behaves like RMOVETO in PostScript */ ! static void RMoveTo(dx,dy) /* FP void */ DOUBLE dx,dy; { struct segment *B; *************** *** 1284,1290 **** /* - DOTSECTION |- */ /* Brackets an outline section for the dots in */ /* letters such as "i", "j", and "!". */ ! static DotSection() { IfTrace0((FontDebug), "DotSection\n"); InDotSection = !InDotSection; --- 1301,1307 ---- /* - DOTSECTION |- */ /* Brackets an outline section for the dots in */ /* letters such as "i", "j", and "!". */ ! static void DotSection() /* FP void */ { IfTrace0((FontDebug), "DotSection\n"); InDotSection = !InDotSection; *************** *** 1292,1298 **** /* |- asb adx ady bchar achar SEAC |- */ /* Standard Encoding Accented Character. */ ! static Seac(asb, adx, ady, bchar, achar) DOUBLE asb, adx, ady; unsigned char bchar, achar; { --- 1309,1315 ---- /* |- asb adx ady bchar achar SEAC |- */ /* Standard Encoding Accented Character. */ ! static void Seac(asb, adx, ady, bchar, achar) /* FP void */ DOUBLE asb, adx, ady; unsigned char bchar, achar; { *************** *** 1360,1366 **** /* |- sbx sby wx wy SBW |- */ /* Set the left sidebearing point to (sbx,sby), */ /* set the character width vector to (wx,wy). */ ! static Sbw(sbx, sby, wx, wy) DOUBLE sbx, sby, wx, wy; { IfTrace4((FontDebug), "SBW %f %f %f %f\n", &sbx, &sby, &wx, &wy); --- 1377,1383 ---- /* |- sbx sby wx wy SBW |- */ /* Set the left sidebearing point to (sbx,sby), */ /* set the character width vector to (wx,wy). */ ! static void Sbw(sbx, sby, wx, wy) /* FP void */ DOUBLE sbx, sby, wx, wy; { IfTrace4((FontDebug), "SBW %f %f %f %f\n", &sbx, &sby, &wx, &wy); *************** *** 1673,1679 **** /* arg1 ... argn n othersubr# CALLOTHERSUBR - */ /* Make calls on the PostScript interpreter (or call equivalent C code) */ /* NOTE: The n arguments have been pushed on the fake PostScript stack */ ! static CallOtherSubr(othersubrno) int othersubrno; { IfTrace1((FontDebug), "CallOtherSubr %d\n", othersubrno); --- 1690,1696 ---- /* arg1 ... argn n othersubr# CALLOTHERSUBR - */ /* Make calls on the PostScript interpreter (or call equivalent C code) */ /* NOTE: The n arguments have been pushed on the fake PostScript stack */ ! static void CallOtherSubr(othersubrno) /* FP void */ int othersubrno; { IfTrace1((FontDebug), "CallOtherSubr %d\n", othersubrno); *************** *** 1708,1714 **** /* Sets the current point to (x,y) in absolute */ /* character space coordinates without per- */ /* forming a CharString MOVETO command */ ! static SetCurrentPoint(x, y) DOUBLE x, y; { IfTrace2((FontDebug), "SetCurrentPoint %f %f\n", &x, &y); --- 1725,1731 ---- /* Sets the current point to (x,y) in absolute */ /* character space coordinates without per- */ /* forming a CharString MOVETO command */ ! static void SetCurrentPoint(x, y) /* FP void */ DOUBLE x, y; { IfTrace2((FontDebug), "SetCurrentPoint %f %f\n", &x, &y); *************** *** 1720,1726 **** /* The Type1Char routine for use by PostScript. */ /************************************************/ struct xobject *Type1Char(env, S, charstrP, subrsP, osubrsP, bluesP, modeP) ! char *env; struct XYspace *S; psobj *charstrP; psobj *subrsP; --- 1737,1743 ---- /* The Type1Char routine for use by PostScript. */ /************************************************/ struct xobject *Type1Char(env, S, charstrP, subrsP, osubrsP, bluesP, modeP) ! psfont *env; struct XYspace *S; psobj *charstrP; psobj *subrsP; diff -cr ../ps2pk15/type1/types.h ps2pk16beta1/type1/types.h *** ../ps2pk15/type1/types.h Sun Jan 2 21:35:48 1994 --- ps2pk16beta1/type1/types.h Wed Feb 25 16:32:08 1998 *************** *** 2,8 **** * File: types.h * Purpose: define basic types so that program is portable to non 32 bits * platforms ! * Version: 1.0 (Dec. 1993) * Author: Piet Tutelaers */ --- 2,8 ---- * File: types.h * Purpose: define basic types so that program is portable to non 32 bits * platforms ! * Version: 1.1 (Feb. 1998) * Author: Piet Tutelaers */ *************** *** 24,31 **** --- 24,33 ---- #else /* default: WORD32 */ typedef unsigned short USHORT; /* 16 bits */ typedef short SHORT; /* 16 bits */ + # ifndef WIN32 /* FP: These are already defined under WIN32 */ typedef int LONG; /* 32 bits */ typedef unsigned int ULONG; /* 32 bits */ + # endif typedef double DOUBLE; /* 64 bits */ #endif