diff -rNC2 gs26/Fontmap gs261/Fontmap *** gs26/Fontmap Thu May 6 16:17:22 1993 --- gs261/Fontmap Wed May 26 06:51:04 1993 *************** *** 1,4 **** % Copyright (C) 1990, 1992, 1993 Aladdin Enterprises. All rights reserved. - % Distributed by Free Software Foundation, Inc. % % This file is part of Ghostscript. --- 1,3 ---- *************** *** 26,31 **** % % - The name by which the font is known inside Ghostscript ! % (a Ghostscript literal name). This is used to find the file ! % from which a font of a given name should be loaded. % % - Information depending on whether this is a real font or a --- 25,31 ---- % % - The name by which the font is known inside Ghostscript ! % (a Ghostscript name preceded by a `/', or a string enclosed ! % in parentheses). This is used to find the file from which ! % a font of a given name should be loaded. % % - Information depending on whether this is a real font or a diff -rNC2 gs26/Fontmap.ATM gs261/Fontmap.ATM *** gs26/Fontmap.ATM Sun Jan 31 10:14:12 1993 --- gs261/Fontmap.ATM Wed May 12 18:06:30 1993 *************** *** 1,4 **** % Copyright (C) 1990, 1992 Aladdin Enterprises. All rights reserved. - % Distributed by Free Software Foundation, Inc. % % This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/NEWS gs261/NEWS *** gs26/NEWS Sun May 9 13:18:56 1993 --- gs261/NEWS Sat May 29 02:40:14 1993 *************** *** 1,4 **** Copyright (C) 1989, 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- *************** *** 26,32 **** README. ! Version 2.6.0 (5/9/93) ============= The main new feature in this release is the ability to use platform fonts. It also adds many more Level 2 PostScript facilities. --- 25,178 ---- README. ! Version 2.6.1 (5/28/93) ============= + This is primarily a bug-fix release for 2.6, with a couple of minor + additions. + + Documentation + ------------- + + Adds proper `man' pages ansi2knr.1 and gs.1. + + Procedures + ---------- + + Fixes bugs: + - The Unix makefile produced an incorrect linker command if + EXTRALIBS was not empty. + - The Unix install commands didn't copy devices.doc, + ps2epsi.doc, and xfonts.doc to the documentation directory. + - echogs.c didn't include , which is needed for + time_t on some systems. + - malloc_.h used rather than on + NeXTStep systems. + + Changes the configuration procedure to use a C program rather than + complex shell scripts. + + Utilities + --------- + + Fixes bugs: + - The boilerplate produced by ps2image used the 'max' + operator, which is not a standard PostScript operator. + - The winmaps.ps utility had 'floring' instead of 'florin' in + the OEMEncoding table. + - quit.ps was omitted from the PC distribution. + + Changes the name of the dicttomark procedure to .dicttomark. + + Renames gs_2asc.ps as ps2ascii.ps, so it matches the names of the + script files. + + Drivers + ------- + + Fixes bugs: + - The pbmraw driver was writing out RGG instead of RGB values. + - The X11 driver used NULL in a place where it should have + used None. + - For multi-file output, the GIF driver didn't write a header + at the beginning of each file. + - The Epson driver didn't honor the -A4 compilation switch, + didn't put (0,0) at the physical corner of the page, and was too + liberal about using tabs instead of spaces. + + Replaces the color handling algorithms in the X Windows driver with + new, much better ones. + + Makes the PC display drivers recognize the -A4 compilation switch, + like the printer drivers. + + Adds new user-contributed drivers: + - A driver for Epson printers that use the ESC/P 2 control + language, such as the Stylus 800. + - A driver for the Apple Dot Matrix Printer and Imagewriter. + + Adds a new get_xfont_device driver procedure. This is a + backward-compatible change, since there is a sensible default. + + Platforms + --------- + + Fixes bugs: + - On VMS, gconfig.h didn't have #include "gsconfig.h" as its + first line. + - gconfig.c compiled incorrectly on the RS/6000 because the + compiler evaluated a constant of the form (x<fname). + - The Epson driver used the wrong value for ESC in the + initialization string. Adds new drivers: diff -rNC2 gs26/README gs261/README *** gs26/README Fri May 7 13:49:20 1993 --- gs261/README Wed May 19 21:22:18 1993 *************** *** 1,4 **** Copyright (C) 1989, 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- *************** *** 21,25 **** ***************************************************** ! * This file describes version 2.6.0 of Ghostscript. * ***************************************************** --- 20,24 ---- ***************************************************** ! * This file describes version 2.6.1 of Ghostscript. * ***************************************************** *************** *** 72,77 **** - Sun workstations (Sun-3, SPARC, Sun-386i) running SunView; ! - VAX, VMS with X11R3/4/5, gcc and DEC C compiler (DEC C compiler ! version 3.1 or later is required). It is very likely that Ghostscript will run under other versions of --- 71,78 ---- - Sun workstations (Sun-3, SPARC, Sun-386i) running SunView; ! - VAX, VMS with X11R3/4/5 and gcc. (Ghostscript currently is ! not compatible with the DEC C compilers, because they ! interpret the ANSI C standard in a way different from all ! other known compilers.) It is very likely that Ghostscript will run under other versions of *************** *** 149,153 **** If you are a new user of Ghostscript, you should read: ! > use.doc - information about to install and use Ghostscript. > devices.doc - more detailed information about specific devices that --- 150,155 ---- If you are a new user of Ghostscript, you should read: ! > use.doc - information about to install and use Ghostscript. This ! information is also contained in gs.1 - a `man' page for Ghostscript. > devices.doc - more detailed information about specific devices that *************** *** 154,159 **** Ghostscript knows about. ! > scripts.doc - more detailed information about some of the shell scripts ! and batch files distributed with Ghostscript. If you are going to compile Ghostscript, rather than just use an --- 156,161 ---- Ghostscript knows about. ! > ps2epsi.doc, unix-lpr.doc - more detailed information about some of ! the shell scripts and batch files distributed with Ghostscript. If you are going to compile Ghostscript, rather than just use an *************** *** 185,188 **** --- 187,197 ---- > xfonts.doc - the interface between Ghostscript and platform-supplied fonts. (Read drivers.doc first.) + + If you are considering distributing Ghostscript in conjunction with a + commercial product, you should read the COPYING license carefully, + and you should also read: + + > commprod.doc - additional clarification of the circumstances under + which Ghostscript can be distributed with a commercial product. Other files diff -rNC2 gs26/alloc.h gs261/alloc.h *** gs26/alloc.h Wed Dec 9 13:50:08 1992 --- gs261/alloc.h Wed May 12 18:02:16 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1990, 1991 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/ansi2knr.1 gs261/ansi2knr.1 *** gs26/ansi2knr.1 --- gs261/ansi2knr.1 Mon Feb 18 03:17:38 1991 *************** *** 0 **** --- 1,19 ---- + .TH ANSI2KNR 1 "31 December 1990" + .SH NAME + ansi2knr \- convert ANSI C to Kernighan & Ritchie C + .SH SYNOPSIS + .I ansi2knr + input_file output_file + .SH DESCRIPTION + If no output_file is supplied, output goes to stdout. + .br + There are no error messages. + .sp + .I ansi2knr + recognizes functions by seeing a non-keyword identifier at the left margin, followed by a left parenthesis, with a right parenthesis as the last character on the line. It will recognize a multi-line header if the last character on each line but the last is a left parenthesis or comma. These algorithms ignore whitespace and comments, except that the function name must be the first thing on the line. + .sp + The following constructs will confuse it: + .br + - Any other construct that starts at the left margin and follows the above syntax (such as a macro or function call). + .br + - Macros that tinker with the syntax of the function header. diff -rNC2 gs26/ansi2knr.c gs261/ansi2knr.c *** gs26/ansi2knr.c Wed Sep 16 17:19:18 1992 --- gs261/ansi2knr.c Wed May 12 18:02:32 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1991 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/ansihead.mak gs261/ansihead.mak *** gs26/ansihead.mak Thu Apr 29 07:47:02 1993 --- gs261/ansihead.mak Wed May 12 18:02:40 1993 *************** *** 1,4 **** # Copyright (C) 1989, 1990, 1991, 1993 Aladdin Enterprises. All rights reserved. - # Distributed by Free Software Foundation, Inc. # # This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/astate.h gs261/astate.h *** gs26/astate.h Wed Dec 9 13:23:16 1992 --- gs261/astate.h Wed May 12 18:02:48 1993 *************** *** 1,4 **** /* Copyright (C) 1991, 1992 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/bc.mak gs261/bc.mak *** gs26/bc.mak Thu May 6 21:03:30 1993 --- gs261/bc.mak Fri May 28 18:36:26 1993 *************** *** 1,4 **** ! # Copyright (C) 1989, 1990, 1991, 1992 Aladdin Enterprises. All rights reserved. ! # Distributed by Free Software Foundation, Inc. # # This file is part of Ghostscript. --- 1,3 ---- ! # Copyright (C) 1989, 1990, 1991, 1992, 1993 Aladdin Enterprises. All rights reserved. # # This file is part of Ghostscript. *************** *** 107,117 **** CPU_TYPE=286 ! # Define the math coprocessor (FPU) type. Options are 0, 87, 287, or 387. # If the CPU type is 486, the FPU type is irrelevant, since the 80486 # CPU includes the equivalent of an 80387 on-chip. ! # A non-zero option means that the executable will only run if a FPU # of that type (or higher) is available: this is NOT currently checked # at runtime. - # Code is significantly faster. FPU_TYPE=0 --- 106,117 ---- CPU_TYPE=286 ! # Define the math coprocessor (FPU) type. ! # Options are -1 (optimize for no FPU), 0 (optimize for FPU present, ! # but do not require a FPU), 87, 287, or 387. # If the CPU type is 486, the FPU type is irrelevant, since the 80486 # CPU includes the equivalent of an 80387 on-chip. ! # An xx87 option means that the executable will run only if a FPU # of that type (or higher) is available: this is NOT currently checked # at runtime. FPU_TYPE=0 diff -rNC2 gs26/bcwin.mak gs261/bcwin.mak *** gs26/bcwin.mak Thu May 6 21:02:48 1993 --- gs261/bcwin.mak Wed May 26 18:56:12 1993 *************** *** 1,4 **** # Copyright (C) 1989, 1992, 1993 Aladdin Enterprises. All rights reserved. - # Distributed by Free Software Foundation, Inc. # # This file is part of Ghostscript. --- 1,3 ---- *************** *** 91,95 **** CPU_TYPE=286 ! # Don't rely on FPU for Windows. FPU_TYPE=0 --- 90,95 ---- CPU_TYPE=286 ! # Don't rely on FPU for Windows: Options are -1 (optimize for no FPU) or ! # 0 (optimize for FPU present, but do not require a FPU). FPU_TYPE=0 diff -rNC2 gs26/bdftops.ps gs261/bdftops.ps *** gs26/bdftops.ps Fri Jan 22 10:11:34 1993 --- gs261/bdftops.ps Thu May 27 17:58:50 1993 *************** *** 1,4 **** ! % Copyright (C) 1990, 1991 Aladdin Enterprises. All rights reserved. ! % Distributed by Free Software Foundation, Inc. % % This file is part of Ghostscript. --- 1,3 ---- ! % Copyright (C) 1990, 1991, 1993 Aladdin Enterprises. All rights reserved. % % This file is part of Ghostscript. *************** *** 35,39 **** % "Import" the font-writing package. (wrfont.ps) run ! /encrypt_CharStrings false def % Invert the StandardEncoding vector. --- 34,38 ---- % "Import" the font-writing package. (wrfont.ps) run ! /encrypt_CharStrings true def % Invert the StandardEncoding vector. *************** *** 42,52 **** end /decoding exch def - % Define the dictionary equivalent of ]. - /dicttomark - { counttomark 2 idiv dup dict begin - { def } repeat - pop currentdict end - } bind def - % Define the properties copied to FontInfo. mark --- 41,44 ---- *************** *** 55,59 **** (FULL_NAME) /FullName (WEIGHT_NAME) /Weight ! dicttomark /properties exch def % Define the character sequences used to fill in some undefined entries --- 47,51 ---- (FULL_NAME) /FullName (WEIGHT_NAME) /Weight ! .dicttomark /properties exch def % Define the character sequences used to fill in some undefined entries *************** *** 93,97 **** (quotesingle) [/quoteright] (tilde) [/asciitilde] ! dicttomark /composites exch def % Note the characters that must be defined as subroutines. --- 85,89 ---- (quotesingle) [/quoteright] (tilde) [/asciitilde] ! .dicttomark /composites exch def % Note the characters that must be defined as subroutines. *************** *** 145,149 **** /sterling [/L /hyphen] /yen [/Y /equal] ! dicttomark /accentedchars exch def % ------ BDF file parsing utilities ------ % --- 137,141 ---- /sterling [/L /hyphen] /yen [/Y /equal] ! .dicttomark /accentedchars exch def % ------ BDF file parsing utilities ------ % *************** *** 598,602 **** % Encrypt the CharStrings and Subrs (in place). charstrings dup begin ! { 4330 exch dup type1encrypt exch pop readonly def } --- 590,594 ---- % Encrypt the CharStrings and Subrs (in place). charstrings dup begin ! { 4330 exch dup .type1encrypt exch pop readonly def } *************** *** 604,608 **** 0 1 subrs length 1 sub { dup subrs exch get dup null ne ! { 4330 exch dup type1encrypt exch pop subrs 3 1 roll put } --- 596,600 ---- 0 1 subrs length 1 sub { dup subrs exch get dup null ne ! { 4330 exch dup .type1encrypt exch pop subrs 3 1 roll put } diff -rNC2 gs26/bench.ps gs261/bench.ps *** gs26/bench.ps Mon May 3 19:12:30 1993 --- gs261/bench.ps Wed May 12 18:03:12 1993 *************** *** 1,4 **** % Copyright (C) 1993 Aladdin Enterprises. All rights reserved. - % Distributed by Free Software Foundation, Inc. % % This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/bfont.h gs261/bfont.h *** gs26/bfont.h Sat Mar 20 11:38:02 1993 --- gs261/bfont.h Wed May 26 11:44:34 1993 *************** *** 1,4 **** /* Copyright (C) 1992 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- *************** *** 26,29 **** --- 25,30 ---- extern ref name_FontMatrix; extern int add_FID(P2(ref *pfdict, gs_font *pfont)); + /* The global font directory */ + extern gs_font_dir *ifont_dir; /* Structure for passing BuildChar and BuildGlyph procedures. */ *************** *** 39,40 **** --- 40,42 ---- const build_proc_refs *)); extern int get_gs_font_uid(P2(os_ptr, gs_uid *)); + extern int define_gs_font(P1(gs_font *)); diff -rNC2 gs26/bnum.h gs261/bnum.h *** gs26/bnum.h Sat Dec 28 06:56:54 1991 --- gs261/bnum.h Wed May 12 18:03:24 1993 *************** *** 1,4 **** /* Copyright (C) 1990 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/bseq.h gs261/bseq.h *** gs26/bseq.h Mon Dec 16 15:52:34 1991 --- gs261/bseq.h Wed May 12 18:03:30 1993 *************** *** 1,4 **** /* Copyright (C) 1990 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/btoken.h gs261/btoken.h *** gs26/btoken.h Mon Dec 16 15:52:44 1991 --- gs261/btoken.h Wed May 12 18:03:34 1993 *************** *** 1,4 **** /* Copyright (C) 1990 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/cc-head.mak gs261/cc-head.mak *** gs26/cc-head.mak Thu Apr 29 07:47:08 1993 --- gs261/cc-head.mak Wed May 12 18:03:38 1993 *************** *** 1,4 **** # Copyright (C) 1989, 1992, 1993 Aladdin Enterprises. All rights reserved. - # Distributed by Free Software Foundation, Inc. # # This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/ccfont.h gs261/ccfont.h *** gs26/ccfont.h Wed Nov 25 15:40:42 1992 --- gs261/ccfont.h Wed May 12 18:03:44 1993 *************** *** 1,4 **** /* Copyright (C) 1992 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/cfonts.mak gs261/cfonts.mak *** gs26/cfonts.mak Wed Dec 9 14:07:16 1992 --- gs261/cfonts.mak Wed May 26 17:27:36 1993 *************** *** 1,4 **** ! # Copyright (C) 1992 Aladdin Enterprises. All rights reserved. ! # Distributed by Free Software Foundation, Inc. # # This file is part of Ghostscript. --- 1,3 ---- ! # Copyright (C) 1992, 1993 Aladdin Enterprises. All rights reserved. # # This file is part of Ghostscript. *************** *** 24,27 **** --- 23,27 ---- CFONTS=fonts/c FONTS=fonts + FONT2C=font2c cfonts: AvantGarde_c Bookman_c CharterBT_c Courier_c Cyrillic_c Helvetica_c \ *************** *** 45,58 **** $(CFONTS)/pagk.c: $(FONTS)/pagk.gsf ! font2c AvantGarde-Book $(CFONTS)/pagk.c agk $(CFONTS)/pagko.c: $(FONTS)/pagko.gsf ! font2c AvantGarde-BookOblique $(CFONTS)/pagko.c agko $(CFONTS)/pagd.c: $(FONTS)/pagd.gsf ! font2c AvantGarde-Demi $(CFONTS)/pagd.c agd $(CFONTS)/pagdo.c: $(FONTS)/pagdo.gsf ! font2c AvantGarde-DemiOblique $(CFONTS)/pagdo.c agdo AvantGarde_o: pagk.$(OBJ) pagko.$(OBJ) pagd.$(OBJ) pagdo.$(OBJ) --- 45,58 ---- $(CFONTS)/pagk.c: $(FONTS)/pagk.gsf ! $(FONT2C) AvantGarde-Book $(CFONTS)/pagk.c agk $(CFONTS)/pagko.c: $(FONTS)/pagko.gsf ! $(FONT2C) AvantGarde-BookOblique $(CFONTS)/pagko.c agko $(CFONTS)/pagd.c: $(FONTS)/pagd.gsf ! $(FONT2C) AvantGarde-Demi $(CFONTS)/pagd.c agd $(CFONTS)/pagdo.c: $(FONTS)/pagdo.gsf ! $(FONT2C) AvantGarde-DemiOblique $(CFONTS)/pagdo.c agdo AvantGarde_o: pagk.$(OBJ) pagko.$(OBJ) pagd.$(OBJ) pagdo.$(OBJ) *************** *** 76,89 **** $(CFONTS)/pbkl.c: $(FONTS)/pbkl.gsf ! font2c Bookman-Light $(CFONTS)/pbkl.c bkl $(CFONTS)/pbkli.c: $(FONTS)/pbkli.gsf ! font2c Bookman-LightItalic $(CFONTS)/pbkli.c bkli $(CFONTS)/pbkd.c: $(FONTS)/pbkd.gsf ! font2c Bookman-Demi $(CFONTS)/pbkd.c bkd $(CFONTS)/pbkdi.c: $(FONTS)/pbkdi.gsf ! font2c Bookman-DemiItalic $(CFONTS)/pbkdi.c bkdi Bookman_o: pbkl.$(OBJ) pbkli.$(OBJ) pbkd.$(OBJ) pbkdi.$(OBJ) --- 76,89 ---- $(CFONTS)/pbkl.c: $(FONTS)/pbkl.gsf ! $(FONT2C) Bookman-Light $(CFONTS)/pbkl.c bkl $(CFONTS)/pbkli.c: $(FONTS)/pbkli.gsf ! $(FONT2C) Bookman-LightItalic $(CFONTS)/pbkli.c bkli $(CFONTS)/pbkd.c: $(FONTS)/pbkd.gsf ! $(FONT2C) Bookman-Demi $(CFONTS)/pbkd.c bkd $(CFONTS)/pbkdi.c: $(FONTS)/pbkdi.gsf ! $(FONT2C) Bookman-DemiItalic $(CFONTS)/pbkdi.c bkdi Bookman_o: pbkl.$(OBJ) pbkli.$(OBJ) pbkd.$(OBJ) pbkdi.$(OBJ) *************** *** 107,120 **** $(CFONTS)/bchr.c: $(FONTS)/bchr.gsf ! font2c Charter-Roman $(CFONTS)/bchr.c chr $(CFONTS)/bchri.c: $(FONTS)/bchri.gsf ! font2c Charter-Italic $(CFONTS)/bchri.c chri $(CFONTS)/bchb.c: $(FONTS)/bchb.gsf ! font2c Charter-Bold $(CFONTS)/bchb.c chb $(CFONTS)/bchbi.c: $(FONTS)/bchbi.gsf ! font2c Charter-BoldItalic $(CFONTS)/bchbi.c chbi CharterBT_o: bchr.$(OBJ) bchri.$(OBJ) bchb.$(OBJ) bchbi.$(OBJ) --- 107,120 ---- $(CFONTS)/bchr.c: $(FONTS)/bchr.gsf ! $(FONT2C) Charter-Roman $(CFONTS)/bchr.c chr $(CFONTS)/bchri.c: $(FONTS)/bchri.gsf ! $(FONT2C) Charter-Italic $(CFONTS)/bchri.c chri $(CFONTS)/bchb.c: $(FONTS)/bchb.gsf ! $(FONT2C) Charter-Bold $(CFONTS)/bchb.c chb $(CFONTS)/bchbi.c: $(FONTS)/bchbi.gsf ! $(FONT2C) Charter-BoldItalic $(CFONTS)/bchbi.c chbi CharterBT_o: bchr.$(OBJ) bchri.$(OBJ) bchb.$(OBJ) bchbi.$(OBJ) *************** *** 137,144 **** $(CFONTS)/cyr.c: $(FONTS)/cyr.gsf ! font2c Cyrillic $(CFONTS)/cyr.c cyr $(CFONTS)/cyri.c: $(FONTS)/cyri.gsf ! font2c Cyrillic-Italic $(CFONTS)/cyri.c cyri Cyrillic_o: cyr.$(OBJ) cyri.$(OBJ) --- 137,144 ---- $(CFONTS)/cyr.c: $(FONTS)/cyr.gsf ! $(FONT2C) Cyrillic $(CFONTS)/cyr.c cyr $(CFONTS)/cyri.c: $(FONTS)/cyri.gsf ! $(FONT2C) Cyrillic-Italic $(CFONTS)/cyri.c cyri Cyrillic_o: cyr.$(OBJ) cyri.$(OBJ) *************** *** 156,169 **** $(CFONTS)/ncrr.c: $(FONTS)/ncrr.gsf ! font2c Courier $(CFONTS)/ncrr.c crr $(CFONTS)/ncrri.c: $(FONTS)/ncrri.gsf ! font2c Courier-Italic $(CFONTS)/ncrri.c cri $(CFONTS)/ncrb.c: $(FONTS)/ncrb.gsf ! font2c Courier-Bold $(CFONTS)/ncrb.c crb $(CFONTS)/ncrbi.c: $(FONTS)/ncrbi.gsf ! font2c Courier-Italic $(CFONTS)/ncrbi.c crbi Courier_o: ncrr.$(OBJ) ncrri.$(OBJ) ncrb.$(OBJ) ncrbi.$(OBJ) --- 156,169 ---- $(CFONTS)/ncrr.c: $(FONTS)/ncrr.gsf ! $(FONT2C) Courier $(CFONTS)/ncrr.c crr $(CFONTS)/ncrri.c: $(FONTS)/ncrri.gsf ! $(FONT2C) Courier-Italic $(CFONTS)/ncrri.c cri $(CFONTS)/ncrb.c: $(FONTS)/ncrb.gsf ! $(FONT2C) Courier-Bold $(CFONTS)/ncrb.c crb $(CFONTS)/ncrbi.c: $(FONTS)/ncrbi.gsf ! $(FONT2C) Courier-Italic $(CFONTS)/ncrbi.c crbi Courier_o: ncrr.$(OBJ) ncrri.$(OBJ) ncrb.$(OBJ) ncrbi.$(OBJ) *************** *** 187,203 **** $(CFONTS)/phvr.c: $(FONTS)/phvr.gsf ! font2c Helvetica $(CFONTS)/phvr.c hvr $(CFONTS)/phvro.c: $(FONTS)/phvro.gsf ! font2c Helvetica-Oblique $(CFONTS)/phvro.c hvro $(CFONTS)/phvrrn.c: $(FONTS)/phvrrn.gsf ! font2c Helvetica-Narrow $(CFONTS)/phvrrn.c hvrrn $(CFONTS)/phvb.c: $(FONTS)/phvb.gsf ! font2c Helvetica-Bold $(CFONTS)/phvb.c hvb $(CFONTS)/phvbo.c: $(FONTS)/phvbo.gsf ! font2c Helvetica-BoldOblique $(CFONTS)/phvbo.c hvbo Helvetica_o: phvr.$(OBJ) phvro.$(OBJ) phvrrn.$(OBJ) phvb.$(OBJ) phvbo.$(OBJ) --- 187,203 ---- $(CFONTS)/phvr.c: $(FONTS)/phvr.gsf ! $(FONT2C) Helvetica $(CFONTS)/phvr.c hvr $(CFONTS)/phvro.c: $(FONTS)/phvro.gsf ! $(FONT2C) Helvetica-Oblique $(CFONTS)/phvro.c hvro $(CFONTS)/phvrrn.c: $(FONTS)/phvrrn.gsf ! $(FONT2C) Helvetica-Narrow $(CFONTS)/phvrrn.c hvrrn $(CFONTS)/phvb.c: $(FONTS)/phvb.gsf ! $(FONT2C) Helvetica-Bold $(CFONTS)/phvb.c hvb $(CFONTS)/phvbo.c: $(FONTS)/phvbo.gsf ! $(FONT2C) Helvetica-BoldOblique $(CFONTS)/phvbo.c hvbo Helvetica_o: phvr.$(OBJ) phvro.$(OBJ) phvrrn.$(OBJ) phvb.$(OBJ) phvbo.$(OBJ) *************** *** 224,237 **** $(CFONTS)/pncr.c: $(FONTS)/pncr.gsf ! font2c NewCenturySchlbk-Roman $(CFONTS)/pncr.c ncr $(CFONTS)/pncri.c: $(FONTS)/pncri.gsf ! font2c NewCenturySchlbk-Italic $(CFONTS)/pncri.c ncri $(CFONTS)/pncb.c: $(FONTS)/pncb.gsf ! font2c NewCenturySchlbk-Bold $(CFONTS)/pncb.c ncb $(CFONTS)/pncbi.c: $(FONTS)/pncbi.gsf ! font2c NewCenturySchlbk-BoldItalic $(CFONTS)/pncbi.c ncbi NewCenturySchlbk_o: pncr.$(OBJ) pncri.$(OBJ) pncb.$(OBJ) pncbi.$(OBJ) --- 224,237 ---- $(CFONTS)/pncr.c: $(FONTS)/pncr.gsf ! $(FONT2C) NewCenturySchlbk-Roman $(CFONTS)/pncr.c ncr $(CFONTS)/pncri.c: $(FONTS)/pncri.gsf ! $(FONT2C) NewCenturySchlbk-Italic $(CFONTS)/pncri.c ncri $(CFONTS)/pncb.c: $(FONTS)/pncb.gsf ! $(FONT2C) NewCenturySchlbk-Bold $(CFONTS)/pncb.c ncb $(CFONTS)/pncbi.c: $(FONTS)/pncbi.gsf ! $(FONT2C) NewCenturySchlbk-BoldItalic $(CFONTS)/pncbi.c ncbi NewCenturySchlbk_o: pncr.$(OBJ) pncri.$(OBJ) pncb.$(OBJ) pncbi.$(OBJ) *************** *** 255,268 **** $(CFONTS)/pplr.c: $(FONTS)/pplr.gsf ! font2c Palatino-Roman $(CFONTS)/pplr.c plr $(CFONTS)/pplri.c: $(FONTS)/pplri.gsf ! font2c Palatino-Italic $(CFONTS)/pplri.c plri $(CFONTS)/pplb.c: $(FONTS)/pplb.gsf ! font2c Palatino-Bold $(CFONTS)/pplb.c plb $(CFONTS)/pplbi.c: $(FONTS)/pplbi.gsf ! font2c Palatino-BoldItalic $(CFONTS)/pplbi.c plbi Palatino_o: pplr.$(OBJ) pplri.$(OBJ) pplb.$(OBJ) pplbi.$(OBJ) --- 255,268 ---- $(CFONTS)/pplr.c: $(FONTS)/pplr.gsf ! $(FONT2C) Palatino-Roman $(CFONTS)/pplr.c plr $(CFONTS)/pplri.c: $(FONTS)/pplri.gsf ! $(FONT2C) Palatino-Italic $(CFONTS)/pplri.c plri $(CFONTS)/pplb.c: $(FONTS)/pplb.gsf ! $(FONT2C) Palatino-Bold $(CFONTS)/pplb.c plb $(CFONTS)/pplbi.c: $(FONTS)/pplbi.gsf ! $(FONT2C) Palatino-BoldItalic $(CFONTS)/pplbi.c plbi Palatino_o: pplr.$(OBJ) pplri.$(OBJ) pplb.$(OBJ) pplbi.$(OBJ) *************** *** 285,289 **** $(CFONTS)/psyr.c: $(FONTS)/psyr.gsf ! font2c Symbol $(CFONTS)/psyr.c syr Symbol_o: psyr.$(OBJ) --- 285,289 ---- $(CFONTS)/psyr.c: $(FONTS)/psyr.gsf ! $(FONT2C) Symbol $(CFONTS)/psyr.c syr Symbol_o: psyr.$(OBJ) *************** *** 298,311 **** $(CFONTS)/ptmr.c: $(FONTS)/ptmr.gsf ! font2c Times-Roman $(CFONTS)/ptmr.c tmr $(CFONTS)/ptmri.c: $(FONTS)/ptmri.gsf ! font2c Times-Italic $(CFONTS)/ptmri.c tmri $(CFONTS)/ptmb.c: $(FONTS)/ptmb.gsf ! font2c Times-Bold $(CFONTS)/ptmb.c tmb $(CFONTS)/ptmbi.c: $(FONTS)/ptmbi.gsf ! font2c Times-BoldItalic $(CFONTS)/ptmbi.c tmbi TimesRoman_o: ptmr.$(OBJ) ptmri.$(OBJ) ptmb.$(OBJ) ptmbi.$(OBJ) --- 298,311 ---- $(CFONTS)/ptmr.c: $(FONTS)/ptmr.gsf ! $(FONT2C) Times-Roman $(CFONTS)/ptmr.c tmr $(CFONTS)/ptmri.c: $(FONTS)/ptmri.gsf ! $(FONT2C) Times-Italic $(CFONTS)/ptmri.c tmri $(CFONTS)/ptmb.c: $(FONTS)/ptmb.gsf ! $(FONT2C) Times-Bold $(CFONTS)/ptmb.c tmb $(CFONTS)/ptmbi.c: $(FONTS)/ptmbi.gsf ! $(FONT2C) Times-BoldItalic $(CFONTS)/ptmbi.c tmbi TimesRoman_o: ptmr.$(OBJ) ptmri.$(OBJ) ptmb.$(OBJ) ptmbi.$(OBJ) *************** *** 328,332 **** uglyr.c: uglyr.gsf ! font2c Ugly uglyr.c uglyr Ugly_o: uglyr.$(OBJ) --- 328,332 ---- uglyr.c: uglyr.gsf ! $(FONT2C) Ugly uglyr.c uglyr Ugly_o: uglyr.$(OBJ) *************** *** 341,354 **** $(CFONTS)/putr.c: $(FONTS)/putr.gsf ! font2c Utopia-Regular $(CFONTS)/putr.c utr $(CFONTS)/putri.c: $(FONTS)/putri.gsf ! font2c Utopia-Italic $(CFONTS)/putri.c utri $(CFONTS)/putb.c: $(FONTS)/putb.gsf ! font2c Utopia-Bold $(CFONTS)/putb.c utb $(CFONTS)/putbi.c: $(FONTS)/putbi.gsf ! font2c Utopia-BoldItalic $(CFONTS)/putbi.c utbi Utopia_o: putr.$(OBJ) putri.$(OBJ) putb.$(OBJ) putbi.$(OBJ) --- 341,354 ---- $(CFONTS)/putr.c: $(FONTS)/putr.gsf ! $(FONT2C) Utopia-Regular $(CFONTS)/putr.c utr $(CFONTS)/putri.c: $(FONTS)/putri.gsf ! $(FONT2C) Utopia-Italic $(CFONTS)/putri.c utri $(CFONTS)/putb.c: $(FONTS)/putb.gsf ! $(FONT2C) Utopia-Bold $(CFONTS)/putb.c utb $(CFONTS)/putbi.c: $(FONTS)/putbi.gsf ! $(FONT2C) Utopia-BoldItalic $(CFONTS)/putbi.c utbi Utopia_o: putr.$(OBJ) putri.$(OBJ) putb.$(OBJ) putbi.$(OBJ) *************** *** 371,381 **** $(CFONTS)/zcr.c: $(FONTS)/zcr.gsf ! font2c ZapfChancery $(CFONTS)/zcr.c cr $(CFONTS)/zcro.c: $(FONTS)/zcro.gsf ! font2c ZapfChancery-Oblique $(CFONTS)/zcro.c cro $(CFONTS)/zcb.c: $(FONTS)/zcb.gsf ! font2c ZapfChancery-Bold $(CFONTS)/zcb.c cb ZapfChancery_o: zcr.$(OBJ) zcro.$(OBJ) zcb.$(OBJ) --- 371,381 ---- $(CFONTS)/zcr.c: $(FONTS)/zcr.gsf ! $(FONT2C) ZapfChancery $(CFONTS)/zcr.c cr $(CFONTS)/zcro.c: $(FONTS)/zcro.gsf ! $(FONT2C) ZapfChancery-Oblique $(CFONTS)/zcro.c cro $(CFONTS)/zcb.c: $(FONTS)/zcb.gsf ! $(FONT2C) ZapfChancery-Bold $(CFONTS)/zcb.c cb ZapfChancery_o: zcr.$(OBJ) zcro.$(OBJ) zcb.$(OBJ) *************** *** 395,399 **** $(CFONTS)/pzdr.c: $(FONTS)/pzdr.gsf ! font2c ZapfDingbats $(CFONTS)/pzdr.c zdr ZapfDingbats_o: pzdr.$(OBJ) --- 395,399 ---- $(CFONTS)/pzdr.c: $(FONTS)/pzdr.gsf ! $(FONT2C) ZapfDingbats $(CFONTS)/pzdr.c zdr ZapfDingbats_o: pzdr.$(OBJ) diff -rNC2 gs26/commprod.doc gs261/commprod.doc *** gs26/commprod.doc --- gs261/commprod.doc Wed May 19 20:41:58 1993 *************** *** 0 **** --- 1,190 ---- + Copyright (C) 1993 Aladdin Enterprises. All rights reserved. + + Permission to copy and distribute this document unmodified for any + purpose is hereby granted without fee, provided that the above + copyright notice and this permission notice appear in all copies. + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + This document provides additional clarification on the issue of when + Ghostscript can be distributed with a commercial product. It is + included in the Ghostscript fileset under the name commprod.doc. + + For an overview of Ghostscript and a list of the documentation files, see + the README file in the Ghostscript fileset. + + + The Use of "Free" Ghostscript With Commercial Products + ------------------------------------------------------ + + A number of companies distribute Ghostscript, which is a copyrighted work, + with their commercial products, without entering into any prior explicit + agreement with Aladdin Enterprises, which is the holder of the copyright + in Ghostscript. Ghostscript is distributed freely with a license, called + the GNU General Public License (also known as the "GNU License", the + "GPL", or the "copyleft"), which permits Ghostscript to be distributed + with commercial products under certain circumstances. The purpose of this + document is to explain those circumstances in detail. Note that we + consider this entire document a clarification of the GPL: we believe that + anyone distributing Ghostscript with the GPL with a commercial product + must follow the criteria presented here, whether or not they have received + this document. + + For those unfamiliar with the GPL, we now summarize its key provisions. + This is not a complete statement of the GPL; the full GPL is included + under the name COPYING in the fileset that comprises Ghostscript, and can + also be obtained from the Free Software Foundation (FSF), 675 Mass Ave., + Cambridge, MA 02139 (U.S.A.). In case of doubt or conflict, the contents + of the COPYING file or the document obtained from the FSF, not this + summary, are authoritative. + + 1. Anyone may copy and distribute Ghostscript (both source and + object code), but they must distribute the source code as well as the + object code (or, if they distribute only the object code, they must + include an offer in writing to provide the source code at no more than + reproduction cost), keep all copyright and other notices, and include the + GPL with the copies. (Note that this allows anyone receiving such a copy + to distribute it freely as well.) + + 2. Anyone may modify Ghostscript, but the provisions of #1 apply + to modified or derived works as well. + + 3. Ghostscript may be "aggregated" with another program; in this + case, #1 and #2 do not apply to the other program, but only to + Ghostscript. + + Provision #1 makes it much harder to have a commercial business based only + on selling copies of Ghostscript (as distributed with the GPL) or + products that contain Ghostscript, since any customer is free to make as + many copies as they want for any purpose. (Businesses based on added + value, such as added documentation or services, subscription to updates, + or just ease of access to the software, may still be feasible.) Provision + #2 effectively prevents the development of proprietary commercial products + that incorporate Ghostscript as a part, since these are "derived works" in + the legal sense. It is provision #3 that allow companies like Autodesk to + distribute Ghostscript with their commercial products. + + It should be noted that these companies are still required to obey #1 and + #2 with respect to Ghostscript itself; in particular, if they modified or + augmented Ghostscript in any way, they must supply (or offer to supply) to + customers the source code for their modifications or additions, and in any + case must supply the GPL as part of Ghostscript. + + Questions have arisen at times as to whether Ghostscript is only + "aggregated" with other parts of a commercial product, or whether the + product has become a "derived work." In the past, Aladdin Enterprises has + been relatively lenient about allowing companies to package Ghostscript + with their commercial products, as long as Ghostscript was in the form of + a separate executable that might be called through a mechanism like + `exec'. However, we have learned that a number of companies have been + distributing Ghostscript with their products in a way that does not make + it absolutely clear and obvious to users that Ghostscript is in fact a + separate program, governed by a different license and authored by someone + other than the distributor. For that reason, we now wish to state the + criteria that we use for determining whether Ghostscript is being + "aggregated" with another program. + + We consider Ghostscript to be "aggregated" with another piece of software, + which we will refer to as "the application", only if all of the following + conditions are met: + + - The code and documentation for Ghostscript are physically + separated from the code and documentation for the application. + For electronic form, it is both necessary and sufficient to put + the Ghostscript code and documentation in their own directory + tree(s). + + - Ghostscript, as delivered with the application, is usable + independently of the application. More precisely, if a user + deletes from the computer system all files delivered with the + application except those in the Ghostscript directories, the user + will still be able to use Ghostscript as described in + Ghostscript's documentation. Among other things, this requires + that Ghostscript not call any routines in the application, and not + require any data or other files supplied as part of the + application (unless, of course, those routines or files are made + part of the modified Ghostscript and brought under the GPL as + well). + + - The application calls Ghostscript in a way that allows an + ordinary user to substitute another program for Ghostscript. + (Typically this requires use of a shell script or batch file, + or a system call like `exec'.) More precisely, if the user + deletes from the computer system all the files in the Ghostscript + directories, and replaces the Ghostscript executable with another + program with the same name and conforming to the same + documentation, the application will continue to work with it. One + implication of this is that the Ghostscript documentation must + specify all properties of Ghostscript on which the application + relies; for example, if Ghostscript has been modified by the + addition of command line switches or language elements such as new + operators, the documentation must describe any such additions that + the application uses. + + - The conditions of the GPL are met with respect to Ghostscript, + including the requirement for propagation of the GPL and the + requirement for delivering (or an offer to deliver) source code. + + Regarding this last point, the GPL clearly intends that if the distributor + only offers to provide the Ghostscript source code (as opposed to actually + distributing the source code with every copy of the application), then + they must deliver the source code in a timely way to anyone requesting it. + For example, if the distributor offers a refund if the product is returned + within a certain amount of time, the distributor must be prepared to + deliver the source code well within that period if the customer orders it + very soon after receiving the product. + + Here are some examples of situations which do NOT qualify as "aggregation". + + - Ghostscript documentation is included as a chapter of the + application's documentation. + + - Ghostscript is modified to require files that are supplied with + the application and not brought under the GPL. + + The GPL makes it clear that if someone receives Ghostscript only in its + GPL-licensed form, they only have a right to distribute it if they comply + with the GPL. Aladdin Enterprises takes this requirement very seriously, + and will, if necessary, take legal action to ensure that anyone + distributing Ghostscript does so only under conditions allowed by the GPL + (or other license obtained from Aladdin, if relevant). For example, + computer bulletin boards (BBSs) often distribute only the object code of + Ghostscript, because the source code is quite large. Aladdin has already + notified the operators of several BBSs that they are not allowed to do + this: they must either distribute the full fileset, or nothing. Aladdin + has discovered that one large company using provision #3 has not included + a written offer to supply Ghostscript source code; the company has been + notified and is in the process of complying, including notifying all + existing customers who have received the application with which + Ghostscript was distributed. + + This document is included with all versions of Ghostscript starting with + version 2.6.1, but since it simply clarifies some provisions of the GPL, + and since all freely distributed versions of Ghostscript have included the + GPL, we believe its provisions apply to all versions of Ghostscript. If + you distribute or intend to distribute Ghostscript commercially with an + application, then if you abide by the requirements of the GPL (as + clarified here), you do not need to do anything else; but if you have any + uncertainty about whether your product meets these requirements, Aladdin + Enterprises will be glad to inspect a complete copy of the product before + you distribute it, and let you know whether we see any problems. If, on + the other hand, you want to distribute software that incorporates + Ghostscript and you do *not* want to meet these conditions, you should + contact Aladdin Enterprises to discuss the possibility of commercial + licensing. Commercial licenses involve a (negotiated) payment, and + include support and other benefits. These are the only ways you legally + can distribute Ghostscript or anything containing Ghostscript: either by + following the requirements of the GPL as clarified in this document, or by + getting a commercial license from Aladdin Enterprises. + + If you have any questions about any of the information in this document, + please contact: + + Aladdin Enterprises + P.O. box 60264 + Palo Alto, CA 94306 + U.S.A. + voice phone 415-322-0103 + fax 415-322-1734 + ...{uunet,decwrl}!aladdin!ghost + ghost@aladdin.com diff -rNC2 gs26/ctype_.h gs261/ctype_.h *** gs26/ctype_.h Fri Apr 30 04:46:48 1993 --- gs261/ctype_.h Wed May 12 18:04:26 1993 *************** *** 1,4 **** /* Copyright (C) 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/decrypt.ps gs261/decrypt.ps *** gs26/decrypt.ps Mon May 25 18:59:42 1992 --- gs261/decrypt.ps Thu May 27 17:58:08 1993 *************** *** 6,10 **** 55665 % eexec encryption seed { in buf readhexstring /more exch def ! dup type1decrypt out exch writestring more not { exit } if } loop --- 6,10 ---- 55665 % eexec encryption seed { in buf readhexstring /more exch def ! dup .type1decrypt out exch writestring more not { exit } if } loop diff -rNC2 gs26/devices.doc gs261/devices.doc *** gs26/devices.doc Fri May 7 13:18:12 1993 --- gs261/devices.doc Wed May 19 20:14:32 1993 *************** *** 1,4 **** Copyright (C) 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- *************** *** 31,34 **** --- 30,34 ---- HP PaintJet, XL, and XL300 DEC LJ250 + Apple Dot Matrix Printer (and Imagewriter) ### ------------------------- The SPARCprinter ------------------------- ### *************** *** 317,320 **** --- 317,360 ---- drivers for the additional machines and reporting their findings back to me. + + ### ------------------------------ End --------------------------------- ### + + ### ------------------- Apple Dot Matrix Printer ---------------------- ### + + This section was written by Mark Wedel. + + The Dot Matrix Driver (DMP) driver is a simple driver I wrote. It + could more more efficient, but it seems to print the images fine. + + The Dot Matrix Printer was a parallel predecessor to the Imagewriter + printer. As far as I know, the Imagewriter commands are a superset + to those of the Dot Matrix printer, so the driver should work fine at + generating output that can be printed on Imagewriters. + + A few notes (from the gdevadmp.c file): + + * To print out images, it sets the printer for unidirection printing + * and 15 cpi (120 dpi). IT sets line feed to 1/9 of an inch (72 dpi). + * When finished, it sets things back to bidirection print, 1/8" line + * feeds, and 12 cpi. There does not appear to be a way to reset + * things to initial values. + * + * This code does not set for 8 bit characters (which is required). It + * also assumes that carriage return/newline is needed, and not just + * carriage return. These are all switch settings on the DMP, and + * I have configured them for 8 bit data and cr only. + * + * You can search for the strings Init and Reset (in devdemp.c) to find the + * strings that set up the printer and clear things when finished, and change + * them to meet your needs. + * + * Also, you need to make sure that the printer daemon (assuming unix) + * doesn't change the data as it is being printed. I have set my + * printcap file (sunos 4.1.1) with the string: + * ms=pass8,-opost + * and it works fine. + + Mark Wedel + master@cats.ucsc.edu ### ------------------------------ End --------------------------------- ### diff -rNC2 gs26/devs.mak gs261/devs.mak *** gs26/devs.mak Tue May 4 11:47:12 1993 --- gs261/devs.mak Wed May 19 20:17:18 1993 *************** *** 1,4 **** # Copyright (C) 1989, 1992, 1993 Aladdin Enterprises. All rights reserved. - # Distributed by Free Software Foundation, Inc. # # This file is part of Ghostscript. --- 1,3 ---- *************** *** 55,58 **** --- 54,58 ---- # x11 X Windows version 11, release >=3 [Unix and VMS only] # Printers: + # * appledmp Apple Dot Matrix Printer (should also work with Imagewriter) # bj10e Canon BubbleJet BJ10e # * bj200 Canon BubbleJet BJ200 *************** *** 73,76 **** --- 73,77 ---- # (triple resolution) # * epsonc Epson LQ-2550 and Fujitsu 3400/2400/1200 color printers + # * escp2 Epson ESC/P 2 language printers, including Stylus 800 # + ibmpro IBM 9-pin Proprinter # * jetp3852 IBM Jetprinter ink-jet color printer (Model #3852) *************** *** 164,167 **** --- 165,172 ---- # plane-addressed), a SuperVGA driver (8 bit-planes, byte addressed), # and a special driver for the S3 chip. + # To make A4 paper the default, change the compilation line from + # $(CCD) ... + # to + # $(CCD) -DA4 ### ----------------------- EGA and VGA displays ----------------------- ### *************** *** 284,288 **** # Choose one of gdevwddb or gdevwdib here. ! mswin_=gdevmswn.$(OBJ) gdevmsxf.$(OBJ) gdevwddb.$(OBJ) \ gdevemap.$(OBJ) gdevpccm.$(OBJ) mswin.dev: $(mswin_) --- 289,293 ---- # Choose one of gdevwddb or gdevwdib here. ! mswin_=gdevmswn.$(OBJ) gdevmsxf.$(OBJ) gdevwdib.$(OBJ) \ gdevemap.$(OBJ) gdevpccm.$(OBJ) mswin.dev: $(mswin_) *************** *** 329,332 **** --- 334,344 ---- gdevprn.$(OBJ): gdevprn.c $(PDEVH) $(gp_h) $(gsprops_h) + ### ------------------- The Apple DMP printer device ------------------- ### + + appledmp_=gdevadmp.$(OBJ) gdevprn.$(OBJ) + + appledmp.dev: $(appledmp_) + $(SHP)gssetdev appledmp $(appledmp_) + ### ------------ The Canon BubbleJet BJ10e and BJ200 devices ------------ ### *************** *** 474,477 **** --- 486,499 ---- gdevepsc.$(OBJ): gdevepsc.c $(PDEVH) + + ### -------------- The Epson ESC/P 2 language printer device ----------- ### + ### Note: this driver was contributed by a user: if you have questions, ### + ### please contact Richard Brown (rab@tauon.ph.unimelb.edu.au). ### + + escp2_=gdevescp2.$(OBJ) gdevprn.$(OBJ) + escp2.dev: $(escp2_) + $(SHP)gssetdev escp2 $(escp2_) + + gdevescp2.$(OBJ): gdevescp2.c $(PDEVH) ### ------------ The H-P PaintJet color printer device ----------------- ### diff -rNC2 gs26/dict.h gs261/dict.h *** gs26/dict.h Thu Apr 16 12:42:38 1992 --- gs261/dict.h Wed May 12 18:04:50 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1992 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/dos_.h gs261/dos_.h *** gs26/dos_.h Sat Apr 17 06:01:12 1993 --- gs261/dos_.h Wed May 12 18:05:10 1993 *************** *** 1,4 **** /* Copyright (C) 1991, 1992 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/dparam.h gs261/dparam.h *** gs26/dparam.h Sun Jun 21 10:49:20 1992 --- gs261/dparam.h Wed May 12 18:05:14 1993 *************** *** 1,4 **** /* Copyright (C) 1992 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/drivers.doc gs261/drivers.doc *** gs26/drivers.doc Sun Mar 28 05:46:58 1993 --- gs261/drivers.doc Wed May 26 14:42:42 1993 *************** *** 1,5 **** Copyright (C) 1989, 1990, 1991, 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,4 ---- *************** *** 670,671 **** --- 669,678 ---- text display. A NULL value means that this driver doesn't provide this capability. + + For technical reasons, a second procedure is also needed: + + gx_device *(*get_xfont_device)(P1(gx_device *dev)) [OPTIONAL] + + Return the device that implements get_xfont_procs in a non-default + way for this device, if any. Except for certain special internal devices, + this is always the device argument. diff -rNC2 gs26/dstack.h gs261/dstack.h *** gs26/dstack.h Tue Jan 5 13:14:22 1993 --- gs261/dstack.h Wed May 12 18:05:26 1993 *************** *** 1,4 **** /* Copyright (C) 1992 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/echogs.c gs261/echogs.c *** gs26/echogs.c Fri Apr 23 17:38:22 1993 --- gs261/echogs.c Wed May 12 18:05:30 1993 *************** *** 1,4 **** /* Copyright (C) 1992 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- *************** *** 24,27 **** --- 23,28 ---- /* prototypes for fputc/fputs in stdio.h! */ extern int fputc(), fputs(); + /* Some systems have time_t in sys/types.h rather than time.h. */ + #include #include #include diff -rNC2 gs26/ega.c gs261/ega.c *** gs26/ega.c Sat Apr 3 01:44:28 1993 --- gs261/ega.c Wed May 12 18:05:34 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/errno_.h gs261/errno_.h *** gs26/errno_.h Sat Feb 27 08:07:10 1993 --- gs261/errno_.h Wed May 12 18:05:40 1993 *************** *** 1,4 **** /* Copyright (C) 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/errors.h gs261/errors.h *** gs26/errors.h Thu Apr 15 18:43:50 1993 --- gs261/errors.h Wed May 12 18:05:44 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1992 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/estack.h gs261/estack.h *** gs26/estack.h Mon Feb 1 01:59:30 1993 --- gs261/estack.h Wed May 12 18:05:54 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/filedev.h gs261/filedev.h *** gs26/filedev.h Sun Apr 18 19:24:48 1993 --- gs261/filedev.h Wed May 12 18:06:00 1993 *************** *** 1,4 **** /* Copyright (C) 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/files.h gs261/files.h *** gs26/files.h Mon May 3 03:11:38 1993 --- gs261/files.h Wed May 12 18:06:06 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/font.h gs261/font.h *** gs26/font.h Sat Mar 20 11:21:30 1993 --- gs261/font.h Wed May 26 16:51:44 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1991, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- *************** *** 38,42 **** /* Registered encodings, for the benefit of platform fonts, `seac', */ /* and compiled font initialization. */ ! #define registered_Encodings_countof 3 extern ref registered_Encodings[registered_Encodings_countof]; #define StandardEncoding (registered_Encodings[0]) --- 37,41 ---- /* Registered encodings, for the benefit of platform fonts, `seac', */ /* and compiled font initialization. */ ! #define registered_Encodings_countof 4 extern ref registered_Encodings[registered_Encodings_countof]; #define StandardEncoding (registered_Encodings[0]) diff -rNC2 gs26/font2c.ps gs261/font2c.ps *** gs26/font2c.ps Wed Dec 9 10:00:38 1992 --- gs261/font2c.ps Wed May 26 16:57:18 1993 *************** *** 1,4 **** ! % Copyright (C) 1992 Aladdin Enterprises. All rights reserved. ! % Distributed by Free Software Foundation, Inc. % % This file is part of Ghostscript. --- 1,3 ---- ! % Copyright (C) 1992, 1993 Aladdin Enterprises. All rights reserved. % % This file is part of Ghostscript. *************** *** 362,369 **** % Construct an inverse dictionary of encodings. ! 3 dict begin StandardEncoding (StandardEncoding) def ISOLatin1Encoding (ISOLatin1Encoding) def SymbolEncoding (SymbolEncoding) def currentdict end /encodingnames exch def --- 361,369 ---- % Construct an inverse dictionary of encodings. ! 4 dict begin StandardEncoding (StandardEncoding) def ISOLatin1Encoding (ISOLatin1Encoding) def SymbolEncoding (SymbolEncoding) def + DingbatsEncoding (DingbatsEncoding) def currentdict end /encodingnames exch def *************** *** 404,436 **** % Write out the boilerplate. Font begin ! (/* Copyright (C) 1992 Aladdin Enterprises. All rights reserved.) wl ! ( Distributed by Free Software Foundation, Inc.) wl ! () wl ! (This file is part of Ghostscript.) wl ! () wl ! (Ghostscript is distributed in the hope that it will be useful, but) wl ! (WITHOUT ANY WARRANTY. No author or distributor accepts responsibility) wl ! (to anyone for the consequences of using it or for whether it serves any) wl ! (particular purpose or works at all, unless he says so in writing.) wl ! (Refer to the Ghostscript General Public License for full details.) wl ! () wl ! (Everyone is granted permission to copy, modify and redistribute) wl ! (Ghostscript, but only under the conditions described in the Ghostscript) wl ! (General Public License. A copy of this license is supposed to have been) wl ! (given to you along with Ghostscript so you can know your rights and) wl ! (responsibilities. It should be in a file named COPYING. Among other) wl ! (things, the copyright notice and this notice must be preserved on all) wl ! (copies. */) wl ! () wl ! (/* ) ws cfname ws ( */) wl ! (/* This file was created by the Ghostscript font2c utility. */) wl ! () wl FontInfo /Notice known ! { (/* Portions of this file are subject to the following notice: */) wl (/****************************************************************) wl FontInfo /Notice get wl ( ****************************************************************/) wl - () wl } if (#include "std.h") wl (#include "iref.h") wl --- 404,421 ---- % Write out the boilerplate. Font begin ! (/* Portions of this file are) wl ! systemdict /copyright get ws ! (All rights reserved.) wl ! (*/) wl FontInfo /Notice known ! { (/* Portions of this file are also subject to the following notice: */) wl (/****************************************************************) wl FontInfo /Notice get wl ( ****************************************************************/) wl } if + () wl + (/* ) ws cfname ws ( */) wl + (/* This file was created by the Ghostscript font2c utility. */) wl + () wl (#include "std.h") wl (#include "iref.h") wl diff -rNC2 gs26/fonts.doc gs261/fonts.doc *** gs26/fonts.doc Thu Dec 31 05:31:30 1992 --- gs261/fonts.doc Tue May 18 05:34:16 1993 *************** *** 1,4 **** Copyright (C) 1990, 1991 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- *************** *** 205,211 **** systems, you edit gs.mak; on Unix systems, you edit makefile. Find the line in the relevant makefile that says ! ccfonts_=ugly.$(OBJ) Edit this to add your compiled font file names, e.g., ! ccfonts_=ugly.$(OBJ) ptmri.$(OBJ) Just below this, you will find a line that says ccfonts1=Ugly --- 204,212 ---- systems, you edit gs.mak; on Unix systems, you edit makefile. Find the line in the relevant makefile that says ! ccfonts1_=ugly.$(OBJ) Edit this to add your compiled font file names, e.g., ! ccfonts1_=ugly.$(OBJ) ptmri.$(OBJ) ! If the line gets too long, add another line of the same form, e.g., ! ccfonts2_=ptmb.$(OBJ) Just below this, you will find a line that says ccfonts1=Ugly *************** *** 212,217 **** Add your own fonts to the end of this line, e.g., ccfonts1=Ugly Times_Italic ! Notice that you must replace `-' by `_' in the font name. If the line ! gets too long, add another line of the same form, e.g., ccfonts1=Ugly ccfonts2=Times_Italic --- 213,218 ---- Add your own fonts to the end of this line, e.g., ccfonts1=Ugly Times_Italic ! Notice that you must replace `-' by `_' in the font name. Again, if ! the line gets too long, add another line of the same form, e.g., ccfonts1=Ugly ccfonts2=Times_Italic diff -rNC2 gs26/fonts.mak gs261/fonts.mak *** gs26/fonts.mak Mon Sep 28 17:53:02 1992 --- gs261/fonts.mak Mon May 24 18:21:56 1993 *************** *** 1,4 **** ! # Copyright (C) 1991, 1992 Aladdin Enterprises. All rights reserved. ! # Distributed by Free Software Foundation, Inc. # # This file is part of Ghostscript. --- 1,3 ---- ! # Copyright (C) 1991, 1992, 1993 Aladdin Enterprises. All rights reserved. # # This file is part of Ghostscript. *************** *** 21,29 **** # For more information about Ghostscript fonts, consult the Fontmap file. ! AFM=afm BDF=fonts/bdf ! FONTS=fonts PFA=fonts/pfa fonts: AvantGarde Bookman CharterBT Courier Cyrillic Helvetica \ NewCenturySchlbk Palatino Symbol TimesRoman \ --- 20,30 ---- # For more information about Ghostscript fonts, consult the Fontmap file. ! AFM=fonts/afm BDF=fonts/bdf ! FONTS=fonts/gsf PFA=fonts/pfa + GSBDF=gs386 + fonts: AvantGarde Bookman CharterBT Courier Cyrillic Helvetica \ NewCenturySchlbk Palatino Symbol TimesRoman \ *************** *** 155,158 **** --- 156,166 ---- # ---------------------------------------------------------------- + FBEGIN=echogs -w _temp_ -n -x 5b28 # open bracket, open parenthesis + P2=-x 2928 # close and open parenthesis + FNEXT=echogs -a _temp_ -n + FLAST=echogs -a _temp_ + FEND=-x 295d /ARGUMENTS exch def # close parenthesis, close bracket + RUNBDF=$(GSBDF) -dNODISPLAY _temp_ bdftops.ps quit.ps + # ---------------- Avant Garde ---------------- *************** *** 160,178 **** $(FONTS)/pagdo.gsf ! $(FONTS)/pagk.gsf: $(BDF)/avt18.bdf $(AFM)/avantgarde_book.afm ! bdftops $(BDF)/avt18.bdf $(AFM)/avantgarde_book.afm \ ! $(FONTS)/pagk.gsf AvantGarde-Book 4082000 ! ! $(FONTS)/pagko.gsf: $(BDF)/pagko.bdf $(AFM)/avantgarde_bookoblique.afm ! bdftops $(BDF)/pagko.bdf $(AFM)/avantgarde_bookoblique.afm \ ! $(FONTS)/pagko.gsf AvantGarde-BookOblique 4082200 ! ! $(FONTS)/pagd.gsf: $(BDF)/pagd.bdf $(AFM)/avantgarde_demi.afm ! bdftops $(BDF)/pagd.bdf $(AFM)/avantgarde_demi.afm \ ! $(FONTS)/pagd.gsf AvantGarde-Demi 4083000 ! ! $(FONTS)/pagdo.gsf: $(BDF)/pagdo.bdf $(AFM)/avantgarde_demioblique.afm ! bdftops $(BDF)/pagdo.bdf $(AFM)/avantgarde_demioblique.afm \ ! $(FONTS)/pagdo.gsf AvantGarde-DemiOblique 4083200 # ---------------- Bookman ---------------- --- 168,194 ---- $(FONTS)/pagdo.gsf ! $(FONTS)/pagk.gsf: $(BDF)/avt18.bdf $(AFM)/av-k.afm ! $(FBEGIN) $(BDF)/avt18.bdf $(P2) $(AFM)/av-k.afm $(P2) ! $(FNEXT) $(FONTS)/pagk.gsf $(P2) ! $(FLAST) AvantGarde-Book $(P2) 4082000 $(FEND) ! $(RUNBDF) ! ! $(FONTS)/pagko.gsf: $(BDF)/pagko.bdf $(AFM)/av-ko.afm ! $(FBEGIN) $(BDF)/pagko.bdf $(P2) $(AFM)/av-ko.afm $(P2) ! $(FNEXT) $(FONTS)/pagko.gsf $(P2) ! $(FLAST) AvantGarde-BookOblique $(P2) 4082200 $(FEND) ! $(RUNBDF) ! ! $(FONTS)/pagd.gsf: $(BDF)/pagd.bdf $(AFM)/av-d.afm ! $(FBEGIN) $(BDF)/pagd.bdf $(P2) $(AFM)/av-d.afm $(P2) ! $(FNEXT) $(FONTS)/pagd.gsf $(P2) ! $(FLAST) AvantGarde-Demi $(P2) 4083000 $(FEND) ! $(RUNBDF) ! ! $(FONTS)/pagdo.gsf: $(BDF)/pagdo.bdf $(AFM)/av-do.afm ! $(FBEGIN) $(BDF)/pagdo.bdf $(P2) $(AFM)/av-do.afm $(P2) ! $(FNEXT) $(FONTS)/pagdo.gsf $(P2) ! $(FLAST) AvantGarde-DemiOblique $(P2) 4083200 $(FEND) ! $(RUNBDF) # ---------------- Bookman ---------------- *************** *** 181,199 **** $(FONTS)/pbkdi.gsf ! $(FONTS)/pbkl.gsf: $(BDF)/pbkl.bdf $(AFM)/Bookman-Light.afm ! bdftops $(BDF)/pbkl.bdf $(AFM)/Bookman-Light.afm \ ! $(FONTS)/pbkl.gsf Bookman-Light 4114000 ! ! $(FONTS)/pbkli.gsf: $(BDF)/pbkli.bdf $(AFM)/Bookman-LightItalic.afm ! bdftops $(BDF)/pbkli.bdf $(AFM)/Bookman-LightItalic.afm \ ! $(FONTS)/pbkli.gsf Bookman-LightItalic 4114100 ! ! $(FONTS)/pbkd.gsf: $(BDF)/pbkd.bdf $(AFM)/Bookman-Demi.afm ! bdftops $(BDF)/pbkd.bdf $(AFM)/Bookman-Demi.afm \ ! $(FONTS)/pbkd.gsf Bookman-Demi 4113000 ! ! $(FONTS)/pbkdi.gsf: $(BDF)/pbkdi.bdf $(AFM)/Bookman-DemiItalic.afm ! bdftops $(BDF)/pbkdi.bdf $(AFM)/Bookman-DemiItalic.afm \ ! $(FONTS)/pbkdi.gsf Bookman-DemiItalic 4113100 # ---------------- Charter ---------------- --- 197,223 ---- $(FONTS)/pbkdi.gsf ! $(FONTS)/pbkl.gsf: $(BDF)/pbkl.bdf $(AFM)/book-l.afm ! $(FBEGIN) $(BDF)/pbkl.bdf $(P2) $(AFM)/book-l.afm $(P2) ! $(FNEXT) $(FONTS)/pbkl.gsf $(P2) ! $(FLAST) Bookman-Light $(P2) 4114000 $(FEND) ! $(RUNBDF) ! ! $(FONTS)/pbkli.gsf: $(BDF)/pbkli.bdf $(AFM)/book-li.afm ! $(FBEGIN) $(BDF)/pbkli.bdf $(P2) $(AFM)/book-li.afm $(P2) ! $(FNEXT) $(FONTS)/pbkli.gsf $(P2) ! $(FLAST) Bookman-LightItalic $(P2) 4114100 $(FEND) ! $(RUNBDF) ! ! $(FONTS)/pbkd.gsf: $(BDF)/pbkd.bdf $(AFM)/book-d.afm ! $(FBEGIN) $(BDF)/pbkd.bdf $(P2) $(AFM)/book-d.afm $(P2) ! $(FNEXT) $(FONTS)/pbkd.gsf $(P2) ! $(FLAST) Bookman-Demi $(P2) 4113000 $(FEND) ! $(RUNBDF) ! ! $(FONTS)/pbkdi.gsf: $(BDF)/pbkdi.bdf $(AFM)/book-di.afm ! $(FBEGIN) $(BDF)/pbkdi.bdf $(P2) $(AFM)/book-di.afm $(P2) ! $(FNEXT) $(FONTS)/pbkdi.gsf $(P2) ! $(FLAST) Bookman-DemiItalic $(P2) 4113100 $(FEND) ! $(RUNBDF) # ---------------- Charter ---------------- *************** *** 205,226 **** # Old Charter, no longer used. ! $(FONTS)/_bchr.gsf: $(BDF)/charR24.bdf ! bdftops $(BDF)/charR24.bdf \ ! $(FONTS)/bchr.gsf Charter-Roman 4010000 # Old Charter-Italic, no longer used. ! $(FONTS)/_bchri.gsf: $(BDF)/charI24.bdf ! bdftops $(BDF)/charI24.bdf \ ! $(FONTS)/bchri.gsf Charter-Italic 4010100 # Old Charter-Bold, no longer used. ! $(FONTS)/_bchb.gsf: $(BDF)/charB24.bdf ! bdftops $(BDF)/charB24.bdf \ ! $(FONTS)/bchb.gsf Charter-Bold 4011000 # Old Charter-BoldItalic, no longer used. ! $(FONTS)/_bchbi.gsf: $(BDF)/charBI24.bdf ! bdftops $(BDF)/charBI24.bdf \ ! $(FONTS)/bchbi.gsf Charter-BoldItalic 4011100 # ---------------- Courier ---------------- --- 229,242 ---- # Old Charter, no longer used. ! #$(FONTS)/bchr.gsf: $(BDF)/charR24.bdf # 4010000 # Old Charter-Italic, no longer used. ! #$(FONTS)/bchri.gsf: $(BDF)/charI24.bdf # 4010100 # Old Charter-Bold, no longer used. ! #$(FONTS)/bchb.gsf: $(BDF)/charB24.bdf # 4011000 # Old Charter-BoldItalic, no longer used. ! #$(FONTS)/bchbi.gsf: $(BDF)/charBI24.bdf # 4011100 # ---------------- Courier ---------------- *************** *** 234,255 **** # Old Courier, longer used. ! $(FONTS)/_pcrr.gsf: $(BDF)/courR24.bdf $(AFM)/courier.afm ! bdftops $(BDF)/courR24.bdf $(AFM)/courier.afm \ ! $(FONTS)/pcrr.gsf Courier 4020000 ! ! % Old Courier-Oblique, no longer used. ! $(FONTS)/_pcrro.gsf: $(BDF)/courO24.bdf $(AFM)/courier_oblique.afm ! bdftops $(BDF)/courO24.bdf $(AFM)/courier_oblique.afm \ ! $(FONTS)/pcrro.gsf Courier-Oblique 4020200 # Old Courier-Bold, no longer used. ! $(FONTS)/_pcrb.gsf: $(BDF)/courB24.bdf $(AFM)/courier_bold.afm ! bdftops $(BDF)/courB24.bdf $(AFM)/courier_bold.afm \ ! $(FONTS)/pcrb.gsf Courier-Bold 4021000 ! ! % Old Courier-BoldOblique, no longer used. ! $(FONTS)/_pcrbo.gsf: $(BDF)/courBO24.bdf $(AFM)/courier_boldoblique.afm ! bdftops $(BDF)/courBO24.bdf $(AFM)/courier_boldoblique.afm \ ! $(FONTS)/pcrbo.gsf Courier-BoldOblique 4021200 # ---------------- Cyrillic ---------------- --- 250,263 ---- # Old Courier, longer used. ! #$(FONTS)/pcrr.gsf: $(BDF)/courR24.bdf $(AFM)/cour.afm # 4020000 + # Old Courier-Oblique, no longer used. + #$(FONTS)/pcrro.gsf: $(BDF)/courO24.bdf $(AFM)/cour-o.afm # 4020200 + # Old Courier-Bold, no longer used. ! #$(FONTS)/_pcrb.gsf: $(BDF)/courB24.bdf $(AFM)/cour-b.afm # 4021000 ! ! # Old Courier-BoldOblique, no longer used. ! #$(FONTS)/pcrbo.gsf: $(BDF)/courBO24.bdf $(AFM)/cour-bo.afm # 4021200 # ---------------- Cyrillic ---------------- *************** *** 264,286 **** $(FONTS)/phvb.gsf $(FONTS)/phvbo.gsf ! $(FONTS)/phvr.gsf: $(BDF)/helvR24.bdf $(AFM)/helvetica.afm ! bdftops $(BDF)/helvR24.bdf $(AFM)/helvetica.afm \ ! $(FONTS)/phvr.gsf Helvetica 4030000 ! ! $(FONTS)/phvro.gsf: $(BDF)/helvO24.bdf $(AFM)/helvetica_oblique.afm ! bdftops $(BDF)/helvO24.bdf $(AFM)/helvetica_oblique.afm \ ! $(FONTS)/phvro.gsf Helvetica-Oblique 4030200 ! ! $(FONTS)/phvrrn.gsf: $(BDF)/hvmrc14.bdf $(AFM)/Helvetica-Narrow.afm ! bdftops $(BDF)/hvmrc14.bdf $(AFM)/Helvetica-Narrow.afm \ ! $(FONTS)/phvrrn.gsf Helvetica-Narrow 4030310 ! ! $(FONTS)/phvb.gsf: $(BDF)/helvB24.bdf $(AFM)/helvetica_bold.afm ! bdftops $(BDF)/helvB24.bdf $(AFM)/helvetica_bold.afm \ ! $(FONTS)/phvb.gsf Helvetica-Bold 4031000 ! ! $(FONTS)/phvbo.gsf: $(BDF)/helvBO24.bdf $(AFM)/helvetica_boldoblique.afm ! bdftops $(BDF)/helvBO24.bdf $(AFM)/helvetica_boldoblique.afm \ ! $(FONTS)/phvbo.gsf Helvetica-BoldOblique 4031200 # ---------------- New Century Schoolbook ---------------- --- 272,304 ---- $(FONTS)/phvb.gsf $(FONTS)/phvbo.gsf ! $(FONTS)/phvr.gsf: $(BDF)/helvR24.bdf $(AFM)/helv.afm ! $(FBEGIN) $(BDF)/helvR24.bdf $(P2) $(AFM)/helv.afm $(P2) ! $(FNEXT) $(FONTS)/phvr.gsf $(P2) ! $(FLAST) Helvetica $(P2) 4030000 $(FEND) ! $(RUNBDF) ! ! $(FONTS)/phvro.gsf: $(BDF)/helvO24.bdf $(AFM)/helv-o.afm ! $(FBEGIN) $(BDF)/helvO24.bdf $(P2) $(AFM)/helv-o.afm $(P2) ! $(FNEXT) $(FONTS)/phvro.gsf $(P2) ! $(FLAST) Helvetica-Oblique $(P2) 4030200 $(FEND) ! $(RUNBDF) ! ! $(FONTS)/phvrrn.gsf: $(BDF)/hvmrc14.bdf $(AFM)/helv-n.afm ! $(FBEGIN) $(BDF)/hvmrc14.bdf $(P2) $(AFM)/helv-n.afm $(P2) ! $(FNEXT) $(FONTS)/phvrrn.gsf $(P2) ! $(FLAST) Helvetica-Narrow $(P2) 4030310 $(FEND) ! $(RUNBDF) ! ! $(FONTS)/phvb.gsf: $(BDF)/helvB24.bdf $(AFM)/helv-b.afm ! $(FBEGIN) $(BDF)/helvB24.bdf $(P2) $(AFM)/helv-b.afm $(P2) ! $(FNEXT) $(FONTS)/phvb.gsf $(P2) ! $(FLAST) Helvetica-Bold $(P2) 4031000 $(FEND) ! $(RUNBDF) ! ! $(FONTS)/phvbo.gsf: $(BDF)/helvBO24.bdf $(AFM)/helv-bo.afm ! $(FBEGIN) $(BDF)/helvBO24.bdf $(P2) $(AFM)/helv-bo.afm $(P2) ! $(FNEXT) $(FONTS)/phvbo.gsf $(P2) ! $(FLAST) Helvetica-BoldOblique $(P2) 4031200 $(FEND) ! $(RUNBDF) # ---------------- New Century Schoolbook ---------------- *************** *** 289,307 **** $(FONTS)/pncbi.gsf ! $(FONTS)/pncr.gsf: $(BDF)/ncenR24.bdf $(AFM)/newcenturyschlbk_roman.afm ! bdftops $(BDF)/ncenR24.bdf $(AFM)/newcenturyschlbk_roman.afm \ ! $(FONTS)/pncr.gsf NewCenturySchlbk-Roman 4040000 ! ! $(FONTS)/pncrri.gsf: $(BDF)/ncenI24.bdf $(AFM)/newcenturyschlbk_italic.afm ! bdftops $(BDF)/ncenI24.bdf $(AFM)/newcenturyschlbk_italic.afm \ ! $(FONTS)/pncrri.gsf NewCenturySchlbk-Italic 4040100 ! ! $(FONTS)/pncb.gsf: $(BDF)/ncenB24.bdf $(AFM)/newcenturyschlbk_bold.afm ! bdftops $(BDF)/ncenB24.bdf $(AFM)/newcenturyschlbk_bold.afm \ ! $(FONTS)/pncb.gsf NewCenturySchlbk-Bold 4041000 ! ! $(FONTS)/pncbi.gsf: $(BDF)/ncenBI24.bdf $(AFM)/newcenturyschlbk_bolditalic.afm ! bdftops $(BDF)/ncenBI24.bdf $(AFM)/newcenturyschlbk_bolditalic.afm \ ! $(FONTS)/pncbi.gsf NewCenturySchlbk-BoldItalic 4041100 # ---------------- Palatino ---------------- --- 307,333 ---- $(FONTS)/pncbi.gsf ! $(FONTS)/pncr.gsf: $(BDF)/ncenR24.bdf $(AFM)/ncs-r.afm ! $(FBEGIN) $(BDF)/ncenR24.bdf $(P2) $(AFM)/ncs-r.afm $(P2) ! $(FNEXT) $(FONTS)/pncr.gsf $(P2) ! $(FLAST) NewCenturySchlbk-Roman $(P2) 4040000 $(FEND) ! $(RUNBDF) ! ! $(FONTS)/pncrri.gsf: $(BDF)/ncenI24.bdf $(AFM)/ncs-i.afm ! $(FBEGIN) $(BDF)/ncenI24.bdf $(P2) $(AFM)/ncs-i.afm $(P2) ! $(FNEXT) $(FONTS)/pncrri.gsf $(P2) ! $(FLAST) NewCenturySchlbk-Italic $(P2) 4040100 $(FEND) ! $(RUNBDF) ! ! $(FONTS)/pncb.gsf: $(BDF)/ncenB24.bdf $(AFM)/ncs-b.afm ! $(FBEGIN) $(BDF)/ncenB24.bdf $(P2) $(AFM)/ncs-b.afm $(P2) ! $(FNEXT) $(FONTS)/pncb.gsf $(P2) ! $(FLAST) NewCenturySchlbk-Bold $(P2) 4041000 $(FEND) ! $(RUNBDF) ! ! $(FONTS)/pncbi.gsf: $(BDF)/ncenBI24.bdf $(AFM)/ncs-bi.afm ! $(FBEGIN) $(BDF)/ncenBI24.bdf $(P2) $(AFM)/ncs-bi.afm $(P2) ! $(FNEXT) $(FONTS)/pncbi.gsf $(P2) ! $(FLAST) NewCenturySchlbk-BoldItalic $(P2) 4041100 $(FEND) ! $(RUNBDF) # ---------------- Palatino ---------------- *************** *** 310,328 **** $(FONTS)/pplbi.gsf ! $(FONTS)/pplr.gsf: $(BDF)/pal18.bdf $(AFM)/Palatino-Roman.afm ! bdftops $(BDF)/pal18.bdf $(AFM)/Palatino-Roman.afm \ ! $(FONTS)/pplr.gsf Palatino-Roman 4090000 ! ! $(FONTS)/pplri.gsf: $(BDF)/pplri.bdf $(AFM)/Palatino-Italic.afm ! bdftops $(BDF)/pplri.bdf $(AFM)/Palatino-Italic.afm \ ! $(FONTS)/pplri.gsf Palatino-Italic 4090100 ! ! $(FONTS)/pplb.gsf: $(BDF)/pplb.bdf $(AFM)/Palatino-Bold.afm ! bdftops $(BDF)/pplb.bdf $(AFM)/Palatino-Bold.afm \ ! $(FONTS)/pplb.gsf Palatino-Bold 4091000 ! ! $(FONTS)/pplbi.gsf: $(BDF)/pplbi.bdf $(AFM)/Palatino-BoldItalic.afm ! bdftops $(BDF)/pplbi.bdf $(AFM)/Palatino-BoldItalic.afm \ ! $(FONTS)/pplbi.gsf Palatino-BoldItalic 4091100 # ---------------- Symbol ---------------- --- 336,362 ---- $(FONTS)/pplbi.gsf ! $(FONTS)/pplr.gsf: $(BDF)/pal18.bdf $(AFM)/pal-r.afm ! $(FBEGIN) $(BDF)/pal18.bdf $(P2) $(AFM)/pal-r.afm $(P2) ! $(FNEXT) $(FONTS)/pplr.gsf $(P2) ! $(FLAST) Palatino-Roman $(P2) 4090000 $(FEND) ! $(RUNBDF) ! ! $(FONTS)/pplri.gsf: $(BDF)/pplri.bdf $(AFM)/pal-i.afm ! $(FBEGIN) $(BDF)/pplri.bdf $(P2) $(AFM)/pal-i.afm $(P2) ! $(FNEXT) $(FONTS)/pplri.gsf $(P2) ! $(FLAST) Palatino-Italic $(P2) 4090100 $(FEND) ! $(RUNBDF) ! ! $(FONTS)/pplb.gsf: $(BDF)/pplb.bdf $(AFM)/pal-b.afm ! $(FBEGIN) $(BDF)/pplb.bdf $(P2) $(AFM)/pal-b.afm $(P2) ! $(FNEXT) $(FONTS)/pplb.gsf $(P2) ! $(FLAST) Palatino-Bold $(P2) 4091000 $(FEND) ! $(RUNBDF) ! ! $(FONTS)/pplbi.gsf: $(BDF)/pplbi.bdf $(AFM)/pal-bi.afm ! $(FBEGIN) $(BDF)/pplbi.bdf $(P2) $(AFM)/pal-bi.afm $(P2) ! $(FNEXT) $(FONTS)/pplbi.gsf $(P2) ! $(FLAST) Palatino-BoldItalic $(P2) 4091100 $(FEND) ! $(RUNBDF) # ---------------- Symbol ---------------- *************** *** 331,336 **** $(FONTS)/psyr.gsf: $(BDF)/symb24.bdf $(AFM)/symbol.afm ! bdftops $(BDF)/symb24.bdf $(AFM)/symbol.afm \ ! $(FONTS)/psyr.gsf Symbol 4050000 SymbolEncoding # ---------------- Times Roman ---------------- --- 365,372 ---- $(FONTS)/psyr.gsf: $(BDF)/symb24.bdf $(AFM)/symbol.afm ! $(FBEGIN) $(BDF)/symb24.bdf $(P2) $(AFM)/symbol.afm $(P2) ! $(FNEXT) $(FONTS)/psyr.gsf $(P2) ! $(FLAST) Symbol 4050000 $(P2) SymbolEncoding $(FEND) ! $(RUNBDF) # ---------------- Times Roman ---------------- *************** *** 339,357 **** $(FONTS)/ptmbi.gsf ! $(FONTS)/ptmr.gsf: $(BDF)/timR24.bdf $(AFM)/times_roman.afm ! bdftops $(BDF)/timR24.bdf $(AFM)/times_roman.afm \ ! $(FONTS)/ptmr.gsf Times-Roman 4060000 ! ! $(FONTS)/ptmri.gsf: $(BDF)/timI24.bdf $(AFM)/times_italic.afm ! bdftops $(BDF)/timI24.bdf $(AFM)/times_italic.afm \ ! $(FONTS)/ptmri.gsf Times-Italic 4060100 ! ! $(FONTS)/ptmb.gsf: $(BDF)/timB24.bdf $(AFM)/times_bold.afm ! bdftops $(BDF)/timB24.bdf $(AFM)/times_bold.afm \ ! $(FONTS)/ptmb.gsf Times-Bold 4061000 ! ! $(FONTS)/ptmbi.gsf: $(BDF)/timBI24.bdf $(AFM)/times_bolditalic.afm ! bdftops $(BDF)/timBI24.bdf $(AFM)/times_bolditalic.afm \ ! $(FONTS)/ptmbi.gsf Times-BoldItalic 4061100 # ---------------- Ugly ---------------- --- 375,401 ---- $(FONTS)/ptmbi.gsf ! $(FONTS)/ptmr.gsf: $(BDF)/timR24.bdf $(AFM)/times-r.afm ! $(FBEGIN) $(BDF)/timR24.bdf $(P2) $(AFM)/times-r.afm $(P2) ! $(FNEXT) $(FONTS)/ptmr.gsf $(P2) ! $(FLAST) Times-Roman $(P2) 4060000 $(FEND) ! $(RUNBDF) ! ! $(FONTS)/ptmri.gsf: $(BDF)/timI24.bdf $(AFM)/times-i.afm ! $(FBEGIN) $(BDF)/timI24.bdf $(P2) $(AFM)/times-i.afm $(P2) ! $(FNEXT) $(FONTS)/ptmri.gsf $(P2) ! $(FLAST) Times-Italic $(P2) 4060100 $(FEND) ! $(RUNBDF) ! ! $(FONTS)/ptmb.gsf: $(BDF)/timB24.bdf $(AFM)/times-b.afm ! $(FBEGIN) $(BDF)/timB24.bdf $(P2) $(AFM)/times-b.afm $(P2) ! $(FNEXT) $(FONTS)/ptmb.gsf $(P2) ! $(FLAST) Times-Bold $(P2) 4061000 $(FEND) ! $(RUNBDF) ! ! $(FONTS)/ptmbi.gsf: $(BDF)/timBI24.bdf $(AFM)/times-bi.afm ! $(FBEGIN) $(BDF)/timBI24.bdf $(P2) $(AFM)/times-bi.afm $(P2) ! $(FNEXT) $(FONTS)/ptmbi.gsf $(P2) ! $(FLAST) Times-BoldItalic $(P2) 4061100 $(FEND) ! $(RUNBDF) # ---------------- Ugly ---------------- *************** *** 363,367 **** uglyr.gsf: ugly10.bdf ! bdftops ugly10.bdf uglyr.gsf Ugly 4000000 # ---------------- Utopia ---------------- --- 407,413 ---- uglyr.gsf: ugly10.bdf ! $(FBEGIN) ugly10.bdf $(P2) uglyr.gsf $(P2) ! $(FLAST) Ugly $(P2) 4000000 $(FEND) ! $(RUNBDF) # ---------------- Utopia ---------------- *************** *** 375,389 **** ZapfChancery: $(FONTS)/zcr.gsf $(FONTS)/zcro.gsf $(FONTS)/zcb.gsf ! $(FONTS)/zcr.gsf: $(BDF)/zcr24.bdf $(AFM)/ZapfChancery-Roman.afm ! bdftops $(BDF)/zcr24.bdf $(AFM)/ZapfChancery-Roman.afm \ ! $(FONTS)/zcr.gsf ZapfChancery 4070000 ! ! $(FONTS)/zcro.gsf: $(BDF)/zcro24.bdf $(AFM)/ZapfChancery-MediumItalic.afm ! bdftops $(BDF)/zcro24.bdf $(AFM)/ZapfChancery-MediumItalic.afm \ ! $(FONTS)/zcro.gsf ZapfChancery-Oblique 4070200 ! ! $(FONTS)/zcb.gsf: $(BDF)/zcb30.bdf $(AFM)/ZapfChancery-Bold.afm ! bdftops $(BDF)/zcb30.bdf $(AFM)/ZapfChancery-Bold.afm \ ! $(FONTS)/zcb.gsf ZapfChancery-Bold 4071000 # ---------------- Zapf Dingbats ---------------- --- 421,441 ---- ZapfChancery: $(FONTS)/zcr.gsf $(FONTS)/zcro.gsf $(FONTS)/zcb.gsf ! $(FONTS)/zcr.gsf: $(BDF)/zcr24.bdf $(AFM)/zc-r.afm ! $(FBEGIN) $(BDF)/zcr24.bdf $(P2) $(AFM)/zc-r.afm $(P2) ! $(FNEXT) $(FONTS)/zcr.gsf $(P2) ! $(FLAST) ZapfChancery $(P2) 4070000 $(FEND) ! $(RUNBDF) ! ! $(FONTS)/zcro.gsf: $(BDF)/zcro24.bdf $(AFM)/zc-mi.afm ! $(FBEGIN) $(BDF)/zcro24.bdf $(P2) $(AFM)/zc-mi.afm $(P2) ! $(FNEXT) $(FONTS)/zcro.gsf $(P2) ! $(FLAST) ZapfChancery-Oblique $(P2) 4070200 $(FEND) ! $(RUNBDF) ! ! $(FONTS)/zcb.gsf: $(BDF)/zcb30.bdf $(AFM)/zc-b.afm ! $(FBEGIN) $(BDF)/zcb30.bdf $(P2) $(AFM)/zc-b.afm $(P2) ! $(FNEXT) $(FONTS)/zcb.gsf $(P2) ! $(FLAST) ZapfChancery-Bold $(P2) 4071000 $(FEND) ! $(RUNBDF) # ---------------- Zapf Dingbats ---------------- *************** *** 391,395 **** ZapfDingbats: $(FONTS)/pzdr.gsf ! $(FONTS)/pzdr.gsf: $(BDF)/pzdr.bdf $(AFM)/ZapfDingbats.afm ! bdftops $(BDF)/pzdr.bdf $(AFM)/ZapfDingbats.afm \ ! $(FONTS)/pzdr.gsf ZapfDingbats 4100000 --- 443,449 ---- ZapfDingbats: $(FONTS)/pzdr.gsf ! $(FONTS)/pzdr.gsf: $(BDF)/pzdr.bdf $(AFM)/zd.afm ! $(FBEGIN) $(BDF)/pzdr.bdf $(P2) $(AFM)/zd.afm $(P2) ! $(FNEXT) $(FONTS)/pzdr.gsf $(P2) ! $(FLAST) ZapfDingbats $(P2) 4100000 $(FEND) ! $(RUNBDF) diff -rNC2 gs26/gcc-head.mak gs261/gcc-head.mak *** gs26/gcc-head.mak Thu Apr 29 07:47:14 1993 --- gs261/gcc-head.mak Wed May 12 18:07:08 1993 *************** *** 1,4 **** # Copyright (C) 1989, 1992, 1993 Aladdin Enterprises. All rights reserved. - # Distributed by Free Software Foundation, Inc. # # This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/gconfig.c gs261/gconfig.c *** gs26/gconfig.c Wed May 5 07:48:52 1993 --- gs261/gconfig.c Wed May 12 18:07:18 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- *************** *** 46,50 **** #define ref_(t) struct { struct tas_s tas; t value; } #define string_(s)\ ! { {(t_string<\033q\033T16", 1, 10, prn_stream); + + /* Print lines of graphics */ + while ( lnum < pdev->height ) + { + byte *inp; + byte *in_end; + byte *out_end; + int lcnt; + register byte *out_blk; + + /* The apple DMP printer seems to be odd in that the bit order on + * each line is reverse what might be expected. Meaning, an + * underscore would be done as a series of 0x80, while on overscore + * would be done as a series of 0x01. So we get each + * scan line in reverse order. + */ + + for (lcnt=0; lcnt<8; lcnt++) { + if ((lnum+lcnt)>pdev->height) + memset(in+lcnt*line_size, 0, line_size); + else + gdev_prn_copy_scan_lines(pdev, lnum+lcnt, + in + line_size*(7 - lcnt), line_size); + } + + out_end = out; + inp = in; + in_end = inp + line_size; + + for ( ; inp < in_end; inp++, out_end += 8 ) + { + gdev_prn_transpose_8x8(inp, + line_size, out_end, 1); + } + /* Remove trailing 0s. */ + while ( out_end > out && out_end[-1] == 0 ) + { + out_end--; + } + for (out_blk = out; out_blk< out_end; ) { + /* skip leading 0s */ + if (*out_blk) break; + out_blk ++; + } + /* write out however many blank's as we got nulls. + * In fact, because of the overhead, this is only really + * efficient if you have 8 or more leading 0's. + */ + if ((out_blk!=out) && ((out_blk-out)>7)) + fprintf(prn_stream,"\033V%04d%c", (int) (out_blk-out), 0); + else + out_blk=out; + + if ((int)(out_end-out_blk)) { + fprintf(prn_stream,"\033G%04d",(int)(out_end - out_blk)); + fwrite(out_blk, 1, (int)(out_end-out_blk), prn_stream); + } + fprintf(prn_stream,"\r\n"); + + lnum += 8 ; + } + + /* Formfeed and Reset printer */ + fputs("\f\033<\033B\033E", prn_stream); + fflush(prn_stream); + + gs_free((char *)buf2, in_size, 1, "eps_print_page(buf2)"); + gs_free((char *)buf1, in_size, 1, "eps_print_page(buf1)"); + return 0; + } diff -rNC2 gs26/gdevbgi.c gs261/gdevbgi.c *** gs26/gdevbgi.c Wed May 5 18:46:08 1993 --- gs261/gdevbgi.c Wed May 12 18:08:02 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1990, 1991, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/gdevbit.c gs261/gdevbit.c *** gs26/gdevbit.c Sun Mar 28 06:24:50 1993 --- gs261/gdevbit.c Sun May 16 10:00:12 1993 *************** *** 1,4 **** /* Copyright (C) 1991 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- *************** *** 23,30 **** /* Define the device parameters. */ ! #define X_DPI 72 ! #define Y_DPI 72 ! #define WIDTH_10THS 85 ! #define HEIGHT_10THS 110 /* The device descriptor */ --- 22,31 ---- /* Define the device parameters. */ ! #ifndef X_DPI ! # define X_DPI 72 ! #endif ! #ifndef Y_DPI ! # define Y_DPI 72 ! #endif /* The device descriptor */ *************** *** 32,36 **** gx_device_printer far_data gs_bit_device = prn_device(prn_std_procs, "bit", ! WIDTH_10THS, HEIGHT_10THS, X_DPI, Y_DPI, 0,0,0,0, /* margins */ --- 33,37 ---- gx_device_printer far_data gs_bit_device = prn_device(prn_std_procs, "bit", ! DEFAULT_WIDTH_10THS, DEFAULT_HEIGHT_10THS, X_DPI, Y_DPI, 0,0,0,0, /* margins */ diff -rNC2 gs26/gdevbj10.c gs261/gdevbj10.c *** gs26/gdevbj10.c Thu Apr 15 14:48:36 1993 --- gs261/gdevbj10.c Wed May 12 18:08:12 1993 *************** *** 1,4 **** /* Copyright (C) 1990, 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/gdevbmp.c gs261/gdevbmp.c *** gs26/gdevbmp.c Sun Mar 28 05:24:12 1993 --- gs261/gdevbmp.c Wed May 12 18:08:18 1993 *************** *** 1,4 **** /* Copyright (C) 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/gdevcdj.c gs261/gdevcdj.c *** gs26/gdevcdj.c Fri May 7 10:43:54 1993 --- gs261/gdevcdj.c Thu May 20 08:14:22 1993 *************** *** 1,4 **** /* Copyright (C) 1991, 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- *************** *** 86,89 **** --- 85,89 ---- #define PJ180 3 #define PJXL180 4 + #define DECLJ250 5 /* No. of ink jets (used to minimise head movements) */ *************** *** 534,538 **** { int ret_code; fputs("\033%8", prn_stream); /* Enter PCL emulation mode */ ! ret_code = hp_colour_print_page(pdev, prn_stream, PJ180); fputs("\033%@", prn_stream); /* Exit PCL emulation mode */ return ret_code; --- 534,538 ---- { int ret_code; fputs("\033%8", prn_stream); /* Enter PCL emulation mode */ ! ret_code = hp_colour_print_page(pdev, prn_stream, DECLJ250); fputs("\033%@", prn_stream); /* Exit PCL emulation mode */ return ret_code; *************** *** 656,659 **** --- 656,660 ---- int expanded_bpp = bits_per_pixel; int plane_size, databuff_size; + int combined_escapes = 1; int errbuff_size = 0; int outbuff_size = 0; *************** *** 676,684 **** case PJXL180: if (pjxl->rendertype > 0) { ! /* Control codes for CID sequence */ ! cid_string = (bits_per_pixel == 16) ? CONFIG_16BIT : CONFIG_24BIT; ! /* Pretend we're a monobit device so we send the data out unchanged */ ! bits_per_pixel = storage_bpp = expanded_bpp = 1; ! num_comps = 1; } break; --- 677,689 ---- case PJXL180: if (pjxl->rendertype > 0) { ! if (bits_per_pixel < 16) ! pjxl->rendertype = 0; ! else { ! /* Control codes for CID sequence */ ! cid_string = (bits_per_pixel == 16) ? CONFIG_16BIT : CONFIG_24BIT; ! /* Pretend we're a monobit device so we send the data out unchanged */ ! bits_per_pixel = storage_bpp = expanded_bpp = 1; ! num_comps = 1; ! } } break; *************** *** 774,781 **** fprintf(prn_stream, "\033*o%dd%dQ", cdj->depletion, cdj->shingling); /* Move to top left of printed area */ ! fprintf(prn_stream, "\033*px%dY", (int)(300 * DOFFSET)); /* Set number of planes ((-)1 is mono, (-)3 is (cmy)rgb, -4 is cmyk), * and raster width, then start raster graphics */ ! fprintf(prn_stream, "\033*r%ds-%du1A", raster_width, num_comps); /* Select data compression */ compression = 9; --- 779,786 ---- fprintf(prn_stream, "\033*o%dd%dQ", cdj->depletion, cdj->shingling); /* Move to top left of printed area */ ! fprintf(prn_stream, "\033*p%dY", (int)(300 * DOFFSET)); /* Set number of planes ((-)1 is mono, (-)3 is (cmy)rgb, -4 is cmyk), * and raster width, then start raster graphics */ ! fprintf(prn_stream, "\033*r%ds-%du0A", raster_width, num_comps); /* Select data compression */ compression = 9; *************** *** 789,793 **** fprintf(prn_stream, "\033*o%dQ", pjxl->printqual); /* Move to top left of printed area */ ! fprintf(prn_stream, "\033*px%dY", (int)(300 * POFFSET)); /* Configure colour setup */ if (pjxl->rendertype > 0) { --- 794,798 ---- fprintf(prn_stream, "\033*o%dQ", pjxl->printqual); /* Move to top left of printed area */ ! fprintf(prn_stream, "\033*p%dY", (int)(300 * POFFSET)); /* Configure colour setup */ if (pjxl->rendertype > 0) { *************** *** 801,806 **** /* Set number of planes (1 is mono, 3 is rgb), * and raster width, then start raster graphics */ ! fprintf(prn_stream, "\033*r%ds-%du1A", raster_width, num_comps); } break; case PJXL180: --- 806,813 ---- /* Set number of planes (1 is mono, 3 is rgb), * and raster width, then start raster graphics */ ! fprintf(prn_stream, "\033*r%ds-%du0A", raster_width, num_comps); } + /* No combined escapes for raster transfers */ + combined_escapes = 0; break; case PJXL180: *************** *** 810,814 **** fprintf(prn_stream, "\033*o%dQ", pjxl->printqual); /* Move to top left of printed area */ ! fprintf(prn_stream, "\033*px%dY", (int)(180 * POFFSET)); /* Configure colour setup */ if (pjxl->rendertype > 0) { --- 817,821 ---- fprintf(prn_stream, "\033*o%dQ", pjxl->printqual); /* Move to top left of printed area */ ! fprintf(prn_stream, "\033*p%dY", (int)(180 * POFFSET)); /* Configure colour setup */ if (pjxl->rendertype > 0) { *************** *** 822,836 **** /* Set number of planes (1 is mono, 3 is rgb), * and raster width, then start raster graphics */ ! fprintf(prn_stream, "\033*r%ds%du1A", raster_width, num_comps); } break; case PJ180: /* Disable perforation skip */ fprintf(prn_stream, "\033&lL"); /* Move to top left of printed area */ ! fprintf(prn_stream, "\033&ah%dV", (int)(720 * POFFSET)); /* Set number of planes (1 is mono, 3 is rgb), * and raster width, then start raster graphics */ ! fprintf(prn_stream, "\033*r%ds%du1A", raster_width, num_comps); /* Select data compression */ compression = 1; --- 829,850 ---- /* Set number of planes (1 is mono, 3 is rgb), * and raster width, then start raster graphics */ ! fprintf(prn_stream, "\033*r%ds%du0A", raster_width, num_comps); } break; case PJ180: + case DECLJ250: /* Disable perforation skip */ fprintf(prn_stream, "\033&lL"); /* Move to top left of printed area */ ! fprintf(prn_stream, "\033&a%dV", (int)(720 * POFFSET)); /* Set number of planes (1 is mono, 3 is rgb), * and raster width, then start raster graphics */ ! fprintf(prn_stream, "\033*r%ds%du0A", raster_width, num_comps); ! if (ptype == DECLJ250) { ! /* No combined escapes for raster transfers */ ! combined_escapes = 0; ! /* From here on, we're a standard Paintjet .. */ ! ptype = PJ180; ! } /* Select data compression */ compression = 1; *************** *** 838,849 **** } ! /* From now on, all escape commands start with \033*b, so we ! * combine them. */ ! fputs("\033*b", prn_stream); ! ! /* Set compression if the mode has been defined. */ ! if (compression) ! fprintf(prn_stream, "%dm", compression); ! /* Send each scan line in turn */ { --- 852,877 ---- } ! /* The XL300 PCL interpreter seems to be based on a rather old definition ! * of the language - although it is newer than the deskjets, it includes ! * neither the 'mode 9' compression, nor (even more suprisingly) the ability ! * to use combined escape sequences for the raster transfer commands ! * (where they make by far the biggest impact). Technically, it is a ! * language extension, but the previous model (the 180dpi Paintjet XL) ! * has this facility, which means that the XL300 is non-backwards-compatible ! * in this respect. Even the original and venerable 180dpi Paintjet has the ! * 'extension'. I have made a guess that the DEC LJ250 does not support ! * it, but have not yet found somebody to test this for me. */ ! ! if (combined_escapes) { ! /* From now on, all escape commands start with \033*b, so we ! * combine them. */ ! fputs("\033*b", prn_stream); ! /* Set compression if the mode has been defined. */ ! if (compression) ! fprintf(prn_stream, "%dm", compression); ! } else ! if (compression) ! fprintf(prn_stream, "\033*b%dM", compression); ! /* Send each scan line in turn */ { *************** *** 895,916 **** * better off printing blanks. */ this_pass -= num_blank_lines; ! fputc('y', prn_stream); /* Clear current and seed rows */ ! for (; num_blank_lines; num_blank_lines--) ! fputc('w', prn_stream); } else { ! switch (ptype) { ! case DJ500C: ! case DJ550C: ! case PJXL300: ! case PJXL180: ! case PJ180: ! /* My HP book says that even the PaintJet can do *b#y */ fprintf(prn_stream, "%dy", num_blank_lines); ! break; ! default: ! /* This emulates *b#y if required (here @ 180 dpi) */ ! fprintf(prn_stream, "%dM\033*p+%dY\033*b", compression, ! num_blank_lines * 180 / (int)y_dpi); ! } } memset(plane_data[1 - scan][0], 0, plane_size * num_comps); --- 923,940 ---- * better off printing blanks. */ this_pass -= num_blank_lines; ! if (combined_escapes) { ! fputc('y', prn_stream); /* Clear current and seed rows */ ! for (; num_blank_lines; num_blank_lines--) ! fputc('w', prn_stream); ! } else { ! fputs("\033*bY", prn_stream); /* Clear current and seed rows */ ! for (; num_blank_lines; num_blank_lines--) ! fputs("\033*bW", prn_stream); ! } } else { ! if (combined_escapes) fprintf(prn_stream, "%dy", num_blank_lines); ! else ! fprintf(prn_stream, "\033*b%dY", num_blank_lines); } memset(plane_data[1 - scan][0], 0, plane_size * num_comps); *************** *** 1061,1071 **** int count2 = gdev_pcl_mode2compress(row, end_row, out_row_alt); int count3 = gdev_pcl_mode3compress(plane_size, plane, prev_plane, out_row); ! int penalty2 = (compression == 2 ? 0 : 2); ! int penalty3 = (compression == 3 ? 0 : 2); ! if (count3 + penalty3 < count2 + penalty2) ! { if ( compression != 3 ) ! fputs("3m", prn_stream); ! compression = 3; out_data = out_row; out_count = count3; --- 1085,1100 ---- int count2 = gdev_pcl_mode2compress(row, end_row, out_row_alt); int count3 = gdev_pcl_mode3compress(plane_size, plane, prev_plane, out_row); ! int penalty = combined_escapes ? strlen("#m") : strlen("\033*b#M"); ! int penalty2 = (compression == 2 ? 0 : penalty); ! int penalty3 = (compression == 3 ? 0 : penalty); ! if (count3 + penalty3 < count2 + penalty2) ! { if ( compression != 3 ) { ! if (combined_escapes) ! fputs("3m", prn_stream); ! else ! fputs("\033*b3M", prn_stream); ! compression = 3; ! } out_data = out_row; out_count = count3; *************** *** 1072,1078 **** } else ! { if ( compression != 2 ) ! fputs("2m", prn_stream); ! compression = 2; out_data = out_row_alt; out_count = count2; --- 1101,1111 ---- } else ! { if ( compression != 2 ) { ! if (combined_escapes) ! fputs("2m", prn_stream); ! else ! fputs("\033*b2M", prn_stream); ! compression = 2; ! } out_data = out_row_alt; out_count = count2; *************** *** 1082,1086 **** } if (output_plane) { ! fprintf(prn_stream, "%d%c", out_count, "wvvv"[i]); fwrite(out_data, sizeof(byte), out_count, prn_stream); } --- 1115,1122 ---- } if (output_plane) { ! if (combined_escapes) ! fprintf(prn_stream, "%d%c", out_count, "wvvv"[i]); ! else ! fprintf(prn_stream, "\033*b%d%c", out_count, "WVVV"[i]); fwrite(out_data, sizeof(byte), out_count, prn_stream); } *************** *** 1092,1097 **** } /* send each scan line in turn */ /* end raster graphics & reset printer */ ! fputs("M\033*rbC\033E", prn_stream); /* eject page */ --- 1128,1136 ---- } /* send each scan line in turn */ + if (combined_escapes) + fputs("0M", prn_stream); + /* end raster graphics & reset printer */ ! fputs("\033*rbC\033E", prn_stream); /* eject page */ diff -rNC2 gs26/gdevdfax.c gs261/gdevdfax.c *** gs26/gdevdfax.c Mon Nov 30 16:26:50 1992 --- gs261/gdevdfax.c Wed May 19 20:04:42 1993 *************** *** 6,9 **** --- 6,13 ---- * This software is provided "as is" without express or implied warranty. */ + /* + * 5/19/93 modified by L. Peter Deutsch, Aladdin Enterprises, + * for compatibility with Ghostscript 2.6.1. + */ /* gdevdfax.c */ *************** *** 111,141 **** typedef struct gx_device_dfax_s gx_device_dfax; - /* Too bad the prn_device() macro doesn't let you specify the - * size of the gx_device structure -- we have to repeat it here - */ - #define generic_prn_device(Struct, procs, dev_name, width_10ths, height_10ths, x_dpi, y_dpi, l_margin, b_margin, r_margin, t_margin, color_bits, print_page) {\ - sizeof(Struct),\ - &procs,\ - dev_name,\ - (int)((long)width_10ths * x_dpi / 10), /* width */\ - (int)((long)height_10ths * y_dpi / 10), /* height */\ - x_dpi,\ - y_dpi,\ - l_margin, b_margin, r_margin, t_margin,\ - { (color_bits > 1 ? 3 : 1), /* num_components */\ - ((color_bits > 1) & (color_bits < 8) ? 8 : color_bits), /* depth */\ - (color_bits >= 8 ? 255 : 1), /* max_gray */\ - (color_bits >= 8 ? 255 : color_bits > 1 ? 1 : 0), /* max_rgb */\ - (color_bits >= 8 ? 5 : 2), /* dither_gray */\ - (color_bits >= 8 ? 5 : color_bits > 1 ? 2 : 0), /* dither_rgb */\ - },\ - 0, /* not initialized yet */\ - { 0 }, /* skip */\ - print_page,\ - PRN_MAX_BITMAP,\ - PRN_BUFFER_SPACE,\ - { 0 } /* fname */\ - } - /* The device descriptor */ #define X_DPI 204 --- 115,118 ---- *************** *** 151,155 **** gx_device_dfax gs_dfaxhigh_device = ! generic_prn_device( gx_device_dfax, dfax_std_procs, --- 128,132 ---- gx_device_dfax gs_dfaxhigh_device = ! { prn_device_std_body( gx_device_dfax, dfax_std_procs, *************** *** 161,168 **** 1, dfax_print_page ! ); gx_device_dfax gs_dfaxlow_device = ! generic_prn_device( gx_device_dfax, dfax_std_procs, --- 138,146 ---- 1, dfax_print_page ! ) ! }; gx_device_dfax gs_dfaxlow_device = ! { prn_device_std_body( gx_device_dfax, dfax_std_procs, *************** *** 174,178 **** 1, dfax_print_page ! ); /************************************************************************* --- 152,157 ---- 1, dfax_print_page ! ) ! }; /************************************************************************* diff -rNC2 gs26/gdevdjet.c gs261/gdevdjet.c *** gs26/gdevdjet.c Sun Mar 28 05:29:14 1993 --- gs261/gdevdjet.c Wed May 12 18:08:40 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/gdevdjtc.c gs261/gdevdjtc.c *** gs26/gdevdjtc.c Sun May 2 03:59:50 1993 --- gs261/gdevdjtc.c Wed May 12 18:08:46 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1990, 1991 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/gdevegaa.asm gs261/gdevegaa.asm *** gs26/gdevegaa.asm Fri Apr 24 12:58:22 1992 --- gs261/gdevegaa.asm Wed May 12 18:08:52 1993 *************** *** 1,4 **** ; Copyright (C) 1989, 1992 Aladdin Enterprises. All rights reserved. - ; Distributed by Free Software Foundation, Inc. ; ; This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/gdevemap.c gs261/gdevemap.c *** gs26/gdevemap.c Sat Apr 10 08:09:14 1993 --- gs261/gdevemap.c Wed May 12 18:08:56 1993 *************** *** 1,4 **** /* Copyright (C) 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/gdevepsc.c gs261/gdevepsc.c *** gs26/gdevepsc.c Sun Mar 28 05:30:34 1993 --- gs261/gdevepsc.c Wed May 12 18:09:00 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1992 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/gdevepsn.c gs261/gdevepsn.c *** gs26/gdevepsn.c Sun May 2 20:43:58 1993 --- gs261/gdevepsn.c Mon May 24 02:17:34 1993 *************** *** 1,4 **** /* Copyright (C) 1989-1992 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- *************** *** 51,55 **** */ #define MIN_TAB_PIXELS 10 ! #define MIN_TAB_10THS 0 /* --- 50,54 ---- */ #define MIN_TAB_PIXELS 10 ! #define MIN_TAB_10THS 15 /* *************** *** 86,89 **** --- 85,89 ---- /* The device descriptors */ + private dev_proc_get_initial_matrix(eps_get_initial_matrix); private dev_proc_print_page(eps_print_page1); private dev_proc_print_page(eps_print_page2); *************** *** 90,100 **** private dev_proc_print_page(ibmpro_print_page); /* Standard Epson device */ gx_device_printer far_data gs_epson_device = ! prn_device(prn_std_procs, "epson", ! 85, /* width_10ths, 8.5" */ ! 110, /* height_10ths, 11" */ X_DPI, Y_DPI, ! 0, 0, 0.5, 0, /* margins */ 1, eps_print_page1); --- 90,103 ---- private dev_proc_print_page(ibmpro_print_page); + gx_device_procs prn_eps_procs = + prn_matrix_procs(gdev_prn_open, eps_get_initial_matrix, + gdev_prn_output_page, gdev_prn_close); + /* Standard Epson device */ gx_device_printer far_data gs_epson_device = ! prn_device(prn_eps_procs, "epson", ! DEFAULT_WIDTH_10THS, DEFAULT_HEIGHT_10THS, X_DPI, Y_DPI, ! 0.2, 0.95, 0, 1.0, /* margins */ 1, eps_print_page1); *************** *** 101,109 **** /* High-res (interleaved) 9-pin device */ gx_device_printer far_data gs_eps9high_device = ! prn_device(prn_std_procs, "eps9high", ! 85, /* width_10ths, 8.5" */ ! 110, /* height_10ths, 11" */ X_DPI, 3*Y_BASERES, ! 0, 0, 0.5, 0, /* margins */ 1, eps_print_page2); --- 104,111 ---- /* High-res (interleaved) 9-pin device */ gx_device_printer far_data gs_eps9high_device = ! prn_device(prn_eps_procs, "eps9high", ! DEFAULT_WIDTH_10THS, DEFAULT_HEIGHT_10THS, X_DPI, 3*Y_BASERES, ! 0.2, 0.95, 0, 1.0, /* margins */ 1, eps_print_page2); *************** *** 110,119 **** /* IBM ProPrinter device */ gx_device_printer far_data gs_ibmpro_device = ! prn_device(prn_std_procs, "ibmpro", ! 85, /* width_10ths, 8.5" */ ! 110, /* height_10ths, 11" */ X_DPI, Y_DPI, ! 0.5, 0, 0, 0, /* margins */ 1, ibmpro_print_page); /* ------ Internal routines ------ */ --- 112,131 ---- /* IBM ProPrinter device */ gx_device_printer far_data gs_ibmpro_device = ! prn_device(prn_eps_procs, "ibmpro", ! DEFAULT_WIDTH_10THS, DEFAULT_HEIGHT_10THS, X_DPI, Y_DPI, ! 0.2, 0.95, 0, 1.0, /* margins */ 1, ibmpro_print_page); + + /* ------ Driver procedures ------ */ + + /* Shift the origin from the first printable pixel (as defined by the */ + /* top and left margins), to the top left corner of the physical page. */ + private void + eps_get_initial_matrix(gx_device *dev, gs_matrix *pmat) + { gx_default_get_initial_matrix(dev, pmat); + pmat->tx -= dev->l_margin * dev->x_pixels_per_inch; + pmat->ty -= dev->t_margin * dev->y_pixels_per_inch; + } /* ------ Internal routines ------ */ diff -rNC2 gs26/gdevescp.c gs261/gdevescp.c *** gs26/gdevescp.c --- gs261/gdevescp.c Tue May 25 16:45:04 1993 *************** *** 0 **** --- 1,407 ---- + /* Copyright (C) 1993 Aladdin Enterprises. All rights reserved. + + This file is part of Ghostscript. + + Ghostscript is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY. No author or distributor accepts responsibility + to anyone for the consequences of using it or for whether it serves any + particular purpose or works at all, unless he says so in writing. Refer + to the Ghostscript General Public License for full details. + + Everyone is granted permission to copy, modify and redistribute + Ghostscript, but only under the conditions described in the Ghostscript + General Public License. A copy of this license is supposed to have been + given to you along with Ghostscript so you can know your rights and + responsibilities. It should be in a file named COPYING. Among other + things, the copyright notice and this notice must be preserved on all + copies. */ + + /* gdevescp2.c */ + /* + * Epson 'ESC/P 2' language printer driver for Ghostscript. + * + * This driver uses the ESC/P2 language raster graphics commands with + * compression. The driver skips vertical white space, provided that + * the white space is >= 24/band_size (<~ 1.7mm @ 360dpi!) high. There + * is no attempt to skip horizontal white space, but the compression + * greatly reduces the significance of this (a nearly blank line would + * take about 45 bytes). The driver compresses the data one scan line at + * a time, even though this is not enforced by the hardware. The reason + * I have done this is that, since the driver skips data outside the + * margins, we would have to set up a extra pointers to keep track of + * the data from the previous scan line. Doing this would add extra + * complexity at a small saving of disk space. + * + * These are the only possible optimisations that remain, and would + * greatly increase the complexity of the driver. At this point, I don't + * consider them necessary, but I might consider implementing them if + * enough people encourage me to do so. + * + * Richard Brown (rab@tauon.ph.unimelb.edu.au) + * + */ + #include "gdevprn.h" + + /* + * Valid values for X_DPI and Y_DPI: 180, 360 + * + * The value specified at compile time is the default value used if the + * user does not specify a resolution at runtime. + */ + #ifndef X_DPI + # define X_DPI 360 + #endif + + #ifndef Y_DPI + # define Y_DPI 360 + #endif + + /* + * Margin definitions: Stylus 800 printer driver: + * + * The commented margins are from the User's Manual. + * + * The values actually used here are more accurate for my printer. + * The Stylus paper handling is quite sensitive to these settings. + * If you find that the printer uses an extra page after every real + * page, you'll need to increase the top and/or bottom margin. + */ + + #define STYLUS_L_MARGIN 0.13 /*0.12*/ + #define STYLUS_B_MARGIN 0.56 /*0.51*/ + #define STYLUS_T_MARGIN 0.34 /*0.12*/ + #ifdef A4 + # define STYLUS_R_MARGIN 0.18 /*0.15*/ + #else + # define STYLUS_R_MARGIN 0.38 + #endif + + /* + * The defines below allow future expansion for printers that may + * require different margin settings from the Stylus 800. + */ + + #define L_MARGIN STYLUS_L_MARGIN + #define B_MARGIN STYLUS_B_MARGIN + #define R_MARGIN STYLUS_R_MARGIN + #define T_MARGIN STYLUS_T_MARGIN + + /* The device descriptor */ + private dev_proc_print_page(escp2_print_page); + + /* Epson ESC/P2 device */ + gx_device_printer far_data gs_escp2_device = + prn_device(prn_std_procs, "escp2", + DEFAULT_WIDTH_10THS, + DEFAULT_HEIGHT_10THS, + X_DPI, Y_DPI, + L_MARGIN, B_MARGIN, R_MARGIN, T_MARGIN, + 1, escp2_print_page); + + /* ------ Internal routines ------ */ + + /* Send the page to the printer. */ + private int + escp2_print_page(gx_device_printer *pdev, FILE *prn_stream) + { + + int line_size = gdev_prn_raster((gx_device_printer *)pdev); + int band_size = 24; /* 1, 8, or 24 */ + int in_size = line_size * band_size; + + byte *buf1 = (byte *)gs_malloc(in_size, 1, "escp2_print_page(buf1)"); + byte *buf2 = (byte *)gs_malloc(in_size, 1, "escp2_print_page(buf2)"); + byte *in = buf1; + byte *out = buf2; + + int skip, lnum, top, bottom, left, width; + int auto_feed = 1; + int count, i; + + /* + ** Check for valid resolution: + ** + ** XDPI YDPI + ** 360 360 + ** 360 180 + ** 180 180 + */ + + if( !( (pdev->x_pixels_per_inch == 180 && + pdev->y_pixels_per_inch == 180) || + (pdev->x_pixels_per_inch == 360 && + (pdev->y_pixels_per_inch == 360 || + pdev->y_pixels_per_inch == 180) )) ) + return_error(gs_error_rangecheck); + + /* + ** Check buffer allocations: + */ + + if ( buf1 == 0 || buf2 == 0 ) + { if ( buf1 ) + gs_free((char *)buf1, in_size, 1, "escp2_print_page(buf1)"); + if ( buf2 ) + gs_free((char *)buf2, in_size, 1, "escp2_print_page(buf2)"); + return_error(gs_error_VMerror); + } + + /* + ** Reset printer, enter graphics mode: + */ + + fwrite("\033@\033(G\001\000\001", 1, 8, prn_stream); + + #ifdef A4 + /* + ** After reset, the Stylus is set up for US letter paper. + ** We need to set the page size appropriately for A4 paper. + ** For some bizarre reason the ESC/P2 language wants the bottom + ** margin measured from the *top* of the page: + */ + + fwrite("\033(U\001\0\n\033(C\002\0t\020\033(c\004\0\0\0t\020", + 1, 22, prn_stream); + #endif + + /* + ** Set the line spacing to match the band height: + */ + + if( pdev->y_pixels_per_inch == 360 ) + fwrite("\033(U\001\0\012\033+\030", 1, 9, prn_stream); + else + fwrite("\033(U\001\0\024\033+\060", 1, 9, prn_stream); + + /* + ** If the printer has automatic page feeding, then the paper + ** will already be positioned at the top margin value, so we + ** start printing the image from there. Similarly, we must not + ** try to print or even line feed past the bottom margin, since + ** the printer will automatically load a new page. + ** Printers without this feature may actually need to be told + ** to skip past the top margin. + */ + + if( auto_feed ) { + top = T_MARGIN * pdev->y_pixels_per_inch; + bottom = pdev->height - B_MARGIN * pdev->y_pixels_per_inch; + } else { + top = 0; + bottom = pdev->height; + } + + /* + ** Make left margin and width sit on byte boundaries: + */ + + left = ( (int) (L_MARGIN * pdev->x_pixels_per_inch) ) >> 3 ; + + width = ((pdev->width - (int)(R_MARGIN * pdev->x_pixels_per_inch)) >> 3) - left; + + /* + ** Print the page: + */ + + for ( lnum = top, skip = 0 ; lnum < bottom ; ) + { + byte *in_data; + byte *inp; + byte *in_end; + byte *outp; + register byte *p, *q; + int lcnt; + + /* + ** Check buffer for 0 data. We can't do this mid-band + */ + + gdev_prn_get_bits(pdev, lnum, in, &in_data); + while ( in_data[0] == 0 && + !memcmp((char *)in_data, (char *)in_data + 1, line_size - 1) && + lnum < bottom ) + { + lnum++; + skip++; + gdev_prn_get_bits(pdev, lnum, in, &in_data); + } + + if(lnum == bottom ) break; /* finished with this page */ + + /* + ** Skip blank lines if we need to: + */ + + if( skip ) { + fwrite("\033(v\002\000", 1, 5, prn_stream); + fputc(skip & 0xff, prn_stream); + fputc(skip >> 8, prn_stream); + skip = 0; + } + + lcnt = gdev_prn_copy_scan_lines(pdev, lnum, in, in_size); + + /* + ** Check to see if we don't have enough data to fill an entire + ** band. Padding here seems to work (the printer doesn't jump + ** to the next (blank) page), although the ideal behaviour + ** would probably be to reduce the band height. + ** + ** Pad with nulls: + */ + + if( lcnt < band_size ) + memset(in + lcnt * line_size, 0, in_size - lcnt * line_size); + + /* + ** Now we have a band of data: try to compress it: + */ + + for( outp = out, i = 0 ; i < band_size ; i++ ) { + + /* + ** Take margins into account: + */ + + inp = in + i * line_size + left; + in_end = inp + width; + + /* + ** walk through input buffer, looking for repeated data: + ** Since we need more than 2 repeats to make the compression + ** worth it, we can compare pairs, since it doesn't matter if we + ** + */ + + for( p = inp, q = inp + 1 ; q < in_end ; ) { + + if( *p != *q ) { + + p += 2; + q += 2; + + } else { + + /* + ** Check behind us, just in case: + */ + + if( p > inp && *p == *(p-1) ) + p--; + + /* + ** walk forward, looking for matches: + */ + + for( q++ ; *q == *p && q < in_end ; q++ ) { + if( (q-p) >= 128 ) { + if( p > inp ) { + count = p - inp; + while( count > 128 ) { + *outp++ = '\177'; + memcpy(outp, inp, 128); /* data */ + inp += 128; + outp += 128; + count -= 128; + } + *outp++ = (char) (count - 1); /* count */ + memcpy(outp, inp, count); /* data */ + outp += count; + } + *outp++ = '\201'; /* Repeat 128 times */ + *outp++ = *p; + p += 128; + inp = p; + } + } + + if( (q - p) > 2 ) { /* output this sequence */ + if( p > inp ) { + count = p - inp; + while( count > 128 ) { + *outp++ = '\177'; + memcpy(outp, inp, 128); /* data */ + inp += 128; + outp += 128; + count -= 128; + } + *outp++ = (char) (count - 1); /* byte count */ + memcpy(outp, inp, count); /* data */ + outp += count; + } + count = q - p; + *outp++ = (char) (256 - count + 1); + *outp++ = *p; + p += count; + inp = p; + } else /* add to non-repeating data list */ + p = q; + if( q < in_end ) + q++; + } + } + + /* + ** copy remaining part of line: + */ + + if( inp < in_end ) { + + count = in_end - inp; + + /* + ** If we've had a long run of varying data followed by a + ** sequence of repeated data and then hit the end of line, + ** it's possible to get data counts > 128. + */ + + while( count > 128 ) { + *outp++ = '\177'; + memcpy(outp, inp, 128); /* data */ + inp += 128; + outp += 128; + count -= 128; + } + + *outp++ = (char) (count - 1); /* byte count */ + memcpy(outp, inp, count); /* data */ + outp += count; + } + } + + /* + ** Output data: + */ + + fwrite("\033.\001", 1, 3, prn_stream); + + if(pdev->y_pixels_per_inch == 360) + fputc('\012', prn_stream); + else + fputc('\024', prn_stream); + + if(pdev->x_pixels_per_inch == 360) + fputc('\012', prn_stream); + else + fputc('\024', prn_stream); + + fputc(band_size, prn_stream); + + fputc((width << 3) & 0xff, prn_stream); + fputc( width >> 5, prn_stream); + + fwrite(out, 1, (outp - out), prn_stream); + + fwrite("\r\n", 1, 2, prn_stream); + lnum += band_size; + } + + /* Eject the page and reinitialize the printer */ + + fputs("\f\033@", prn_stream); + fflush(prn_stream); + + gs_free((char *)buf2, in_size, 1, "escp2_print_page(buf2)"); + gs_free((char *)buf1, in_size, 1, "escp2_print_page(buf1)"); + return 0; + } diff -rNC2 gs26/gdevevga.c gs261/gdevevga.c *** gs26/gdevevga.c Sat Apr 17 05:01:24 1993 --- gs261/gdevevga.c Wed May 12 18:14:30 1993 *************** *** 1,4 **** /* Copyright (C) 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/gdevgif.c gs261/gdevgif.c *** gs26/gdevgif.c Sun Apr 18 19:56:36 1993 --- gs261/gdevgif.c Wed May 19 21:11:10 1993 *************** *** 1,4 **** /* Copyright (C) 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- *************** *** 359,363 **** /* Write the header, on the first page only. */ ! if ( pdev->page_count == 1 ) { if ( fwrite(&header, 1, 13, file) < 13 ) --- 358,362 ---- /* Write the header, on the first page only. */ ! if ( gdev_prn_file_is_new(pdev) ) { if ( fwrite(&header, 1, 13, file) < 13 ) diff -rNC2 gs26/gdevherc.c gs261/gdevherc.c *** gs26/gdevherc.c Fri Apr 16 19:02:26 1993 --- gs261/gdevherc.c Wed May 19 05:03:56 1993 *************** *** 1,4 **** /* Copyright (C) 1990, 1991, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- *************** *** 75,82 **** screen_size_x, screen_size_y, /* The following parameters map an appropriate fraction of */ ! /* the screen to an 8.5" x 11" coordinate space. */ /* This may or may not be what is desired! */ ! (screen_size_y * aspect_ratio) / 11.0, /* x density */ ! screen_size_y / 11.0, /* y density */ no_margins, dci_black_and_white, --- 74,81 ---- screen_size_x, screen_size_y, /* The following parameters map an appropriate fraction of */ ! /* the screen to a full-page coordinate space. */ /* This may or may not be what is desired! */ ! (screen_size_y * aspect_ratio) / PAGE_HEIGHT_INCHES, /* x dpi */ ! screen_size_y / PAGE_HEIGHT_INCHES, /* y dpi */ no_margins, dci_black_and_white, diff -rNC2 gs26/gdevlbp8.c gs261/gdevlbp8.c *** gs26/gdevlbp8.c Thu Aug 8 03:52:06 1991 --- gs261/gdevlbp8.c Wed May 12 18:14:44 1993 *************** *** 1,4 **** /* Copyright (C) 1991 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/gdevmem.h gs261/gdevmem.h *** gs26/gdevmem.h Wed Mar 17 02:31:32 1993 --- gs261/gdevmem.h Wed May 26 14:52:04 1993 *************** *** 1,4 **** /* Copyright (C) 1991, 1992 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- *************** *** 66,69 **** --- 65,69 ---- extern dev_proc_get_bits(mem_get_bits); extern dev_proc_get_xfont_procs(mem_get_xfont_procs); + extern dev_proc_get_xfont_device(mem_get_xfont_device); #define mem_procs(map_rgb_color, map_color_rgb, copy_mono, copy_color, fill_rectangle)\ { mem_open,\ *************** *** 83,87 **** gx_default_put_props,\ gx_default_map_cmyk_color,\ ! mem_get_xfont_procs\ } --- 83,88 ---- gx_default_put_props,\ gx_default_map_cmyk_color,\ ! mem_get_xfont_procs,\ ! mem_get_xfont_device\ } diff -rNC2 gs26/gdevmem1.c gs261/gdevmem1.c *** gs26/gdevmem1.c Wed Mar 17 17:31:46 1993 --- gs261/gdevmem1.c Wed May 26 14:52:38 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1992 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- *************** *** 160,163 **** --- 159,170 ---- return (target == 0 ? gx_default_get_xfont_procs(dev) : (*target->procs->get_xfont_procs)(target)); + } + + /* Return the xfont device. */ + gx_device * + mem_get_xfont_device(gx_device *dev) + { gx_device *target = mdev->target; + return (target == 0 ? gx_default_get_xfont_device(dev) : + (*target->procs->get_xfont_device)(target)); } diff -rNC2 gs26/gdevmem2.c gs261/gdevmem2.c *** gs26/gdevmem2.c Thu Jan 21 17:50:46 1993 --- gs261/gdevmem2.c Fri May 21 04:25:18 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1992 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- *************** *** 464,468 **** #else # define arrange_bytes(color)\ ! (((color) >> 24) + (((color) >> 16) & 0xff00) +\ (((color) & 0xff00) << 8) + ((color) << 24)) #endif --- 463,467 ---- #else # define arrange_bytes(color)\ ! (((color) >> 24) + (((color) >> 8) & 0xff00) +\ (((color) & 0xff00) << 8) + ((color) << 24)) #endif diff -rNC2 gs26/gdevmem3.c gs261/gdevmem3.c *** gs26/gdevmem3.c Tue Oct 27 15:08:54 1992 --- gs261/gdevmem3.c Wed May 12 18:15:16 1993 *************** *** 1,4 **** /* Copyright (C) 1992 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/gdevmswn.c gs261/gdevmswn.c *** gs26/gdevmswn.c Mon May 3 20:09:56 1993 --- gs261/gdevmswn.c Wed May 12 18:15:30 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- *************** *** 353,358 **** dev->height = temp_dev.height; if (IsWindow(wdev->hwndimg) && IsWindow(wdev->hwndimgchild)) { - /* cause scroll bars to be redrawn */ RECT rect; GetClientRect(wdev->hwndimgchild,&rect); SendMessage(wdev->hwndimgchild, WM_SIZE, SIZE_RESTORED, --- 352,361 ---- dev->height = temp_dev.height; if (IsWindow(wdev->hwndimg) && IsWindow(wdev->hwndimgchild)) { RECT rect; + /* erase bitmap - before window gets redrawn */ + (*dev->procs->fill_rectangle)(dev, 0, 0, dev->width, dev->height, + win_map_rgb_color(dev, gx_max_color_value, + gx_max_color_value, gx_max_color_value)); + /* cause scroll bars to be redrawn */ GetClientRect(wdev->hwndimgchild,&rect); SendMessage(wdev->hwndimgchild, WM_SIZE, SIZE_RESTORED, diff -rNC2 gs26/gdevmswn.h gs261/gdevmswn.h *** gs26/gdevmswn.h Wed Apr 21 04:34:36 1993 --- gs261/gdevmswn.h Wed May 12 18:15:38 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/gdevmsxf.c gs261/gdevmsxf.c *** gs26/gdevmsxf.c Sun May 2 15:18:10 1993 --- gs261/gdevmsxf.c Wed May 26 16:59:04 1993 *************** *** 1,4 **** /* Copyright (C) 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- *************** *** 61,65 **** TEXTMETRIC tm; HFONT hFont; ! gx_device *dev; /* for GetDC */ int invert_y; int y_offset; --- 60,64 ---- TEXTMETRIC tm; HFONT hFont; ! gx_device_win *dev; /* for GetDC */ int invert_y; int y_offset; *************** *** 68,74 **** /* Forward references */ ! private HDC near win_get_dc(P1(gx_device *)); ! private void near win_release_dc(P2(gx_device *, HDC)); ! private int win_select_font(P2(HDC, gx_xfont *)); /* Map from PostScript to Windows character codes. */ --- 67,73 ---- /* Forward references */ ! private HDC near win_get_dc(P1(gx_device_win *)); ! private void near win_release_dc(P2(gx_device_win *, HDC)); ! private int win_select_font(P2(HDC, win_xfont *)); /* Map from PostScript to Windows character codes. */ *************** *** 168,172 **** f.hFont = 0; f.invert_y = pmat->yy >= 0; ! hdc = win_get_dc(dev); if ( hdc == NULL ) return NULL; --- 167,171 ---- f.hFont = 0; f.invert_y = pmat->yy >= 0; ! hdc = win_get_dc(wdev); if ( hdc == NULL ) return NULL; *************** *** 189,193 **** f.lf.lfPitchAndFamily = 0; /* default */ if ( !map_logical_font(hdc, &f) ) ! { win_release_dc(dev, hdc); return NULL; } --- 188,192 ---- f.lf.lfPitchAndFamily = 0; /* default */ if ( !map_logical_font(hdc, &f) ) ! { win_release_dc(wdev, hdc); return NULL; } *************** *** 194,198 **** } GetTextMetrics(hdc, &f.tm); ! win_release_dc(dev, hdc); f.y_offset = (!f.invert_y ? f.tm.tmAscent : f.tm.tmDescent); wf = (win_xfont *)(*mprocs->alloc)(1, sizeof(win_xfont), "win_lookup_font"); --- 193,197 ---- } GetTextMetrics(hdc, &f.tm); ! win_release_dc(wdev, hdc); f.y_offset = (!f.invert_y ? f.tm.tmAscent : f.tm.tmDescent); wf = (win_xfont *)(*mprocs->alloc)(1, sizeof(win_xfont), "win_lookup_font"); *************** *** 202,206 **** } f.common.procs = &win_xfont_procs; ! f.dev = dev; *wf = f; return (gx_xfont *)wf; --- 201,205 ---- } f.common.procs = &win_xfont_procs; ! f.dev = wdev; *wf = f; return (gx_xfont *)wf; *************** *** 244,248 **** if ( hdc == NULL ) return gx_no_xglyph; ! code = win_select_font(hdc, xf); win_release_dc(wxf->dev, hdc); if ( code < 0 ) --- 243,247 ---- if ( hdc == NULL ) return gx_no_xglyph; ! code = win_select_font(hdc, wxf); win_release_dc(wxf->dev, hdc); if ( code < 0 ) *************** *** 291,295 **** if ( hdc == NULL ) return gs_error_limitcheck; ! if ( (code = win_select_font(hdc, xf)) < 0 ) { win_release_dc(wxf->dev, hdc); return code; --- 290,294 ---- if ( hdc == NULL ) return gs_error_limitcheck; ! if ( (code = win_select_font(hdc, wxf)) < 0 ) { win_release_dc(wxf->dev, hdc); return code; *************** *** 324,328 **** HDC hdc = wdev->hdctext; PALETTEENTRY *pal = &wdev->limgpalette->palPalEntry[color]; ! if ( (code = win_select_font(hdc, xf)) < 0 ) return code; SetTextColor(hdc, RGB(pal->peRed, pal->peGreen, pal->peBlue)); --- 323,327 ---- HDC hdc = wdev->hdctext; PALETTEENTRY *pal = &wdev->limgpalette->palPalEntry[color]; ! if ( (code = win_select_font(hdc, wxf)) < 0 ) return code; SetTextColor(hdc, RGB(pal->peRed, pal->peGreen, pal->peBlue)); *************** *** 337,341 **** gs_int_rect bbox; int w, h, wbm, raster; ! gx_device *fdev = wxf->dev; HBITMAP hbm; byte *bits; --- 336,340 ---- gs_int_rect bbox; int w, h, wbm, raster; ! gx_device_win *fdev = wxf->dev; HBITMAP hbm; byte *bits; *************** *** 362,366 **** int y = yo - wxf->y_offset; SetMapMode(hdcbit, GetMapMode(hdcwin)); ! win_select_font(hdcbit, xf); SelectObject(hdcbit, hbm); PatBlt(hdcbit, 0, 0, wbm, h, rop_write_0s); --- 361,365 ---- int y = yo - wxf->y_offset; SetMapMode(hdcbit, GetMapMode(hdcwin)); ! win_select_font(hdcbit, wxf); SelectObject(hdcbit, hbm); PatBlt(hdcbit, 0, 0, wbm, h, rop_write_0s); *************** *** 408,414 **** /* ------ Font utilities ------ */ /* Get a DC for the font's device. */ private HDC near ! win_get_dc(gx_device *dev) { return GetDC(wdev->hwndimg); } --- 407,416 ---- /* ------ Font utilities ------ */ + #undef wdev + #undef wxf + /* Get a DC for the font's device. */ private HDC near ! win_get_dc(gx_device_win *wdev) { return GetDC(wdev->hwndimg); } *************** *** 416,420 **** /* Release a DC for the font's device. */ private void near ! win_release_dc(gx_device *dev, HDC hdc) { ReleaseDC(wdev->hwndimg, hdc); } --- 418,422 ---- /* Release a DC for the font's device. */ private void near ! win_release_dc(gx_device_win *wdev, HDC hdc) { ReleaseDC(wdev->hwndimg, hdc); } *************** *** 422,426 **** /* Make an xfont current, possibly remapping it from a logical font. */ private int ! win_select_font(HDC hdc, gx_xfont *xf) { HFONT hFont = wxf->hFont; if ( hFont == NULL ) --- 424,428 ---- /* Make an xfont current, possibly remapping it from a logical font. */ private int ! win_select_font(HDC hdc, win_xfont *wxf) { HFONT hFont = wxf->hFont; if ( hFont == NULL ) diff -rNC2 gs26/gdevn533.c gs261/gdevn533.c *** gs26/gdevn533.c Thu Apr 15 14:37:54 1993 --- gs261/gdevn533.c Wed May 12 18:15:48 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1990, 1991, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/gdevnp6.c gs261/gdevnp6.c *** gs26/gdevnp6.c Tue Nov 24 13:51:42 1992 --- gs261/gdevnp6.c Wed May 12 18:15:52 1993 *************** *** 1,4 **** /* Copyright (C) 1992 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/gdevo182.c gs261/gdevo182.c *** gs26/gdevo182.c Tue Apr 13 08:10:56 1993 --- gs261/gdevo182.c Wed May 12 18:15:54 1993 *************** *** 1,4 **** /* Copyright (C) 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/gdevpbm.c gs261/gdevpbm.c *** gs26/gdevpbm.c Sun Mar 28 05:22:08 1993 --- gs261/gdevpbm.c Wed May 12 18:15:58 1993 *************** *** 1,4 **** /* Copyright (C) 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- *************** *** 342,346 **** { /* If color=0, write only one value per pixel; */ /* if color=1, write 3 values per pixel. */ ! /* Note that bpp <= 24 for raw format, bpp <= 32 for plain. */ uint bpe = depth / 3; /* bits per r/g/b element */ uint mask = (1 << bpe) - 1; --- 341,345 ---- { /* If color=0, write only one value per pixel; */ /* if color=1, write 3 values per pixel. */ ! /* Note that depth <= 24 for raw format, depth <= 32 for plain. */ uint bpe = depth / 3; /* bits per r/g/b element */ uint mask = (1 << bpe) - 1; *************** *** 360,364 **** /* falls through */ case 3: ! pixel = (ulong)*bp << 16; bp++; /* falls through */ case 2: --- 359,363 ---- /* falls through */ case 3: ! pixel += (ulong)*bp << 16; bp++; /* falls through */ case 2: *************** *** 383,387 **** putc(g, pstream); } ! putc(g, pstream); } else --- 382,386 ---- putc(g, pstream); } ! putc(b, pstream); } else diff -rNC2 gs26/gdevpccm.c gs261/gdevpccm.c *** gs26/gdevpccm.c Mon Apr 12 17:42:50 1993 --- gs261/gdevpccm.c Wed May 12 18:16:06 1993 *************** *** 1,4 **** /* Copyright (C) 1992 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/gdevpccm.h gs261/gdevpccm.h *** gs26/gdevpccm.h Sat Apr 3 02:37:12 1993 --- gs261/gdevpccm.h Wed May 12 18:16:08 1993 *************** *** 1,4 **** /* Copyright (C) 1992 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/gdevpcfb.c gs261/gdevpcfb.c *** gs26/gdevpcfb.c Sat Apr 17 05:30:14 1993 --- gs261/gdevpcfb.c Wed May 12 18:16:16 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/gdevpcfb.h gs261/gdevpcfb.h *** gs26/gdevpcfb.h Sat Apr 17 06:04:20 1993 --- gs261/gdevpcfb.h Wed May 19 05:00:50 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- *************** *** 61,64 **** --- 60,70 ---- typedef volatile byte *volatile_fb_ptr; + /* Define the nominal page height in inches. */ + #ifdef A4 + # define PAGE_HEIGHT_INCHES 11.0 + #else + # define PAGE_HEIGHT_INCHES 11.69 + #endif + /* The device descriptor */ typedef struct gx_device_ega_s gx_device_ega; *************** *** 79,83 **** /* Macro for creating instances */ /* The initial parameters map an appropriate fraction of */ ! /* the screen to an 8.5" x 11" coordinate space. */ /* This may or may not be what is desired! */ #define ega_device(dev_name, procs, fb_raster, screen_height, aspect_ratio, video_mode)\ --- 85,89 ---- /* Macro for creating instances */ /* The initial parameters map an appropriate fraction of */ ! /* the screen to a full-page coordinate space. */ /* This may or may not be what is desired! */ #define ega_device(dev_name, procs, fb_raster, screen_height, aspect_ratio, video_mode)\ *************** *** 86,91 **** dev_name,\ fb_raster * 8, screen_height,\ ! (screen_height * (aspect_ratio)) / 11.0, /* x density */\ ! screen_height / 11.0, /* y density */\ no_margins,\ { (rgb_max ? 3 : 1), /* num_components */\ --- 92,97 ---- dev_name,\ fb_raster * 8, screen_height,\ ! (screen_height * (aspect_ratio)) / PAGE_HEIGHT_INCHES, /* x dpi */\ ! screen_height / PAGE_HEIGHT_INCHES, /* y dpi */\ no_margins,\ { (rgb_max ? 3 : 1), /* num_components */\ diff -rNC2 gs26/gdevpcl.c gs261/gdevpcl.c *** gs26/gdevpcl.c Mon Feb 8 01:00:04 1993 --- gs261/gdevpcl.c Wed May 12 18:16:22 1993 *************** *** 1,4 **** /* Copyright (C) 1992 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/gdevpcl.h gs261/gdevpcl.h *** gs26/gdevpcl.h Mon Feb 8 01:00:14 1993 --- gs261/gdevpcl.h Wed May 12 18:16:26 1993 *************** *** 1,4 **** /* Copyright (C) 1992 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/gdevpcx.c gs261/gdevpcx.c *** gs26/gdevpcx.c Sun Mar 28 05:23:28 1993 --- gs261/gdevpcx.c Wed May 12 18:16:30 1993 *************** *** 1,4 **** /* Copyright (C) 1992 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/gdevpe.c gs261/gdevpe.c *** gs26/gdevpe.c Sun Sep 6 19:12:18 1992 --- gs261/gdevpe.c Wed May 12 18:16:32 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1990, 1991 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/gdevpipe.c gs261/gdevpipe.c *** gs26/gdevpipe.c Wed Apr 14 07:31:56 1993 --- gs261/gdevpipe.c Wed May 12 18:16:38 1993 *************** *** 1,4 **** /* Copyright (C) 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/gdevpjet.c gs261/gdevpjet.c *** gs26/gdevpjet.c Sun Mar 28 05:30:46 1993 --- gs261/gdevpjet.c Wed May 12 18:16:40 1993 *************** *** 1,4 **** /* Copyright (C) 1991, 1992 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/gdevprn.c gs261/gdevprn.c *** gs26/gdevprn.c Sat Mar 27 15:11:34 1993 --- gs261/gdevprn.c Wed May 26 18:05:02 1993 *************** *** 1,4 **** /* Copyright (C) 1990, 1992 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- *************** *** 159,162 **** --- 158,162 ---- copy_proc(map_cmyk_color); copy_proc(get_xfont_procs); + copy_proc(get_xfont_device); #undef copy_proc return (*pdev->procs->open_device)(pdev); *************** *** 325,347 **** char pfname[prn_fname_sizeof + 10]; if ( strchr(fname, '%') ) ! { sprintf(pfname, fname, ppdev->page_count); fname = pfname; ! } if ( ppdev->file == NULL ) ! { if ( !strcmp(fname, "-") ) ! ppdev->file = stdout; else ! { ppdev->file = gp_open_printer(fname, binary_mode); ! if ( ppdev->file == NULL ) ! return_error(gs_error_invalidfileaccess); ! } ! } return 0; - } - - /* Get the size of a scan line for copying. */ - uint - gdev_prn_raster(gx_device_printer *pdev) - { return gx_device_raster((gx_device *)pdev, 0); } --- 325,344 ---- char pfname[prn_fname_sizeof + 10]; if ( strchr(fname, '%') ) ! { sprintf(pfname, fname, ppdev->page_count); fname = pfname; ! } if ( ppdev->file == NULL ) ! { if ( !strcmp(fname, "-") ) ! ppdev->file = stdout; else ! { ppdev->file = gp_open_printer(fname, binary_mode); ! if ( ppdev->file == NULL ) ! return_error(gs_error_invalidfileaccess); ! } ! ppdev->file_is_new = 1; ! } ! else ! ppdev->file_is_new = 0; return 0; } diff -rNC2 gs26/gdevprn.h gs261/gdevprn.h *** gs26/gdevprn.h Sat Mar 27 15:10:52 1993 --- gs261/gdevprn.h Thu May 20 00:46:32 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1992 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- *************** *** 86,89 **** --- 85,89 ---- char fname[prn_fname_sizeof]; /* output file name */\ /* ------ End of preset items ------ */\ + int file_is_new; /* boolean, true iff file just opened */\ FILE *file; /* output file */\ char ccfname[60]; /* clist file name */\ *************** *** 175,181 **** PRN_BUFFER_SPACE,\ { 0 }, /* fname */\ ! 0, { 0 }, 0, { 0 }, 0, 0, 0, 0, 0, { 0 } /* ... mod_procs */ ! #define prn_device(procs, dev_name, width_10ths, height_10ths, x_dpi, y_dpi, l_margin, b_margin, r_margin, t_margin, color_bits, print_page)\ ! { prn_device_body(gx_device_printer, procs, dev_name,\ width_10ths, height_10ths, x_dpi, y_dpi,\ l_margin, b_margin, r_margin, t_margin,\ --- 175,181 ---- PRN_BUFFER_SPACE,\ { 0 }, /* fname */\ ! 0, 0, { 0 }, 0, { 0 }, 0, 0, 0, 0, 0, { 0 } /* ... mod_procs */ ! #define prn_device_std_body(devtype, procs, dev_name, width_10ths, height_10ths, x_dpi, y_dpi, l_margin, b_margin, r_margin, t_margin, color_bits, print_page)\ ! prn_device_body(devtype, procs, dev_name,\ width_10ths, height_10ths, x_dpi, y_dpi,\ l_margin, b_margin, r_margin, t_margin,\ *************** *** 186,190 **** (color_bits >= 8 ? 5 : 2),\ (color_bits >= 8 ? 5 : color_bits > 1 ? 2 : 0),\ ! print_page)\ } --- 186,195 ---- (color_bits >= 8 ? 5 : 2),\ (color_bits >= 8 ? 5 : color_bits > 1 ? 2 : 0),\ ! print_page) ! #define prn_device(procs, dev_name, width_10ths, height_10ths, x_dpi, y_dpi, l_margin, b_margin, r_margin, t_margin, color_bits, print_page)\ ! { prn_device_std_body(gx_device_printer, procs, dev_name,\ ! width_10ths, height_10ths, x_dpi, y_dpi,\ ! l_margin, b_margin, r_margin, t_margin,\ ! color_bits, print_page)\ } *************** *** 191,195 **** /* Common procedures defined in gdevprn.c */ int gdev_prn_open_printer(P2(gx_device *dev, int binary_mode)); ! uint gdev_prn_raster(P1(gx_device_printer *)); int gdev_prn_get_bits(P4(gx_device_printer *, int, byte *, byte **)); int gdev_prn_copy_scan_lines(P4(gx_device_printer *, int, byte *, uint)); --- 196,201 ---- /* Common procedures defined in gdevprn.c */ int gdev_prn_open_printer(P2(gx_device *dev, int binary_mode)); ! #define gdev_prn_file_is_new(pdev) ((pdev)->file_is_new) ! #define gdev_prn_raster(pdev) gx_device_raster((gx_device *)(pdev), 0) int gdev_prn_get_bits(P4(gx_device_printer *, int, byte *, byte **)); int gdev_prn_copy_scan_lines(P4(gx_device_printer *, int, byte *, uint)); diff -rNC2 gs26/gdevs3ga.c gs261/gdevs3ga.c *** gs26/gdevs3ga.c Mon May 3 11:51:14 1993 --- gs261/gdevs3ga.c Wed May 12 18:16:50 1993 *************** *** 1,4 **** /* Copyright (C) 1992 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/gdevsco.c gs261/gdevsco.c *** gs26/gdevsco.c Sat Apr 17 06:04:26 1993 --- gs261/gdevsco.c Wed May 12 18:16:52 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/gdevsnfb.c gs261/gdevsnfb.c *** gs26/gdevsnfb.c Fri Feb 28 14:43:44 1992 --- gs261/gdevsnfb.c Wed May 12 18:16:56 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1990, 1991 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/gdevsppr.c gs261/gdevsppr.c *** gs26/gdevsppr.c Fri Apr 9 02:32:24 1993 --- gs261/gdevsppr.c Wed May 12 18:17:00 1993 *************** *** 1,4 **** /* Copyright (C) 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/gdevsun.c gs261/gdevsun.c *** gs26/gdevsun.c Thu Sep 10 17:33:26 1992 --- gs261/gdevsun.c Wed May 12 18:17:02 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1992 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/gdevsvga.c gs261/gdevsvga.c *** gs26/gdevsvga.c Mon May 3 11:51:04 1993 --- gs261/gdevsvga.c Wed May 19 05:02:44 1993 *************** *** 1,4 **** /* Copyright (C) 1991, 1992 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- *************** *** 102,106 **** { fb_dev->x_pixels_per_inch = fb_dev->y_pixels_per_inch = ! fb_dev->height / 11.0; /* Set the display mode. */ if ( svga_save_mode < 0 ) --- 101,105 ---- { fb_dev->x_pixels_per_inch = fb_dev->y_pixels_per_inch = ! fb_dev->height / PAGE_HEIGHT_INCHES; /* Set the display mode. */ if ( svga_save_mode < 0 ) diff -rNC2 gs26/gdevsvga.h gs261/gdevsvga.h *** gs26/gdevsvga.h Sat Aug 15 09:27:26 1992 --- gs261/gdevsvga.h Wed May 19 05:02:02 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1992 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- *************** *** 67,71 **** /* The initial parameters map an appropriate fraction of */ ! /* the screen to an 8.5" x 11" coordinate space. */ /* This may or may not be what is desired! */ #define svga_device(procs, name, get_mode, set_mode, set_page) {\ --- 66,70 ---- /* The initial parameters map an appropriate fraction of */ ! /* the screen to a full-page coordinate space. */ /* This may or may not be what is desired! */ #define svga_device(procs, name, get_mode, set_mode, set_page) {\ *************** *** 74,78 **** name,\ 640, 480, /* screen size */\ ! 480 / 11.0, 480 / 11.0, /* resolution */\ no_margins,\ dci_color(8, 31, 4),\ --- 73,77 ---- name,\ 640, 480, /* screen size */\ ! 480 / PAGE_HEIGHT_INCHES, 480 / PAGE_HEIGHT_INCHES, /* resolution */\ no_margins,\ dci_color(8, 31, 4),\ diff -rNC2 gs26/gdevtiff.c gs261/gdevtiff.c *** gs26/gdevtiff.c Sun Mar 28 05:21:38 1993 --- gs261/gdevtiff.c Wed May 19 20:05:02 1993 *************** *** 24,27 **** --- 24,31 ---- * OF THIS SOFTWARE. */ + /* + * 5/19/93 modified by L. Peter Deutsch, Aladdin Enterprises, + * for compatibility with Ghostscript 2.6.1. + */ /* gdevtiff.c */ *************** *** 71,101 **** typedef struct gx_device_tiff_s gx_device_tiff; - /* - * Too bad the prn_device() macro doesn't let you specify the - * size of the gx_device structure -- we have to repeat it here - */ - #define generic_prn_device(Struct, procs, dev_name, width_10ths, height_10ths, x_dpi, y_dpi, l_margin, b_margin, r_margin, t_margin, color_bits, print_page) {\ - sizeof (Struct), \ - &procs, \ - dev_name, \ - (int)((long)width_10ths * x_dpi / 10), /* width */ \ - (int)((long)height_10ths * y_dpi / 10), /* height */ \ - x_dpi, y_dpi, \ - l_margin, b_margin, r_margin, t_margin, \ - { (color_bits > 1 ? 3 : 1), /* num_components */ \ - ((color_bits > 1) & (color_bits < 8) ? 8 : color_bits), /* depth */\ - (color_bits >= 8 ? 255 : 1), /* max_gray */ \ - (color_bits >= 8 ? 255 : color_bits > 1 ? 1 : 0), /* max_rgb */\ - (color_bits >= 8 ? 5 : 2), /* dither_gray */\ - (color_bits >= 8 ? 5 : color_bits > 1 ? 2 : 0), /* dither_rgb */\ - }, \ - 0, /* not initialized yet */\ - { 0 }, /* skip */ \ - print_page, \ - PRN_MAX_BITMAP, \ - PRN_BUFFER_SPACE, \ - { 0 } /* fname */ \ - } - /* The device descriptor */ #define X_DPI 204 --- 75,78 ---- *************** *** 111,115 **** gx_device_tiff far_data gs_tiffg3_device = ! generic_prn_device( gx_device_tiff, tiff_std_procs, --- 88,92 ---- gx_device_tiff far_data gs_tiffg3_device = ! { prn_device_std_body( gx_device_tiff, tiff_std_procs, *************** *** 121,125 **** 1, tiff_print_page ! ); --- 98,103 ---- 1, tiff_print_page ! ) ! }; diff -rNC2 gs26/gdevtknk.c gs261/gdevtknk.c *** gs26/gdevtknk.c Sun May 2 03:59:22 1993 --- gs261/gdevtknk.c Wed May 12 18:17:28 1993 *************** *** 1,4 **** /* Copyright (C) 1992 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/gdevtrfx.c gs261/gdevtrfx.c *** gs26/gdevtrfx.c Tue Jun 18 06:15:28 1991 --- gs261/gdevtrfx.c Wed May 12 18:17:32 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1990, 1991 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/gdevwddb.c gs261/gdevwddb.c *** gs26/gdevwddb.c Mon Apr 5 06:58:28 1993 --- gs261/gdevwddb.c Wed May 12 18:17:34 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/gdevwdib.c gs261/gdevwdib.c *** gs26/gdevwdib.c Fri Apr 2 03:57:02 1993 --- gs261/gdevwdib.c Wed May 12 18:17:38 1993 *************** *** 1,4 **** /* Copyright (C) 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/gdevwprn.c gs261/gdevwprn.c *** gs26/gdevwprn.c Mon May 3 18:01:52 1993 --- gs261/gdevwprn.c Wed May 12 18:17:40 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/gdevx.c gs261/gdevx.c *** gs26/gdevx.c Sun May 9 12:54:58 1993 --- gs261/gdevx.c Fri May 28 09:37:00 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- *************** *** 157,161 **** 128, 5, /* maxGrayRamp, maxRGBRamp */ NULL, /* palette */ ! 1, 0, 10.0, /* useXFonts, logXFonts, xFontTolerance */ 0.0, 0.0, /* xResolution, yResolution */ 1, /* useBackingPixmap */ --- 156,163 ---- 128, 5, /* maxGrayRamp, maxRGBRamp */ NULL, /* palette */ ! NULL, NULL, NULL, /* regularFonts, symbolFonts, dingbatFonts */ ! NULL, NULL, NULL, /* regular_fonts, symbol_fonts, dingbat_fonts */ ! 1, 1, 0, /* useXFonts, useScalableFonts, logXFonts */ ! 10.0, /* xFontTolerance */ 0.0, 0.0, /* xResolution, yResolution */ 1, /* useBackingPixmap */ *************** *** 189,193 **** if (xdev->ghostview) x_send_event(dev, xdev->done); ! if (xdev->vinfo) XFree(xdev->vinfo); if (xdev->dither_colors) { if (gx_device_has_color(xdev)) --- 191,198 ---- if (xdev->ghostview) x_send_event(dev, xdev->done); ! if (xdev->vinfo) { ! XFree(xdev->vinfo); ! xdev->vinfo = NULL; ! } if (xdev->dither_colors) { if (gx_device_has_color(xdev)) *************** *** 197,205 **** gs_free((char *)xdev->dither_colors, sizeof(x_pixel), xdev->color_info.dither_rgb, "gdev_x_rgb_cube"); } ! if (xdev->dynamic_colors) gs_free((char *)xdev->dynamic_colors, sizeof(XColor), xdev->dynamic_size, "gdev_x_dynamic_colors"); ! xdev->vinfo = NULL; XCloseDisplay(xdev->dpy); return 0; --- 202,245 ---- gs_free((char *)xdev->dither_colors, sizeof(x_pixel), xdev->color_info.dither_rgb, "gdev_x_rgb_cube"); + xdev->dither_colors = NULL; } ! if (xdev->dynamic_colors) { gs_free((char *)xdev->dynamic_colors, sizeof(XColor), xdev->dynamic_size, "gdev_x_dynamic_colors"); ! xdev->dynamic_colors = NULL; ! } ! while (xdev->regular_fonts) { ! x11fontmap *font = xdev->regular_fonts; ! xdev->regular_fonts = font->next; ! if (font->std_names) XFreeFontNames(font->std_names); ! if (font->iso_names) XFreeFontNames(font->iso_names); ! gs_free(font->x11_name, sizeof(char), strlen(font->x11_name)+1, ! "gdev_x_font_x11name"); ! gs_free(font->ps_name, sizeof(char), strlen(font->ps_name)+1, ! "gdev_x_font_psname"); ! gs_free((char *)font, sizeof(x11fontmap), 1, "gdev_x_fontmap"); ! } ! while (xdev->symbol_fonts) { ! x11fontmap *font = xdev->symbol_fonts; ! xdev->symbol_fonts = font->next; ! if (font->std_names) XFreeFontNames(font->std_names); ! if (font->iso_names) XFreeFontNames(font->iso_names); ! gs_free(font->x11_name, sizeof(char), strlen(font->x11_name)+1, ! "gdev_x_font_x11name"); ! gs_free(font->ps_name, sizeof(char), strlen(font->ps_name)+1, ! "gdev_x_font_psname"); ! gs_free((char *)font, sizeof(x11fontmap), 1, "gdev_x_fontmap"); ! } ! while (xdev->dingbat_fonts) { ! x11fontmap *font = xdev->dingbat_fonts; ! xdev->dingbat_fonts = font->next; ! if (font->std_names) XFreeFontNames(font->std_names); ! if (font->iso_names) XFreeFontNames(font->iso_names); ! gs_free(font->x11_name, sizeof(char), strlen(font->x11_name)+1, ! "gdev_x_font_x11name"); ! gs_free(font->ps_name, sizeof(char), strlen(font->ps_name)+1, ! "gdev_x_font_psname"); ! gs_free((char *)font, sizeof(x11fontmap), 1, "gdev_x_fontmap"); ! } XCloseDisplay(xdev->dpy); return 0; *************** *** 225,228 **** --- 265,269 ---- return xdev->background; } + #define cv_denom (gx_max_color_value + 1) #if HaveStdCMap /* check the standard colormap first */ *************** *** 234,238 **** unsigned short cvr, cvg, cvb; /* color value on cube */ - #define cv_denom (gx_max_color_value + 1) cr = r * (cmap->red_max + 1) / cv_denom; cg = g * (cmap->green_max + 1) / cv_denom; --- 275,278 ---- *************** *** 287,292 **** #undef max_gray } - #undef cv_denom } /* Finally look through the list of dynamic colors */ if (xdev->dynamic_colors) { --- 327,332 ---- #undef max_gray } } + #undef cv_denom /* Finally look through the list of dynamic colors */ if (xdev->dynamic_colors) { diff -rNC2 gs26/gdevx.h gs261/gdevx.h *** gs26/gdevx.h Sun May 9 12:54:50 1993 --- gs261/gdevx.h Fri May 28 08:08:20 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- *************** *** 30,33 **** --- 29,44 ---- } rect; + /* Define PostScript to X11 font name mapping */ + struct x11fontmap_s; + typedef struct x11fontmap_s x11fontmap; + struct x11fontmap_s { + char *ps_name; + char *x11_name; + char **std_names; + char **iso_names; + int std_count, iso_count; + x11fontmap *next; + }; + /* Define the X Windows device */ typedef struct gx_device_X_s { *************** *** 129,133 **** int maxGrayRamp, maxRGBRamp; String palette; ! Boolean useXFonts, logXFonts; float xFontTolerance; float xResolution, yResolution; --- 140,150 ---- int maxGrayRamp, maxRGBRamp; String palette; ! String regularFonts; ! String symbolFonts; ! String dingbatFonts; ! x11fontmap *regular_fonts; ! x11fontmap *symbol_fonts; ! x11fontmap *dingbat_fonts; ! Boolean useXFonts, useScalableFonts, logXFonts; float xFontTolerance; float xResolution, yResolution; *************** *** 142,145 **** --- 159,163 ---- /* function to keep track of screen updates */ void x_update_add(P5(gx_device *, int, int, int, int)); + void gdev_x_clear_window(P1(gx_device_X *)); /* Number used to distinguish when resoultion was set from the command line */ diff -rNC2 gs26/gdevxini.c gs261/gdevxini.c *** gs26/gdevxini.c Sun May 9 12:55:04 1993 --- gs261/gdevxini.c Fri May 28 09:36:20 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- *************** *** 39,45 **** XtOffsetOf(gx_device_X, borderWidth), XtRImmediate, (XtPointer)1}, {"externalFontTolerance", "ExternalFontTolerance", XtRFloat, sizeof(float), XtOffsetOf(gx_device_X, xFontTolerance), ! XtRString, (XtPointer)"12.5"}, {XtNforeground, XtCForeground, XtRPixel, sizeof(Pixel), XtOffsetOf(gx_device_X, foreground), --- 38,47 ---- XtOffsetOf(gx_device_X, borderWidth), XtRImmediate, (XtPointer)1}, + {"dingbatFonts", "DingbatFonts", XtRString, sizeof(String), + XtOffsetOf(gx_device_X, dingbatFonts), + XtRString, "ZapfDingbats: -Adobe-ITC Zapf Dingbats-Medium-R-Normal--"}, {"externalFontTolerance", "ExternalFontTolerance", XtRFloat, sizeof(float), XtOffsetOf(gx_device_X, xFontTolerance), ! XtRString, (XtPointer)"10.0"}, {XtNforeground, XtCForeground, XtRPixel, sizeof(Pixel), XtOffsetOf(gx_device_X, foreground), *************** *** 60,63 **** --- 62,108 ---- XtOffsetOf(gx_device_X, palette), XtRString, "Color"}, + + /* I had to compress the whitespace out of the default string to + * satisfy certain balky compilers. + */ + {"regularFonts", "RegularFonts", XtRString, sizeof(String), + XtOffsetOf(gx_device_X, regularFonts), + XtRString, "\ + AvantGarde-Book:-Adobe-ITC Avant Garde Gothic-Book-R-Normal--\n\ + AvantGarde-BookOblique:-Adobe-ITC Avant Garde Gothic-Book-O-Normal--\n\ + AvantGarde-Demi:-Adobe-ITC Avant Garde Gothic-Demi-R-Normal--\n\ + AvantGarde-DemiOblique:-Adobe-ITC Avant Garde Gothic-Demi-O-Normal--\n\ + Bookman-Demi:-Adobe-ITC Bookman-Demi-R-Normal--\n\ + Bookman-DemiItalic:-Adobe-ITC Bookman-Demi-I-Normal--\n\ + Bookman-Light:-Adobe-ITC Bookman-Light-R-Normal--\n\ + Bookman-LightItalic:-Adobe-ITC Bookman-Light-I-Normal--\n\ + Courier:-Adobe-Courier-Medium-R-Normal--\n\ + Courier-Bold:-Adobe-Courier-Bold-R-Normal--\n\ + Courier-BoldOblique:-Adobe-Courier-Bold-O-Normal--\n\ + Courier-Oblique:-Adobe-Courier-Medium-O-Normal--\n\ + Helvetica:-Adobe-Helvetica-Medium-R-Normal--\n\ + Helvetica-Bold:-Adobe-Helvetica-Bold-R-Normal--\n\ + Helvetica-BoldOblique:-Adobe-Helvetica-Bold-O-Normal--\n\ + Helvetica-Narrow:-Adobe-Helvetica-Medium-R-Narrow--\n\ + Helvetica-Narrow-Bold:-Adobe-Helvetica-Bold-R-Narrow--\n\ + Helvetica-Narrow-BoldOblique:-Adobe-Helvetica-Bold-O-Narrow--\n\ + Helvetica-Narrow-Oblique:-Adobe-Helvetica-Medium-O-Narrow--\n\ + Helvetica-Oblique:-Adobe-Helvetica-Medium-O-Normal--\n\ + NewCenturySchlbk-Bold:-Adobe-New Century Schoolbook-Bold-R-Normal--\n\ + NewCenturySchlbk-BoldItalic:-Adobe-New Century Schoolbook-Bold-I-Normal--\n\ + NewCenturySchlbk-Italic:-Adobe-New Century Schoolbook-Medium-I-Normal--\n\ + NewCenturySchlbk-Roman:-Adobe-New Century Schoolbook-Medium-R-Normal--\n\ + Palatino-Bold:-Adobe-Palatino-Bold-R-Normal--\n\ + Palatino-BoldItalic:-Adobe-Palatino-Bold-I-Normal--\n\ + Palatino-Italic:-Adobe-Palatino-Medium-I-Normal--\n\ + Palatino-Roman:-Adobe-Palatino-Medium-R-Normal--\n\ + Times-Bold:-Adobe-Times-Bold-R-Normal--\n\ + Times-BoldItalic:-Adobe-Times-Bold-I-Normal--\n\ + Times-Italic:-Adobe-Times-Medium-I-Normal--\n\ + Times-Roman:-Adobe-Times-Medium-R-Normal--\n\ + ZapfChancery-MediumItalic:-Adobe-ITC Zapf Chancery-Medium-I-Normal--"}, + {"symbolFonts", "SymbolFonts", XtRString, sizeof(String), + XtOffsetOf(gx_device_X, symbolFonts), + XtRString, "Symbol: -Adobe-Symbol-Medium-R-Normal--"}, {"useBackingPixmap", "UseBackingPixmap", XtRBoolean, sizeof(Boolean), XtOffsetOf(gx_device_X, useBackingPixmap), *************** *** 66,69 **** --- 111,117 ---- XtOffsetOf(gx_device_X, useXFonts), XtRImmediate, (XtPointer)True}, + {"useScalableFonts", "UseScalableFonts", XtRBoolean, sizeof(Boolean), + XtOffsetOf(gx_device_X, useScalableFonts), + XtRImmediate, (XtPointer)True}, {"useXPutImage", "UseXPutImage", XtRBoolean, sizeof(Boolean), XtOffsetOf(gx_device_X, useXPutImage), *************** *** 90,95 **** /* Forward references */ ! void gdev_x_clear_window(P1(gx_device_X *)); ! void gdev_x_setup_colors(P1(gx_device_X *)); /* Open the X device */ --- 138,143 ---- /* Forward references */ ! private void gdev_x_setup_colors(P1(gx_device_X *)); ! private void gdev_x_setup_fontmap(P1(gx_device_X *)); /* Open the X device */ *************** *** 265,268 **** --- 313,317 ---- gdev_x_setup_colors(xdev); + gdev_x_setup_fontmap(xdev); if (!xdev->ghostview) { *************** *** 298,303 **** xdev->y_pixels_per_inch = xdev->yResolution; } ! xdev->width = xsize*xdev->x_pixels_per_inch; ! xdev->height = ysize*xdev->y_pixels_per_inch; } --- 347,356 ---- xdev->y_pixels_per_inch = xdev->yResolution; } ! if (xdev->width > WidthOfScreen(xdev->scr)) { ! xdev->width = xsize*xdev->x_pixels_per_inch; ! } ! if (xdev->height > HeightOfScreen(xdev->scr)) { ! xdev->height = ysize*xdev->y_pixels_per_inch; ! } } *************** *** 486,490 **** /* Setup color mapping. */ ! void gdev_x_setup_colors(gx_device_X *xdev) { --- 539,543 ---- /* Setup color mapping. */ ! private void gdev_x_setup_colors(gx_device_X *xdev) { *************** *** 727,730 **** --- 780,915 ---- eprintf1("gs: Unknown palette: %s\n", xdev->palette); exit(1); + } + } + + /* Setup X11 font mapping. */ + private char * + get_ps_name(char **cpp, int *len) + { + char *ret; + *len = 0; + /* skip over whitespace and newlines */ + while (**cpp == ' ' || **cpp == '\t' || **cpp == '\n') { + (*cpp)++; + } + /* return font name up to ":", whitespace, or end of string */ + if (**cpp == ':' || **cpp == '\0') { + return NULL; + } + ret = *cpp; + while (**cpp != ':' && + **cpp != ' ' && **cpp != '\t' && **cpp != '\n' && + **cpp != '\0') { + (*cpp)++; + (*len)++; + } + return ret; + } + + private char * + get_x11_name(char **cpp, int *len) + { + char *ret; + int dashes = 0; + *len = 0; + /* skip over whitespace and the colon */ + while (**cpp == ' ' || **cpp == '\t' || + **cpp == ':') { + (*cpp)++; + } + /* return font name up to end of line or string */ + if (**cpp == '\0' || **cpp == '\n') { + return NULL; + } + ret = *cpp; + while (dashes != 7 && + **cpp != '\0' && **cpp != '\n') { + if (**cpp == '-') dashes++; + (*cpp)++; + (*len)++; + } + while (**cpp != '\0' && **cpp != '\n') { + (*cpp)++; + } + if (dashes != 7) return NULL; + return ret; + } + + private void + gdev_x_setup_fontmap(gx_device_X *xdev) + { + char *ps_name; + char *x11_name; + int ps_name_len; + int x11_name_len; + x11fontmap *font; + char *cp; + + if (!xdev->useXFonts) return; /* If no external fonts, don't bother */ + + cp = xdev->regularFonts; + while (ps_name = get_ps_name(&cp, &ps_name_len)) { + if (x11_name = get_x11_name(&cp, &x11_name_len)) { + font = (x11fontmap *)gs_malloc(sizeof(x11fontmap), 1, + "gdev_x_setup_fontmap"); + font->ps_name = (char *)gs_malloc(sizeof(char), ps_name_len+1, + "gdev_x_setup_fontmap"); + strncpy(font->ps_name, ps_name, ps_name_len); + font->ps_name[ps_name_len] = '\0'; + font->x11_name = (char *)gs_malloc(sizeof(char), x11_name_len, + "gdev_x_setup_fontmap"); + strncpy(font->x11_name, x11_name, x11_name_len-1); + font->x11_name[x11_name_len-1] = '\0'; + font->std_names = NULL; + font->iso_names = NULL; + font->std_count = -1; + font->iso_count = -1; + font->next = xdev->regular_fonts; + xdev->regular_fonts = font; + } + } + + cp = xdev->symbolFonts; + while (ps_name = get_ps_name(&cp, &ps_name_len)) { + if (x11_name = get_x11_name(&cp, &x11_name_len)) { + font = (x11fontmap *)gs_malloc(sizeof(x11fontmap), 1, + "gdev_x_setup_fontmap"); + font->ps_name = (char *)gs_malloc(sizeof(char), ps_name_len+1, + "gdev_x_setup_fontmap"); + strncpy(font->ps_name, ps_name, ps_name_len); + font->ps_name[ps_name_len] = '\0'; + font->x11_name = (char *)gs_malloc(sizeof(char), x11_name_len, + "gdev_x_setup_fontmap"); + strncpy(font->x11_name, x11_name, x11_name_len-1); + font->x11_name[x11_name_len-1] = '\0'; + font->std_names = NULL; + font->iso_names = NULL; + font->std_count = -1; + font->iso_count = -1; + font->next = xdev->symbol_fonts; + xdev->symbol_fonts = font; + } + } + + cp = xdev->dingbatFonts; + while (ps_name = get_ps_name(&cp, &ps_name_len)) { + if (x11_name = get_x11_name(&cp, &x11_name_len)) { + font = (x11fontmap *)gs_malloc(sizeof(x11fontmap), 1, + "gdev_x_setup_fontmap"); + font->ps_name = (char *)gs_malloc(sizeof(char), ps_name_len+1, + "gdev_x_setup_fontmap"); + strncpy(font->ps_name, ps_name, ps_name_len); + font->ps_name[ps_name_len] = '\0'; + font->x11_name = (char *)gs_malloc(sizeof(char), x11_name_len, + "gdev_x_setup_fontmap"); + strncpy(font->x11_name, x11_name, x11_name_len-1); + font->x11_name[x11_name_len-1] = '\0'; + font->std_names = NULL; + font->iso_names = NULL; + font->std_count = -1; + font->iso_count = -1; + font->next = xdev->dingbat_fonts; + xdev->dingbat_fonts = font; + } } } diff -rNC2 gs26/gdevxxf.c gs261/gdevxxf.c *** gs26/gdevxxf.c Sun May 9 12:55:10 1993 --- gs261/gdevxxf.c Fri May 28 08:12:46 1993 *************** *** 1,4 **** /* Copyright (C) 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- *************** *** 63,136 **** XFontStruct *font; int encoding_index; }; - typedef struct { - const char *ps_name; - const char *x11_name; - char **stdnames; - char **isonames; - int stdcount, isocount; - } - fontencoding; - - private fontencoding regular_fonts[] = - { - {"Courier", - "-Adobe-Courier-Medium-R-Normal--", - NULL, NULL, -1, -1}, - {"Courier-Oblique", - "-Adobe-Courier-Medium-O-Normal--", - NULL, NULL, -1, -1}, - {"Courier-Bold", - "-Adobe-Courier-Bold-R-Normal--", - NULL, NULL, -1, -1}, - {"Courier-BoldOblique", - "-Adobe-Courier-Bold-O-Normal--", - NULL, NULL, -1, -1}, - {"Helvetica", - "-Adobe-Helvetica-Medium-R-Normal--", - NULL, NULL, -1, -1}, - {"Helvetica-Oblique", - "-Adobe-Helvetica-Medium-O-Normal--", - NULL, NULL, -1, -1}, - {"Helvetica-Bold", - "-Adobe-Helvetica-Bold-R-Normal--", - NULL, NULL, -1, -1}, - {"Helvetica-BoldOblique", - "-Adobe-Helvetica-Bold-O-Normal--", - NULL, NULL, -1, -1}, - {"NewCenturySchlbk-Roman", - "-Adobe-New Century Schoolbook-Medium-R-Normal--", - NULL, NULL, -1, -1}, - {"NewCenturySchlbk-Italic", - "-Adobe-New Century Schoolbook-Medium-I-Normal--", - NULL, NULL, -1, -1}, - {"NewCenturySchlbk-Bold", - "-Adobe-New Century Schoolbook-Bold-R-Normal--", - NULL, NULL, -1, -1}, - {"NewCenturySchlbk-BoldItalic", - "-Adobe-New Century Schoolbook-Bold-I-Normal--", - NULL, NULL, -1, -1}, - {"Times-Roman", - "-Adobe-Times-Medium-R-Normal--", - NULL, NULL, -1, -1}, - {"Times-Italic", - "-Adobe-Times-Medium-I-Normal--", - NULL, NULL, -1, -1}, - {"Times-Bold", - "-Adobe-Times-Bold-R-Normal--", - NULL, NULL, -1, -1}, - {"Times-BoldItalic", - "-Adobe-Times-Bold-I-Normal--", - NULL, NULL, -1, -1} - }; - - private fontencoding symbol_fonts[] = - { - {"Symbol", - "-Adobe-Symbol-Medium-R-Normal--", - NULL, NULL, -1, -1} - }; - /* Look up a font. */ private gx_xfont * --- 62,69 ---- XFontStruct *font; int encoding_index; + int My; + int angle; }; /* Look up a font. */ private gx_xfont * *************** *** 141,185 **** gx_device_X *xdev = (gx_device_X *) dev; x_xfont *xxf; ! float height; ! char x11template[100]; char *x11fontname; - const char *psfontname; XFontStruct *x11font; ! int i, j; ! float diff, d; int size; if (!xdev->useXFonts) return NULL; ! /* Only handle simple cases for now. */ ! if (pmat->xy != 0 || pmat->yx != 0 || pmat->xx <= 0 || pmat->yy >= 0 || ! fabs(pmat->yy + pmat->xx) > 0.00002) return NULL; ! height = pmat->yy * -1000; ! if (encoding_index < 2) { int tried_other_encoding = 0; ! for (i = 0; i < countof(regular_fonts); i++) { ! if (len == strlen(regular_fonts[i].ps_name) && ! strncmp(regular_fonts[i].ps_name, (char *)fname, len) == 0) ! break; } ! if (i == countof(regular_fonts)) ! return NULL; ! psfontname = regular_fonts[i].ps_name; while (True) { if (encoding_index == 0) { ! if (regular_fonts[i].stdcount == -1) { ! sprintf(x11template, "%s%s", regular_fonts[i].x11_name, ! "*-*-*-*-*-*-Adobe-fontspecific"); ! regular_fonts[i].stdnames = ! XListFonts(xdev->dpy, x11template, 32, ! ®ular_fonts[i].stdcount); } ! if (regular_fonts[i].stdcount) { diff = 999.9; ! for (j = 0; j < regular_fonts[i].stdcount; j++) { ! char *szp = regular_fonts[i].stdnames[j] + ! strlen(regular_fonts[i].x11_name); size = 0; --- 74,132 ---- gx_device_X *xdev = (gx_device_X *) dev; x_xfont *xxf; ! char x11template[256]; char *x11fontname; XFontStruct *x11font; ! x11fontmap *fmp; ! int i; ! double diff, d; ! double height; int size; + int xwidth, xheight, angle; + Boolean My; + Boolean scalable_font; if (!xdev->useXFonts) return NULL; ! ! if (pmat->xy == 0 && pmat->yx == 0) { ! xwidth = fabs(pmat->xx * 1000) + 0.5; ! xheight = fabs(pmat->yy * 1000) + 0.5; ! height = fabs(pmat->yy * 1000); ! if (pmat->xx > 0) angle = 0; ! else angle = 180; ! My = pmat->xx > 0 && pmat->yy > 0 || pmat->xx < 0 && pmat->yy < 0; ! } else if (pmat->xx == 0 && pmat->yy == 0) { ! xwidth = fabs(pmat->xy * 1000) + 0.5; ! xheight = fabs(pmat->yx * 1000) + 0.5; ! height = fabs(pmat->yx * 1000); ! if (pmat->yx < 0) angle = 90; ! else angle = 270; ! My = pmat->yx > 0 && pmat->xy < 0 || pmat->yx < 0 && pmat->xy > 0; ! } else { return NULL; + } ! if (encoding_index == 0 || encoding_index == 1) { int tried_other_encoding = 0; ! fmp = xdev->regular_fonts; ! while (fmp) { ! if (len == strlen(fmp->ps_name) && ! strncmp(fmp->ps_name, (char *)fname, len) == 0) break; ! fmp = fmp->next; } ! if (fmp == NULL) return NULL; while (True) { if (encoding_index == 0) { ! scalable_font = False; ! if (fmp->std_count == -1) { ! sprintf(x11template, "%s%s", fmp->x11_name, ! "-*-*-*-*-*-*-Adobe-fontspecific"); ! fmp->std_names = XListFonts(xdev->dpy, x11template, 32, ! &fmp->std_count); } ! if (fmp->std_count) { diff = 999.9; ! for (i = 0; i < fmp->std_count; i++) { ! char *szp = fmp->std_names[i] + strlen(fmp->x11_name)+1; size = 0; *************** *** 186,196 **** while (*szp >= '0' && *szp <= '9') size = size * 10 + *szp++ - '0'; ! if (size == 0) continue; d = fabs(height - size) / height; if (d < diff) { ! x11fontname = regular_fonts[i].stdnames[j]; diff = d; } } if (diff*100 <= xdev->xFontTolerance) break; } --- 133,155 ---- while (*szp >= '0' && *szp <= '9') size = size * 10 + *szp++ - '0'; ! if (size == 0) { ! scalable_font = True; ! continue; ! } d = fabs(height - size) / height; if (d < diff) { ! x11fontname = fmp->std_names[i]; diff = d; } } + if (xdev->useScalableFonts && scalable_font) { + d = fabs(height - xheight) / height; + if (d < diff) { + sprintf(x11template, "%s-%d%s", fmp->x11_name, + xheight, "-0-0-0-*-0-Adobe-fontspecific"); + x11fontname = x11template; + diff = 0; /* Always use scalable font if closer */ + } + } if (diff*100 <= xdev->xFontTolerance) break; } *************** *** 199,214 **** tried_other_encoding = 1; } else if (encoding_index == 1) { ! if (regular_fonts[i].isocount == -1) { ! sprintf(x11template, "%s%s", regular_fonts[i].x11_name, ! "*-*-*-*-*-*-ISO8859-1"); ! regular_fonts[i].isonames = ! XListFonts(xdev->dpy, x11template, 32, ! ®ular_fonts[i].isocount); } ! if (regular_fonts[i].isocount) { diff = 999.9; ! for (j = 0; j < regular_fonts[i].isocount; j++) { ! char *szp = regular_fonts[i].isonames[j] + ! strlen(regular_fonts[i].x11_name); size = 0; --- 158,172 ---- tried_other_encoding = 1; } else if (encoding_index == 1) { ! scalable_font = False; ! if (fmp->iso_count == -1) { ! sprintf(x11template, "%s%s", fmp->x11_name, ! "-*-*-*-*-*-*-ISO8859-1"); ! fmp->iso_names = XListFonts(xdev->dpy, x11template, 32, ! &fmp->iso_count); } ! if (fmp->iso_count) { diff = 999.9; ! for (i = 0; i < fmp->iso_count; i++) { ! char *szp = fmp->iso_names[i] + strlen(fmp->x11_name)+1; size = 0; *************** *** 215,225 **** while (*szp >= '0' && *szp <= '9') size = size * 10 + *szp++ - '0'; ! if (size == 0) continue; d = fabs(height - size) / height; if (d < diff) { ! x11fontname = regular_fonts[i].isonames[j]; diff = d; } } if (diff*100 <= xdev->xFontTolerance) break; } --- 173,195 ---- while (*szp >= '0' && *szp <= '9') size = size * 10 + *szp++ - '0'; ! if (size == 0) { ! scalable_font = True; ! continue; ! } d = fabs(height - size) / height; if (d < diff) { ! x11fontname = fmp->iso_names[i]; diff = d; } } + if (xdev->useScalableFonts && scalable_font) { + d = fabs(height - xheight) / height; + if (d < diff) { + sprintf(x11template, "%s-%d%s", fmp->x11_name, + xheight, "-0-0-0-*-0-ISO8859-1"); + x11fontname = x11template; + diff = 0; /* Always use scalable font if closer */ + } + } if (diff*100 <= xdev->xFontTolerance) break; } *************** *** 229,253 **** } } ! } else if (encoding_index == 2) { ! for (i = 0; i < countof(symbol_fonts); i++) { ! if (len == strlen(symbol_fonts[i].ps_name) && ! strncmp(symbol_fonts[i].ps_name, (char *)fname, len) == 0) break; } ! if (i == countof(symbol_fonts)) ! return NULL; ! psfontname = symbol_fonts[i].ps_name; ! if (symbol_fonts[i].stdcount == -1) { ! sprintf(x11template, "%s%s", symbol_fonts[i].x11_name, ! "*-*-*-*-*-*-Adobe-fontspecific"); ! symbol_fonts[i].stdnames = ! XListFonts(xdev->dpy, x11template, 32, ! &symbol_fonts[i].stdcount); } ! if (symbol_fonts[i].stdcount) { diff = 999.9; ! for (j = 0; j < symbol_fonts[i].stdcount; j++) { ! char *szp = symbol_fonts[i].stdnames[j] + ! strlen(symbol_fonts[i].x11_name); size = 0; --- 199,223 ---- } } ! } else if (encoding_index == 2 || encoding_index == 3) { ! scalable_font = False; ! if (encoding_index == 2) fmp = xdev->symbol_fonts; ! if (encoding_index == 3) fmp = xdev->dingbat_fonts; ! while (fmp) { ! if (len == strlen(fmp->ps_name) && ! strncmp(fmp->ps_name, (char *)fname, len) == 0) break; + fmp = fmp->next; } ! if (fmp == NULL) return NULL; ! if (fmp->std_count == -1) { ! sprintf(x11template, "%s%s", fmp->x11_name, ! "-*-*-*-*-*-*-Adobe-fontspecific"); ! fmp->std_names = XListFonts(xdev->dpy, x11template, 32, ! &fmp->std_count); } ! if (fmp->std_count) { diff = 999.9; ! for (i = 0; i < fmp->std_count; i++) { ! char *szp = fmp->std_names[i] + strlen(fmp->x11_name)+1; size = 0; *************** *** 254,264 **** while (*szp >= '0' && *szp <= '9') size = size * 10 + *szp++ - '0'; ! if (size == 0) continue; d = fabs(height - size) / height; if (d < diff) { ! x11fontname = symbol_fonts[i].stdnames[j]; diff = d; } } if (diff*100 > xdev->xFontTolerance) return NULL; } else { --- 224,246 ---- while (*szp >= '0' && *szp <= '9') size = size * 10 + *szp++ - '0'; ! if (size == 0) { ! scalable_font = True; ! continue; ! } d = fabs(height - size) / height; if (d < diff) { ! x11fontname = fmp->std_names[i]; diff = d; } } + if (xdev->useScalableFonts && scalable_font) { + d = fabs(height - xheight) / height; + if (d < diff) { + sprintf(x11template, "%s-%d%s", fmp->x11_name, xheight, + "-0-0-0-*-0-Adobe-fontspecific"); + x11fontname = x11template; + diff = 0; /* Always use scalable font if closer */ + } + } if (diff*100 > xdev->xFontTolerance) return NULL; } else { *************** *** 269,272 **** --- 251,264 ---- } + if (xwidth != xheight || angle != 0 || My) { + if (!xdev->useScalableFonts || !scalable_font) return NULL; + sprintf(x11template, "%s%s+%d-%d+%d%s", + fmp->x11_name, My ? "+My" : "", + angle*64 , xheight, xwidth, + encoding_index == 1 ? "-0-0-0-*-0-ISO8859-1" : + "-0-0-0-*-0-Adobe-fontspecific"); + x11fontname = x11template; + } + x11font = XLoadQueryFont(xdev->dpy, x11fontname); if (x11font == NULL) *************** *** 284,290 **** xxf->font = x11font; xxf->encoding_index = encoding_index; if (xdev->logXFonts) { fprintf(stdout, "Using %s\n", x11fontname); ! fprintf(stdout, " for %s at %g pixels.\n", psfontname, height); } return (gx_xfont *) xxf; --- 276,285 ---- xxf->font = x11font; xxf->encoding_index = encoding_index; + xxf->My = My ? -1 : 1; + xxf->angle = angle; if (xdev->logXFonts) { fprintf(stdout, "Using %s\n", x11fontname); ! fprintf(stdout, " for %s at %g pixels.\n", fmp->ps_name, height); ! fflush(stdout); } return (gx_xfont *) xxf; *************** *** 307,310 **** --- 302,306 ---- else return gx_no_xglyph; + if (chr == 0) return gx_no_xglyph; } if (chr < xxf->font->min_char_or_byte2 || *************** *** 332,337 **** return gs_error_undefined; if (xxf->font->per_char == NULL) { ! pwidth->x = xxf->font->max_bounds.width; ! pwidth->y = 0; pbbox->p.x = xxf->font->max_bounds.lbearing; pbbox->q.x = xxf->font->max_bounds.rbearing; --- 328,344 ---- return gs_error_undefined; if (xxf->font->per_char == NULL) { ! if (xxf->angle == 0) { ! pwidth->x = xxf->font->max_bounds.width; ! pwidth->y = 0; ! } else if (xxf->angle == 90) { ! pwidth->x = 0; ! pwidth->y = -xxf->My * xxf->font->max_bounds.width; ! } else if (xxf->angle == 180) { ! pwidth->x = -xxf->font->max_bounds.width; ! pwidth->y = 0; ! } else if (xxf->angle == 270) { ! pwidth->x = 0; ! pwidth->y = xxf->My * xxf->font->max_bounds.width; ! } pbbox->p.x = xxf->font->max_bounds.lbearing; pbbox->q.x = xxf->font->max_bounds.rbearing; *************** *** 341,346 **** int i = xg - xxf->font->min_char_or_byte2; ! pwidth->x = xxf->font->per_char[i].width; ! pwidth->y = 0; pbbox->p.x = xxf->font->per_char[i].lbearing; pbbox->q.x = xxf->font->per_char[i].rbearing; --- 348,364 ---- int i = xg - xxf->font->min_char_or_byte2; ! if (xxf->angle == 0) { ! pwidth->x = xxf->font->per_char[i].width; ! pwidth->y = 0; ! } else if (xxf->angle == 90) { ! pwidth->x = 0; ! pwidth->y = -xxf->My * xxf->font->per_char[i].width; ! } else if (xxf->angle == 180) { ! pwidth->x = -xxf->font->per_char[i].width; ! pwidth->y = 0; ! } else if (xxf->angle == 270) { ! pwidth->x = 0; ! pwidth->y = xxf->My * xxf->font->per_char[i].width; ! } pbbox->p.x = xxf->font->per_char[i].lbearing; pbbox->q.x = xxf->font->per_char[i].rbearing; *************** *** 403,407 **** if (bits == 0) return gs_error_limitcheck; xpm = XCreatePixmap(xdev->dpy, xdev->win, w, h, 1); ! fgc = XCreateGC(xdev->dpy, xpm, NULL, 0); XSetForeground(xdev->dpy, fgc, 0); XFillRectangle(xdev->dpy, xpm, fgc, 0, 0, w, h); --- 421,425 ---- if (bits == 0) return gs_error_limitcheck; xpm = XCreatePixmap(xdev->dpy, xdev->win, w, h, 1); ! fgc = XCreateGC(xdev->dpy, xpm, None, NULL); XSetForeground(xdev->dpy, fgc, 0); XFillRectangle(xdev->dpy, xpm, fgc, 0, 0, w, h); diff -rNC2 gs26/genarch.c gs261/genarch.c *** gs26/genarch.c Fri Apr 23 18:03:38 1993 --- gs261/genarch.c Wed May 12 18:17:56 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/genconf.c gs261/genconf.c *** gs26/genconf.c --- gs261/genconf.c Thu May 20 07:50:38 1993 *************** *** 0 **** --- 1,284 ---- + /* Copyright (C) 1993 Aladdin Enterprises. All rights reserved. + + This file is part of Ghostscript. + + Ghostscript is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY. No author or distributor accepts responsibility + to anyone for the consequences of using it or for whether it serves any + particular purpose or works at all, unless he says so in writing. Refer + to the Ghostscript General Public License for full details. + + Everyone is granted permission to copy, modify and redistribute + Ghostscript, but only under the conditions described in the Ghostscript + General Public License. A copy of this license is supposed to have been + given to you along with Ghostscript so you can know your rights and + responsibilities. It should be in a file named COPYING. Among other + things, the copyright notice and this notice must be preserved on all + copies. */ + + /* genconf.c */ + /* Generate configuration files for Ghostscript */ + #include + #include + #include /* for calloc */ + #include + + /* + * This program generates a set of configuration files for Ghostscript. + * Everything it does could be done by a shell program, except that + * (1) Unix shells are not compatible from one system to another, + * (2) the DOS shell is not equal to the task, + * (3) the VMS shell is radically different from all others. + * + * Usage: + * genconf [@]xxx.dev* [-f gconfigf.h] [-h gconfig.h] + * [-l lib.tr] [-o obj.tr] [-u ld.tr] [-w objw.tr] + */ + + /* This program has to use K&R C, so it will work with old compilers. */ + #undef const + #define const /* */ + #define P1(a1) /* */ + #define P2(a1,a2) /* */ + #define P3(a1,a2,a3) /* */ + /* Unfortunately, we have to hack up the function definitions by hand. */ + + /* Structures for accumulating information */ + typedef struct string_list_s { + int max_count, count; + char **strings; + } string_list; + typedef struct config_s { + string_list resources; + string_list devs; + string_list fonts; + string_list libs; + string_list objs; + } config; + static const config init_config = { + { 200 }, { 100 }, { 200 }, { 100 }, { 200 } + }; + + /* Forward definitions */ + int alloc_list(P1(string_list *)); + int read_dev(P2(config *, const char *)); + int read_token(P3(char *, int, FILE *)); + int add_entry(P3(config *, char *, const char *)); + void sort_uniq(P1(string_list *)); + void write_list(P3(FILE *, const string_list *, const char *)); + + main(argc, argv) int argc; char *argv[]; + { config conf; + int i; + + /* Allocate string lists. */ + conf = init_config; + alloc_list(&conf.resources); + alloc_list(&conf.devs); + alloc_list(&conf.fonts); + alloc_list(&conf.libs); + alloc_list(&conf.objs); + + /* Process command line arguments. */ + for ( i = 1; i < argc; i++ ) + { const char *arg = argv[i]; + FILE *out; + if ( *arg != '-' ) + { read_dev(&conf, arg); + continue; + } + if ( i == argc - 1 ) + { fprintf(stderr, "Missing file name after %s.\n", + arg); + exit(1); + } + out = fopen(argv[++i], "w"); + if ( out == 0 ) + { fprintf(stderr, "Can't open %s for output.\n", + argv[i]); + exit(1); + } + switch ( arg[1] ) + { + case 'f': + fputs("/* This file was generated automatically by Ghostscript (genconf.c). */\n", out); + write_list(out, &conf.fonts, + "font_(\"0.font_%s\",gsf_%s,zf_%s)\n"); + break; + case 'h': + fputs("/* This file was generated automatically by Ghostscript (genconf.c). */\n", out); + fputs("#include \"gsconfig.h\"\n", out); + write_list(out, &conf.devs, "device__(gs_%s_device)\n"); + sort_uniq(&conf.resources); + write_list(out, &conf.resources, "%s\n"); + break; + case 'l': + write_list(out, &conf.libs, "%s+\n"); + break; + case 'o': + sort_uniq(&conf.objs); + write_list(out, &conf.objs, "%s+\n"); + break; + case 'u': + sort_uniq(&conf.objs); + write_list(out, &conf.objs, "%s \\\n"); + write_list(out, &conf.libs, "-l%s \\\n"); + break; + case 'w': + sort_uniq(&conf.objs); + write_list(out, &conf.objs, "FILE %s\n"); + break; + default: + fclose(out); + fprintf(stderr, "Unknown switch %s.\n", arg); + exit(1); + } + fclose(out); + } + + exit(0); + } + + /* Allocate and initialize a string list. */ + int + alloc_list(list) string_list *list; + { list->count = 0; + list->strings = + (char **)calloc(list->max_count, sizeof(char *)); + return 0; + } + + /* Read and parse a .dev file. */ + int + read_dev(pconf, arg) config *pconf; const char *arg; + { FILE *in; + #define max_token 32 + char token[max_token]; + int len; + if ( arg[0] == '@' ) + { in = fopen(arg + 1, "r"); + if ( in == 0 ) + { fprintf(stderr, "Can't read %s.\n", arg + 1); + exit(1); + } + while ( (len = read_token(token, max_token, in)) > 0 ) + read_dev(pconf, token); + } + else + { char category[max_token]; + in = fopen(arg, "r"); + if ( in == 0 ) + { fprintf(stderr, "Can't read %s.\n", arg); + exit(1); + } + strcpy(category, "obj"); + while ( (len = read_token(token, max_token, in)) > 0 ) + add_entry(pconf, category, token); + } + #undef max_token + fclose(in); + if ( len < 0 ) + { fprintf(stderr, "Token too long: %s.\n", token); + exit(1); + } + return 0; + } + + /* Read a token from a file. */ + int + read_token(token, max_len, in) char *token; int max_len; FILE *in; + { int len = 0; + for ( ; ; ) + { char ch = fgetc(in); + token[len] = 0; + if ( feof(in) ) + return len; + if ( isspace(ch) ) + { if ( len > 0 ) + return len; + continue; + } + if ( len == max_len ) + return -1; /* token too long */ + token[len++] = ch; + } + } + + /* Add an entry to a configuration. */ + int + add_entry(pconf, category, item) config *pconf; char *category; const char *item; + { if ( item[0] == '-' ) /* set category */ + strcpy(category, item + 1); + else /* add to current category */ + { char str[80]; + const char *pat = "%s"; + char *rstr; + string_list *list = &pconf->resources; + /* Handle a few resources specially: */ + if ( !strcmp(category, "dev") ) + list = &pconf->devs; + else if ( !strcmp(category, "font") ) + list = &pconf->fonts; + else if ( !strcmp(category, "include") ) + { strcpy(str, item); + strcat(str, ".dev"); + read_dev(pconf, str); + return 0; + } + else if ( !strcmp(category, "lib") ) + list = &pconf->libs; + else if ( !strcmp(category, "obj") ) + list = &pconf->objs; + /* Now handle all other resources. */ + else if ( !strcmp(category, "fdev") ) + pat = "file_device__(gs_fdev_%s)"; + else if ( !strcmp(category, "oper") ) + pat = "oper__(%s_op_defs)"; + else if ( !strcmp(category, "oper2") ) + pat = "oper2__(%s_op_defs)"; + else if ( !strcmp(category, "ps") ) + pat = "psfile__(\"%s.ps\")"; + else + { fprintf(stderr, "Unknown category %s.\n", category); + exit(1); + } + sprintf(str, pat, item); + rstr = malloc(strlen(str) + 1); + strcpy(rstr, str); + list->strings[list->count++] = rstr; + } + return 0; + } + + /* Sort and uniq an array of strings. */ + int + strcmp_ptr(ps1, ps2) const void *ps1; const void *ps2; + { return strcmp(*(const char **)ps1, *(const char **)ps2); + } + void + sort_uniq(list) string_list *list; + { char **strlist = list->strings; + int count = list->count; + char **from; + char **to; + int i; + if ( count == 0 ) + return; + qsort((char *)strlist, count, sizeof(char *), strcmp_ptr); + for ( from = to = strlist + 1, i = 1; i < count; from++, i++ ) + if ( strcmp(*from, to[-1]) ) + *to++ = *from; + list->count = to - strlist; + } + + /* Write a list of strings using a template. */ + void + write_list(out, list, template) FILE *out; const string_list *list; const char *template; + { int i; + for ( i = 0; i < list->count; i++ ) + { const char *str = list->strings[i]; + /* The repetition of str is a hack to make the */ + /* fonts template work. */ + fprintf(out, template, str, str, str); + } + } diff -rNC2 gs26/ghost.h gs261/ghost.h *** gs26/ghost.h Sat Aug 8 08:23:12 1992 --- gs261/ghost.h Wed May 12 18:18:02 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1992 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/gp.h gs261/gp.h *** gs26/gp.h Sat May 1 18:45:50 1993 --- gs261/gp.h Wed May 12 18:18:04 1993 *************** *** 1,4 **** /* Copyright (C) 1991, 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/gp_dosfb.c gs261/gp_dosfb.c *** gs26/gp_dosfb.c Mon Apr 12 04:56:58 1993 --- gs261/gp_dosfb.c Wed May 12 18:18:10 1993 *************** *** 1,4 **** /* Copyright (C) 1992 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/gp_itbc.c gs261/gp_itbc.c *** gs26/gp_itbc.c Sat May 1 18:46:00 1993 --- gs261/gp_itbc.c Wed May 12 18:18:16 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1992 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/gp_iwatc.c gs261/gp_iwatc.c *** gs26/gp_iwatc.c Sat May 1 18:46:08 1993 --- gs261/gp_iwatc.c Wed May 12 18:18:18 1993 *************** *** 1,4 **** /* Copyright (C) 1991, 1992 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/gp_msdos.c gs261/gp_msdos.c *** gs26/gp_msdos.c Wed Apr 7 04:19:42 1993 --- gs261/gp_msdos.c Wed May 12 18:18:22 1993 *************** *** 1,4 **** /* Copyright (C) 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/gp_mswin.c gs261/gp_mswin.c *** gs26/gp_mswin.c Sat May 1 19:00:08 1993 --- gs261/gp_mswin.c Wed May 12 18:18:26 1993 *************** *** 1,4 **** /* Copyright (C) 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/gp_mswin.h gs261/gp_mswin.h *** gs26/gp_mswin.h Sat May 1 19:00:38 1993 --- gs261/gp_mswin.h Wed May 12 18:18:30 1993 *************** *** 1,4 **** /* Copyright (C) 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/gp_nofb.c gs261/gp_nofb.c *** gs26/gp_nofb.c Sat May 1 18:43:16 1993 --- gs261/gp_nofb.c Wed May 12 18:18:44 1993 *************** *** 1,4 **** /* Copyright (C) 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/gp_sysv.c gs261/gp_sysv.c *** gs26/gp_sysv.c Sat Sep 19 10:38:22 1992 --- gs261/gp_sysv.c Wed May 12 18:18:46 1993 *************** *** 1,4 **** /* Copyright (C) 1992 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/gp_unix.c gs261/gp_unix.c *** gs26/gp_unix.c Thu May 6 19:42:48 1993 --- gs261/gp_unix.c Wed May 12 18:18:48 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/gp_vms.c gs261/gp_vms.c *** gs26/gp_vms.c Sat May 1 18:37:24 1993 --- gs261/gp_vms.c Mon May 17 09:09:36 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1992 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- *************** *** 26,29 **** --- 25,36 ---- #define MAX_VMS_FILENAME_LEN 255 + /* Apparently gcc doesn't allow extra arguments for fopen: */ + #ifdef VMS /* DEC C */ + # define fopen_VMS fopen + #else /* gcc */ + # define fopen_VMS(name, mode, m1, m2) fopen(name, mode) + #endif + + /* VMS string descriptor structure */ #define DSC$K_DTYPE_T 14 *************** *** 139,147 **** * normal stream-LF file does the trick. */ ! return fopen(fname, "w", "rfm = udf", "ctx = stm"); } else { /* Open as a normal text stream file. */ ! return fopen(fname, "w", "rfm = var", "rat = cr"); } } --- 146,154 ---- * normal stream-LF file does the trick. */ ! return fopen_VMS(fname, "w", "rfm = udf", "ctx = stm"); } else { /* Open as a normal text stream file. */ ! return fopen_VMS(fname, "w", "rfm = var", "rat = cr"); } } *************** *** 203,208 **** str_desc.dsc$w_length = len; ! str_desc.dsc$a_pointer = fname; ! SYS$FILESCAN (&str_desc, &zero, &flags); if ( flags.fscn$v_directory || flags.fscn$v_root || flags.fscn$v_device || flags.fscn$v_node) return 1; --- 210,215 ---- str_desc.dsc$w_length = len; ! str_desc.dsc$a_pointer = (char *)fname; ! SYS$FILESCAN (&str_desc, &zero, &flags); if ( flags.fscn$v_directory || flags.fscn$v_root || flags.fscn$v_device || flags.fscn$v_node) return 1; diff -rNC2 gs26/gpcheck.h gs261/gpcheck.h *** gs26/gpcheck.h Wed May 5 19:43:26 1993 --- gs261/gpcheck.h Wed May 12 18:18:06 1993 *************** *** 1,4 **** /* Copyright (C) 1992 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/gs.1 gs261/gs.1 *** gs26/gs.1 --- gs261/gs.1 Wed May 19 05:41:20 1993 *************** *** 0 **** --- 1,337 ---- + .\"- -*- nroff -*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - + .\" + .\"This file describes version 2.6 of Ghostscript. + .\" + .\"- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + .de TQ + .br + .ns + .TP \\$1 + .. + .TH GS 1 "10 May 1993" + .SH NAME + gs \- Ghostscript version 2.6 interpreter/previewer + .SH SYNOPSIS + .B gs + [ + .I options + ] [ + .I files + ] ... + .br + .SH DESCRIPTION + Ghostscript is a programming language similar to Adobe Systems' + PostScript (tm) language, which is in turn similar to Forth. + .I Gs + reads + .I files + in sequence and executes them as Ghostscript programs. + After doing this, it reads further input from the standard input stream + (normally the keyboard). Each line is interpreted separately. + To exit from the interpreter, enter the `quit' command. + The interpreter also exits gracefully if it encounters end-of-file. + Typing the interrupt character (e.g. Control-C) is also safe. + .PP + The interpreter recognizes several switches described below, which may appear + anywhere in the command line and apply to all files thereafter. + .PP + You can get a help message by invoking Ghostscript with the + .B \-h + or + .B \-? + option. This message also lists the available devices. + .PP + Ghostscript may be built with multiple output devices. Ghostscript + normally opens the first one and directs output to it. To use device xyz + as the initial output device, include the switch + .nf + \-sDEVICE=xyz + .fi + in the command line. Note that this switch must precede the first .ps + file, and only its first invocation has any effect. For example, for + printer output in a normal configuration that includes an Epson printer + driver, you might use the shell command + .nf + gs \-sDEVICE=epson myfile.ps + .fi + instead of just + .nf + gs myfile.ps + .fi + Alternatively, you can type + .nf + (epson) selectdevice + (myfile.ps) run + .fi + All output then goes to the printer instead of the display until further + notice. You can switch devices at any time by using the selectdevice + procedure, e.g., + .nf + (vga) selectdevice + .fi + or + .nf + (epson) selectdevice + .fi + As yet a third alternative, you can define an environment variable + GS_DEVICE as the desired default device name. The order of precedence for + these alternatives, highest to lowest, is: + .nf + selectdevice + (command line) + GS_DEVICE + (first device in build list) + .fi + .PP + To select the density on a printer, use + .nf + gs \-sDEVICE= \-rx + .fi + For example, on a 9-pin Epson-compatible printer, you can get the + lowest-density (fastest) mode with + .nf + gs \-sDEVICE=epson \-r60x72 + .fi + and the highest-density mode with + .nf + gs \-sDEVICE=epson \-r240x72. + .fi + .PP + If you select a printer as the output device, Ghostscript also allows you + to control where the device sends its output. Normally, output goes + directly to a scratch file on Unix systems. + To send the output to a series of files foo1.xyz, + foo2.xyz, ..., use the switch + .nf + \-sOutputFile=foo%d.xyz + .fi + The %d is a printf format specification; you can use + other formats like %02d. Each file will receive one page of output. + Alternatively, to send the output to a single file foo.xyz, with all + the pages concatenated, use the switch + .nf + \-sOutputFile=foo.xyz + .fi + .PP + On Unix systems, you can send the output directly to a pipe. For + example, to pipe the output to the command `lpr' (which, on many Unix + systems, is the command that spools output for a printer), use the + switch + .nf + \-sOutputFile=\|lpr + .fi + You can also send output to stdout for piping with the switch + .nf + \-sOutputFile=\- + .fi + In this case you must also use the \-q switch, to prevent Ghostscript from + writing messages to stdout. + .PP + To find out what devices are available, type + .nf + devicenames == + .fi + after starting up Ghostscript. + Alternatively, you can use the \-h or \-? switch in the command line; + the help message also lists the available devices. + .PP + When looking for the initialization files (gs_*.ps), the files related + to fonts, or the file for the `run' operator, Ghostscript first tries + opening the file with the name as given (i.e., using the current + working directory if none is specified). If this fails, and the file + name doesn't specify an explicit directory or drive (i.e., doesn't + begin with `/' on Unix systems), Ghostscript will try directories in the + following order: + .TP + 1. + The directory/ies specified by the \-I switch(es) in the command + line (see below), if any; + .TP + 2. + The directory/ies specified by the GS_LIB environment variable, + if any; + .TP + 3. + The directory/ies specified by the GS_LIB_DEFAULT macro in the + Ghostscript makefile (which has been set to + "/usr/local/lib/ghostscript:/usr/local/lib/ghostscript/fonts"). + .PP + Each of these (GS_LIB_DEFAULT, GS_LIB, and \-I parameter) may be either + a single directory, or a list of directories separated by a `:'. + .SH X RESOURCES + Ghostscript looks for the following resources under the program name + `Ghostscript': + .TP + .B borderWidth + The border width in pixels (default = 1). + .TP + .B borderColor + The name of the border color (default = black). + .TP + .B geometry + The window size and placement, WxH+X+Y (default is NULL). + .TP + .B xResolution + The number of x pixels per inch (default is computed from WidthOfScreen + and WidthMMOfScreen). + .TP + .B yResolution + The number of y pixels per inch (default is computed from + HeightOfScreen and HeightMMOfScreen). + .TP + .B useBackingPixmap + Determines whether backing store is to be used for saving display window + (default = true). + .PP + See the file `use.doc' for a more complete list of resources. + .PP + To set these resources, put them in a file (such as ~/.Xresources) in the + following form: + .sp + .nf + Ghostscript*geometry: 612x792\-0+0 + Ghostscript*xResolution: 72 + Ghostscript*yResolution: 72 + .fi + .PP + Then load the defaults into the X server: + .sp + .nf + % xrdb \-merge ~/.Xresources + .fi + .SH OPTIONS + .TP + .BI \-\- " filename arg1 ..." + Takes the next argument as a file name as usual, but takes all + remaining arguments (even if they have the syntactic form of switches) + and defines the name ARGUMENTS in userdict (not systemdict) as an + array of those strings, + .I before + running the file. When Ghostscript + finishes executing the file, it exits back to the shell. + .TP + .BI \-D name = token + .TQ + .BI \-d name = token + Define a name in systemdict with the given definition. The token must + be exactly one token (as defined by the `token' operator) and must not + contain any whitespace. + .TP + .BI \-D name + .TQ + .BI \-d name + Define a name in systemdict with value=null. + .TP + .BI \-S name = string + .TQ + .BI \-s name = string + Define a name in systemdict with a given string as value. This is + different from \-d. For example, \-dname=35 is equivalent to the + program fragment + .br + /name 35 def + .br + whereas + \-s name=35 is equivalent to + .br + /name (35) def + .TP + .B \-q + Quiet startup \- suppress normal startup messages, and also do the + equivalent of \-dQUIET. + .TP + .BI \-g number1 x number2 + Equivalent to + .BI \-dDEVICEWIDTH= number1 + and + .BI \-dDEVICEHEIGHT= number2 . + This is for the benefit of devices (such as X11 windows) + that require (or allow) width and height to be specified. + .TP + .BI \-r number + .TQ + .BI \-r number1 x number2 + Equivalent to + .BI \-dDEVICEXRESOLUTION= number1 + and + .BI \-dDEVICEYRESOLUTION= number2 . + This is for the benefit of devices (such as printers) + that support multiple X and Y resolutions. + (If only one number is given, it is used for both X and Y resolutions.) + .TP + .BI \-I directories + Adds the designated list of directories at the head of the + search path for library files. + .TP + .B \- + This is not really a switch. It indicates to Ghostscript that the + standard input is coming from a file or a pipe. Ghostscript reads + from stdin until reaching end-of-file, executing it like any other + file, and then continues processing the command line. At the end of + the command line, Ghostscript exits rather than going into its + interactive mode. + .PP + Note that gs_init.ps makes systemdict read-only, so the values of names + defined with \-D/d/S/s cannot be changed (although, of course, they can be + superseded by definitions in userdict or other dictionaries.) + .SH "SPECIAL NAMES" + .TP + .B \-dDISKFONTS + Causes individual character outlines to be loaded from the disk + the first time they are encountered. (Normally Ghostscript loads all the + character outlines when it loads a font.) This may allow loading more + fonts into RAM, at the expense of slower rendering. + .TP + .B \-dNOCACHE + Disables character caching. Only useful for debugging. + .TP + .B \-dNOBIND + Disables the `bind' operator. Only useful for debugging. + .TP + .B \-dNODISPLAY + Suppresses the normal initialization of the output device. + This may be useful when debugging. + .TP + .B \-dNOPAUSE + Disables the prompt and pause at the end of each page. + This may be desirable for applications where another program is + `driving' Ghostscript. + .TP + .B \-dNOPLATFONTS + Disables the use of fonts supplied by the underlying platform + (e.g. X Windows). This may be needed if the platform + fonts look undesirably different from the scalable fonts. + .TP + .B \-dSAFER + Disables the deletefile and renamefile operators, and the + ability to open files in any mode other than read-only. This may be + desirable for spoolers or other sensitive environments. + .TP + .B \-dWRITESYSTEMDICT + Leaves systemdict writable. This is necessary when running + special utility programs such as font2c and pcharstr, which must bypass + normal PostScript access protection. + .TP + .BI \-sDEVICE= device + Selects an alternate initial output device, as described above. + .TP + .BI \-sOutputFile= filename + Selects an alternate output file (or pipe) for the initial output + device, as described above. + .SH FILES + .TP + .B /usr/local/lib/ghostscript/* + Startup-files, utilities, and basic font definitions. + .TP + .B /usr/local/lib/ghostscript/fonts/* + Additional font definitions. + .TP + .B /usr/local/lib/ghostscript/examples/* + Demo Ghostscript files. + .TP + .B /usr/local/lib/doc/ghostscript/doc/* + Assorted document files. + .SH "SEE ALSO" + The various Ghostscript document files (above). + .SH BUGS + See the network news group `gnu.ghostscript.bug'. diff -rNC2 gs26/gs.c gs261/gs.c *** gs26/gs.c Fri Apr 30 04:47:40 1993 --- gs261/gs.c Mon May 24 03:17:30 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- *************** *** 35,38 **** --- 34,38 ---- #include "gxdevice.h" #include "gxdevmem.h" + #include "stream.h" #include "alloc.h" #include "errors.h" *************** *** 42,46 **** #include "ostack.h" #include "store.h" - #include "stream.h" #include "files.h" /* requires stream.h */ --- 42,45 ---- *************** *** 77,85 **** private const char *gs_help1 = "\ Usage: gs [switches] [file1.ps file2.ps ...]\n\ - or : gs [switches] [file1.ps ...] -- filen.ps arg1 arg2 ...\n\ - The latter passes arg1 ... to the program in filen.ps.\n\ Available devices:"; private const char *gs_help2a = "\n\ ! Switches: (you can use # in place of =)\n\ @ treat file like part of the command line\n\ (to get around DOS command line limit)\n\ --- 76,82 ---- private const char *gs_help1 = "\ Usage: gs [switches] [file1.ps file2.ps ...]\n\ Available devices:"; private const char *gs_help2a = "\n\ ! Most frequently used switches: (you can use # in place of =)\n\ @ treat file like part of the command line\n\ (to get around DOS command line limit)\n\ *************** *** 96,100 **** - means stdout, use |command to pipe\n\ `-' alone as a file name means read from stdin non-interactively.\n\ ! For more information, please read the use.doc file.\n"; /* Forward references */ --- 93,97 ---- - means stdout, use |command to pipe\n\ `-' alone as a file name means read from stdin non-interactively.\n\ ! For more complete information, please read the use.doc file.\n"; /* Forward references */ *************** *** 227,231 **** gs_log_errors = 2; break; case 'f': /* run file of arbitrary name */ ! argproc(arg); break; case 'h': /* print help */ case '?': /* ditto */ --- 224,230 ---- gs_log_errors = 2; break; case 'f': /* run file of arbitrary name */ ! if ( *arg != 0 ) ! argproc(arg); ! break; case 'h': /* print help */ case '?': /* ditto */ diff -rNC2 gs26/gs.h gs261/gs.h *** gs26/gs.h Sat Apr 3 01:32:00 1993 --- gs261/gs.h Wed May 12 18:18:56 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1990 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/gs.mak gs261/gs.mak *** gs26/gs.mak Wed May 5 17:57:58 1993 --- gs261/gs.mak Thu May 27 12:09:26 1993 *************** *** 1,4 **** # Copyright (C) 1989, 1992, 1993 Aladdin Enterprises. All rights reserved. - # Distributed by Free Software Foundation, Inc. # # This file is part of Ghostscript. --- 1,3 ---- *************** *** 73,78 **** # If a particular platform requires other utility programs # to be built, AK must include them too. - # UNIQ - null on systems that provide the uniq utility, - # uniq$(XE) on systems where we have to provide our own. # SHP - the prefix for invoking a shell script in the current directory # (null for MS-DOS, $(SH) ./ for Unix). --- 72,75 ---- *************** *** 81,92 **** # SH - the shell for scripts (null on MS-DOS, sh on Unix). # The platform-specific makefiles must also include rules for creating ! # ansi2knr$(XE) and genarch$(XE) from the corresponding .c files, ! # and for making arch.h by executing genarch$(XE). (This ! # shouldn't really be necessary, but Turbo C and Unix C treat the -o # switch slightly differently (Turbo C requires no following space, # Unix C requires a following space), and I haven't found a way to capture ! # the difference in a macro; also, Unix requires ./ because . may not be ! # in the search path, whereas MS-DOS always looks in the current ! # directory first.) all default: $(GS)$(XE) --- 78,86 ---- # SH - the shell for scripts (null on MS-DOS, sh on Unix). # The platform-specific makefiles must also include rules for creating ! # ansi2knr$(XE), genarch$(XE), and genconf$(XE) from the corresponding ! # .c files -- this is needed because Turbo C and Unix C treat the -o # switch slightly differently (Turbo C requires no following space, # Unix C requires a following space), and I haven't found a way to capture ! # the difference in a macro. all default: $(GS)$(XE) *************** *** 97,104 **** clean mostlyclean: rm -f *.$(OBJ) *.a core gmon.out ! rm -f *.dev *.d_* arch.h gconfig*.h obj*.tr lib*.tr rm -f t _temp_* _temp_*.* *.map *.sym ! rm -f ansi2knr$(XE) echogs$(XE) genarch$(XE) ! rm -f uniq$(XE) $(GS)$(XE) $(BEGINFILES) # A rule to do a quick and dirty compilation attempt when first installing --- 91,98 ---- clean mostlyclean: rm -f *.$(OBJ) *.a core gmon.out ! rm -f *.dev *.d_* arch.h gconfig*.h o*.tr l*.tr rm -f t _temp_* _temp_*.* *.map *.sym ! rm -f ansi2knr$(XE) echogs$(XE) genarch$(XE) genconf$(XE) ! rm -f $(GS)$(XE) $(BEGINFILES) # A rule to do a quick and dirty compilation attempt when first installing *************** *** 205,211 **** gxfont_h=gxfont.h $(gsfont_h) $(gsuid_h) gxfrac_h=gxfrac.h - # gxcolor and gxfmap are out of order because they include gxfrac. - gxcolor_h=gxcolor.h $(gxfrac_h) $(gsuid_h) - gxfmap_h=gxfmap.h $(gxfrac_h) gximage_h=gximage.h $(gscspace_h) $(gsimage_h) gxlum_h=gxlum.h --- 199,202 ---- *************** *** 216,219 **** --- 207,213 ---- gxtype1_h=gxtype1.h $(gscrypt1_h) $(gstype1_h) gxxfont_h=gxxfont.h $(gsccode_h) $(gsmatrix_h) $(gsuid_h) $(gsxfont_h) + # gxcolor and gxfmap are out of order because they include other files. + gxcolor_h=gxcolor.h $(gxfrac_h) $(gsuid_h) + gxfmap_h=gxfmap.h $(gxfrac_h) $(gxrefct_h) gzcolor_h=gzcolor.h $(gscolor_h) $(gxfmap_h) $(gxlum_h) *************** *** 300,304 **** gscoord.$(OBJ): gscoord.c $(GXERR) \ ! $(gxarith_h) $(gxfixed_h) $(gxmatrix_h) $(gzdevice_h) $(gzstate_h) $(gscoord_h) gsdevice.$(OBJ): gsdevice.c $(GXERR) \ --- 294,299 ---- gscoord.$(OBJ): gscoord.c $(GXERR) \ ! $(gsccode_h) $(gxarith_h) $(gxfixed_h) $(gxfont_h) $(gxmatrix_h) \ ! $(gzdevice_h) $(gzstate_h) $(gscoord_h) gsdevice.$(OBJ): gsdevice.c $(GXERR) \ *************** *** 353,357 **** gsstate.$(OBJ): gsstate.c $(GXERR) \ ! $(gscie_h) $(gscspace_h) $(gxcolor_h) $(gxrefct_h) \ $(gzstate_h) $(gzcolor_h) $(gzdevice_h) $(gzht_h) $(gzline_h) $(gzpath_h) --- 348,352 ---- gsstate.$(OBJ): gsstate.c $(GXERR) \ ! $(gscie_h) $(gscolor2_h) $(gscspace_h) $(gxcolor_h) $(gxrefct_h) \ $(gzstate_h) $(gzcolor_h) $(gzdevice_h) $(gzht_h) $(gzline_h) $(gzpath_h) *************** *** 379,383 **** ###### Files dependent on the installed devices, features, and platform. ! # Generating gconfig.h also generates obj*.tr and lib.tr. # gconfig.h shouldn't have to depend on ALL_DEVS, but that would --- 374,378 ---- ###### Files dependent on the installed devices, features, and platform. ! # Generating gconfig.h also generates o*.tr and l*.tr. # gconfig.h shouldn't have to depend on ALL_DEVS, but that would *************** *** 390,406 **** $(DEVICE_DEVS6) $(DEVICE_DEVS7) $(DEVICE_DEVS8) $(DEVICE_DEVS9) ! gconfig.h obj.tr objw.tr lib.tr: \ ! devs.mak $(MAKEFILE) echogs$(XE) $(UNIQ) $(ALL_DEVS) ! $(SHP)gsconfig $(DEVICE_DEVS) + ! $(SHP)gsconfig + $(DEVICE_DEVS1) + ! $(SHP)gsconfig + $(DEVICE_DEVS2) + ! $(SHP)gsconfig + $(DEVICE_DEVS3) + ! $(SHP)gsconfig + $(DEVICE_DEVS4) + ! $(SHP)gsconfig + $(DEVICE_DEVS5) + ! $(SHP)gsconfig + $(DEVICE_DEVS6) + ! $(SHP)gsconfig + $(DEVICE_DEVS7) + ! $(SHP)gsconfig + $(DEVICE_DEVS8) + ! $(SHP)gsconfig + $(DEVICE_DEVS9) + ! $(SHP)gsconfig + $(FEATURE_DEVS) $(PLATFORM).dev $(EXP)echogs -a gconfig.h -x 23 define GS_LIB_DEFAULT -x 2022 $(GS_LIB_DEFAULT) -x 22 $(EXP)echogs -a gconfig.h -x 23 define GS_INIT -x 2022 $(GS_INIT) -x 22 --- 385,403 ---- $(DEVICE_DEVS6) $(DEVICE_DEVS7) $(DEVICE_DEVS8) $(DEVICE_DEVS9) ! gconfig.h obj.tr objw.tr ld.tr lib.tr: \ ! devs.mak $(MAKEFILE) echogs$(XE) genconf$(XE) $(ALL_DEVS) ! $(EXP)echogs -w t.cfg - $(FEATURE_DEVS) $(PLATFORM).dev ! $(EXP)echogs -a t.cfg - $(DEVICE_DEVS) ! $(EXP)echogs -a t.cfg - $(DEVICE_DEVS1) ! $(EXP)echogs -a t.cfg - $(DEVICE_DEVS2) ! $(EXP)echogs -a t.cfg - $(DEVICE_DEVS3) ! $(EXP)echogs -a t.cfg - $(DEVICE_DEVS4) ! $(EXP)echogs -a t.cfg - $(DEVICE_DEVS5) ! $(EXP)echogs -a t.cfg - $(DEVICE_DEVS6) ! $(EXP)echogs -a t.cfg - $(DEVICE_DEVS7) ! $(EXP)echogs -a t.cfg - $(DEVICE_DEVS8) ! $(EXP)echogs -a t.cfg - $(DEVICE_DEVS9) ! $(EXP)genconf @t.cfg -h gconfig.h -l lib.tr -o obj.tr -u ld.tr -w objw.tr ! rm t.cfg $(EXP)echogs -a gconfig.h -x 23 define GS_LIB_DEFAULT -x 2022 $(GS_LIB_DEFAULT) -x 22 $(EXP)echogs -a gconfig.h -x 23 define GS_INIT -x 2022 $(GS_INIT) -x 22 *************** *** 480,484 **** iccfont.$(OBJ): iccfont.c $(GH) gconfigf.h \ ! $(ghost_h) $(alloc_h) $(ccfont_h) $(dict_h) $(dstack_h) $(errors_h) $(iutil_h) $(iname_h) $(oper_h) $(save_h) $(store_h) idebug.$(OBJ): idebug.c $(GH) \ --- 477,482 ---- iccfont.$(OBJ): iccfont.c $(GH) gconfigf.h \ ! $(ghost_h) $(alloc_h) $(ccfont_h) $(dict_h) $(dstack_h) $(errors_h) \ ! $(font_h) $(iutil_h) $(iname_h) $(oper_h) $(save_h) $(store_h) idebug.$(OBJ): idebug.c $(GH) \ *************** *** 647,651 **** zchar2.$(OBJ): zchar2.c $(OP) $(gschar_h) $(gsmatrix_h) $(gxfixed_h) $(gxfont_h) \ ! $(alloc_h) $(estack_h) $(font_h) $(state_h) $(store_h) $(stream_h) $(bnum_h) zdps1.$(OBJ): zdps1.c $(OP) $(gsmatrix_h) $(gspath_h) $(gsstate_h) \ --- 645,649 ---- zchar2.$(OBJ): zchar2.c $(OP) $(gschar_h) $(gsmatrix_h) $(gxfixed_h) $(gxfont_h) \ ! $(alloc_h) $(estack_h) $(font_h) $(iname_h) $(state_h) $(store_h) $(stream_h) $(bnum_h) zdps1.$(OBJ): zdps1.c $(OP) $(gsmatrix_h) $(gspath_h) $(gsstate_h) \ *************** *** 713,717 **** zcie.$(OBJ): zcie.c $(OP) \ ! $(gscspace_h) $(gscolor2_h) $(gscie_h) $(gxrefct_h) \ $(alloc_h) $(dict_h) $(dparam_h) $(estack_h) $(save_h) $(state_h) $(store_h) --- 711,715 ---- zcie.$(OBJ): zcie.c $(OP) \ ! $(gscspace_h) $(gscolor2_h) $(gscie_h) $(gxcolor_h) $(gxrefct_h) \ $(alloc_h) $(dict_h) $(dparam_h) $(estack_h) $(save_h) $(state_h) $(store_h) *************** *** 728,732 **** zimage2.$(OBJ): zimage2.c $(OP) \ ! $(gscolor_h) $(gscolor2_h) $(gscspace_h) $(gsmatrix_h) \ $(dict_h) $(dparam_h) $(ilevel_h) $(state_h) --- 726,730 ---- zimage2.$(OBJ): zimage2.c $(OP) \ ! $(gscolor_h) $(gscolor2_h) $(gscspace_h) $(gsmatrix_h) $(gxcolor_h) \ $(dict_h) $(dparam_h) $(ilevel_h) $(state_h) *************** *** 779,790 **** # Because of intrinsic limitations in `make', we have to list # the object file names and the font names separately. ! ccfonts_=uglyr.$(OBJ) ccfonts1=uglyr ! ccfonts.dev: $(ccfonts_) iccfont.$(OBJ) ! $(SHP)gssetmod ccfonts $(ccfonts_) iccfont.$(OBJ) $(SHP)gsaddmod ccfonts -oper ccfonts ! gconfigf.h: $(MAKEFILE) $(SHP)gssetmod ccfonts_ $(SHP)gsaddmod ccfonts_ -font $(ccfonts1) --- 777,794 ---- # Because of intrinsic limitations in `make', we have to list # the object file names and the font names separately. ! ccfonts1_=uglyr.$(OBJ) ccfonts1=uglyr ! ccfonts.dev: $(MAKEFILE) gs.mak iccfont.$(OBJ) \ ! $(ccfonts1_) $(ccfonts2_) $(ccfonts3_) $(ccfonts4_) $(ccfonts5_) ! $(SHP)gssetmod ccfonts iccfont.$(OBJ) ! $(SHP)gsaddmod ccfonts -obj $(ccfonts1_) ! $(SHP)gsaddmod ccfonts -obj $(ccfonts2_) ! $(SHP)gsaddmod ccfonts -obj $(ccfonts3_) ! $(SHP)gsaddmod ccfonts -obj $(ccfonts4_) ! $(SHP)gsaddmod ccfonts -obj $(ccfonts5_) $(SHP)gsaddmod ccfonts -oper ccfonts ! gconfigf.h: $(MAKEFILE) gs.mak genconf$(XE) $(SHP)gssetmod ccfonts_ $(SHP)gsaddmod ccfonts_ -font $(ccfonts1) *************** *** 793,798 **** $(SHP)gsaddmod ccfonts_ -font $(ccfonts4) $(SHP)gsaddmod ccfonts_ -font $(ccfonts5) ! rm -f gconfigf.h ! mv ccfonts_.d_f gconfigf.h uglyr.$(OBJ): uglyr.c $(CCFONT) --- 797,801 ---- $(SHP)gsaddmod ccfonts_ -font $(ccfonts4) $(SHP)gsaddmod ccfonts_ -font $(ccfonts5) ! $(EXP)genconf ccfonts_.dev -f gconfigf.h uglyr.$(OBJ): uglyr.c $(CCFONT) diff -rNC2 gs26/gs_2asc.ps gs261/gs_2asc.ps *** gs26/gs_2asc.ps Wed May 5 11:31:06 1993 --- gs261/gs_2asc.ps *************** *** 1,382 **** - % Copyright (C) 1991, 1992, 1993 Aladdin Enterprises. All rights reserved. - % Distributed by Free Software Foundation, Inc. - % - % This file is part of Ghostscript. - % - % Ghostscript is distributed in the hope that it will be useful, but - % WITHOUT ANY WARRANTY. No author or distributor accepts responsibility - % to anyone for the consequences of using it or for whether it serves any - % particular purpose or works at all, unless he says so in writing. Refer - % to the Ghostscript General Public License for full details. - % - % Everyone is granted permission to copy, modify and redistribute - % Ghostscript, but only under the conditions described in the Ghostscript - % General Public License. A copy of this license is supposed to have been - % given to you along with Ghostscript so you can know your rights and - % responsibilities. It should be in a file named COPYING. Among other - % things, the copyright notice and this notice must be preserved on all - % copies. - - % Extract the ASCII text from a PostScript file. Nothing is displayed. - % Instead, ASCII information is written to stdout. If SIMPLE is defined, - % just the text is written, with a guess at line breaks and word spacing. - % If SIMPLE is not defined, lines are written to stdout as follows: - % - % F () - % indicate font height and width of a space - % - % S () - % display a string - % - % P - % end of page - % - % is an integer expressed in tenths of a point - % is an integer in tenths of a point. - % and are integer coordinates, in tenths of a point, with origin - % at lower left. - % and are strings represented with the standard - % PostScript escape conventions. - % The idea is similar to Glenn Reid's `distillery', only a lot more - % simple-minded, and less robust. - - % Note that this code will only work in all cases if systemdict is writable - % and if `binding' the definitions of operators defined as procedures - % is deferred. For this reason, it is normally invoked with - % gs -q -dNODISPLAY -dNOBIND -dWRITESYSTEMDICT gs_2asc.ps - - % Thanks to J Greely for improvements - % to this code. - - /QUIET true def - systemdict wcheck { systemdict } { userdict } ifelse begin - /SIMPLE dup where { pop true } { false } ifelse def - - % Disable the display operators. - - /eofill { newpath } odef - /erasepage { } odef - /fill { newpath } odef - /stroke { newpath } odef - - % The image operators must read the input, but do nothing. - - /colorimage { gsave nulldevice //colorimage grestore } odef - /image { gsave nulldevice //image grestore } odef - /imagemask { gsave nulldevice //imagemask grestore } odef - - % Redefine the end-of-page operators. - - /copypage { SIMPLE { (\014) } { (P\n) } ifelse //print } odef - /showpage { copypage erasepage initgraphics } odef - - % Redefine `show'. - - % Set things up so our output will be in tenths of a point, with origin at - % lower left. This isolates us from the peculiarities of individual devices. - - /.show.ident.matrix matrix def - /.show.ident - { gsave initmatrix - % Assume the original transformation is well-behaved. - 0.1 0 dtransform abs exch abs max /.show.scale exch def - 0.1 dup scale .show.ident.matrix currentmatrix - grestore - } def - /.coord - { transform .show.ident itransform - exch round cvi exch round cvi - } odef - /.dcoord - { % Transforming distances is trickier, because - % the coordinate system might be rotated. - .show.ident pop - exch 0 dtransform dup mul exch dup mul add sqrt .show.scale div - exch 0 exch dtransform dup mul exch dup mul add sqrt .show.scale div - exch round cvi exch round cvi - } odef - - % Define a way to store and retrieve integers that survives save/restore. - /.i.string ( ) def - /.iget { cvi } bind def - /.iput { exch //.i.string exch copy cvs pop } bind def - /.inew { //.i.string length string dup 3 -1 roll .iput } bind def - /.show.x 0 .inew def - /.show.y 0 .inew def - /.show.height 1000 .inew def - % Remember whether the last string ended in a letter and a hyphen. - % (If so, we didn't output the hyphen.) - /.show.hyphen (\000) def - - % Make sure writing will work even if a program uses =string. - /.show.string =string length string def - /.show.=string =string length string def - /.show==only - { //=string //.show.=string copy pop - dup type /stringtype eq - { dup length //.show.string length le - { dup rcheck { //.show.string copy } if - } if - } if - //.stdout exch write==only - //.show.=string //=string copy pop - } odef - - /.showfont - %(following comments are from J Greely) - %old code - This didn't work right for me with all fonts. - % - % { 0 currentfont /FontBBox get dup 3 get exch 1 get sub - % currentfont /FontMatrix get dtransform dtransform - % exch abs exch abs max round - % (F ) //print //.stdout exch write==only (\n) //print - % } odef - % - %unfortunately, my way bombs on one of my test files in - %--%show_continue--(?!). It's from dvi2ps, which molests - %the fonts in some way. --jgreely - { gsave - % If we can't get the height and width of the font from - % the FontBBox, we just measure some characters. - currentfont /FontBBox known - { currentfont /FontBBox get } { {0 0 0 0} } - ifelse - aload pop exch 4 -1 roll sub 3 1 roll exch sub - 2 copy max 0 ne - { currentfont /FontMatrix get dtransform - } - { % Unfortunately, charpath is broken in some versions, - % so we use stringwidth and fudge. - (X) stringwidth pop dup 1.3 mul - } - ifelse .dcoord exch - currentfont /FontName known - { currentfont /FontName get } { () } - ifelse - dup type /nametype eq { //.show.string cvs } if - grestore - % Stack: height width fontname - SIMPLE - { pop pop //.show.height exch .iput } - { (F ) //print 3 - { 2 index .show==only ( ) //print 3 -1 roll } repeat - pop pop pop (\n) //print - } - ifelse - } odef - - % Define the letters -- characters which, if they occur followed by a - % hyphen at the end of a line, cause the hyphen and line break - % to be ignored. - /.letter.chars 100 dict def - mark - 65 1 90 { dup 32 add } for - counttomark { StandardEncoding exch get .letter.chars exch dup put } repeat - pop - - % Define a set of characters which, if they occur at the start of a line, - % are taken as indicating a paragraph break. - /.break.chars 50 dict def - mark - /bullet /dagger /daggerdbl /periodcentered /section - counttomark { .break.chars exch dup put } repeat - pop - - % Define character translation to ASCII. - % We have to do this for the entire character set. - /.char.map 500 dict def - /.chars.def { counttomark 2 idiv { .char.map 3 1 roll put } repeat pop } def - % Encode the printable ASCII characters. - mark 32 1 126 - { 1 string dup 0 4 -1 roll put - dup 0 get StandardEncoding exch get exch - } - for .chars.def - % Encode accents. - mark - /acute (') /caron (^) /cedilla (,) /circumflex (^) - /dieresis (") /grave (`) /ring (*) /tilde (~) - .chars.def - % Encode the ISO accented characters. - mark 192 1 255 - { ISOLatin1Encoding exch get =string cvs - dup 0 1 getinterval 1 index dup length 1 sub 1 exch getinterval - .char.map 2 index known .char.map 2 index known and - { .char.map 3 -1 roll get .char.map 3 -1 roll get concatstrings - .char.map 3 1 roll put - } - { pop pop pop - } - ifelse - } - for .chars.def - % Encode the remaining standard and ISO alphabetic characters. - mark - /AE (AE) /Eth (DH) /OE (OE) /Thorn (Th) - /ae (ae) /eth (dh) - /ffi (ffi) /ffl (ffl) /fi (fi) /fl (fl) - /germandbls (ss) /oe (oe) /thorn (th) - .chars.def - % Encode the other standard and ISO characters. - mark - /brokenbar (|) /bullet (*) /copyright ((C)) /currency (#) - /dagger (#) /daggerdbl (##) /degree (o) /divide (/) /dotaccent (.) - /dotlessi (i) - /ellipsis (...) /emdash (--) /endash (-) /exclamdown (!) - /florin (f) /fraction (/) - /guillemotleft (<<) /guillemotright (>>) - /guilsingleft (<) /guilsingright (>) /hungarumlaut ("") /logicalnot (~) - /macron (_) /minus (-) /mu (u) /multiply (*) - /ogonek (,) /onehalf (1/2) /onequarter (1/4) /onesuperior (1) - /ordfeminine (-a) /ordmasculine (-o) - /paragraph (||) /periodcentered (*) /perthousand (o/oo) /plusminus (+-) - /questiondown (?) /quotedblbase (") /quotedblleft (") /quotedblright (") - /quotesinglbase (,) /quotesingle (') /registered ((R)) - /section ($) /sterling (#) - /threequarters (3/4) /threesuperior (3) /trademark ((TM)) /twosuperior (2) - /yen (Y) - .chars.def - % Encode a few common Symbol characters. - mark - /asteriskmath (*) /copyrightsans ((C)) /copyrightserif ((C)) - /greaterequal (>=) /lessequal (<=) /registersans ((R)) /registerserif ((R)) - /trademarksans ((TM)) /trademarkserif ((TM)) - .chars.def - - % Write out a string. If it ends in a letter and a hyphen, - % don't write the hyphen, and set .show.hyphen to 1; - % otherwise, set .show.hyphen to 0. - /.show.write % - { //.show.hyphen 0 0 put - dup length 2 ge - { dup dup length 1 sub get 45 eq % hyphen - { dup dup length 2 sub get - currentfont /Encoding get exch get - //.letter.chars exch known - { % Remove the hyphen, and set .show.hyphen - dup length 1 sub 0 exch getinterval - //.show.hyphen 0 1 put - } - if - } - if - } - if - { dup currentfont /Encoding get exch get - dup //.char.map exch known - { //.char.map exch get //.stdout exch writestring pop - } - { currentfont /Encoding dup StandardEncoding eq - exch ISOLatin1Encoding eq or - { % Untranslated character in standard encoding - pop //.stdout exch write - } - { % Character in non-standard encoding, substitute - pop pop //.stdout (*) writestring - } - ifelse - } - ifelse - } - forall - } odef - /.showstring - { currentpoint .coord - 3 -1 roll dup stringwidth 1 index 0 rmoveto - .dcoord pop - % Stack: x y string width - SIMPLE - { 2 index //.show.y .iget ne - { % Try to figure out whether we have a line break - % or a paragraph break. - 2 index //.show.y .iget sub abs - //.show.height .iget 1.3 mul ge - 2 index length 0 gt - { 2 index 0 get currentfont /Encoding get exch get - .break.chars exch known { pop true } if - } - if - { (\n\n) % Paragraph - } - { ( ) % Line - } - ifelse //print - //.show.y 3 index .iput - //.show.x 4 index .iput - } - if - % If the word processor split a hyphenated word within the same line, - % put out the hyphen now. - //.show.hyphen 0 get 0 ne { (-) //print } if - 3 index //.show.x .iget 1 add gt - { ( ) //print - } - if - 4 1 roll .show.write pop add //.show.x exch .iput - } - { (S ) //print - 4 -1 roll .show==only ( ) //print - 3 -1 roll .show==only ( ) //print - exch .show==only ( ) //print - .show==only (\n) //print - } - ifelse - } odef - - /show - { .showfont .showstring - } odef - - % Redefine the other string display operators in terms of `show'. - - /.show1.string ( ) def - /.show1 { //.show1.string exch 0 exch put //.show1.string .showstring } odef - /ashow - { .showfont - { .show1 2 copy rmoveto } forall - pop pop - } odef - /awidthshow - { .showfont - { dup .show1 4 index eq { 4 index 4 index rmoveto } if - 2 copy rmoveto - } - forall - pop pop pop pop pop - } odef - /widthshow - { .showfont - //.show1.string 0 4 -1 roll put - { //.show1.string search not { exit } if - .showstring .showstring - 2 index 2 index rmoveto - } loop - .showstring pop pop - } odef - /kshow - { .showfont - { .show1 dup exec } forall pop - } odef - - % Redirect the printing operators. - - /.stdout (_temp_.out) (w) file def - /.stderr (_temp_.err) (w) file def - /print { //.stdout exch writestring } odef - - end - - % Bind the operators we just defined, and all the others if we didn't - % do it before. Also reenable 'bind' for future files. - - .bindoperators - NOBIND currentdict systemdict ne and - { systemdict begin .bindoperators end } - if - NOBIND - { /bind /.bind load def } - if - - % Make systemdict read-only if it wasn't already. - - systemdict wcheck { systemdict readonly pop } if --- 0 ---- diff -rNC2 gs26/gs_dbt_e.ps gs261/gs_dbt_e.ps *** gs26/gs_dbt_e.ps --- gs261/gs_dbt_e.ps Wed May 26 16:49:28 1993 *************** *** 0 **** --- 1,67 ---- + % Copyright (C) 1993 Aladdin Enterprises. All rights reserved. + % + % This file is part of Ghostscript. + % + % Ghostscript is distributed in the hope that it will be useful, but + % WITHOUT ANY WARRANTY. No author or distributor accepts responsibility + % to anyone for the consequences of using it or for whether it serves any + % particular purpose or works at all, unless he says so in writing. Refer + % to the Ghostscript General Public License for full details. + % + % Everyone is granted permission to copy, modify and redistribute + % Ghostscript, but only under the conditions described in the Ghostscript + % General Public License. A copy of this license is supposed to have been + % given to you along with Ghostscript so you can know your rights and + % responsibilities. It should be in a file named COPYING. Among other + % things, the copyright notice and this notice must be preserved on all + % copies. + + % Define the Dingbats encoding vector. + /DingbatsEncoding + % \000 + /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef + /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef + /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef + /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef + % \040 + /space /a1 /a2 /a202 /a3 /a4 /a5 /a119 + /a118 /a117 /a11 /a12 /a13 /a14 /a15 /a16 + /a105 /a17 /a18 /a19 /a20 /a21 /a22 /a23 + /a24 /a25 /a26 /a27 /a28 /a6 /a7 /a8 + % \100 + /a9 /a10 /a29 /a30 /a31 /a32 /a33 /a34 + /a35 /a36 /a37 /a38 /a39 /a40 /a41 /a42 + /a43 /a44 /a45 /a46 /a47 /a48 /a49 /a50 + /a51 /a52 /a53 /a54 /a55 /a56 /a57 /a58 + % \140 + /a59 /a60 /a61 /a62 /a63 /a64 /a65 /a66 + /a67 /a68 /a69 /a70 /a71 /a72 /a73 /a74 + /a203 /a75 /a204 /a76 /a77 /a78 /a79 /a81 + /a82 /a83 /a84 /a97 /a98 /a99 /a100 /.notdef + % \200 + /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef + /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef + /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef + /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef + % \240 + /.notdef /a101 /a102 /a103 /a104 /a106 /a107 /a108 + /a112 /a111 /a110 /a109 /a120 /a121 /a122 /a123 + /a124 /a125 /a126 /a127 /a128 /a129 /a130 /a131 + /a132 /a133 /a134 /a135 /a136 /a137 /a138 /a139 + % \300 + /a140 /a141 /a142 /a143 /a144 /a145 /a146 /a147 + /a148 /a149 /a150 /a151 /a152 /a153 /a154 /a155 + /a156 /a157 /a158 /a159 /a160 /a161 /a163 /a164 + /a196 /a165 /a192 /a166 /a167 /a168 /a169 /a170 + % \340 + /a171 /a172 /a173 /a162 /a174 /a175 /a176 /a177 + /a178 /a179 /a193 /a180 /a199 /a181 /a200 /a182 + /.notdef /a201 /a183 /a184 /a197 /a185 /a194 /a198 + /a186 /a195 /a187 /a188 /a189 /a190 /a191 /.notdef + 256 packedarray def + 3 DingbatsEncoding .registerencoding + + /defineresource where + { pop + /DingbatsEncoding DingbatsEncoding /Encoding defineresource pop + } if diff -rNC2 gs26/gs_dps1.ps gs261/gs_dps1.ps *** gs26/gs_dps1.ps Fri Apr 16 09:23:48 1993 --- gs261/gs_dps1.ps Fri May 21 15:03:52 1993 *************** *** 1,4 **** % Copyright (C) 1990, 1991 Aladdin Enterprises. All rights reserved. - % Distributed by Free Software Foundation, Inc. % % This file is part of Ghostscript. --- 1,3 ---- *************** *** 204,208 **** ] def /.makestackdict ! { { counttomark -1 roll } forall dicttomark } bind def /currenthalftone --- 203,207 ---- ] def /.makestackdict ! { { counttomark -1 roll } forall .dicttomark } bind def /currenthalftone diff -rNC2 gs26/gs_fonts.ps gs261/gs_fonts.ps *** gs26/gs_fonts.ps Thu May 6 06:13:54 1993 --- gs261/gs_fonts.ps Thu May 27 18:13:42 1993 *************** *** 1,4 **** % Copyright (C) 1990, 1992, 1993 Aladdin Enterprises. All rights reserved. - % Distributed by Free Software Foundation, Inc. % % This file is part of Ghostscript. --- 1,3 ---- *************** *** 89,93 **** /.buildfont1 where { pop 1 /.buildfont1x load } if /.buildfont3 where { pop 3 /.buildfont3 load } if ! dicttomark /.buildfontdict exch def /definefont { 1 dict begin count /d exch def % save stack depth in case of error --- 88,92 ---- /.buildfont1 where { pop 1 /.buildfont1x load } if /.buildfont3 where { pop 3 /.buildfont3 load } if ! .dicttomark /.buildfontdict exch def /definefont { 1 dict begin count /d exch def % save stack depth in case of error *************** *** 97,101 **** dup /ExactSize 0 put } ! if dup /FontType get //.buildfontdict exch get exec DISKFONTS --- 96,111 ---- dup /ExactSize 0 put } ! { % Hack: if the Encoding looks like it might be the ! % Symbol or Dingbats encoding, load those now (for the ! % benefit of platform font matching) just in case ! % the font didn't actually reference them. ! dup /Encoding get length 65 ge ! { dup /Encoding get 64 get ! dup /congruent eq { SymbolEncoding pop } if ! /a9 eq { DingbatsEncoding pop } if ! } ! if ! } ! ifelse dup /FontType get //.buildfontdict exch get exec DISKFONTS *************** *** 188,192 **** /seac_C % charstring -> achar bchar ..or nothing.. { dup length _Cstring length le ! { 4330 exch _Cstring type1decrypt exch pop dup dup length 2 sub 2 getinterval <0c06> eq % seac { dup length --- 198,202 ---- /seac_C % charstring -> achar bchar ..or nothing.. { dup length _Cstring length le ! { 4330 exch _Cstring .type1decrypt exch pop dup dup length 2 sub 2 getinterval <0c06> eq % seac { dup length diff -rNC2 gs26/gs_init.ps gs261/gs_init.ps *** gs26/gs_init.ps Sun May 9 12:52:40 1993 --- gs261/gs_init.ps Fri May 28 17:57:52 1993 *************** *** 1,4 **** % Copyright (C) 1989, 1992, 1993 Aladdin Enterprises. All rights reserved. - % Distributed by Free Software Foundation, Inc. % % This file is part of Ghostscript. --- 1,3 ---- *************** *** 28,32 **** % Check the interpreter revision. NOTE: the interpreter code requires % that the first non-comment token in this file be an integer. ! 260 dup revision ne { (gs: Interpreter revision \() print revision 10 string cvs print --- 27,31 ---- % Check the interpreter revision. NOTE: the interpreter code requires % that the first non-comment token in this file be an integer. ! 261 dup revision ne { (gs: Interpreter revision \() print revision 10 string cvs print *************** *** 43,47 **** % Acquire userdict. ! currentdict dup 200 setmaxlength % userdict systemdict begin /userdict exch def --- 42,46 ---- % Acquire userdict. ! currentdict dup 200 .setmaxlength % userdict systemdict begin /userdict exch def *************** *** 95,99 **** % Define a special version of def for making operator procedures. /odef ! {1 index exch makeoperator def} bind def % Define predefined procedures substituting for operators, --- 94,98 ---- % Define a special version of def for making operator procedures. /odef ! {1 index exch .makeoperator def} bind def % Define predefined procedures substituting for operators, *************** *** 140,144 **** /initmatrix {.tempmatrix defaultmatrix setmatrix} odef ! /languagelevel { 1 } def % we don't have full Level 2 /matrix {6 array identmatrix} odef /prompt {flush flushpage --- 139,143 ---- /initmatrix {.tempmatrix defaultmatrix setmatrix} odef ! /languagelevel 1 def % we don't have full Level 2 /matrix {6 array identmatrix} odef /prompt {flush flushpage *************** *** 178,181 **** --- 177,182 ---- % Define some additional built-in procedures (beyond the ones defined by % the PostScript Language Reference Manual). + % Warning: these are not guaranteed to stay the same from one Ghostscript + % release to the next! /concatstrings *************** *** 188,192 **** /copystring { dup length string copy } bind def ! /dicttomark % (the Level 2 >> operator) { counttomark 2 idiv dup dict begin { def } repeat pop currentdict end --- 189,193 ---- /copystring { dup length string copy } bind def ! /.dicttomark % (the Level 2 >> operator) { counttomark 2 idiv dup dict begin { def } repeat pop currentdict end *************** *** 195,199 **** { systemdict /devicedict get exch get } bind def /.growdict % grow a dictionary ! { dup length 3 mul 2 idiv 1 add setmaxlength } bind def /.growput % put, grow the dictionary if needed --- 196,200 ---- { systemdict /devicedict get exch get } bind def /.growdict % grow a dictionary ! { dup length 3 mul 2 idiv 1 add .setmaxlength } bind def /.growput % put, grow the dictionary if needed *************** *** 229,232 **** --- 230,234 ---- //.filterstring1 cvs length 8 add getinterval cvn load exec } odef + systemdict /.filter_LZWEncode undef % per FSF % Define procedures for getting and setting the current device resolution. *************** *** 566,570 **** 1 ISOLatin1Encoding .registerencoding ! % Define a stub for the Symbol encoding. userdict begin %% Replace 3 (gs_sym_e.ps) --- 568,572 ---- 1 ISOLatin1Encoding .registerencoding ! % Define stubs for the Symbol and Dingbats encodings. userdict begin %% Replace 3 (gs_sym_e.ps) *************** *** 572,575 **** --- 574,581 ---- { userdict begin (gs_sym_e.ps) run /SymbolEncoding load end } bind def + %% Replace 3 (gs_dbt_e.ps) + /DingbatsEncoding + { userdict begin (gs_dbt_e.ps) run /DingbatsEncoding load end + } bind def end *************** *** 692,696 **** if % Adjust the device parameters per the command line. ! getdeviceprops dicttomark begin 6 dict begin /dw HWSize 0 get def --- 698,702 ---- if % Adjust the device parameters per the command line. ! getdeviceprops .dicttomark begin 6 dict begin /dw HWSize 0 get def *************** *** 885,890 **** ( All rights reserved.\n) print product (Ghostscript) eq ! { (Distributed by Free Software Foundation, Inc.\n) print ! (Ghostscript comes with NO WARRANTY: see the file COPYING for details.\n) print } if --- 891,895 ---- ( All rights reserved.\n) print product (Ghostscript) eq ! { (Ghostscript comes with NO WARRANTY: see the file COPYING for details.\n) print } if diff -rNC2 gs26/gs_lev2.ps gs261/gs_lev2.ps *** gs26/gs_lev2.ps Sat May 1 16:29:06 1993 --- gs261/gs_lev2.ps Thu May 27 17:56:14 1993 *************** *** 1,4 **** % Copyright (C) 1990, 1991, 1992 Aladdin Enterprises. All rights reserved. - % Distributed by Free Software Foundation, Inc. % % This file is part of Ghostscript. --- 1,3 ---- *************** *** 27,52 **** (<<) cvn /mark load def ! (>>) cvn /dicttomark load odef ! /currentsystemparams { mark .currentsystemparams dicttomark } odef ! /currentuserparams { mark .currentuserparams dicttomark } odef ! /deviceinfo { currentdevice getdeviceprops dicttomark } odef /globaldict currentdict /shareddict .knownget not { 20 dict } if def - /glyphshow where {pop (%END glyphshow) .skipeof} if - % The following was contributed by a user.... - /glyphshow { - % Reencode the font, placing glyph of interest in position 0, - % then show it. - save % So can reclaim VM from reencoding - currentfont /Encoding get dup length array copy dup 0 5 -1 roll put - currentfont - dup maxlength dict copy dup /FID undef - dup /Encoding 4 -1 roll put - () exch definefont setfont - (\000) show - currentpoint 3 -1 roll % Track movement due to show across restore - restore - moveto - } odef - %END glyphshow /realtime /usertime load def --- 26,34 ---- (<<) cvn /mark load def ! (>>) cvn /.dicttomark load odef ! /currentsystemparams { mark .currentsystemparams .dicttomark } odef ! /currentuserparams { mark .currentuserparams .dicttomark } odef ! /deviceinfo { currentdevice getdeviceprops .dicttomark } odef /globaldict currentdict /shareddict .knownget not { 20 dict } if def /realtime /usertime load def *************** *** 223,227 **** 3 packedarray % template, proc, scratch { exch pop % stack contains: key, {template, proc, scratch} ! 2 copy 0 get stringmatch { 1 index type dup /stringtype eq exch /nametype eq or { 2 copy 2 get cvs --- 205,209 ---- 3 packedarray % template, proc, scratch { exch pop % stack contains: key, {template, proc, scratch} ! 2 copy 0 get .stringmatch { 1 index type dup /stringtype eq exch /nametype eq or { 2 copy 2 get cvs *************** *** 263,267 **** /Category null ! dicttomark /Category defineresource pop --- 245,249 ---- /Category null ! .dicttomark /Category defineresource pop *************** *** 345,354 **** /Encoding /Category findresource begin ! % Handle SymbolEncoding, which is loaded lazily, specially. Instances /SymbolEncoding [null 2 -1] put /.ResourceFileDict mark /SymbolEncoding (gs_sym_e.ps) ! dicttomark def end --- 327,338 ---- /Encoding /Category findresource begin ! % Handle lazily loaded encodings specially. Instances /SymbolEncoding [null 2 -1] put + Instances /DingbatsEncoding [null 2 -1] put /.ResourceFileDict mark /SymbolEncoding (gs_sym_e.ps) ! /DingbatsEncoding (gs_dbt_e.ps) ! .dicttomark def end *************** *** 356,359 **** --- 340,344 ---- /StandardEncoding StandardEncoding /Encoding defineresource pop /SymbolEncoding { /SymbolEncoding findencoding } bind def + /DingbatsEncoding { /DingbatsEncoding findencoding } bind def (%END of level2dict) .skipeof %**************** diff -rNC2 gs26/gs_statd.ps gs261/gs_statd.ps *** gs26/gs_statd.ps Wed Apr 28 03:05:08 1993 --- gs261/gs_statd.ps Wed May 12 18:22:20 1993 *************** *** 1,4 **** % Copyright (C) 1989-1993 Aladdin Enterprises. All rights reserved. - % Distributed by Free Software Foundation, Inc. % % This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/gs_sym_e.ps gs261/gs_sym_e.ps *** gs26/gs_sym_e.ps Tue Mar 16 16:02:42 1993 --- gs261/gs_sym_e.ps Wed May 12 18:22:22 1993 *************** *** 1,4 **** % Copyright (C) 1991 Aladdin Enterprises. All rights reserved. - % Distributed by Free Software Foundation, Inc. % % This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/gs_type0.ps gs261/gs_type0.ps *** gs26/gs_type0.ps Fri Apr 16 09:22:52 1993 --- gs261/gs_type0.ps Wed May 26 16:52:54 1993 *************** *** 1,4 **** % Copyright (C) 1992 Aladdin Enterprises. All rights reserved. - % Distributed by Free Software Foundation, Inc. % % This file is part of Ghostscript. --- 1,3 ---- *************** *** 24,31 **** % (cshow, rootfont, and setcachedevice2 are real operators.) ! /.encodingdict 3 dict dup /StandardEncoding /StandardEncoding cvx put dup /ISOLatin1Encoding /ISOLatin1Encoding cvx put dup /SymbolEncoding /SymbolEncoding cvx put def /findencoding --- 23,31 ---- % (cshow, rootfont, and setcachedevice2 are real operators.) ! /.encodingdict 4 dict dup /StandardEncoding /StandardEncoding cvx put dup /ISOLatin1Encoding /ISOLatin1Encoding cvx put dup /SymbolEncoding /SymbolEncoding cvx put + dup /DingbatsEncoding /DingbatsEncoding cvx put def /findencoding diff -rNC2 gs26/gsaddmod gs261/gsaddmod *** gs26/gsaddmod Sat Mar 27 16:15:02 1993 --- gs261/gsaddmod Sun May 16 01:55:00 1993 *************** *** 1,40 **** ! export m c; m=$1; c=$2 ! shift; shift ! case ${c} in ! -dev) ! for d in $*; do ! echo device__\(gs_${d}_device\) >>${m}.d_n ! done;; ! -fdev) ! for d in $*; do ! echo file_device__\(gs_fdev_${d}\) >>${m}.d_v ! done;; ! -font) ! for d in $*; do ! echo font_\(\"0.font_${d}\",gsf_${d},zf_${d}\) >>${m}.d_f ! done;; ! -include) ! for d in $*; do ! echo /bin/sh '<' ./${d}.dev >>${m}.dev ! done;; ! -lib) ! for l in $*; do ! echo ./echogs -q -l${l} -x 205c '>>' _temp_.dlb >>${m}.dev ! done;; ! -obj) ! for o in $*; do ! ./echogs -q ${o} -x 205c >>${m}.d_o ! done;; ! -oper) ! for o in $*; do ! echo oper__\(${o}_op_defs\) >>${m}.d_v ! done;; ! -oper2) ! for o in $*; do ! echo oper2__\(${o}_op_defs\) >>${m}.d_v ! done;; ! -ps) ! for f in $*; do ! echo psfile__\(\"${f}.ps\"\) >>${m}.d_v ! done;; ! esac --- 1,3 ---- ! export m; m=$1 ! shift ! echo $* >>${m}.dev diff -rNC2 gs26/gsaddmod.bat gs261/gsaddmod.bat *** gs26/gsaddmod.bat Sun Apr 4 18:39:18 1993 --- gs261/gsaddmod.bat Sun May 16 01:38:00 1993 *************** *** 1,43 **** ! @echo off ! if '%3'=='' goto done ! goto %2 ! rem ---------------- dev ---------------- ! :-dev ! echo device__(gs_%3_device)>>%1.d_n ! gsaddmod %1 %2 %4 %5 %6 %7 %8 %9 ! rem ---------------- fdev ---------------- ! :-fdev ! echo file_device__(gs_fdev_%3)>>%1.d_v ! gsaddmod %1 %2 %4 %5 %6 %7 %8 %9 ! rem ---------------- font ---------------- ! :-font ! echo font_("0.font_%3",gsf_%3,zf_%3)>>%1.d_f ! gsaddmod %1 %2 %4 %5 %6 %7 %8 %9 ! rem ---------------- include ---------------- ! :-include ! echo copy %3.dev _temp_i.bat>>%1.dev ! echo command /c _temp_i.bat>>%1.dev ! gsaddmod %1 %2 %4 %5 %6 %7 %8 %9 ! rem ---------------- lib ---------------- ! :-lib ! echogs -a %1.dev -q echo -s -q %3+ -x 3e3e _temp_.dlb ! gsaddmod %1 %2 %4 %5 %6 %7 %8 %9 ! rem ---------------- obj ---------------- ! :-obj ! for %%x in (%3 %4 %5 %6 %7 %8 %9) do echo %%x+>>%1.d_o ! for %%x in (%3 %4 %5 %6 %7 %8 %9) do echo FILE %%x>>%1.d_w ! goto done ! rem ---------------- oper ---------------- ! :-oper ! for %%x in (%3 %4 %5 %6 %7 %8 %9) do echo oper__(%%x_op_defs)>>%1.d_v ! goto done ! rem ---------------- oper2 ---------------- ! :-oper2 ! for %%x in (%3 %4 %5 %6 %7 %8 %9) do echo oper2__(%%x_op_defs)>>%1.d_v ! goto done ! rem ---------------- ps ---------------- ! :-ps ! for %%x in (%3 %4 %5 %6 %7 %8 %9) do echo psfile__("%%x.ps")>>%1.d_v ! goto done ! rem - - - - - - - - done - - - - - - - - ! :done --- 1 ---- ! @echo %2 %3 %4 %5 %6 %7 %8 %9 >>%1.dev diff -rNC2 gs26/gsccode.h gs261/gsccode.h *** gs26/gsccode.h Sun Apr 18 19:24:30 1993 --- gs261/gsccode.h Wed May 12 18:19:00 1993 *************** *** 1,4 **** /* Copyright (C) 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/gschar.c gs261/gschar.c *** gs26/gschar.c Thu May 6 06:08:38 1993 --- gs261/gschar.c Thu May 27 07:17:30 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- *************** *** 48,51 **** --- 47,51 ---- private int continue_show_update(P1(gs_show_enum *)); private int show_setup(P3(gs_show_enum *, gs_state *, const char *)); + private void show_cache_setup(P1(gs_show_enum *)); private int show_state_setup(P1(gs_show_enum *)); private int show_origin_setup(P4(gs_state *, fixed, fixed, int)); *************** *** 168,171 **** --- 168,192 ---- } + /* glyphshow */ + private gs_proc_encode_char(gs_glyphshow_encode_char); + int + gs_glyphshow_init(gs_show_enum *penum, gs_state *pgs, gs_glyph glyph) + { int code; + if ( pgs->font->FontType == ft_composite) + return_error(gs_error_invalidfont); + penum->size = 1; + penum->slow_show = 0; + code = show_setup(penum, pgs, "\000"); /* arbitrary char */ + penum->current_glyph = glyph; + penum->encode_char = gs_glyphshow_encode_char; + return code; + } + private gs_glyph + gs_glyphshow_encode_char(gs_show_enum *penum, gs_font *pfont, gs_char *pchr) + { /* We just nil out the character, and return the pre-loaded glyph. */ + *pchr = gs_no_char; + return penum->current_glyph; + } + /* cshow[_n] */ int *************** *** 207,211 **** if ( (code = gs_gsave(pgs)) < 0 ) return code; penum->level = pgs->level; /* for level check in show_update */ ! gx_device_no_output(pgs); /* Establish an arbitrary current point. */ return gx_path_add_point(pgs->path, pgs->ctm.tx_fixed, pgs->ctm.ty_fixed); --- 228,235 ---- if ( (code = gs_gsave(pgs)) < 0 ) return code; penum->level = pgs->level; /* for level check in show_update */ ! /* Set up a null device that forwards xfont requests properly. */ ! penum->dev_null = gs_null_device; ! penum->dev_null.target = pgs->device->info; ! pgs->device->info = (gx_device *)&penum->dev_null; /* Establish an arbitrary current point. */ return gx_path_add_point(pgs->path, pgs->ctm.tx_fixed, pgs->ctm.ty_fixed); *************** *** 303,306 **** --- 327,332 ---- ) return 0; /* much too big */ + if ( !penum->cache_set ) + show_cache_setup(penum); cc = gx_alloc_char_bits(dir, (gx_device_memory *)&penum->dev_cache_info, *************** *** 493,497 **** { cached_char *cc; chr = str[index]; ! glyph = (*pfont->encode_char_proc)(penum, pfont, chr); if ( glyph == gs_no_glyph ) goto no_cache; --- 519,523 ---- { cached_char *cc; chr = str[index]; ! glyph = (*penum->encode_char)(penum, pfont, &chr); if ( glyph == gs_no_glyph ) goto no_cache; *************** *** 500,509 **** { /* If possible, try for an xfont before */ /* rendering from the outline. */ - if ( pfont->data.base.encoding_index < 0 ) - goto no_cache; if ( pfont->ExactSize == fbit_use_outlines ) goto no_cache; cc = gx_lookup_xfont_char(pgs, pair, chr, - pfont->data.base.encoding_index, glyph, pfont->glyph_name_proc, wmode); if ( cc == 0 ) --- 526,532 ---- *************** *** 517,523 **** } if ( penum->slow_show ) ! { penum->wxy = cc->wxy; code = show_move(penum); ! } else code = show_fast_move(cc->wxy, pgs); --- 540,549 ---- } if ( penum->slow_show ) ! { /* Split up the assignment so that the */ ! /* Watcom compiler won't reserve esi/edi. */ ! penum->wxy.x = cc->wxy.x; ! penum->wxy.y = cc->wxy.y; code = show_move(penum); ! } else code = show_fast_move(cc->wxy, pgs); *************** *** 534,538 **** } chr = str[index]; ! glyph = (*pfont->encode_char_proc)(penum, pfont, chr); } no_cache: --- 560,564 ---- } chr = str[index]; ! glyph = (*penum->encode_char)(penum, pfont, &chr); } no_cache: *************** *** 676,709 **** code = show_state_setup(penum); if ( code < 0 ) return code; ! if ( penum->can_cache ) ! { /* Set up the memory device for the character cache. */ ! device *dev = &penum->dev_cache_dev; ! penum->dev_cache_info = mem_mono_device; ! penum->dev_cache_info.target = pgs->device->info; ! dev->info = (gx_device *)&penum->dev_cache_info; ! dev->is_band_device = 0; ! dev->white = 1; ! dev->black = 1; ! /* Decide whether to oversample. */ ! /* We have to decide this now, because */ ! /* type1addpath has to know it in advance. */ ! if ( penum->is_composite ) ! { penum->suggested_scale = 1; /* WRONG, should */ ! /* use info from eventual base font */ ! } ! else ! { gs_fixed_point extent; ! gs_distance_transform2fixed(&pgs->char_tm, ! pfont->data.base.FontBBox.q.x - ! pfont->data.base.FontBBox.p.x, ! pfont->data.base.FontBBox.q.y - ! pfont->data.base.FontBBox.p.y, ! &extent); ! penum->suggested_scale = ! (extent.x != 0 && extent.y != 0 && ! any_abs(extent.x) < int2fixed(16) && ! any_abs(extent.y) < int2fixed(16) ? 4 : 1); ! } ! } pgs->show_gstate = pgs; return 0; --- 702,706 ---- code = show_state_setup(penum); if ( code < 0 ) return code; ! penum->cache_set = 0; pgs->show_gstate = pgs; return 0; *************** *** 716,730 **** show_state_setup(gs_show_enum *penum) { gs_state *pgs = penum->pgs; ! int code; ! if ( !pgs->char_tm_valid ) ! { /* Compute combined transformation */ ! gs_make_identity(&char_tm_only(pgs)); /* make sure type */ ! /* fields are set in char_tm! */ ! code = gs_matrix_multiply(&pgs->font->FontMatrix, ! &ctm_only(pgs), &char_tm_only(pgs)); ! if ( code < 0 ) return code; ! gs_update_matrix_fixed(&pgs->char_tm); ! pgs->char_tm_valid = 1; ! } if ( penum->can_cache &= /* no skewing or non-rectangular rotation */ (is_fzero2(pgs->char_tm.xy, pgs->char_tm.yx) || --- 713,717 ---- show_state_setup(gs_show_enum *penum) { gs_state *pgs = penum->pgs; ! gs_currentcharmatrix(pgs, NULL, 1); /* make char_tm valid */ if ( penum->can_cache &= /* no skewing or non-rectangular rotation */ (is_fzero2(pgs->char_tm.xy, pgs->char_tm.yx) || *************** *** 732,743 **** { gs_fixed_rect cbox; gx_cpath_box_for_check(pgs->clip_path, &cbox); ! penum->cxmin = fixed2int_var(cbox.p.x); ! penum->cymin = fixed2int_var(cbox.p.y); ! penum->cxmax = fixed2int_var(cbox.q.x); ! penum->cymax = fixed2int_var(cbox.q.y); penum->ftx = (int)fixed2long(pgs->char_tm.tx_fixed - pgs->ctm.tx_fixed); penum->fty = (int)fixed2long(pgs->char_tm.ty_fixed - pgs->ctm.ty_fixed); } return 0; } --- 719,771 ---- { gs_fixed_rect cbox; gx_cpath_box_for_check(pgs->clip_path, &cbox); ! penum->ibox.p.x = fixed2int_var_ceiling(cbox.p.x); ! penum->ibox.p.y = fixed2int_var_ceiling(cbox.p.y); ! penum->ibox.q.x = fixed2int_var(cbox.q.x); ! penum->ibox.q.y = fixed2int_var(cbox.q.y); ! gx_path_bbox(&pgs->clip_path->path, &cbox); ! penum->obox.p.x = fixed2int_var(cbox.p.x); ! penum->obox.p.y = fixed2int_var(cbox.p.y); ! penum->obox.q.x = fixed2int_var_ceiling(cbox.q.x); ! penum->obox.q.y = fixed2int_var_ceiling(cbox.q.y); penum->ftx = (int)fixed2long(pgs->char_tm.tx_fixed - pgs->ctm.tx_fixed); penum->fty = (int)fixed2long(pgs->char_tm.ty_fixed - pgs->ctm.ty_fixed); } + penum->encode_char = pgs->font->encode_char_proc; return 0; + } + + /* Set up the cache device and related information. */ + private void + show_cache_setup(gs_show_enum *penum) + { gs_state *pgs = penum->pgs; + device *dev = &penum->dev_cache_dev; + penum->dev_cache_info = mem_mono_device; + penum->dev_cache_info.target = pgs->device->info; + dev->info = (gx_device *)&penum->dev_cache_info; + dev->is_band_device = 0; + dev->white = 1; + dev->black = 1; + /* Decide whether to oversample. */ + /* We have to decide this now, because */ + /* type1addpath has to know it in advance. */ + if ( penum->is_composite ) + { penum->suggested_scale = 1; /* WRONG, should */ + /* use info from eventual base font */ + } + else + { gs_font *pfont = pgs->font; + gs_fixed_point extent; + gs_distance_transform2fixed(&pgs->char_tm, + pfont->data.base.FontBBox.q.x - + pfont->data.base.FontBBox.p.x, + pfont->data.base.FontBBox.q.y - + pfont->data.base.FontBBox.p.y, + &extent); + penum->suggested_scale = + (extent.x != 0 && extent.y != 0 && + any_abs(extent.x) < int2fixed(16) && + any_abs(extent.y) < int2fixed(16) ? 4 : 1); + } + penum->cache_set = 1; } diff -rNC2 gs26/gschar.h gs261/gschar.h *** gs26/gschar.h Wed Mar 17 17:04:32 1993 --- gs261/gschar.h Thu May 27 07:12:00 1993 *************** *** 1,6 **** ! /* Copyright (C) 1989, 1992 Aladdin Enterprises. All rights reserved. ! Distributed by Free Software Foundation, Inc. - This file is part of Ghostscript. Ghostscript is distributed in the hope that it will be useful, but --- 1,4 ---- ! /* Copyright (C) 1989, 1992, 1993 Aladdin Enterprises. All rights reserved. Ghostscript is distributed in the hope that it will be useful, but *************** *** 42,45 **** --- 40,44 ---- gs_xyshow_init(P3(gs_show_enum *, gs_state *, const char *)), gs_xyshow_n_init(P4(gs_show_enum *, gs_state *, const char *, uint)), + gs_glyphshow_init(P3(gs_show_enum *, gs_state *, gs_glyph)), gs_cshow_init(P3(gs_show_enum *, gs_state *, const char *)), gs_cshow_n_init(P4(gs_show_enum *, gs_state *, const char *, uint)), diff -rNC2 gs26/gschar0.c gs261/gschar0.c *** gs26/gschar0.c Wed Mar 17 17:13:34 1993 --- gs261/gschar0.c Wed May 12 18:19:10 1993 *************** *** 1,4 **** /* Copyright (C) 1991, 1992 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/gscie.c gs261/gscie.c *** gs26/gscie.c Fri Feb 26 09:33:32 1993 --- gs261/gscie.c Tue May 18 11:17:54 1993 *************** *** 1,4 **** /* Copyright (C) 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- *************** *** 22,32 **** #include "gx.h" #include "gserrors.h" #include "gscspace.h" - #include "gscie.h" #include "gscolor2.h" /* for gs_set/currentcolorrendering */ #include "gxarith.h" - #include "gxcolor.h" #include "gxdevice.h" /* for gs_color_index */ - #include "gxrefct.h" #include "gzcolor.h" #include "gzstate.h" --- 21,31 ---- #include "gx.h" #include "gserrors.h" + #include "gxrefct.h" /* early for gscie.h */ + #include "gxcolor.h" /* early for gscolor2.h */ #include "gscspace.h" #include "gscolor2.h" /* for gs_set/currentcolorrendering */ + #include "gscie.h" #include "gxarith.h" #include "gxdevice.h" /* for gs_color_index */ #include "gzcolor.h" #include "gzstate.h" *************** *** 360,363 **** --- 359,363 ---- /* Invert a matrix. */ + /* The output must not be an alias for the input. */ private void near cie_invert3(register const gs_matrix3 *in, register gs_matrix3 *out) *************** *** 376,389 **** #define H cv.w #define I cw.w ! double AE = in->A * in->E, AF = in->A * in->F, ! AH = in->A * in->H, AI = in->A * in->I; ! double BD = in->B * in->D, BF = in->B * in->F, ! BG = in->B * in->G, BI = in->B * in->I; ! double CD = in->C * in->D, CE = in->C * in->E, ! CG = in->C * in->G, CH = in->C * in->H; ! double DH = in->D * in->H, DI = in->D * in->I; ! double EG = in->E * in->G, EI = in->E * in->I; ! double FG = in->F * in->G, FH = in->F * in->H; ! double coA = EI - FH, coB = FG - DI, coC = DH - EG; double det = in->A * coA + in->B * coB + in->C * coC; if_debug_matrix3("[c]invert", in); --- 376,382 ---- #define H cv.w #define I cw.w ! double coA = in->E * in->I - in->F * in->H; ! double coB = in->F * in->G - in->D * in->I; ! double coC = in->D * in->H - in->E * in->G; double det = in->A * coA + in->B * coB + in->C * coC; if_debug_matrix3("[c]invert", in); *************** *** 391,400 **** out->D = coB / det; out->G = coC / det; ! out->B = (CH - BI) / det; ! out->E = (AI - CG) / det; ! out->H = (BG - AH) / det; ! out->C = (BF - CE) / det; ! out->F = (CD - AF) / det; ! out->I = (AE - BD) / det; if_debug_matrix3(" =", out); #undef A --- 384,393 ---- out->D = coB / det; out->G = coC / det; ! out->B = (in->C * in->H - in->B * in->I) / det; ! out->E = (in->A * in->I - in->C * in->G) / det; ! out->H = (in->B * in->G - in->A * in->H) / det; ! out->C = (in->B * in->F - in->C * in->E) / det; ! out->F = (in->C * in->D - in->A * in->F) / det; ! out->I = (in->A * in->E - in->B * in->D) / det; if_debug_matrix3(" =", out); #undef A diff -rNC2 gs26/gscie.h gs261/gscie.h *** gs26/gscie.h Sat Feb 27 08:48:28 1993 --- gs261/gscie.h Mon May 17 12:30:58 1993 *************** *** 1,4 **** /* Copyright (C) 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- *************** *** 20,24 **** /* gscie.h */ /* Structures for Ghostscript CIE color algorithms */ ! /* (requires gscspace.h) /* ------ Common definitions ------ */ --- 19,23 ---- /* gscie.h */ /* Structures for Ghostscript CIE color algorithms */ ! /* (requires gscspace.h, gscolor2.h, gxrefct.h) /* ------ Common definitions ------ */ *************** *** 46,54 **** struct gs_cie_common_s; typedef struct gs_cie_common_s gs_cie_common; - #ifndef gs_cie_render_DEFINED /* also defined in gscolor2.h */ - # define gs_cie_render_DEFINED - struct gs_cie_render_s; - typedef struct gs_cie_render_s gs_cie_render; - #endif struct gs_cie_wbsd_s; typedef struct gs_cie_wbsd_s gs_cie_wbsd; --- 45,48 ---- *************** *** 145,149 **** struct gs_cie_abc_s { gs_cie_common common; /* must be first */ ! long ref_count; gs_range3 RangeABC; gs_cie_abc_proc3 DecodeABC; --- 139,143 ---- struct gs_cie_abc_s { gs_cie_common common; /* must be first */ ! rc_header rc; gs_range3 RangeABC; gs_cie_abc_proc3 DecodeABC; *************** *** 158,162 **** struct gs_cie_a_s { gs_cie_common common; /* must be first */ ! long ref_count; gs_range RangeA; gs_cie_a_proc DecodeA; --- 152,156 ---- struct gs_cie_a_s { gs_cie_common common; /* must be first */ ! rc_header rc; gs_range RangeA; gs_cie_a_proc DecodeA; *************** *** 195,199 **** /* The main dictionary */ struct gs_cie_render_s { ! long ref_count; gs_matrix3 MatrixLMN; gs_cie_render_proc3 EncodeLMN; --- 189,193 ---- /* The main dictionary */ struct gs_cie_render_s { ! rc_header rc; gs_matrix3 MatrixLMN; gs_cie_render_proc3 EncodeLMN; *************** *** 223,227 **** typedef struct gx_cie_joint_caches_s { ! long ref_count; gs_cie_wbsd points_sd; gx_cie_cache TransformPQR[3]; --- 217,221 ---- typedef struct gx_cie_joint_caches_s { ! rc_header rc; gs_cie_wbsd points_sd; gx_cie_cache TransformPQR[3]; diff -rNC2 gs26/gscolor.c gs261/gscolor.c *** gs26/gscolor.c Wed May 5 08:15:18 1993 --- gs261/gscolor.c Mon May 17 12:02:56 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- *************** *** 264,268 **** ptran->green = ptran->gray; ptran->blue = ptran->gray; ! ptran->gray->ref_count += 3; if ( remap ) { load_transfer_map(pgs, ptran->gray); --- 263,267 ---- ptran->green = ptran->gray; ptran->blue = ptran->gray; ! ptran->gray->rc.ref_count += 3; if ( remap ) { load_transfer_map(pgs, ptran->gray); diff -rNC2 gs26/gscolor.h gs261/gscolor.h *** gs26/gscolor.h Wed Jan 13 14:12:02 1993 --- gs261/gscolor.h Wed May 12 18:19:20 1993 *************** *** 1,4 **** /* Copyright (C) 1991, 1992 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/gscolor2.c gs261/gscolor2.c *** gs26/gscolor2.c Wed Apr 14 17:11:20 1993 --- gs261/gscolor2.c Mon May 17 12:36:30 1993 *************** *** 1,4 **** /* Copyright (C) 1992 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- *************** *** 26,35 **** #include "gxdevice.h" /* for gx_color_index */ #include "gxrefct.h" #include "gzstate.h" #include "gzcolor.h" - #include "gscspace.h" #include "gscie.h" - #include "gxcolor.h" - #include "gscolor2.h" /* --- 25,34 ---- #include "gxdevice.h" /* for gx_color_index */ #include "gxrefct.h" + #include "gxcolor.h" /* for gscolor2.h, gscie.h */ + #include "gscspace.h" /* for gscolor2.h */ + #include "gscolor2.h" /* for gscie.h */ #include "gzstate.h" #include "gzcolor.h" #include "gscie.h" /* diff -rNC2 gs26/gscolor2.h gs261/gscolor2.h *** gs26/gscolor2.h Sun Feb 14 17:45:00 1993 --- gs261/gscolor2.h Mon May 17 12:30:48 1993 *************** *** 1,4 **** /* Copyright (C) 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- *************** *** 20,34 **** /* gscolor2.h */ /* Client interface to Level 2 color routines for Ghostscript library */ ! /* (requires gscspace.h) */ ! /* Note: clients should use rc_alloc0 (in gxrefct.h) to allocate */ /* CIE color spaces or rendering structures. */ /* General color routines */ - #ifndef gs_client_color_DEFINED /* also defined in gxcolor.h */ - # define gs_client_color_DEFINED - struct gs_client_color_s; - typedef struct gs_client_color_s gs_client_color; - #endif const gs_color_space *gs_currentcolorspace(P1(const gs_state *)); int gs_setcolorspace(P2(gs_state *, gs_color_space *)); --- 19,28 ---- /* gscolor2.h */ /* Client interface to Level 2 color routines for Ghostscript library */ ! /* (requires gscspace.h, gxcolor.h) */ ! /* Note: clients should use rc_alloc_struct_0 (in gxrefct.h) to allocate */ /* CIE color spaces or rendering structures. */ /* General color routines */ const gs_color_space *gs_currentcolorspace(P1(const gs_state *)); int gs_setcolorspace(P2(gs_state *, gs_color_space *)); *************** *** 39,47 **** /* CIE-specific routines */ - #ifndef gs_cie_render_DEFINED /* also defined in gscie.h */ - # define gs_cie_render_DEFINED struct gs_cie_render_s; typedef struct gs_cie_render_s gs_cie_render; - #endif const gs_cie_render *gs_currentcolorrendering(P1(const gs_state *)); int gs_setcolorrendering(P2(gs_state *, gs_cie_render *)); --- 33,38 ---- diff -rNC2 gs26/gsconfig gs261/gsconfig *** gs26/gsconfig Thu Mar 11 07:26:20 1993 --- gs261/gsconfig *************** *** 1,31 **** - if ( test "$1" = "+" -a "$2" ) then - shift - else - rm -f _temp_.dob _temp_.dop _temp_.dlb _temp_.d - touch _temp_.dob _temp_.dop _temp_.dlb _temp_.d - rm -f _temp_.dh - echo '/* This file was automatically generated by Ghostscript (gsconfig). */' > _temp_.dh - echo '/* See gconfig.c for documentation. */' >>_temp_.dh - echo '#include "gsconfig.h"' >>_temp_.dh - fi - rm -f _temp_.c - cat <_temp_.c - /bin/sh < _temp_.d - rm -f obj.tr gconfig.h lib.tr - sort <_temp_.dob | uniq >obj.tr - sort <_temp_.dop | uniq >>_temp_.dh - mv _temp_.dh gconfig.h - mv _temp_.dlb lib.tr - rm -f _temp_.d* - EOF - for dev in $* - do - if ( test "${dev}" = "+" ) then - rm -f _temp_.c - touch _temp_.c - else - cat ${dev} >>_temp_.d - fi - done - /bin/sh < _temp_.c - rm _temp_.c --- 0 ---- diff -rNC2 gs26/gsconfig.bat gs261/gsconfig.bat *** gs26/gsconfig.bat Thu Mar 11 07:26:00 1993 --- gs261/gsconfig.bat *************** *** 1,40 **** - @echo off - rem If DEVICE_DEVS is empty, there is only one argument, a +. - if '%2'=='' goto init - if '%1'=='+' goto noinit - :init - echo + >_temp_.dob - echo # >_temp_.dow - echo /* This file was automatically generated by Ghostscript (gsconfig.bat). */ >_temp_.dh - echo /* See gconfig.c for documentation. */ >>_temp_.dh - echo #include "gsconfig.h" >>_temp_.dh - echo /* */ >_temp_.dop - echo + >_temp_.dlb - echo @echo off >_temp_.bat - goto top - :noinit - shift - :top - if '%1'=='' goto done - if '%1'=='+' goto nofin - copy /b _temp_.bat+%1 >nul - shift - goto top - :done - command /c _temp_.bat >nul - rem We can't pipe the output of sort directly into uniq, - rem because of the message from the Watcom DOS extender. - sort <_temp_.dob >_temp_.dtr - uniq _temp_.dtr obj.tr - sort <_temp_.dow >_temp_.dtr - uniq _temp_.dtr objw.tr - sort <_temp_.dop >_temp_.dtr - uniq _temp_.dtr _temp_.dop - copy /b _temp_.dh+_temp_.dop >nul - if exist lib.tr erase lib.tr - rename _temp_.dlb lib.tr - if exist gconfig.h erase gconfig.h - rename _temp_.dh gconfig.h - erase _temp_.d* - erase _temp_*.bat - :nofin --- 0 ---- diff -rNC2 gs26/gsconfig.h gs261/gsconfig.h *** gs26/gsconfig.h Sun Apr 4 18:43:00 1993 --- gs261/gsconfig.h Wed May 12 18:19:32 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/gscoord.c gs261/gscoord.c *** gs26/gscoord.c Sat Mar 20 11:22:26 1993 --- gs261/gscoord.c Sun May 16 11:33:30 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1992 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- *************** *** 23,29 **** --- 22,30 ---- #include "gx.h" #include "gserrors.h" + #include "gsccode.h" /* for gxfont.h */ #include "gxarith.h" #include "gxfixed.h" #include "gxmatrix.h" + #include "gxfont.h" /* for char_tm */ #include "gzstate.h" #include "gzdevice.h" /* requires gsstate */ *************** *** 116,119 **** --- 117,144 ---- gs_currentmatrix(const gs_state *pgs, gs_matrix *pmat) { *pmat = ctm_only(pgs); + return 0; + } + + /* Read (after possibly computing) the current transformation matrix */ + /* for rendering text. If force=1, update char_tm if it is invalid; */ + /* if force=0, don't update char_tm, and return an error code. */ + int + gs_currentcharmatrix(gs_state *pgs, gs_matrix *ptm, int force) + { if ( !pgs->char_tm_valid ) + { int code; + if ( !force ) + return gs_error_undefinedresult; + /* Compute combined transformation */ + gs_make_identity(&char_tm_only(pgs)); /* make sure type */ + /* fields are set in char_tm! */ + code = gs_matrix_multiply(&pgs->font->FontMatrix, + &ctm_only(pgs), &char_tm_only(pgs)); + if ( code < 0 ) + return code; + gs_update_matrix_fixed(&pgs->char_tm); + pgs->char_tm_valid = 1; + } + if ( ptm != NULL ) + *ptm = char_tm_only(pgs); return 0; } diff -rNC2 gs26/gscoord.h gs261/gscoord.h *** gs26/gscoord.h Mon Dec 7 09:08:42 1992 --- gs261/gscoord.h Sun May 16 11:34:14 1993 *************** *** 1,4 **** ! /* Copyright (C) 1989, 1992 Aladdin Enterprises. All rights reserved. ! Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- ! /* Copyright (C) 1989, 1992, 1993 Aladdin Enterprises. All rights reserved. This file is part of Ghostscript. *************** *** 26,29 **** --- 25,29 ---- gs_defaultmatrix(P2(const gs_state *, gs_matrix *)), gs_currentmatrix(P2(const gs_state *, gs_matrix *)), + gs_currentcharmatrix(P3(gs_state *, gs_matrix *, int)), gs_setmatrix(P2(gs_state *, const gs_matrix *)), gs_translate(P3(gs_state *, floatp, floatp)), diff -rNC2 gs26/gscrypt1.h gs261/gscrypt1.h *** gs26/gscrypt1.h Sun May 10 18:18:56 1992 --- gs261/gscrypt1.h Wed May 12 18:19:42 1993 *************** *** 1,4 **** /* Copyright (C) 1990, 1992 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/gscspace.h gs261/gscspace.h *** gs26/gscspace.h Thu Apr 15 18:29:28 1993 --- gs261/gscspace.h Wed May 12 18:19:46 1993 *************** *** 1,4 **** /* Copyright (C) 1991, 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/gsdevice.c gs261/gsdevice.c *** gs26/gsdevice.c Fri Apr 23 18:15:34 1993 --- gs261/gsdevice.c Wed May 26 15:05:44 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- *************** *** 38,41 **** --- 37,42 ---- private dev_proc_fill_rectangle(null_fill_rectangle); private dev_proc_copy_mono(null_copy_mono); + private dev_proc_get_xfont_procs(null_get_xfont_procs); + private dev_proc_get_xfont_device(null_get_xfont_device); /* The null device procedure record is also used to fill in */ *************** *** 58,64 **** gx_default_put_props, gx_default_map_cmyk_color, ! gx_default_get_xfont_procs }; ! private gx_device null_device = { sizeof(gx_device), &null_procs, --- 59,66 ---- gx_default_put_props, gx_default_map_cmyk_color, ! null_get_xfont_procs, ! null_get_xfont_device }; ! gx_device_null gs_null_device = { sizeof(gx_device), &null_procs, *************** *** 68,77 **** no_margins, dci_black_and_white, ! 1 }; /* Fill in a single procedure */ #define fill_proc(procs, p)\ ! if ( (procs)->p == 0 ) (procs)->p = null_procs.p; /* Fill in NULL procedures in a device procedure record. */ --- 70,82 ---- no_margins, dci_black_and_white, ! 1, ! 0 /* target */ }; /* Fill in a single procedure */ + #define fill_default(procs, p, dproc)\ + if ( (procs)->p == 0 ) (procs)->p = dproc #define fill_proc(procs, p)\ ! fill_default(procs, p, null_procs.p) /* Fill in NULL procedures in a device procedure record. */ *************** *** 94,98 **** fill_proc(procs, put_props); fill_proc(procs, map_cmyk_color); ! fill_proc(procs, get_xfont_procs); } void --- 99,104 ---- fill_proc(procs, put_props); fill_proc(procs, map_cmyk_color); ! fill_default(procs, get_xfont_procs, gx_default_get_xfont_procs); ! fill_default(procs, get_xfont_device, gx_default_get_xfont_device); } void *************** *** 360,364 **** void gs_nulldevice(gs_state *pgs) ! { gs_setdevice(pgs, &null_device); } --- 366,370 ---- void gs_nulldevice(gs_state *pgs) ! { gs_setdevice(pgs, (gx_device *)&gs_null_device); } *************** *** 380,384 **** void gx_device_no_output(gs_state *pgs) ! { pgs->device->info = &null_device; } --- 386,390 ---- void gx_device_no_output(gs_state *pgs) ! { pgs->device->info = (gx_device *)&gs_null_device; } *************** *** 421,425 **** } ! /* ------ The null `device' ------ */ private int --- 427,431 ---- } ! /* ------ The null device ------ */ private int *************** *** 434,437 **** --- 440,455 ---- { return 0; } + private gx_xfont_procs * + null_get_xfont_procs(gx_device *dev) + { gx_device *target = ((gx_device_null *)dev)->target; + return (target == 0 ? NULL : + (*target->procs->get_xfont_procs)(target)); + } + private gx_device * + null_get_xfont_device(gx_device *dev) + { gx_device *target = ((gx_device_null *)dev)->target; + return (target == 0 ? dev : + (*target->procs->get_xfont_device)(target)); + } /* ------ Default device procedures ------ */ *************** *** 484,487 **** --- 502,510 ---- gx_default_get_xfont_procs(gx_device *dev) { return NULL; + } + + gx_device * + gx_default_get_xfont_device(gx_device *dev) + { return dev; } diff -rNC2 gs26/gsdps1.c gs261/gsdps1.c *** gs26/gsdps1.c Mon Oct 5 18:25:14 1992 --- gs261/gsdps1.c Wed May 12 18:19:52 1993 *************** *** 1,4 **** /* Copyright (C) 1991, 1992 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/gserrors.h gs261/gserrors.h *** gs26/gserrors.h Wed Jan 20 04:21:36 1993 --- gs261/gserrors.h Wed May 12 18:19:54 1993 *************** *** 1,4 **** /* Copyright (C) 1989 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/gsfile.c gs261/gsfile.c *** gs26/gsfile.c Mon Dec 7 09:12:16 1992 --- gs261/gsfile.c Wed May 12 18:19:56 1993 *************** *** 1,4 **** /* Copyright (C) 1990 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/gsfont.c gs261/gsfont.c *** gs26/gsfont.c Wed Mar 17 16:59:38 1993 --- gs261/gsfont.c Thu May 27 05:39:10 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- *************** *** 44,48 **** #define mmax_LARGE 200 /* mmax - # of cached font/matrix pairs */ #define cmax_LARGE 5000 /* cmax - # of cached chars */ ! #define blimit_LARGE 1000 /* blimit/upper - max size of a single cached char */ /*** Small memory machines ***/ #define smax_SMALL 20 /* smax - # of scaled fonts */ --- 43,47 ---- #define mmax_LARGE 200 /* mmax - # of cached font/matrix pairs */ #define cmax_LARGE 5000 /* cmax - # of cached chars */ ! #define blimit_LARGE 2500 /* blimit/upper - max size of a single cached char */ /*** Small memory machines ***/ #define smax_SMALL 20 /* smax - # of scaled fonts */ *************** *** 57,62 **** { /* Try allocating a very large cache. */ /* If this fails, allocate a small one. */ - gs_font_dir *pdir; #if !arch_ints_are_short pdir = gs_font_dir_alloc_limits(mprocs, smax_LARGE, bmax_LARGE, mmax_LARGE, --- 56,61 ---- { /* Try allocating a very large cache. */ /* If this fails, allocate a small one. */ #if !arch_ints_are_short + gs_font_dir *pdir; pdir = gs_font_dir_alloc_limits(mprocs, smax_LARGE, bmax_LARGE, mmax_LARGE, *************** *** 73,78 **** { register gs_font_dir *pdir = (gs_font_dir *)(*mprocs->alloc)(1, sizeof(gs_font_dir), "font_dir_alloc(dir)"); uint chsize = (cmax / 5) | 31; /* a guess */ ! struct cached_fm_pair_s *mdata; ! struct cached_char_s **chars; if ( pdir == 0 ) return 0; /* Round up chsize to a power of 2. */ --- 72,77 ---- { register gs_font_dir *pdir = (gs_font_dir *)(*mprocs->alloc)(1, sizeof(gs_font_dir), "font_dir_alloc(dir)"); uint chsize = (cmax / 5) | 31; /* a guess */ ! cached_fm_pair *mdata; ! cached_char **chars; if ( pdir == 0 ) return 0; /* Round up chsize to a power of 2. */ *************** *** 79,86 **** while ( chsize & (chsize + 1) ) chsize |= chsize >> 1; chsize++; ! mdata = (struct cached_fm_pair_s *)(*mprocs->alloc)(mmax, cached_fm_pair_sizeof, "font_dir_alloc(mdata)"); ! chars = (struct cached_char_s **)(*mprocs->alloc)(chsize, sizeof(struct cached_char_s *), "font_dir_alloc(chars)"); if ( mdata == 0 || chars == 0 ) ! { if ( chars != 0 ) (*mprocs->free)((char *)chars, chsize, sizeof(struct cached_char_s *), "font_dir_alloc(chars)"); if ( mdata != 0 ) (*mprocs->free)((char *)mdata, mmax, cached_fm_pair_sizeof, "font_dir_alloc(mdata)"); (*mprocs->free)((char *)pdir, 1, sizeof(gs_font_dir), "font_dir_alloc(dir)"); --- 78,85 ---- while ( chsize & (chsize + 1) ) chsize |= chsize >> 1; chsize++; ! mdata = (cached_fm_pair *)(*mprocs->alloc)(mmax, cached_fm_pair_sizeof, "font_dir_alloc(mdata)"); ! chars = (cached_char **)(*mprocs->alloc)(chsize, sizeof(cached_char *), "font_dir_alloc(chars)"); if ( mdata == 0 || chars == 0 ) ! { if ( chars != 0 ) (*mprocs->free)((char *)chars, chsize, sizeof(cached_char *), "font_dir_alloc(chars)"); if ( mdata != 0 ) (*mprocs->free)((char *)mdata, mmax, cached_fm_pair_sizeof, "font_dir_alloc(mdata)"); (*mprocs->free)((char *)pdir, 1, sizeof(gs_font_dir), "font_dir_alloc(dir)"); *************** *** 109,112 **** --- 108,121 ---- first = elt + /* definefont */ + /* Use this only for original (unscaled) fonts! */ + int + gs_definefont(gs_font_dir *pdir, gs_font *pfont) + { link_first(pdir->orig_fonts, pfont); + pfont->dir = pdir; + pfont->base = pfont; + return 0; + } + /* scalefont */ int *************** *** 148,151 **** --- 157,161 ---- for ( ; pf_out != 0; prev = pf_out, pf_out = pf_out->next ) if ( uid_equal(&pf_out->data.base.UID, &pfont->data.base.UID) && + pf_out->base == pfont->base && pf_out->FontType == pfont->FontType && pf_out->FontMatrix.xx == newmat.xx && *************** *** 179,182 **** --- 189,193 ---- } pf_out->dir = pdir; + pf_out->base = pfont->base; *ppfont = pf_out; if_debug1('m', "[m]new font=%lx\n", (ulong)pf_out); *************** *** 249,278 **** gs_glyph gs_no_encode_char_proc(struct gs_show_enum_s *penum, ! gs_font *pfont, gs_char chr) { return gs_no_glyph; } ! /* Purge a font from the font- and character-related caches. */ /* This is only used by restore (and, someday, the GC). */ void ! gs_purge_font_from_caches(gs_font_dir *pdir, const gs_font *pfont) ! { ! /* Purge the font from the scaled font cache. */ ! gs_font *pf = pdir->scaled_fonts; ! while ( pf != 0 ) ! { if ( pf == pfont ) ! { pf = pf->next; ! if ( pfont->prev ) pfont->prev->next = pf; ! else pdir->scaled_fonts = pf; ! if ( pf ) pf->prev = pfont->prev; pdir->ssize--; ! } ! else if ( pf->base == pfont ) ! { gs_purge_font_from_caches(pdir, pf); ! pf = pdir->scaled_fonts; /* start over */ ! } ! else ! pf = pf->next; ! } /* Purge the font from the font/matrix pair cache, */ --- 260,302 ---- gs_glyph gs_no_encode_char_proc(struct gs_show_enum_s *penum, ! gs_font *pfont, gs_char *pchr) { return gs_no_glyph; } ! /* Purge a font from all font- and character-related tables. */ /* This is only used by restore (and, someday, the GC). */ void ! gs_purge_font(const gs_font *pfont) ! { gs_font_dir *pdir = pfont->dir; ! gs_font *pf; ! ! /* Remove the font from its list (orig_fonts or scaled_fonts). */ ! gs_font *prev = pfont->prev; ! gs_font *next = pfont->next; ! if ( next != 0 ) ! next->prev = prev; ! if ( prev != 0 ) ! prev->next = next; ! else if ( pdir->orig_fonts == pfont ) ! pdir->orig_fonts = next; ! else if ( pdir->scaled_fonts == pfont ) ! pdir->scaled_fonts = next; ! else ! /* Shouldn't happen! */ ! ; ! if ( pfont->base != pfont ) ! { /* I.e., this is a scaled font. */ pdir->ssize--; ! } ! ! /* Purge the font from the scaled font cache. */ ! for ( pf = pdir->scaled_fonts; pf != 0; ) ! { if ( pf->base == pfont ) ! { gs_purge_font(pf); ! pf = pdir->scaled_fonts; /* start over */ ! } ! else ! pf = pf->next; ! } /* Purge the font from the font/matrix pair cache, */ diff -rNC2 gs26/gsfont.h gs261/gsfont.h *** gs26/gsfont.h Wed Dec 9 13:10:00 1992 --- gs261/gsfont.h Thu May 27 05:28:10 1993 *************** *** 1,4 **** ! /* Copyright (C) 1989, 1992 Aladdin Enterprises. All rights reserved. ! Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- ! /* Copyright (C) 1989, 1992, 1993 Aladdin Enterprises. All rights reserved. This file is part of Ghostscript. *************** *** 24,28 **** /* A 'font directory' object (to avoid making fonts global). */ /* 'directory' is something of a misnomer: this structure */ ! /* actually just keeps track of the scaled font and */ /* rendered character caches. */ #ifndef gs_font_dir_DEFINED --- 23,27 ---- /* A 'font directory' object (to avoid making fonts global). */ /* 'directory' is something of a misnomer: this structure */ ! /* just keeps track of the defined fonts, and the scaled font and */ /* rendered character caches. */ #ifndef gs_font_dir_DEFINED *************** *** 43,46 **** --- 42,47 ---- /* Font manipulations */ + /* Use gs_definefont only with original (unscaled) fonts! */ + int gs_definefont(P2(gs_font_dir *, gs_font *)); /* gs_scalefont and gs_makefont return 0 if the scaled font */ /* was already in the cache, 1 if a new font was created. */ *************** *** 52,56 **** int gs_setfont(P2(gs_state *, gs_font *)); gs_font * gs_currentfont(P1(const gs_state *)); ! void gs_purge_font_from_caches(P2(gs_font_dir *, const gs_font *)); /* Font cache parameter operations */ --- 53,57 ---- int gs_setfont(P2(gs_state *, gs_font *)); gs_font * gs_currentfont(P1(const gs_state *)); ! void gs_purge_font(P1(const gs_font *)); /* Font cache parameter operations */ diff -rNC2 gs26/gsht.c gs261/gsht.c *** gs26/gsht.c Mon Jan 4 18:35:12 1993 --- gs261/gsht.c Wed May 12 18:20:06 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1992 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/gsimage.c gs261/gsimage.c *** gs26/gsimage.c Wed May 5 19:09:14 1993 --- gs261/gsimage.c Wed May 12 18:20:08 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1992 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/gsimage.h gs261/gsimage.h *** gs26/gsimage.h Sun Apr 18 14:37:52 1993 --- gs261/gsimage.h Wed May 12 18:20:10 1993 *************** *** 1,4 **** /* Copyright (C) 1992 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/gsimage1.c gs261/gsimage1.c *** gs26/gsimage1.c Sun Apr 18 14:13:56 1993 --- gs261/gsimage1.c Mon May 17 06:30:54 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1992 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- *************** *** 375,379 **** cs_proc_remap_color((*remap_color)) = pcs->type->remap_color; gs_client_color cc; - int device_color = penum->device_color; cmap_proc_gray((*map_gray)) = pgs->cmap_procs->map_gray; gx_device_color *pdevc = pgs->dev_color; --- 374,377 ---- *************** *** 387,391 **** if ( !tiles_fit ) gx_color_load(pdevc, pgs); break;\ case -1: /* not computed yet */\ ! if ( device_color )\ (*map_gray)(byte2frac(sample_value), pdevc, pgs);\ else\ --- 385,389 ---- if ( !tiles_fit ) gx_color_load(pdevc, pgs); break;\ case -1: /* not computed yet */\ ! if ( penum->device_color )\ (*map_gray)(byte2frac(sample_value), pdevc, pgs);\ else\ diff -rNC2 gs26/gsimage2.c gs261/gsimage2.c *** gs26/gsimage2.c Thu Apr 15 18:47:18 1993 --- gs261/gsimage2.c Wed May 12 18:20:16 1993 *************** *** 1,4 **** /* Copyright (C) 1992 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/gsimpath.c gs261/gsimpath.c *** gs26/gsimpath.c Tue Jun 23 12:51:56 1992 --- gs261/gsimpath.c Wed May 12 18:20:20 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1992 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/gsio.h gs261/gsio.h *** gs26/gsio.h Sat Apr 3 01:30:10 1993 --- gs261/gsio.h Wed May 12 18:20:22 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1990, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/gsline.c gs261/gsline.c *** gs26/gsline.c Mon Dec 7 09:11:56 1992 --- gs261/gsline.c Wed May 12 18:20:24 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1992 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/gslp.ps gs261/gslp.ps *** gs26/gslp.ps Tue Apr 20 12:36:24 1993 --- gs261/gslp.ps Wed May 12 18:20:26 1993 *************** *** 1,4 **** % Copyright (C) 1991, 1993 Aladdin Enterprises. All rights reserved. - % Distributed by Free Software Foundation, Inc. % % This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/gsmain.c gs261/gsmain.c *** gs26/gsmain.c Tue Apr 20 11:46:16 1993 --- gs261/gsmain.c Wed May 12 18:20:30 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/gsmatrix.c gs261/gsmatrix.c *** gs26/gsmatrix.c Thu Apr 29 20:07:44 1993 --- gs261/gsmatrix.c Wed May 12 18:20:32 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1990, 1991 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/gsmatrix.h gs261/gsmatrix.h *** gs26/gsmatrix.h Wed Oct 7 11:36:12 1992 --- gs261/gsmatrix.h Wed May 12 18:20:34 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1990, 1991 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/gsmisc.c gs261/gsmisc.c *** gs26/gsmisc.c Mon Apr 12 04:53:28 1993 --- gs261/gsmisc.c Fri May 28 18:53:56 1993 *************** *** 1,4 **** ! /* Copyright (C) 1989, 1992 Aladdin Enterprises. All rights reserved. ! Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- ! /* Copyright (C) 1989, 1992, 1993 Aladdin Enterprises. All rights reserved. This file is part of Ghostscript. *************** *** 39,42 **** --- 38,70 ---- byte gs_alloc_fill_alloc = 0xa1; byte gs_alloc_fill_free = 0xf1; + + /* ------ Substitutes for missing C library functions ------ */ + + #ifdef memory__need_memset /* see memory_.h */ + void + memset(void *dest, register char ch, uint len) + { if ( ch == 0 ) + bzero(dest, len); + else if ( len > 0 ) + { register char *p = dest; + register uint count = len; + do { *p++ = ch; } while ( --count ); + } + } + #endif + + #ifdef memory__need_memchr /* see memory_.h */ + const char * + memchr(const char *ptr, char ch, uint len) + { if ( len > 0 ) + { register const char *p = ptr; + register uint count = len; + do { if ( *p == ch ) return p; p++; } while ( --count ); + } + return 0; + } + #endif + + /* ------ Ghostscript utilities ------ */ /* Generate a block of unique IDs. */ diff -rNC2 gs26/gspaint.c gs261/gspaint.c *** gs26/gspaint.c Wed Jan 20 17:41:56 1993 --- gs261/gspaint.c Wed May 12 18:20:40 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/gspaint.h gs261/gspaint.h *** gs26/gspaint.h Mon Nov 23 03:37:06 1992 --- gs261/gspaint.h Wed May 12 18:20:42 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1992 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/gspath.c gs261/gspath.c *** gs26/gspath.c Tue Apr 6 12:22:56 1993 --- gs261/gspath.c Wed May 12 18:20:46 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1992 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/gspath.h gs261/gspath.h *** gs26/gspath.h Thu Mar 18 08:15:14 1993 --- gs261/gspath.h Wed May 12 18:20:48 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1992 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/gspath2.c gs261/gspath2.c *** gs26/gspath2.c Thu Mar 18 08:26:24 1993 --- gs261/gspath2.c Wed May 12 18:20:50 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1992 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/gsprops.h gs261/gsprops.h *** gs26/gsprops.h Mon Apr 5 08:10:20 1993 --- gs261/gsprops.h Wed May 12 18:20:54 1993 *************** *** 1,4 **** /* Copyright (C) 1991, 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/gssetdev gs261/gssetdev *** gs26/gssetdev Tue Nov 5 14:30:28 1991 --- gs261/gssetdev Sun May 16 01:56:28 1993 *************** *** 1,2 **** ! ./gssetmod $* ! ./gsaddmod $1 -dev $1 --- 1,3 ---- ! export m; m=$1 ! shift ! echo -dev ${m} -obj $* >${m}.dev diff -rNC2 gs26/gssetdev.bat gs261/gssetdev.bat *** gs26/gssetdev.bat Sat Oct 26 06:50:08 1991 --- gs261/gssetdev.bat Sun May 16 01:37:30 1993 *************** *** 1,3 **** ! @echo off ! command /c gssetmod %1 %2 %3 %4 %5 %6 %7 %8 %9 ! gsaddmod %1 -dev %1 --- 1 ---- ! @echo -dev %1 -obj %2 %3 %4 %5 %6 %7 %8 %9 >%1.dev diff -rNC2 gs26/gssetmod gs261/gssetmod *** gs26/gssetmod Wed Sep 9 13:35:28 1992 --- gs261/gssetmod Sun May 16 01:56:14 1993 *************** *** 1,9 **** export m; m=$1 shift ! rm -f ${m}.d_f ${m}.d_n ${m}.d_o ${m}.d_v ! touch ${m}.d_f ${m}.d_n ${m}.d_o ${m}.d_v ! echo '# This file was automatically generated by Ghostscript (gssetmod).' >${m}.dev ! echo cat ${m}.d_n '>>_temp_.dh' >>${m}.dev ! echo cat ${m}.d_o '>>_temp_.dob' >>${m}.dev ! echo cat ${m}.d_v '>>_temp_.dop' >>${m}.dev ! ./gsaddmod ${m} -obj $* --- 1,3 ---- export m; m=$1 shift ! echo -obj $* >${m}.dev diff -rNC2 gs26/gssetmod.bat gs261/gssetmod.bat *** gs26/gssetmod.bat Mon Mar 1 11:47:26 1993 --- gs261/gssetmod.bat Sun May 16 01:37:48 1993 *************** *** 1,13 **** ! @echo off ! echo @echo off >%1.dev ! echo rem This file was automatically generated by Ghostscript (gssetmod). >>%1.dev ! if exist %1.d_f erase %1.d_f ! if exist %1.d_n erase %1.d_n ! if exist %1.d_o erase %1.d_o ! if exist %1.d_v erase %1.d_v ! if exist %1.d_w erase %1.d_w ! echo if exist %1.d_n copy /b _temp_.dh+%1.d_n >>%1.dev ! echo if exist %1.d_o copy /b _temp_.dob+%1.d_o >>%1.dev ! echo if exist %1.d_v copy /b _temp_.dop+%1.d_v >>%1.dev ! echo if exist %1.d_w copy /b _temp_.dow+%1.d_w >>%1.dev ! gsaddmod %1 -obj %2 %3 %4 %5 %6 %7 %8 %9 --- 1 ---- ! @echo -obj %2 %3 %4 %5 %6 %7 %8 %9 >%1.dev diff -rNC2 gs26/gsstate.c gs261/gsstate.c *** gs26/gsstate.c Wed May 5 08:12:12 1993 --- gs261/gsstate.c Mon May 17 12:39:54 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1992 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- *************** *** 23,32 **** #include "memory_.h" #include "gserrors.h" #include "gzstate.h" #include "gzdevice.h" #include "gscspace.h" #include "gscie.h" - #include "gxcolor.h" - #include "gxrefct.h" #include "gzcolor.h" /* requires gxdevice.h */ #include "gzht.h" --- 22,32 ---- #include "memory_.h" #include "gserrors.h" + #include "gxrefct.h" /* early for gscie.h */ + #include "gxcolor.h" /* for gscolor2.h, gscie.h */ #include "gzstate.h" #include "gzdevice.h" #include "gscspace.h" + #include "gscolor2.h" #include "gscie.h" #include "gzcolor.h" /* requires gxdevice.h */ #include "gzht.h" *************** *** 92,97 **** pgs->cmap_procs = cmap_procs_default; { gx_transfer *ptran = &pgs->transfer; ! rc_alloc_n(ptran->gray, gx_transfer_map, mprocs, ! return 0, "gs_state_alloc", 4); ptran->red = ptran->green = ptran->blue = ptran->gray; ptran->gray->proc = null_transfer; --- 92,97 ---- pgs->cmap_procs = cmap_procs_default; { gx_transfer *ptran = &pgs->transfer; ! rc_alloc_struct_n(ptran->gray, gx_transfer_map, mprocs, ! return 0, "gs_state_alloc", 4); ptran->red = ptran->green = ptran->blue = ptran->gray; ptran->gray->proc = null_transfer; *************** *** 364,374 **** if ( (pgs->element = (type *)(*palloc)(1, sizeof(type), cname)) == 0 )\ goto fail ! #define gtalloc(color,fail)\ ! rc_allocate(pgs->transfer.color, gx_transfer_map, pgs->memory_procs,\ goto fail, cname); ! gtalloc(red, utr); ! gtalloc(green, utg); ! gtalloc(blue, utb); ! gtalloc(gray, uty); galloc(device, device, ud); #undef galloc --- 364,374 ---- if ( (pgs->element = (type *)(*palloc)(1, sizeof(type), cname)) == 0 )\ goto fail ! #define gtalloc(element,fail)\ ! rc_allocate_struct(pgs->element, gx_transfer_map, pgs->memory_procs,\ goto fail, cname); ! gtalloc(transfer.red, utr); ! gtalloc(transfer.green, utg); ! gtalloc(transfer.blue, utb); ! gtalloc(transfer.gray, uty); galloc(device, device, ud); #undef galloc *************** *** 386,395 **** /* Undo partial allocations if an allocation failed. */ #define gunalloc(element) free_struct(pgs, pgs->element, cname) - #define gtunalloc(color) free_struct(pgs, pgs->transfer.color, cname) ucd: gunalloc(device); ! ud: gtunalloc(gray); ! uty: gtunalloc(blue); ! utb: gtunalloc(green); ! utg: gtunalloc(red); utr: free_struct(pgs, cont, cname); return -1; --- 386,394 ---- /* Undo partial allocations if an allocation failed. */ #define gunalloc(element) free_struct(pgs, pgs->element, cname) ucd: gunalloc(device); ! ud: gunalloc(transfer.gray); ! uty: gunalloc(transfer.blue); ! utb: gunalloc(transfer.green); ! utg: gunalloc(transfer.red); utr: free_struct(pgs, cont, cname); return -1; diff -rNC2 gs26/gsstate.h gs261/gsstate.h *** gs26/gsstate.h Wed Dec 9 13:09:28 1992 --- gs261/gsstate.h Wed May 12 18:20:58 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1992 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/gstdev.c gs261/gstdev.c *** gs26/gstdev.c Mon Mar 15 17:10:36 1993 --- gs261/gstdev.c Wed May 26 14:49:32 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- *************** *** 69,72 **** --- 68,72 ---- private dev_proc_map_cmyk_color(trace_map_cmyk_color); private dev_proc_get_xfont_procs(trace_get_xfont_procs); + private dev_proc_get_xfont_device(trace_get_xfont_device); private gx_device_procs trace_procs = { *************** *** 87,91 **** trace_put_props, trace_map_cmyk_color, ! trace_get_xfont_procs }; --- 87,92 ---- trace_put_props, trace_map_cmyk_color, ! trace_get_xfont_procs, ! trace_get_xfont_device }; *************** *** 299,302 **** --- 300,311 ---- (ulong)procs); return procs; + } + private gx_device * + trace_get_xfont_device(gx_device *dev) + { gx_device *fdev = (*rprocs->get_xfont_device)(dev); + if ( gs_debug['V'] ) + dprintf1("[v]\tget_xfont_device(dev) /*= 0x%lx */;\n", + (ulong)fdev); + return fdev; } diff -rNC2 gs26/gstype1.c gs261/gstype1.c *** gs26/gstype1.c Mon Apr 19 05:55:44 1993 --- gs261/gstype1.c Wed May 12 18:21:04 1993 *************** *** 1,4 **** /* Copyright (C) 1990, 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- *************** *** 147,151 **** /****** THESE ARE NOT ACCURATE FOR NON-INTEGER DELTAS. ******/ /* This probably doesn't make any difference in practice. */ ! #define c_fixed(d, c) m_fixed(fixed2int_var(d), c, sfc, max_coeff_bits) #define accum_x(dx)\ ptx += c_fixed(dx, xx);\ --- 146,150 ---- /****** THESE ARE NOT ACCURATE FOR NON-INTEGER DELTAS. ******/ /* This probably doesn't make any difference in practice. */ ! #define c_fixed(d, c) m_fixed(d, c, sfc, max_coeff_bits) #define accum_x(dx)\ ptx += c_fixed(dx, xx);\ *************** *** 161,172 **** private void near accum_xy_proc(register is_ptr ps, fixed dx, fixed dy) ! { int idx, idy; ! idx = fixed2int_var(dx); ! ptx += m_fixed(idx, xx, sfc, max_coeff_bits), ! idy = fixed2int_var(dy); ! pty += m_fixed(idy, yy, sfc, max_coeff_bits); if ( sfc.skewed ) ! ptx += m_fixed(idy, yx, sfc, max_coeff_bits), ! pty += m_fixed(idx, xy, sfc, max_coeff_bits); } --- 160,168 ---- private void near accum_xy_proc(register is_ptr ps, fixed dx, fixed dy) ! { ptx += m_fixed(dx, xx, sfc, max_coeff_bits), ! pty += m_fixed(dy, yy, sfc, max_coeff_bits); if ( sfc.skewed ) ! ptx += m_fixed(dy, yx, sfc, max_coeff_bits), ! pty += m_fixed(dx, xy, sfc, max_coeff_bits); } diff -rNC2 gs26/gstype1.h gs261/gstype1.h *** gs26/gstype1.h Sat Feb 27 07:50:46 1993 --- gs261/gstype1.h Wed May 12 18:21:06 1993 *************** *** 1,4 **** /* Copyright (C) 1990, 1992 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/gstypes.h gs261/gstypes.h *** gs26/gstypes.h Thu Apr 15 18:28:08 1993 --- gs261/gstypes.h Wed May 12 18:21:08 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1990, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/gsuid.h gs261/gsuid.h *** gs26/gsuid.h Sun Sep 27 03:50:14 1992 --- gs261/gsuid.h Wed May 12 18:21:12 1993 *************** *** 1,4 **** /* Copyright (C) 1992 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/gsutil.c gs261/gsutil.c *** gs26/gsutil.c Wed Apr 7 19:39:30 1993 --- gs261/gsutil.c Wed May 12 18:21:20 1993 *************** *** 1,4 **** /* Copyright (C) 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/gsutil.h gs261/gsutil.h *** gs26/gsutil.h Mon Apr 5 08:10:48 1993 --- gs261/gsutil.h Wed May 12 18:21:22 1993 *************** *** 1,4 **** /* Copyright (C) 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/gswin386.rc gs261/gswin386.rc *** gs26/gswin386.rc --- gs261/gswin386.rc Sun May 16 09:08:52 1993 *************** *** 0 **** --- 1,4 ---- + #include "windows.h" + + texticon ICON gstext.ico + grpicon ICON gsgraph.ico diff -rNC2 gs26/gsxfont.h gs261/gsxfont.h *** gs26/gsxfont.h Sat Mar 13 06:09:26 1993 --- gs261/gsxfont.h Wed May 12 18:22:02 1993 *************** *** 1,4 **** /* Copyright (C) 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/gx.h gs261/gx.h *** gs26/gx.h Sun Feb 7 05:29:06 1993 --- gs261/gx.h Wed May 12 18:22:26 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1991 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/gxarith.h gs261/gxarith.h *** gs26/gxarith.h Fri Apr 23 18:06:28 1993 --- gs261/gxarith.h Wed May 12 18:22:28 1993 *************** *** 1,4 **** /* Copyright (C) 1990 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/gxbitmap.h gs261/gxbitmap.h *** gs26/gxbitmap.h Fri Apr 23 18:14:28 1993 --- gs261/gxbitmap.h Wed May 12 18:22:34 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/gxcache.h gs261/gxcache.h *** gs26/gxcache.h Tue May 4 11:57:16 1993 --- gs261/gxcache.h Wed May 26 01:15:20 1993 *************** *** 1,4 **** /* Copyright (C) 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- *************** *** 30,34 **** struct gs_font_s *font; /* base font */ gs_uid UID; /* font UniqueID or XUID */ - const char * /* void * */ encoding; /* encoding vector (opaque) */ float mxx, mxy, myx, myy; /* transformation */ int num_chars; /* # of cached chars with this */ --- 29,32 ---- diff -rNC2 gs26/gxccache.c gs261/gxccache.c *** gs26/gxccache.c Wed May 5 19:09:32 1993 --- gs261/gxccache.c Wed May 26 17:16:18 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- *************** *** 89,96 **** register cached_char *cc = *chars_head(dir, glyph, pair); while ( cc != 0 ) ! { if ( cc->code == glyph && cc->head.pair == pair && cc->wmode == wmode ) ! return cc; ! cc = cc->next; ! } return 0; } --- 88,100 ---- register cached_char *cc = *chars_head(dir, glyph, pair); while ( cc != 0 ) ! { if ( cc->code == glyph && cc->head.pair == pair && cc->wmode == wmode ) ! { if_debug3('K', "[K]found 0x%lx for glyph=0x%lx, wmode=%d\n", ! (ulong)cc, (ulong)glyph, wmode); ! return cc; ! } ! cc = cc->next; ! } ! if_debug2('K', "[K]not found: glyph=0x%lx, wmode=%d\n", ! (ulong)glyph, wmode); return 0; } *************** *** 100,107 **** cached_char * gx_lookup_xfont_char(const gs_state *pgs, cached_fm_pair *pair, ! gs_char chr, int encoding_index, gs_glyph glyph, ! gs_proc_glyph_name_t name_proc, int wmode) { gs_font *font = pair->font; - gx_device *dev = pgs->device->info; gx_xfont *xf; gx_xglyph xg; --- 104,109 ---- cached_char * gx_lookup_xfont_char(const gs_state *pgs, cached_fm_pair *pair, ! gs_char chr, gs_glyph glyph, gs_proc_glyph_name_t name_proc, int wmode) { gs_font *font = pair->font; gx_xfont *xf; gx_xglyph xg; *************** *** 113,139 **** if ( !pair->xfont_tried ) { /* Look for an xfont now. */ ! gx_xfont_procs *procs = (*dev->procs->get_xfont_procs)(dev); ! if ( procs != 0 ) ! { gs_matrix mat; ! mat.xx = pair->mxx, mat.xy = pair->mxy; ! mat.yx = pair->myx, mat.yy = pair->myy; ! #ifdef DEBUG ! font->font_name.chars[font->font_name.size] = 0; ! if_debug5('k', "[k]xfont %s [%g %g %g %g]\n", ! font->font_name.chars, mat.xx, mat.xy, ! mat.yx, mat.yy); ! #endif ! /* xfonts can outlive their invocations, */ ! /* but restore purges them properly. */ ! pair->mprocs = pgs->memory_procs; ! pair->xfont = ! (*procs->lookup_font)(dev, ! &font->font_name.chars[0], ! font->font_name.size, ! encoding_index, &pair->UID, ! &mat, pair->mprocs); ! } ! else ! pair->xfont = 0; pair->xfont_tried = 1; } --- 115,120 ---- if ( !pair->xfont_tried ) { /* Look for an xfont now. */ ! gx_lookup_xfont(pgs, pair, ! font->data.base.nearest_encoding_index); pair->xfont_tried = 1; } *************** *** 141,145 **** if ( xf == 0 ) return NULL; ! xg = (*xf->common.procs->char_xglyph)(xf, chr, encoding_index, glyph, name_proc); if ( xg == gx_no_xglyph ) return NULL; --- 122,128 ---- if ( xf == 0 ) return NULL; ! /***** The following is wrong. We should only use the nearest *****/ ! /***** registered encoding if the character is really the same. *****/ ! xg = (*xf->common.procs->char_xglyph)(xf, chr, font->data.base.nearest_encoding_index, glyph, name_proc); if ( xg == gx_no_xglyph ) return NULL; *************** *** 159,163 **** cc->offset.y = int2fixed(-bbox.p.y); if_debug5('k', "[k]xfont %s char %d/0x%x#0x%lx=>0x%lx\n", ! font->font_name.chars, encoding_index, (int)chr, (ulong)glyph, (ulong)xg); if_debug6('k', " wxy=(%d,%d) bbox=(%d,%d),(%d,%d)\n", --- 142,147 ---- cc->offset.y = int2fixed(-bbox.p.y); if_debug5('k', "[k]xfont %s char %d/0x%x#0x%lx=>0x%lx\n", ! font->font_name.chars, ! font->data.base.nearest_encoding_index, (int)chr, (ulong)glyph, (ulong)xg); if_debug6('k', " wxy=(%d,%d) bbox=(%d,%d),(%d,%d)\n", *************** *** 207,215 **** } #endif ! if ( (x < penum->cxmin || x + w > penum->cxmax || ! y < penum->cymin || y + h > penum->cymax) && dev != (gx_device *)&cdev /* might be 2nd time around */ ) ! { cdev = gs_clip_device; cdev.target = dev; cdev.list = pgs->clip_path->list; --- 191,205 ---- } #endif ! if ( (x < penum->ibox.p.x || x + w > penum->ibox.q.x || ! y < penum->ibox.p.y || y + h > penum->ibox.q.y) && dev != (gx_device *)&cdev /* might be 2nd time around */ ) ! { /* Check for the character falling entirely outside */ ! /* the clipping region. */ ! if ( x >= penum->obox.q.x || x + w <= penum->obox.p.x || ! y >= penum->obox.q.y || y + h <= penum->obox.p.y ! ) ! return 0; /* nothing to do */ ! cdev = gs_clip_device; cdev.target = dev; cdev.list = pgs->clip_path->list; *************** *** 217,221 **** (*dev->procs->open_device)(dev); if_debug0('K', "[K](clipping)\n"); ! } /* If an xfont can render this character, use it. */ if ( cc->xglyph != gx_no_xglyph && (xf = cc->head.pair->xfont) != 0 ) --- 207,211 ---- (*dev->procs->open_device)(dev); if_debug0('K', "[K](clipping)\n"); ! } /* If an xfont can render this character, use it. */ if ( cc->xglyph != gx_no_xglyph && (xf = cc->head.pair->xfont) != 0 ) diff -rNC2 gs26/gxccman.c gs261/gxccman.c *** gs26/gxccman.c Wed May 5 15:04:16 1993 --- gs261/gxccman.c Wed May 26 15:14:06 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- *************** *** 45,53 **** /* Forward references */ private cached_char *alloc_char_in_chunk(P4(gs_font_dir *, ulong, char_cache_chunk *, uint)); private void shorten_cached_char(P3(gs_font_dir *, cached_char *, uint)); - void gs_purge_fm_pair(P3(gs_font_dir *, cached_fm_pair *, int)); private uint compress_scaled_bits(P4(byte *, uint, uint, int)); /* Initialize the character cache. */ void --- 44,55 ---- /* Forward references */ + void gs_purge_fm_pair(P3(gs_font_dir *, cached_fm_pair *, int)); + private gx_xfont *lookup_xfont_by_name(P6(gx_device *, gx_xfont_procs *, gs_font_name *, int, const cached_fm_pair *, const gs_matrix *)); private cached_char *alloc_char_in_chunk(P4(gs_font_dir *, ulong, char_cache_chunk *, uint)); private void shorten_cached_char(P3(gs_font_dir *, cached_char *, uint)); private uint compress_scaled_bits(P4(byte *, uint, uint, int)); + /* ====== Initialization ====== */ + /* Initialize the character cache. */ void *************** *** 70,73 **** --- 72,239 ---- } + /* ====== Font-level routines ====== */ + + /* Add a font/matrix pair to the cache. */ + /* (This is only exported for gxccache.c.) */ + cached_fm_pair * + gx_add_fm_pair(register gs_font_dir *dir, gs_font *font, const gs_uid *puid, + const gs_state *pgs) + { register cached_fm_pair *pair = + dir->fmcache.mdata + dir->fmcache.mnext; + cached_fm_pair *mend = + dir->fmcache.mdata + dir->fmcache.mmax; + if ( dir->fmcache.msize == dir->fmcache.mmax ) /* cache is full */ + { /* Prefer an entry with num_chars == 0, if any. */ + int count; + for ( count = dir->fmcache.mmax; + --count >= 0 && pair->num_chars != 0; + ) + if ( ++pair == mend ) pair = dir->fmcache.mdata; + gs_purge_fm_pair(dir, pair, 0); + } + else + { /* Look for an empty entry. (We know there is one.) */ + while ( !fm_pair_is_free(pair) ) + if ( ++pair == mend ) pair = dir->fmcache.mdata; + } + dir->fmcache.msize++; + dir->fmcache.mnext = pair + 1 - dir->fmcache.mdata; + if ( dir->fmcache.mnext == dir->fmcache.mmax ) + dir->fmcache.mnext = 0; + pair->font = font; + pair->UID = *puid; + pair->mxx = pgs->char_tm.xx, pair->mxy = pgs->char_tm.xy; + pair->myx = pgs->char_tm.yx, pair->myy = pgs->char_tm.yy; + pair->num_chars = 0; + pair->xfont_tried = 0; + pair->xfont = 0; + if_debug6('k', "[k]adding pair 0x%lx: 0x%lx [%g %g %g %g]\n", + (ulong)pair, (ulong)font, + pair->mxx, pair->mxy, pair->myx, pair->myy); + return pair; + } + + /* Look up the xfont for a font/matrix pair. */ + /* (This is only exported for gxccache.c.) */ + void + gx_lookup_xfont(const gs_state *pgs, cached_fm_pair *pair, int encoding_index) + { gx_device *dev = pgs->device->info; + gx_device *fdev = (*dev->procs->get_xfont_device)(dev); + gs_font *font = pair->font; + gx_xfont_procs *procs = (*fdev->procs->get_xfont_procs)(fdev); + gx_xfont *xf = 0; + if ( procs != 0 ) + { gs_matrix mat; + mat.xx = pair->mxx, mat.xy = pair->mxy; + mat.yx = pair->myx, mat.yy = pair->myy; + /* xfonts can outlive their invocations, */ + /* but restore purges them properly. */ + pair->mprocs = pgs->memory_procs; + if ( font->key_name.size != 0 ) + xf = lookup_xfont_by_name(fdev, procs, + &font->key_name, encoding_index, + pair, &mat); + #define font_name_eq(pfn1,pfn2)\ + ((pfn1)->size == (pfn2)->size &&\ + !memcmp((char *)(pfn1)->chars, (char *)(pfn2)->chars, (pfn1)->size)) + if ( xf == 0 && font->font_name.size != 0 && + /* Avoid redundant lookup */ + !font_name_eq(&font->font_name, &font->key_name) + ) + xf = lookup_xfont_by_name(fdev, procs, + &font->font_name, encoding_index, + pair, &mat); + if ( xf == 0 & font->FontType != ft_composite && + uid_is_valid(&font->data.base.UID) + ) + { /* Look for an original font with the same UID. */ + gs_font_dir *pdir = font->dir; + gs_font *pfont; + for ( pfont = pdir->orig_fonts; pfont != 0; + pfont = pfont->next + ) + { if ( pfont->FontType != ft_composite && + uid_equal(&pfont->data.base.UID, &font->data.base.UID) && + pfont->key_name.size != 0 && + !font_name_eq(&font->key_name, + &pfont->key_name) + ) + { xf = lookup_xfont_by_name(fdev, procs, + &pfont->key_name, + encoding_index, pair, &mat); + if ( xf != 0 ) + break; + } + } + } + } + pair->xfont = xf; + } + + /* ------ Internal routines ------ */ + + /* Purge from the caches all references to a given font/matrix pair, */ + /* or just character that depend on its xfont. */ + void + gs_purge_fm_pair(gs_font_dir *dir, cached_fm_pair *pair, int xfont_only) + { int chi; + if_debug2('k', "[k]purging pair 0x%lx%s\n", + (ulong)pair, (xfont_only ? " (xfont only)" : "")); + if ( pair->xfont != 0 ) + { (*pair->xfont->common.procs->release)(pair->xfont, + pair->mprocs); + pair->xfont = 0; + pair->xfont_tried = 0; + } + for ( chi = dir->ccache.chars_mask; + pair->num_chars != 0 && chi >= 0; + ) + { cached_char **pcc = dir->ccache.chars + chi--; + while ( *pcc != 0 ) + { cached_char *cc = *pcc; + if ( cc->head.pair == pair && (!xfont_only || + (pair->xfont == 0 && !cc_has_bits(cc))) + ) + { cached_char *ccnext = cc->next; + gx_free_cached_char(dir, cc); + *pcc = ccnext; + } + else + pcc = &cc->next; + } + } + if ( !xfont_only ) + { + #ifdef DEBUG + if ( pair->num_chars != 0 ) + { lprintf1("Error in gs_purge_fm_pair: num_chars =%d\n", + pair->num_chars); + } + #endif + fm_pair_set_free(pair); + dir->fmcache.msize--; + } + } + + /* Look up an xfont by name. */ + /* The caller must already have done get_xfont_device to get the proper */ + /* device to pass as the first argument to lookup_font. */ + private gx_xfont * + lookup_xfont_by_name(gx_device *fdev, gx_xfont_procs *procs, + gs_font_name *pfstr, int encoding_index, const cached_fm_pair *pair, + const gs_matrix *pmat) + { gx_xfont *xf; + if_debug5('k', "[k]lookup xfont %s [%g %g %g %g]\n", + pfstr->chars, pmat->xx, pmat->xy, pmat->yx, pmat->yy); + xf = (*procs->lookup_font)(fdev, + &pfstr->chars[0], pfstr->size, + encoding_index, &pair->UID, + pmat, pair->mprocs); + if_debug1('k', "[k]... xfont=0x%lx\n", (ulong)xf); + return xf; + } + + /* ====== Character-level routines ====== */ + /* Allocate storage for caching a rendered character. */ /* If dev != NULL set up the memory device; */ *************** *** 183,226 **** } - /* Add a font/matrix pair to the cache. */ - /* (This is only exported for gxccache.c.) */ - cached_fm_pair * - gx_add_fm_pair(register gs_font_dir *dir, gs_font *font, const gs_uid *puid, - const gs_state *pgs) - { register cached_fm_pair *pair = - dir->fmcache.mdata + dir->fmcache.mnext; - cached_fm_pair *mend = - dir->fmcache.mdata + dir->fmcache.mmax; - if ( dir->fmcache.msize == dir->fmcache.mmax ) /* cache is full */ - { /* Prefer an entry with num_chars == 0, if any. */ - int count; - for ( count = dir->fmcache.mmax; - --count >= 0 && pair->num_chars != 0; - ) - if ( ++pair == mend ) pair = dir->fmcache.mdata; - gs_purge_fm_pair(dir, pair, 0); - } - else - { /* Look for an empty entry. (We know there is one.) */ - while ( !fm_pair_is_free(pair) ) - if ( ++pair == mend ) pair = dir->fmcache.mdata; - } - dir->fmcache.msize++; - dir->fmcache.mnext = pair + 1 - dir->fmcache.mdata; - if ( dir->fmcache.mnext == dir->fmcache.mmax ) - dir->fmcache.mnext = 0; - pair->font = font; - pair->UID = *puid; - pair->mxx = pgs->char_tm.xx, pair->mxy = pgs->char_tm.xy; - pair->myx = pgs->char_tm.yx, pair->myy = pgs->char_tm.yy; - pair->num_chars = 0; - pair->xfont_tried = 0; - pair->xfont = 0; - if_debug6('k', "[k]adding pair 0x%lx: 0x%lx [%g %g %g %g]\n", - (ulong)pair, (ulong)font, - pair->mxx, pair->mxy, pair->myx, pair->myy); - return pair; - } - /* Add a character to the cache */ void --- 349,352 ---- *************** *** 227,231 **** gx_add_cached_char(gs_font_dir *dir, gx_device_memory *dev, cached_char *cc, cached_fm_pair *pair, int scale) ! { if ( dev != NULL ) gx_add_char_bits(dir, dev, cc, scale); /* Add the new character at the tail of its chain. */ --- 353,359 ---- gx_add_cached_char(gs_font_dir *dir, gx_device_memory *dev, cached_char *cc, cached_fm_pair *pair, int scale) ! { if_debug3('k', "[k]chaining 0x%lx: glyph=0x%lx, wmode=%d\n", ! (ulong)cc, (ulong)cc->code, cc->wmode); ! if ( dev != NULL ) gx_add_char_bits(dir, dev, cc, scale); /* Add the new character at the tail of its chain. */ *************** *** 385,431 **** cc_head_set_free(next); next->size = diff; - } - - /* Purge from the caches all references to a given font/matrix pair, */ - /* or just character that depend on its xfont. */ - void - gs_purge_fm_pair(gs_font_dir *dir, cached_fm_pair *pair, int xfont_only) - { int chi; - if_debug2('k', "[k]purging pair 0x%lx%s\n", - (ulong)pair, (xfont_only ? " (xfont only)" : "")); - if ( pair->xfont != 0 ) - { (*pair->xfont->common.procs->release)(pair->xfont, - pair->mprocs); - pair->xfont = 0; - pair->xfont_tried = 0; - } - for ( chi = dir->ccache.chars_mask; - pair->num_chars != 0 && chi >= 0; - ) - { cached_char **pcc = dir->ccache.chars + chi--; - while ( *pcc != 0 ) - { cached_char *cc = *pcc; - if ( cc->head.pair == pair && (!xfont_only || - (pair->xfont == 0 && !cc_has_bits(cc))) - ) - { cached_char *ccnext = cc->next; - gx_free_cached_char(dir, cc); - *pcc = ccnext; - } - else - pcc = &cc->next; - } - } - if ( !xfont_only ) - { - #ifdef DEBUG - if ( pair->num_chars != 0 ) - { lprintf1("Error in gs_purge_fm_pair: num_chars =%d\n", - pair->num_chars); - } - #endif - fm_pair_set_free(pair); - dir->fmcache.msize--; - } } --- 513,516 ---- diff -rNC2 gs26/gxcdir.h gs261/gxcdir.h *** gs26/gxcdir.h Sun Apr 18 15:29:10 1993 --- gs261/gxcdir.h Wed May 19 06:27:16 1993 *************** *** 1,4 **** /* Copyright (C) 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- *************** *** 47,51 **** }; ! struct cached_char_s; typedef struct char_cache_s { const gs_memory_procs *mprocs; --- 46,53 ---- }; ! #ifndef cached_char_DEFINED ! # define cached_char_DEFINED ! typedef struct cached_char_s cached_char; ! #endif typedef struct char_cache_s { const gs_memory_procs *mprocs; *************** *** 56,60 **** /* should be stored compressed */ uint upper; /* max size of a single cached char */ ! struct cached_char_s **chars; /* chain heads */ uint chars_mask; /* (a power of 2 -1) */ char_cache_chunk *chunks; /* current chunk in circular list */ --- 58,62 ---- /* should be stored compressed */ uint upper; /* max size of a single cached char */ ! cached_char **chars; /* chain heads */ uint chars_mask; /* (a power of 2 -1) */ char_cache_chunk *chunks; /* current chunk in circular list */ diff -rNC2 gs26/gxchar.h gs261/gxchar.h *** gs26/gxchar.h Tue Apr 20 05:04:22 1993 --- gs261/gxchar.h Thu May 27 05:38:00 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- *************** *** 62,70 **** /* 1 for stringwidth/cshow */ int can_cache; /* true if can cache chars */ ! int cxmin, cymin, cxmax, cymax; /* int version of quick-check */ ! /* clipping box */ int is_composite; /* true if composite font */ int ftx, fty; /* transformed font translation */ int wmode; /* WMode of root font */ int suggested_scale; /* suggested scaling factor for */ /* oversampling, based on FontBBox */ --- 61,76 ---- /* 1 for stringwidth/cshow */ int can_cache; /* true if can cache chars */ ! gs_int_rect ibox; /* int version of quick-check */ ! /* (inner) clipping box */ ! gs_int_rect obox; /* int version of (outer) clip box */ int is_composite; /* true if composite font */ int ftx, fty; /* transformed font translation */ int wmode; /* WMode of root font */ + /* Following are updated dynamically */ + gs_glyph (*encode_char)(P3(gs_show_enum *, struct gs_font_s *, gs_char *)); + /* copied from font, */ + /* except for glyphshow */ + int cache_set; /* true if suggested_scale & */ + /* dev_cache_info/dev have been set */ int suggested_scale; /* suggested scaling factor for */ /* oversampling, based on FontBBox */ *************** *** 72,76 **** gx_device_memory dev_cache_info; device dev_cache_dev; ! /* Following are updated dynamically */ uint index; /* index within string */ gs_char current_char; /* current char for render or move */ --- 78,82 ---- gx_device_memory dev_cache_info; device dev_cache_dev; ! gx_device_null dev_null; /* null device for stringwidth */ uint index; /* index within string */ gs_char current_char; /* current char for render or move */ *************** *** 111,114 **** gx_lookup_cached_char(P4(const gs_state *, const cached_fm_pair *, gs_glyph, int)); cached_char * ! gx_lookup_xfont_char(P7(const gs_state *, cached_fm_pair *, gs_char, int, gs_glyph, gs_proc_glyph_name((*)), int)); int gx_image_cached_char(P2(gs_show_enum *, cached_char *)); --- 117,120 ---- gx_lookup_cached_char(P4(const gs_state *, const cached_fm_pair *, gs_glyph, int)); cached_char * ! gx_lookup_xfont_char(P6(const gs_state *, cached_fm_pair *, gs_char, gs_glyph, gs_proc_glyph_name((*)), int)); int gx_image_cached_char(P2(gs_show_enum *, cached_char *)); diff -rNC2 gs26/gxcht.c gs261/gxcht.c *** gs26/gxcht.c Sat Apr 17 09:26:28 1993 --- gs261/gxcht.c Wed May 12 18:23:28 1993 *************** *** 1,4 **** /* Copyright (C) 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/gxcldev.h gs261/gxcldev.h *** gs26/gxcldev.h Sat Mar 20 05:11:00 1993 --- gs261/gxcldev.h Wed May 12 18:23:32 1993 *************** *** 1,4 **** /* Copyright (C) 1991, 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/gxclist.c gs261/gxclist.c *** gs26/gxclist.c Thu May 6 20:25:54 1993 --- gs261/gxclist.c Wed May 26 14:50:14 1993 *************** *** 1,4 **** /* Copyright (C) 1991, 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- *************** *** 43,46 **** --- 42,46 ---- private dev_proc_map_cmyk_color(clist_map_cmyk_color); private dev_proc_get_xfont_procs(clist_get_xfont_procs); + private dev_proc_get_xfont_device(clist_get_xfont_device); /* The device descriptor */ *************** *** 63,67 **** clist_put_props, clist_map_cmyk_color, ! clist_get_xfont_procs }; --- 63,68 ---- clist_put_props, clist_map_cmyk_color, ! clist_get_xfont_procs, ! clist_get_xfont_device }; *************** *** 227,230 **** --- 228,236 ---- { gx_device *tdev = cdev->target; return (*tdev->procs->get_xfont_procs)(tdev); + } + private gx_device * + clist_get_xfont_device(gx_device *dev) + { gx_device *tdev = cdev->target; + return (*tdev->procs->get_xfont_device)(tdev); } diff -rNC2 gs26/gxclist.h gs261/gxclist.h *** gs26/gxclist.h Sat Sep 5 12:24:44 1992 --- gs261/gxclist.h Wed May 12 18:23:38 1993 *************** *** 1,4 **** /* Copyright (C) 1991, 1992 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/gxclread.c gs261/gxclread.c *** gs26/gxclread.c Thu May 6 20:09:04 1993 --- gs261/gxclread.c Wed May 12 18:23:44 1993 *************** *** 1,4 **** /* Copyright (C) 1991, 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/gxcmap.c gs261/gxcmap.c *** gs26/gxcmap.c Wed May 5 08:16:04 1993 --- gs261/gxcmap.c Tue May 18 18:19:24 1993 *************** *** 1,4 **** /* Copyright (C) 1992 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- *************** *** 59,63 **** frac V, Temp; long diff, H; - float fV; V = (red > green ? red : green); if ( blue > V ) V = blue; --- 58,61 ---- *************** *** 72,79 **** H = (red - green) * frac_1_long / diff + 4 * frac_1_long; if ( H < 0 ) H += 6 * frac_1_long; ! fV = frac2float(V); ! rhue = H / 6.0; ! rsat = diff / fV; ! rbri = fV; } #undef rhue --- 70,76 ---- H = (red - green) * frac_1_long / diff + 4 * frac_1_long; if ( H < 0 ) H += 6 * frac_1_long; ! rhue = H / (frac_1 * 6.0); ! rsat = diff / (float)V; ! rbri = frac2float(V); } #undef rhue diff -rNC2 gs26/gxcolor.h gs261/gxcolor.h *** gs26/gxcolor.h Sun Feb 14 17:44:46 1993 --- gs261/gxcolor.h Mon May 17 12:32:36 1993 *************** *** 1,4 **** /* Copyright (C) 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- *************** *** 23,31 **** #include "gsuid.h" - #ifndef gs_client_color_DEFINED /* also defined in gscolor2.h */ - # define gs_client_color_DEFINED struct gs_client_color_s; typedef struct gs_client_color_s gs_client_color; - #endif /* Paint (non-pattern) colors (Device, CIE, Indexed, Separation) */ --- 22,27 ---- diff -rNC2 gs26/gxcpath.c gs261/gxcpath.c *** gs26/gxcpath.c Tue Apr 20 07:59:34 1993 --- gs261/gxcpath.c Wed May 26 14:51:12 1993 *************** *** 1,4 **** /* Copyright (C) 1991, 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- *************** *** 502,505 **** --- 501,505 ---- private dev_proc_map_cmyk_color(clip_map_cmyk_color); private dev_proc_get_xfont_procs(clip_get_xfont_procs); + private dev_proc_get_xfont_device(clip_get_xfont_device); /* The device descriptor. */ *************** *** 521,525 **** clip_put_props, clip_map_cmyk_color, ! clip_get_xfont_procs }; const gx_device_clip gs_clip_device = --- 521,526 ---- clip_put_props, clip_map_cmyk_color, ! clip_get_xfont_procs, ! clip_get_xfont_device }; const gx_device_clip gs_clip_device = *************** *** 654,657 **** --- 655,663 ---- { gx_device *tdev = rdev->target; return (*tdev->procs->get_xfont_procs)(tdev); + } + private gx_device * + clip_get_xfont_device(gx_device *dev) + { gx_device *tdev = rdev->target; + return (*tdev->procs->get_xfont_device)(tdev); } diff -rNC2 gs26/gxcpath.h gs261/gxcpath.h *** gs26/gxcpath.h Wed Mar 17 02:26:04 1993 --- gs261/gxcpath.h Wed May 12 18:23:56 1993 *************** *** 1,4 **** /* Copyright (C) 1991 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/gxdevice.h gs261/gxdevice.h *** gs26/gxdevice.h Tue Apr 20 04:15:32 1993 --- gs261/gxdevice.h Wed May 26 14:39:54 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1992 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- *************** *** 84,87 **** --- 83,92 ---- typedef struct gx_device_s gx_device; #endif + /* A null device. This is used to temporarily disable output. */ + typedef struct gx_device_null_s { + gx_device_common; + gx_device *target; /* (used for xfont procs) */ + } gx_device_null; + extern gx_device_null gs_null_device; /* Define an opaque type for property lists. */ *************** *** 184,187 **** --- 189,198 ---- dev_proc_get_xfont_procs((*get_xfont_procs)); + /* Added in release 2.6.1 */ + + #define dev_proc_get_xfont_device(proc)\ + gx_device *proc(P1(gx_device *dev)) + dev_proc_get_xfont_device((*get_xfont_device)); + }; *************** *** 239,242 **** --- 250,254 ---- dev_proc_map_cmyk_color(gx_default_map_cmyk_color); dev_proc_get_xfont_procs(gx_default_get_xfont_procs); + dev_proc_get_xfont_device(gx_default_get_xfont_device); /* Fill in defaulted procedures in a device procedure record. */ diff -rNC2 gs26/gxdevmem.h gs261/gxdevmem.h *** gs26/gxdevmem.h Wed Mar 17 02:28:20 1993 --- gs261/gxdevmem.h Wed May 12 18:24:06 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1991, 1992 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/gxdither.c gs261/gxdither.c *** gs26/gxdither.c Tue Oct 27 09:58:52 1992 --- gs261/gxdither.c Wed May 12 18:24:08 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1992 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/gxdraw.c gs261/gxdraw.c *** gs26/gxdraw.c Thu Apr 15 18:45:28 1993 --- gs261/gxdraw.c Wed May 12 18:24:12 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1992 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/gxfdir.h gs261/gxfdir.h *** gs26/gxfdir.h Wed Mar 17 17:16:08 1993 --- gs261/gxfdir.h Wed May 26 09:10:48 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1990, 1991, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- *************** *** 26,29 **** --- 25,30 ---- struct gs_font_dir_s { const gs_memory_procs *mprocs; + /* Original (unscaled) fonts */ + gs_font *orig_fonts; /* Scaled font cache */ gs_font *scaled_fonts; /* list of recently scaled fonts */ diff -rNC2 gs26/gxfill.c gs261/gxfill.c *** gs26/gxfill.c Sun Mar 7 18:18:24 1993 --- gs261/gxfill.c Wed May 12 18:24:20 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1992 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/gxfixed.h gs261/gxfixed.h *** gs26/gxfixed.h Sat Jan 23 12:39:44 1993 --- gs261/gxfixed.h Wed May 12 18:24:36 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1990, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/gxfmap.h gs261/gxfmap.h *** gs26/gxfmap.h Wed Jan 13 14:21:00 1993 --- gs261/gxfmap.h Mon May 17 12:01:14 1993 *************** *** 1,4 **** /* Copyright (C) 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- *************** *** 25,28 **** --- 24,28 ---- #include "gxfrac.h" + #include "gxrefct.h" /* *************** *** 39,43 **** typedef float (*frac_map_proc)(P2(const gs_state *, floatp)); #define frac_map(index_bits)\ ! long ref_count;\ frac_map_proc proc;\ frac values[1 << (index_bits)] --- 39,43 ---- typedef float (*frac_map_proc)(P2(const gs_state *, floatp)); #define frac_map(index_bits)\ ! rc_header rc;\ frac_map_proc proc;\ frac values[1 << (index_bits)] diff -rNC2 gs26/gxfont.h gs261/gxfont.h *** gs26/gxfont.h Fri Apr 16 09:49:18 1993 --- gs261/gxfont.h Thu May 27 05:28:48 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- *************** *** 42,46 **** /* A client-supplied character encoding procedure. */ #define gs_proc_encode_char(proc)\ ! gs_glyph proc(P3(struct gs_show_enum_s *, gs_font *, gs_char)) gs_proc_encode_char(gs_no_encode_char_proc); --- 41,45 ---- /* A client-supplied character encoding procedure. */ #define gs_proc_encode_char(proc)\ ! gs_glyph proc(P3(struct gs_show_enum_s *, gs_font *, gs_char *)) gs_proc_encode_char(gs_no_encode_char_proc); *************** *** 144,151 **** /* include all the necessary information for >>all<< known font types */ /* (user-defined, encrypted, and composite) in the font structure. */ struct gs_font_s { ! gs_font *next, *prev; /* chain for scaled font cache */ ! gs_font *base; /* original (unscaled) base font */ gs_font_dir *dir; /* directory where registered */ char *client_data; /* additional client data */ gs_matrix FontMatrix; --- 143,158 ---- /* include all the necessary information for >>all<< known font types */ /* (user-defined, encrypted, and composite) in the font structure. */ + /* The font names are only needed for xfont lookup. */ + typedef struct gs_font_name_s { + #define gs_font_name_max 47 /* must be >= 40 */ + /* The +1 is so we can null-terminate for debugging printout. */ + byte chars[gs_font_name_max+1]; + uint size; + } gs_font_name; struct gs_font_s { ! gs_font *next, *prev; /* chain for original font list or */ ! /* scaled font cache */ gs_font_dir *dir; /* directory where registered */ + gs_font *base; /* original (unscaled) base font */ char *client_data; /* additional client data */ gs_matrix FontMatrix; *************** *** 165,169 **** gs_uid UID; int encoding_index; /* 0=Std, 1=ISOLatin1, */ ! /* 2=Symbol, -1=other */ /* Type 1 data */ gs_type1_data type1_data; --- 172,179 ---- gs_uid UID; int encoding_index; /* 0=Std, 1=ISOLatin1, */ ! /* 2=Symbol, 3=Dingbats, */ ! /* -1=other */ ! int nearest_encoding_index; /* (may be >= 0 */ ! /* even if encoding_index = -1) */ /* Type 1 data */ gs_type1_data type1_data; *************** *** 170,180 **** } base; } data; ! struct _n { ! /* The font_name is only needed for xfont lookup. */ ! /* The +1 is so we can null-terminate for debugging */ ! /* printout. */ ! #define font_name_max 47 /* must be >= 40 */ ! byte chars[font_name_max+1]; ! uint size; ! } font_name; }; --- 180,185 ---- } base; } data; ! /* We store both the FontDirectory key (key_name) and, */ ! /* if present, the FontName (font_name). */ ! gs_font_name key_name, font_name; }; diff -rNC2 gs26/gxfrac.h gs261/gxfrac.h *** gs26/gxfrac.h Sun Oct 25 14:01:50 1992 --- gs261/gxfrac.h Wed May 12 18:24:48 1993 *************** *** 1,4 **** /* Copyright (C) 1992 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/gxhint1.c gs261/gxhint1.c *** gs26/gxhint1.c Sat Feb 27 07:52:28 1993 --- gs261/gxhint1.c Wed May 12 18:24:52 1993 *************** *** 1,4 **** /* Copyright (C) 1990, 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/gxhint2.c gs261/gxhint2.c *** gs26/gxhint2.c Fri Apr 16 10:11:48 1993 --- gs261/gxhint2.c Wed May 12 18:24:54 1993 *************** *** 1,4 **** /* Copyright (C) 1990, 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- *************** *** 54,58 **** /* ------ Add hints ------ */ ! #define c_fixed(d, c) m_fixed(fixed2int_var(d), c, pis->fc, max_coeff_bits) /* Add a horizontal stem hint. */ --- 53,57 ---- /* ------ Add hints ------ */ ! #define c_fixed(d, c) m_fixed(d, c, pis->fc, max_coeff_bits) /* Add a horizontal stem hint. */ diff -rNC2 gs26/gxht.c gs261/gxht.c *** gs26/gxht.c Wed Dec 9 13:35:00 1992 --- gs261/gxht.c Wed May 12 18:24:58 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1992 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/gximage.h gs261/gximage.h *** gs26/gximage.h Sat Mar 6 05:40:56 1993 --- gs261/gximage.h Wed May 12 18:25:02 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1990, 1991, 1992 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/gxlum.h gs261/gxlum.h *** gs26/gxlum.h Thu Oct 15 05:37:38 1992 --- gs261/gxlum.h Wed May 12 18:25:04 1993 *************** *** 1,4 **** /* Copyright (C) 1992 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/gxmatrix.h gs261/gxmatrix.h *** gs26/gxmatrix.h Thu Apr 29 20:07:28 1993 --- gs261/gxmatrix.h Thu May 20 06:19:22 1993 *************** *** 1,4 **** ! /* Copyright (C) 1989, 1990, 1992 Aladdin Enterprises. All rights reserved. ! Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- ! /* Copyright (C) 1989, 1990, 1992, 1993 Aladdin Enterprises. All rights reserved. This file is part of Ghostscript. *************** *** 44,51 **** #define is_skewed(pmat) !is_fzero2((pmat)->xy, (pmat)->yx) ! /* Define the fixed-point coefficient structure for avoiding */ ! /* floating point in coordinate transformations. */ ! /* Currently this is used only by the Type 1 font interpreter. */ ! /* The setup is in gscoord.c. */ typedef struct { long l; --- 43,52 ---- #define is_skewed(pmat) !is_fzero2((pmat)->xy, (pmat)->yx) ! /* ! * Define the fixed-point coefficient structure for avoiding ! * floating point in coordinate transformations. ! * Currently this is used only by the Type 1 font interpreter. ! * The setup is in gscoord.c. ! */ typedef struct { long l; *************** *** 59,68 **** fixed round; /* ditto */ } fixed_coeff; ! /* Multiply an integer not exceeding max_bits in magnitude */ ! /* by a coefficient from a fixed_coeff. */ ! #define m_fixed(iv, c, fc, maxb)\ ! (((iv) + (1 << (maxb - 1))) & (-1 << maxb) ? /* out of range */\ ! (long)((iv) * (fc).c.f) :\ ! arith_rshift((iv) * (fc).c.l + (fc).round, (fc).shift)) #endif /* gxmatrix_INCLUDED */ --- 60,75 ---- fixed round; /* ditto */ } fixed_coeff; ! /* ! * Multiply a fixed whose integer part usually does not exceed max_bits ! * in magnitude by a coefficient from a fixed_coeff. ! * We can use a faster algorithm if the fixed is an integer within ! * a range that doesn't cause the multiplication to overflow an int. ! */ ! #define m_fixed(v, c, fc, maxb)\ ! (((v) + (fixed_1 << (maxb - 1))) &\ ! ((-fixed_1 << maxb) | _fixed_fraction_v) ? /* out of range, or has fraction */\ ! (fixed2int_var(v) * (fc).c.f +\ ! arith_rshift(fixed_fraction(v) * (fc).c.f + fixed_half, _fixed_shift)) :\ ! arith_rshift(fixed2int_var(v) * (fc).c.l + (fc).round, (fc).shift)) #endif /* gxmatrix_INCLUDED */ diff -rNC2 gs26/gxop1.h gs261/gxop1.h *** gs26/gxop1.h Sun Dec 6 05:22:52 1992 --- gs261/gxop1.h Wed May 12 18:25:10 1993 *************** *** 1,4 **** /* Copyright (C) 1991, 1992 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/gxpath.c gs261/gxpath.c *** gs26/gxpath.c Wed Jan 6 16:04:30 1993 --- gs261/gxpath.c Wed May 12 18:25:16 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1992 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/gxpath.h gs261/gxpath.h *** gs26/gxpath.h Wed Apr 7 18:45:22 1993 --- gs261/gxpath.h Wed May 12 18:25:20 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/gxpath2.c gs261/gxpath2.c *** gs26/gxpath2.c Wed Dec 9 13:56:32 1992 --- gs261/gxpath2.c Wed May 12 18:25:22 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1992 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/gxpcopy.c gs261/gxpcopy.c *** gs26/gxpcopy.c Wed Apr 7 18:58:10 1993 --- gs261/gxpcopy.c Wed May 12 18:25:26 1993 *************** *** 1,4 **** /* Copyright (C) 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/gxrefct.h gs261/gxrefct.h *** gs26/gxrefct.h Fri Feb 5 00:11:28 1993 --- gs261/gxrefct.h Mon May 17 12:07:46 1993 *************** *** 1,4 **** ! /* Copyright (C) 1992 Aladdin Enterprises. All rights reserved. ! Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- ! /* Copyright (C) 1992, 1993 Aladdin Enterprises. All rights reserved. This file is part of Ghostscript. *************** *** 21,38 **** /* Definitions for reference-counted data structures */ /* ------ Allocate/free ------ */ ! #define rc_alloc_n(vp, stype, mprocs, errstat, cname, rcinit)\ ! { if ( (vp = (stype *)(*(mprocs)->alloc)(1, sizeof(stype), cname)) == 0 )\ errstat;\ ! vp->ref_count = rcinit;\ } ! #define rc_alloc0(vp, stype, mprocs, errstat, cname)\ ! rc_alloc_n(vp, stype, mprocs, errstat, cname, 0) ! #define rc_alloc1(vp, stype, mprocs, errstat, cname)\ ! rc_alloc_n(vp, stype, mprocs, errstat, cname, 1) #define rc_free(vp, mprocs, cname)\ ! (*(mprocs)->free)((char *)vp, 1, sizeof(*vp), cname) /* ------ Reference counting ------ */ --- 20,57 ---- /* Definitions for reference-counted data structures */ + #ifndef gxrefct_INCLUDED + # define gxrefct_INCLUDED + + /* + * A reference-counted object must include the following header: + * rc_header rc; + */ + typedef struct rc_header_s { + long ref_count; + uint size; + } rc_header; + /* ------ Allocate/free ------ */ ! #define rc_alloc_n(vp, stype, ssize, mprocs, errstat, cname, rcinit)\ ! { if ( (vp = (stype *)(*(mprocs)->alloc)(1, ssize, cname)) == 0 )\ errstat;\ ! vp->rc.ref_count = rcinit;\ ! vp->rc.size = ssize;\ } ! #define rc_alloc_0(vp, stype, ssize, mprocs, errstat, cname)\ ! rc_alloc_n(vp, stype, ssize, mprocs, errstat, cname, 0) ! #define rc_alloc_1(vp, stype, ssize, mprocs, errstat, cname)\ ! rc_alloc_n(vp, stype, ssize, mprocs, errstat, cname, 1) ! ! #define rc_alloc_struct_0(vp, stype, mprocs, errstat, cname)\ ! rc_alloc_0(vp, stype, sizeof(stype), mprocs, errstat, cname) ! #define rc_alloc_struct_1(vp, stype, mprocs, errstat, cname)\ ! rc_alloc_1(vp, stype, sizeof(stype), mprocs, errstat, cname) ! #define rc_alloc_struct_n(vp, stype, mprocs, errstat, cname, rcinit)\ ! rc_alloc_n(vp, stype, sizeof(stype), mprocs, errstat, cname, rcinit) #define rc_free(vp, mprocs, cname)\ ! (*(mprocs)->free)((char *)vp, 1, (vp)->rc.size, cname) /* ------ Reference counting ------ */ *************** *** 40,59 **** /* Increment a reference count. */ #define rc_increment(vp)\ ! if ( vp != 0 ) vp->ref_count++ /* Increment a reference count, allocating the structure if necessary. */ ! #define rc_allocate(vp, stype, mprocs, errstat, cname)\ if ( vp != 0 )\ ! vp->ref_count++;\ else\ ! { rc_alloc1(vp, stype, mprocs, errstat, cname);\ } /* Guarantee that a structure is not shared. */ #define rc_unshare(vp, stype, mprocs, errstat, cname)\ ! if ( vp == 0 || vp->ref_count > 1 )\ { stype *new;\ ! rc_alloc1(new, stype, mprocs, errstat, cname);\ ! if ( vp ) vp->ref_count--;\ vp = new;\ } --- 59,80 ---- /* Increment a reference count. */ #define rc_increment(vp)\ ! if ( vp != 0 ) vp->rc.ref_count++ /* Increment a reference count, allocating the structure if necessary. */ ! #define rc_allocate(vp, stype, ssize, mprocs, errstat, cname)\ if ( vp != 0 )\ ! vp->rc.ref_count++;\ else\ ! { rc_alloc_1(vp, stype, ssize, mprocs, errstat, cname);\ } + #define rc_allocate_struct(vp, stype, mprocs, errstat, cname)\ + rc_allocate(vp, stype, sizeof(stype), mprocs, errstat, cname) /* Guarantee that a structure is not shared. */ #define rc_unshare(vp, stype, mprocs, errstat, cname)\ ! if ( vp == 0 || vp->rc.ref_count > 1 )\ { stype *new;\ ! rc_alloc_1(new, stype, vp->rc.size, mprocs, errstat, cname);\ ! if ( vp ) vp->rc.ref_count--;\ vp = new;\ } *************** *** 61,65 **** /* Decrement a reference count, freeing the structure if necessary. */ #define rc_decrement(vp, mprocs, cname)\ ! if ( vp != 0 && !--(vp->ref_count) )\ { rc_free(vp, mprocs, cname);\ vp = 0;\ --- 82,86 ---- /* Decrement a reference count, freeing the structure if necessary. */ #define rc_decrement(vp, mprocs, cname)\ ! if ( vp != 0 && !--(vp->rc.ref_count) )\ { rc_free(vp, mprocs, cname);\ vp = 0;\ *************** *** 68,72 **** /* Adjust a reference count either up or down. */ #define rc_adjust(vp, delta, mprocs, cname)\ ! if ( vp != 0 && !(vp->ref_count += delta) )\ { rc_free(vp, mprocs, cname);\ vp = 0;\ --- 89,93 ---- /* Adjust a reference count either up or down. */ #define rc_adjust(vp, delta, mprocs, cname)\ ! if ( vp != 0 && !(vp->rc.ref_count += delta) )\ { rc_free(vp, mprocs, cname);\ vp = 0;\ *************** *** 80,81 **** --- 101,104 ---- rc_increment(vpto);\ } + + #endif /* gxrefct_INCLUDED */ diff -rNC2 gs26/gxstroke.c gs261/gxstroke.c *** gs26/gxstroke.c Sat Mar 27 11:25:36 1993 --- gs261/gxstroke.c Wed May 12 18:25:32 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/gxtype1.h gs261/gxtype1.h *** gs26/gxtype1.h Sat Feb 27 07:52:48 1993 --- gs261/gxtype1.h Wed May 12 18:25:36 1993 *************** *** 1,4 **** /* Copyright (C) 1990, 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/gxxfont.h gs261/gxxfont.h *** gs26/gxxfont.h Sun Apr 18 11:19:58 1993 --- gs261/gxxfont.h Wed May 12 18:25:38 1993 *************** *** 1,4 **** /* Copyright (C) 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/gzcolor.h gs261/gzcolor.h *** gs26/gzcolor.h Wed Jan 13 15:12:14 1993 --- gs261/gzcolor.h Wed May 12 18:25:40 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/gzdevice.h gs261/gzdevice.h *** gs26/gzdevice.h Mon Dec 7 09:09:02 1992 --- gs261/gzdevice.h Wed May 12 18:25:42 1993 *************** *** 1,4 **** /* Copyright (C) 1989 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/gzht.h gs261/gzht.h *** gs26/gzht.h Mon Dec 7 09:09:18 1992 --- gs261/gzht.h Wed May 12 18:25:46 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1992 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/gzline.h gs261/gzline.h *** gs26/gzline.h Mon Dec 7 09:09:10 1992 --- gs261/gzline.h Wed May 12 18:25:48 1993 *************** *** 1,4 **** /* Copyright (C) 1989 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/gzpath.h gs261/gzpath.h *** gs26/gzpath.h Wed Dec 9 13:45:16 1992 --- gs261/gzpath.h Wed May 12 18:25:50 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1992 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/gzstate.h gs261/gzstate.h *** gs26/gzstate.h Sun Mar 21 13:53:46 1993 --- gs261/gzstate.h Wed May 12 18:25:54 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1992 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/helpers.doc gs261/helpers.doc *** gs26/helpers.doc Fri May 7 04:26:02 1993 --- gs261/helpers.doc Wed May 26 01:47:02 1993 *************** *** 1,4 **** Copyright (C) 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- *************** *** 111,115 **** Toerless Eckert, Bernhard Fabricius, Mark Friedman, Richard Foulk, ! Glenn Geers, Dave Goldblatt, Dirk Grunwald, Lars Haakedal, Adam Hammer, George Hartzell, Mike Hoffmann, Charles Hulse, --- 110,114 ---- Toerless Eckert, Bernhard Fabricius, Mark Friedman, Richard Foulk, ! Glenn Geers, Dave Goldblatt, Ben Goren, Dirk Grunwald, Lars Haakedal, Adam Hammer, George Hartzell, Mike Hoffmann, Charles Hulse, diff -rNC2 gs26/history.doc gs261/history.doc *** gs26/history.doc Sun Nov 22 15:20:28 1992 --- gs261/history.doc Wed May 12 18:26:14 1993 *************** *** 1,4 **** Copyright (C) 1992 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/humor.doc gs261/humor.doc *** gs26/humor.doc Sun Nov 22 15:23:38 1992 --- gs261/humor.doc Wed May 12 18:26:18 1993 *************** *** 1,4 **** Copyright (C) 1989 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/ialloc.c gs261/ialloc.c *** gs26/ialloc.c Tue May 4 05:28:20 1993 --- gs261/ialloc.c Wed May 12 18:26:20 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/ibnum.c gs261/ibnum.c *** gs26/ibnum.c Mon Feb 1 17:33:20 1993 --- gs261/ibnum.c Wed May 12 18:26:24 1993 *************** *** 1,4 **** /* Copyright (C) 1990, 1991 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/iccfont.c gs261/iccfont.c *** gs26/iccfont.c Mon Feb 1 04:07:56 1993 --- gs261/iccfont.c Tue May 18 11:04:54 1993 *************** *** 1,4 **** ! /* Copyright (C) 1992 Aladdin Enterprises. All rights reserved. ! Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- ! /* Copyright (C) 1992, 1993 Aladdin Enterprises. All rights reserved. This file is part of Ghostscript. *************** *** 27,30 **** --- 26,30 ---- #include "dstack.h" #include "errors.h" + #include "font.h" #include "iname.h" #include "iutil.h" *************** *** 33,38 **** #include "store.h" - extern ref name_StandardEncoding; - /* Forward references */ private int huge --- 33,36 ---- *************** *** 129,150 **** /* We know that more_keys(kp) is true. */ private int near ! cfont_put_next(ref *pdict, key_enum _ss *kep, const ref *pvalue, ! ref * _ss *pencodings) { ref kname; int code; #define kp (&kep->keys) ! if ( *pencodings == 0 ) ! { /* Create the dictionary and look up the encodings. */ code = dict_create(kp->num_enc_keys + kp->num_str_keys + kp->extra_slots, pdict); ! if ( code < 0 ) return code; ! make_string(&kname, 0, 17, (byte *)"ISOLatin1Encoding"); ! if ( dict_find(systemdict, &name_StandardEncoding, &pencodings[0]) <= 0 || ! dict_find(systemdict, &kname, &pencodings[1]) <= 0 ! ) ! return_error(e_undefined); } if ( kp->num_enc_keys ) { const charindex *skp = kp->enc_keys++; ! code = array_get(pencodings[skp->encx], (long)(skp->charx), &kname); kp->num_enc_keys--; } --- 127,143 ---- /* We know that more_keys(kp) is true. */ private int near ! cfont_put_next(ref *pdict, key_enum _ss *kep, const ref *pvalue) { ref kname; int code; #define kp (&kep->keys) ! if ( pdict->value.pdict == 0 ) ! { /* First time, create the dictionary. */ code = dict_create(kp->num_enc_keys + kp->num_str_keys + kp->extra_slots, pdict); ! if ( code < 0 ) ! return code; } if ( kp->num_enc_keys ) { const charindex *skp = kp->enc_keys++; ! code = array_get(®istered_Encodings[skp->encx], (long)(skp->charx), &kname); kp->num_enc_keys--; } *************** *** 154,157 **** --- 147,152 ---- kp->num_str_keys--; } + if ( code < 0 ) + return code; return dict_put(pdict, &kname, pvalue); #undef kp *************** *** 166,175 **** { key_enum kenum; const ref *vp = values; - ref *pencodings[2]; init_key_enum(&kenum, kp, ksa); ! pencodings[0] = 0; while ( more_keys(&kenum) ) { const ref *pvalue = vp++; ! int code = cfont_put_next(pdict, &kenum, pvalue, pencodings); if ( code < 0 ) return code; } --- 161,169 ---- { key_enum kenum; const ref *vp = values; init_key_enum(&kenum, kp, ksa); ! pdict->value.pdict = 0; while ( more_keys(&kenum) ) { const ref *pvalue = vp++; ! int code = cfont_put_next(pdict, &kenum, pvalue); if ( code < 0 ) return code; } *************** *** 184,191 **** str_enum senum; uint attrs = kp->value_attrs; - ref *pencodings[2]; init_key_enum(&kenum, kp, ksa); init_str_enum(&senum, kva); ! pencodings[0] = 0; while ( more_keys(&kenum) ) { ref vstring; --- 178,184 ---- str_enum senum; uint attrs = kp->value_attrs; init_key_enum(&kenum, kp, ksa); init_str_enum(&senum, kva); ! pdict->value.pdict = 0; while ( more_keys(&kenum) ) { ref vstring; *************** *** 197,201 **** else make_null(&vstring); ! code = cfont_put_next(pdict, &kenum, &vstring, pencodings); if ( code < 0 ) return code; } --- 190,194 ---- else make_null(&vstring); ! code = cfont_put_next(pdict, &kenum, &vstring); if ( code < 0 ) return code; } *************** *** 209,216 **** { key_enum kenum; const float *vp = values; - ref *pencodings[2]; ref vnum; init_key_enum(&kenum, kp, ksa); ! pencodings[0] = 0; while ( more_keys(&kenum) ) { float val = *vp++; --- 202,208 ---- { key_enum kenum; const float *vp = values; ref vnum; init_key_enum(&kenum, kp, ksa); ! pdict->value.pdict = 0; while ( more_keys(&kenum) ) { float val = *vp++; *************** *** 220,224 **** else make_real(&vnum, val); ! code = cfont_put_next(pdict, &kenum, &vnum, pencodings); if ( code < 0 ) return code; } --- 212,216 ---- else make_real(&vnum, val); ! code = cfont_put_next(pdict, &kenum, &vnum); if ( code < 0 ) return code; } diff -rNC2 gs26/idebug.c gs261/idebug.c *** gs26/idebug.c Mon Jan 18 17:26:52 1993 --- gs261/idebug.c Wed May 12 18:26:32 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1992 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/idict.c gs261/idict.c *** gs26/idict.c Thu Feb 11 15:57:10 1993 --- gs261/idict.c Wed May 12 18:26:34 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1992 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/idparam.c gs261/idparam.c *** gs26/idparam.c Mon Feb 1 17:40:16 1993 --- gs261/idparam.c Wed May 12 18:26:38 1993 *************** *** 1,4 **** /* Copyright (C) 1992 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/iinit.c gs261/iinit.c *** gs26/iinit.c Sun May 9 12:53:56 1993 --- gs261/iinit.c Fri May 28 17:57:42 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- *************** *** 39,45 **** "Ghostscript"; const int gs_revision = ! 260; /* release number x 100 + the sub-release. */ const long gs_revisiondate = ! 930509; /* year x 10000 + month x 100 + day. */ const long gs_serialnumber = 42; /* a well-known number */ --- 38,44 ---- "Ghostscript"; const int gs_revision = ! 261; /* release number x 100 + the sub-release. */ const long gs_revisiondate = ! 930528; /* year x 10000 + month x 100 + day. */ const long gs_serialnumber = 42; /* a well-known number */ diff -rNC2 gs26/ilevel.h gs261/ilevel.h *** gs26/ilevel.h Tue Feb 9 13:28:44 1993 --- gs261/ilevel.h Wed May 12 18:26:42 1993 *************** *** 1,4 **** /* Copyright (C) 1992 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/impath.ps gs261/impath.ps *** gs26/impath.ps Fri Jan 22 10:11:26 1993 --- gs261/impath.ps Thu May 27 17:59:28 1993 *************** *** 1,4 **** % Copyright (C) 1992 Aladdin Enterprises. All rights reserved. - % Distributed by Free Software Foundation, Inc. % % This file is part of Ghostscript. --- 1,3 ---- *************** *** 48,52 **** % description can be given to type1addpath: to do this, % follow the type1imagepath with ! % 4330 exch dup type1encrypt exch pop % If the description is too complex to fit into the supplied % string, a limitcheck error results. A good rule of --- 47,51 ---- % description can be given to type1addpath: to do this, % follow the type1imagepath with ! % 4330 exch dup .type1encrypt exch pop % If the description is too complex to fit into the supplied % string, a limitcheck error results. A good rule of diff -rNC2 gs26/iname.c gs261/iname.c *** gs26/iname.c Mon May 3 17:33:28 1993 --- gs261/iname.c Wed May 12 18:26:48 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/iname.h gs261/iname.h *** gs26/iname.h Mon Jan 18 17:24:14 1993 --- gs261/iname.h Wed May 12 18:26:48 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/interp.c gs261/interp.c *** gs26/interp.c Tue May 4 13:09:18 1993 --- gs261/interp.c Thu May 20 07:17:06 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- *************** *** 22,25 **** --- 21,25 ---- #include "memory_.h" #include "ghost.h" + #include "stream.h" #include "errors.h" #include "estack.h" *************** *** 31,35 **** #include "packed.h" #include "save.h" - #include "stream.h" #include "store.h" --- 31,34 ---- *************** *** 410,413 **** --- 409,415 ---- case lit(t_shortarray): case nox(t_shortarray):\ case plain(t_device): case plain_exec(t_device) + /* Executable arrays are treated as literals in direct execution. */ + #define cases_lit_array()\ + case exec(t_array): case exec(t_mixedarray): case exec(t_shortarray) cases_lit_1(): cases_lit_2(): *************** *** 415,418 **** --- 417,421 ---- cases_lit_4(): cases_lit_5(): + cases_lit_array(): break; /* Special operators. */ *************** *** 680,695 **** /* state on the e-stack. Note that because of //, */ /* the token may have *any* type and attributes. */ ! switch ( r_type(iosp + 1) ) ! { ! case t_name: case t_string: ! if ( r_has_attr(iosp + 1, a_executable) ) ! break; ! /* Executable arrays aren't executed at the */ ! /* top level -- they're treated as literals. */ ! case t_array: case t_mixedarray: case t_shortarray: ! case t_integer: case t_real: ! ++iosp; goto rt; ! } store_state(iesp); /* Push the file on the e-stack */ --- 683,694 ---- /* state on the e-stack. Note that because of //, */ /* the token may have *any* type and attributes. */ ! /* Note also that executable arrays aren't executed */ ! /* at the top level -- they're treated as literals. */ ! if ( !r_has_attr(iosp + 1, a_executable) || ! r_is_array(iosp + 1) ! ) ! { iosp++; goto rt; ! } store_state(iesp); /* Push the file on the e-stack */ *************** *** 760,764 **** case pt_full_ref+1: if ( iosp >= ostop ) ! return_with_error_short(e_stackoverflow, iref); ++iosp; /* We know that refs are properly aligned: */ --- 759,763 ---- case pt_full_ref+1: if ( iosp >= ostop ) ! return_with_error(e_stackoverflow, iref); ++iosp; /* We know that refs are properly aligned: */ diff -rNC2 gs26/iref.h gs261/iref.h *** gs26/iref.h Thu Apr 15 18:55:26 1993 --- gs261/iref.h Sun May 23 19:19:06 1993 *************** *** 1,4 **** ! /* Copyright (C) 1989, 1992 Aladdin Enterprises. All rights reserved. ! Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- ! /* Copyright (C) 1989, 1992, 1993 Aladdin Enterprises. All rights reserved. This file is part of Ghostscript. *************** *** 105,109 **** /* ! * The encoding of attributes is constrained by two factors: * * - The packed array format requires the high-order bits of the --- 104,108 ---- /* ! * The following factors affect the encoding of attributes: * * - The packed array format requires the high-order bits of the *************** *** 113,118 **** * permission to be adjacent, and in that order from high to low. * ! * The layout given below is the one that leads to the most efficient ! * dispatching in the interpreter. */ --- 112,118 ---- * permission to be adjacent, and in that order from high to low. * ! * - Type testing is most efficient if the type is in a byte by itself. ! * ! * The layout given below results in the most efficient code overall. */ *************** *** 120,139 **** /* Note that these are associated with the *location*, not with the */ /* ref that is *stored* in that location. */ ! #define l_mark 1 /* mark for garbage collector */ /* (not used yet) */ ! #define l_new 2 /* stored into since last save */ /* Attributes visible at the PostScript language level. */ ! #define a_local 4 /* object allocated in local VM */ ! #define a_write 8 ! #define a_read 0x10 ! #define a_execute 0x20 ! #define a_executable 0x40 #define a_readonly (a_read+a_execute) #define a_all (a_write+a_read+a_execute) ! #define r_type_shift 7 #define r_type_bits 6 /* Define the attribute names for debugging printout. */ ! #define attr_print_string "mnlwrxe......???" /* Abstract types */ --- 120,139 ---- /* Note that these are associated with the *location*, not with the */ /* ref that is *stored* in that location. */ ! #define l_mark 2 /* mark for garbage collector */ /* (not used yet) */ ! #define l_new 4 /* stored into since last save */ /* Attributes visible at the PostScript language level. */ ! #define a_local 8 /* object allocated in local VM */ ! #define a_write 0x10 ! #define a_read 0x20 ! #define a_execute 0x40 ! #define a_executable 0x80 #define a_readonly (a_read+a_execute) #define a_all (a_write+a_read+a_execute) ! #define r_type_shift 8 #define r_type_bits 6 /* Define the attribute names for debugging printout. */ ! #define attr_print_string "?mnlwrxe......??" /* Abstract types */ *************** *** 169,174 **** #define r_set_size(rp,siz) ((rp)->tas.rsize = (siz)) /* type_attrs is a single element for fast dispatching in the interpreter */ ! #define r_type(rp) ((rp)->tas.type_attrs >> r_type_shift) ! #define r_has_type(rp,typ) r_has_type_attrs(rp,typ,0) /* see below */ /* A special macro for testing arrayhood. */ #define r_is_array(rp) _r_has_masked_type_attrs(rp,t_array,_t_array_span,0) --- 169,183 ---- #define r_set_size(rp,siz) ((rp)->tas.rsize = (siz)) /* type_attrs is a single element for fast dispatching in the interpreter */ ! #if r_type_shift == 8 ! # if arch_is_big_endian ! # define r_type(rp) (((byte *)&((rp)->tas.type_attrs))[sizeof(ushort)-2]) ! # else ! # define r_type(rp) (((byte *)&((rp)->tas.type_attrs))[1]) ! # endif ! # define r_has_type(rp,typ) (r_type(rp) == (typ)) ! #else ! # define r_type(rp) ((rp)->tas.type_attrs >> r_type_shift) ! # define r_has_type(rp,typ) r_has_type_attrs(rp,typ,0) /* see below */ ! #endif /* A special macro for testing arrayhood. */ #define r_is_array(rp) _r_has_masked_type_attrs(rp,t_array,_t_array_span,0) diff -rNC2 gs26/isave.c gs261/isave.c *** gs26/isave.c Sun Apr 18 18:16:14 1993 --- gs261/isave.c Tue May 25 13:03:28 1993 *************** *** 1,4 **** /* Copyright (C) 1991, 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- *************** *** 103,107 **** /* Structure for saved change chain for save/restore. */ /* If where = 0, contents is a t_array that refers to */ ! /* a newly allocated object; if contents.value.refs is 0, */ /* this is a free record (possible since we allocate them two at a time.) */ /* We merge adjacent objects to reduce */ --- 102,106 ---- /* Structure for saved change chain for save/restore. */ /* If where = 0, contents is a t_array that refers to */ ! /* a newly allocated object; if where = 0 and contents.value.refs is 0, */ /* this is a free record (possible since we allocate them two at a time.) */ /* We merge adjacent objects to reduce */ *************** *** 113,117 **** }; #define alloc_change_is_free(cp)\ ! ((cp)->where == 0 && (cp)->contents.value.refs == 0) /* --- 112,116 ---- }; #define alloc_change_is_free(cp)\ ! ((cp)->where == 0 && r_size(&(cp)->contents) == 0) /* *************** *** 211,215 **** register alloc_change *cp = ap->changes; if ( cp != 0 && cp->where == 0 && - cp->contents.value.refs != 0 && obj == cp->contents.value.refs + r_size(&cp->contents) && /* Don't create a single block that is large enough */ --- 210,213 ---- *************** *** 230,234 **** { if ( cp == 0 || !alloc_change_is_free(cp) ) { /* Allocate a pair of entries. */ ! if_not_alloc_change_pair(cp, ap, "alloc_array") { alloc_free((char *)obj, num_refs, sizeof(ref), --- 228,232 ---- { if ( cp == 0 || !alloc_change_is_free(cp) ) { /* Allocate a pair of entries. */ ! if_not_alloc_change_pair(cp, ap, "alloc_array(change pair)") { alloc_free((char *)obj, num_refs, sizeof(ref), *************** *** 305,309 **** if ( cp == 0 || !alloc_change_is_free(cp) ) { /* Allocate a pair of entries. */ ! if_not_alloc_change_pair(cp, ap, "alloc_save_change") { return -1; } --- 303,307 ---- if ( cp == 0 || !alloc_change_is_free(cp) ) { /* Allocate a pair of entries. */ ! if_not_alloc_change_pair(cp, ap, "alloc_save_change(change pair)") { return -1; } *************** *** 426,430 **** if ( cp->where ) ref_assign(cp->where, &cp->contents); ! else if ( cp->contents.value.refs != 0 ) /* might be an unfilled save record */ { alloc_free((char *)cp->contents.value.refs, r_size(&cp->contents), sizeof(ref), --- 424,428 ---- if ( cp->where ) ref_assign(cp->where, &cp->contents); ! else if ( r_size(&cp->contents) != 0 ) /* might be an unfilled save record */ { alloc_free((char *)cp->contents.value.refs, r_size(&cp->contents), sizeof(ref), *************** *** 441,445 **** *ap = sprev->state; alloc_free((char *)sprev, 1, sizeof(alloc_save), ! "alloc_restore_state"); } --- 439,443 ---- *ap = sprev->state; alloc_free((char *)sprev, 1, sizeof(alloc_save), ! "alloc_restore_state(alloc_save)"); } diff -rNC2 gs26/iscan.c gs261/iscan.c *** gs26/iscan.c Fri Apr 30 04:47:12 1993 --- gs261/iscan.c Thu May 20 07:19:42 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- *************** *** 23,26 **** --- 22,26 ---- #include "ctype_.h" #include "memory_.h" + #include "stream.h" #include "alloc.h" #include "dict.h" /* for //name lookup */ *************** *** 35,39 **** #include "packed.h" #include "store.h" - #include "stream.h" #include "scanchar.h" --- 35,38 ---- *************** *** 96,99 **** --- 95,105 ---- (pda)->is_dynamic = 1,\ (pda)->next = (pda)->base) + /* Begin a dynamically allocated string in a static buffer. */ + #define static_begin_string(pda, count, buf)\ + ((pda)->num_elts = (count),\ + (pda)->elt_size = 1,\ + (pda)->is_dynamic = 0,\ + (pda)->limit = (buf) + (count),\ + (pda)->next = (pda)->base = (buf)) /* Free a dynamic object. */ *************** *** 378,386 **** break; ! /* Handle separately the names that might be a number */ case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': case '.': case '+': case '-': ! name_type = 0; try_number = 1; goto do_name; --- 384,433 ---- break; ! /* Handle separately the names that might be a number. */ case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': + /* We have special fast code for unsigned integers up to 4 digits, */ + /* because these account for a very large proportion of */ + /* all numbers found in PostScript files. */ + if ( sbufavailable_inline(s, sptr, endptr) >= 6 ) + { /* Worst case: 4 digits, \r, \n */ + int i = decoder[c]; + int d; + #define char_is_digit(ch)\ + ((d = decoder[ch]) < 10) + if ( !char_is_digit(sptr[1]) ) + { if ( d != ctype_space ) + goto nn; + sptr++; + goto endi; + } + i = i * 10 + d; + if ( !char_is_digit(sptr[2]) ) + { if ( d != ctype_space ) + goto nn; + sptr += 2; + goto endi; + } + i = i * 10 + d; + if ( !char_is_digit(sptr[3]) ) + { if ( d != ctype_space ) + goto nn; + sptr += 3; + goto endi; + } + if ( decoder[sptr[4]] != ctype_space ) + goto nn; + i = i * 10 + d; + sptr += 4; + endi: /* Check for \r\n */ + if ( *sptr == '\r' && sptr[1] == '\n' ) + sptr++; + make_int_new(myref, i); + break; + #undef char_is_digit + } + /* Handle general possible-numbers. */ case '.': case '+': case '-': ! nn: name_type = 0; try_number = 1; goto do_name; *************** *** 834,842 **** mk_string(ref *pref, da_ptr pda, byte *next) { uint size = (pda->next = next) - pda->base; ! byte *body = alloc_shrink(pda->base, pda->num_elts, size, 1, "scanner(string)"); ! if ( body == 0 ) ! { dynamic_free(pda); ! return_error(e_VMerror); ! } make_tasv_new(pref, t_string, a_all, size, bytes, body); return 0; --- 881,899 ---- mk_string(ref *pref, da_ptr pda, byte *next) { uint size = (pda->next = next) - pda->base; ! byte *body; ! if ( pda->is_dynamic ) ! { body = alloc_shrink(pda->base, pda->num_elts, size, 1, ! "scanner(string)"); ! if ( body == 0 ) ! { dynamic_free(pda); ! return_error(e_VMerror); ! } ! } ! else ! { body = (byte *)alloc(size, 1, "scanner(string)"); ! if ( body == 0 ) ! return_error(e_VMerror); ! memcpy(body, pda->base, size); ! } make_tasv_new(pref, t_string, a_all, size, bytes, body); return 0; *************** *** 848,855 **** { dynamic_area da; register int c; ! register byte *ptr = dynamic_begin(&da, 100, 1); int plevel = 0; - if ( ptr == 0 ) - return_error(e_VMerror); top: while ( 1 ) { switch ( (c = sgetc(s)) ) --- 905,913 ---- { dynamic_area da; register int c; ! #define str_count 50 ! byte str[str_count]; /* faster buffer for short strings */ ! register byte *ptr = static_begin_string(&da, str_count, str); ! #undef str_count int plevel = 0; top: while ( 1 ) { switch ( (c = sgetc(s)) ) *************** *** 927,931 **** byte buf85[buf85_size]; int c; ! byte *ptr = dynamic_begin(&da, 100, 1); if ( ptr == 0 ) return_error(e_VMerror); --- 985,992 ---- byte buf85[buf85_size]; int c; ! #define str_count 50 ! byte str[str_count]; /* faster buffer for short strings */ ! byte *ptr = static_begin_string(&da, str_count, str); ! #undef str_count if ( ptr == 0 ) return_error(e_VMerror); *************** *** 952,956 **** { dynamic_area da; int c1, c2, val1, val2; ! byte *ptr = dynamic_begin(&da, 100, 1); register const byte _ds *decoder = scan_char_decoder; if ( ptr == 0 ) --- 1013,1020 ---- { dynamic_area da; int c1, c2, val1, val2; ! #define str_count 50 ! byte str[str_count]; /* faster buffer for short strings */ ! byte *ptr = static_begin_string(&da, str_count, str); ! #undef str_count register const byte _ds *decoder = scan_char_decoder; if ( ptr == 0 ) diff -rNC2 gs26/iscan.h gs261/iscan.h *** gs26/iscan.h Thu Nov 19 18:45:30 1992 --- gs261/iscan.h Thu May 20 07:16:36 1993 *************** *** 1,4 **** ! /* Copyright (C) 1992 Aladdin Enterprises. All rights reserved. ! Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- ! /* Copyright (C) 1992, 1993 Aladdin Enterprises. All rights reserved. This file is part of Ghostscript. *************** *** 20,23 **** --- 19,23 ---- /* iscan.h */ /* Interface to Ghostscript scanner */ + /* Requires stream.h */ /* Read a token from a stream. */ *************** *** 26,31 **** #define scan_BOS 1 /* binary object sequence */ #define scan_EOF 2 /* end of stream */ ! struct stream_s; ! extern int scan_token(P3(struct stream_s *s, int from_string, ref *pref)); /* Scan a number for cvi or cvr. */ --- 26,30 ---- #define scan_BOS 1 /* binary object sequence */ #define scan_EOF 2 /* end of stream */ ! extern int scan_token(P3(stream *s, int from_string, ref *pref)); /* Scan a number for cvi or cvr. */ diff -rNC2 gs26/iscan2.c gs261/iscan2.c *** gs26/iscan2.c Tue Feb 2 04:15:54 1993 --- gs261/iscan2.c Thu May 20 07:18:04 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- *************** *** 22,25 **** --- 21,25 ---- #include "math_.h" #include "ghost.h" + #include "stream.h" #include "errors.h" #include "alloc.h" *************** *** 33,37 **** #include "save.h" /* for alloc_refs */ #include "store.h" - #include "stream.h" #include "btoken.h" #include "bseq.h" --- 33,36 ---- diff -rNC2 gs26/istack.c gs261/istack.c *** gs26/istack.c Sun Nov 22 14:24:46 1992 --- gs261/istack.c Wed May 12 18:27:12 1993 *************** *** 1,4 **** /* Copyright (C) 1992 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/istack.h gs261/istack.h *** gs26/istack.h Sun Nov 22 14:24:16 1992 --- gs261/istack.h Wed May 12 18:27:14 1993 *************** *** 1,4 **** /* Copyright (C) 1992 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/iutil.c gs261/iutil.c *** gs26/iutil.c Wed Feb 3 07:09:14 1993 --- gs261/iutil.c Wed May 12 18:27:16 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- *************** *** 69,75 **** obj_eq(register const ref *pref1, register const ref *pref2) { ref nref; ! if ( r_btype(pref1) != r_btype(pref2) ) { /* Only a few cases need be considered here: */ ! /* integer/real, name/string, and vice versa. */ switch ( r_type(pref1) ) { --- 68,75 ---- obj_eq(register const ref *pref1, register const ref *pref2) { ref nref; ! if ( r_type(pref1) != r_type(pref2) ) { /* Only a few cases need be considered here: */ ! /* integer/real (and vice versa), name/string */ ! /* (and vice versa), and extended operators. */ switch ( r_type(pref1) ) { *************** *** 93,97 **** break; default: ! return 0; } } --- 93,98 ---- break; default: ! if ( r_btype(pref1) != r_btype(pref2) ) ! return 0; } } *************** *** 237,242 **** int array_get(const ref *aref, long index_long, ref *pref) ! { uint index = (uint)index_long; ! if ( (ulong)index_long >= r_size(aref) ) return_error(e_rangecheck); switch ( r_type(aref) ) --- 238,242 ---- int array_get(const ref *aref, long index_long, ref *pref) ! { if ( (ulong)index_long >= r_size(aref) ) return_error(e_rangecheck); switch ( r_type(aref) ) *************** *** 243,247 **** { case t_array: ! { const ref *pvalue = aref->value.refs + index; ref_assign(pref, pvalue); } return 0; --- 243,248 ---- { case t_array: ! { const ref *pvalue = ! aref->value.refs + (uint)index_long; ref_assign(pref, pvalue); } return 0; *************** *** 248,251 **** --- 249,253 ---- case t_mixedarray: { const ref_packed *packed = aref->value.packed; + uint index = (uint)index_long; for ( ; index--; ) packed = packed_next(packed); packed_get(packed, pref); *************** *** 252,256 **** } return 0; case t_shortarray: ! { const ref_packed *packed = aref->value.packed + index; packed_get(packed, pref); } return 0; --- 254,259 ---- } return 0; case t_shortarray: ! { const ref_packed *packed = ! aref->value.packed + (uint)index_long; packed_get(packed, pref); } return 0; diff -rNC2 gs26/iutil.h gs261/iutil.h *** gs26/iutil.h Wed Nov 25 14:13:16 1992 --- gs261/iutil.h Wed May 12 18:27:20 1993 *************** *** 1,4 **** /* Copyright (C) 1991, 1992 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/iutilasm.asm gs261/iutilasm.asm *** gs26/iutilasm.asm Sun Jan 24 08:43:20 1993 --- gs261/iutilasm.asm Wed May 12 18:27:24 1993 *************** *** 1,4 **** ; Copyright (C) 1989, 1992, 1993 Aladdin Enterprises. All rights reserved. - ; Distributed by Free Software Foundation, Inc. ; ; This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/ivmspace.h gs261/ivmspace.h *** gs26/ivmspace.h Mon Feb 1 02:00:22 1993 --- gs261/ivmspace.h Wed May 12 18:27:26 1993 *************** *** 1,4 **** /* Copyright (C) 1992 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/language.doc gs261/language.doc *** gs26/language.doc Sat Mar 20 12:06:46 1993 --- gs261/language.doc Thu May 27 17:57:14 1993 *************** *** 1,4 **** Copyright (C) 1989-1992 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- *************** *** 108,111 **** --- 107,111 ---- Character and font operators: cshow, xshow, yshow, xyshow + glyphshow findencoding, rootfont, setcachedevice2 (WMode is supported, but composite fonts are not) *************** *** 141,148 **** currentdevparams, setdevparams GlobalFontDirectory - glyphshow makepattern realtime ! setpagedevice startjob --- 141,147 ---- currentdevparams, setdevparams GlobalFontDirectory makepattern realtime ! currentpagedevice, setpagedevice startjob *************** *** 178,200 **** Computes the arc sine of a number between -1 and 1. - Dictionary operators - -------------------- - - setmaxlength - - Changes the capacity of a dictionary, preserving its - contents. Causes a dictfull error if the requested - capacity is less than the current number of occupied - entries. - String operators ---------------- - - stringmatch - Determines whether the string or name matches the given - pattern. In the pattern, `*' matches any substring of - the string, `?' matches any single character, and `\' - quotes the next character. If the first argument is not - a string or name, stringmatch returns true if - patternString is a single *, and false otherwise. type1encrypt --- 177,182 ---- diff -rNC2 gs26/lib.doc gs261/lib.doc *** gs26/lib.doc Sun Feb 9 12:39:34 1992 --- gs261/lib.doc Wed May 12 18:27:34 1993 *************** *** 1,4 **** Copyright (C) 1989 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/main.h gs261/main.h *** gs26/main.h Mon Jan 18 17:12:40 1993 --- gs261/main.h Wed May 12 18:27:50 1993 *************** *** 1,4 **** /* Copyright (C) 1992 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/maint.mak gs261/maint.mak *** gs26/maint.mak Sun May 9 14:26:56 1993 --- gs261/maint.mak Sat May 29 02:50:10 1993 *************** *** 1,4 **** # Copyright (C) 1991, 1992, 1993 Aladdin Enterprises. All rights reserved. - # Distributed by Free Software Foundation, Inc. # # This file is part of Ghostscript. --- 1,3 ---- *************** *** 42,48 **** # ---------------- Make files for Kermit transmission ---------------- ! TARDLLS= \windows\system\shell.dll \windows\system\commdlg.dll ! TARS=tar1.be tar2.be tar3a.be tar3b.be tar3c.be tar4a.be tar4b.be tar5.be tar6.be tar7.be xmit: $(TARS) --- 41,55 ---- # ---------------- Make files for Kermit transmission ---------------- ! TARS=tar1.be tar2.be ! FILES1=*.1 gs*.bat bdftops.bat font2c.bat ps2*.bat *.doc ! FILES2=*.ps fontmap.* copying news readme bdftops font2c ps2*. ! RM_FILES=c_*.* q* q*.* t.* comp1.* ! SRC10=\rm.bat \cp.bat \mv.bat ! SRC11=g*.asm i*.asm ansi2knr.c echogs.c ega.c turboc.cfg gs*.def ! SRC12=*.icx gs*.rc *.h *.mak *.sh *.tr tar_*. ugly*.* gs*. ccgs ! RM_SRC11=arch.h c_*.* gconfig*.h n*.h n*.mak l*.tr o*.tr ! RM_SRC12=ugly*.bdf q* q*.* t.* comp1.* _temp*.* ! SRC2=g*.c i*.c s*.c z*.c xmit: $(TARS) *************** *** 52,57 **** xfonts: tar8.be ! xfer: tar1.z tar2.z tar3a.z tar3b.z tar3c.z tar4a.z tar4b.z \ ! tar5.z tar6.z tar7.z @echo ---------------- Insert diskette: @command /c pause --- 59,63 ---- xfonts: tar8.be ! xfer: tar1.z tar2.z @echo ---------------- Insert diskette: @command /c pause *************** *** 66,80 **** bed $*.z $*.be erase $*.z ! .tz.be: ! bed $*.tz $*.be ! erase $*.tz ! ! gs-tests.tz: ! erase \tmp\*.ps ! for %f in (grayalph moore phr2 golfer3d cmyk nurse hebrew bali4 lev2ex2) do copy \gs\ps\%f.ps \tmp ! tar -b1 -cf _temp_.t \tmp\*.ps ! gzip _temp_.t ! if exist gs-tests.tz erase gs-tests.tz ! rename _temp_.tz gs-tests.tz # We don't make tar0.z a dependent of gs.exe, because that forces --- 72,86 ---- bed $*.z $*.be erase $*.z ! .taz.be: ! bed $*.taz $*.be ! erase $*.taz ! ! gs-tests.taz: ! cd \gs\test ! tar -b1 -cf \gs\_temp_.tar *.ps ! cd \gs ! gzip _temp_.tar ! if exist gs-tests.taz erase gs-tests.taz ! rename _temp_.taz gs-tests.taz # We don't make tar0.z a dependent of gs.exe, because that forces *************** *** 87,164 **** @if not exist gswin.exe echo gswin.exe does not exist, do you want to proceed? @if not exist gswin.exe pause ! tar -b1 -cf _temp_.t -uexe gs*.exe $(TARDLLS) ! gzip _temp_.t if exist tar0.z erase tar0.z ! rename _temp_.tz tar0.z ! tar1.z: bdftops.bat font2c.bat ! tar -b1 -cf _temp_.t -ubat g*.asm i*.asm gs*.bat bdftops.bat font2c.bat ps2*.bat ! gzip _temp_.t if exist tar1.z erase tar1.z ! rename _temp_.tz tar1.z ! tar2.z: \cp.bat \mv.bat \rm.bat ansi2knr.c echogs.c ega.c uniq.c ! copy \cp.bat ! copy \mv.bat ! copy \rm.bat ! tar -b1 -cf _temp_.t -ubat cp.bat mv.bat rm.bat ansi2knr.c echogs.c ega.c uniq.c ! gzip _temp_.t if exist tar2.z erase tar2.z ! rename _temp_.tz tar2.z ! ! tar3a.z: gs.c ! tar -b1 -cf _temp_.t gs*.c ! gzip _temp_.t ! if exist tar3a.z erase tar3a.z ! rename _temp_.tz tar3a.z ! ! tar3b.z: gxfill.c ! tar -b1 -cf _temp_.t gx*.c ! gzip _temp_.t ! if exist tar3b.z erase tar3b.z ! rename _temp_.tz tar3b.z ! ! tar3c.z: gconfig.c genarch.c ! tar -b1 -cf _temp_.t gdev*.c gp_*.c gconfig.c genarch.c ! gzip _temp_.t ! if exist tar3c.z erase tar3c.z ! rename _temp_.tz tar3c.z ! ! tar4a.z: interp.c stream.c turboc.cfg history.doc gstext.icx ! tar -b1 -cf _temp_.t -udef i*.c s*.c turboc.cfg gs*.def *.doc *.icx gs*.rc ! gzip _temp_.t ! if exist tar4a.z erase tar4a.z ! rename _temp_.tz tar4a.z ! ! tar4b.z: zarith.c ! tar -b1 -cf _temp_.t z*.c ! gzip _temp_.t ! if exist tar4b.z erase tar4b.z ! rename _temp_.tz tar4b.z ! ! tar5.z: gs.h gs.mak ! tar -b1 -cf _temp_.t *.1 *.h *.mak *.sh *.tr tar_*. ! gzip _temp_.t ! if exist tar5.z erase tar5.z ! rename _temp_.tz tar5.z ! ! tar6.z: gs_init.ps uglyr.gsf ! tar -b1 -cf _temp_.t *.ps ugly*.* ! gzip _temp_.t ! if exist tar6.z erase tar6.z ! rename _temp_.tz tar6.z ! ! tar7.z: fontmap copying news readme bdftops font2c ps2ascii ccgs ! copy fontmap.gs fontmap ! tar -b1 -cf _temp_.t fontmap.* copying news readme bdftops font2c ps2*. gs*. ccgs ! gzip _temp_.t ! if exist tar7.z erase tar7.z ! rename _temp_.tz tar7.z tar8.z: fonts\bchr.gsf fonts\hrsy_r.gsf ! tar -b1 -cf _temp_.t fonts/*.gsf ! gzip _temp_.t if exist tar8.z erase tar8.z ! rename _temp_.tz tar8.z # ---------------- Make MS-DOS diskette sets ---------------- --- 93,134 ---- @if not exist gswin.exe echo gswin.exe does not exist, do you want to proceed? @if not exist gswin.exe pause ! tar -b1 -cf _temp_.tar -uexe -uico -ures gs*.exe gs*.ico gs*.res ! gzip _temp_.tar if exist tar0.z erase tar0.z ! rename _temp_.taz tar0.z ! STAGING=\gs\master\staging ! ! tar1.z: ! erase $(STAGING)\*.* <\y ! for %f in ($(FILES1)) do xcopy %f $(STAGING) ! for %f in ($(FILES2)) do xcopy %f $(STAGING) ! for %f in ($(SRC10)) do xcopy %f $(STAGING) ! for %f in ($(SRC11)) do xcopy %f $(STAGING) ! for %f in ($(SRC12)) do xcopy %f $(STAGING) ! cd $(STAGING) ! rm $(RM_FILES) ! xcopy \gs\quit.ps ! rm $(RM_SRC11) ! rm $(RM_SRC12) ! copy fontmap.gs fontmap ! tar -b1 -cf \gs\_temp_.tar -ubat -udef *.* ! erase $(STAGING)\*.* <\y ! cd \gs ! gzip _temp_.tar if exist tar1.z erase tar1.z ! rename _temp_.taz tar1.z ! tar2.z: gs.c ! tar -b1 -cf _temp_.tar g*.c i*.c s*.c z*.c ! gzip _temp_.tar if exist tar2.z erase tar2.z ! rename _temp_.taz tar2.z tar8.z: fonts\bchr.gsf fonts\hrsy_r.gsf ! tar -b1 -cf _temp_.tar fonts/*.gsf ! gzip _temp_.tar if exist tar8.z erase tar8.z ! rename _temp_.taz tar8.z # ---------------- Make MS-DOS diskette sets ---------------- *************** *** 188,192 **** pkzip _temp_.zip gs*.exe if exist gs386.exe pkzip -a _temp_.zip \watc\bin\dos4gw.exe ! if exist gswin.exe pkzip -a _temp_.zip $(TARDLLS) if exist gsexe.zip erase gsexe.zip rename _temp_.zip gsexe.zip --- 158,162 ---- pkzip _temp_.zip gs*.exe if exist gs386.exe pkzip -a _temp_.zip \watc\bin\dos4gw.exe ! if exist gswin.exe pkzip -a _temp_.zip \windows\system\shell.dll \windows\system\commdlg.dll gs*.ico gs*.res if exist gsexe.zip erase gsexe.zip rename _temp_.zip gsexe.zip *************** *** 194,200 **** gsfiles.zip: bdftops.bat if exist _temp_.zip erase _temp_.zip ! pkzip _temp_.zip gs*.bat bdftops.bat font2c.bat ps2*.bat *.doc ! pkzip -a _temp_.zip *.ps fontmap.* copying news readme bdftops font2c ps2*. ! pkzip -d _temp_.zip q* q*.* t.* comp1.* if exist gsfiles.zip erase gsfiles.zip rename _temp_.zip gsfiles.zip --- 164,171 ---- gsfiles.zip: bdftops.bat if exist _temp_.zip erase _temp_.zip ! pkzip _temp_.zip $(FILES1) ! pkzip -a _temp_.zip $(FILES2) ! pkzip -d _temp_.zip $(RM_FILES) ! pkzip -a _temp_.zip quit.ps if exist gsfiles.zip erase gsfiles.zip rename _temp_.zip gsfiles.zip *************** *** 202,212 **** gssrc1.zip: ansi2knr.c if exist _temp_.zip erase _temp_.zip ! pkzip _temp_.zip \rm.bat \cp.bat \mv.bat ! pkzip -a _temp_.zip g*.asm i*.asm ! pkzip -a _temp_.zip ansi2knr.c echogs.c ega.c uniq.c turboc.cfg gs*.def *.icx gs*.rc ! pkzip -a _temp_.zip *.1 *.h *.mak *.sh *.tr tar_*. ugly*.* ! pkzip -a _temp_.zip gs*. ccgs ! pkzip -d _temp_.zip arch.h gconfig*.h obj*.tr lib*.tr _temp*.* ! pkzip -d _temp_.zip ugly*.bdf libc*.tr q* q*.* t.* comp1.* if exist gssrc1.zip erase gssrc1.zip rename _temp_.zip gssrc1.zip --- 173,181 ---- gssrc1.zip: ansi2knr.c if exist _temp_.zip erase _temp_.zip ! pkzip _temp_.zip $(SRC10) ! pkzip -a _temp_.zip $(SRC11) ! pkzip -a _temp_.zip $(SRC12) ! pkzip -d _temp_.zip $(RM_SRC11) ! pkzip -d _temp_.zip $(RM_SRC12) if exist gssrc1.zip erase gssrc1.zip rename _temp_.zip gssrc1.zip *************** *** 214,219 **** gssrc2.zip: gs.c if exist _temp_.zip erase _temp_.zip ! pkzip _temp_.zip g*.c i*.c s*.c z*.c ! pkzip -d _temp_.zip comp1.* if exist gssrc2.zip erase gssrc2.zip rename _temp_.zip gssrc2.zip --- 183,187 ---- gssrc2.zip: gs.c if exist _temp_.zip erase _temp_.zip ! pkzip _temp_.zip $(SRC2) if exist gssrc2.zip erase gssrc2.zip rename _temp_.zip gssrc2.zip diff -rNC2 gs26/make.doc gs261/make.doc *** gs26/make.doc Fri May 7 08:20:12 1993 --- gs261/make.doc Fri May 28 17:57:00 1993 *************** *** 1,4 **** Copyright (C) 1989, 1990, 1991, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- *************** *** 421,424 **** --- 420,425 ---- without optimization (no -O) AIX 3.2.0 or 3.2.1, cc, unix-cc.mak, no -O + It may be that just including -Dconst= in the command line is + sufficient to get around the bugs in the AIX 3.1.5 compiler. Apparently some (but not all) releases of the C library declare the hypot *************** *** 462,465 **** --- 463,481 ---- trying to load Ghostscript. If this happens, use gdb instead. (gdb is more reliable than dbx in other ways as well.) + Solaris 2.2 may require setting EXTRALIBS=-lsocket. + In SunOS 4.1.[23], you may get these undefined symbols when linking: + _get_wmShellWidgetClass + _get_applicationShellWidgetClass + Compiling "-Bstatic -lXmu -Bdynamic" appears to work. To solve the + problem if you are using OpenWindows 3.0 (X11R4-based Xt), please contact + your local Sun office and request the following patches: + Patch i.d. Description + 100512-02 4.1.x OpenWindows 3.0 libXt Jumbo patch + 100573-03 4.1.x OpenWindows 3.0 undefined symbols when using + shared libXmu + A source patch for use with the MIT X11R4 libraries was developed by Conrad + Kimball (cek@sdc.boeing.com); it retrofits into R4 some fixes made in R5 to + get around this problem. The patch is on export in [1/93] + contrib/X11R4_sunos4.1.2_patch_version3.Z System V Unix platforms: *************** *** 467,470 **** --- 483,488 ---- and gettimeofday, change PLATFORM=unix_ in the makefile to PLATFORM=sysv_. + You will probably need to change the definition of INSTALL (near + the beginning of the makefile) from install to /usr/ucb/install. ******** diff -rNC2 gs26/malloc_.h gs261/malloc_.h *** gs26/malloc_.h Wed Sep 30 03:50:42 1992 --- gs261/malloc_.h Wed May 19 05:11:34 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1992 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- *************** *** 34,38 **** extern char *malloc(); # else /* should really be a POSIX define */ ! # if defined(_HPUX_SOURCE) || defined(__CONVEX__) || defined(__convex__) || defined(__OSF__) || defined(__386BSD__) # include # else --- 33,37 ---- extern char *malloc(); # else /* should really be a POSIX define */ ! # if defined(_HPUX_SOURCE) || defined(__CONVEX__) || defined(__convex__) || defined(__OSF__) || defined(__386BSD__) || defined(__STDC__) # include # else diff -rNC2 gs26/markpath.ps gs261/markpath.ps *** gs26/markpath.ps Mon Apr 5 16:01:18 1993 --- gs261/markpath.ps Wed May 12 18:28:02 1993 *************** *** 1,4 **** % Copyright (C) 1993 Aladdin Enterprises. All rights reserved. - % Distributed by Free Software Foundation, Inc. % % This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/math_.h gs261/math_.h *** gs26/math_.h Wed Sep 16 18:06:46 1992 --- gs261/math_.h Wed May 12 18:28:04 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1992 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/memory_.h gs261/memory_.h *** gs26/memory_.h Sun Feb 7 10:52:48 1993 --- gs261/memory_.h Fri May 28 18:53:58 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- *************** *** 43,61 **** # define memcpy(dest,src,len) bcopy(src,dest,len) # define memcmp(b1,b2,len) bcmp(b1,b2,len) ! /* Define our own version of memset */ ! # if defined(__STDC__) && !defined(UTEK) ! static void memset(void *dest, register char ch, unsigned len) ! # else ! static void memset(dest, ch, len) ! char *dest; register char ch; unsigned len; ! # endif /* (!)__STDC__, ... */ ! { if ( ch == 0 ) ! bzero(dest, len); ! else if ( len > 0 ) ! { register char *p = (char *)dest; ! register unsigned count = len; ! do { *p++ = ch; } while ( --count ); ! } ! } # else /* !BSD4_2 */ # if defined(_POSIX_SOURCE) || defined(_HPUX_SOURCE) || defined(__WATCOMC__) || defined(THINK_C) --- 42,52 ---- # define memcpy(dest,src,len) bcopy(src,dest,len) # define memcmp(b1,b2,len) bcmp(b1,b2,len) ! /* Define our own versions of missing routines (in gsmisc.c). */ ! # define memory__need_memset ! extern void memset(P3(void *, char, unsigned)); ! # if defined(UTEK) ! # define memory__need_memchr ! extern const char *memchr(P3(const void *, char, unsigned)); ! # endif # else /* !BSD4_2 */ # if defined(_POSIX_SOURCE) || defined(_HPUX_SOURCE) || defined(__WATCOMC__) || defined(THINK_C) diff -rNC2 gs26/mergeini.ps gs261/mergeini.ps *** gs26/mergeini.ps Tue Nov 24 15:36:22 1992 --- gs261/mergeini.ps Wed May 12 18:28:08 1993 *************** *** 1,4 **** % Copyright (C) 1992 Aladdin Enterprises. All rights reserved. - % Distributed by Free Software Foundation, Inc. % % This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/msc.mak gs261/msc.mak *** gs26/msc.mak Wed May 5 17:58:34 1993 --- gs261/msc.mak Sun May 16 09:00:18 1993 *************** *** 1,4 **** # Copyright (C) 1991, 1992 Aladdin Enterprises. All rights reserved. - # Distributed by Free Software Foundation, Inc. # # This file is part of Ghostscript. --- 1,3 ---- *************** *** 88,98 **** CPU_TYPE=286 ! # Define the math coprocessor (FPU) type. Options are 0, 287, or 387. # If the CPU type is 486, the FPU type is irrelevant, since the 80486 # CPU includes the equivalent of an 80387 on-chip. ! # A non-zero option means that the executable will only run if a FPU # of that type (or higher) is available: this is NOT currently checked # at runtime. - # Code is significantly faster. FPU_TYPE=0 --- 87,98 ---- CPU_TYPE=286 ! # Define the math coprocessor (FPU) type. ! # Options are -1 (optimize for no FPU), 0 (optimize for FPU present, ! # but do not require a FPU), 87, 287, or 387. # If the CPU type is 486, the FPU type is irrelevant, since the 80486 # CPU includes the equivalent of an 80387 on-chip. ! # An xx87 option means that the executable will run only if a FPU # of that type (or higher) is available: this is NOT currently checked # at runtime. FPU_TYPE=0 *************** *** 120,127 **** XE=.exe - # Define the need for uniq. - - UNIQ=uniq$(XE) - # Define the current directory prefix, shell quote string, and shell name. --- 120,123 ---- *************** *** 161,165 **** !endif ! !if $(CPU_TYPE)==486 || $(FPU_TYPE)!=0 FPFLAGS=/FPi87 !else --- 157,161 ---- !endif ! !if $(CPU_TYPE)==486 || $(FPU_TYPE)>0 FPFLAGS=/FPi87 !else *************** *** 223,231 **** $(CCL) $(CCFLAGS) genarch.c ! # We need a substitute for the Unix uniq utility. ! # It only has to handle stdin and stdout, no options. ! ! uniq$(XE): uniq.c ! $(CCL) $(CCFLAGS) uniq.c # ------ Devices and features ------ # --- 219,224 ---- $(CCL) $(CCFLAGS) genarch.c ! genconf$(XE): genconf.c ! $(CCL) $(CCFLAGS) genconf.c # ------ Devices and features ------ # diff -rNC2 gs26/n.h gs261/n.h *** gs26/n.h Thu Apr 1 10:49:38 1993 --- gs261/n.h *************** *** 1,5 **** - /* Additions to std.h */ - - typedef unsigned char bool; - #define false 0 - #define true 1 --- 0 ---- diff -rNC2 gs26/nalloc.h gs261/nalloc.h *** gs26/nalloc.h Thu Apr 8 17:17:58 1993 --- gs261/nalloc.h *************** *** 1,209 **** - /* Copyright (C) 1991, 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. - - This file is part of Ghostscript. - - Ghostscript is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY. No author or distributor accepts responsibility - to anyone for the consequences of using it or for whether it serves any - particular purpose or works at all, unless he says so in writing. Refer - to the Ghostscript General Public License for full details. - - Everyone is granted permission to copy, modify and redistribute - Ghostscript, but only under the conditions described in the Ghostscript - General Public License. A copy of this license is supposed to have been - given to you along with Ghostscript so you can know your rights and - responsibilities. It should be in a file named COPYING. Among other - things, the copyright notice and this notice must be preserved on all - copies. */ - - /* nalloc.h */ - /* Library client interface for new Ghostscript allocator */ - - /* Define the type for the size of an object. */ - typedef uint usize_t; - - /* Define the type for identifying an allocator client. */ - typedef const char _ds *client_name_t; - - /* Define the type for an allocator instance. */ - struct alloc_state_s; - typedef struct alloc_state_s _ds *as_ptr_t; - - /* Define the type for a structure descriptor. */ - struct struct_type_s; - typedef const struct struct_type_s _ds *at_ptr_t; - - /* Define the type for allocator statistics. */ - typedef struct alloc_status_s { - ulong allocated; - ulong used; - } alloc_status_t; - - /* Define the allocator client procedures */ - typedef struct alloc_procs_s alloc_procs_t; - struct alloc_procs_s { - - /* Allocate a structure */ - #define alloc_proc_alloc_struct(proc)\ - void *proc(P3(as_ptr_t, at_ptr_t, client_name_t)) - alloc_proc_alloc_struct((*alloc_struct)); - #define gs_alloc_struct(ap,tp,cn) (*(ap)->procs.alloc_struct)(ap,tp,cn) - - /* Allocate (aligned) bytes */ - #define alloc_proc_alloc_bytes(proc)\ - byte *proc(P4(as_ptr_t, uint, uint, client_name_t)) - alloc_proc_alloc_bytes((*alloc_bytes)); - #define gs_alloc_bytes(ap,es,n,cn) (*(ap)->procs.alloc_bytes)(ap,es,n,cn) - - /* Change the size of a byte object */ - #define alloc_proc_resize(proc)\ - byte *proc(P5(as_ptr_t, byte *, uint, uint, client_name_t)) - alloc_proc_resize((*resize)); - #define gs_resize(ap,p,es,n,cn) (*(ap)->procs.resize)(ap,p,es,n,cn) - - /* Free an object (structure or bytes) */ - #define alloc_proc_free(proc)\ - void proc(P3(as_ptr_t, void *, client_name_t)) - alloc_proc_free((*free)); - #define gs_free(ap,p,cn) (*(ap)->procs.free)(ap,p,cn) - - /* Report status (assigned, used) */ - #define alloc_proc_status(proc)\ - void proc(P2(as_ptr_t, alloc_status_t *)) - alloc_proc_status((*status)); - #define gs_alloc_status(ap,s) (*(ap)->procs.status)(ap,s) - - }; - - /* Define the generic allocator state. */ - /* "Subclasses" will extend this. */ - #define alloc_state_common\ - alloc_procs_t procs;\ - as_ptr_t parent /* for chunks & large blocks */ - struct alloc_state_s { - alloc_state_common; - }; - - /* Define the standard Ghostscript allocator implementation. */ - extern const alloc_procs_t gs_alloc_std_procs; - - /* ====== Root-registering clients ====== */ - union struct_header_s; - - /* Chunks are "objects", i.e. they have a header that identifies */ - /* which implementation is being used. */ - typedef struct chunk_s chunk_t; - typedef struct chunk_locator_s chunk_locator_t; - typedef chunk_locator_t _ss *cl_ptr_t; - - /* Define the type for a pointer descriptor. */ - typedef struct ptr_procs_s { - - /* Mark the referent of a pointer. */ - #define ptr_proc_mark(proc)\ - bool proc(P1(void *)) - ptr_proc_mark((*mark)); - - /* Relocate a pointer. */ - #define ptr_proc_reloc(proc)\ - void *proc(P2(void *, cl_ptr_t)) - ptr_proc_reloc((*reloc)); - - } ptr_procs_t; - typedef const ptr_procs_t _ds *ptr_type_t; - - /* Define the pointer type for ordinary structure pointers. */ - extern const ptr_procs_t ptr_struct_procs; - #define ptr_struct_type (&ptr_struct_procs) - - /* Define the type for a GC root. */ - typedef struct gc_root_s gc_root_t; - struct gc_root_s { - gc_root_t *next; - ptr_type_t ptype; - void **p; - }; - - /* Register/unregister a root. */ - void gs_struct_root_register(P3(as_ptr_t, gc_root_t *, void **)); - void gs_root_unregister(P2(as_ptr_t, gc_root_t *)); - - /* ====== Structure-defining clients ====== */ - /* These are clients who define new types of structure. */ - - /* Object contents enumerator type */ - #define mark_enum_proc(proc)\ - ptr_type_t proc(P3(void *ptr, uint index, void ***pep)) - - /* Object type */ - typedef struct struct_type_s { - usize_t size; - const char _ds *sname; - mark_enum_proc((*gc_mark_proc)); - void (*pre_gc_proc)(P1(void *)); - void (*post_gc_proc)(P1(void *)); - void (*finalize_proc)(P1(void *)); - } struct_type_t; - /* Default object procedures. */ - extern mark_enum_proc(no_gc_mark_proc); - extern void no_pre_gc_proc(P1(void *)), - no_post_gc_proc(P1(void *)), - no_finalize_proc(P1(void *)); - /* Macros for defining structure types. */ - #define struct_type(stype, sname, mark, pre, post, finalize)\ - { sizeof(stype), sname, mark, pre, post, finalize } - #define simple_struct_type(stype, sname, proc)\ - struct_type(stype, sname, proc, no_pre_gc_proc, no_post_gc_proc, no_finalize_proc) - #define data_struct_type(stype, sname)\ - simple_struct_type(stype, sname, no_gc_mark_proc) - - /* - * The pointers in most structures consist only of a fixed set. - * We provide some macros to simplify defining structures like this. - */ - /* - * The structure of the mark procedure is stylized: - * ptr_type_t proc(void *ptr, uint index, void ***pep) - * { switch_indexN(stype, member1, ..., memberN); - * } - */ - #ifdef offset_of - /* Implement using a table of offsets. */ - #define _si_begin()\ - static int offsets[] = { - #define _si_case(i,stype,m)\ - offset_of(stype, m), - #define _si_end()\ - 0 };\ - if ( index >= countof(offsets) ) return NULL;\ - else { *pep = (void **)((char *)ptr + offsets[index]); return ptr_struct_type; } - #else /* !defined(offset_of) */ - /* Implement using a switch. */ - #define _si_begin()\ - switch ( index ) { - #define _si_case(i,stype,m)\ - case i: *pep = (void **)&((stype *)ptr)->m; break; - #define _si_end()\ - default: return NULL;\ - } return ptr_struct_type - #endif - - #define _si_case2(i,stype,m1,m2)\ - _si_case(i,stype,m1) _si_case(i+1,stype,m2) - #define _si_case4(i,stype,m1,m2,m3,m4)\ - _si_case2(i,stype,m1,m2) _si_case2(i+2,stype,m3,m4) - #define switch_index0(stype)\ - _si_begin()_si_end() - #define switch_index1(stype,m1)\ - _si_begin()_si_case(0,stype,m1)_si_end() - #define switch_index2(stype,m1,m2)\ - _si_begin()_si_case2(0,stype,m1,m2)_si_end() - #define switch_index3(stype,m1,m2,m3)\ - _si_begin()_si_case2(0,stype,m1,m2)_si_case(2,stype,m3)_si_end() - #define switch_index4(stype,m1,m2,m3,m4)\ - _si_begin()_si_case4(0,stype,m1,m2,m3,m4)_si_end() - #define switch_index5(stype,m1,m2,m3,m4,m5)\ - _si_begin()_si_case4(0,stype,m1,m2,m3,m4)_si_case(4,stype,m5)_si_end() - #define switch_index6(stype,m1,m2,m3,m4,m5,m6)\ - _si_begin()_si_case4(0,stype,m1,m2,m3,m4)_si_case2(4,stype,m5,m6)_si_end() --- 0 ---- diff -rNC2 gs26/nmman.h gs261/nmman.h *** gs26/nmman.h Fri Apr 23 18:05:04 1993 --- gs261/nmman.h *************** *** 1,178 **** - /* Copyright (C) 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. - - This file is part of Ghostscript. - - Ghostscript is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY. No author or distributor accepts responsibility - to anyone for the consequences of using it or for whether it serves any - particular purpose or works at all, unless he says so in writing. Refer - to the Ghostscript General Public License for full details. - - Everyone is granted permission to copy, modify and redistribute - Ghostscript, but only under the conditions described in the Ghostscript - General Public License. A copy of this license is supposed to have been - given to you along with Ghostscript so you can know your rights and - responsibilities. It should be in a file named COPYING. Among other - things, the copyright notice and this notice must be preserved on all - copies. */ - - /* nmman.h */ - /* New memory manager internal definitions for Ghostscript */ - /****** FIX THIS ******/ - /*#include "gxbitmap.h" **/ - #define align_bitmap_mod 4 - - /* ====== Allocator ====== */ - - /* Define the alignment modulus for aligned objects. */ - #define alloc_align_mod\ - max(max(arch_align_long_mod, arch_align_ptr_mod),\ - max(arch_align_double_mod, align_bitmap_mod)) - #define log2_alloc_align_mod small_exact_log2(alloc_align_mod) - #define alloc_align_mask (alloc_align_mod-1) - #define alloc_align_round(siz)\ - (uint)(((siz) + alloc_align_mask) & -alloc_align_mod) - #define alloc_size_round(siz)\ - alloc_align_round((siz) + sizeof(struct_header_t)) - - /* Structure header. */ - /* There are 3 different formats, as indicated below. */ - /* Note that we force the size of a structure header to be a multiple of */ - /* alloc_align_mod. The structure size does not include the header, */ - /* and is not rounded. */ - typedef union struct_header_s struct_header_t; - /* Flags in all formats */ - struct struct_header_h_s { - unsigned mark : 1, large : 1, bytes : 1; - }; - /* Ordinary typed structure: large = 0, bytes = 0 */ - struct struct_header_s_s { - unsigned _ : 3, reloc8 : 13; - at_ptr_t type; - }; - /* Plain (but aligned) bytes: large = 0, bytes = 1 */ - struct struct_header_b_s { - unsigned _ : 3, reloc8 : 13; - ushort size; - }; - /* Large bytes (in a chunk by themselves): large = 1, bytes = 1 */ - struct struct_header_l_s { - unsigned _ : 3, lsize : 13; - ushort size; - }; - union struct_header_s { - struct struct_header_h_s h; - struct struct_header_s_s s; - struct struct_header_b_s b; - struct struct_header_l_s l; - /* Force size up to a multiple of alloc_align_mod */ - byte _[alloc_align_round(sizeof(struct struct_header_s_s))]; - }; - #define struct_contents_size(shp)\ - ((shp)->h.bytes ? (shp)->b.size : (shp)->s.type->size) - #define struct_rounded_size(shp)\ - alloc_size_round(struct_contents_size(shp)) - #define struct_large_size(shp)\ - (((ulong)(shp)->l.lsize << 16) + (shp)->l.size) - #define struct_next(shp)\ - ((struct_header_t *)((byte *)(shp) + struct_rounded_size(shp))) - - /* ====== Chunks ====== */ - - #define declare_chunk_procs(dscope, ctype, init, status, gc_init, next_component, gc_set_reloc, gc_do_reloc, gc_compact)\ - \ - /* Initialize the chunk. */\ - dscope void init(P3(ctype *, byte *, usize_t));\ - \ - /* Return the space allocated and used. */\ - dscope void status(P2(ctype *, alloc_status_t *));\ - \ - /**** The rest of the procedures are only for the GC. ****/\ - \ - /* Initialize for a GC by clearing marks. */\ - dscope void gc_init(P1(ctype *));\ - \ - /* Return a pointer to the next component. */\ - dscope ptr_type_t next_component(P2(ctype *, void **));\ - \ - /* Compute and store relocation amounts. */\ - dscope void gc_set_reloc(P2(ctype *, cl_ptr_t));\ - \ - /* Relocate pointers. */\ - dscope void gc_do_reloc(P2(ctype *, cl_ptr_t));\ - \ - /* Compact to remove unmarked components. */\ - dscope void gc_compact(P1(ctype *)) - - #define chunk_procs_struct(ctype)\ - struct {\ - declare_chunk_procs(, ctype, (*init), (*status), (*gc_init), (*next_component), (*gc_set_reloc), (*gc_do_reloc), (*gc_compact));\ - } - typedef chunk_procs_struct(chunk_t) chunk_procs_t; - #define chunk_common\ - const chunk_procs_t _ds *procs;\ - byte *cbot, *ctop;\ - chunk_t *cprev, *cnext /* sorted by address */ - struct chunk_s { - chunk_common; - }; - - /* Find the chunk for a pointer. */ - #define ptr_is_in_chunk(ptr, cp)\ - ptr_between((byte *)ptr, (cp)->cbot, (cp)->ctop) - struct chunk_locator_s { - chunk_t *cp; /* one-element cache */ - }; - extern bool chunk_locate_ptr(P2(byte *, cl_ptr_t)); - #define chunk_locate(ptr, clp)\ - (ptr_is_in_chunk((byte *)(ptr), (clp)->cp) ||\ - chunk_locate_ptr((byte *)(ptr), clp)) - - /* Allocate a chunk. */ - extern chunk_t *alloc_add_chunk(P4(as_ptr_t, at_ptr_t, uint, - const chunk_procs_t _ds *)); - - /* ------ Concrete chunks ------ */ - - /* Many small structures. */ - typedef struct { - chunk_common; - struct_header_t *top; - } chunk_structs_t; - - /* One large structure. */ - typedef struct { - chunk_common; - } chunk_large_struct_t; - - /* Refs and strings. */ - typedef struct { - chunk_common; - struct ref_s *rtop; - byte *ibot, *itop; - /* Rest is for GC */ - byte *ibits; - byte *ibase; - usize_t ibitsize; - ushort *ireloc; - uint imove; - } chunk_refs_t; - - /* ====== Definition of allocator state ====== */ - - typedef struct std_alloc_state_s std_alloc_state_t; - struct std_alloc_state_s { - alloc_state_common; - chunk_structs_t ccs; /* current structs chunk */ - chunk_structs_t *pccs; /* where to put ccs */ - chunk_refs_t ccrs; /* current refs chunk */ - chunk_refs_t *pccrs; /* where to put ccrs */ - uint chunk_size; - uint large_size; /* min size for large chunk */ - gc_root_t *roots; - chunk_t chunk_min, chunk_max; /* head and tail of chunk list */ - }; - - /* Cast an as_ptr_t argument to a std_alloc_state_t. */ - #define asp ((std_alloc_state_t *)ap) --- 0 ---- diff -rNC2 gs26/npacked.h gs261/npacked.h *** gs26/npacked.h Sun Jan 24 08:02:38 1993 --- gs261/npacked.h *************** *** 1,108 **** - /* Copyright (C) 1991, 1992 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. - - This file is part of Ghostscript. - - Ghostscript is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY. No author or distributor accepts responsibility - to anyone for the consequences of using it or for whether it serves any - particular purpose or works at all, unless he says so in writing. Refer - to the Ghostscript General Public License for full details. - - Everyone is granted permission to copy, modify and redistribute - Ghostscript, but only under the conditions described in the Ghostscript - General Public License. A copy of this license is supposed to have been - given to you along with Ghostscript so you can know your rights and - responsibilities. It should be in a file named COPYING. Among other - things, the copyright notice and this notice must be preserved on all - copies. */ - - /* packed.h */ - /* Packed array format for Ghostscript */ - - /* - - Packed elements come in 2 different sizes, 2 bytes or 8 bytes. The - top bits of the first 16-bit subelement distinguish the 2 forms. The - 'size' of a packed array is the number of elements, not the number of - bytes it occupies. The encoding: - - 00-ttttt texrwsnm full 8-byte object - 010mjjjj jjjjjjjj executable operator (for bind) - 011mvvvv vvvvvvvv integer (biased by packed_min_intval) - 100miiii iiiiiiii literal name - 110miiii iiiiiiii executable name - - The m bit is the mark bit for the garbage collector. - - The jjj index of executable operators is either the index of the - operator in the op_def_table, if the index is less than op_def_count, - or the index of the definition in the op_array_table (subtracting - op_def_count first). - - The iii index of names is the one that the name machinery already - maintains. A name whose index is larger than will fit in the packed - representation must be represented as a full 8-byte element. - - There are actually two packed array types, t_mixedarray and - t_shortarray. A t_mixedarray can have a mix of 2- and 8-bit - elements; a t_shortarray has all 2-byte elements. In both cases, the - `size' is the number of elements. - - Packed array elements can be distinguished from full-size elements, - so we allow the interpreter to simply execute all the different kinds - of arrays directly. In theory, this could lead to unaligned accesses - to full-size (8-byte) refs. Some machines can't handle unaligned - accesses of this kind. Rather than try to tailor the algorithms to - the machine's capabilities, we guarantee that full-size elements in - mixed arrays are always properly aligned. We do this by converting - up to 3 preceding 2-byte elements into 8-byte elements so that the - alignment is preserved. The only code this actually affects is in - make_packed_array. However, the save/restore machinery in isave.c is - sometimes used to save changes to packed arrays, and it currently - only knows how to save full-size, aligned refs. - - Note that code in zpacked.c and interp.c knows more about the - representation of packed elements than the definitions in this file - would imply. Read the code carefully if you change the - representation. - - */ - - typedef ushort ref_packed; - - #define packed_type_shift 13 - typedef enum { - pt_full_ref = 0, - #define pt_min_packed 2 - pt_executable_operator = 2, - pt_integer = 3, - pt_literal_name = 4, - pt_executable_name = 6 - } packed_type; - #define pt_tag(pt) ((ref_packed)(pt) << packed_type_shift) - #define r_is_packed(rp) (*(ref_packed *)(rp) >= pt_tag(pt_min_packed)) - #define packed_ref_is_name(prp) (*(prp) >= pt_tag(pt_literal_name)) - #define packed_max_full_ref (pt_tag(pt_min_packed) - 1) - #define packed_min_intval (-(1 << (packed_type_shift - 1))) - #define packed_max_intval ((1 << (packed_type_shift - 1)) - 1) - #define packed_int_mask ((1 << packed_type_shift) - 1) - #define packed_max_name_index ((1 << (packed_type_shift + 1)) - 1) - #define packed_per_ref (sizeof(ref) / sizeof(ref_packed)) - - /* Packed ref marking */ - #define lp_mark 0x1000 - #define r_has_pmark(rp) (*(rp) & lp_mark) - #define r_set_pmark(rp) (*(rp) |= lp_mark) - #define r_clear_pmark(rp) (*(rp) &= ~lp_mark) - - /* Procedures implemented in zpacked.c */ - - /* Make a packed array */ - extern int make_packed_array(P4(const ref *, uint, ref *, const char *)); - - /* Get an element from a packed array. */ - extern void packed_get(P2(const ref_packed *, ref *)); - /* Advance to the next element in a packed array. */ - #define packed_next(packed)\ - (*packed <= packed_max_full_ref ? packed + packed_per_ref : packed + 1) --- 0 ---- diff -rNC2 gs26/nsave.h gs261/nsave.h *** gs26/nsave.h Sun Mar 28 18:12:20 1993 --- gs261/nsave.h *************** *** 1,47 **** - /* Copyright (C) 1991, 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. - - This file is part of Ghostscript. - - Ghostscript is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY. No author or distributor accepts responsibility - to anyone for the consequences of using it or for whether it serves any - particular purpose or works at all, unless he says so in writing. Refer - to the Ghostscript General Public License for full details. - - Everyone is granted permission to copy, modify and redistribute - Ghostscript, but only under the conditions described in the Ghostscript - General Public License. A copy of this license is supposed to have been - given to you along with Ghostscript so you can know your rights and - responsibilities. It should be in a file named COPYING. Among other - things, the copyright notice and this notice must be preserved on all - copies. */ - - /* nsave.h */ - /* Interpreter client interface for new Ghostscript allocator */ - /* Requires nalloc.h and ghost.h */ - - /* The routines here parallel those in nalloc.h, but deal with */ - /* refs and (unaligned) strings. */ - - /* ====== Ordinary clients ====== */ - /* These are clients who just allocate and deallocate objects. */ - - /* Allocate/free a string. */ - extern byte *gs_alloc_string(P3(as_ptr_t, uint, client_name_t)); - extern void gs_free_string(P4(as_ptr_t, byte *, uint, client_name_t)); - - /* Allocate/free refs. */ - extern ref *gs_alloc_refs(P3(as_ptr_t, uint, client_name_t)); - extern void gs_free_refs(P4(as_ptr_t, ref *, uint, client_name_t)); - - /* ====== Root-registering clients ====== */ - - /* Register a ref root. */ - void gs_ref_root_register(P3(as_ptr_t, gc_root_t *, ref **)); - - /* ====== "Structure-defining" clients ====== */ - - /* Define the pseudo-pointer type for refs. */ - extern const ptr_procs_t ptr_ref_procs; - #define ptr_ref_type (&ptr_ref_procs) --- 0 ---- diff -rNC2 gs26/ntest.mak gs261/ntest.mak *** gs26/ntest.mak Thu Apr 1 11:08:14 1993 --- gs261/ntest.mak *************** *** 1,42 **** - ndefault: ntest.exe - - !include "bc.mak" - - npacked_h=npacked.h - - nalloc_h=nalloc.h - nmman_h=nmman.h $(gxbitmap_h) - nsave_h=nsave.h - - ntest.$(OBJ): ntest.c n.h $(malloc__h) $(memory__h) \ - $(stdio__h) $(gdebug_h) $(iref_h) \ - $(nalloc_h) $(nmman_h) $(store_h) - - nalloc.$(OBJ): nalloc.c n.h $(memory__h) \ - $(stdio__h) $(gdebug_h) \ - $(nalloc_h) $(nmman_h) - - nchunk.$(OBJ): nchunk.c n.h $(memory__h) \ - $(stdio__h) $(gdebug_h) \ - $(nalloc_h) $(nmman_h) - - ngc.$(OBJ): ngc.c n.h $(ghost_h) \ - $(npacked_h) $(nalloc_h) $(nsave_h) $(nmman_h) $(store_h) - - nrchunk.$(OBJ): nrchunk.c n.h $(ghost_h) \ - $(npacked_h) $(nalloc_h) $(nsave_h) $(nmman_h) $(store_h) - - nrefgc.$(OBJ): nrefgc.c n.h $(ghost_h) \ - $(npacked_h) $(dstack_h) $(estack_h) $(ostack_h) - - nsave.$(OBJ): nsave.c n.h $(ghost_h) \ - $(nalloc_h) $(nsave_h) $(nmman_h) - - NALL=ntest.$(OBJ) nalloc.$(OBJ) nchunk.$(OBJ) ngc.$(OBJ)\ - nsave.$(OBJ) nrchunk.$(OBJ) # nrefgc.$(OBJ) - ntest.exe: $(NALL) gp_itbc.$(OBJ) gp_msdos.$(OBJ) gsmisc.$(OBJ) - echo ntest.$(OBJ) nalloc.$(OBJ) nchunk.$(OBJ) ngc.$(OBJ)+ >t.tr - echo nsave.$(OBJ) nrchunk.$(OBJ)+ >>t.tr - echo gp_itbc.$(OBJ) gp_msdos.$(OBJ)+ >>t.tr - echo gsmisc.$(OBJ) >>t.tr - tlink $(LCT) $(LO) c:\bc\lib\c0l @t.tr,ntest,ntest,@libcl.tr --- 0 ---- diff -rNC2 gs26/opdef.h gs261/opdef.h *** gs26/opdef.h Sun Mar 21 13:36:06 1993 --- gs261/opdef.h Wed May 12 18:28:50 1993 *************** *** 1,4 **** /* Copyright (C) 1991, 1992 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/oper.h gs261/oper.h *** gs26/oper.h Mon Feb 1 02:05:12 1993 --- gs261/oper.h Wed May 12 18:28:52 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1992 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/ostack.h gs261/ostack.h *** gs26/ostack.h Mon Feb 1 01:59:46 1993 --- gs261/ostack.h Wed May 12 18:28:56 1993 *************** *** 1,4 **** /* Copyright (C) 1991, 1992 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/overlay.h gs261/overlay.h *** gs26/overlay.h Thu May 6 21:02:58 1993 --- gs261/overlay.h Tue May 25 13:22:02 1993 *************** *** 1,4 **** /* Copyright (C) 1991 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/packed.h gs261/packed.h *** gs26/packed.h Sat Apr 25 06:37:04 1992 --- gs261/packed.h Sun May 23 19:02:34 1993 *************** *** 1,4 **** /* Copyright (C) 1991 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- *************** *** 28,32 **** bytes it occupies. The encoding: ! 00-ttttt texrwsnm full 8-byte object 010jjjjj jjjjjjjj executable operator (for bind) 011vvvvv vvvvvvvv integer (biased by packed_min_intval) --- 27,31 ---- bytes it occupies. The encoding: ! 00tttttt exrwsnm- full 8-byte object 010jjjjj jjjjjjjj executable operator (for bind) 011vvvvv vvvvvvvv integer (biased by packed_min_intval) diff -rNC2 gs26/pcharstr.ps gs261/pcharstr.ps *** gs26/pcharstr.ps Tue Jan 26 03:41:00 1993 --- gs261/pcharstr.ps Thu May 27 17:58:00 1993 *************** *** 1,4 **** % Copyright (C) 1990, 1992 Aladdin Enterprises. All rights reserved. - % Distributed by Free Software Foundation, Inc. % % This file is part of Ghostscript. --- 1,3 ---- *************** *** 32,36 **** } bind def /printcs1 ! { 4330 exch dup length string type1decrypt exch pop dup length lenIV sub lenIV exch getinterval save exch 0 () /SubFileDecode filter --- 31,35 ---- } bind def /printcs1 ! { 4330 exch dup length string .type1decrypt exch pop dup length lenIV sub lenIV exch getinterval save exch 0 () /SubFileDecode filter diff -rNC2 gs26/ppath.ps gs261/ppath.ps *** gs26/ppath.ps Sun Jan 31 10:09:06 1993 --- gs261/ppath.ps Wed May 12 18:29:08 1993 *************** *** 1,4 **** % Copyright (C) 1989, 1992, 1993 Aladdin Enterprises. All rights reserved. - % Distributed by Free Software Foundation, Inc. % % This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/ps2ascii.bat gs261/ps2ascii.bat *** gs26/ps2ascii.bat Sun May 2 04:08:26 1993 --- gs261/ps2ascii.bat Sat May 29 02:40:28 1993 *************** *** 2,12 **** if '%1'=='' goto a0 if '%2'=='' goto a1 ! gs -q -dNODISPLAY -dNOBIND -dWRITESYSTEMDICT -dSIMPLE gs_2asc.ps %1 quit.ps >%2 goto x :a0 ! gs -q -dNODISPLAY -dNOBIND -dWRITESYSTEMDICT -dSIMPLE gs_2asc.ps - quit.ps goto x :a1 ! gs -q -dNODISPLAY -dNOBIND -dWRITESYSTEMDICT -dSIMPLE gs_2asc.ps %1 quit.ps goto x :x --- 2,12 ---- if '%1'=='' goto a0 if '%2'=='' goto a1 ! gs -q -dNODISPLAY -dNOBIND -dWRITESYSTEMDICT -dSIMPLE ps2ascii.ps %1 quit.ps >%2 goto x :a0 ! gs -q -dNODISPLAY -dNOBIND -dWRITESYSTEMDICT -dSIMPLE ps2ascii.ps - quit.ps goto x :a1 ! gs -q -dNODISPLAY -dNOBIND -dWRITESYSTEMDICT -dSIMPLE ps2ascii.ps %1 quit.ps goto x :x diff -rNC2 gs26/ps2ascii.ps gs261/ps2ascii.ps *** gs26/ps2ascii.ps --- gs261/ps2ascii.ps Sat May 29 02:40:56 1993 *************** *** 0 **** --- 1,391 ---- + % Copyright (C) 1991, 1992, 1993 Aladdin Enterprises. All rights reserved. + % + % This file is part of Ghostscript. + % + % Ghostscript is distributed in the hope that it will be useful, but + % WITHOUT ANY WARRANTY. No author or distributor accepts responsibility + % to anyone for the consequences of using it or for whether it serves any + % particular purpose or works at all, unless he says so in writing. Refer + % to the Ghostscript General Public License for full details. + % + % Everyone is granted permission to copy, modify and redistribute + % Ghostscript, but only under the conditions described in the Ghostscript + % General Public License. A copy of this license is supposed to have been + % given to you along with Ghostscript so you can know your rights and + % responsibilities. It should be in a file named COPYING. Among other + % things, the copyright notice and this notice must be preserved on all + % copies. + + % Extract the ASCII text from a PostScript file. Nothing is displayed. + % Instead, ASCII information is written to stdout. If SIMPLE is defined, + % just the text is written, with a guess at line breaks and word spacing. + % If SIMPLE is not defined, lines are written to stdout as follows: + % + % F () + % indicate font height and width of a space + % + % S () + % display a string + % + % P + % end of page + % + % is an integer expressed in tenths of a point + % is an integer in tenths of a point. + % and are integer coordinates, in tenths of a point, with origin + % at lower left. + % and are strings represented with the standard + % PostScript escape conventions. + % The idea is similar to Glenn Reid's `distillery', only a lot more + % simple-minded, and less robust. + + % Note that this code will only work in all cases if systemdict is writable + % and if `binding' the definitions of operators defined as procedures + % is deferred. For this reason, it is normally invoked with + % gs -q -dNODISPLAY -dNOBIND -dWRITESYSTEMDICT ps2ascii.ps + + % Thanks to J Greely for improvements + % to this code. + + /QUIET true def + systemdict wcheck { systemdict } { userdict } ifelse begin + /SIMPLE dup where { pop true } { false } ifelse def + + % Disable the display operators. + + /eofill { newpath } odef + /erasepage { } odef + /fill { newpath } odef + /stroke { newpath } odef + + % The image operators must read the input, but do nothing. + + /colorimage { gsave nulldevice //colorimage grestore } odef + /image { gsave nulldevice //image grestore } odef + /imagemask { gsave nulldevice //imagemask grestore } odef + + % Redefine the end-of-page operators. + + /copypage { SIMPLE { (\014) } { (P\n) } ifelse //print } odef + /showpage { copypage erasepage initgraphics } odef + + % Redefine `show'. + + % Set things up so our output will be in tenths of a point, with origin at + % lower left. This isolates us from the peculiarities of individual devices. + + /.show.ident.matrix matrix def + /.show.ident + % { //.show.ident.matrix defaultmatrix + % % Assume the original transformation is well-behaved. + % 0.1 0 2 index dtransform abs exch abs max /.show.scale exch def + % 0.1 dup 3 -1 roll scale + { gsave initmatrix + % Assume the original transformation is well-behaved. + 0.1 0 dtransform abs exch abs max /.show.scale exch def + 0.1 dup scale .show.ident.matrix currentmatrix + grestore + } bind def + /.coord + { transform .show.ident itransform + exch round cvi exch round cvi + } odef + /.dcoord + { % Transforming distances is trickier, because + % the coordinate system might be rotated. + .show.ident pop + exch 0 dtransform + % dup 0 ne { dup mul exch dup mul add sqrt } { pop abs } ifelse + dup mul exch dup mul add sqrt + .show.scale div round cvi + exch 0 exch dtransform + % exch dup 0 ne { dup mul exch dup mul add sqrt } { pop abs } ifelse + dup mul exch dup mul add sqrt + .show.scale div round cvi + } odef + + % Define a way to store and retrieve integers that survives save/restore. + /.i.string ( ) def + /.iget { cvi } bind def + /.iput { exch //.i.string exch copy cvs pop } bind def + /.inew { //.i.string length string dup 3 -1 roll .iput } bind def + /.show.x 0 .inew def + /.show.y 0 .inew def + /.show.height 1000 .inew def + % Remember the last character of the previous string; if it was a + % hyphen preceded by a letter, we didn't output the hyphen. + /.show.last (\000) def + + % Make sure writing will work even if a program uses =string. + /.show.string =string length string def + /.show.=string =string length string def + /.show==only + { //=string //.show.=string copy pop + dup type /stringtype eq + { dup length //.show.string length le + { dup rcheck { //.show.string copy } if + } if + } if + //.stdout exch write==only + //.show.=string //=string copy pop + } odef + + /.showfont + %(following comments are from J Greely) + %old code - This didn't work right for me with all fonts. + % + % { 0 currentfont /FontBBox get dup 3 get exch 1 get sub + % currentfont /FontMatrix get dtransform dtransform + % exch abs exch abs max round + % (F ) //print //.stdout exch write==only (\n) //print + % } odef + % + %unfortunately, my way bombs on one of my test files in + %--%show_continue--(?!). It's from dvi2ps, which molests + %the fonts in some way. --jgreely + { gsave + % If we can't get the height and width of the font from + % the FontBBox, we just measure some characters. + currentfont /FontBBox .knownget not { {0 0 0 0} } if + aload pop exch 4 -1 roll sub 3 1 roll exch sub + 2 copy max 0 ne + { currentfont /FontMatrix get dtransform + } + { % Unfortunately, charpath is broken in some versions, + % so we use stringwidth and fudge. + (X) stringwidth pop dup 1.3 mul + } + ifelse .dcoord exch + currentfont /FontName .knownget not { () } if + dup type /nametype eq { //.show.string cvs } if + grestore + % Stack: height width fontname + SIMPLE + { pop pop //.show.height exch .iput } + { (F ) //print 3 + { 2 index .show==only ( ) //print 3 -1 roll } repeat + pop pop pop (\n) //print + } + ifelse + } odef + + % Define the letters -- characters which, if they occur followed by a hyphen + % at the end of a line, cause the hyphen and line break to be ignored. + /.letter.chars 100 dict def + mark + 65 1 90 { dup 32 add } for + counttomark { StandardEncoding exch get .letter.chars exch dup put } repeat + pop + + % Define a set of characters which, if they occur at the start of a line, + % are taken as indicating a paragraph break. + /.break.chars 50 dict def + mark + /bullet /dagger /daggerdbl /periodcentered /section + counttomark { .break.chars exch dup put } repeat + pop + + % Define character translation to ASCII. + % We have to do this for the entire character set. + /.char.map 500 dict def + /.chars.def { counttomark 2 idiv { .char.map 3 1 roll put } repeat pop } def + % Encode the printable ASCII characters. + mark 32 1 126 + { 1 string dup 0 4 -1 roll put + dup 0 get StandardEncoding exch get exch + } + for .chars.def + % Encode accents. + mark + /acute (') /caron (^) /cedilla (,) /circumflex (^) + /dieresis (") /grave (`) /ring (*) /tilde (~) + .chars.def + % Encode the ISO accented characters. + mark 192 1 255 + { ISOLatin1Encoding exch get =string cvs + dup 0 1 getinterval 1 index dup length 1 sub 1 exch getinterval + .char.map 2 index known .char.map 2 index known and + { .char.map 3 -1 roll get .char.map 3 -1 roll get concatstrings + .char.map 3 1 roll put + } + { pop pop pop + } + ifelse + } + for .chars.def + % Encode the remaining standard and ISO alphabetic characters. + mark + /AE (AE) /Eth (DH) /OE (OE) /Thorn (Th) + /ae (ae) /eth (dh) + /ffi (ffi) /ffl (ffl) /fi (fi) /fl (fl) + /germandbls (ss) /oe (oe) /thorn (th) + .chars.def + % Encode the other standard and ISO characters. + mark + /brokenbar (|) /bullet (*) /copyright ((C)) /currency (#) + /dagger (#) /daggerdbl (##) /degree (o) /divide (/) /dotaccent (.) + /dotlessi (i) + /ellipsis (...) /emdash (--) /endash (-) /exclamdown (!) + /florin (f) /fraction (/) + /guillemotleft (<<) /guillemotright (>>) + /guilsingleft (<) /guilsingright (>) /hungarumlaut ("") /logicalnot (~) + /macron (_) /minus (-) /mu (u) /multiply (*) + /ogonek (,) /onehalf (1/2) /onequarter (1/4) /onesuperior (1) + /ordfeminine (-a) /ordmasculine (-o) + /paragraph (||) /periodcentered (*) /perthousand (o/oo) /plusminus (+-) + /questiondown (?) /quotedblbase (") /quotedblleft (") /quotedblright (") + /quotesinglbase (,) /quotesingle (') /registered ((R)) + /section ($) /sterling (#) + /threequarters (3/4) /threesuperior (3) /trademark ((TM)) /twosuperior (2) + /yen (Y) + .chars.def + % Encode a few common Symbol characters. + mark + /asteriskmath (*) /copyrightsans ((C)) /copyrightserif ((C)) + /greaterequal (>=) /lessequal (<=) /registersans ((R)) /registerserif ((R)) + /trademarksans ((TM)) /trademarkserif ((TM)) + .chars.def + + % Write out a string. If it ends in a letter and a hyphen, + % don't write the hyphen, and set .show.last to a hyphen; + % otherwise, set .show.last to the character (or \000 if it was a hyphen). + /.show.write % + { dup length 1 ge + { dup dup length 1 sub get + dup 45 eq % hyphen + { 1 index length 1 gt + { 1 index dup length 2 sub get } + { //.show.last 0 get } + ifelse + currentfont /Encoding get exch get + //.letter.chars exch known + { % Remove the hyphen + exch dup length 1 sub 0 exch getinterval exch + } + { pop 0 + } + ifelse + } + if + //.show.last 0 3 -1 roll put + } + if + { dup currentfont /Encoding get exch get + dup //.char.map exch .knownget + { //.stdout exch writestring pop pop + } + { currentfont /Encoding dup StandardEncoding eq + exch ISOLatin1Encoding eq or + { % Untranslated character in standard encoding + pop //.stdout exch write + } + { % Character in non-standard encoding, substitute + pop pop //.stdout (*) writestring + } + ifelse + } + ifelse + } + forall + } odef + /.showstring + { currentpoint .coord + 3 -1 roll dup stringwidth 1 index 0 rmoveto + .dcoord pop + % Stack: x y string width + SIMPLE + { 2 index //.show.y .iget ne + { % Try to figure out whether we have a line break + % or a paragraph break. + 2 index //.show.y .iget sub abs + //.show.height .iget 1.3 mul ge + 2 index length 0 gt + { 2 index 0 get currentfont /Encoding get exch get + //.break.chars exch known { pop true } if + } + if + { (\n\n) % Paragraph + } + { ( ) % Line + } + ifelse //print + //.show.y 3 index .iput + //.show.x 4 index .iput + } + { % If the word processor split a hyphenated word within + % the same line, put out the hyphen now. + //.show.last 0 get 45 eq { (-) //print } if + } + ifelse + 3 index //.show.x .iget 10 add gt + { ( ) //print + } + if + 4 1 roll .show.write pop add //.show.x exch .iput + } + { (S ) //print + 4 -1 roll .show==only ( ) //print + 3 -1 roll .show==only ( ) //print + exch .show==only ( ) //print + .show==only (\n) //print + } + ifelse + } odef + + /show + { .showfont .showstring + } odef + + % Redefine the other string display operators in terms of `show'. + + /.show1.string ( ) def + /.show1 { //.show1.string exch 0 exch put //.show1.string .showstring } odef + /ashow + { .showfont + { .show1 2 copy rmoveto } forall + pop pop + } odef + /awidthshow + { .showfont + { dup .show1 4 index eq { 4 index 4 index rmoveto } if + 2 copy rmoveto + } + forall + pop pop pop pop pop + } odef + /widthshow + { .showfont + //.show1.string 0 4 -1 roll put + { //.show1.string search not { exit } if + .showstring .showstring + 2 index 2 index rmoveto + } loop + .showstring pop pop + } odef + /kshow + { .showfont + { .show1 dup exec } forall pop + } odef + + % Redirect the printing operators. + + /.stdout (_temp_.out) (w) file def + /.stderr (_temp_.err) (w) file def + /print { //.stdout exch writestring } odef + + end + + % Bind the operators we just defined, and all the others if we didn't + % do it before. Also reenable 'bind' for future files. + + .bindoperators + NOBIND currentdict systemdict ne and + { systemdict begin .bindoperators end } + if + NOBIND + { /bind /.bind load def } + if + + % Make systemdict read-only if it wasn't already. + + systemdict wcheck { systemdict readonly pop } if diff -rNC2 gs26/ps2epsi.ps gs261/ps2epsi.ps *** gs26/ps2epsi.ps Sun Mar 28 04:26:04 1993 --- gs261/ps2epsi.ps Fri May 21 15:05:06 1993 *************** *** 1,4 **** % Copyright (C) 1990, 1991, 1993 Aladdin Enterprises. All rights reserved. - % Distributed by Free Software Foundation, Inc. % % This file is part of Ghostscript. --- 1,3 ---- *************** *** 34,38 **** outfile (w) file /epsifile exch def % Get the device parameters ! currentdevice getdeviceprops dicttomark dup /HWSize get aload pop /devheight exch def --- 33,37 ---- outfile (w) file /epsifile exch def % Get the device parameters ! currentdevice getdeviceprops .dicttomark dup /HWSize get aload pop /devheight exch def diff -rNC2 gs26/ps2image.ps gs261/ps2image.ps *** gs26/ps2image.ps Sun May 2 06:34:56 1993 --- gs261/ps2image.ps Fri May 21 15:04:58 1993 *************** *** 1,4 **** % Copyright (C) 1990, 1991, 1993 Aladdin Enterprises. All rights reserved. - % Distributed by Free Software Foundation, Inc. % % This file is part of Ghostscript. --- 1,3 ---- *************** *** 80,84 **** clippath pathbbox pop pop translate pathbbox newpath 4 -2 roll pop pop ! dup 3 1 roll abs 5 index exch div exch abs 6 index exch div max 0 0 2 index neg 0 4 index 7 -1 roll mul ] { .ImageItem } --- 79,84 ---- clippath pathbbox pop pop translate pathbbox newpath 4 -2 roll pop pop ! dup 3 1 roll abs 5 index exch div exch abs 6 index exch div ! 2 copy lt { exch } if % (definition of max) 0 0 2 index neg 0 4 index 7 -1 roll mul ] { .ImageItem } *************** *** 156,160 **** } forall % Get the device parameters ! currentdevice getdeviceprops dicttomark dup /HWSize get aload pop /devheight exch def --- 156,160 ---- } forall % Get the device parameters ! currentdevice getdeviceprops .dicttomark dup /HWSize get aload pop /devheight exch def diff -rNC2 gs26/psfiles.doc gs261/psfiles.doc *** gs26/psfiles.doc Sat May 1 17:56:34 1993 --- gs261/psfiles.doc Sat May 29 02:41:42 1993 *************** *** 1,4 **** Copyright (C) 1990, 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- *************** *** 40,47 **** that really want to be printed on a LaserWriter. - gs_2asc.ps - This utility file helps extract the ASCII text from - PostScript source files. It redefines many operators. For more - information, see the comments in the file. - gs_dps1.ps - gs_init.ps reads this in if the dps feature is included in the configuration. It provides support for various Display PostScript and --- 39,42 ---- *************** *** 52,55 **** --- 47,52 ---- procedures and miscellaneous initialization for the Level 2 functions. + gs_dbt_e.ps - the Dingbats encoding, loaded only if referenced. + gs_sym_e.ps - the Symbol encoding, loaded only if referenced. *************** *** 103,106 **** --- 100,107 ---- prfont.ps - a utility to print a font catalog. + + ps2ascii.ps - a utility for extracting the ASCII text from PostScript + source files. It redefines many operators. For more information, + see the comments in the file. ps2epsi.ps - a utility for converting an arbitrary PostScript file diff -rNC2 gs26/readme.doc gs261/readme.doc *** gs26/readme.doc Fri May 7 13:47:46 1993 --- gs261/readme.doc Fri May 28 18:40:08 1993 *************** *** 1,4 **** Copyright (C) 1990, 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- *************** *** 21,25 **** This file, readme.doc, describes problems and new features in the ! current release of Ghostscript. This file describes version 2.6.0 of Ghostscript. --- 20,24 ---- This file, readme.doc, describes problems and new features in the ! current release of Ghostscript. This file describes version 2.6.1 of Ghostscript. *************** *** 33,61 **** section of NEWS for full details. ! Ghostscript now does not provide any PostScript Level 2 features unless ! the level2 feature was selected; in particular, dictionaries no longer ! grow automatically. Level 2 features, if present, can be turned on and ! off dynamically. ! ps2ascii, the utility for extracting the ASCII text from a PostScript ! file, now normally produces plain text output. - There is a new ps2epsi utility for converting arbitrary PostScript files - to EPSI format. - - The "line printer" utility gslp and its variants now supports most of the - same switches as the Unix enscript utility, plus new ones for heading, - footing, and spacing control. - - The Microsoft C/C++ 7.0 compiler is now supported on the PC. - - The LaserJet IIp driver now skips whitespace correctly. - - New drivers include the Tektronix 4693d printer, the SPARCprinter, the IBM - ProPrinter, and the MS Windows .BMP file format. - - Many new PostScript Level 2 features are supported, including CIE and - table-based Indexed color spaces. See the NEWS file for details. - Known problems ============== --- 32,42 ---- section of NEWS for full details. ! Handling of both color and platform fonts under X Windows is greatly ! improved. See the X Windows section of use.doc for details. ! A new document, commprod.doc, clarifies the requirements for being ! able to distribute Ghostscript in conjunction with commercial ! products. Known problems ============== *************** *** 117,120 **** --- 98,103 ---- Opening more than one window device at the same time doesn't work. This is the case for both X Windows and Microsoft Windows. + + glyphshow only works with Type 1 fonts. Non-graphics bugs diff -rNC2 gs26/save.h gs261/save.h *** gs26/save.h Sun Apr 18 17:24:12 1993 --- gs261/save.h Wed May 12 18:30:20 1993 *************** *** 1,4 **** /* Copyright (C) 1991, 1992 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/sbits.c gs261/sbits.c *** gs26/sbits.c Fri Mar 12 06:03:56 1993 --- gs261/sbits.c Wed May 12 18:30:24 1993 *************** *** 1,4 **** /* Copyright (C) 1992 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/sbits.h gs261/sbits.h *** gs26/sbits.h Fri Mar 12 06:09:34 1993 --- gs261/sbits.h Wed May 19 10:07:26 1993 *************** *** 1,4 **** /* Copyright (C) 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- *************** *** 81,87 **** else\ { if ( s->reverse_bits )\ ! bits = (bits << 24) + ((uint)sbits_reverse_bits[bits_cp[1]] << 16) + ((uint)sbits_reverse_bits[bits_cp[2]] << 8) + sbits_reverse_bits[bits_cp[3]];\ else\ ! bits = (bits << 24) + ((uint)bits_cp[1] << 16) + ((uint)bits_cp[2] << 8) + bits_cp[3];\ bits_left += 24, bits_cp += 3;\ }\ --- 80,86 ---- else\ { if ( s->reverse_bits )\ ! bits = (bits << 24) + ((uint)sbits_reverse_bits[bits_cp[0]] << 16) + ((uint)sbits_reverse_bits[bits_cp[1]] << 8) + sbits_reverse_bits[bits_cp[2]];\ else\ ! bits = (bits << 24) + ((uint)bits_cp[0] << 16) + ((uint)bits_cp[1] << 8) + bits_cp[2];\ bits_left += 24, bits_cp += 3;\ }\ diff -rNC2 gs26/scanchar.h gs261/scanchar.h *** gs26/scanchar.h Sat Feb 15 06:31:02 1992 --- gs261/scanchar.h Wed May 12 18:30:30 1993 *************** *** 1,4 **** /* Copyright (C) 1990, 1991 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/scf.h gs261/scf.h *** gs26/scf.h Fri Mar 12 06:03:48 1993 --- gs261/scf.h Wed May 12 18:30:32 1993 *************** *** 1,4 **** /* Copyright (C) 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/scfd.c gs261/scfd.c *** gs26/scfd.c Fri Mar 12 06:45:14 1993 --- gs261/scfd.c Wed May 19 09:57:26 1993 *************** *** 1,4 **** /* Copyright (C) 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- *************** *** 95,101 **** else\ { if ( s->reverse_bits )\ ! bits = (bits << 24) + ((uint)sbits_reverse_bits[inptr[1]] << 16) + ((uint)sbits_reverse_bits[inptr[2]] << 8) + sbits_reverse_bits[inptr[3]];\ else\ ! bits = (bits << 24) + ((uint)inptr[1] << 16) + ((uint)inptr[2] << 8) + inptr[3];\ bits_left += 24, inptr += 3;\ }\ --- 94,100 ---- else\ { if ( s->reverse_bits )\ ! bits = (bits << 24) + ((uint)sbits_reverse_bits[*inptr] << 16) + ((uint)sbits_reverse_bits[inptr[1]] << 8) + sbits_reverse_bits[inptr[2]];\ else\ ! bits = (bits << 24) + ((uint)*inptr << 16) + ((uint)inptr[1] << 8) + inptr[2];\ bits_left += 24, inptr += 3;\ }\ *************** *** 375,379 **** int init_count = raster << 3; int rlen; - if_debug2('W', "[w2]raster=%d dist=%d\n", raster, dist); cfd_load_state(); endptr = p + raster; --- 374,377 ---- *************** *** 382,385 **** --- 380,384 ---- /* to ensure run scan will stop */ dist = prev_p - p; + if_debug2('W', "[w2]raster=%d dist=%d\n", raster, dist); for ( count = init_count; count > end_count; ) { /* If invert == invert_white, white and black have their */ diff -rNC2 gs26/scfdgen.c gs261/scfdgen.c *** gs26/scfdgen.c Sun Jan 31 10:16:14 1993 --- gs261/scfdgen.c Wed May 12 18:30:40 1993 *************** *** 1,4 **** /* Copyright (C) 1992 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/scfe.c gs261/scfe.c *** gs26/scfe.c Sun Mar 14 10:59:10 1993 --- gs261/scfe.c Wed May 12 18:30:54 1993 *************** *** 1,4 **** /* Copyright (C) 1992 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/scftab.c gs261/scftab.c *** gs26/scftab.c Mon Apr 12 04:58:32 1993 --- gs261/scftab.c Wed May 12 18:30:58 1993 *************** *** 1,4 **** /* Copyright (C) 1992 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/sdct.h gs261/sdct.h *** gs26/sdct.h Sun Nov 8 10:50:48 1992 --- gs261/sdct.h Wed May 12 18:31:02 1993 *************** *** 1,4 **** /* Copyright (C) 1992 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/sdctd.c gs261/sdctd.c *** gs26/sdctd.c Mon Feb 8 02:46:08 1993 --- gs261/sdctd.c Wed May 12 18:31:06 1993 *************** *** 1,4 **** /* Copyright (C) 1992 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/sdcte.c gs261/sdcte.c *** gs26/sdcte.c Mon Feb 8 02:46:20 1993 --- gs261/sdcte.c Wed May 12 18:31:10 1993 *************** *** 1,4 **** /* Copyright (C) 1992 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/sfilter.c gs261/sfilter.c *** gs26/sfilter.c Sun Mar 28 13:54:34 1993 --- gs261/sfilter.c Wed May 12 18:31:12 1993 *************** *** 1,4 **** /* Copyright (C) 1991, 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/sfilter2.c gs261/sfilter2.c *** gs26/sfilter2.c Fri Apr 9 04:08:14 1993 --- gs261/sfilter2.c Wed May 12 18:31:16 1993 *************** *** 1,4 **** /* Copyright (C) 1991, 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/shc.h gs261/shc.h *** gs26/shc.h Sun Nov 8 14:39:36 1992 --- gs261/shc.h Wed May 12 18:31:18 1993 *************** *** 1,4 **** /* Copyright (C) 1992 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/showchar.ps gs261/showchar.ps *** gs26/showchar.ps Mon Apr 5 16:47:12 1993 --- gs261/showchar.ps Wed May 12 18:31:22 1993 *************** *** 1,4 **** % Copyright (C) 1993 Aladdin Enterprises. All rights reserved. - % Distributed by Free Software Foundation, Inc. % % This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/slzwd.c gs261/slzwd.c *** gs26/slzwd.c Sun Nov 8 09:18:28 1992 --- gs261/slzwd.c Wed May 12 18:31:30 1993 *************** *** 1,4 **** ! /* Copyright (C) 1991, 1992 Aladdin Enterprises. All rights reserved. ! Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- ! /* Copyright (C) 1991, 1992, 1993 Aladdin Enterprises. All rights reserved. This file is part of Ghostscript. *************** *** 96,99 **** --- 95,100 ---- int c; byte *p1; + if_debug2('w', "[w]read_buf: code_size=%d next_code=%d\n", + code_size, next_code); if ( prev_code >= 0 ) prev_len = table[prev_code].len; *************** *** 107,114 **** } code = (code + (bits >> bits_left)) & code_mask; ! #ifdef DEBUG ! if ( gs_debug['w'] ) ! dprintf2("[w]reading 0x%x,%d", code, code_size); ! #endif /* Invert the code-shortening algorithm described in slzwd.c. */ if ( enhanced ) --- 108,112 ---- } code = (code + (bits >> bits_left)) & code_mask; ! if_debug2('W', "[W]reading 0x%x,%d", code, code_size); /* Invert the code-shortening algorithm described in slzwd.c. */ if ( enhanced ) *************** *** 123,127 **** code = (code >> 1) - N / 2 + M; #ifdef DEBUG ! if ( gs_debug['w'] ) { if ( enhanced ) dprintf2(" -> 0x%x,%d", code, --- 121,125 ---- code = (code >> 1) - N / 2 + M; #ifdef DEBUG ! if ( gs_debug['W'] ) { if ( enhanced ) dprintf2(" -> 0x%x,%d", code, *************** *** 131,135 **** } #ifdef DEBUG ! if ( gs_debug['w'] ) dputc('\n'); #endif --- 129,133 ---- } #ifdef DEBUG ! if ( gs_debug['W'] ) dputc('\n'); #endif *************** *** 151,159 **** dc_next->len = min(len, 255); dc_next->prefix = prev_code; ! #ifdef DEBUG ! if ( gs_debug['w'] ) ! dprintf3("[w]decoding anomalous 0x%x=0x%x+%c\n", ! next_code, prev_code, dc_next->datum); ! #endif } /* See if there is enough room for the code. */ --- 149,154 ---- dc_next->len = min(len, 255); dc_next->prefix = prev_code; ! if_debug3('w', "[w]decoding anomalous 0x%x=0x%x+%c\n", ! next_code, prev_code, dc_next->datum); } /* See if there is enough room for the code. */ *************** *** 166,169 **** --- 161,166 ---- { case code_reset: + if_debug1('w', "[w]reset: next_code was %d\n", + next_code); next_code = code_0; dc_next = table + code_0; *************** *** 180,183 **** --- 177,181 ---- for ( c = code, len = 0; c != code_eod; len++ ) c = table[c].prefix; + if_debug2('w', "[w]long code %d, length=%d\n", code, len); } if ( limit - p < len ) *************** *** 194,198 **** /* Add a new entry to the table */ if ( prev_code >= 0 ) ! { dc_next->datum = *p1; /* first char of string */ ++prev_len; dc_next->len = min(prev_len, 255); --- 192,203 ---- /* Add a new entry to the table */ if ( prev_code >= 0 ) ! { /* Unfortunately, we have to check for next_code == */ ! /* lzw_decode_max every time: just checking at power */ ! /* of 2 boundaries stops us one code too soon. */ ! if ( next_code == lzw_decode_max - 1 ) ! { s->end_status = ERRC; ! goto out; ! } ! dc_next->datum = *p1; /* first char of string */ ++prev_len; dc_next->len = min(prev_len, 255); *************** *** 199,212 **** dc_next->prefix = prev_code; dc_next++; ! #ifdef DEBUG ! if ( gs_debug['w'] ) ! dprintf4("[w]decoding 0x%x=0x%x+%c(%d)\n", ! next_code, prev_code, *p1, min(len, 255)); ! #endif if ( ++next_code == code_mask ) ! /* Crossed a power of 2 */ ! code_size = ++(s->state.lzw.code_size), ! code_mask = (1 << code_size) - 1; ! } prev_code = code; prev_len = len; --- 204,221 ---- dc_next->prefix = prev_code; dc_next++; ! if_debug4('W', "[W]decoding 0x%x=0x%x+%c(%d)\n", ! next_code, prev_code, *p1, min(len, 255)); if ( ++next_code == code_mask ) ! { /* Crossed a power of 2. */ ! /* We have to make a strange special check for */ ! /* reaching the end of the code space. */ ! if ( next_code != lzw_decode_max - 1 ) ! { code_size = ++(s->state.lzw.code_size); ! code_mask = (1 << code_size) - 1; ! if_debug2('w', "[w]crossed power of 2: new code_size=%d, next_code=%d\n", ! code_size, next_code); ! } ! } ! } prev_code = code; prev_len = len; *************** *** 218,221 **** --- 227,232 ---- s->bits_left = bits_left; s->state.lzw.next_code = next_code; + if_debug3('w', "[w]decoded %d bytes, prev_code=%d, next_code=%d\n", + (int)(s->endptr - s->cptr), prev_code, next_code); return 0; } diff -rNC2 gs26/slzwe.c gs261/slzwe.c *** gs26/slzwe.c Sun Nov 8 09:18:52 1992 --- gs261/slzwe.c Wed May 12 18:31:34 1993 *************** *** 1,4 **** /* Copyright (C) 1991, 1992 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/stat_.h gs261/stat_.h *** gs26/stat_.h Sun Apr 4 13:34:34 1993 --- gs261/stat_.h Wed May 12 18:31:42 1993 *************** *** 1,4 **** ! /* Copyright (C) 1991 Aladdin Enterprises. All rights reserved. ! Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- ! /* Copyright (C) 1991, 1993 Aladdin Enterprises. All rights reserved. This file is part of Ghostscript. *************** *** 25,30 **** #include ! /* System V doesn't define the st_blocks member of a stat structure. */ ! #if defined(__SVR3) # define stat_blocks(psbuf) (((psbuf)->st_size + 1023) >> 1) #else --- 24,30 ---- #include ! /* System V and OS2/emx doesn't define the st_blocks member of a */ ! /* stat structure. */ ! #if defined(__SVR3) || defined(__EMX__) # define stat_blocks(psbuf) (((psbuf)->st_size + 1023) >> 1) #else diff -rNC2 gs26/state.h gs261/state.h *** gs26/state.h Fri Jan 8 16:12:16 1993 --- gs261/state.h Wed May 12 18:31:38 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1992 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/std.h gs261/std.h *** gs26/std.h Mon May 3 17:35:44 1993 --- gs261/std.h Wed May 12 18:31:44 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/stdio_.h gs261/stdio_.h *** gs26/stdio_.h Thu Mar 4 04:01:28 1993 --- gs261/stdio_.h Wed May 12 18:31:48 1993 *************** *** 1,4 **** /* Copyright (C) 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/store.h gs261/store.h *** gs26/store.h Wed Feb 10 13:43:24 1993 --- gs261/store.h Wed May 12 18:31:50 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1992 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/stream.c gs261/stream.c *** gs26/stream.c Thu Apr 15 18:44:20 1993 --- gs261/stream.c Wed May 12 18:31:52 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/stream.h gs261/stream.h *** gs26/stream.h Sun Mar 28 13:48:48 1993 --- gs261/stream.h Wed May 12 18:31:56 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- *************** *** 299,302 **** --- 298,303 ---- #define s_end_inline(s, cp, ep)\ (s)->cptr = cp + #define sbufavailable_inline(s, cp, ep)\ + (ep - cp) #define sendbufp_inline(s, cp, ep)\ (cp >= ep) diff -rNC2 gs26/string_.h gs261/string_.h *** gs26/string_.h Sun Feb 7 10:53:30 1993 --- gs261/string_.h Wed May 12 18:31:58 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/tc.mak gs261/tc.mak *** gs26/tc.mak Wed May 5 17:58:10 1993 --- gs261/tc.mak Wed May 19 16:34:58 1993 *************** *** 1,4 **** # Copyright (C) 1989, 1992, 1993 Aladdin Enterprises. All rights reserved. - # Distributed by Free Software Foundation, Inc. # # This file is part of Ghostscript. --- 1,3 ---- *************** *** 92,102 **** CPU_TYPE=286 ! # Define the math coprocessor (FPU) type. Options are 0, 87, 287, or 387. # If the CPU type is 486, the FPU type is irrelevant, since the 80486 # CPU includes the equivalent of an 80387 on-chip. ! # A non-zero option means that the executable will only run if a FPU # of that type (or higher) is available: this is NOT currently checked # at runtime. - # Code is significantly faster. FPU_TYPE=0 --- 91,102 ---- CPU_TYPE=286 ! # Define the math coprocessor (FPU) type. ! # Options are -1 (optimize for no FPU), 0 (optimize for FPU present, ! # but do not require a FPU), 87, 287, or 387. # If the CPU type is 486, the FPU type is irrelevant, since the 80486 # CPU includes the equivalent of an 80387 on-chip. ! # An xx87 option means that the executable will run only if a FPU # of that type (or higher) is available: this is NOT currently checked # at runtime. FPU_TYPE=0 *************** *** 154,160 **** .c.obj: $(CCC) $< - - .c.i: - $(COMPDIR)\cpp -I$(INCDIR) -a $(CCFLAGS) -P- $< # ------ Devices and features ------ # --- 154,157 ---- diff -rNC2 gs26/tccommon.mak gs261/tccommon.mak *** gs26/tccommon.mak Sat May 1 15:21:54 1993 --- gs261/tccommon.mak Wed May 19 16:34:56 1993 *************** *** 1,4 **** # Copyright (C) 1991, 1992, 1993 Aladdin Enterprises. All rights reserved. - # Distributed by Free Software Foundation, Inc. # # This file is part of Ghostscript. --- 1,3 ---- *************** *** 38,41 **** --- 37,45 ---- dosdefault: default + # Define a rule for invoking just the preprocessor. + + .c.i: + $(COMPDIR)\cpp -I$(INCDIR) -a $(CCFLAGS) -P- $< + # Define the extensions for the object and executable files. *************** *** 43,50 **** XE=.exe - # Define the need for uniq. - - UNIQ=uniq$(XE) - # Define the current directory prefix, shell quote string, and shell name. --- 47,50 ---- *************** *** 61,77 **** !if $(CPU_TYPE) >= 486 ! ASMFLAGS=/DFOR80386 /DFOR80486 PLATOPT=$(F286) -DFOR80386 -DFOR80486 !elif $(CPU_TYPE) >= 386 ! ASMFLAGS=/DFOR80386 PLATOPT=$(F286) -DFOR80386 !elif $(CPU_TYPE) >= 286 ! ASMFLAGS= PLATOPT=$(F286) !elif $(CPU_TYPE) >= 186 ! ASMFLAGS= PLATOPT=-1 !else ! ASMFLAGS= PLATOPT= !endif --- 61,77 ---- !if $(CPU_TYPE) >= 486 ! ASMCPU=/DFOR80386 /DFOR80486 PLATOPT=$(F286) -DFOR80386 -DFOR80486 !elif $(CPU_TYPE) >= 386 ! ASMCPU=/DFOR80386 PLATOPT=$(F286) -DFOR80386 !elif $(CPU_TYPE) >= 286 ! ASMCPU= PLATOPT=$(F286) !elif $(CPU_TYPE) >= 186 ! ASMCPU= PLATOPT=-1 !else ! ASMCPU= PLATOPT= !endif *************** *** 78,87 **** !if $(CPU_TYPE) == 486 || $(FPU_TYPE) >= 287 FPFLAGS=-f287 FPLIB=fp87 ! !elif $(FPU_TYPE) != 0 FPFLAGS=-f87 FPLIB=fp87 !else FPFLAGS= FPLIB=emu --- 78,90 ---- !if $(CPU_TYPE) == 486 || $(FPU_TYPE) >= 287 + ASMFPU=/DFORFPU FPFLAGS=-f287 FPLIB=fp87 ! !elif $(FPU_TYPE) > 0 ! ASMFPU=/DFORFPU FPFLAGS=-f87 FPLIB=fp87 !else + ASMFPU= FPFLAGS= FPLIB=emu *************** *** 104,109 **** # Define the generic compilation rules. .asm.obj: ! $(ASM) $(ASMFLAGS) $(ASMDEBUG) $<; # -------------------------- Auxiliary programs --------------------------- # --- 107,114 ---- # Define the generic compilation rules. + ASMFLAGS=$(ASMCPU) $(ASMFPU) $(ASMDEBUG) + .asm.obj: ! $(ASM) $(ASMFLAGS) $<; # -------------------------- Auxiliary programs --------------------------- # *************** *** 117,124 **** $(CCAUX) genarch.c ! # We need a substitute for the Unix uniq utility. ! # It only has to handle stdin and stdout, no options. ! uniq$(XE): uniq.c ! $(CCAUX) uniq.c # ---------------------- MS-DOS I/O debugging option ---------------------- # --- 122,127 ---- $(CCAUX) genarch.c ! genconf$(XE): genconf.c ! $(CCAUX) genconf.c # ---------------------- MS-DOS I/O debugging option ---------------------- # diff -rNC2 gs26/time_.h gs261/time_.h *** gs26/time_.h Wed Mar 24 12:14:12 1993 --- gs261/time_.h Wed May 12 18:32:10 1993 *************** *** 1,4 **** /* Copyright (C) 1991, 1992 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/traceop.ps gs261/traceop.ps *** gs26/traceop.ps Sun Jan 24 14:51:16 1993 --- gs261/traceop.ps Wed May 12 18:32:12 1993 *************** *** 1,4 **** % Copyright (C) 1992 Aladdin Enterprises. All rights reserved. - % Distributed by Free Software Foundation, Inc. % % This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/type1ops.ps gs261/type1ops.ps *** gs26/type1ops.ps Tue Jan 26 03:38:18 1993 --- gs261/type1ops.ps Thu May 27 17:59:38 1993 *************** *** 1,4 **** % Copyright (C) 1992 Aladdin Enterprises. All rights reserved. - % Distributed by Free Software Foundation, Inc. % % This file is part of Ghostscript. --- 1,3 ---- *************** *** 143,147 **** exch 1 index counttomark 1 add 2 roll charstack_write closefile ! % 4330 exch dup type1encrypt exch pop readonly } bind def --- 142,146 ---- exch 1 index counttomark 1 add 2 roll charstack_write closefile ! % 4330 exch dup .type1encrypt exch pop readonly } bind def diff -rNC2 gs26/uniq.c gs261/uniq.c *** gs26/uniq.c Mon Mar 1 12:07:08 1993 --- gs261/uniq.c *************** *** 1,60 **** - /* Copyright (C) 1991, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. - - This file is part of Ghostscript. - - Ghostscript is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY. No author or distributor accepts responsibility - to anyone for the consequences of using it or for whether it serves any - particular purpose or works at all, unless he says so in writing. Refer - to the Ghostscript General Public License for full details. - - Everyone is granted permission to copy, modify and redistribute - Ghostscript, but only under the conditions described in the Ghostscript - General Public License. A copy of this license is supposed to have been - given to you along with Ghostscript so you can know your rights and - responsibilities. It should be in a file named COPYING. Among other - things, the copyright notice and this notice must be preserved on all - copies. */ - - /* uniq.c */ - /* A cheap MS-DOS substitute for just enough of the Unix uniq utility. */ - #include - #include - - /* - * Usage: - uniq [input [output]] - * Eliminates any line in the input that is equal to the previous line. - */ - - main(int argc, char *argv[]) - { FILE *in = stdin, *out = stdout; - #define N 200 - char x[N+1], y[N+1]; - char *a = x, *b = y, *t; - if ( argc > 1 ) - { in = fopen(argv[1], "r"); - if ( in == 0 ) - { printf("Can't open input file %s\n", argv[1]); - exit(1); - } - } - if ( argc > 2 ) - { out = fopen(argv[2], "w"); - if ( out == 0 ) - { printf("Can't open output file %s\n", argv[2]); - if ( in != stdin ) fclose(in); - exit(1); - } - } - b[0] = 0; - while ( (*a = 0), fgets(a, N, in), !feof(in) ) - { if ( strcmp(a, b) ) fputs(a, out); - t = a, a = b, b = t; - } - if ( *a && strcmp(a, b) ) fputs(a, out); - if ( in != stdin ) fclose(in); - if ( out != stdout ) fclose(out); - return 0; - } --- 0 ---- diff -rNC2 gs26/unix-ansi.mak gs261/unix-ansi.mak *** gs26/unix-ansi.mak Sun May 9 23:24:11 1993 --- gs261/unix-ansi.mak Sat May 29 11:20:37 1993 *************** *** 1,4 **** # Copyright (C) 1989, 1990, 1991, 1993 Aladdin Enterprises. All rights reserved. - # Distributed by Free Software Foundation, Inc. # # This file is part of Ghostscript. --- 1,3 ---- *************** *** 140,145 **** # The remainder of the makefile (unixhead.mak, gs.mak, devs.mak, unixtail.mak) # is generic. tar_cat concatenates all these together. ! # Copyright (C) 1990, 1991 Aladdin Enterprises. All rights reserved. ! # Distributed by Free Software Foundation, Inc. # # This file is part of Ghostscript. --- 139,143 ---- # The remainder of the makefile (unixhead.mak, gs.mak, devs.mak, unixtail.mak) # is generic. tar_cat concatenates all these together. ! # Copyright (C) 1990, 1991, 1993 Aladdin Enterprises. All rights reserved. # # This file is part of Ghostscript. *************** *** 176,183 **** XE= - # Define the need for uniq. - - UNIQ= - # Define the current directory prefix, shell quote string, and shell names. --- 174,177 ---- *************** *** 199,203 **** CCINT=$(CCC) # Copyright (C) 1989, 1992, 1993 Aladdin Enterprises. All rights reserved. - # Distributed by Free Software Foundation, Inc. # # This file is part of Ghostscript. --- 193,196 ---- *************** *** 272,277 **** # If a particular platform requires other utility programs # to be built, AK must include them too. - # UNIQ - null on systems that provide the uniq utility, - # uniq$(XE) on systems where we have to provide our own. # SHP - the prefix for invoking a shell script in the current directory # (null for MS-DOS, $(SH) ./ for Unix). --- 265,268 ---- *************** *** 280,291 **** # SH - the shell for scripts (null on MS-DOS, sh on Unix). # The platform-specific makefiles must also include rules for creating ! # ansi2knr$(XE) and genarch$(XE) from the corresponding .c files, ! # and for making arch.h by executing genarch$(XE). (This ! # shouldn't really be necessary, but Turbo C and Unix C treat the -o # switch slightly differently (Turbo C requires no following space, # Unix C requires a following space), and I haven't found a way to capture ! # the difference in a macro; also, Unix requires ./ because . may not be ! # in the search path, whereas MS-DOS always looks in the current ! # directory first.) all default: $(GS)$(XE) --- 271,279 ---- # SH - the shell for scripts (null on MS-DOS, sh on Unix). # The platform-specific makefiles must also include rules for creating ! # ansi2knr$(XE), genarch$(XE), and genconf$(XE) from the corresponding ! # .c files -- this is needed because Turbo C and Unix C treat the -o # switch slightly differently (Turbo C requires no following space, # Unix C requires a following space), and I haven't found a way to capture ! # the difference in a macro. all default: $(GS)$(XE) *************** *** 296,303 **** clean mostlyclean: rm -f *.$(OBJ) *.a core gmon.out ! rm -f *.dev *.d_* arch.h gconfig*.h obj*.tr lib*.tr rm -f t _temp_* _temp_*.* *.map *.sym ! rm -f ansi2knr$(XE) echogs$(XE) genarch$(XE) ! rm -f uniq$(XE) $(GS)$(XE) $(BEGINFILES) # A rule to do a quick and dirty compilation attempt when first installing --- 284,291 ---- clean mostlyclean: rm -f *.$(OBJ) *.a core gmon.out ! rm -f *.dev *.d_* arch.h gconfig*.h o*.tr l*.tr rm -f t _temp_* _temp_*.* *.map *.sym ! rm -f ansi2knr$(XE) echogs$(XE) genarch$(XE) genconf$(XE) ! rm -f $(GS)$(XE) $(BEGINFILES) # A rule to do a quick and dirty compilation attempt when first installing *************** *** 404,410 **** gxfont_h=gxfont.h $(gsfont_h) $(gsuid_h) gxfrac_h=gxfrac.h - # gxcolor and gxfmap are out of order because they include gxfrac. - gxcolor_h=gxcolor.h $(gxfrac_h) $(gsuid_h) - gxfmap_h=gxfmap.h $(gxfrac_h) gximage_h=gximage.h $(gscspace_h) $(gsimage_h) gxlum_h=gxlum.h --- 392,395 ---- *************** *** 415,418 **** --- 400,406 ---- gxtype1_h=gxtype1.h $(gscrypt1_h) $(gstype1_h) gxxfont_h=gxxfont.h $(gsccode_h) $(gsmatrix_h) $(gsuid_h) $(gsxfont_h) + # gxcolor and gxfmap are out of order because they include other files. + gxcolor_h=gxcolor.h $(gxfrac_h) $(gsuid_h) + gxfmap_h=gxfmap.h $(gxfrac_h) $(gxrefct_h) gzcolor_h=gzcolor.h $(gscolor_h) $(gxfmap_h) $(gxlum_h) *************** *** 499,503 **** gscoord.$(OBJ): gscoord.c $(GXERR) \ ! $(gxarith_h) $(gxfixed_h) $(gxmatrix_h) $(gzdevice_h) $(gzstate_h) $(gscoord_h) gsdevice.$(OBJ): gsdevice.c $(GXERR) \ --- 487,492 ---- gscoord.$(OBJ): gscoord.c $(GXERR) \ ! $(gsccode_h) $(gxarith_h) $(gxfixed_h) $(gxfont_h) $(gxmatrix_h) \ ! $(gzdevice_h) $(gzstate_h) $(gscoord_h) gsdevice.$(OBJ): gsdevice.c $(GXERR) \ *************** *** 552,556 **** gsstate.$(OBJ): gsstate.c $(GXERR) \ ! $(gscie_h) $(gscspace_h) $(gxcolor_h) $(gxrefct_h) \ $(gzstate_h) $(gzcolor_h) $(gzdevice_h) $(gzht_h) $(gzline_h) $(gzpath_h) --- 541,545 ---- gsstate.$(OBJ): gsstate.c $(GXERR) \ ! $(gscie_h) $(gscolor2_h) $(gscspace_h) $(gxcolor_h) $(gxrefct_h) \ $(gzstate_h) $(gzcolor_h) $(gzdevice_h) $(gzht_h) $(gzline_h) $(gzpath_h) *************** *** 578,582 **** ###### Files dependent on the installed devices, features, and platform. ! # Generating gconfig.h also generates obj*.tr and lib.tr. # gconfig.h shouldn't have to depend on ALL_DEVS, but that would --- 567,571 ---- ###### Files dependent on the installed devices, features, and platform. ! # Generating gconfig.h also generates o*.tr and l*.tr. # gconfig.h shouldn't have to depend on ALL_DEVS, but that would *************** *** 589,605 **** $(DEVICE_DEVS6) $(DEVICE_DEVS7) $(DEVICE_DEVS8) $(DEVICE_DEVS9) ! gconfig.h obj.tr objw.tr lib.tr: \ ! devs.mak $(MAKEFILE) echogs$(XE) $(UNIQ) $(ALL_DEVS) ! $(SHP)gsconfig $(DEVICE_DEVS) + ! $(SHP)gsconfig + $(DEVICE_DEVS1) + ! $(SHP)gsconfig + $(DEVICE_DEVS2) + ! $(SHP)gsconfig + $(DEVICE_DEVS3) + ! $(SHP)gsconfig + $(DEVICE_DEVS4) + ! $(SHP)gsconfig + $(DEVICE_DEVS5) + ! $(SHP)gsconfig + $(DEVICE_DEVS6) + ! $(SHP)gsconfig + $(DEVICE_DEVS7) + ! $(SHP)gsconfig + $(DEVICE_DEVS8) + ! $(SHP)gsconfig + $(DEVICE_DEVS9) + ! $(SHP)gsconfig + $(FEATURE_DEVS) $(PLATFORM).dev $(EXP)echogs -a gconfig.h -x 23 define GS_LIB_DEFAULT -x 2022 $(GS_LIB_DEFAULT) -x 22 $(EXP)echogs -a gconfig.h -x 23 define GS_INIT -x 2022 $(GS_INIT) -x 22 --- 578,596 ---- $(DEVICE_DEVS6) $(DEVICE_DEVS7) $(DEVICE_DEVS8) $(DEVICE_DEVS9) ! gconfig.h obj.tr objw.tr ld.tr lib.tr: \ ! devs.mak $(MAKEFILE) echogs$(XE) genconf$(XE) $(ALL_DEVS) ! $(EXP)echogs -w t.cfg - $(FEATURE_DEVS) $(PLATFORM).dev ! $(EXP)echogs -a t.cfg - $(DEVICE_DEVS) ! $(EXP)echogs -a t.cfg - $(DEVICE_DEVS1) ! $(EXP)echogs -a t.cfg - $(DEVICE_DEVS2) ! $(EXP)echogs -a t.cfg - $(DEVICE_DEVS3) ! $(EXP)echogs -a t.cfg - $(DEVICE_DEVS4) ! $(EXP)echogs -a t.cfg - $(DEVICE_DEVS5) ! $(EXP)echogs -a t.cfg - $(DEVICE_DEVS6) ! $(EXP)echogs -a t.cfg - $(DEVICE_DEVS7) ! $(EXP)echogs -a t.cfg - $(DEVICE_DEVS8) ! $(EXP)echogs -a t.cfg - $(DEVICE_DEVS9) ! $(EXP)genconf @t.cfg -h gconfig.h -l lib.tr -o obj.tr -u ld.tr -w objw.tr ! rm t.cfg $(EXP)echogs -a gconfig.h -x 23 define GS_LIB_DEFAULT -x 2022 $(GS_LIB_DEFAULT) -x 22 $(EXP)echogs -a gconfig.h -x 23 define GS_INIT -x 2022 $(GS_INIT) -x 22 *************** *** 679,683 **** iccfont.$(OBJ): iccfont.c $(GH) gconfigf.h \ ! $(ghost_h) $(alloc_h) $(ccfont_h) $(dict_h) $(dstack_h) $(errors_h) $(iutil_h) $(iname_h) $(oper_h) $(save_h) $(store_h) idebug.$(OBJ): idebug.c $(GH) \ --- 670,675 ---- iccfont.$(OBJ): iccfont.c $(GH) gconfigf.h \ ! $(ghost_h) $(alloc_h) $(ccfont_h) $(dict_h) $(dstack_h) $(errors_h) \ ! $(font_h) $(iutil_h) $(iname_h) $(oper_h) $(save_h) $(store_h) idebug.$(OBJ): idebug.c $(GH) \ *************** *** 846,850 **** zchar2.$(OBJ): zchar2.c $(OP) $(gschar_h) $(gsmatrix_h) $(gxfixed_h) $(gxfont_h) \ ! $(alloc_h) $(estack_h) $(font_h) $(state_h) $(store_h) $(stream_h) $(bnum_h) zdps1.$(OBJ): zdps1.c $(OP) $(gsmatrix_h) $(gspath_h) $(gsstate_h) \ --- 838,842 ---- zchar2.$(OBJ): zchar2.c $(OP) $(gschar_h) $(gsmatrix_h) $(gxfixed_h) $(gxfont_h) \ ! $(alloc_h) $(estack_h) $(font_h) $(iname_h) $(state_h) $(store_h) $(stream_h) $(bnum_h) zdps1.$(OBJ): zdps1.c $(OP) $(gsmatrix_h) $(gspath_h) $(gsstate_h) \ *************** *** 912,916 **** zcie.$(OBJ): zcie.c $(OP) \ ! $(gscspace_h) $(gscolor2_h) $(gscie_h) $(gxrefct_h) \ $(alloc_h) $(dict_h) $(dparam_h) $(estack_h) $(save_h) $(state_h) $(store_h) --- 904,908 ---- zcie.$(OBJ): zcie.c $(OP) \ ! $(gscspace_h) $(gscolor2_h) $(gscie_h) $(gxcolor_h) $(gxrefct_h) \ $(alloc_h) $(dict_h) $(dparam_h) $(estack_h) $(save_h) $(state_h) $(store_h) *************** *** 927,931 **** zimage2.$(OBJ): zimage2.c $(OP) \ ! $(gscolor_h) $(gscolor2_h) $(gscspace_h) $(gsmatrix_h) \ $(dict_h) $(dparam_h) $(ilevel_h) $(state_h) --- 919,923 ---- zimage2.$(OBJ): zimage2.c $(OP) \ ! $(gscolor_h) $(gscolor2_h) $(gscspace_h) $(gsmatrix_h) $(gxcolor_h) \ $(dict_h) $(dparam_h) $(ilevel_h) $(state_h) *************** *** 978,989 **** # Because of intrinsic limitations in `make', we have to list # the object file names and the font names separately. ! ccfonts_=uglyr.$(OBJ) ccfonts1=uglyr ! ccfonts.dev: $(ccfonts_) iccfont.$(OBJ) ! $(SHP)gssetmod ccfonts $(ccfonts_) iccfont.$(OBJ) $(SHP)gsaddmod ccfonts -oper ccfonts ! gconfigf.h: $(MAKEFILE) $(SHP)gssetmod ccfonts_ $(SHP)gsaddmod ccfonts_ -font $(ccfonts1) --- 970,987 ---- # Because of intrinsic limitations in `make', we have to list # the object file names and the font names separately. ! ccfonts1_=uglyr.$(OBJ) ccfonts1=uglyr ! ccfonts.dev: $(MAKEFILE) gs.mak iccfont.$(OBJ) \ ! $(ccfonts1_) $(ccfonts2_) $(ccfonts3_) $(ccfonts4_) $(ccfonts5_) ! $(SHP)gssetmod ccfonts iccfont.$(OBJ) ! $(SHP)gsaddmod ccfonts -obj $(ccfonts1_) ! $(SHP)gsaddmod ccfonts -obj $(ccfonts2_) ! $(SHP)gsaddmod ccfonts -obj $(ccfonts3_) ! $(SHP)gsaddmod ccfonts -obj $(ccfonts4_) ! $(SHP)gsaddmod ccfonts -obj $(ccfonts5_) $(SHP)gsaddmod ccfonts -oper ccfonts ! gconfigf.h: $(MAKEFILE) gs.mak genconf$(XE) $(SHP)gssetmod ccfonts_ $(SHP)gsaddmod ccfonts_ -font $(ccfonts1) *************** *** 992,997 **** $(SHP)gsaddmod ccfonts_ -font $(ccfonts4) $(SHP)gsaddmod ccfonts_ -font $(ccfonts5) ! rm -f gconfigf.h ! mv ccfonts_.d_f gconfigf.h uglyr.$(OBJ): uglyr.c $(CCFONT) --- 990,994 ---- $(SHP)gsaddmod ccfonts_ -font $(ccfonts4) $(SHP)gsaddmod ccfonts_ -font $(ccfonts5) ! $(EXP)genconf ccfonts_.dev -f gconfigf.h uglyr.$(OBJ): uglyr.c $(CCFONT) *************** *** 1029,1033 **** $(CCINT) interp.c # Copyright (C) 1989, 1992, 1993 Aladdin Enterprises. All rights reserved. - # Distributed by Free Software Foundation, Inc. # # This file is part of Ghostscript. --- 1026,1029 ---- *************** *** 1084,1087 **** --- 1080,1084 ---- # x11 X Windows version 11, release >=3 [Unix and VMS only] # Printers: + # * appledmp Apple Dot Matrix Printer (should also work with Imagewriter) # bj10e Canon BubbleJet BJ10e # * bj200 Canon BubbleJet BJ200 *************** *** 1102,1105 **** --- 1099,1103 ---- # (triple resolution) # * epsonc Epson LQ-2550 and Fujitsu 3400/2400/1200 color printers + # * escp2 Epson ESC/P 2 language printers, including Stylus 800 # + ibmpro IBM 9-pin Proprinter # * jetp3852 IBM Jetprinter ink-jet color printer (Model #3852) *************** *** 1193,1196 **** --- 1191,1198 ---- # plane-addressed), a SuperVGA driver (8 bit-planes, byte addressed), # and a special driver for the S3 chip. + # To make A4 paper the default, change the compilation line from + # $(CCD) ... + # to + # $(CCD) -DA4 ### ----------------------- EGA and VGA displays ----------------------- ### *************** *** 1313,1317 **** # Choose one of gdevwddb or gdevwdib here. ! mswin_=gdevmswn.$(OBJ) gdevmsxf.$(OBJ) gdevwddb.$(OBJ) \ gdevemap.$(OBJ) gdevpccm.$(OBJ) mswin.dev: $(mswin_) --- 1315,1319 ---- # Choose one of gdevwddb or gdevwdib here. ! mswin_=gdevmswn.$(OBJ) gdevmsxf.$(OBJ) gdevwdib.$(OBJ) \ gdevemap.$(OBJ) gdevpccm.$(OBJ) mswin.dev: $(mswin_) *************** *** 1358,1361 **** --- 1360,1370 ---- gdevprn.$(OBJ): gdevprn.c $(PDEVH) $(gp_h) $(gsprops_h) + ### ------------------- The Apple DMP printer device ------------------- ### + + appledmp_=gdevadmp.$(OBJ) gdevprn.$(OBJ) + + appledmp.dev: $(appledmp_) + $(SHP)gssetdev appledmp $(appledmp_) + ### ------------ The Canon BubbleJet BJ10e and BJ200 devices ------------ ### *************** *** 1504,1507 **** --- 1513,1526 ---- gdevepsc.$(OBJ): gdevepsc.c $(PDEVH) + ### -------------- The Epson ESC/P 2 language printer device ----------- ### + ### Note: this driver was contributed by a user: if you have questions, ### + ### please contact Richard Brown (rab@tauon.ph.unimelb.edu.au). ### + + escp2_=gdevescp2.$(OBJ) gdevprn.$(OBJ) + escp2.dev: $(escp2_) + $(SHP)gssetdev escp2 $(escp2_) + + gdevescp2.$(OBJ): gdevescp2.c $(PDEVH) + ### ------------ The H-P PaintJet color printer device ----------------- ### ### Note: this driver also supports the DEC LJ250 color printer, which ### *************** *** 1819,1824 **** $(SHP)gssetdev tiffg3 $(tiffg3_) gdevtiff.$(OBJ): gdevtiff.c $(GDEV) $(gdevprn_h) gdevdfg3.h gdevtiff.h ! # Copyright (C) 1990, 1992 Aladdin Enterprises. All rights reserved. ! # Distributed by Free Software Foundation, Inc. # # This file is part of Ghostscript. --- 1838,1842 ---- $(SHP)gssetdev tiffg3 $(tiffg3_) gdevtiff.$(OBJ): gdevtiff.c $(GDEV) $(gdevprn_h) gdevdfg3.h gdevtiff.h ! # Copyright (C) 1990, 1992, 1993 Aladdin Enterprises. All rights reserved. # # This file is part of Ghostscript. *************** *** 1893,1896 **** --- 1911,1917 ---- $(CC) -o genarch$(XE) genarch.c + genconf$(XE): genconf.c + $(CC) -o genconf$(XE) genconf.c + # ----------------------------- Main program ------------------------------ # *************** *** 1904,1913 **** # The second call on echogs writes a \. This is the only # way to do it that works with all flavors of shell! ! $(GS)$(XE): $(GSUNIX) obj.tr lib.tr echogs $(ALL_DEVS) ./echogs -n - $(CC) $(LDFLAGS) $(XLIBDIRS) -o gs $(GSUNIX) >_temp_ ./echogs -x 205c >>_temp_ ! cat obj.tr >>_temp_ ! cat lib.tr >>_temp_ ! ./echogs -q $(EXTRALIBS) -lm >>_temp_ $(SH) <_temp_ --- 1925,1933 ---- # The second call on echogs writes a \. This is the only # way to do it that works with all flavors of shell! ! $(GS)$(XE): $(GSUNIX) ld.tr echogs $(ALL_DEVS) ./echogs -n - $(CC) $(LDFLAGS) $(XLIBDIRS) -o gs $(GSUNIX) >_temp_ ./echogs -x 205c >>_temp_ ! cat ld.tr >>_temp_ ! ./echogs - $(EXTRALIBS) -lm >>_temp_ $(SH) <_temp_ *************** *** 1925,1931 **** -mkdir $(datadir) -mkdir $(gsdatadir) ! for f in README gslp.ps gs_init.ps gs_2asc.ps gs_dps1.ps gs_fonts.ps gs_lev2.ps gs_statd.ps gs_type0.ps gs_sym_e.ps quit.ps Fontmap uglyr.gsf bdftops.ps decrypt.ps font2c.ps impath.ps landscap.ps level1.ps prfont.ps ps2epsi.ps ps2image.ps pstoppm.ps showpage.ps type1ops.ps wrfont.ps ; do $(INSTALL_DATA) $$f $(gsdatadir)/$$f ; done -mkdir $(docdir) ! for f in NEWS drivers.doc fonts.doc hershey.doc history.doc humor.doc language.doc lib.doc make.doc psfiles.doc readme.doc use.doc ; do $(INSTALL_DATA) $$f $(docdir)/$$f ; done -mkdir $(exdir) for f in chess.ps cheq.ps colorcir.ps golfer.ps escher.ps snowflak.ps tiger.ps ; do $(INSTALL_DATA) $$f $(exdir)/$$f ; done --- 1945,1951 ---- -mkdir $(datadir) -mkdir $(gsdatadir) ! for f in README gslp.ps gs_init.ps gs_dps1.ps gs_fonts.ps gs_lev2.ps gs_statd.ps gs_type0.ps gs_sym_e.ps quit.ps Fontmap uglyr.gsf bdftops.ps decrypt.ps font2c.ps impath.ps landscap.ps level1.ps prfont.ps ps2ascii.ps ps2epsi.ps ps2image.ps pstoppm.ps showpage.ps type1ops.ps wrfont.ps ; do $(INSTALL_DATA) $$f $(gsdatadir)/$$f ; done -mkdir $(docdir) ! for f in NEWS ansi2knr.1 devices.doc drivers.doc fonts.doc gs.1 hershey.doc history.doc humor.doc language.doc lib.doc make.doc ps2epsi.doc psfiles.doc readme.doc use.doc xfonts.doc ; do $(INSTALL_DATA) $$f $(docdir)/$$f ; done -mkdir $(exdir) for f in chess.ps cheq.ps colorcir.ps golfer.ps escher.ps snowflak.ps tiger.ps ; do $(INSTALL_DATA) $$f $(exdir)/$$f ; done diff -rNC2 gs26/unix-cc.mak gs261/unix-cc.mak *** gs26/unix-cc.mak Sun May 9 23:24:12 1993 --- gs261/unix-cc.mak Sat May 29 11:20:38 1993 *************** *** 1,4 **** # Copyright (C) 1989, 1992, 1993 Aladdin Enterprises. All rights reserved. - # Distributed by Free Software Foundation, Inc. # # This file is part of Ghostscript. --- 1,3 ---- *************** *** 135,140 **** # The remainder of the makefile (unixhead.mak, gs.mak, devs.mak, unixtail.mak) # is generic. tar_cat concatenates all these together. ! # Copyright (C) 1990, 1991 Aladdin Enterprises. All rights reserved. ! # Distributed by Free Software Foundation, Inc. # # This file is part of Ghostscript. --- 134,138 ---- # The remainder of the makefile (unixhead.mak, gs.mak, devs.mak, unixtail.mak) # is generic. tar_cat concatenates all these together. ! # Copyright (C) 1990, 1991, 1993 Aladdin Enterprises. All rights reserved. # # This file is part of Ghostscript. *************** *** 171,178 **** XE= - # Define the need for uniq. - - UNIQ= - # Define the current directory prefix, shell quote string, and shell names. --- 169,172 ---- *************** *** 194,198 **** CCINT=$(CCC) # Copyright (C) 1989, 1992, 1993 Aladdin Enterprises. All rights reserved. - # Distributed by Free Software Foundation, Inc. # # This file is part of Ghostscript. --- 188,191 ---- *************** *** 267,272 **** # If a particular platform requires other utility programs # to be built, AK must include them too. - # UNIQ - null on systems that provide the uniq utility, - # uniq$(XE) on systems where we have to provide our own. # SHP - the prefix for invoking a shell script in the current directory # (null for MS-DOS, $(SH) ./ for Unix). --- 260,263 ---- *************** *** 275,286 **** # SH - the shell for scripts (null on MS-DOS, sh on Unix). # The platform-specific makefiles must also include rules for creating ! # ansi2knr$(XE) and genarch$(XE) from the corresponding .c files, ! # and for making arch.h by executing genarch$(XE). (This ! # shouldn't really be necessary, but Turbo C and Unix C treat the -o # switch slightly differently (Turbo C requires no following space, # Unix C requires a following space), and I haven't found a way to capture ! # the difference in a macro; also, Unix requires ./ because . may not be ! # in the search path, whereas MS-DOS always looks in the current ! # directory first.) all default: $(GS)$(XE) --- 266,274 ---- # SH - the shell for scripts (null on MS-DOS, sh on Unix). # The platform-specific makefiles must also include rules for creating ! # ansi2knr$(XE), genarch$(XE), and genconf$(XE) from the corresponding ! # .c files -- this is needed because Turbo C and Unix C treat the -o # switch slightly differently (Turbo C requires no following space, # Unix C requires a following space), and I haven't found a way to capture ! # the difference in a macro. all default: $(GS)$(XE) *************** *** 291,298 **** clean mostlyclean: rm -f *.$(OBJ) *.a core gmon.out ! rm -f *.dev *.d_* arch.h gconfig*.h obj*.tr lib*.tr rm -f t _temp_* _temp_*.* *.map *.sym ! rm -f ansi2knr$(XE) echogs$(XE) genarch$(XE) ! rm -f uniq$(XE) $(GS)$(XE) $(BEGINFILES) # A rule to do a quick and dirty compilation attempt when first installing --- 279,286 ---- clean mostlyclean: rm -f *.$(OBJ) *.a core gmon.out ! rm -f *.dev *.d_* arch.h gconfig*.h o*.tr l*.tr rm -f t _temp_* _temp_*.* *.map *.sym ! rm -f ansi2knr$(XE) echogs$(XE) genarch$(XE) genconf$(XE) ! rm -f $(GS)$(XE) $(BEGINFILES) # A rule to do a quick and dirty compilation attempt when first installing *************** *** 399,405 **** gxfont_h=gxfont.h $(gsfont_h) $(gsuid_h) gxfrac_h=gxfrac.h - # gxcolor and gxfmap are out of order because they include gxfrac. - gxcolor_h=gxcolor.h $(gxfrac_h) $(gsuid_h) - gxfmap_h=gxfmap.h $(gxfrac_h) gximage_h=gximage.h $(gscspace_h) $(gsimage_h) gxlum_h=gxlum.h --- 387,390 ---- *************** *** 410,413 **** --- 395,401 ---- gxtype1_h=gxtype1.h $(gscrypt1_h) $(gstype1_h) gxxfont_h=gxxfont.h $(gsccode_h) $(gsmatrix_h) $(gsuid_h) $(gsxfont_h) + # gxcolor and gxfmap are out of order because they include other files. + gxcolor_h=gxcolor.h $(gxfrac_h) $(gsuid_h) + gxfmap_h=gxfmap.h $(gxfrac_h) $(gxrefct_h) gzcolor_h=gzcolor.h $(gscolor_h) $(gxfmap_h) $(gxlum_h) *************** *** 494,498 **** gscoord.$(OBJ): gscoord.c $(GXERR) \ ! $(gxarith_h) $(gxfixed_h) $(gxmatrix_h) $(gzdevice_h) $(gzstate_h) $(gscoord_h) gsdevice.$(OBJ): gsdevice.c $(GXERR) \ --- 482,487 ---- gscoord.$(OBJ): gscoord.c $(GXERR) \ ! $(gsccode_h) $(gxarith_h) $(gxfixed_h) $(gxfont_h) $(gxmatrix_h) \ ! $(gzdevice_h) $(gzstate_h) $(gscoord_h) gsdevice.$(OBJ): gsdevice.c $(GXERR) \ *************** *** 547,551 **** gsstate.$(OBJ): gsstate.c $(GXERR) \ ! $(gscie_h) $(gscspace_h) $(gxcolor_h) $(gxrefct_h) \ $(gzstate_h) $(gzcolor_h) $(gzdevice_h) $(gzht_h) $(gzline_h) $(gzpath_h) --- 536,540 ---- gsstate.$(OBJ): gsstate.c $(GXERR) \ ! $(gscie_h) $(gscolor2_h) $(gscspace_h) $(gxcolor_h) $(gxrefct_h) \ $(gzstate_h) $(gzcolor_h) $(gzdevice_h) $(gzht_h) $(gzline_h) $(gzpath_h) *************** *** 573,577 **** ###### Files dependent on the installed devices, features, and platform. ! # Generating gconfig.h also generates obj*.tr and lib.tr. # gconfig.h shouldn't have to depend on ALL_DEVS, but that would --- 562,566 ---- ###### Files dependent on the installed devices, features, and platform. ! # Generating gconfig.h also generates o*.tr and l*.tr. # gconfig.h shouldn't have to depend on ALL_DEVS, but that would *************** *** 584,600 **** $(DEVICE_DEVS6) $(DEVICE_DEVS7) $(DEVICE_DEVS8) $(DEVICE_DEVS9) ! gconfig.h obj.tr objw.tr lib.tr: \ ! devs.mak $(MAKEFILE) echogs$(XE) $(UNIQ) $(ALL_DEVS) ! $(SHP)gsconfig $(DEVICE_DEVS) + ! $(SHP)gsconfig + $(DEVICE_DEVS1) + ! $(SHP)gsconfig + $(DEVICE_DEVS2) + ! $(SHP)gsconfig + $(DEVICE_DEVS3) + ! $(SHP)gsconfig + $(DEVICE_DEVS4) + ! $(SHP)gsconfig + $(DEVICE_DEVS5) + ! $(SHP)gsconfig + $(DEVICE_DEVS6) + ! $(SHP)gsconfig + $(DEVICE_DEVS7) + ! $(SHP)gsconfig + $(DEVICE_DEVS8) + ! $(SHP)gsconfig + $(DEVICE_DEVS9) + ! $(SHP)gsconfig + $(FEATURE_DEVS) $(PLATFORM).dev $(EXP)echogs -a gconfig.h -x 23 define GS_LIB_DEFAULT -x 2022 $(GS_LIB_DEFAULT) -x 22 $(EXP)echogs -a gconfig.h -x 23 define GS_INIT -x 2022 $(GS_INIT) -x 22 --- 573,591 ---- $(DEVICE_DEVS6) $(DEVICE_DEVS7) $(DEVICE_DEVS8) $(DEVICE_DEVS9) ! gconfig.h obj.tr objw.tr ld.tr lib.tr: \ ! devs.mak $(MAKEFILE) echogs$(XE) genconf$(XE) $(ALL_DEVS) ! $(EXP)echogs -w t.cfg - $(FEATURE_DEVS) $(PLATFORM).dev ! $(EXP)echogs -a t.cfg - $(DEVICE_DEVS) ! $(EXP)echogs -a t.cfg - $(DEVICE_DEVS1) ! $(EXP)echogs -a t.cfg - $(DEVICE_DEVS2) ! $(EXP)echogs -a t.cfg - $(DEVICE_DEVS3) ! $(EXP)echogs -a t.cfg - $(DEVICE_DEVS4) ! $(EXP)echogs -a t.cfg - $(DEVICE_DEVS5) ! $(EXP)echogs -a t.cfg - $(DEVICE_DEVS6) ! $(EXP)echogs -a t.cfg - $(DEVICE_DEVS7) ! $(EXP)echogs -a t.cfg - $(DEVICE_DEVS8) ! $(EXP)echogs -a t.cfg - $(DEVICE_DEVS9) ! $(EXP)genconf @t.cfg -h gconfig.h -l lib.tr -o obj.tr -u ld.tr -w objw.tr ! rm t.cfg $(EXP)echogs -a gconfig.h -x 23 define GS_LIB_DEFAULT -x 2022 $(GS_LIB_DEFAULT) -x 22 $(EXP)echogs -a gconfig.h -x 23 define GS_INIT -x 2022 $(GS_INIT) -x 22 *************** *** 674,678 **** iccfont.$(OBJ): iccfont.c $(GH) gconfigf.h \ ! $(ghost_h) $(alloc_h) $(ccfont_h) $(dict_h) $(dstack_h) $(errors_h) $(iutil_h) $(iname_h) $(oper_h) $(save_h) $(store_h) idebug.$(OBJ): idebug.c $(GH) \ --- 665,670 ---- iccfont.$(OBJ): iccfont.c $(GH) gconfigf.h \ ! $(ghost_h) $(alloc_h) $(ccfont_h) $(dict_h) $(dstack_h) $(errors_h) \ ! $(font_h) $(iutil_h) $(iname_h) $(oper_h) $(save_h) $(store_h) idebug.$(OBJ): idebug.c $(GH) \ *************** *** 841,845 **** zchar2.$(OBJ): zchar2.c $(OP) $(gschar_h) $(gsmatrix_h) $(gxfixed_h) $(gxfont_h) \ ! $(alloc_h) $(estack_h) $(font_h) $(state_h) $(store_h) $(stream_h) $(bnum_h) zdps1.$(OBJ): zdps1.c $(OP) $(gsmatrix_h) $(gspath_h) $(gsstate_h) \ --- 833,837 ---- zchar2.$(OBJ): zchar2.c $(OP) $(gschar_h) $(gsmatrix_h) $(gxfixed_h) $(gxfont_h) \ ! $(alloc_h) $(estack_h) $(font_h) $(iname_h) $(state_h) $(store_h) $(stream_h) $(bnum_h) zdps1.$(OBJ): zdps1.c $(OP) $(gsmatrix_h) $(gspath_h) $(gsstate_h) \ *************** *** 907,911 **** zcie.$(OBJ): zcie.c $(OP) \ ! $(gscspace_h) $(gscolor2_h) $(gscie_h) $(gxrefct_h) \ $(alloc_h) $(dict_h) $(dparam_h) $(estack_h) $(save_h) $(state_h) $(store_h) --- 899,903 ---- zcie.$(OBJ): zcie.c $(OP) \ ! $(gscspace_h) $(gscolor2_h) $(gscie_h) $(gxcolor_h) $(gxrefct_h) \ $(alloc_h) $(dict_h) $(dparam_h) $(estack_h) $(save_h) $(state_h) $(store_h) *************** *** 922,926 **** zimage2.$(OBJ): zimage2.c $(OP) \ ! $(gscolor_h) $(gscolor2_h) $(gscspace_h) $(gsmatrix_h) \ $(dict_h) $(dparam_h) $(ilevel_h) $(state_h) --- 914,918 ---- zimage2.$(OBJ): zimage2.c $(OP) \ ! $(gscolor_h) $(gscolor2_h) $(gscspace_h) $(gsmatrix_h) $(gxcolor_h) \ $(dict_h) $(dparam_h) $(ilevel_h) $(state_h) *************** *** 973,984 **** # Because of intrinsic limitations in `make', we have to list # the object file names and the font names separately. ! ccfonts_=uglyr.$(OBJ) ccfonts1=uglyr ! ccfonts.dev: $(ccfonts_) iccfont.$(OBJ) ! $(SHP)gssetmod ccfonts $(ccfonts_) iccfont.$(OBJ) $(SHP)gsaddmod ccfonts -oper ccfonts ! gconfigf.h: $(MAKEFILE) $(SHP)gssetmod ccfonts_ $(SHP)gsaddmod ccfonts_ -font $(ccfonts1) --- 965,982 ---- # Because of intrinsic limitations in `make', we have to list # the object file names and the font names separately. ! ccfonts1_=uglyr.$(OBJ) ccfonts1=uglyr ! ccfonts.dev: $(MAKEFILE) gs.mak iccfont.$(OBJ) \ ! $(ccfonts1_) $(ccfonts2_) $(ccfonts3_) $(ccfonts4_) $(ccfonts5_) ! $(SHP)gssetmod ccfonts iccfont.$(OBJ) ! $(SHP)gsaddmod ccfonts -obj $(ccfonts1_) ! $(SHP)gsaddmod ccfonts -obj $(ccfonts2_) ! $(SHP)gsaddmod ccfonts -obj $(ccfonts3_) ! $(SHP)gsaddmod ccfonts -obj $(ccfonts4_) ! $(SHP)gsaddmod ccfonts -obj $(ccfonts5_) $(SHP)gsaddmod ccfonts -oper ccfonts ! gconfigf.h: $(MAKEFILE) gs.mak genconf$(XE) $(SHP)gssetmod ccfonts_ $(SHP)gsaddmod ccfonts_ -font $(ccfonts1) *************** *** 987,992 **** $(SHP)gsaddmod ccfonts_ -font $(ccfonts4) $(SHP)gsaddmod ccfonts_ -font $(ccfonts5) ! rm -f gconfigf.h ! mv ccfonts_.d_f gconfigf.h uglyr.$(OBJ): uglyr.c $(CCFONT) --- 985,989 ---- $(SHP)gsaddmod ccfonts_ -font $(ccfonts4) $(SHP)gsaddmod ccfonts_ -font $(ccfonts5) ! $(EXP)genconf ccfonts_.dev -f gconfigf.h uglyr.$(OBJ): uglyr.c $(CCFONT) *************** *** 1024,1028 **** $(CCINT) interp.c # Copyright (C) 1989, 1992, 1993 Aladdin Enterprises. All rights reserved. - # Distributed by Free Software Foundation, Inc. # # This file is part of Ghostscript. --- 1021,1024 ---- *************** *** 1079,1082 **** --- 1075,1079 ---- # x11 X Windows version 11, release >=3 [Unix and VMS only] # Printers: + # * appledmp Apple Dot Matrix Printer (should also work with Imagewriter) # bj10e Canon BubbleJet BJ10e # * bj200 Canon BubbleJet BJ200 *************** *** 1097,1100 **** --- 1094,1098 ---- # (triple resolution) # * epsonc Epson LQ-2550 and Fujitsu 3400/2400/1200 color printers + # * escp2 Epson ESC/P 2 language printers, including Stylus 800 # + ibmpro IBM 9-pin Proprinter # * jetp3852 IBM Jetprinter ink-jet color printer (Model #3852) *************** *** 1188,1191 **** --- 1186,1193 ---- # plane-addressed), a SuperVGA driver (8 bit-planes, byte addressed), # and a special driver for the S3 chip. + # To make A4 paper the default, change the compilation line from + # $(CCD) ... + # to + # $(CCD) -DA4 ### ----------------------- EGA and VGA displays ----------------------- ### *************** *** 1308,1312 **** # Choose one of gdevwddb or gdevwdib here. ! mswin_=gdevmswn.$(OBJ) gdevmsxf.$(OBJ) gdevwddb.$(OBJ) \ gdevemap.$(OBJ) gdevpccm.$(OBJ) mswin.dev: $(mswin_) --- 1310,1314 ---- # Choose one of gdevwddb or gdevwdib here. ! mswin_=gdevmswn.$(OBJ) gdevmsxf.$(OBJ) gdevwdib.$(OBJ) \ gdevemap.$(OBJ) gdevpccm.$(OBJ) mswin.dev: $(mswin_) *************** *** 1353,1356 **** --- 1355,1365 ---- gdevprn.$(OBJ): gdevprn.c $(PDEVH) $(gp_h) $(gsprops_h) + ### ------------------- The Apple DMP printer device ------------------- ### + + appledmp_=gdevadmp.$(OBJ) gdevprn.$(OBJ) + + appledmp.dev: $(appledmp_) + $(SHP)gssetdev appledmp $(appledmp_) + ### ------------ The Canon BubbleJet BJ10e and BJ200 devices ------------ ### *************** *** 1499,1502 **** --- 1508,1521 ---- gdevepsc.$(OBJ): gdevepsc.c $(PDEVH) + ### -------------- The Epson ESC/P 2 language printer device ----------- ### + ### Note: this driver was contributed by a user: if you have questions, ### + ### please contact Richard Brown (rab@tauon.ph.unimelb.edu.au). ### + + escp2_=gdevescp2.$(OBJ) gdevprn.$(OBJ) + escp2.dev: $(escp2_) + $(SHP)gssetdev escp2 $(escp2_) + + gdevescp2.$(OBJ): gdevescp2.c $(PDEVH) + ### ------------ The H-P PaintJet color printer device ----------------- ### ### Note: this driver also supports the DEC LJ250 color printer, which ### *************** *** 1814,1819 **** $(SHP)gssetdev tiffg3 $(tiffg3_) gdevtiff.$(OBJ): gdevtiff.c $(GDEV) $(gdevprn_h) gdevdfg3.h gdevtiff.h ! # Copyright (C) 1990, 1992 Aladdin Enterprises. All rights reserved. ! # Distributed by Free Software Foundation, Inc. # # This file is part of Ghostscript. --- 1833,1837 ---- $(SHP)gssetdev tiffg3 $(tiffg3_) gdevtiff.$(OBJ): gdevtiff.c $(GDEV) $(gdevprn_h) gdevdfg3.h gdevtiff.h ! # Copyright (C) 1990, 1992, 1993 Aladdin Enterprises. All rights reserved. # # This file is part of Ghostscript. *************** *** 1888,1891 **** --- 1906,1912 ---- $(CC) -o genarch$(XE) genarch.c + genconf$(XE): genconf.c + $(CC) -o genconf$(XE) genconf.c + # ----------------------------- Main program ------------------------------ # *************** *** 1899,1908 **** # The second call on echogs writes a \. This is the only # way to do it that works with all flavors of shell! ! $(GS)$(XE): $(GSUNIX) obj.tr lib.tr echogs $(ALL_DEVS) ./echogs -n - $(CC) $(LDFLAGS) $(XLIBDIRS) -o gs $(GSUNIX) >_temp_ ./echogs -x 205c >>_temp_ ! cat obj.tr >>_temp_ ! cat lib.tr >>_temp_ ! ./echogs -q $(EXTRALIBS) -lm >>_temp_ $(SH) <_temp_ --- 1920,1928 ---- # The second call on echogs writes a \. This is the only # way to do it that works with all flavors of shell! ! $(GS)$(XE): $(GSUNIX) ld.tr echogs $(ALL_DEVS) ./echogs -n - $(CC) $(LDFLAGS) $(XLIBDIRS) -o gs $(GSUNIX) >_temp_ ./echogs -x 205c >>_temp_ ! cat ld.tr >>_temp_ ! ./echogs - $(EXTRALIBS) -lm >>_temp_ $(SH) <_temp_ *************** *** 1920,1926 **** -mkdir $(datadir) -mkdir $(gsdatadir) ! for f in README gslp.ps gs_init.ps gs_2asc.ps gs_dps1.ps gs_fonts.ps gs_lev2.ps gs_statd.ps gs_type0.ps gs_sym_e.ps quit.ps Fontmap uglyr.gsf bdftops.ps decrypt.ps font2c.ps impath.ps landscap.ps level1.ps prfont.ps ps2epsi.ps ps2image.ps pstoppm.ps showpage.ps type1ops.ps wrfont.ps ; do $(INSTALL_DATA) $$f $(gsdatadir)/$$f ; done -mkdir $(docdir) ! for f in NEWS drivers.doc fonts.doc hershey.doc history.doc humor.doc language.doc lib.doc make.doc psfiles.doc readme.doc use.doc ; do $(INSTALL_DATA) $$f $(docdir)/$$f ; done -mkdir $(exdir) for f in chess.ps cheq.ps colorcir.ps golfer.ps escher.ps snowflak.ps tiger.ps ; do $(INSTALL_DATA) $$f $(exdir)/$$f ; done --- 1940,1946 ---- -mkdir $(datadir) -mkdir $(gsdatadir) ! for f in README gslp.ps gs_init.ps gs_dps1.ps gs_fonts.ps gs_lev2.ps gs_statd.ps gs_type0.ps gs_sym_e.ps quit.ps Fontmap uglyr.gsf bdftops.ps decrypt.ps font2c.ps impath.ps landscap.ps level1.ps prfont.ps ps2ascii.ps ps2epsi.ps ps2image.ps pstoppm.ps showpage.ps type1ops.ps wrfont.ps ; do $(INSTALL_DATA) $$f $(gsdatadir)/$$f ; done -mkdir $(docdir) ! for f in NEWS ansi2knr.1 devices.doc drivers.doc fonts.doc gs.1 hershey.doc history.doc humor.doc language.doc lib.doc make.doc ps2epsi.doc psfiles.doc readme.doc use.doc xfonts.doc ; do $(INSTALL_DATA) $$f $(docdir)/$$f ; done -mkdir $(exdir) for f in chess.ps cheq.ps colorcir.ps golfer.ps escher.ps snowflak.ps tiger.ps ; do $(INSTALL_DATA) $$f $(exdir)/$$f ; done diff -rNC2 gs26/unix-gcc.mak gs261/unix-gcc.mak *** gs26/unix-gcc.mak Sun May 9 23:24:14 1993 --- gs261/unix-gcc.mak Sat May 29 11:20:38 1993 *************** *** 1,4 **** # Copyright (C) 1989, 1992, 1993 Aladdin Enterprises. All rights reserved. - # Distributed by Free Software Foundation, Inc. # # This file is part of Ghostscript. --- 1,3 ---- *************** *** 142,147 **** # The remainder of the makefile (unixhead.mak, gs.mak, devs.mak, unixtail.mak) # is generic. tar_cat concatenates all these together. ! # Copyright (C) 1990, 1991 Aladdin Enterprises. All rights reserved. ! # Distributed by Free Software Foundation, Inc. # # This file is part of Ghostscript. --- 141,145 ---- # The remainder of the makefile (unixhead.mak, gs.mak, devs.mak, unixtail.mak) # is generic. tar_cat concatenates all these together. ! # Copyright (C) 1990, 1991, 1993 Aladdin Enterprises. All rights reserved. # # This file is part of Ghostscript. *************** *** 178,185 **** XE= - # Define the need for uniq. - - UNIQ= - # Define the current directory prefix, shell quote string, and shell names. --- 176,179 ---- *************** *** 201,205 **** CCINT=$(CCC) # Copyright (C) 1989, 1992, 1993 Aladdin Enterprises. All rights reserved. - # Distributed by Free Software Foundation, Inc. # # This file is part of Ghostscript. --- 195,198 ---- *************** *** 274,279 **** # If a particular platform requires other utility programs # to be built, AK must include them too. - # UNIQ - null on systems that provide the uniq utility, - # uniq$(XE) on systems where we have to provide our own. # SHP - the prefix for invoking a shell script in the current directory # (null for MS-DOS, $(SH) ./ for Unix). --- 267,270 ---- *************** *** 282,293 **** # SH - the shell for scripts (null on MS-DOS, sh on Unix). # The platform-specific makefiles must also include rules for creating ! # ansi2knr$(XE) and genarch$(XE) from the corresponding .c files, ! # and for making arch.h by executing genarch$(XE). (This ! # shouldn't really be necessary, but Turbo C and Unix C treat the -o # switch slightly differently (Turbo C requires no following space, # Unix C requires a following space), and I haven't found a way to capture ! # the difference in a macro; also, Unix requires ./ because . may not be ! # in the search path, whereas MS-DOS always looks in the current ! # directory first.) all default: $(GS)$(XE) --- 273,281 ---- # SH - the shell for scripts (null on MS-DOS, sh on Unix). # The platform-specific makefiles must also include rules for creating ! # ansi2knr$(XE), genarch$(XE), and genconf$(XE) from the corresponding ! # .c files -- this is needed because Turbo C and Unix C treat the -o # switch slightly differently (Turbo C requires no following space, # Unix C requires a following space), and I haven't found a way to capture ! # the difference in a macro. all default: $(GS)$(XE) *************** *** 298,305 **** clean mostlyclean: rm -f *.$(OBJ) *.a core gmon.out ! rm -f *.dev *.d_* arch.h gconfig*.h obj*.tr lib*.tr rm -f t _temp_* _temp_*.* *.map *.sym ! rm -f ansi2knr$(XE) echogs$(XE) genarch$(XE) ! rm -f uniq$(XE) $(GS)$(XE) $(BEGINFILES) # A rule to do a quick and dirty compilation attempt when first installing --- 286,293 ---- clean mostlyclean: rm -f *.$(OBJ) *.a core gmon.out ! rm -f *.dev *.d_* arch.h gconfig*.h o*.tr l*.tr rm -f t _temp_* _temp_*.* *.map *.sym ! rm -f ansi2knr$(XE) echogs$(XE) genarch$(XE) genconf$(XE) ! rm -f $(GS)$(XE) $(BEGINFILES) # A rule to do a quick and dirty compilation attempt when first installing *************** *** 406,412 **** gxfont_h=gxfont.h $(gsfont_h) $(gsuid_h) gxfrac_h=gxfrac.h - # gxcolor and gxfmap are out of order because they include gxfrac. - gxcolor_h=gxcolor.h $(gxfrac_h) $(gsuid_h) - gxfmap_h=gxfmap.h $(gxfrac_h) gximage_h=gximage.h $(gscspace_h) $(gsimage_h) gxlum_h=gxlum.h --- 394,397 ---- *************** *** 417,420 **** --- 402,408 ---- gxtype1_h=gxtype1.h $(gscrypt1_h) $(gstype1_h) gxxfont_h=gxxfont.h $(gsccode_h) $(gsmatrix_h) $(gsuid_h) $(gsxfont_h) + # gxcolor and gxfmap are out of order because they include other files. + gxcolor_h=gxcolor.h $(gxfrac_h) $(gsuid_h) + gxfmap_h=gxfmap.h $(gxfrac_h) $(gxrefct_h) gzcolor_h=gzcolor.h $(gscolor_h) $(gxfmap_h) $(gxlum_h) *************** *** 501,505 **** gscoord.$(OBJ): gscoord.c $(GXERR) \ ! $(gxarith_h) $(gxfixed_h) $(gxmatrix_h) $(gzdevice_h) $(gzstate_h) $(gscoord_h) gsdevice.$(OBJ): gsdevice.c $(GXERR) \ --- 489,494 ---- gscoord.$(OBJ): gscoord.c $(GXERR) \ ! $(gsccode_h) $(gxarith_h) $(gxfixed_h) $(gxfont_h) $(gxmatrix_h) \ ! $(gzdevice_h) $(gzstate_h) $(gscoord_h) gsdevice.$(OBJ): gsdevice.c $(GXERR) \ *************** *** 554,558 **** gsstate.$(OBJ): gsstate.c $(GXERR) \ ! $(gscie_h) $(gscspace_h) $(gxcolor_h) $(gxrefct_h) \ $(gzstate_h) $(gzcolor_h) $(gzdevice_h) $(gzht_h) $(gzline_h) $(gzpath_h) --- 543,547 ---- gsstate.$(OBJ): gsstate.c $(GXERR) \ ! $(gscie_h) $(gscolor2_h) $(gscspace_h) $(gxcolor_h) $(gxrefct_h) \ $(gzstate_h) $(gzcolor_h) $(gzdevice_h) $(gzht_h) $(gzline_h) $(gzpath_h) *************** *** 580,584 **** ###### Files dependent on the installed devices, features, and platform. ! # Generating gconfig.h also generates obj*.tr and lib.tr. # gconfig.h shouldn't have to depend on ALL_DEVS, but that would --- 569,573 ---- ###### Files dependent on the installed devices, features, and platform. ! # Generating gconfig.h also generates o*.tr and l*.tr. # gconfig.h shouldn't have to depend on ALL_DEVS, but that would *************** *** 591,607 **** $(DEVICE_DEVS6) $(DEVICE_DEVS7) $(DEVICE_DEVS8) $(DEVICE_DEVS9) ! gconfig.h obj.tr objw.tr lib.tr: \ ! devs.mak $(MAKEFILE) echogs$(XE) $(UNIQ) $(ALL_DEVS) ! $(SHP)gsconfig $(DEVICE_DEVS) + ! $(SHP)gsconfig + $(DEVICE_DEVS1) + ! $(SHP)gsconfig + $(DEVICE_DEVS2) + ! $(SHP)gsconfig + $(DEVICE_DEVS3) + ! $(SHP)gsconfig + $(DEVICE_DEVS4) + ! $(SHP)gsconfig + $(DEVICE_DEVS5) + ! $(SHP)gsconfig + $(DEVICE_DEVS6) + ! $(SHP)gsconfig + $(DEVICE_DEVS7) + ! $(SHP)gsconfig + $(DEVICE_DEVS8) + ! $(SHP)gsconfig + $(DEVICE_DEVS9) + ! $(SHP)gsconfig + $(FEATURE_DEVS) $(PLATFORM).dev $(EXP)echogs -a gconfig.h -x 23 define GS_LIB_DEFAULT -x 2022 $(GS_LIB_DEFAULT) -x 22 $(EXP)echogs -a gconfig.h -x 23 define GS_INIT -x 2022 $(GS_INIT) -x 22 --- 580,598 ---- $(DEVICE_DEVS6) $(DEVICE_DEVS7) $(DEVICE_DEVS8) $(DEVICE_DEVS9) ! gconfig.h obj.tr objw.tr ld.tr lib.tr: \ ! devs.mak $(MAKEFILE) echogs$(XE) genconf$(XE) $(ALL_DEVS) ! $(EXP)echogs -w t.cfg - $(FEATURE_DEVS) $(PLATFORM).dev ! $(EXP)echogs -a t.cfg - $(DEVICE_DEVS) ! $(EXP)echogs -a t.cfg - $(DEVICE_DEVS1) ! $(EXP)echogs -a t.cfg - $(DEVICE_DEVS2) ! $(EXP)echogs -a t.cfg - $(DEVICE_DEVS3) ! $(EXP)echogs -a t.cfg - $(DEVICE_DEVS4) ! $(EXP)echogs -a t.cfg - $(DEVICE_DEVS5) ! $(EXP)echogs -a t.cfg - $(DEVICE_DEVS6) ! $(EXP)echogs -a t.cfg - $(DEVICE_DEVS7) ! $(EXP)echogs -a t.cfg - $(DEVICE_DEVS8) ! $(EXP)echogs -a t.cfg - $(DEVICE_DEVS9) ! $(EXP)genconf @t.cfg -h gconfig.h -l lib.tr -o obj.tr -u ld.tr -w objw.tr ! rm t.cfg $(EXP)echogs -a gconfig.h -x 23 define GS_LIB_DEFAULT -x 2022 $(GS_LIB_DEFAULT) -x 22 $(EXP)echogs -a gconfig.h -x 23 define GS_INIT -x 2022 $(GS_INIT) -x 22 *************** *** 681,685 **** iccfont.$(OBJ): iccfont.c $(GH) gconfigf.h \ ! $(ghost_h) $(alloc_h) $(ccfont_h) $(dict_h) $(dstack_h) $(errors_h) $(iutil_h) $(iname_h) $(oper_h) $(save_h) $(store_h) idebug.$(OBJ): idebug.c $(GH) \ --- 672,677 ---- iccfont.$(OBJ): iccfont.c $(GH) gconfigf.h \ ! $(ghost_h) $(alloc_h) $(ccfont_h) $(dict_h) $(dstack_h) $(errors_h) \ ! $(font_h) $(iutil_h) $(iname_h) $(oper_h) $(save_h) $(store_h) idebug.$(OBJ): idebug.c $(GH) \ *************** *** 848,852 **** zchar2.$(OBJ): zchar2.c $(OP) $(gschar_h) $(gsmatrix_h) $(gxfixed_h) $(gxfont_h) \ ! $(alloc_h) $(estack_h) $(font_h) $(state_h) $(store_h) $(stream_h) $(bnum_h) zdps1.$(OBJ): zdps1.c $(OP) $(gsmatrix_h) $(gspath_h) $(gsstate_h) \ --- 840,844 ---- zchar2.$(OBJ): zchar2.c $(OP) $(gschar_h) $(gsmatrix_h) $(gxfixed_h) $(gxfont_h) \ ! $(alloc_h) $(estack_h) $(font_h) $(iname_h) $(state_h) $(store_h) $(stream_h) $(bnum_h) zdps1.$(OBJ): zdps1.c $(OP) $(gsmatrix_h) $(gspath_h) $(gsstate_h) \ *************** *** 914,918 **** zcie.$(OBJ): zcie.c $(OP) \ ! $(gscspace_h) $(gscolor2_h) $(gscie_h) $(gxrefct_h) \ $(alloc_h) $(dict_h) $(dparam_h) $(estack_h) $(save_h) $(state_h) $(store_h) --- 906,910 ---- zcie.$(OBJ): zcie.c $(OP) \ ! $(gscspace_h) $(gscolor2_h) $(gscie_h) $(gxcolor_h) $(gxrefct_h) \ $(alloc_h) $(dict_h) $(dparam_h) $(estack_h) $(save_h) $(state_h) $(store_h) *************** *** 929,933 **** zimage2.$(OBJ): zimage2.c $(OP) \ ! $(gscolor_h) $(gscolor2_h) $(gscspace_h) $(gsmatrix_h) \ $(dict_h) $(dparam_h) $(ilevel_h) $(state_h) --- 921,925 ---- zimage2.$(OBJ): zimage2.c $(OP) \ ! $(gscolor_h) $(gscolor2_h) $(gscspace_h) $(gsmatrix_h) $(gxcolor_h) \ $(dict_h) $(dparam_h) $(ilevel_h) $(state_h) *************** *** 980,991 **** # Because of intrinsic limitations in `make', we have to list # the object file names and the font names separately. ! ccfonts_=uglyr.$(OBJ) ccfonts1=uglyr ! ccfonts.dev: $(ccfonts_) iccfont.$(OBJ) ! $(SHP)gssetmod ccfonts $(ccfonts_) iccfont.$(OBJ) $(SHP)gsaddmod ccfonts -oper ccfonts ! gconfigf.h: $(MAKEFILE) $(SHP)gssetmod ccfonts_ $(SHP)gsaddmod ccfonts_ -font $(ccfonts1) --- 972,989 ---- # Because of intrinsic limitations in `make', we have to list # the object file names and the font names separately. ! ccfonts1_=uglyr.$(OBJ) ccfonts1=uglyr ! ccfonts.dev: $(MAKEFILE) gs.mak iccfont.$(OBJ) \ ! $(ccfonts1_) $(ccfonts2_) $(ccfonts3_) $(ccfonts4_) $(ccfonts5_) ! $(SHP)gssetmod ccfonts iccfont.$(OBJ) ! $(SHP)gsaddmod ccfonts -obj $(ccfonts1_) ! $(SHP)gsaddmod ccfonts -obj $(ccfonts2_) ! $(SHP)gsaddmod ccfonts -obj $(ccfonts3_) ! $(SHP)gsaddmod ccfonts -obj $(ccfonts4_) ! $(SHP)gsaddmod ccfonts -obj $(ccfonts5_) $(SHP)gsaddmod ccfonts -oper ccfonts ! gconfigf.h: $(MAKEFILE) gs.mak genconf$(XE) $(SHP)gssetmod ccfonts_ $(SHP)gsaddmod ccfonts_ -font $(ccfonts1) *************** *** 994,999 **** $(SHP)gsaddmod ccfonts_ -font $(ccfonts4) $(SHP)gsaddmod ccfonts_ -font $(ccfonts5) ! rm -f gconfigf.h ! mv ccfonts_.d_f gconfigf.h uglyr.$(OBJ): uglyr.c $(CCFONT) --- 992,996 ---- $(SHP)gsaddmod ccfonts_ -font $(ccfonts4) $(SHP)gsaddmod ccfonts_ -font $(ccfonts5) ! $(EXP)genconf ccfonts_.dev -f gconfigf.h uglyr.$(OBJ): uglyr.c $(CCFONT) *************** *** 1031,1035 **** $(CCINT) interp.c # Copyright (C) 1989, 1992, 1993 Aladdin Enterprises. All rights reserved. - # Distributed by Free Software Foundation, Inc. # # This file is part of Ghostscript. --- 1028,1031 ---- *************** *** 1086,1089 **** --- 1082,1086 ---- # x11 X Windows version 11, release >=3 [Unix and VMS only] # Printers: + # * appledmp Apple Dot Matrix Printer (should also work with Imagewriter) # bj10e Canon BubbleJet BJ10e # * bj200 Canon BubbleJet BJ200 *************** *** 1104,1107 **** --- 1101,1105 ---- # (triple resolution) # * epsonc Epson LQ-2550 and Fujitsu 3400/2400/1200 color printers + # * escp2 Epson ESC/P 2 language printers, including Stylus 800 # + ibmpro IBM 9-pin Proprinter # * jetp3852 IBM Jetprinter ink-jet color printer (Model #3852) *************** *** 1195,1198 **** --- 1193,1200 ---- # plane-addressed), a SuperVGA driver (8 bit-planes, byte addressed), # and a special driver for the S3 chip. + # To make A4 paper the default, change the compilation line from + # $(CCD) ... + # to + # $(CCD) -DA4 ### ----------------------- EGA and VGA displays ----------------------- ### *************** *** 1315,1319 **** # Choose one of gdevwddb or gdevwdib here. ! mswin_=gdevmswn.$(OBJ) gdevmsxf.$(OBJ) gdevwddb.$(OBJ) \ gdevemap.$(OBJ) gdevpccm.$(OBJ) mswin.dev: $(mswin_) --- 1317,1321 ---- # Choose one of gdevwddb or gdevwdib here. ! mswin_=gdevmswn.$(OBJ) gdevmsxf.$(OBJ) gdevwdib.$(OBJ) \ gdevemap.$(OBJ) gdevpccm.$(OBJ) mswin.dev: $(mswin_) *************** *** 1360,1363 **** --- 1362,1372 ---- gdevprn.$(OBJ): gdevprn.c $(PDEVH) $(gp_h) $(gsprops_h) + ### ------------------- The Apple DMP printer device ------------------- ### + + appledmp_=gdevadmp.$(OBJ) gdevprn.$(OBJ) + + appledmp.dev: $(appledmp_) + $(SHP)gssetdev appledmp $(appledmp_) + ### ------------ The Canon BubbleJet BJ10e and BJ200 devices ------------ ### *************** *** 1506,1509 **** --- 1515,1528 ---- gdevepsc.$(OBJ): gdevepsc.c $(PDEVH) + ### -------------- The Epson ESC/P 2 language printer device ----------- ### + ### Note: this driver was contributed by a user: if you have questions, ### + ### please contact Richard Brown (rab@tauon.ph.unimelb.edu.au). ### + + escp2_=gdevescp2.$(OBJ) gdevprn.$(OBJ) + escp2.dev: $(escp2_) + $(SHP)gssetdev escp2 $(escp2_) + + gdevescp2.$(OBJ): gdevescp2.c $(PDEVH) + ### ------------ The H-P PaintJet color printer device ----------------- ### ### Note: this driver also supports the DEC LJ250 color printer, which ### *************** *** 1821,1826 **** $(SHP)gssetdev tiffg3 $(tiffg3_) gdevtiff.$(OBJ): gdevtiff.c $(GDEV) $(gdevprn_h) gdevdfg3.h gdevtiff.h ! # Copyright (C) 1990, 1992 Aladdin Enterprises. All rights reserved. ! # Distributed by Free Software Foundation, Inc. # # This file is part of Ghostscript. --- 1840,1844 ---- $(SHP)gssetdev tiffg3 $(tiffg3_) gdevtiff.$(OBJ): gdevtiff.c $(GDEV) $(gdevprn_h) gdevdfg3.h gdevtiff.h ! # Copyright (C) 1990, 1992, 1993 Aladdin Enterprises. All rights reserved. # # This file is part of Ghostscript. *************** *** 1895,1898 **** --- 1913,1919 ---- $(CC) -o genarch$(XE) genarch.c + genconf$(XE): genconf.c + $(CC) -o genconf$(XE) genconf.c + # ----------------------------- Main program ------------------------------ # *************** *** 1906,1915 **** # The second call on echogs writes a \. This is the only # way to do it that works with all flavors of shell! ! $(GS)$(XE): $(GSUNIX) obj.tr lib.tr echogs $(ALL_DEVS) ./echogs -n - $(CC) $(LDFLAGS) $(XLIBDIRS) -o gs $(GSUNIX) >_temp_ ./echogs -x 205c >>_temp_ ! cat obj.tr >>_temp_ ! cat lib.tr >>_temp_ ! ./echogs -q $(EXTRALIBS) -lm >>_temp_ $(SH) <_temp_ --- 1927,1935 ---- # The second call on echogs writes a \. This is the only # way to do it that works with all flavors of shell! ! $(GS)$(XE): $(GSUNIX) ld.tr echogs $(ALL_DEVS) ./echogs -n - $(CC) $(LDFLAGS) $(XLIBDIRS) -o gs $(GSUNIX) >_temp_ ./echogs -x 205c >>_temp_ ! cat ld.tr >>_temp_ ! ./echogs - $(EXTRALIBS) -lm >>_temp_ $(SH) <_temp_ *************** *** 1927,1933 **** -mkdir $(datadir) -mkdir $(gsdatadir) ! for f in README gslp.ps gs_init.ps gs_2asc.ps gs_dps1.ps gs_fonts.ps gs_lev2.ps gs_statd.ps gs_type0.ps gs_sym_e.ps quit.ps Fontmap uglyr.gsf bdftops.ps decrypt.ps font2c.ps impath.ps landscap.ps level1.ps prfont.ps ps2epsi.ps ps2image.ps pstoppm.ps showpage.ps type1ops.ps wrfont.ps ; do $(INSTALL_DATA) $$f $(gsdatadir)/$$f ; done -mkdir $(docdir) ! for f in NEWS drivers.doc fonts.doc hershey.doc history.doc humor.doc language.doc lib.doc make.doc psfiles.doc readme.doc use.doc ; do $(INSTALL_DATA) $$f $(docdir)/$$f ; done -mkdir $(exdir) for f in chess.ps cheq.ps colorcir.ps golfer.ps escher.ps snowflak.ps tiger.ps ; do $(INSTALL_DATA) $$f $(exdir)/$$f ; done --- 1947,1953 ---- -mkdir $(datadir) -mkdir $(gsdatadir) ! for f in README gslp.ps gs_init.ps gs_dps1.ps gs_fonts.ps gs_lev2.ps gs_statd.ps gs_type0.ps gs_sym_e.ps quit.ps Fontmap uglyr.gsf bdftops.ps decrypt.ps font2c.ps impath.ps landscap.ps level1.ps prfont.ps ps2ascii.ps ps2epsi.ps ps2image.ps pstoppm.ps showpage.ps type1ops.ps wrfont.ps ; do $(INSTALL_DATA) $$f $(gsdatadir)/$$f ; done -mkdir $(docdir) ! for f in NEWS ansi2knr.1 devices.doc drivers.doc fonts.doc gs.1 hershey.doc history.doc humor.doc language.doc lib.doc make.doc ps2epsi.doc psfiles.doc readme.doc use.doc xfonts.doc ; do $(INSTALL_DATA) $$f $(docdir)/$$f ; done -mkdir $(exdir) for f in chess.ps cheq.ps colorcir.ps golfer.ps escher.ps snowflak.ps tiger.ps ; do $(INSTALL_DATA) $$f $(exdir)/$$f ; done diff -rNC2 gs26/unix-lpr.doc gs261/unix-lpr.doc *** gs26/unix-lpr.doc Fri May 7 13:50:00 1993 --- gs261/unix-lpr.doc Thu May 20 08:13:52 1993 *************** *** 40,44 **** SETTING IT UP: ! The mkfilt.sh script needs to have two lines edited before running, to set the printer devices to use and the list of filters available. With this information, it will: --- 40,44 ---- SETTING IT UP: ! The lprsetup.sh script needs to have two lines edited before running, to set the printer devices to use and the list of filters available. With this information, it will: *************** *** 54,58 **** EDITING THE DEVICE LIST: ! At the top of mkfilt.sh, you will find a line of the form DEVICES=" ... ". This should be edited to replace the example list with your own list of devices, with each entry comprising the name of the device, follwed by two --- 54,58 ---- EDITING THE DEVICE LIST: ! At the top of lprsetup.sh, you will find a line of the form DEVICES=" ... ". This should be edited to replace the example list with your own list of devices, with each entry comprising the name of the device, follwed by two *************** *** 91,95 **** MODIFIYING THE PRINTCAP.INSERT: ! Running the mkfilt.sh script generates a file called printcap.insert, which has a template setup for your printer queues. It cannot guarantee to do the whole job, and you will probably need to consult your system documentation --- 91,95 ---- MODIFIYING THE PRINTCAP.INSERT: ! Running the lprsetup.sh script generates a file called printcap.insert, which has a template setup for your printer queues. It cannot guarantee to do the whole job, and you will probably need to consult your system documentation *************** *** 117,121 **** You will need write access to the ghostscript installation directory (eg. ! /usr/local/lib/ghostscript) in order for mkfilt.sh to create the filt directory and soft links. --- 117,121 ---- You will need write access to the ghostscript installation directory (eg. ! /usr/local/lib/ghostscript) in order for lprsetup.sh to create the filt directory and soft links. diff -rNC2 gs26/unixhead.mak gs261/unixhead.mak *** gs26/unixhead.mak Wed May 5 17:58:22 1993 --- gs261/unixhead.mak Sun May 16 02:01:00 1993 *************** *** 1,4 **** ! # Copyright (C) 1990, 1991 Aladdin Enterprises. All rights reserved. ! # Distributed by Free Software Foundation, Inc. # # This file is part of Ghostscript. --- 1,3 ---- ! # Copyright (C) 1990, 1991, 1993 Aladdin Enterprises. All rights reserved. # # This file is part of Ghostscript. *************** *** 34,41 **** OBJ=o XE= - - # Define the need for uniq. - - UNIQ= # Define the current directory prefix, shell quote string, and shell names. --- 33,36 ---- diff -rNC2 gs26/unixtail.mak gs261/unixtail.mak *** gs26/unixtail.mak Fri May 7 13:42:36 1993 --- gs261/unixtail.mak Sat May 29 02:42:34 1993 *************** *** 1,4 **** ! # Copyright (C) 1990, 1992 Aladdin Enterprises. All rights reserved. ! # Distributed by Free Software Foundation, Inc. # # This file is part of Ghostscript. --- 1,3 ---- ! # Copyright (C) 1990, 1992, 1993 Aladdin Enterprises. All rights reserved. # # This file is part of Ghostscript. *************** *** 73,76 **** --- 72,78 ---- $(CC) -o genarch$(XE) genarch.c + genconf$(XE): genconf.c + $(CC) -o genconf$(XE) genconf.c + # ----------------------------- Main program ------------------------------ # *************** *** 84,93 **** # The second call on echogs writes a \. This is the only # way to do it that works with all flavors of shell! ! $(GS)$(XE): $(GSUNIX) obj.tr lib.tr echogs $(ALL_DEVS) ./echogs -n - $(CC) $(LDFLAGS) $(XLIBDIRS) -o gs $(GSUNIX) >_temp_ ./echogs -x 205c >>_temp_ ! cat obj.tr >>_temp_ ! cat lib.tr >>_temp_ ! ./echogs -q $(EXTRALIBS) -lm >>_temp_ $(SH) <_temp_ --- 86,94 ---- # The second call on echogs writes a \. This is the only # way to do it that works with all flavors of shell! ! $(GS)$(XE): $(GSUNIX) ld.tr echogs $(ALL_DEVS) ./echogs -n - $(CC) $(LDFLAGS) $(XLIBDIRS) -o gs $(GSUNIX) >_temp_ ./echogs -x 205c >>_temp_ ! cat ld.tr >>_temp_ ! ./echogs - $(EXTRALIBS) -lm >>_temp_ $(SH) <_temp_ *************** *** 105,111 **** -mkdir $(datadir) -mkdir $(gsdatadir) ! for f in README gslp.ps gs_init.ps gs_2asc.ps gs_dps1.ps gs_fonts.ps gs_lev2.ps gs_statd.ps gs_type0.ps gs_sym_e.ps quit.ps Fontmap uglyr.gsf bdftops.ps decrypt.ps font2c.ps impath.ps landscap.ps level1.ps prfont.ps ps2epsi.ps ps2image.ps pstoppm.ps showpage.ps type1ops.ps wrfont.ps ; do $(INSTALL_DATA) $$f $(gsdatadir)/$$f ; done -mkdir $(docdir) ! for f in NEWS drivers.doc fonts.doc hershey.doc history.doc humor.doc language.doc lib.doc make.doc psfiles.doc readme.doc use.doc ; do $(INSTALL_DATA) $$f $(docdir)/$$f ; done -mkdir $(exdir) for f in chess.ps cheq.ps colorcir.ps golfer.ps escher.ps snowflak.ps tiger.ps ; do $(INSTALL_DATA) $$f $(exdir)/$$f ; done --- 106,112 ---- -mkdir $(datadir) -mkdir $(gsdatadir) ! for f in README gslp.ps gs_init.ps gs_dps1.ps gs_fonts.ps gs_lev2.ps gs_statd.ps gs_type0.ps gs_sym_e.ps quit.ps Fontmap uglyr.gsf bdftops.ps decrypt.ps font2c.ps impath.ps landscap.ps level1.ps prfont.ps ps2ascii.ps ps2epsi.ps ps2image.ps pstoppm.ps showpage.ps type1ops.ps wrfont.ps ; do $(INSTALL_DATA) $$f $(gsdatadir)/$$f ; done -mkdir $(docdir) ! for f in NEWS ansi2knr.1 devices.doc drivers.doc fonts.doc gs.1 hershey.doc history.doc humor.doc language.doc lib.doc make.doc ps2epsi.doc psfiles.doc readme.doc use.doc xfonts.doc ; do $(INSTALL_DATA) $$f $(docdir)/$$f ; done -mkdir $(exdir) for f in chess.ps cheq.ps colorcir.ps golfer.ps escher.ps snowflak.ps tiger.ps ; do $(INSTALL_DATA) $$f $(exdir)/$$f ; done diff -rNC2 gs26/unprot.ps gs261/unprot.ps *** gs26/unprot.ps Mon May 25 08:27:12 1992 --- gs261/unprot.ps Wed May 12 18:33:02 1993 *************** *** 1,4 **** % Copyright (C) 1991, 1992 Aladdin Enterprises. All rights reserved. - % Distributed by Free Software Foundation, Inc. % % This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/use.doc gs261/use.doc *** gs26/use.doc Thu May 6 06:12:38 1993 --- gs261/use.doc Sat May 29 02:42:02 1993 *************** *** 1,4 **** Copyright (C) 1989, 1992 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- *************** *** 32,37 **** To run Ghostscript, you need the executable program, and also some external initialization files: ! gs_*.ps (gs_2asc.ps, gs_dps1.ps, gs_fonts.ps, gs_init.ps, ! gs_lev2.ps, gs_statd.ps, gs_sym_e.ps) uglyr.gsf Fontmap --- 31,36 ---- To run Ghostscript, you need the executable program, and also some external initialization files: ! gs_*.ps (gs_dps1.ps, gs_fonts.ps, gs_init.ps, gs_lev2.ps, ! gs_statd.ps, gs_dbt_e.ps, gs_sym_e.ps) uglyr.gsf Fontmap *************** *** 70,81 **** fonts in C:\GS\FONTS. ! If you have Adobe Type Manager fonts installed on your system, and ! you wish to use them with Ghostscript, you may wish to replace the ! FONTMAP file with FONTMAP.ATM, and to add to the environment variable ! GS_LIB the name of the directory where the fonts are located (see ! below for more information about GS_LIB). Before you do this, please ! read carefully the license that accompanies the ATM fonts; Aladdin ! Enterprises and the Free Software Foundation take no responsibility ! for any possible violations of such licenses. MS Windows --- 69,79 ---- fonts in C:\GS\FONTS. ! If you have Adobe Type Manager fonts installed on your system, and you ! wish to use them with Ghostscript, you may wish to replace the FONTMAP ! file with FONTMAP.ATM, and to add to the environment variable GS_LIB the ! name of the directory where the fonts are located (see below for more ! information about GS_LIB). Before you do this, please read carefully the ! license that accompanies the ATM fonts; Aladdin Enterprises takes no ! responsibility for any possible violations of such licenses. MS Windows *************** *** 378,382 **** Ghostscript looks for the following resources under the program name ! "Ghostscript": Name Class Default --- 376,380 ---- Ghostscript looks for the following resources under the program name ! "ghostscript" and class name "Ghostscript": Name Class Default *************** *** 390,395 **** yResolution Resolution ** useExternalFonts UseExternalFonts true logExternalFonts LogExternalFonts false ! externalFontTolerance ExternalFontTolerance 12.5 palette Palette Color maxGrayRamp MaxGrayRamp 128 --- 388,394 ---- yResolution Resolution ** useExternalFonts UseExternalFonts true + useScalableFonts UseScalableFonts true logExternalFonts LogExternalFonts false ! externalFontTolerance ExternalFontTolerance 10.0 palette Palette Color maxGrayRamp MaxGrayRamp 128 *************** *** 398,401 **** --- 397,403 ---- useXPutImage UseXPutImage true useXSetTile UseXSetTile true + regularFonts RegularFonts see below + symbolFonts SymbolFonts see below + dingbatFonts DingbatFonts see below ** Calculated from display metrics. *************** *** 403,407 **** Notes on Resources: ! Geometry resource only affects window placement. Resolution is given in pixels per inch. --- 405,409 ---- Notes on Resources: ! The geometry resource only affects window placement. Resolution is given in pixels per inch. *************** *** 419,426 **** of the cells in a colormap. To set these resources, put them in a file (such as ~/.Xdefaults) in the following form: ! Ghostscript*geometry: 612x792-0+0 Ghostscript*xResolution: 72 Ghostscript*yResolution: 72 --- 421,479 ---- of the cells in a colormap. + To use native X11 fonts, ghostscript must map PostScript font names to + the XLFD font names. The regularFonts, symbolFonts, and dingbatFonts + resources give the name mapping for different encodings. The XLFD font + name in the mapping must contain seven dashes. The X driver adds the + additional size and encoding fields to bring the total number of dashes + in the font name to 14. Here are the default font mappings: + + Regular Fonts: (Fonts available in standard or ISO-Latin-1 encoding) + + AvantGarde-Book:-Adobe-ITC Avant Garde Gothic-Book-R-Normal--\n\ + AvantGarde-BookOblique:-Adobe-ITC Avant Garde Gothic-Book-O-Normal--\n\ + AvantGarde-Demi:-Adobe-ITC Avant Garde Gothic-Demi-R-Normal--\n\ + AvantGarde-DemiOblique:-Adobe-ITC Avant Garde Gothic-Demi-O-Normal--\n\ + Bookman-Demi:-Adobe-ITC Bookman-Demi-R-Normal--\n\ + Bookman-DemiItalic:-Adobe-ITC Bookman-Demi-I-Normal--\n\ + Bookman-Light:-Adobe-ITC Bookman-Light-R-Normal--\n\ + Bookman-LightItalic:-Adobe-ITC Bookman-Light-I-Normal--\n\ + Courier:-Adobe-Courier-Medium-R-Normal--\n\ + Courier-Bold:-Adobe-Courier-Bold-R-Normal--\n\ + Courier-BoldOblique:-Adobe-Courier-Bold-O-Normal--\n\ + Courier-Oblique:-Adobe-Courier-Medium-O-Normal--\n\ + Helvetica:-Adobe-Helvetica-Medium-R-Normal--\n\ + Helvetica-Bold:-Adobe-Helvetica-Bold-R-Normal--\n\ + Helvetica-BoldOblique:-Adobe-Helvetica-Bold-O-Normal--\n\ + Helvetica-Narrow:-Adobe-Helvetica-Medium-R-Narrow--\n\ + Helvetica-Narrow-Bold:-Adobe-Helvetica-Bold-R-Narrow--\n\ + Helvetica-Narrow-BoldOblique:-Adobe-Helvetica-Bold-O-Narrow--\n\ + Helvetica-Narrow-Oblique:-Adobe-Helvetica-Medium-O-Narrow--\n\ + Helvetica-Oblique:-Adobe-Helvetica-Medium-O-Normal--\n\ + NewCenturySchlbk-Bold:-Adobe-New Century Schoolbook-Bold-R-Normal--\n\ + NewCenturySchlbk-BoldItalic:-Adobe-New Century Schoolbook-Bold-I-Normal--\n\ + NewCenturySchlbk-Italic:-Adobe-New Century Schoolbook-Medium-I-Normal--\n\ + NewCenturySchlbk-Roman:-Adobe-New Century Schoolbook-Medium-R-Normal--\n\ + Palatino-Bold:-Adobe-Palatino-Bold-R-Normal--\n\ + Palatino-BoldItalic:-Adobe-Palatino-Bold-I-Normal--\n\ + Palatino-Italic:-Adobe-Palatino-Medium-I-Normal--\n\ + Palatino-Roman:-Adobe-Palatino-Medium-R-Normal--\n\ + Times-Bold:-Adobe-Times-Bold-R-Normal--\n\ + Times-BoldItalic:-Adobe-Times-Bold-I-Normal--\n\ + Times-Italic:-Adobe-Times-Medium-I-Normal--\n\ + Times-Roman:-Adobe-Times-Medium-R-Normal--\n\ + ZapfChancery-MediumItalic:-Adobe-ITC Zapf Chancery-Medium-I-Normal-- + + Symbol Fonts: (using Symbol encoding) + + Symbol: -Adobe-Symbol-Medium-R-Normal-- + + Dingbat Fonts: (using Dingbat encoding) + + ZapfDingbats: -Adobe-ITC Zapf Dingbats-Medium-R-Normal-- + To set these resources, put them in a file (such as ~/.Xdefaults) in the following form: ! Ghostscript*geometry: -0+0 Ghostscript*xResolution: 72 Ghostscript*yResolution: 72 *************** *** 430,433 **** --- 483,491 ---- % xrdb -merge ~/.Xdefaults + On H-P systems, Ghostscript will take advantage of the "HP XLFD + Enhancements" to use native X11 fonts for fonts that are anamorphically + scaled, rotated, or mirrored. If the user has installed these changes to + their X or font server, they will automatically be used when appropriate. + Normal switches --------------- *************** *** 475,478 **** --- 533,539 ---- Quiet startup -- suppress normal startup messages, and also do the equivalent of -dQUIET. + + -ffilename + Executes the given file, even if its name begins with a -. -gnumber1xnumber2 diff -rNC2 gs26/vms-cc.mak gs261/vms-cc.mak *** gs26/vms-cc.mak Wed May 5 20:38:08 1993 --- gs261/vms-cc.mak Wed May 12 18:33:08 1993 *************** *** 1,4 **** $ ! Copyright (C) 1989, 1992, 1993 Aladdin Enterprises. All rights reserved. - $ ! Distributed by Free Software Foundation, Inc. $ ! $ ! This file is part of Ghostscript. --- 1,3 ---- *************** *** 83,86 **** --- 82,86 ---- $ ! $ CREATE GCONFIG.H + #include "gsconfig.h" device__(gs_x11_device) $ ! diff -rNC2 gs26/vms-gcc.mak gs261/vms-gcc.mak *** gs26/vms-gcc.mak Wed May 5 20:38:28 1993 --- gs261/vms-gcc.mak Wed May 12 18:33:12 1993 *************** *** 1,4 **** $ ! Copyright (C) 1989, 1992, 1993 Aladdin Enterprises. All rights reserved. - $ ! Distributed by Free Software Foundation, Inc. $ ! $ ! This file is part of Ghostscript. --- 1,3 ---- *************** *** 90,93 **** --- 89,93 ---- $ ! $ CREATE GCONFIG.H + #include "gsconfig.h" device__(gs_x11_device) $ ! diff -rNC2 gs26/vmsmath.h gs261/vmsmath.h *** gs26/vmsmath.h Sat Dec 23 05:06:34 1989 --- gs261/vmsmath.h Wed May 12 18:33:14 1993 *************** *** 1,4 **** /* Copyright (C) 1989 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/watc.mak gs261/watc.mak *** gs26/watc.mak Wed May 5 08:20:34 1993 --- gs261/watc.mak Tue May 25 08:20:06 1993 *************** *** 1,4 **** # Copyright (C) 1991, 1992, 1993 Aladdin Enterprises. All rights reserved. - # Distributed by Free Software Foundation, Inc. # # This file is part of Ghostscript. --- 1,3 ---- *************** *** 45,50 **** DEBUG=0 ! # Setting TDEBUG=1 includes symbol table information for the Watcom debugger, ! # and also enables stack checking. Code is substantially slower and larger. TDEBUG=0 --- 44,50 ---- DEBUG=0 ! # Setting TDEBUG=1 includes symbol table information for the Watcom debugger. ! # (This option is NOT needed for using the Watcom profiler.) ! # No execution time or space penalty, just larger .OBJ and .EXE files. TDEBUG=0 *************** *** 91,101 **** CPU_TYPE=386 ! # Define the math coprocessor (FPU) type. Options are 0, 287, or 387. # If the CPU type is 486, the FPU type is irrelevant, since the 80486 # CPU includes the equivalent of an 80387 on-chip. ! # A non-zero option means that the executable will only run if a FPU # of that type (or higher) is available: this is NOT currently checked # at runtime. - # Code is significantly faster. FPU_TYPE=0 --- 91,102 ---- CPU_TYPE=386 ! # Define the math coprocessor (FPU) type. ! # Options are -1 (optimize for no FPU), 0 (optimize for FPU present, ! # but do not require a FPU), 87, 287, or 387. # If the CPU type is 486, the FPU type is irrelevant, since the 80486 # CPU includes the equivalent of an 80387 on-chip. ! # An xx87 option means that the executable will run only if a FPU # of that type (or higher) is available: this is NOT currently checked # at runtime. FPU_TYPE=0 *************** *** 151,155 **** # ----------------------------- Main program ------------------------------ # ! BEGINFILES=*.err ccf.tr # The Watcom compiler doesn't recognize wildcards; # we don't want any compilation to fail. --- 152,156 ---- # ----------------------------- Main program ------------------------------ # ! BEGINFILES=*.err # The Watcom compiler doesn't recognize wildcards; # we don't want any compilation to fail. *************** *** 156,160 **** CCBEGIN=for %%f in (gs*.c gx*.c z*.c) do $(CCC) %%f ! LIBDOS=$(LIBGS) gp_iwatc.$(OBJ) gp_dosfb.$(OBJ) gp_msdos.$(OBJ) objw.tr lib.tr # Interpreter main program --- 157,161 ---- CCBEGIN=for %%f in (gs*.c gx*.c z*.c) do $(CCC) %%f ! LIBDOS=$(LIBGS) gp_iwatc.$(OBJ) gp_dosfb.$(OBJ) gp_msdos.$(OBJ) objw.tr # Interpreter main program *************** *** 166,171 **** echo OPTION STUB=$(STUB) >>objwl.tr echo OPTION STACK=8k >>objwl.tr - echo LIBRARY $(LIBDIR)\math387r >>objwl.tr - echo LIBRARY $(LIBDIR)\DOS\clib3r >>objwl.tr $(GS)$(XE): $(GS_ALL) $(ALL_DEVS) objwl.tr --- 167,170 ---- diff -rNC2 gs26/watcwin.mak gs261/watcwin.mak *** gs26/watcwin.mak Mon May 3 07:56:40 1993 --- gs261/watcwin.mak Thu May 27 18:21:16 1993 *************** *** 1,4 **** # Copyright (C) 1991, 1992, 1993 Aladdin Enterprises. All rights reserved. - # Distributed by Free Software Foundation, Inc. # # This file is part of Ghostscript. --- 1,3 ---- *************** *** 58,62 **** # Define the name of the executable file. ! GS=gs386 # ------ Platform-specific options ------ # --- 57,61 ---- # Define the name of the executable file. ! GS=gswin386 # ------ Platform-specific options ------ # *************** *** 82,85 **** --- 81,86 ---- INCDIR=$(%WATCOM)\h LIBDIR=$(%WATCOM)\lib386 + WBIND=$(%WATCOM)\binb\wbind.exe + WRC=$(%WATCOM)\binb\rc.exe # Choose platform-specific options. *************** *** 126,131 **** # Choose the device(s) to include. See devs.mak for details. - DEVICE_DEVS=vga.dev ega.dev - DEVICE_DEVS2=atiw.dev s3vga.dev tseng.dev tvga.dev DEVICE_DEVS3=deskjet.dev djet500.dev laserjet.dev ljetplus.dev ljet2p.dev ljet3.dev DEVICE_DEVS4=cdeskjet.dev cdjcolor.dev cdjmono.dev cdj550.dev paintjet.dev pjetxl.dev --- 127,130 ---- *************** *** 139,150 **** # The Watcom C platform ! watc__=gp_iwatc.$(OBJ) gp_dosfb.$(OBJ) gp_msdos.$(OBJ) gp_nofb.$(OBJ) ! watc_.dev: $(watc__) ! $(SHP)gssetmod watc_ $(watc__) gp_iwatc.$(OBJ): gp_iwatc.c $(string__h) $(gx_h) $(gp_h) - gp_dosfb.$(OBJ): gp_dosfb.c $(memory__h) $(gx_h) $(gp_h) $(gserrors_h) $(gxdevice_h) - gp_msdos.$(OBJ): gp_msdos.c $(dos__h) $(string__h) $(gx_h) $(gp_h) --- 138,147 ---- # The Watcom C platform ! watc__=gp_iwatc.$(OBJ) gp_nofb.$(OBJ) gp_msdos.$(OBJ) ! watcwin_.dev: $(watc__) ! $(SHP)gssetmod watcwin_ $(watc__) gp_iwatc.$(OBJ): gp_iwatc.c $(string__h) $(gx_h) $(gp_h) gp_msdos.$(OBJ): gp_msdos.c $(dos__h) $(string__h) $(gx_h) $(gp_h) *************** *** 151,155 **** # ----------------------------- Main program ------------------------------ # ! BEGINFILES=*.err ccf.tr # The Watcom compiler doesn't recognize wildcards; # we don't want any compilation to fail. --- 148,152 ---- # ----------------------------- Main program ------------------------------ # ! BEGINFILES=*.err gs*.ico gs*.res # The Watcom compiler doesn't recognize wildcards; # we don't want any compilation to fail. *************** *** 156,172 **** CCBEGIN=for %%f in (gs*.c gx*.c z*.c) do $(CCC) %%f ! LIBDOS=$(LIBGS) gp_iwatc.$(OBJ) gp_dosfb.$(OBJ) gp_msdos.$(OBJ) objw.tr lib.tr # Interpreter main program ! GS_ALL=gs.$(OBJ) $(INT) $(INTASM) gsmain.$(OBJ) $(LIBDOS) objwl.tr: $(MAKEFILE) ! echo SYSTEM DOS4G >objwl.tr ! echo OPTION STUB=$(STUB) >>objwl.tr echo OPTION STACK=8k >>objwl.tr - echo LIBRARY $(LIBDIR)\math387r >>objwl.tr - echo LIBRARY $(LIBDIR)\DOS\clib3r >>objwl.tr $(GS)$(XE): $(GS_ALL) $(ALL_DEVS) objwl.tr $(LINK) $(LCT) NAME $(GS) OPTION MAP=$(GS) @gsw.tr @objw.tr @objwl.tr --- 153,182 ---- CCBEGIN=for %%f in (gs*.c gx*.c z*.c) do $(CCC) %%f ! LIBDOS=$(LIBGS) gp_iwatc.$(OBJ) gp_nofb.$(OBJ) gp_msdos.$(OBJ) objw.tr # Interpreter main program ! ICONS=gsgraph.ico gstext.ico ! ! GS_ALL=gs.$(OBJ) $(INT) $(INTASM) gsmain.$(OBJ)\ ! $(LIBDOS) objw.tr objwl.tr $(GS).res $(ICONS) ! ! # Make the icons from their text form. ! ! gsgraph.ico: gsgraph.icx echogs$(XE) ! echogs -wb gsgraph.ico -n -X -r gsgraph.icx ! ! gstext.ico: gstext.icx echogs$(XE) ! echogs -wb gstext.ico -n -X -r gstext.icx ! ! $(GS).res: $(GS).rc $(ICONS) ! $(WRC) -i$(INCDIR) -r $(GS) objwl.tr: $(MAKEFILE) ! echo SYSTEM WIN386 >objwl.tr echo OPTION STACK=8k >>objwl.tr $(GS)$(XE): $(GS_ALL) $(ALL_DEVS) objwl.tr $(LINK) $(LCT) NAME $(GS) OPTION MAP=$(GS) @gsw.tr @objw.tr @objwl.tr + $(WBIND) $(GS) -R $(GS).res + rm $(GS).rex $(GS).res diff -rNC2 gs26/waterfal.ps gs261/waterfal.ps *** gs26/waterfal.ps Fri Apr 16 07:08:00 1993 --- gs261/waterfal.ps Wed May 12 18:33:24 1993 *************** *** 1,4 **** % Copyright (C) 1992, 1993 Aladdin Enterprises. All rights reserved. - % Distributed by Free Software Foundation, Inc. % % This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/wccommon.mak gs261/wccommon.mak *** gs26/wccommon.mak Wed May 5 17:58:40 1993 --- gs261/wccommon.mak Wed May 19 07:27:10 1993 *************** *** 1,4 **** # Copyright (C) 1991, 1992, 1993 Aladdin Enterprises. All rights reserved. - # Distributed by Free Software Foundation, Inc. # # This file is part of Ghostscript. --- 1,3 ---- *************** *** 50,57 **** XE=.exe - # Define the need for uniq. - - UNIQ=uniq$(XE) - # Define the current directory prefix, shell quote string, and shell name. --- 49,52 ---- *************** *** 73,76 **** --- 68,74 ---- FPFLAGS=-fpi287 !else + !ifeq FPU_TYPE -1 + FPFLAGS=-fpc + !else FPFLAGS=-fpi !endif *************** *** 77,80 **** --- 75,79 ---- !endif !endif + !endif INTASM= *************** *** 100,108 **** $(CCL) $(CCFLAGS) -i=$(LIBDIR) genarch.c ! # We need a substitute for the Unix uniq utility. ! # It only has to handle stdin and stdout, no options. ! uniq$(XE): uniq.c echo OPTION STUB=$(STUB) >_temp_.tr ! $(CCL) $(CCFLAGS) -i=$(LIBDIR) @_temp_.tr uniq.c # Define the compilation flags. --- 99,105 ---- $(CCL) $(CCFLAGS) -i=$(LIBDIR) genarch.c ! genconf$(XE): genconf.c echo OPTION STUB=$(STUB) >_temp_.tr ! $(CCL) $(CCFLAGS) -i=$(LIBDIR) @_temp_.tr genconf.c # Define the compilation flags. diff -rNC2 gs26/windows_.h gs261/windows_.h *** gs26/windows_.h Sun May 2 03:51:58 1993 --- gs261/windows_.h Wed May 12 18:33:34 1993 *************** *** 1,4 **** /* Copyright (C) 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/winmaps.ps gs261/winmaps.ps *** gs26/winmaps.ps Sat Apr 10 08:08:36 1993 --- gs261/winmaps.ps Wed May 12 18:33:38 1993 *************** *** 1,4 **** % Copyright (C) 1993 Aladdin Enterprises. All rights reserved. - % Distributed by Free Software Foundation, Inc. % % This file is part of Ghostscript. --- 1,3 ---- *************** *** 38,42 **** /ecircumflex /edieresis /egrave /idieresis /igrave /Adieresis /Aring /Eacute /ae /AE /ocircumflex /odieresis /ograve /ucircumflex /ugrave ! /ydieresis /Odieresis /Udieresis /cent /sterling /yen /.notdef /floring /aacute /iacute /oacute /uacute /ntilde /Ntilde /ordfeminine /ordmasculine /questiondown /.notdef /logicalnot /onehalf /onequarter /exclamdown /guillemotleft /guillemotright --- 37,41 ---- /ecircumflex /edieresis /egrave /idieresis /igrave /Adieresis /Aring /Eacute /ae /AE /ocircumflex /odieresis /ograve /ucircumflex /ugrave ! /ydieresis /Odieresis /Udieresis /cent /sterling /yen /.notdef /florin /aacute /iacute /oacute /uacute /ntilde /Ntilde /ordfeminine /ordmasculine /questiondown /.notdef /logicalnot /onehalf /onequarter /exclamdown /guillemotleft /guillemotright diff -rNC2 gs26/wrfont.ps gs261/wrfont.ps *** gs26/wrfont.ps Fri Jan 22 06:46:04 1993 --- gs261/wrfont.ps Thu May 27 17:58:28 1993 *************** *** 1,4 **** % Copyright (C) 1991, 1993 Aladdin Enterprises. All rights reserved. - % Distributed by Free Software Foundation, Inc. % % This file is part of Ghostscript. --- 1,3 ---- *************** *** 59,63 **** { dup length wt (dict dup begin) wl 0 exch ! { exch wo wo 1 add dup 200 eq { wo ({def} repeat) wl 0 } --- 58,62 ---- { dup length wt (dict dup begin) wl 0 exch ! { exch wo wo () wl 1 add dup 200 eq { wo ({def} repeat) wl 0 } *************** *** 80,84 **** wo } ! { encrypt_CharStrings not { 4330 exch dup type1decrypt exch pop } if readonly dup length wo ( ) ws readproc ws wx } --- 79,83 ---- wo } ! { encrypt_CharStrings not { 4330 exch dup .type1decrypt exch pop } if readonly dup length wo ( ) ws readproc ws wx } *************** *** 187,193 **** 4 dict begin /-! {string currentfile exch readhexstring pop ! 4330 exch dup type1encrypt exch pop} def /-| {string currentfile exch readstring pop ! 4330 exch dup type1encrypt exch pop} def /|- {readonly def} def /| {readonly put} def --- 186,192 ---- 4 dict begin /-! {string currentfile exch readhexstring pop ! 4330 exch dup .type1encrypt exch pop} def /-| {string currentfile exch readstring pop ! 4330 exch dup .type1encrypt exch pop} def /|- {readonly def} def /| {readonly put} def *************** *** 195,202 **** % Construct an inverse dictionary of encodings. ! 3 dict begin StandardEncoding /StandardEncoding def ISOLatin1Encoding /ISOLatin1Encoding def SymbolEncoding /SymbolEncoding def currentdict end /encodingnames exch def --- 194,202 ---- % Construct an inverse dictionary of encodings. ! 4 dict begin StandardEncoding /StandardEncoding def ISOLatin1Encoding /ISOLatin1Encoding def SymbolEncoding /SymbolEncoding def + DingbatsEncoding /DingbatsEncoding def currentdict end /encodingnames exch def *************** *** 304,308 **** { currentfont /CharStrings get wcheck { currentfont /CharStrings get dup [ exch ! { pop dup (S????00?) stringmatch not { pop } if } forall ] { 2 copy undef pop } forall pop --- 304,308 ---- { currentfont /CharStrings get wcheck { currentfont /CharStrings get dup [ exch ! { pop dup (S????00?) .stringmatch not { pop } if } forall ] { 2 copy undef pop } forall pop diff -rNC2 gs26/x_.h gs261/x_.h *** gs26/x_.h Sun May 9 12:54:42 1993 --- gs261/x_.h Wed May 12 18:33:48 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/xfonts.doc gs261/xfonts.doc *** gs26/xfonts.doc Sun Mar 28 07:14:40 1993 --- gs261/xfonts.doc Wed May 26 16:50:38 1993 *************** *** 1,4 **** Copyright (C) 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- *************** *** 94,97 **** --- 93,97 ---- 1 = ISOLatin1Encoding 2 = SymbolEncoding + 3 = DingbatsEncoding -1 = other encoding *************** *** 128,132 **** Note that this is the only implementation procedure that does not ! take an xfont * as its first argument. gx_xglyph (*char_xglyph)(P5(gx_xfont *xf, gs_char chr, int encoding_index, --- 128,134 ---- Note that this is the only implementation procedure that does not ! take an xfont * as its first argument. In fact, callers of lookup_font ! must use the get_xfont_device driver procedure to get the correct device ! to pass as the first argument to lookup_font. gx_xglyph (*char_xglyph)(P5(gx_xfont *xf, gs_char chr, int encoding_index, diff -rNC2 gs26/zarith.c gs261/zarith.c *** gs26/zarith.c Fri Apr 16 10:15:58 1993 --- gs261/zarith.c Wed May 12 18:33:56 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1992 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/zarray.c gs261/zarray.c *** gs26/zarray.c Mon Feb 1 17:31:00 1993 --- gs261/zarray.c Wed May 12 18:34:00 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/zbseq.c gs261/zbseq.c *** gs26/zbseq.c Mon Apr 12 04:55:30 1993 --- gs261/zbseq.c Wed May 12 18:34:02 1993 *************** *** 1,4 **** /* Copyright (C) 1990, 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/zchar.c gs261/zchar.c *** gs26/zchar.c Mon Apr 12 04:51:18 1993 --- gs261/zchar.c Thu May 27 06:56:54 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- *************** *** 45,49 **** /* Procedures exported for zchar2.c; */ /* these are also internal forward references. */ ! int op_show_setup(P1(os_ptr)); int op_show_continue_dispatch(P2(os_ptr, int)); gs_show_enum *op_show_find(P0()); --- 44,49 ---- /* Procedures exported for zchar2.c; */ /* these are also internal forward references. */ ! int op_show_setup(P2(os_ptr, int /*bool*/)); ! int op_show_continue(P1(os_ptr)); int op_show_continue_dispatch(P2(os_ptr, int)); gs_show_enum *op_show_find(P0()); *************** *** 69,73 **** /* Forward references */ private int show_enum_setup(P2(os_ptr, op_proc_p)); - private int show_continue(P1(os_ptr)); private int finish_show(P1(os_ptr)); private int finish_stringwidth(P1(os_ptr)); --- 69,72 ---- *************** *** 76,80 **** int zshow(register os_ptr op) ! { int code = op_show_setup(op); if ( code < 0 ) return code; if ( (code = gs_show_n_init(senum, igs, (char *)op->value.bytes, r_size(op))) < 0 ) --- 75,79 ---- int zshow(register os_ptr op) ! { int code = op_show_setup(op, 1); if ( code < 0 ) return code; if ( (code = gs_show_n_init(senum, igs, (char *)op->value.bytes, r_size(op))) < 0 ) *************** *** 83,87 **** } pop(1); op--; ! return show_continue(op); } --- 82,86 ---- } pop(1); op--; ! return op_show_continue(op); } *************** *** 92,96 **** float axy[2]; if ( (code = num_params(op - 1, 2, axy)) < 0 || ! (code = op_show_setup(op)) < 0 ) return code; --- 91,95 ---- float axy[2]; if ( (code = num_params(op - 1, 2, axy)) < 0 || ! (code = op_show_setup(op, 1)) < 0 ) return code; *************** *** 100,104 **** } pop(3); op -= 3; ! return show_continue(op); } --- 99,103 ---- } pop(3); op -= 3; ! return op_show_continue(op); } *************** *** 112,116 **** return_error(e_rangecheck); if ( (code = num_params(op - 2, 2, cxy)) < 0 || ! (code = op_show_setup(op)) < 0 ) return code; --- 111,115 ---- return_error(e_rangecheck); if ( (code = num_params(op - 2, 2, cxy)) < 0 || ! (code = op_show_setup(op, 1)) < 0 ) return code; *************** *** 123,127 **** } pop(4); op -= 4; ! return show_continue(op); } --- 122,126 ---- } pop(4); op -= 4; ! return op_show_continue(op); } *************** *** 136,140 **** if ( (code = num_params(op - 4, 2, cxy)) < 0 || (code = num_params(op - 1, 2, axy)) < 0 || ! (code = op_show_setup(op)) < 0 ) return code; --- 135,139 ---- if ( (code = num_params(op - 4, 2, cxy)) < 0 || (code = num_params(op - 1, 2, axy)) < 0 || ! (code = op_show_setup(op, 1)) < 0 ) return code; *************** *** 148,152 **** } pop(6); op -= 6; ! return show_continue(op); } --- 147,151 ---- } pop(6); op -= 6; ! return op_show_continue(op); } *************** *** 156,160 **** { int code; check_proc(op[-1]); ! if ( (code = op_show_setup(op)) < 0 ) return code; if ( (code = gs_kshow_n_init(senum, igs, (char *)op->value.bytes, r_size(op))) < 0 ) { op_show_free(); --- 155,159 ---- { int code; check_proc(op[-1]); ! if ( (code = op_show_setup(op, 1)) < 0 ) return code; if ( (code = gs_kshow_n_init(senum, igs, (char *)op->value.bytes, r_size(op))) < 0 ) { op_show_free(); *************** *** 163,167 **** sslot = op[-1]; /* save kerning proc */ pop(2); op -= 2; ! return show_continue(op); } --- 162,166 ---- sslot = op[-1]; /* save kerning proc */ pop(2); op -= 2; ! return op_show_continue(op); } *************** *** 176,180 **** int zstringwidth(register os_ptr op) ! { int code = show_enum_setup(op, finish_stringwidth); if ( code < 0 ) return code; if ( (code = gs_stringwidth_n_init(senum, igs, (char *)op->value.bytes, r_size(op))) < 0 ) --- 175,181 ---- int zstringwidth(register os_ptr op) ! { int code; ! check_read_type(*op, t_string); ! code = show_enum_setup(op, finish_stringwidth); if ( code < 0 ) return code; if ( (code = gs_stringwidth_n_init(senum, igs, (char *)op->value.bytes, r_size(op))) < 0 ) *************** *** 183,187 **** } pop(1); op--; ! return show_continue(op); } /* Finishing procedure for stringwidth. */ --- 184,188 ---- } pop(1); op--; ! return op_show_continue(op); } /* Finishing procedure for stringwidth. */ *************** *** 202,206 **** { int code; check_type(*op, t_boolean); ! code = op_show_setup(op - 1); if ( code < 0 ) return code; if ( (code = gs_charpath_n_init(senum, igs, (char *)op[-1].value.bytes, r_size(op - 1), op->value.index)) < 0 ) --- 203,207 ---- { int code; check_type(*op, t_boolean); ! code = op_show_setup(op - 1, 1); if ( code < 0 ) return code; if ( (code = gs_charpath_n_init(senum, igs, (char *)op[-1].value.bytes, r_size(op - 1), op->value.index)) < 0 ) *************** *** 209,213 **** } pop(2); op -= 2; ! return show_continue(op); } --- 210,214 ---- } pop(2); op -= 2; ! return op_show_continue(op); } *************** *** 353,357 **** {"0%finish_show", finish_show}, {"0%finish_stringwidth", finish_stringwidth}, ! {"0%show_continue", show_continue}, op_def_end(0) }; --- 354,358 ---- {"0%finish_show", finish_show}, {"0%finish_stringwidth", finish_stringwidth}, ! {"0%op_show_continue", op_show_continue}, op_def_end(0) }; *************** *** 361,370 **** /* Most of these are exported for zchar2.c. */ ! /* Set up for a show operator. */ ! /* The top stack element must be the string to be scanned. */ /* The caller has already done all other argument checking. */ int ! op_show_setup(os_ptr op) ! { return show_enum_setup(op, finish_show); } private int --- 362,374 ---- /* Most of these are exported for zchar2.c. */ ! /* Set up for a show operator. If check_string is true, */ ! /* the top stack element must be the string to be scanned. */ /* The caller has already done all other argument checking. */ int ! op_show_setup(os_ptr op, int check_string) ! { if ( check_string ) ! { check_read_type(*op, t_string); ! } ! return show_enum_setup(op, finish_show); } private int *************** *** 371,375 **** show_enum_setup(os_ptr op, op_proc_p endproc /* end procedure */) { gs_show_enum *penum; - check_read_type(*op, t_string); check_estack(snumpush + 2); if ( (penum = (gs_show_enum *)alloc(1, gs_show_enum_sizeof, "setup_show")) == 0 ) --- 375,378 ---- *************** *** 385,390 **** /* Continuation operator for character rendering. */ ! private int ! show_continue(os_ptr op) { return op_show_continue_dispatch(op, gs_show_next(senum)); } --- 388,393 ---- /* Continuation operator for character rendering. */ ! int ! op_show_continue(os_ptr op) { return op_show_continue_dispatch(op, gs_show_next(senum)); } *************** *** 403,407 **** make_int(op - 1, gs_kshow_previous_char(penum)); make_int(op, gs_kshow_next_char(penum)); ! push_op_estack(show_continue); /* continue after kerning */ *++esp = *pslot; /* kerning procedure */ } --- 406,410 ---- make_int(op - 1, gs_kshow_previous_char(penum)); make_int(op, gs_kshow_next_char(penum)); ! push_op_estack(op_show_continue); /* continue after kerning */ *++esp = *pslot; /* kerning procedure */ } *************** *** 427,431 **** esp[2] = pfdata->BuildChar; } ! push_op_estack(show_continue); ++esp; /* skip BuildChar or BuildGlyph proc */ } --- 430,434 ---- esp[2] = pfdata->BuildChar; } ! push_op_estack(op_show_continue); ++esp; /* skip BuildChar or BuildGlyph proc */ } diff -rNC2 gs26/zchar2.c gs261/zchar2.c *** gs26/zchar2.c Mon Feb 1 04:08:56 1993 --- gs261/zchar2.c Thu May 27 12:09:16 1993 *************** *** 1,4 **** ! /* Copyright (C) 1992 Aladdin Enterprises. All rights reserved. ! Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- ! /* Copyright (C) 1992, 1993 Aladdin Enterprises. All rights reserved. This file is part of Ghostscript. *************** *** 30,33 **** --- 29,33 ---- #include "estack.h" #include "font.h" + #include "iname.h" #include "state.h" #include "store.h" *************** *** 36,40 **** /* Imported from zchar.c */ ! extern int op_show_setup(P1(os_ptr)); extern int op_show_continue_dispatch(P2(os_ptr, int)); extern gs_show_enum *op_show_find(P0()); --- 36,41 ---- /* Imported from zchar.c */ ! extern int op_show_setup(P2(os_ptr, int /*bool*/)); ! extern int op_show_continue(P1(os_ptr)); extern int op_show_continue_dispatch(P2(os_ptr, int)); extern gs_show_enum *op_show_find(P0()); *************** *** 61,65 **** { int code; check_proc(op[-1]); ! if ( (code = op_show_setup(op)) < 0 ) return code; if ( (code = gs_cshow_n_init(op_show_senum(), igs, (char *)op->value.bytes, r_size(op))) < 0 ) { op_show_free(); --- 62,66 ---- { int code; check_proc(op[-1]); ! if ( (code = op_show_setup(op, 1)) < 0 ) return code; if ( (code = gs_cshow_n_init(op_show_senum(), igs, (char *)op->value.bytes, r_size(op))) < 0 ) { op_show_free(); *************** *** 100,103 **** --- 101,121 ---- } + /* glyphshow - */ + private int + zglyphshow(os_ptr op) + { int code; + check_type(*op, t_name); + if ( (code = op_show_setup(op, 0)) < 0 ) + return code; + if ( (code = gs_glyphshow_init(op_show_senum(), igs, + (gs_glyph)name_index(op))) < 0 + ) + { op_show_free(); + return code; + } + pop(1); op--; + return op_show_continue(op); + } + /* - rootfont */ private int *************** *** 145,149 **** private int moveshow(os_ptr op, int xymask) ! { int code = op_show_setup(op - 1); gs_show_enum *penum = op_show_senum(); ref *psslot = op_show_psslot(); --- 163,167 ---- private int moveshow(os_ptr op, int xymask) ! { int code = op_show_setup(op - 1, 1); gs_show_enum *penum = op_show_senum(); ref *psslot = op_show_psslot(); *************** *** 236,239 **** --- 254,258 ---- op_def zchar2_op_defs[] = { {"2cshow", zcshow}, + {"1glyphshow", zglyphshow}, {"0rootfont", zrootfont}, {":setcachedevice2", zsetcachedevice2}, diff -rNC2 gs26/zcie.c gs261/zcie.c *** gs26/zcie.c Mon Apr 12 04:56:12 1993 --- gs261/zcie.c Mon May 17 12:37:20 1993 *************** *** 1,4 **** /* Copyright (C) 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- *************** *** 23,30 **** #include "errors.h" #include "oper.h" #include "gscspace.h" #include "gscolor2.h" #include "gscie.h" - #include "gxrefct.h" #include "alloc.h" #include "dict.h" --- 22,30 ---- #include "errors.h" #include "oper.h" + #include "gxrefct.h" /* early for gscie.h */ + #include "gxcolor.h" /* for gscolor2.h */ #include "gscspace.h" #include "gscolor2.h" #include "gscie.h" #include "alloc.h" #include "dict.h" *************** *** 212,217 **** check_type(*pdref, t_dictionary); check_dict_read(*pdref); ! rc_alloc0(pcie, gs_cie_abc, &alloc_memory_procs, return_error(e_VMerror), ! "setcolorspace(CIEBasedABC)"); if ( (code = dict_range3_param(pdref, &name_RangeABC, &pcie->RangeABC)) != range3_ok || (code = dict_proc3_param(pdref, &name_DecodeABC, &pcprocs->Decode.ABC)) < 0 || --- 212,218 ---- check_type(*pdref, t_dictionary); check_dict_read(*pdref); ! rc_alloc_struct_0(pcie, gs_cie_abc, &alloc_memory_procs, ! return_error(e_VMerror), ! "setcolorspace(CIEBasedABC)"); if ( (code = dict_range3_param(pdref, &name_RangeABC, &pcie->RangeABC)) != range3_ok || (code = dict_proc3_param(pdref, &name_DecodeABC, &pcprocs->Decode.ABC)) < 0 || *************** *** 245,250 **** pcprocs->Decode.A = *pproc; } ! rc_alloc0(pcie, gs_cie_a, &alloc_memory_procs, return_error(e_VMerror), ! "setcolorspace(CIEBasedA)"); if ( (code = dict_float_array_param(pdref, &name_RangeA, 2, (float *)&pcie->RangeA, (float *)&RangeA_default)) != 2 || (code = dict_float_array_param(pdref, &name_MatrixA, 3, (float *)&pcie->MatrixA, (float *)&MatrixA_default)) != 3 || --- 246,252 ---- pcprocs->Decode.A = *pproc; } ! rc_alloc_struct_0(pcie, gs_cie_a, &alloc_memory_procs, ! return_error(e_VMerror), ! "setcolorspace(CIEBasedA)"); if ( (code = dict_float_array_param(pdref, &name_RangeA, 2, (float *)&pcie->RangeA, (float *)&RangeA_default)) != 2 || (code = dict_float_array_param(pdref, &name_MatrixA, 3, (float *)&pcie->MatrixA, (float *)&MatrixA_default)) != 3 || *************** *** 281,286 **** check_read_type(*op, t_dictionary); check_dict_read(*op); ! rc_alloc0(pcie, gs_cie_render, &alloc_memory_procs, return_error(e_VMerror), ! "setcolorrendering"); /* gs_setcolorrendering may refer to istate.colorrendering.procs. */ procs_old = istate.colorrendering.procs; --- 283,289 ---- check_read_type(*op, t_dictionary); check_dict_read(*op); ! rc_alloc_struct_0(pcie, gs_cie_render, &alloc_memory_procs, ! return_error(e_VMerror), ! "setcolorrendering"); /* gs_setcolorrendering may refer to istate.colorrendering.procs. */ procs_old = istate.colorrendering.procs; diff -rNC2 gs26/zcolor.c gs261/zcolor.c *** gs26/zcolor.c Wed Apr 28 03:06:38 1993 --- gs261/zcolor.c Wed May 12 18:34:16 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/zcolor2.c gs261/zcolor2.c *** gs26/zcolor2.c Wed Apr 28 03:06:16 1993 --- gs261/zcolor2.c Wed May 12 18:34:18 1993 *************** *** 1,4 **** /* Copyright (C) 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/zcontext.c gs261/zcontext.c *** gs26/zcontext.c Mon Apr 12 04:57:10 1993 --- gs261/zcontext.c Wed May 12 18:34:22 1993 *************** *** 1,4 **** /* Copyright (C) 1991, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/zcontrol.c gs261/zcontrol.c *** gs26/zcontrol.c Mon Apr 12 04:50:34 1993 --- gs261/zcontrol.c Wed May 12 18:34:28 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/zcspace2.c gs261/zcspace2.c *** gs26/zcspace2.c Mon Apr 12 04:58:44 1993 --- gs261/zcspace2.c Wed May 12 18:34:30 1993 *************** *** 1,4 **** /* Copyright (C) 1992 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/zdevice.c gs261/zdevice.c *** gs26/zdevice.c Mon Feb 8 01:53:26 1993 --- gs261/zdevice.c Wed May 12 18:34:34 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/zdict.c gs261/zdict.c *** gs26/zdict.c Mon Feb 8 01:56:44 1993 --- gs261/zdict.c Wed May 26 01:59:50 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- *************** *** 46,50 **** } ! /* setmaxlength - */ int zsetmaxlength(register os_ptr op) --- 45,49 ---- } ! /* .setmaxlength - */ int zsetmaxlength(register os_ptr op) *************** *** 161,165 **** int zknown(register os_ptr op) ! { os_ptr op1 = op - 1; ref *pvalue; check_type(*op1, t_dictionary); --- 160,164 ---- int zknown(register os_ptr op) ! { register os_ptr op1 = op - 1; ref *pvalue; check_type(*op1, t_dictionary); *************** *** 285,289 **** {"1load", zload}, {"1maxlength", zmaxlength}, ! {"2setmaxlength", zsetmaxlength}, {"2store", zstore}, {"2undef", zundef}, --- 284,288 ---- {"1load", zload}, {"1maxlength", zmaxlength}, ! {"2.setmaxlength", zsetmaxlength}, {"2store", zstore}, {"2undef", zundef}, diff -rNC2 gs26/zdosio.c gs261/zdosio.c *** gs26/zdosio.c Mon Feb 1 04:08:32 1993 --- gs261/zdosio.c Wed May 12 18:34:40 1993 *************** *** 1,4 **** /* Copyright (C) 1992 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/zdps1.c gs261/zdps1.c *** gs26/zdps1.c Mon Apr 12 04:55:24 1993 --- gs261/zdps1.c Wed May 12 18:34:42 1993 *************** *** 1,4 **** /* Copyright (C) 1990, 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/zfile.c gs261/zfile.c *** gs26/zfile.c Mon May 3 03:12:00 1993 --- gs261/zfile.c Wed May 12 18:34:46 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- *************** *** 656,661 **** dlen = len; else ! dlen = pdelim - pname, pdelim++, len--; for ( pftab = file_device_table; *pftab != NULL; pftab++ ) { const char *dname = (*pftab)->dname; --- 655,661 ---- dlen = len; else ! { dlen = pdelim - pname; pdelim++, len--; + } for ( pftab = file_device_table; *pftab != NULL; pftab++ ) { const char *dname = (*pftab)->dname; diff -rNC2 gs26/zfiledev.c gs261/zfiledev.c *** gs26/zfiledev.c Wed Apr 14 07:28:20 1993 --- gs261/zfiledev.c Wed May 12 18:34:50 1993 *************** *** 1,4 **** /* Copyright (C) 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/zfileio.c gs261/zfileio.c *** gs26/zfileio.c Mon Apr 12 10:11:52 1993 --- gs261/zfileio.c Wed May 12 18:34:52 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/zfilter.c gs261/zfilter.c *** gs26/zfilter.c Thu Mar 4 13:11:58 1993 --- gs261/zfilter.c Wed May 12 18:34:56 1993 *************** *** 1,4 **** /* Copyright (C) 1991, 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/zfilter2.c gs261/zfilter2.c *** gs26/zfilter2.c Wed Apr 21 09:48:12 1993 --- gs261/zfilter2.c Wed May 12 18:35:00 1993 *************** *** 1,4 **** /* Copyright (C) 1991, 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- *************** *** 20,23 **** --- 19,23 ---- /* zfilter2.c */ /* Additional filter creation for Ghostscript */ + #include "memory_.h" #include "ghost.h" #include "errors.h" diff -rNC2 gs26/zfont.c gs261/zfont.c *** gs26/zfont.c Tue May 4 12:10:02 1993 --- gs261/zfont.c Wed May 26 18:30:42 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- *************** *** 248,255 **** if ( pmref == NULL ) { /* Create the scaling matrix now. */ - refcpy_to_new(newdata.value.refs, (const ref *)pmat, 6); data_len -= 6; r_set_size(&newdata, data_len); ! make_array(&mref, a_readonly, 6, newdata.value.refs + data_len); pmref = &mref; } --- 247,256 ---- if ( pmref == NULL ) { /* Create the scaling matrix now. */ data_len -= 6; + refcpy_to_new(newdata.value.refs + data_len, + (const ref *)pmat, 6); r_set_size(&newdata, data_len); ! make_array(&mref, a_readonly, 6, ! newdata.value.refs + data_len); pmref = &mref; } *************** *** 292,296 **** if ( pdir == 0 ) /* never initialized */ return; ! /* Purge scaled fonts and character cache. */ { gs_font *pfont; top: for ( pfont = pdir->scaled_fonts; pfont != 0; --- 293,310 ---- if ( pdir == 0 ) /* never initialized */ return; ! ! /* Purge original (unscaled) fonts. */ ! ! { gs_font *pfont; ! otop: for ( pfont = pdir->orig_fonts; pfont != 0; ! pfont = pfont->next ! ) ! { if ( alloc_is_since_save((char *)pfont, save) ) ! { gs_purge_font(pfont); goto otop; } ! } ! } ! ! /* Purge scaled fonts. */ ! { gs_font *pfont; top: for ( pfont = pdir->scaled_fonts; pfont != 0; *************** *** 298,307 **** ) { if ( alloc_is_since_save((char *)pfont, save) ) ! { gs_purge_font_from_caches(pdir, pfont); goto top; } ! else if ( alloc_is_since_save((char *)pfont->base, save) ) ! { gs_purge_font_from_caches(pdir, pfont->base); goto top; } } } /* Purge xfonts. */ { cached_fm_pair *pair; uint n; --- 312,321 ---- ) { if ( alloc_is_since_save((char *)pfont, save) ) ! { gs_purge_font(pfont); goto top; } } } + /* Purge xfonts. */ + { cached_fm_pair *pair; uint n; diff -rNC2 gs26/zfont0.c gs261/zfont0.c *** gs26/zfont0.c Mon Apr 12 04:56:02 1993 --- gs261/zfont0.c Wed May 26 11:47:26 1993 *************** *** 1,4 **** /* Copyright (C) 1991, 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- *************** *** 194,198 **** } pfont->data.type0_data = data; ! return 0; } /* Private routine to find or add an integer entry in a font dictionary. */ --- 193,197 ---- } pfont->data.type0_data = data; ! return define_gs_font(pfont); } /* Private routine to find or add an integer entry in a font dictionary. */ diff -rNC2 gs26/zfont1.c gs261/zfont1.c *** gs26/zfont1.c Mon Apr 12 04:56:18 1993 --- gs261/zfont1.c Wed May 26 11:47:16 1993 *************** *** 1,4 **** /* Copyright (C) 1991, 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- *************** *** 203,207 **** uid_set_invalid(&pfont->data.base.UID); } ! return 0; } --- 202,206 ---- uid_set_invalid(&pfont->data.base.UID); } ! return define_gs_font(pfont); } diff -rNC2 gs26/zfont2.c gs261/zfont2.c *** gs26/zfont2.c Mon Apr 12 04:55:58 1993 --- gs261/zfont2.c Thu May 27 05:27:42 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- *************** *** 20,23 **** --- 19,23 ---- /* zfont2.c */ /* Font creation utilities for Ghostscript */ + #include "memory_.h" #include "ghost.h" #include "errors.h" *************** *** 41,47 **** /* Names of system-known keys in font dictionaries: */ static ref name_FontType; static ref name_WMode; - static ref name_FontBBox; static ref name_Encoding; static ref name_UniqueID; static ref name_XUID; --- 41,48 ---- /* Names of system-known keys in font dictionaries: */ static ref name_FontType; + static ref name_FontName; static ref name_WMode; static ref name_Encoding; + static ref name_FontBBox; static ref name_UniqueID; static ref name_XUID; *************** *** 57,63 **** ref registered_Encodings[registered_Encodings_countof]; - /* The global font directory */ - extern gs_font_dir *ifont_dir; - /* Initialize the font building operators */ private void --- 58,61 ---- *************** *** 68,74 **** /* a font dictionary. */ { "FontType", &name_FontType }, { "WMode", &name_WMode }, - { "FontBBox", &name_FontBBox }, { "Encoding", &name_Encoding }, { "UniqueID", &name_UniqueID }, { "XUID", &name_XUID }, --- 66,73 ---- /* a font dictionary. */ { "FontType", &name_FontType }, + { "FontName", &name_FontName }, { "WMode", &name_WMode }, { "Encoding", &name_Encoding }, + { "FontBBox", &name_FontBBox }, { "UniqueID", &name_UniqueID }, { "XUID", &name_XUID }, *************** *** 97,101 **** int zbuildfont3(os_ptr op) ! { int ccode, gcode; build_proc_refs build; ref pnull; --- 96,100 ---- int zbuildfont3(os_ptr op) ! { int ccode, gcode, code; build_proc_refs build; ref pnull; *************** *** 118,122 **** { check_proc(*build.pBuildGlyph); } ! return build_gs_simple_font(op, &pfont, ft_user_defined, &build); } --- 117,124 ---- { check_proc(*build.pBuildGlyph); } ! code = build_gs_simple_font(op, &pfont, ft_user_defined, &build); ! if ( code < 0 ) ! return code; ! return define_gs_font(pfont); } *************** *** 139,146 **** /* (This is very inefficient right now; we can speed it up later.) */ private gs_glyph ! zfont_encode_char(gs_show_enum *penum, gs_font *pfont, gs_char chr) { const ref *pencoding = &((font_data *)(pfont->client_data))->Encoding; ! ulong index = chr; /* work around VAX widening bug */ ref cname; int code = array_get(pencoding, (long)index, &cname); --- 141,148 ---- /* (This is very inefficient right now; we can speed it up later.) */ private gs_glyph ! zfont_encode_char(gs_show_enum *penum, gs_font *pfont, gs_char *pchr) { const ref *pencoding = &((font_data *)(pfont->client_data))->Encoding; ! ulong index = *pchr; /* work around VAX widening bug */ ref cname; int code = array_get(pencoding, (long)index, &cname); *************** *** 151,155 **** /* Get the name of a glyph. */ ! private const char * zfont_glyph_name(gs_glyph index, uint *plen) { ref nref, sref; --- 153,160 ---- /* Get the name of a glyph. */ ! /* The following typedef is needed to work around a bug in */ ! /* some AIX C compiler. */ ! typedef const char *const_chars; ! private const_chars zfont_glyph_name(gs_glyph index, uint *plen) { ref nref, sref; *************** *** 211,220 **** pfont->data.base.FontBBox.q.y = bbox[3]; pfont->data.base.UID = uid; ! { int index; for ( index = registered_Encodings_countof; --index >= 0; ) ! if ( obj_eq(&((font_data *)(pfont->client_data))->Encoding, ! ®istered_Encodings[index]) ) break; pfont->data.base.encoding_index = index; } return 0; --- 216,251 ---- pfont->data.base.FontBBox.q.y = bbox[3]; pfont->data.base.UID = uid; ! { const ref *pfe = ! &((font_data *)(pfont->client_data))->Encoding; ! int index; for ( index = registered_Encodings_countof; --index >= 0; ) ! if ( obj_eq(pfe, ®istered_Encodings[index]) ) break; pfont->data.base.encoding_index = index; + if ( index < 0 ) + { /* Look for an encoding that's "close". */ + int near_index = -1; + uint esize = r_size(pfe); + uint best = esize / 3; /* must match at least this many */ + for ( index = registered_Encodings_countof; --index >= 0; ) + { const ref *pre = ®istered_Encodings[index]; + uint match = esize; + int i; + if ( r_size(pre) != esize ) + continue; + for ( i = esize; --i >= 0; ) + { ref fe, re; + array_get(pfe, (long)i, &fe); + array_get(pre, (long)i, &re); + if ( !obj_eq(&fe, &re) ) + match--; + } + if ( match > best ) + best = match, + near_index = index; + } + index = near_index; + } + pfont->data.base.nearest_encoding_index = index; } return 0; *************** *** 272,284 **** /* Do the common work for building a font of any FontType. */ /* The caller guarantees that *op is a dictionary. */ ! /* op[-1] must be the font name, a name or string (this is checked here). */ /* Return 0 for a new font, 1 for a font made by makefont or scalefont, */ /* or a negative error code. */ int build_gs_font(os_ptr op, gs_font **ppfont, font_type ftype, const build_proc_refs *pbuild) ! { os_ptr op1 = op - 1; ! ref fname; /* t_string */ ref *pftype; ref *pmatrix; gs_matrix mat; --- 303,318 ---- /* Do the common work for building a font of any FontType. */ /* The caller guarantees that *op is a dictionary. */ ! /* op[-1] must be the key under which the font is being registered */ ! /* in FontDirectory, normally a name or string. */ /* Return 0 for a new font, 1 for a font made by makefont or scalefont, */ /* or a negative error code. */ + private void get_font_name(P2(ref *, const ref *)); + private void copy_font_name(P2(gs_font_name *, const ref *)); int build_gs_font(os_ptr op, gs_font **ppfont, font_type ftype, const build_proc_refs *pbuild) ! { ref kname, fname; /* t_string */ ref *pftype; + ref *pfontname; ref *pmatrix; gs_matrix mat; *************** *** 290,305 **** ref *pfid; ref *aop = dict_access_ref(op); ! switch ( r_type(op1) ) ! { ! case t_string: ! fname = *op1; ! break; ! case t_name: ! name_string_ref(op1, &fname); ! break; ! default: ! /* This is weird, but legal.... */ ! make_string(&fname, a_readonly, 0, NULL); ! } if ( dict_find(op, &name_FontType, &pftype) <= 0 || !r_has_type(pftype, t_integer) || --- 324,328 ---- ref *pfid; ref *aop = dict_access_ref(op); ! get_font_name(&kname, op - 1); if ( dict_find(op, &name_FontType, &pftype) <= 0 || !r_has_type(pftype, t_integer) || *************** *** 306,315 **** pftype->value.intval != (int)ftype || dict_find(op, &name_FontMatrix, &pmatrix) <= 0 || dict_find(op, &name_Encoding, &pencoding) <= 0 || ! read_matrix(pmatrix, &mat) < 0 ) return_error(e_invalidfont); ! if ( !r_is_array(pencoding) ) ! return_error(e_invalidfont); if ( (code = dict_int_param(op, &name_WMode, 0, 1, 0, &wmode)) < 0 || (code = dict_bool_param(op, &name_BitmapWidths, 0, &bitmapwidths)) < 0 || --- 329,341 ---- pftype->value.intval != (int)ftype || dict_find(op, &name_FontMatrix, &pmatrix) <= 0 || + read_matrix(pmatrix, &mat) < 0 || dict_find(op, &name_Encoding, &pencoding) <= 0 || ! !r_is_array(pencoding) ) return_error(e_invalidfont); ! if ( dict_find(op, &name_FontName, &pfontname) > 0 ) ! get_font_name(&fname, pfontname); ! else ! make_string(&fname, a_readonly, 0, NULL); if ( (code = dict_int_param(op, &name_WMode, 0, 1, 0, &wmode)) < 0 || (code = dict_bool_param(op, &name_BitmapWidths, 0, &bitmapwidths)) < 0 || *************** *** 358,369 **** pfont = pfid->value.pfont; } ! if ( r_size(&fname) > font_name_max ) ! pfont->font_name.size = 0; ! else ! { memcpy(&pfont->font_name.chars[0], fname.value.const_bytes, ! r_size(&fname)); ! pfont->font_name.size = r_size(&fname); ! } *ppfont = pfont; return 0; } --- 384,426 ---- pfont = pfid->value.pfont; } ! copy_font_name(&pfont->key_name, &kname); ! copy_font_name(&pfont->font_name, &fname); *ppfont = pfont; return 0; + } + + /* Get the string corresponding to a font name. */ + /* If the font name isn't a name or a string, return an empty string. */ + private void + get_font_name(ref *pfname, const ref *op) + { switch ( r_type(op) ) + { + case t_string: + *pfname = *op; + break; + case t_name: + name_string_ref(op, pfname); + break; + default: + /* This is weird, but legal.... */ + make_string(pfname, a_readonly, 0, NULL); + } + } + + /* Copy a font name into the gs_font structure. */ + private void + copy_font_name(gs_font_name *pfstr, const ref *pfname) + { uint size = r_size(pfname); + if ( size > gs_font_name_max ) + size = gs_font_name_max; + memcpy(&pfstr->chars[0], pfname->value.const_bytes, size); + pfstr->size = size; + } + + /* Finish building a font, by calling gs_definefont if needed. */ + int + define_gs_font(gs_font *pfont) + { return (pfont->base == pfont ? /* i.e., original font */ + gs_definefont(ifont_dir, pfont) : + 0); } diff -rNC2 gs26/zgeneric.c gs261/zgeneric.c *** gs26/zgeneric.c Mon Apr 12 04:52:00 1993 --- gs261/zgeneric.c Wed May 12 18:35:12 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/zgstate.c gs261/zgstate.c *** gs26/zgstate.c Mon Apr 12 04:50:44 1993 --- gs261/zgstate.c Wed May 12 18:35:16 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/zht.c gs261/zht.c *** gs26/zht.c Mon Feb 1 04:12:14 1993 --- gs261/zht.c Wed May 12 18:35:18 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1991 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/zht2.c gs261/zht2.c *** gs26/zht2.c Mon Apr 12 04:59:18 1993 --- gs261/zht2.c Wed May 12 18:35:20 1993 *************** *** 1,4 **** /* Copyright (C) 1992 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/zimage2.c gs261/zimage2.c *** gs26/zimage2.c Mon Apr 12 04:57:50 1993 --- gs261/zimage2.c Mon May 17 12:38:12 1993 *************** *** 1,4 **** /* Copyright (C) 1992 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- *************** *** 25,28 **** --- 24,28 ---- #include "oper.h" #include "gscolor.h" + #include "gxcolor.h" /* for gscolor2.h */ #include "gscspace.h" #include "gscolor2.h" diff -rNC2 gs26/zmath.c gs261/zmath.c *** gs26/zmath.c Mon Apr 12 04:50:18 1993 --- gs261/zmath.c Wed May 12 18:35:26 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/zmatrix.c gs261/zmatrix.c *** gs26/zmatrix.c Mon Apr 12 04:49:10 1993 --- gs261/zmatrix.c Wed May 12 18:35:30 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1991, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/zmisc.c gs261/zmisc.c *** gs26/zmisc.c Sat Feb 27 08:11:40 1993 --- gs261/zmisc.c Thu May 27 18:01:20 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- *************** *** 153,157 **** } ! /* makeoperator */ int zmakeoperator(register os_ptr op) --- 152,156 ---- } ! /* .makeoperator */ int zmakeoperator(register os_ptr op) *************** *** 210,214 **** } ! /* setdebug - */ int zsetdebug(register os_ptr op) --- 209,213 ---- } ! /* .setdebug - */ int zsetdebug(register os_ptr op) *************** *** 274,284 **** {"0currenttime", zcurrenttime}, {"1getenv", zgetenv}, ! {"2makeoperator", zmakeoperator}, {"0.oserrno", zoserrno}, {"1.oserrorstring", zoserrorstring}, {"1serialnumber", zserialnumber}, ! {"2setdebug", zsetdebug}, ! {"3type1encrypt", ztype1encrypt}, ! {"3type1decrypt", ztype1decrypt}, {"0usertime", zusertime}, op_def_end(0) --- 273,283 ---- {"0currenttime", zcurrenttime}, {"1getenv", zgetenv}, ! {"2.makeoperator", zmakeoperator}, {"0.oserrno", zoserrno}, {"1.oserrorstring", zoserrorstring}, {"1serialnumber", zserialnumber}, ! {"2.setdebug", zsetdebug}, ! {"3.type1encrypt", ztype1encrypt}, ! {"3.type1decrypt", ztype1decrypt}, {"0usertime", zusertime}, op_def_end(0) diff -rNC2 gs26/zmisc2.c gs261/zmisc2.c *** gs26/zmisc2.c Mon Apr 12 04:59:38 1993 --- gs261/zmisc2.c Wed May 12 18:35:36 1993 *************** *** 1,4 **** /* Copyright (C) 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/zpacked.c gs261/zpacked.c *** gs26/zpacked.c Mon Feb 1 17:34:04 1993 --- gs261/zpacked.c Wed May 12 18:35:40 1993 *************** *** 1,4 **** /* Copyright (C) 1990, 1992 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/zpaint.c gs261/zpaint.c *** gs26/zpaint.c Mon May 3 10:10:54 1993 --- gs261/zpaint.c Wed May 12 18:35:42 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1990, 1991 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/zpath.c gs261/zpath.c *** gs26/zpath.c Mon Feb 8 09:14:16 1993 --- gs261/zpath.c Wed May 12 18:35:44 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1990, 1991, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/zpath2.c gs261/zpath2.c *** gs26/zpath2.c Thu Apr 1 07:13:06 1993 --- gs261/zpath2.c Wed May 12 18:35:48 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1990, 1991, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/zprops.c gs261/zprops.c *** gs26/zprops.c Wed Apr 7 19:44:22 1993 --- gs261/zprops.c Wed May 12 18:35:50 1993 *************** *** 1,4 **** /* Copyright (C) 1991, 1992 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/zrelbit.c gs261/zrelbit.c *** gs26/zrelbit.c Mon Feb 8 09:17:38 1993 --- gs261/zrelbit.c Wed May 12 18:35:52 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1990, 1991, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/zstack.c gs261/zstack.c *** gs26/zstack.c Mon Feb 1 17:35:40 1993 --- gs261/zstack.c Sat May 22 03:36:00 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1991, 1992 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- *************** *** 39,45 **** { ref next; check_op(2); ! ref_assign(&next, op - 1); ! ref_assign(op - 1, op); ! ref_assign(op, &next); return 0; } --- 38,44 ---- { ref next; check_op(2); ! ref_assign_inline(&next, op - 1); ! ref_assign_inline(op - 1, op); ! ref_assign_inline(op, &next); return 0; } *************** *** 50,54 **** { check_op(1); push(1); ! ref_assign(op, op - 1); return 0; } --- 49,53 ---- { check_op(1); push(1); ! ref_assign_inline(op, op - 1); return 0; } *************** *** 57,61 **** int zindex(register os_ptr op) ! { os_ptr opn; check_type(*op, t_integer); if ( (ulong)op->value.intval >= op - osbot ) --- 56,60 ---- int zindex(register os_ptr op) ! { register os_ptr opn; check_type(*op, t_integer); if ( (ulong)op->value.intval >= op - osbot ) *************** *** 62,66 **** return_error(e_rangecheck); opn = op + ~(int)op->value.intval; ! ref_assign(op, opn); return 0; } --- 61,65 ---- return_error(e_rangecheck); opn = op + ~(int)op->value.intval; ! ref_assign_inline(op, opn); return 0; } diff -rNC2 gs26/zstring.c gs261/zstring.c *** gs26/zstring.c Mon Apr 5 07:57:48 1993 --- gs261/zstring.c Thu May 27 17:56:40 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1990, 1991, 1992 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- *************** *** 22,25 **** --- 21,25 ---- #include "memory_.h" #include "ghost.h" + #include "stream.h" #include "alloc.h" #include "errors.h" *************** *** 29,33 **** #include "oper.h" #include "store.h" - #include "stream.h" /* The generic operators (copy, get, put, getinterval, putinterval, */ --- 29,32 ---- *************** *** 113,117 **** } ! /* stringmatch */ int zstringmatch(register os_ptr op) --- 112,116 ---- } ! /* .stringmatch */ int zstringmatch(register os_ptr op) *************** *** 181,185 **** {"2search", zsearch}, {"1string", zstring}, ! {"2stringmatch", zstringmatch}, {"1token", ztoken}, op_def_end(0) --- 180,184 ---- {"2search", zsearch}, {"1string", zstring}, ! {"2.stringmatch", zstringmatch}, {"1token", ztoken}, op_def_end(0) diff -rNC2 gs26/ztype.c gs261/ztype.c *** gs26/ztype.c Fri Apr 23 08:15:26 1993 --- gs261/ztype.c Thu May 20 07:17:44 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- *************** *** 24,27 **** --- 23,27 ---- #include "string_.h" #include "ghost.h" + #include "stream.h" #include "errors.h" #include "oper.h" *************** *** 31,35 **** #include "iutil.h" #include "store.h" - #include "stream.h" /* Forward references */ --- 31,34 ---- diff -rNC2 gs26/zupath.c gs261/zupath.c *** gs26/zupath.c Mon Feb 8 16:04:50 1993 --- gs261/zupath.c Wed May 12 18:36:06 1993 *************** *** 1,4 **** /* Copyright (C) 1990, 1992, 1993 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/zvmem.c gs261/zvmem.c *** gs26/zvmem.c Tue Jan 5 13:03:46 1993 --- gs261/zvmem.c Wed May 12 18:36:10 1993 *************** *** 1,4 **** /* Copyright (C) 1989, 1992 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ---- diff -rNC2 gs26/zvmem2.c gs261/zvmem2.c *** gs26/zvmem2.c Wed Nov 25 15:33:02 1992 --- gs261/zvmem2.c Wed May 12 18:36:14 1993 *************** *** 1,4 **** /* Copyright (C) 1992 Aladdin Enterprises. All rights reserved. - Distributed by Free Software Foundation, Inc. This file is part of Ghostscript. --- 1,3 ----