diff -rc2N gs24/Fontmap gs241/Fontmap *** gs24/Fontmap Thu Feb 27 02:55:56 1992 --- gs241/Fontmap Wed Apr 8 18:27:32 1992 *************** *** 1,3 **** ! % Copyright (C) 1990, 1991 Aladdin Enterprises. All rights reserved. % Distributed by Free Software Foundation, Inc. % --- 1,3 ---- ! % Copyright (C) 1990, 1992 Aladdin Enterprises. All rights reserved. % Distributed by Free Software Foundation, Inc. % *************** *** 108,111 **** --- 108,112 ---- /ZapfChancery (zcr.gsf) ; + /ZapfChancery-MediumItalic (zcri.gsf) ; /ZapfChancery-Oblique (zcro.gsf) ; /ZapfChancery-Bold (zcb.gsf) ; diff -rc2N gs24/README gs241/README *** gs24/README Wed Mar 25 03:21:00 1992 --- gs241/README Mon Apr 20 03:41:04 1992 *************** *** 20,26 **** - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ! *************************************************** ! * This file describes version 2.4 of Ghostscript. * ! *************************************************** ******** --- 20,26 ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ! ***************************************************** ! * This file describes version 2.4.1 of Ghostscript. * ! ***************************************************** ******** *************** *** 117,122 **** > man.doc - a possible Un*x 'man' page for Ghostscript. - > pbm.doc - documentation on the user-contributed PPM/PGM/PBM drivers. - ******** ******** Trouble reporting ******** --- 117,120 ---- *************** *** 229,232 **** --- 227,236 ---- this is of interest to you. + Another thing we need a volunteer to help with is maintaining the + SunView driver. Since nearly all SunView sites have switched to + OpenWindows or plain X Windows, we (Aladdin Enterprises) plan to stop + updating it sometime fairly soon. Please contact ghost@aladdin.com + if you are willing to help with this. + ******** ******** Authors ******** *************** *** 244,252 **** Karl Berry and Kathy Hargreaves (for helping create the fonts distributed with Ghostscript), ! Phil Conrad (for originating the PPM utilities, and lots of ! bug reports), Michel Dagenais (for major help with the DeskJet driver), Gershon Elber (for improvements to the BGI driver), Mike Ferrara (for help with the LaserJet driver and HP-UX), Paul Haeberli (for the ideas behind better color selection and trapezoid fill algorithms), --- 248,257 ---- Karl Berry and Kathy Hargreaves (for helping create the fonts distributed with Ghostscript), ! Phil Conrad (for originating the PPM utilities and the PCX and ! GIF drivers, and lots of bug reports), Michel Dagenais (for major help with the DeskJet driver), Gershon Elber (for improvements to the BGI driver), Mike Ferrara (for help with the LaserJet driver and HP-UX), + J Greely (for help with the PostScript-to-ASCII filter), Paul Haeberli (for the ideas behind better color selection and trapezoid fill algorithms), *************** *** 256,260 **** Markku Koppinen (for a better circle-to-curve algorithm), Jim Mayer (for improving the DeskJet driver), ! Richard Mlynarik (for many minor improvements and suggestions), Daniel Newman (for major help with VMS), Roque Donizete de Oliveira (for testing and debugging), --- 261,266 ---- Markku Koppinen (for a better circle-to-curve algorithm), Jim Mayer (for improving the DeskJet driver), ! Richard Mlynarik (for many improvements and suggestions), ! Ulrich Mueller (for the LN03 driver), Daniel Newman (for major help with VMS), Roque Donizete de Oliveira (for testing and debugging), *************** *** 267,277 **** Clemens Schrimpe (for help with accented characters), Mike Smolenski (for the Sony drivers), Snoopy (for major help with Hershey fonts, and many other contributions), Michael Sweet (for help with the high-density Epson driver), ! Gregg Townsend (for the dithering algorithm), Christian Tschudin (for fixes to the virtual memory package, and for the original BubbleJet driver), ! Ulrich Mueller (for the LN03 driver), Allan Wax (for the AT&T 6300 modification to the BGI driver), Elizabeth Zwicky (for some very challenging examples). --- 273,284 ---- Clemens Schrimpe (for help with accented characters), Mike Smolenski (for the Sony drivers), + Andreas Stolcke (for help with the SunView driver), Snoopy (for major help with Hershey fonts, and many other contributions), Michael Sweet (for help with the high-density Epson driver), ! Gregg Townsend (for the low-resolution dithering algorithm), Christian Tschudin (for fixes to the virtual memory package, and for the original BubbleJet driver), ! Jos Vos (for the original PBM/PGM/PPM driver), Allan Wax (for the AT&T 6300 modification to the BGI driver), Elizabeth Zwicky (for some very challenging examples). diff -rc2N gs24/alphabet.ps gs241/alphabet.ps *** gs24/alphabet.ps Sun Mar 15 17:27:24 1992 --- gs241/alphabet.ps Sat Apr 18 15:43:22 1992 *************** *** 6,11 **** /smin (abcdefghijklmnopqrstuvwxyz) def - (aA) true setdebug - /sp ( ) def /sd (=) def /smaj (I) def /smin (l) def 20 0 moveto 4 { --- 6,9 ---- *************** *** 12,16 **** [ sp sd smaj smin ] { 0 15 rmoveto gsave show grestore - vmstatus pstack clear flush } forall 1.6 1.6 scale --- 10,13 ---- diff -rc2N gs24/astate.h gs241/astate.h *** gs24/astate.h Tue Mar 3 17:39:12 1992 --- gs241/astate.h Sat Apr 11 09:36:36 1992 *************** *** 1,3 **** ! /* Copyright (C) 1991 Aladdin Enterprises. All rights reserved. Distributed by Free Software Foundation, Inc. --- 1,3 ---- ! /* Copyright (C) 1991, 1992 Aladdin Enterprises. All rights reserved. Distributed by Free Software Foundation, Inc. *************** *** 83,86 **** --- 83,89 ---- proc_alloc_t palloc; /* proc for malloc */ proc_free_t pfree; /* proc for free */ + alloc_chunk *last_freed; /* cache the last non-current chunk */ + /* at the current save level */ + /* where we freed an object */ /* Statistics */ long used; /* total space used, including */ diff -rc2N gs24/cc-head.mak gs241/cc-head.mak *** gs24/cc-head.mak Wed Mar 25 10:23:48 1992 --- gs241/cc-head.mak Fri Apr 10 05:46:10 1992 *************** *** 55,59 **** # Add -DBSD4_2 for 4.2bsd systems. # Add -DSYSV for System V. ! # Add -DSYSV -D__SVR3 for ISC Unix 2.2. # Add -DSVR4 (not -DSYSV) for System V release 4. # XCFLAGS can be set from the command line. --- 55,60 ---- # Add -DBSD4_2 for 4.2bsd systems. # Add -DSYSV for System V. ! # Add -DSYSV -D__SVR3 for SCO ODT, ISC Unix 2.2 or before, ! # or any System III Unix, or System V release 3-or-older Unix. # Add -DSVR4 (not -DSYSV) for System V release 4. # XCFLAGS can be set from the command line. *************** *** 118,122 **** # Define the compilation rules and flags. ! CCC=./ccgs "$(CC) $(CCFLAGS)" _temp_.c # --------------------------- Generic makefile ---------------------------- # --- 119,123 ---- # Define the compilation rules and flags. ! CCC=./ccgs "$(CC) $(CCFLAGS)" # --------------------------- Generic makefile ---------------------------- # diff -rc2N gs24/ccfont.h gs241/ccfont.h *** gs24/ccfont.h Thu Mar 5 16:30:24 1992 --- gs241/ccfont.h Wed Apr 8 10:15:30 1992 *************** *** 41,47 **** /* Support routines in iccfont.c */ typedef struct { ! charindex _ds *enc_keys; /* keys from encoding vectors */ uint num_enc_keys; ! char _ds * _ds *str_keys; /* string keys */ uint num_str_keys; uint extra_slots; /* (need 1 extra for fonts) */ --- 41,47 ---- /* Support routines in iccfont.c */ typedef struct { ! const charindex _ds *enc_keys; /* keys from encoding vectors */ uint num_enc_keys; ! const char _ds * _ds *str_keys; /* string keys */ uint num_str_keys; uint extra_slots; /* (need 1 extra for fonts) */ diff -rc2N gs24/ccgs gs241/ccgs *** gs24/ccgs Sun Apr 21 19:31:14 1991 --- gs241/ccgs Sat Mar 28 12:37:38 1992 *************** *** 1,8 **** ! if ( test -n "$5" ) ! then ./ansi2knr $5 $2; $1 $3 $4 -c $2; mv `basename $2 .c`.o `basename $5 .c`.o else ! if ( test -n "$4" ) ! then ./ansi2knr $4 $2; $1 $3 -c $2; mv `basename $2 .c`.o `basename $4 .c`.o ! else ./ansi2knr $3 $2; $1 -c $2; mv `basename $2 .c`.o `basename $3 .c`.o fi fi --- 1,18 ---- ! if ( test -n "$4" ) then ! ./ansi2knr $4 _temp_$$.c ! $1 $2 $3 -c _temp_$$.c ! mv _temp_$$.o `basename $4 .c`.o ! rm -f _temp_$$.c else ! if ( test -n "$3" ) then ! ./ansi2knr $3 _temp_$$.c ! $1 $2 -c _temp_$$.c ! mv _temp_$$.o `basename $3 .c`.o ! rm -f _temp_$$.c ! else ! ./ansi2knr $2 _temp_$$.c ! $1 -c _temp_$$.c ! mv _temp_$$.o `basename $2 .c`.o fi fi + rm -f _temp_$$.c diff -rc2N gs24/devs.mak gs241/devs.mak *** gs24/devs.mak Wed Mar 25 10:43:00 1992 --- gs241/devs.mak Sat Apr 18 13:33:54 1992 *************** *** 31,42 **** # vga VGA (640x480, 16-color) # MS-DOS SuperVGA: ! # ****** NOTE: these devices do not work with the Watcom (32-bit MS-DOS) ! # ****** compiler or executable. ! # + atiw ATI Wonder SuperVGA # * mdb10 EIZO MDB-10 (1024 x 768) ! # tseng SuperVGA using Tseng Labs ET3000/4000 chips # tseng16 Tseng Labs SuperVGA in 800x600, 16-color mode (256K memory) # + tvga16 Trident SuperVGA in 800x600, 16-color mode (256K memory) ! # vesa SuperVGA with VESA standard API # MS-DOS other: # bgi Borland Graphics Interface (CGA and Hercules) --- 31,42 ---- # vga VGA (640x480, 16-color) # MS-DOS SuperVGA: ! # + atiw ATI Wonder SuperVGA, 256-color modes # * mdb10 EIZO MDB-10 (1024 x 768) ! # tseng SuperVGA using Tseng Labs ET3000/4000 chips, 256-color modes # tseng16 Tseng Labs SuperVGA in 800x600, 16-color mode (256K memory) # + tvga16 Trident SuperVGA in 800x600, 16-color mode (256K memory) ! # ****** NOTE: the vesa device does not work with the Watcom (32-bit MS-DOS) ! # ****** compiler or executable. ! # vesa SuperVGA with VESA standard API driver # MS-DOS other: # bgi Borland Graphics Interface (CGA and Hercules) *************** *** 68,71 **** --- 68,82 ---- # File formats and others: # bit A "bit bucket" device for time benchmarking + # gifmono Monochrome GIF file format + # gif8 8-bit color GIF file format + # pcxmono Monochrome PCX file format + # pcx16 Older color PCX file format (EGA/VGA, 16-color) + # pcx256 Newer color PCX file format (256-color) + # pbm Portable Bitmap (plain format) + # pbmraw Portable Bitmap (raw format) + # pgm Portable Graymap (plain format) + # pgmraw Portable Graymap (raw format) + # ppm Portable Pixmap (plain format) + # ppmraw Portable Pixmap (raw format) # User-contributed drivers marked with * require hardware or software *************** *** 81,93 **** # in alphabetical order. ! # Each platform-specific makefile must contain a line of the form # DEVICE_DEVS=.dev ... .dev # where dev1 ... devn are the devices to be included in the build. ! # dev1 will be used as the default device. ! # On MS-DOS platforms, this line must appear before the lines ! # (!)include gs.mak ! # (!)include devs.mak ! # in the makefile; on Unix systems, the device definition line ! # may appear anywhere in the makefile. # ---------------------------- End of catalog ---------------------------- # --- 92,107 ---- # in alphabetical order. ! # Each platform-specific makefile contains a line of the form # DEVICE_DEVS=.dev ... .dev # where dev1 ... devn are the devices to be included in the build. ! # You may edit this line to select any desired set of devices. ! # dev1 will be used as the default device (unless overridden from ! # the command line with -sDEVICE=xxx, of course.) If you can't fit all the ! # devices on a single line, you may add lines defining ! # DEVICE_DEVS2=.dev ... .dev ! # DEVICE_DEVS3=.dev ... .dev ! # etc. up to DEVICE_DEVS5. ! # Don't use continuation lines, since this may break the MS-DOS command ! # processor. # ---------------------------- End of catalog ---------------------------- # *************** *** 108,112 **** gdevegaa.$(OBJ): gdevegaa.asm ! ETEST=ega.$(OBJ) trace.$(OBJ) $(ega_) ega.exe: $(ETEST) libc$(MM).tr tlink /m /l $(LIBDIR)\c0$(MM) @ega.tr @libc$(MM).tr --- 122,126 ---- gdevegaa.$(OBJ): gdevegaa.asm ! ETEST=ega.$(OBJ) $(ega_) ega.exe: $(ETEST) libc$(MM).tr tlink /m /l $(LIBDIR)\c0$(MM) @ega.tr @libc$(MM).tr *************** *** 337,341 **** ###### ------------------------ Sony devices ------------------------ ###### ### Note: these drivers were contributed by users: please contact ### ! ### Mike Smolenski (mike@srava.sra.co.jp) if you have questions. ### ### ------------------- Sony NeWS frame buffer device ------------------ ### --- 351,355 ---- ###### ------------------------ Sony devices ------------------------ ###### ### Note: these drivers were contributed by users: please contact ### ! ### Mike Smolenski (mike@intertech.com) if you have questions. ### ### ------------------- Sony NeWS frame buffer device ------------------ ### *************** *** 356,359 **** --- 370,375 ---- ###### --------------------- The SunView device --------------------- ###### + ### Note: this driver is maintained by a user: if you have questions, ### + ### please contact Andreas Stolcke (stolcke@icsi.berkeley.edu). ### sunview_=gdevsun.$(OBJ) *************** *** 365,370 **** ### ----------------- The TruFax facsimile device ---------------------- ### ! ### Note: this driver was contributed by users: ### ! ### please contact nao@maestro.bellcore.com if you have questions. ### ### Note that the driver requires a file encode_l.o supplied by the ### ### makers of the TruFax product. ### --- 381,386 ---- ### ----------------- The TruFax facsimile device ---------------------- ### ! ### Note: this driver was contributed by users: please contact ### ! ### Neil Ostroff (nao@maestro.bellcore.com) if you have questions. ### ### Note that the driver requires a file encode_l.o supplied by the ### ### makers of the TruFax product. ### *************** *** 378,389 **** ###### ----------------------- The X11 device ----------------------- ###### - # Note that this includes some extra libraries to support Ghostview. - # Xt and Xext are included because on SunOS, some routine in Xmu calls - # XtMalloc, and something in Xt calls something in Xext, and Sun's - # dynamic library scheme requires pulling in all 3 libraries. - # On other operating systems, only Xmu is needed. - # Aladdin Enterprises does not support Ghostview. For more information ! # about Ghostview, contact Tim Theisen (ghostview@cs.wisc.edu). x11_=gdevx.$(OBJ) gdevxini.$(OBJ) --- 394,399 ---- ###### ----------------------- The X11 device ----------------------- ###### # Aladdin Enterprises does not support Ghostview. For more information ! # about Ghostview, please contact Tim Theisen (ghostview@cs.wisc.edu). x11_=gdevx.$(OBJ) gdevxini.$(OBJ) *************** *** 390,394 **** x11.dev: $(x11_) $(SHP)gssetdev x11 $(x11_) ! $(SHP)gsaddmod x11 -lib Xmu Xt Xext X11 # See the main makefile for the definition of XINCLUDE. --- 400,404 ---- x11.dev: $(x11_) $(SHP)gssetdev x11 $(x11_) ! $(SHP)gsaddmod x11 -lib X11 # See the main makefile for the definition of XINCLUDE. *************** *** 407,408 **** --- 417,480 ---- gdevbit.$(OBJ): gdevbit.c $(PDEVH) + + ###### ----------------------- PC file formats ---------------------- ###### + + gdevpccm.$(OBJ): gdevpccm.c $(gs_h) $(gsmatrix_h) $(gxdevice_h) $(gdevpccm_h) + + ### ------------------------- GIF file formats ------------------------- ### + + GIF=gdevgif.$(OBJ) gdevpccm.$(OBJ) gdevprn.$(OBJ) + + gdevgif.$(OBJ): gdevgif.c $(PDEVH) $(gdevpccm_h) + + gifmono.dev: $(GIF) + $(SHP)gssetdev gifmono $(GIF) + + gif8.dev: $(GIF) + $(SHP)gssetdev gif8 $(GIF) + + ### ------------------------- PCX file formats ------------------------- ### + + PCX=gdevpcx.$(OBJ) gdevpccm.$(OBJ) gdevprn.$(OBJ) + + gdevpcx.$(OBJ): gdevpcx.c $(PDEVH) $(gdevpccm_h) + + pcxmono.dev: $(PCX) + $(SHP)gssetdev pcxmono $(PCX) + + pcx16.dev: $(PCX) + $(SHP)gssetdev pcx16 $(PCX) + + pcx256.dev: $(PCX) + $(SHP)gssetdev pcx256 $(PCX) + + ###### ------------------- Portable Bitmap devices ------------------ ###### + ### For more information, see the pbm(5), pgm(5), and ppm(5) man pages. ### + + PXM=gdevpbm.$(OBJ) gdevprn.$(OBJ) + + gdevpbm.$(OBJ): gdevpbm.c $(PDEVH) $(gxlum_h) + + ### Portable Bitmap (PBM, plain or raw format, magic numbers "P1" or "P4") + + pbm.dev: $(PXM) + $(SHP)gssetdev pbm $(PXM) + + pbmraw.dev: $(PXM) + $(SHP)gssetdev pbmraw $(PXM) + + ### Portable Graymap (PGM, plain or raw format, magic numbers "P2" or "P5") + + pgm.dev: $(PXM) + $(SHP)gssetdev pgm $(PXM) + + pgmraw.dev: $(PXM) + $(SHP)gssetdev pgmraw $(PXM) + + ### Portable Pixmap (PPM, plain or raw format, magic numbers "P3" or "P6") + + ppm.dev: $(PXM) + $(SHP)gssetdev ppm $(PXM) + + ppmraw.dev: $(PXM) + $(SHP)gssetdev ppmraw $(PXM) diff -rc2N gs24/dict.h gs241/dict.h *** gs24/dict.h Thu Mar 5 16:28:28 1992 --- gs241/dict.h Thu Apr 16 12:42:38 1992 *************** *** 21,31 **** /* Interfaces for Ghostscript dictionary package */ - /******************************** - * NOTE: on MS-DOS systems, the dict stack is stored in the data segment. - * This leads to large performance gains, at the expense of having to swap - * the stack explicitly when switching contexts or handling segment under- - * or overflow (none of which are implemented yet!). - ********************************/ - /* * Contrary to our usual practice, we expose the (first-level) --- 21,24 ---- *************** *** 36,40 **** */ struct dict_s { ! ref count; /* t_integer, # of occupied entries */ ref keys; /* t_shortarray or t_array, keys */ ref values; /* t_array, values */ --- 29,34 ---- */ struct dict_s { ! ref count; /* t_integer, # of occupied entries; */ ! /* "size" is maxlength as seen by client. */ ref keys; /* t_shortarray or t_array, keys */ ref values; /* t_array, values */ *************** *** 41,49 **** }; ! /* Define the maximum size of a dictionary */ extern const uint dict_max_size; ! /* Create a dictionary */ ! extern int dict_create(P2(uint maxlength, ref *dict)); /* Return a pointer to a ref that holds the access attributes */ --- 35,50 ---- }; ! /* Define the maximum size of a dictionary. */ extern const uint dict_max_size; ! /* Define whether dictionaries expand automatically when full. */ ! /* Note that if dict_auto_expand is true, dict_put, dict_copy, and */ ! /* dict_resize cannot return e_dictfull; however, they can return */ ! /* e_VMerror. (dict_lookup and dict_find can return e_dictfull */ ! /* even if dict_auto_expand is true.) */ ! extern int dict_auto_expand; ! ! /* Create a dictionary. */ ! extern int dict_create(P2(uint maxlength, ref *pdref)); /* Return a pointer to a ref that holds the access attributes */ *************** *** 50,55 **** /* for a dictionary. */ #define dict_access_ref(pdref) (&(pdref)->value.pdict->values) ! #define check_dict_read(dict) check_read(*dict_access_ref(&dict)) ! #define check_dict_write(dict) check_write(*dict_access_ref(&dict)) /* Look up in a stack of dictionaries. Store a pointer to the value slot */ --- 51,56 ---- /* for a dictionary. */ #define dict_access_ref(pdref) (&(pdref)->value.pdict->values) ! #define check_dict_read(dref) check_read(*dict_access_ref(&dref)) ! #define check_dict_write(dref) check_write(*dict_access_ref(&dref)) /* Look up in a stack of dictionaries. Store a pointer to the value slot */ *************** *** 61,65 **** extern int dict_lookup(P4(const ref *pdbot, const ref *pdtop, const ref *key, ref **ppvalue)); /* Look up in just one dictionary. */ ! #define dict_find(dict,key,ppvalue) dict_lookup(dict,dict,key,ppvalue) /* Enter a key-value pair in a dictionary. */ --- 62,66 ---- extern int dict_lookup(P4(const ref *pdbot, const ref *pdtop, const ref *key, ref **ppvalue)); /* Look up in just one dictionary. */ ! #define dict_find(dref,key,ppvalue) dict_lookup(dref,dref,key,ppvalue) /* Enter a key-value pair in a dictionary. */ *************** *** 66,80 **** /* Return 0, e_dictfull, or e_VMerror if the key was a string */ /* and a VMerror occurred when converting it to a name. */ ! extern int dict_put(P3(ref *dict, const ref *key, const ref *pvalue)); /* Remove a key-value pair from a dictionary. */ /* Return 0 or e_undefined. */ ! extern int dict_undef(P2(ref *dict, const ref *key)); /* Return the number of elements in a dictionary. */ ! extern uint dict_length(P1(const ref *dict)); /* Return the capacity of a dictionary. */ ! extern uint dict_maxlength(P1(const ref *dict)); /* Copy one dictionary into another. */ --- 67,81 ---- /* Return 0, e_dictfull, or e_VMerror if the key was a string */ /* and a VMerror occurred when converting it to a name. */ ! extern int dict_put(P3(ref *pdref, const ref *key, const ref *pvalue)); /* Remove a key-value pair from a dictionary. */ /* Return 0 or e_undefined. */ ! extern int dict_undef(P2(ref *pdref, const ref *key)); /* Return the number of elements in a dictionary. */ ! extern uint dict_length(P1(const ref *pdref)); /* Return the capacity of a dictionary. */ ! extern uint dict_maxlength(P1(const ref *pdref)); /* Copy one dictionary into another. */ *************** *** 83,92 **** /* Grow or shrink a dictionary. */ ! /* Return 0 or e_dictfull. */ ! extern int dict_resize(P2(ref *dict, uint newmaxlength)); /* Prepare to enumerate a dictionary. */ /* Return an integer suitable for the first call to dict_next. */ ! extern int dict_first(P1(const ref *dict)); /* Enumerate the next element of a dictionary. */ --- 84,93 ---- /* Grow or shrink a dictionary. */ ! /* Return 0, e_dictfull, or e_VMerror. */ ! extern int dict_resize(P2(ref *pdref, uint newmaxlength)); /* Prepare to enumerate a dictionary. */ /* Return an integer suitable for the first call to dict_next. */ ! extern int dict_first(P1(const ref *pdref)); /* Enumerate the next element of a dictionary. */ *************** *** 95,115 **** /* and return an updated index, or return -1 */ /* to signal that there are no more elements in the dictionary. */ ! extern int dict_next(P3(const ref *dict, int index, ref *eltp)); ! ! /****** The remaining definitions take explicit note of ******/ ! /****** the existence of the dictionary stack. ******/ ! ! /* Define the dictionary stack and the standard dictionaries. */ ! extern ref dstack[]; ! #define systemdict (dstack[0]) ! #define userdict (dstack[1]) ! ! /* Define the dictionary stack pointers. */ ! typedef ref _ds *ds_ptr; ! extern ds_ptr dsp, dstop; ! ! /* Define a special fast entry for name lookup in the interpreter. */ ! /* The key is known to be a name; search the entire dict stack. */ ! /* Return the pointer to the value slot. */ ! /* If the name isn't found, just return 0. */ ! extern ref *dict_find_name(P1(ref *pname)); --- 96,98 ---- /* and return an updated index, or return -1 */ /* to signal that there are no more elements in the dictionary. */ ! extern int dict_next(P3(const ref *pdref, int index, ref *eltp)); diff -rc2N gs24/dstack.h gs241/dstack.h *** gs24/dstack.h --- gs241/dstack.h Thu Apr 16 12:42:36 1992 *************** *** 0 **** --- 1,43 ---- + /* Copyright (C) 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. */ + + /* dstack.h */ + /* Direct access to the Ghostscript dictionary stack */ + + /******************************** + * NOTE: on MS-DOS systems, the dict stack is stored in the data segment. + * This leads to large performance gains, at the expense of having to swap + * the stack explicitly when switching contexts or handling segment under- + * or overflow (none of which are implemented yet!). + ********************************/ + + /* Define the dictionary stack and the standard dictionaries. */ + extern ref dstack[]; + #define systemdict (dstack[0]) + #define userdict (dstack[1]) + + /* Define the dictionary stack pointers. */ + typedef ref _ds *ds_ptr; + extern ds_ptr dsp, dstop; + + /* Define a special fast entry for name lookup in the interpreter. */ + /* The key is known to be a name; search the entire dict stack. */ + /* Return the pointer to the value slot. */ + /* If the name isn't found, just return 0. */ + extern ref *dict_find_name(P1(ref *pname)); diff -rc2N gs24/errors.h gs241/errors.h *** gs24/errors.h Tue Dec 31 03:24:18 1991 --- gs241/errors.h Tue Apr 7 15:31:48 1992 *************** *** 1,3 **** ! /* Copyright (C) 1989, 1991 Aladdin Enterprises. All rights reserved. Distributed by Free Software Foundation, Inc. --- 1,3 ---- ! /* Copyright (C) 1989, 1992 Aladdin Enterprises. All rights reserved. Distributed by Free Software Foundation, Inc. *************** *** 33,37 **** /* Define the error name table */ ! char _ds *gs_error_names[] = { #define _e_(code,name) name, --- 33,37 ---- /* Define the error name table */ ! const char _ds *gs_error_names[] = { #define _e_(code,name) name, *************** *** 38,42 **** # else /* !INCLUDE_ERROR_NAMES */ ! extern char _ds *gs_error_names[]; # define _e_(code,name) --- 38,42 ---- # else /* !INCLUDE_ERROR_NAMES */ ! extern const char _ds *gs_error_names[]; # define _e_(code,name) *************** *** 100,103 **** --- 100,105 ---- #define e_invalidcontext (-26) _e_(e_invalidcontext, "invalidcontext") + #define e_undefinedresource (-27) /* not used yet */ + _e_(e_undefinedresource, "undefinedresource") # ifdef INCLUDE_ERROR_NAMES diff -rc2N gs24/estack.h gs241/estack.h *** gs24/estack.h Fri Nov 8 13:35:02 1991 --- gs241/estack.h Sat Apr 18 18:56:14 1992 *************** *** 1,3 **** ! /* Copyright (C) 1989, 1991 Aladdin Enterprises. All rights reserved. Distributed by Free Software Foundation, Inc. --- 1,3 ---- ! /* Copyright (C) 1989, 1992 Aladdin Enterprises. All rights reserved. Distributed by Free Software Foundation, Inc. *************** *** 29,32 **** --- 29,44 ---- typedef ref _ds *es_ptr; extern es_ptr esbot, esp, estop; + /* + * In the near future, we will cache the currentfile pointer + * (i.e., `shallow-bind' it in Lisp terminology). The invariant is as + * follows: either esfile points to the currentfile slot on the estack + * (i.e., the topmost slot with an executable file), or it is 0. + * Note that the following algorithm suffices to maintain the invariant: + * whenever a routine pushes or pops anything on the estack, if the object + * *might* be an executable file, set esfile to 0. + ****** NOT IMPLEMENTED YET ****** + */ + extern es_ptr esfile; + /* diff -rc2N gs24/file.h gs241/file.h *** gs24/file.h Sat Sep 21 19:19:36 1991 --- gs241/file.h Wed Apr 15 14:24:40 1992 *************** *** 44,47 **** } #define check_file(svar,op) check_file_ref(svar,op,s_is_valid(svar)) ! #define check_read_file(svar,op) check_file_ref(svar,op,s_is_reading(svar)) ! #define check_write_file(svar,op) check_file_ref(svar,op,s_is_writing(svar)) --- 44,53 ---- } #define check_file(svar,op) check_file_ref(svar,op,s_is_valid(svar)) ! #define check_read_file(svar,op)\ ! { check_read_type(*(op), t_file);\ ! check_file_access(svar,op,s_is_reading(svar));\ ! } ! #define check_write_file(svar,op)\ ! { check_write_type(*(op), t_file);\ ! check_file_access(svar,op,s_is_writing(svar));\ ! } diff -rc2N gs24/font2c.ps gs241/font2c.ps *** gs24/font2c.ps Thu Mar 5 13:38:40 1992 --- gs241/font2c.ps Wed Apr 8 10:41:38 1992 *************** *** 57,61 **** % Get the protection appropriate for (all the) values in a dictionary. ! /getva % get value protection attributes for dictionary { a_noaccess exch { exch pop --- 57,61 ---- % Get the protection appropriate for (all the) values in a dictionary. ! /getva { a_noaccess exch { exch pop *************** *** 220,224 **** } bind def /booleantype ! { exch (static ref_(ushort) ) ws wt ( = boolean_v\() ws { (1) } { (0) } ifelse ws (\);) wl true } bind def --- 220,224 ---- } bind def /booleantype ! { exch (static const ref_(ushort) ) ws wt ( = boolean_v\() ws { (1) } { (0) } ifelse ws (\);) wl true } bind def *************** *** 227,235 **** } bind def /integertype ! { exch (static ref_(long) ) ws wt ( = integer_v\() ws wt (\);) wl true } bind def /nametype ! { exch (static ref_(char *) ) ws wt ( = name_v\() ws wnstring cvs dup length wt (,) ws wcs % OK, names are short (\);) wl true --- 227,235 ---- } bind def /integertype ! { exch (static const ref_(long) ) ws wt ( = integer_v\() ws wt (\);) wl true } bind def /nametype ! { exch (static const ref_(const char *) ) ws wt ( = name_v\() ws wnstring cvs dup length wt (,) ws wcs % OK, names are short (\);) wl true *************** *** 236,240 **** } bind def /realtype ! { exch (static ref_(float) ) ws wt ( = real_v\() ws wt (\);) wl true } bind def --- 236,240 ---- } bind def /realtype ! { exch (static const ref_(float) ) ws wt ( = real_v\() ws wt (\);) wl true } bind def *************** *** 241,249 **** /stringtype { dup can_wcs ! { exch (static ref_(char *) ) ws wt ( = string_v\() ws dup length wt (,) ws wcs (\);) wl true } { (static char ) ws 1 index wt (_[] = ) ws wcca (;) wl ! dup dup (static ref_(char *) ) ws wt ( = string_v\(sizeof\() ws wt (_\),) ws wt (_\);) wl true } --- 241,249 ---- /stringtype { dup can_wcs ! { exch (static const ref_(const char *) ) ws wt ( = string_v\() ws dup length wt (,) ws wcs (\);) wl true } { (static char ) ws 1 index wt (_[] = ) ws wcca (;) wl ! dup dup (static const ref_(const char *) ) ws wt ( = string_v\(sizeof\() ws wt (_\),) ws wt (_\);) wl true } *************** *** 267,271 **** } forall ] ! dup (static char _ds *str_keys_[] = {) wl { wtstring cvs wcs % OK, key names are short (,) wl --- 267,271 ---- } forall ] ! dup (static const char _ds *str_keys_[] = {) wl { wtstring cvs wcs % OK, key names are short (,) wl *************** *** 272,284 **** } forall (0\n};) wl ! (static ref _ds *values_[] = {\n) exch ! { exch ws ((ref _ds *)&) ws wt (,\n) } forall pop (\n};) wl ! (\tstatic cfont_dict_keys keys_ =) wl (\t { 0, 0, str_keys_, countof\(str_keys_\) - 1, 1, ) ws dup wpa (, ) ws wva ( };) wl (\tcode = cfont_ref_dict_create\(&) ws wt ! (, &keys_, values_\);) wl (\tif (code < 0) return code;) wl (}) wl --- 272,284 ---- } forall (0\n};) wl ! (static const ref _ds *values_[] = {\n) exch ! { exch ws ((const ref _ds *)&) ws wt (,\n) } forall pop (\n};) wl ! (\tstatic const cfont_dict_keys keys_ =) wl (\t { 0, 0, str_keys_, countof\(str_keys_\) - 1, 1, ) ws dup wpa (, ) ws wva ( };) wl (\tcode = cfont_ref_dict_create\(&) ws wt ! (, &keys_, &values_[0]\);) wl (\tif (code < 0) return code;) wl (}) wl *************** *** 291,295 **** { % Keys present in StandardEncoding or ISOLatin1Encoding 2 index ! (static charindex enc_keys_[] = {) wl 0 exch { pop decoding 1 index known --- 291,295 ---- { % Keys present in StandardEncoding or ISOLatin1Encoding 2 index ! (static const charindex enc_keys_[] = {) wl 0 exch { pop decoding 1 index known *************** *** 305,309 **** % Other keys 2 index ! (static char _ds *str_keys_[] = {) wl { pop decoding 1 index known { pop --- 305,309 ---- % Other keys 2 index ! (static const char _ds *str_keys_[] = {) wl { pop decoding 1 index known { pop *************** *** 317,321 **** (\t0\n};) wl % Values, with those corresponding to stdkeys first. ! (static ) ws 1 index ws 2 index ( values_[] = {\n) exch --- 317,321 ---- (\t0\n};) wl % Values, with those corresponding to stdkeys first. ! (static const ) ws 1 index ws 2 index ( values_[] = {\n) exch *************** *** 335,339 **** (\n};) wl % Actual creation code ! (static cfont_dict_keys keys_ = {) wl (\tenc_keys_, countof\(enc_keys_\) - 1,) wl (\tstr_keys_, countof\(str_keys_\) - 1, 0, ) ws --- 335,339 ---- (\n};) wl % Actual creation code ! (static const cfont_dict_keys keys_ = {) wl (\tenc_keys_, countof\(enc_keys_\) - 1,) wl (\tstr_keys_, countof\(str_keys_\) - 1, 0, ) ws *************** *** 341,345 **** dup wpa (, ) ws wva () wl (};) wl ! (\tcode = cfont_) ws ws (_dict_create\(&) ws ws (, &keys_, values_\);) wl (\tif ( code < 0 ) return code;) wl } bind def --- 341,345 ---- dup wpa (, ) ws wva () wl (};) wl ! (\tcode = cfont_) ws ws (_dict_create\(&) ws ws (, &keys_, &values_[0]\);) wl (\tif ( code < 0 ) return code;) wl } bind def *************** *** 446,450 **** { exch pop charmap 1 index 3 index put ! (static char cs) ws 1 index wt ([] = ) ws wcca (;) wl 1 add } forall pop --- 446,450 ---- { exch pop charmap 1 index 3 index put ! (static const char cs) ws 1 index wt ([] = ) ws wcca (;) wl 1 add } forall pop *************** *** 468,472 **** % Write out the Encoding vector, if it isn't standard. encodingnames Encoding known not ! { (\t{ static char _ds *str_elts_[] = {\n) Encoding { exch ws wtstring cvs wcs % OK, character names are short --- 468,472 ---- % Write out the Encoding vector, if it isn't standard. encodingnames Encoding known not ! { (\t{ static const char _ds *str_elts_[] = {\n) Encoding { exch ws wtstring cvs wcs % OK, character names are short diff -rc2N gs24/fonts.doc gs241/fonts.doc *** gs24/fonts.doc Tue Mar 24 16:12:08 1992 --- gs241/fonts.doc Mon Apr 6 15:40:42 1992 *************** *** 179,185 **** Add ccfonts.dev on the end, e.g., FEATURE_DEVS=filter.dev dps.dev ccfonts.dev - (In some beta versions of Ghostscript 2.4, there is another macro called - FEATURES; if you have such a version, edit FEATURES in the corresponding - way.) Next, you must add the specific fonts to the generic makefile. On MS-DOS --- 179,182 ---- diff -rc2N gs24/fonts.mak gs241/fonts.mak *** gs24/fonts.mak Sun Nov 24 11:21:18 1991 --- gs241/fonts.mak Wed Apr 8 18:30:04 1992 *************** *** 36,40 **** # the uniqueID values in this file are all multiples of 10. # To avoid some conflicts with Adobe's numbering scheme, the uniqueID ! # values in this file all lie between 4200000 and 4299999. # The uniqueID is also used only when converting the font. # The algorithm for computing the UniqueID is given below. --- 36,40 ---- # the uniqueID values in this file are all multiples of 10. # To avoid some conflicts with Adobe's numbering scheme, the uniqueID ! # values in this file all lie between 4000000 and 4999999. # The uniqueID is also used only when converting the font. # The algorithm for computing the UniqueID is given below. *************** *** 355,359 **** # ---------------- Zapf Chancery ---------------- ! ZapfChancery: $(FONTS)/zcr.gsf $(FONTS)/zcro.gsf $(FONTS)/zcb.gsf $(FONTS)/zcr.gsf: $(BDF)/zcr24.bdf $(AFM)/ZapfChancery-Roman.afm --- 355,360 ---- # ---------------- Zapf Chancery ---------------- ! ZapfChancery: $(FONTS)/zcr.gsf $(FONTS)/zcri.gsf $(FONTS)/zcro.gsf \ ! $(FONTS)/zcb.gsf $(FONTS)/zcr.gsf: $(BDF)/zcr24.bdf $(AFM)/ZapfChancery-Roman.afm *************** *** 360,363 **** --- 361,369 ---- bdftops $(BDF)/zcr24.bdf $(AFM)/ZapfChancery-Roman.afm \ $(FONTS)/zcr.gsf ZapfChancery 4070000 + + # We fake italic with oblique, but use the italic metrics. + $(FONTS)/zcri.gsf: $(BDF)/zcro24.bdf $(AFM)/ZapfChancery-MediumItalic.afm + bdftops $(BDF)/zcro24.bdf $(AFM)/ZapfChancery-MediumItalic.afm \ + $(FONTS)/zcro.gsf ZapfChancery-MediumItalic 4070100 $(FONTS)/zcro.gsf: $(BDF)/zcro24.bdf $(AFM)/ZapfChancery-MediumItalic.afm diff -rc2N gs24/gcc-head.mak gs241/gcc-head.mak *** gs24/gcc-head.mak Wed Mar 25 10:23:56 1992 --- gs241/gcc-head.mak Fri Apr 10 05:46:10 1992 *************** *** 1,3 **** ! # Copyright (C) 1989, 1990, 1991 Aladdin Enterprises. All rights reserved. # Distributed by Free Software Foundation, Inc. # --- 1,3 ---- ! # Copyright (C) 1989, 1992 Aladdin Enterprises. All rights reserved. # Distributed by Free Software Foundation, Inc. # *************** *** 19,22 **** --- 19,23 ---- # makefile for Ghostscript, Unix/gcc/X11 configuration. + # Note: this makefile assumes you are using gcc in ANSI mode. # ------------------------------- Options ------------------------------- # *************** *** 59,67 **** # Add -DBSD4_2 for 4.2bsd systems. # Add -DUSG (GNU convention) or -DSYSV for System V or DG/UX. ! # Add -DSYSV -D__SVR3 for SCO ODT. # Add -DSVR4 (not -DSYSV) for System V release 4. # XCFLAGS can be set from the command line. # We don't include -ansi, because this gets in the way of the platform- ! # specific stuff that typically needs. CFLAGS=-g -O $(XCFLAGS) --- 60,70 ---- # Add -DBSD4_2 for 4.2bsd systems. # Add -DUSG (GNU convention) or -DSYSV for System V or DG/UX. ! # Add -DSYSV -D__SVR3 for SCO ODT, ISC Unix 2.2 or before, ! # or any System III Unix, or System V release 3-or-older Unix. # Add -DSVR4 (not -DSYSV) for System V release 4. # XCFLAGS can be set from the command line. # We don't include -ansi, because this gets in the way of the platform- ! # specific stuff that typically needs; nevertheless, we expect ! # gcc to accept ANSI-style function prototypes and function definitions. CFLAGS=-g -O $(XCFLAGS) diff -rc2N gs24/gconfig.c gs241/gconfig.c *** gs24/gconfig.c Thu Mar 5 02:51:00 1992 --- gs241/gconfig.c Tue Apr 21 05:17:20 1992 *************** *** 1,3 **** ! /* Copyright (C) 1989, 1990, 1991 Aladdin Enterprises. All rights reserved. Distributed by Free Software Foundation, Inc. --- 1,3 ---- ! /* Copyright (C) 1989, 1992 Aladdin Enterprises. All rights reserved. Distributed by Free Software Foundation, Inc. *************** *** 20,24 **** /* gconfig.c */ /* Installed device table for Ghostscript */ ! #include "gs.h" /* * Since we only declare variables of type gx_device *, --- 20,24 ---- /* gconfig.c */ /* Installed device table for Ghostscript */ ! #include "ghost.h" /* * Since we only declare variables of type gx_device *, *************** *** 28,31 **** --- 28,37 ---- */ #include "gxdevice.h" + /* + * We generate an array of strings as a static structure: + */ + #define ref_(t) struct { struct tas_s tas; t value; } + #define string_v(n,s)\ + { {(t_string<Clear_code = (1 << bits); + pe->file = file; + pe->byte_count = 1; + pe->output_bit_count = 0; + pe->output_bit_buffer = 0; + pe->table = (code_entry *)gs_malloc(TABLE_SIZE, sizeof(code_entry), "GIF code table"); + + if ( pe->table == 0 ) + return gs_error_VMerror; /* can't allocate buffers */ + + lzw_reset(pe); + pe->string_code = 0; + return 0; + } + /* Establish the width of the code in bits */ + private void + lzw_set_bits(register lzw_encoder _ss *pe, int bits) + { pe->bits = bits; + pe->Max_Code = (1 << (bits+1)) - 1; + } + /* Reset the encoding table */ + private void + lzw_reset(register lzw_encoder _ss *pe) + { int index; + for ( index = 0; index < TABLE_SIZE; index++ ) + pe->table[index].code_value = -1; + pe->next_code = pe->Clear_code + 2; + } + + /* Put out (data) of length (bits) to GIF buffer */ + private void + lzw_putc(register lzw_encoder _ss *pe, uint data) + { int bits = pe->bits + 1; /* output width */ + ulong buffer = pe->output_bit_buffer | ((ulong)data << pe->output_bit_count); + pe->output_bit_count += bits; + while ( pe->output_bit_count >= 8 ) + { /* putc(output_bit_buffer >> 24, file); */ + pe->gif_buffer[pe->byte_count] = (byte)buffer; /* low byte */ + buffer >>= 8; + pe->output_bit_count -= 8; + pe->byte_count++; + if ( pe->byte_count == 256 ) + { pe->byte_count = 1; + pe->gif_buffer[0] = 255; /* byte count for block */ + fwrite(pe->gif_buffer, 1, 256, pe->file); + } + } + pe->output_bit_buffer = (byte)buffer; + } + + /* Finish encoding, and flush the buffers. */ + private void + lzw_finish(register lzw_encoder _ss *pe) + { lzw_putc(pe, pe->string_code); /* output last code */ + lzw_putc(pe, pe->Clear_code+1); /* output eof code */ + lzw_putc(pe, 0); /* force out last code */ + if ( pe->byte_count != 1 ) + { pe->gif_buffer[0] = pe->byte_count; + fwrite(pe->gif_buffer, 1, pe->byte_count+1, pe->file); + } + } + + /* Terminate LZW encoder. */ + private void + lzw_exit(register lzw_encoder _ss *pe) + { gs_free((char *)pe->table, TABLE_SIZE, sizeof(code_entry), "GIF code table"); + } + + /* Get the next (depth) bits from the pixel buffer. */ + private uint + lzw_getc(pixel_reader _ss *pr, uint depth) + { if ( pr->bits_left < depth ) + { pr->bit_buffer <<= 8; + pr->bit_buffer |= *(pr->next++); + pr->bits_left += 8; + } + pr->bits_left -= depth; + return (pr->bit_buffer >> pr->bits_left) & ((1 << depth) - 1); + } + + /* Output 1 row of data in GIF (LZW) format. */ + private void + lzw(byte *from, byte *end, register lzw_encoder _ss *pe, byte depth) + { pixel_reader reader; + /* Set up the reader. */ + reader.next = from; + reader.bits_left = 0; + + if ( pe->next_code == (pe->Clear_code + 2)) /* first time through */ + { pe->string_code = lzw_getc(&reader, depth); + } + + while ( reader.next < end || reader.bits_left >= depth ) + { uint data = lzw_getc(&reader, depth); /* actually only a byte */ + + /* Hash to find a match for the prefix+char */ + /* string in the string table */ + + ushort hash_prefix = pe->string_code; + int index = (data << 4) ^ hash_prefix; + int hash_offset; + register code_entry *pce; + + if ( index == 0 ) + hash_offset = 1; + else + hash_offset = TABLE_SIZE - index; + + while ( 1 ) + { pce = &pe->table[index]; + if ( pce->code_value == -1 ) + break; + if ( pce->prefix_code == hash_prefix && + pce->append_character == data ) + break; + index -= hash_offset; + if ( index < 0 ) + index += TABLE_SIZE; + } + if ( pce->code_value != -1 ) + pe->string_code = pce->code_value; + else + { /* Make a new entry */ + pce->code_value = pe->next_code++; + pce->prefix_code = pe->string_code; + pce->append_character = data; + + lzw_putc(pe, pe->string_code); + + if ( pe->next_code > (pe->Max_Code + 1) ) + { /* Increment the width of the code */ + if ( pe->bits+1 >= MAX_BITS ) + { /* output clear code first*/ + lzw_putc(pe, pe->Clear_code); + pe->bits = (depth == 1 ? 2 : depth); + lzw_reset(pe); + } + else + pe->bits++; + lzw_set_bits(pe, pe->bits); + } + pe->string_code = data; + } + } + } + + + /* Write a page to a file in GIF format. */ + int + gif_print_page(gx_device_printer *pdev, FILE *file) + { int raster = gdev_prn_bytes_per_scan_line(pdev); + int height = pdev->height; + int depth = pdev->color_info.depth; + byte *row = (byte *)gs_malloc(raster * 2, 1, "gif file buffer"); + byte *end = row + raster; + gif_header header; + image_descriptor header_desc; + lzw_encoder encoder; + int y; + int code = 0; /* return code */ + + if ( row == 0 ) /* can't allocate row buffer */ + return gs_error_VMerror; + code = lzw_init(&encoder, (depth == 1 ? 2 : depth), file); + if ( code < 0 ) + return code; + + /* Set up the header. */ + + memcpy(header.signature, "GIF", 3); + memcpy(header.version, "87a", 3); + header.width = raster * (8/depth); /*pdev->width;*/ + /* for most decoders the */ + /* width must be on byte */ + /* boundry */ + header.height = height; + /* header.flags.globalcolor = TRUE; */ + /* header.flags.colorres = depth-1; */ + /* header.flags.sort = FALSE; */ + /* header.flags.colorsize = depth-1; */ + header.flags = + (1 << globalcolor_shift) + + ((depth - 1) << colorres_shift) + + (0 << sort_shift) + + ((depth - 1) << colorsize_shift); + header.background = 0; + header.aspect = 0; + + /* Write the header. */ + + if ( fwrite(&header, 1, 13, file) < 13 ) + { code = gs_error_ioerror; + goto gif_done; + } + + /* Write the header global color palette. */ + + if ( pc_write_palette((gx_device *)pdev, 1 << depth, file) < 0 ) + { code = gs_error_ioerror; + goto gif_done; + } + + header_desc.left_pos = 0; + header_desc.top_pos = 0; + header_desc.width = raster * (8/depth); /*pdev->width;*/ + header_desc.height = height; + /* header_desc.flags.localcolor = FALSE; */ + /* header_desc.flags.interlace = FALSE; */ + /* header_desc.flags.sort = FALSE; */ + /* header_desc.flags.localsize = 0; */ + + header_desc.flags = 0; + + /* Write the header image descriptor. */ + + fputc(0x2c,file); /* start with separator */ + if ( fwrite(&header_desc, 1, 9, file) < 9 ) + { code = gs_error_ioerror; + goto gif_done; + } + + fflush(file); + + printf("The Graphics Interchange Format(c) is \n"); + printf("the Copyright Property of CompuServe Incorporated.\n"); + printf("GIF(sm) is a Service Mark property of CompuServe Incorporated\n"); + + fputc(encoder.bits, file); /* start with code size */ + + lzw_putc(&encoder, encoder.Clear_code); /* output clear code first*/ + + /* Dump the contents of the image. */ + for ( y = 0; y < height; y++ ) + { gdev_prn_copy_scan_lines(pdev, y, row, raster); + lzw(row, end, &encoder, depth); + } + + lzw_finish(&encoder); + fputc(0, file); + fputc(0x3b, file); /* EOF indicator */ + + gif_done: + lzw_exit(&encoder); + gs_free((char *)row, raster * 2, 1, "gif file buffer"); + return code; + } diff -rc2N gs24/gdevmem.h gs241/gdevmem.h *** gs24/gdevmem.h Sat Mar 21 16:57:16 1992 --- gs241/gdevmem.h Tue Mar 31 03:40:42 1992 *************** *** 146,150 **** #define cbit_mask(ct) (cbits(ct)-1) # define chunk_bit_mask cbit_mask(chunk) ! #define cmask(ct) ((ct)~(ct)0) # define chunk_all_bits cmask(chunk) /* --- 146,161 ---- #define cbit_mask(ct) (cbits(ct)-1) # define chunk_bit_mask cbit_mask(chunk) ! /* ! * The obvious definition for cmask is: ! * #define cmask(ct) ((ct)~(ct)0) ! * but this doesn't work on the VAX/VMS compiler, which fails to truncate ! * the value to 16 bits when ct is ushort. ! * Instead, we have to generate the mask with no extra 1-bits. ! * We can't do this in the obvious way: ! * #define cmask(ct) ((1 << (sizeof(ct) * 8)) - 1) ! * because some compilers won't allow a shift of 32 bits. Instead, ! * we have to do something really awkward: ! */ ! #define cmask(ct) ((ct) (((((ct)1 << (sizeof(ct)*8-2)) - 1) << 2) + 3)) # define chunk_all_bits cmask(chunk) /* diff -rc2N gs24/gdevmem1.c gs241/gdevmem1.c *** gs24/gdevmem1.c Wed Mar 25 12:39:02 1992 --- gs241/gdevmem1.c Wed Apr 15 05:18:24 1992 *************** *** 43,46 **** --- 43,48 ---- { case 1: return &mem_mono_device; + case 2: return &mem_mapped2_color_device; + case 4: return &mem_mapped4_color_device; case 8: return &mem_mapped8_color_device; case 16: return &mem_true16_color_device; *************** *** 55,59 **** /* Note that scan lines are padded to a multiple of 4 bytes. */ ulong ! gdev_mem_bitmap_size(const gx_device_memory *dev) { unsigned raster = ((dev->width * dev->color_info.depth + 31) >> 5) << 2; --- 57,61 ---- /* Note that scan lines are padded to a multiple of 4 bytes. */ ulong ! gdev_mem_bitmap_size(gx_device_memory *dev) { unsigned raster = ((dev->width * dev->color_info.depth + 31) >> 5) << 2; *************** *** 98,102 **** /* because we might be tracing. Compare the device name, */ /* and hope for the best. */ ! char *name = dev->dname; int i; for ( i = 0; i < 6; i++ ) --- 100,104 ---- /* because we might be tracing. Compare the device name, */ /* and hope for the best. */ ! const char *name = dev->dname; int i; for ( i = 0; i < 6; i++ ) *************** *** 328,332 **** dbit = x & chunk_bit_mask; skew = dbit - (sourcex & chunk_bit_mask); ! mask = chunk_all_bits >> dbit; /* Macros for writing partial chunks. */ /* The destination pointer is always named optr, */ --- 330,338 ---- dbit = x & chunk_bit_mask; skew = dbit - (sourcex & chunk_bit_mask); ! /* We have to split the following statement */ ! /* into two because of a bug in the DEC */ ! /* VAX/VMS C compiler. */ ! mask = chunk_all_bits; ! mask >>= dbit; /* Macros for writing partial chunks. */ /* The destination pointer is always named optr, */ diff -rc2N gs24/gdevmem2.c gs241/gdevmem2.c *** gs24/gdevmem2.c Fri Mar 6 01:45:06 1992 --- gs241/gdevmem2.c Sat Apr 11 08:42:32 1992 *************** *** 1,3 **** ! /* Copyright (C) 1989, 1990, 1991, 1992 Aladdin Enterprises. All rights reserved. Distributed by Free Software Foundation, Inc. --- 1,3 ---- ! /* Copyright (C) 1989, 1992 Aladdin Enterprises. All rights reserved. Distributed by Free Software Foundation, Inc. *************** *** 19,23 **** /* gdevmem2.c */ ! /* Polybit "memory" (stored bitmap) devices for Ghostscript library. */ #include "memory_.h" #include "gs.h" --- 19,24 ---- /* gdevmem2.c */ ! /* 8-and-more-bit-per-pixel "memory" (stored bitmap) devices */ ! /* for Ghostscript library. */ #include "memory_.h" #include "gs.h" *************** *** 44,69 **** } - /* ------ Mapped 8-bit color ------ */ - - /* Procedures */ - declare_mem_map_procs(mem_mapped_map_rgb_color, mem_mapped_map_color_rgb); - declare_mem_procs(mem_mapped8_copy_mono, mem_mapped8_copy_color, mem_mapped8_fill_rectangle); - - /* The device descriptor. */ - private gx_device_procs mem_mapped8_procs = - mem_procs(mem_mapped_map_rgb_color, mem_mapped_map_color_rgb, - mem_mapped8_copy_mono, mem_mapped8_copy_color, mem_mapped8_fill_rectangle); - - /* The instance is public. */ - gx_device_memory mem_mapped8_color_device = - mem_device("image(8)", 8, mem_mapped8_procs); - - /* Convert x coordinate to byte offset in scan line. */ - #undef x_to_byte - #define x_to_byte(x) (x) - /* Map a r-g-b color to a color index. */ /* This requires searching the palette. */ ! private gx_color_index mem_mapped_map_rgb_color(gx_device *dev, gx_color_value r, gx_color_value g, gx_color_value b) --- 45,51 ---- } /* Map a r-g-b color to a color index. */ /* This requires searching the palette. */ ! gx_color_index mem_mapped_map_rgb_color(gx_device *dev, gx_color_value r, gx_color_value g, gx_color_value b) *************** *** 94,98 **** /* Map a color index to a r-g-b color. */ ! private int mem_mapped_map_color_rgb(gx_device *dev, gx_color_index color, gx_color_value prgb[3]) --- 76,80 ---- /* Map a color index to a r-g-b color. */ ! int mem_mapped_map_color_rgb(gx_device *dev, gx_color_index color, gx_color_value prgb[3]) *************** *** 104,107 **** --- 86,107 ---- } + /* ------ Mapped 8-bit color ------ */ + + /* Procedures */ + declare_mem_procs(mem_mapped8_copy_mono, mem_mapped8_copy_color, mem_mapped8_fill_rectangle); + + /* The device descriptor. */ + private gx_device_procs mem_mapped8_procs = + mem_procs(mem_mapped_map_rgb_color, mem_mapped_map_color_rgb, + mem_mapped8_copy_mono, mem_mapped8_copy_color, mem_mapped8_fill_rectangle); + + /* The instance is public. */ + gx_device_memory mem_mapped8_color_device = + mem_device("image(8)", 8, mem_mapped8_procs); + + /* Convert x coordinate to byte offset in scan line. */ + #undef x_to_byte + #define x_to_byte(x) (x) + /* Fill a rectangle with a color. */ private int *************** *** 312,320 **** mem_true_map_rgb_color(gx_device *dev, gx_color_value r, gx_color_value g, gx_color_value b) ! { gx_color_index color = 0; ! color_byte(color, 1) = gx_color_value_to_byte(r); ! color_byte(color, 2) = gx_color_value_to_byte(g); ! color_byte(color, 3) = gx_color_value_to_byte(b); ! return color; } --- 312,318 ---- mem_true_map_rgb_color(gx_device *dev, gx_color_value r, gx_color_value g, gx_color_value b) ! { return gx_color_value_to_byte(b) + ! ((uint)gx_color_value_to_byte(g) << 8) + ! ((ulong)gx_color_value_to_byte(r) << 16); } *************** *** 323,329 **** mem_true_map_color_rgb(gx_device *dev, gx_color_index color, gx_color_value prgb[3]) ! { prgb[0] = gx_color_value_from_byte(color_byte(color, 1)); ! prgb[1] = gx_color_value_from_byte(color_byte(color, 2)); ! prgb[2] = gx_color_value_from_byte(color_byte(color, 3)); return 0; } --- 321,327 ---- mem_true_map_color_rgb(gx_device *dev, gx_color_index color, gx_color_value prgb[3]) ! { prgb[0] = gx_color_value_from_byte(color >> 16); ! prgb[1] = gx_color_value_from_byte((color >> 8) & 0xff); ! prgb[2] = gx_color_value_from_byte(color & 0xff); return 0; } *************** *** 348,354 **** /* Unpack a color into its bytes. */ #define declare_unpack_color(r, g, b, color)\ ! byte r = color_byte(color, 1);\ ! byte g = color_byte(color, 2);\ ! byte b = color_byte(color, 3) #define put3(ptr, r, g, b)\ ptr[0] = r, ptr[1] = g, ptr[2] = b --- 346,352 ---- /* Unpack a color into its bytes. */ #define declare_unpack_color(r, g, b, color)\ ! byte r = (byte)(color >> 16);\ ! byte g = (byte)((uint)color >> 8);\ ! byte b = (byte)color #define put3(ptr, r, g, b)\ ptr[0] = r, ptr[1] = g, ptr[2] = b *************** *** 437,440 **** --- 435,447 ---- #define x_to_byte(x) ((x) << 2) + /* Swap the bytes of a color if needed. */ + #if arch_is_big_endian + # define arrange_bytes(color) (color) + #else + # define arrange_bytes(color)\ + (((color) >> 24) + (((color) >> 16) & 0xff00) +\ + (((color) & 0xff00) << 8) + ((color) << 24)) + #endif + /* Fill a rectangle with a color. */ private int *************** *** 441,445 **** mem_true32_fill_rectangle(gx_device *dev, int x, int y, int w, int h, gx_color_index color) ! { declare_scan_ptr(dest); check_rect(); setup_rect(dest); --- 448,453 ---- mem_true32_fill_rectangle(gx_device *dev, int x, int y, int w, int h, gx_color_index color) ! { gx_color_index a_color = arrange_bytes(color); ! declare_scan_ptr(dest); check_rect(); setup_rect(dest); *************** *** 447,451 **** { gx_color_index *pptr = (gx_color_index *)dest; int cnt = w; ! do { *pptr++ = color; } while ( --cnt > 0 ); inc_chunk_ptr(dest, draster); } --- 455,459 ---- { gx_color_index *pptr = (gx_color_index *)dest; int cnt = w; ! do { *pptr++ = a_color; } while ( --cnt > 0 ); inc_chunk_ptr(dest, draster); } *************** *** 458,462 **** byte *base, int sourcex, int sraster, gx_bitmap_id id, int x, int y, int w, int h, gx_color_index zero, gx_color_index one) ! { byte *line; int first_bit; declare_scan_ptr(dest); --- 466,472 ---- byte *base, int sourcex, int sraster, gx_bitmap_id id, int x, int y, int w, int h, gx_color_index zero, gx_color_index one) ! { gx_color_index a_zero = arrange_bytes(zero); ! gx_color_index a_one = arrange_bytes(one); ! byte *line; int first_bit; declare_scan_ptr(dest); *************** *** 474,482 **** { if ( sbyte & bit ) { if ( one != gx_no_color_index ) ! *pptr = one; } else { if ( zero != gx_no_color_index ) ! *pptr = zero; } if ( (bit >>= 1) == 0 ) --- 484,492 ---- { if ( sbyte & bit ) { if ( one != gx_no_color_index ) ! *pptr = a_one; } else { if ( zero != gx_no_color_index ) ! *pptr = a_zero; } if ( (bit >>= 1) == 0 ) diff -rc2N gs24/gdevmem3.c gs241/gdevmem3.c *** gs24/gdevmem3.c --- gs241/gdevmem3.c Sat Mar 28 05:42:48 1992 *************** *** 0 **** --- 1,274 ---- + /* Copyright (C) 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. */ + + /* gdevmem3.c */ + /* 2- and 4-bit-per-pixel "memory" (stored bitmap) devices */ + /* for Ghostscript library. */ + #include "memory_.h" + #include "gs.h" + #include "gxdevice.h" + #include "gxdevmem.h" /* semi-public definitions */ + #include "gdevmem.h" /* private definitions */ + + /* The current implementations are quite inefficient. */ + /* We intend to improve them someday.... */ + + /* ------ Generic procedures ------ */ + + /* We do everything byte-by-byte. */ + #define chunk byte + + /* Import the monobit device from gdevmem1 */ + /* so we can use its procedures. */ + extern gx_device_memory mem_mono_device; + + /* Import the color mapping procedures from gdevmem2. */ + extern dev_proc_map_rgb_color(mem_mapped_map_rgb_color); + extern dev_proc_map_color_rgb(mem_mapped_map_color_rgb); + + /* Implement fill_rectangle by tiling. */ + private int + fill_2or4_by_tiling(gx_device *dev, int scaled_x, int y, int scaled_w, int h, + ulong *ppattern) + { gx_bitmap tile; + tile.data = (byte *)ppattern; + tile.raster = sizeof(ulong); + tile.size.x = sizeof(ulong) * 8, tile.size.y = 1; + tile.id = gx_no_bitmap_id; + tile.rep_width = 1, tile.rep_height = 1; + return (*mem_mono_device.procs->tile_rectangle) + (dev, &tile, scaled_x, y, scaled_w, h, + (gx_color_index)0, (gx_color_index)1, 0, 0); + } + + /* ------ Mapped 2-bit color ------ */ + + /* Procedures */ + declare_mem_procs(mem_mapped2_copy_mono, mem_mapped2_copy_color, mem_mapped2_fill_rectangle); + + /* The device descriptor. */ + private gx_device_procs mem_mapped2_procs = + mem_procs(mem_mapped_map_rgb_color, mem_mapped_map_color_rgb, + mem_mapped2_copy_mono, mem_mapped2_copy_color, mem_mapped2_fill_rectangle); + + /* The instance is public. */ + gx_device_memory mem_mapped2_color_device = + mem_device("image(2)", 2, mem_mapped2_procs); + + /* Convert x coordinate to byte offset in scan line. */ + #undef x_to_byte + #define x_to_byte(x) ((x) >> 2) + + /* Fill a rectangle with a color. */ + private int + mem_mapped2_fill_rectangle(gx_device *dev, + int x, int y, int w, int h, gx_color_index color) + { int code; + check_rect(); + /* Patch the width in the device temporarily. */ + dev->width <<= 1; + if ( color == 0 || color == 3 ) + { /* Use monobit fill_rectangle. */ + code = (*mem_mono_device.procs->fill_rectangle) + (dev, x << 1, y, w << 1, h, color & 1); + } + else + { /* Use monobit tile_rectangle. */ + static ulong tile_patterns[4] = + { 0, 0x55555555, 0xaaaaaaaa, 0xffffffff + }; + code = fill_2or4_by_tiling(dev, x << 1, y, w << 1, h, + &tile_patterns[color]); + } + /* Restore the correct width. */ + dev->width >>= 1; + return code; + } + + /* Copy a bitmap. */ + private int + mem_mapped2_copy_mono(gx_device *dev, + byte *base, int sourcex, int sraster, gx_bitmap_id id, + int x, int y, int w, int h, gx_color_index zero, gx_color_index one) + { byte *line; + int first_bit; + byte first_mask, b0, b1; + static byte btab[4] = { 0, 0x55, 0xaa, 0xff }; + static byte bmask[4] = { 0xc0, 0x30, 0xc, 3 }; + declare_scan_ptr(dest); + check_rect(); + setup_rect(dest); + line = base + (sourcex >> 3); + first_bit = 0x80 >> (sourcex & 7); + first_mask = bmask[x & 3]; + b0 = btab[zero & 3]; + b1 = btab[one & 3]; + while ( h-- > 0 ) + { register byte *pptr = (byte *)dest; + byte *sptr = line; + register int sbyte = *sptr++; + register int bit = first_bit; + register byte mask = first_mask; + int count = w; + do + { if ( sbyte & bit ) + { if ( one != gx_no_color_index ) + *pptr = (*pptr & ~mask) + (b1 & mask); + } + else + { if ( zero != gx_no_color_index ) + *pptr = (*pptr & ~mask) + (b0 & mask); + } + if ( (bit >>= 1) == 0 ) + bit = 0x80, sbyte = *sptr++; + mask = (mask << 6) + (mask >> 2); + pptr++; + } + while ( --count > 0 ); + line += sraster; + inc_chunk_ptr(dest, draster); + } + return 0; + } + + /* Copy a color bitmap. */ + private int + mem_mapped2_copy_color(gx_device *dev, + byte *base, int sourcex, int sraster, gx_bitmap_id id, + int x, int y, int w, int h) + { int code; + check_rect(); + /* Use monobit copy_mono. */ + /* Patch the width in the device temporarily. */ + dev->width <<= 1; + code = (*mem_mono_device.procs->copy_mono) + (dev, base, sourcex << 1, sraster, id, + x << 1, y, w << 1, h, (gx_color_index)0, (gx_color_index)1); + /* Restore the correct width. */ + dev->width >>= 1; + return code; + } + + /* ------ Mapped 4-bit color ------ */ + + /* Procedures */ + declare_mem_procs(mem_mapped4_copy_mono, mem_mapped4_copy_color, mem_mapped4_fill_rectangle); + + /* The device descriptor. */ + private gx_device_procs mem_mapped4_procs = + mem_procs(mem_mapped_map_rgb_color, mem_mapped_map_color_rgb, + mem_mapped4_copy_mono, mem_mapped4_copy_color, mem_mapped4_fill_rectangle); + + /* The instance is public. */ + gx_device_memory mem_mapped4_color_device = + mem_device("image(4)", 4, mem_mapped4_procs); + + /* Convert x coordinate to byte offset in scan line. */ + #undef x_to_byte + #define x_to_byte(x) ((x) >> 1) + + /* Fill a rectangle with a color. */ + private int + mem_mapped4_fill_rectangle(gx_device *dev, + int x, int y, int w, int h, gx_color_index color) + { int code; + check_rect(); + /* Patch the width in the device temporarily. */ + dev->width <<= 2; + if ( color == 0 || color == 15 ) + { /* Use monobit fill_rectangle. */ + code = (*mem_mono_device.procs->fill_rectangle) + (dev, x << 2, y, w << 2, h, color & 1); + } + else + { /* Use monobit tile_rectangle. */ + static ulong tile_patterns[16] = + { 0, 0x11111111, 0x22222222, 0x33333333, + 0x44444444, 0x55555555, 0x66666666, 0x77777777, + 0x88888888, 0x99999999, 0xaaaaaaaa, 0xbbbbbbbb, + 0xcccccccc, 0xdddddddd, 0xeeeeeeee, 0xffffffff + }; + code = fill_2or4_by_tiling(dev, x << 2, y, w << 2, h, + &tile_patterns[color]); + } + dev->width >>= 2; + return code; + } + + /* Copy a bitmap. */ + private int + mem_mapped4_copy_mono(gx_device *dev, + byte *base, int sourcex, int sraster, gx_bitmap_id id, + int x, int y, int w, int h, gx_color_index zero, gx_color_index one) + { byte *line; + int first_bit; + byte first_mask, b0, b1; + declare_scan_ptr(dest); + check_rect(); + setup_rect(dest); + line = base + (sourcex >> 3); + first_bit = 0x80 >> (sourcex & 7); + first_mask = (x & 1 ? 0xf : 0xf0); + b0 = ((byte)zero << 4) + (byte)zero; + b1 = ((byte)one << 4) + (byte)one; + while ( h-- > 0 ) + { register byte *pptr = (byte *)dest; + byte *sptr = line; + register int sbyte = *sptr++; + register int bit = first_bit; + register byte mask = first_mask; + int count = w; + do + { if ( sbyte & bit ) + { if ( one != gx_no_color_index ) + *pptr = (*pptr & ~mask) + (b1 & mask); + } + else + { if ( zero != gx_no_color_index ) + *pptr = (*pptr & ~mask) + (b0 & mask); + } + if ( (bit >>= 1) == 0 ) + bit = 0x80, sbyte = *sptr++; + mask = ~mask; + pptr++; + } + while ( --count > 0 ); + line += sraster; + inc_chunk_ptr(dest, draster); + } + return 0; + } + + /* Copy a color bitmap. */ + private int + mem_mapped4_copy_color(gx_device *dev, + byte *base, int sourcex, int sraster, gx_bitmap_id id, + int x, int y, int w, int h) + { int code; + check_rect(); + /* Use monobit copy_mono. */ + /* Patch the width in the device temporarily. */ + dev->width <<= 2; + code = (*mem_mono_device.procs->copy_mono) + (dev, base, sourcex << 2, sraster, id, + x << 2, y, w << 2, h, (gx_color_index)0, (gx_color_index)1); + /* Restore the correct width. */ + dev->width >>= 2; + return code; + } diff -rc2N gs24/gdevpbm.c gs241/gdevpbm.c *** gs24/gdevpbm.c --- gs241/gdevpbm.c Sun Apr 12 14:53:38 1992 *************** *** 0 **** --- 1,347 ---- + /* Copyright (C) 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. */ + + /* gdevpbm.c */ + /* Portable Bit/Gray/PixMap devices for Ghostscript. */ + #include "gdevprn.h" + #include "gxlum.h" + + /* Thanks are due to Jos Vos (jos@bull.nl) for an earlier P*M driver, */ + /* on which this one is based. */ + + /* Structure for P*M devices, which extend the generic printer device. */ + + #define MAX_COMMENT 70 /* max user-supplied comment */ + struct gx_device_pbm_s { + gx_device_common; + gx_prn_device_common; + /* Additional state for P*M devices */ + const char *magic; /* "Pn" */ + char comment[MAX_COMMENT + 1]; /* comment for head of file */ + byte is_raw; /* 1 if raw format, 0 if plain */ + byte is_pbm; /* 1 if bitmap, 0 if gray or pixmap */ + }; + typedef struct gx_device_pbm_s gx_device_pbm; + + /* ------ The device descriptors ------ */ + + /* + * Standard U.S. page width and height. A4 paper is 8.4" x 11.7". + */ + #define WIDTH_10THS 85 + #define HEIGHT_10THS 110 + + /* + * Default X and Y resolution. + */ + #define X_DPI 72 + #define Y_DPI 72 + + /* Macro for generating P*M device descriptors. */ + #define pbm_prn_device(procs, dev_name, magic, is_raw, num_comp, depth, max_gray, max_rgb, print_page)\ + { prn_device_body(gx_device_pbm, procs, dev_name,\ + WIDTH_10THS, HEIGHT_10THS, X_DPI, Y_DPI,\ + 0, 0, 0, 0,\ + num_comp, depth, max_gray, max_rgb, max_gray + 1, max_rgb + 1,\ + print_page),\ + magic,\ + { 0 },\ + is_raw,\ + (depth == 1)\ + } + + /* For all PBM variants we do some extra things at opening time. */ + /* private dev_proc_open_device(gdev_pbm_open); */ + #define gdev_pbm_open gdev_prn_open /* no we don't! */ + + /* For PGM and PPM we need our own color mapping procedures. */ + private dev_proc_map_rgb_color(pgm_map_rgb_color); + private dev_proc_map_rgb_color(ppm_map_rgb_color); + private dev_proc_map_color_rgb(pgm_map_color_rgb); + private dev_proc_map_color_rgb(ppm_map_color_rgb); + + /* And of course we need our own print-page routines. */ + private dev_proc_print_page(pbm_print_page); + private dev_proc_print_page(pbm_raw_print_page); + private dev_proc_print_page(pgm_print_page); + private dev_proc_print_page(ppm_print_page); + + /* The device procedures */ + private gx_device_procs pbm_procs = + prn_procs(gdev_pbm_open, gdev_prn_output_page, gdev_prn_close); + private gx_device_procs pgm_procs = + prn_color_procs(gdev_pbm_open, gdev_prn_output_page, gdev_prn_close, + pgm_map_rgb_color, pgm_map_color_rgb); + private gx_device_procs ppm_procs = + prn_color_procs(gdev_pbm_open, gdev_prn_output_page, gdev_prn_close, + ppm_map_rgb_color, ppm_map_color_rgb); + + /* The device descriptors themselves */ + gx_device_pbm gs_pbm_device = + pbm_prn_device(pbm_procs, "pbm", "P1", 0, 1, 1, 1, 0, + pbm_print_page); + gx_device_pbm gs_pbmraw_device = + pbm_prn_device(pbm_procs, "pbmraw", "P4", 1, 1, 1, 1, 1, + pbm_raw_print_page); + gx_device_pbm gs_pgm_device = + pbm_prn_device(pgm_procs, "pgm", "P2", 0, 1, 8, 255, 0, + pgm_print_page); + gx_device_pbm gs_pgmraw_device = + pbm_prn_device(pgm_procs, "pgmraw", "P5", 1, 1, 8, 255, 0, + pgm_print_page); + gx_device_pbm gs_ppm_device = + pbm_prn_device(ppm_procs, "ppm", "P3", 0, 3, 24, 255, 255, + ppm_print_page); + gx_device_pbm gs_ppmraw_device = + pbm_prn_device(ppm_procs, "ppmraw", "P6", 1, 3, 24, 255, 255, + ppm_print_page); + + /* ------ Color mapping routines ------ */ + + /* Map an RGB color to a PGM gray value. */ + private gx_color_index + pgm_map_rgb_color(gx_device *dev, ushort r, ushort g, ushort b) + { /* We round the value rather than truncating it. */ + return ((r * (ulong)lum_red_weight) + + (g * (ulong)lum_green_weight) + + (b * (ulong)lum_blue_weight) + + (lum_all_weights / 2)) + / lum_all_weights * dev->color_info.max_gray / gx_max_color_value; + } + + /* Map a PGM gray value back to an RGB color. */ + private int + pgm_map_color_rgb(gx_device *dev, gx_color_index color, ushort prgb[3]) + { gx_color_value gray = + color * gx_max_color_value / dev->color_info.max_gray; + prgb[0] = gray; + prgb[1] = gray; + prgb[2] = gray; + return 0; + } + + /* Map an RGB color to a PPM color tuple. */ + private gx_color_index + ppm_map_rgb_color(gx_device *dev, ushort r, ushort g, ushort b) + { ushort bitspercolor = dev->color_info.depth / 3; + ulong max_value = (1 << bitspercolor) - 1; + return ((r * max_value / gx_max_color_value) << (bitspercolor * 2)) + + ((g * max_value / gx_max_color_value) << bitspercolor) + + (b * max_value / gx_max_color_value); + } + + /* Map a PPM color tuple back to an RGB color. */ + private int + ppm_map_color_rgb(gx_device *dev, gx_color_index color, ushort prgb[3]) + { ushort bitspercolor = dev->color_info.depth / 3; + ushort colormask = (1 << bitspercolor) - 1; + + prgb[0] = ((color >> (bitspercolor * 2)) & colormask) * + (ulong)gx_max_color_value / colormask; + prgb[1] = ((color >> bitspercolor) & colormask) * + (ulong)gx_max_color_value / colormask; + prgb[2] = (color & colormask) * + (ulong)gx_max_color_value / colormask; + return 0; + } + + /* ------ Internal routines ------ */ + + /* Define a "cursor" that keeps track of where we are in the page. */ + typedef struct pbm_cursor_s { + gx_device_pbm *dev; + int bpp; /* bits per pixel */ + uint line_size; /* bytes per scan line */ + byte *data; /* output row buffer */ + int lnum; /* row within page */ + } pbm_cursor; + + /* Begin a P*M output page. */ + /* Write the header information and initialize the cursor. */ + private int + pbm_begin_page(gx_device_pbm *bdev, FILE *pstream, pbm_cursor _ss *pcur) + { uint line_size = + gdev_prn_bytes_per_scan_line((gx_device_printer *)bdev); + byte *data = (byte *)gs_malloc(line_size, 1, "pbm_begin_page"); + if ( data == 0 ) return -1; + fprintf(pstream, "%s\n", bdev->magic); + if ( bdev->comment[0] ) + fprintf(pstream, "# %s\n", bdev->comment); + else + fprintf(pstream, "# Image generated by Ghostscript (device=%s)\n", + bdev->dname); + fprintf(pstream, "%d %d\n", bdev->width, bdev->height); + if ( !bdev->is_pbm ) + fprintf(pstream, "%d\n", bdev->color_info.max_gray); + /* Initialize the cursor. */ + pcur->dev = bdev; + pcur->bpp = bdev->color_info.depth; + pcur->line_size = line_size; + pcur->data = data; + pcur->lnum = 0; + return 0; + } + + /* Advance to the next row. Return 0 if more, 1 if done. */ + private int + pbm_next_row(pbm_cursor _ss *pcur) + { if ( pcur->lnum >= pcur->dev->height ) + { gs_free((char *)pcur->data, pcur->line_size, 1, + "pbm_next_row(done)"); + return 1; + } + gdev_prn_copy_scan_lines((gx_device_printer *)pcur->dev, + pcur->lnum++, pcur->data, pcur->line_size); + return 0; + } + + /* ------ Individual page printing routines ------ */ + + #define bdev ((gx_device_pbm *)pdev) + + /* Print a raw monobit page. */ + private int + pbm_raw_print_page(gx_device_printer *pdev, FILE *pstream) + { /* All the print_page routines have the same structure; */ + /* only the indicated section is different. */ + pbm_cursor cur; + int code = pbm_begin_page(bdev, pstream, &cur); + if ( code < 0 ) return code; + while ( !(code = pbm_next_row(&cur)) ) + { + /* ---- This section changes. ---- */ + + fwrite(cur.data, 1, cur.line_size, pstream); + + /* ---- End of changing section. ---- */ + } + return (code < 0 ? code : 0); + } + + /* Print an ASCII monobit page. */ + private int + pbm_print_page(gx_device_printer *pdev, FILE *pstream) + { pbm_cursor cur; + int code = pbm_begin_page(bdev, pstream, &cur); + if ( code < 0 ) return code; + while ( !(code = pbm_next_row(&cur)) ) + { byte *bp; + uint x, mask; + for ( bp = cur.data, x = 0, mask = 0x80; x < bdev->width; + (mask >>= 1) != 0 || (bp++, mask = 0x80) + ) + { putc((*bp & mask ? '1' : '0'), pstream); + if ( ++x == bdev->width || !(x & 63) ) + putc('\n', pstream); + } + } + return (code < 0 ? code : 0); + } + + /* Print a gray-mapped page. */ + private int + pgm_print_page(gx_device_printer *pdev, FILE *pstream) + { pbm_cursor cur; + int code = pbm_begin_page(bdev, pstream, &cur); + uint mask; + if ( code < 0 ) return code; + /* Note that bpp <= 8 for raw format, bpp <= 16 for plain. */ + mask = (1 << cur.bpp) - 1; + while ( !(code = pbm_next_row(&cur)) ) + { byte *bp; + uint x; + int shift; + for ( bp = cur.data, x = 0, shift = 8 - cur.bpp; + x < bdev->width; + ) + { uint pixel; + if ( shift < 0 ) /* bpp = 16 */ + { pixel = ((uint)*bp << 8) + bp[1]; + bp += 2; + } + else + { pixel = (*bp >> shift) & mask; + if ( (shift -= cur.bpp) < 0 ) + bp++, shift += 8; + } + ++x; + if ( bdev->is_raw ) + putc(pixel, pstream); + else + fprintf(pstream, "%d%c", pixel, + (x == bdev->width || !(x & 15) ? + '\n' : ' ')); + } + } + return (code < 0 ? code : 0); + } + + /* Print a color-mapped page. */ + private int + ppm_print_page(gx_device_printer *pdev, FILE *pstream) + { pbm_cursor cur; + int code = pbm_begin_page(bdev, pstream, &cur); + uint bpe, mask; + if ( code < 0 ) return code; + /* Note that bpp <= 24 for raw format, bpp <= 32 for plain. */ + bpe = cur.bpp / 3; /* bits per r/g/b element */ + mask = (1 << bpe) - 1; + while ( !(code = pbm_next_row(&cur)) ) + { byte *bp; + uint x; + int shift; + for ( bp = cur.data, x = 0, shift = 8 - cur.bpp; + x < bdev->width; + ) + { ulong pixel = 0; + uint r, g, b; + switch ( cur.bpp >> 3 ) + { + case 3: + pixel = (ulong)*bp << 16; bp++; + /* falls through */ + case 2: + pixel += (uint)*bp << 8; bp++; + /* falls through */ + case 1: + pixel += *bp; bp++; + break; + case 0: /* bpp == 4, bpe == 1 */ + pixel = *bp >> shift; + if ( (shift -= cur.bpp) < 0 ) + bp++, shift += 8; + break; + } + ++x; + b = pixel & mask; pixel >>= bpe; + g = pixel & mask; pixel >>= bpe; + r = pixel & mask; + if ( bdev->is_raw ) + { putc(r, pstream); + putc(g, pstream); + putc(b, pstream); + } + else + fprintf(pstream, "%d %d %d%c", r, g, b, + (x == bdev->width || !(x & 7) ? + '\n' : ' ')); + } + } + return (code < 0 ? code : 0); + } diff -rc2N gs24/gdevpccm.c gs241/gdevpccm.c *** gs24/gdevpccm.c --- gs241/gdevpccm.c Sat Apr 18 13:33:34 1992 *************** *** 0 **** --- 1,115 ---- + /* Copyright (C) 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. */ + + /* gdevpccm.c */ + /* Support routines for PC color mapping */ + #include "gs.h" + #include "gsmatrix.h" /* for gxdevice.h */ + #include "gxdevice.h" + #include "gdevpccm.h" /* interface */ + + /* Color mapping routines for EGA/VGA-style color. */ + /* Colors are 4 bits: 8=intensity, 4=R, 2=G, 1=B. */ + + #define black 0 + #define blue 1 + #define green 2 + #define cyan 3 + #define red 4 + #define magenta 5 + #define brown 6 + #define white 7 + #define dgray 8 /* dark gray is not very usable */ + #define lblue 9 + #define lgreen 10 + #define lcyan 11 + #define lred 12 + #define lmagenta 13 + #define yellow 14 + #define bwhite 15 + gx_color_index + pc_4bit_map_rgb_color(gx_device *dev, gx_color_value r, gx_color_value g, + gx_color_value b) + { + #define c13 (gx_max_color_value / 3) + #define c23 (gx_max_color_value - c13) + static byte g0[3][3] = + {{black,blue,lblue},{red,magenta,lmagenta},{lred,lmagenta,lmagenta}}; + static byte g1[3][3] = + {{green,cyan,lcyan},{brown,white,lcyan},{yellow,yellow,lmagenta}}; + static byte g2[3][3] = + {{lgreen,lgreen,lcyan},{lgreen,lgreen,lcyan},{yellow,yellow,bwhite}}; + return (gx_color_index) + ((g >= c23 ? g2 : g >= c13 ? g1 : g0) + [r >= c23 ? 2 : r >= c13 ? 1 : 0] + [b >= c23 ? 2 : b >= c13 ? 1 : 0]); + #undef c13 + #undef c23 + } + int + pc_4bit_map_color_rgb(gx_device *dev, gx_color_index color, + gx_color_value prgb[3]) + { + #define icolor (int)color + gx_color_value one = + (icolor & 8 ? gx_max_color_value : gx_max_color_value / 3); + prgb[0] = (icolor & 4 ? one : 0); + prgb[1] = (icolor & 2 ? one : 0); + prgb[2] = (icolor & 1 ? one : 0); + return 0; + #undef icolor + } + + /* Color mapping routines for 8-bit color with a fixed palette */ + /* (3 bits of R, 3 bits of G, 2 bits of B). */ + + gx_color_index + pc_8bit_map_rgb_color(gx_device *dev, gx_color_value r, gx_color_value g, + gx_color_value b) + { return (gx_color_index) + (((r >> (gx_color_value_bits - 3)) << 5) + + ((g >> (gx_color_value_bits - 3)) << 2) + + ((b >> (gx_color_value_bits - 2)))); + } + int + pc_8bit_map_color_rgb(gx_device *dev, gx_color_index color, + gx_color_value prgb[3]) + { + #define icolor (uint)color + prgb[0] = ((icolor >> 5) & 7) * (gx_max_color_value / 7); + prgb[1] = ((icolor >> 2) & 7) * (gx_max_color_value / 7); + prgb[2] = (icolor & 3) * (gx_max_color_value / 3); + #undef icolor + return 0; + } + + /* Write a palette on a file. */ + int + pc_write_palette(gx_device *dev, uint max_index, FILE *file) + { uint i, c; + gx_color_value rgb[3]; + for ( i = 0; i < max_index; i++ ) + { (*dev->procs->map_color_rgb)(dev, (gx_color_index)i, rgb); + for ( c = 0; c < 3; c++ ) + { byte b = rgb[c] >> (gx_color_value_bits - 8); + fputc(b, file); + } + } + return 0; + } \ No newline at end of file diff -rc2N gs24/gdevpccm.h gs241/gdevpccm.h *** gs24/gdevpccm.h --- gs241/gdevpccm.h Sat Apr 18 13:33:14 1992 *************** *** 0 **** --- 1,33 ---- + /* Copyright (C) 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. */ + + /* gdevpccm.h */ + /* Interface to PC color mapping utilities for Ghostscript */ + /* Requires gxdevice.h */ + + /* Color mapping routines for EGA/VGA-style color. */ + extern dev_proc_map_rgb_color(pc_4bit_map_rgb_color); + extern dev_proc_map_color_rgb(pc_4bit_map_color_rgb); + + /* Color mapping routines for 8-bit color (with a fixed palette). */ + extern dev_proc_map_rgb_color(pc_8bit_map_rgb_color); + extern dev_proc_map_color_rgb(pc_8bit_map_color_rgb); + + /* Write the palette on a file. */ + extern int pc_write_palette(P3(gx_device *, uint, FILE *)); diff -rc2N gs24/gdevpcx.c gs241/gdevpcx.c *** gs24/gdevpcx.c --- gs241/gdevpcx.c Sat Apr 18 13:32:28 1992 *************** *** 0 **** --- 1,293 ---- + /* Copyright (C) 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. */ + + /* gdevpcx.c */ + /* PCX file format devices for Ghostscript */ + #include "gdevprn.h" + #include "gserrors.h" /* REALLY? */ + #include "gdevpccm.h" + + /* Thanks to Phil Conrad for donating the original version */ + /* of these drivers to Aladdin Enterprises. */ + + /* ------ The device descriptors ------ */ + + /* + * Standard U.S. page width and height. A4 paper is 8.4" x 11.7". + */ + #define WIDTH_10THS 85 + #define HEIGHT_10THS 110 + + /* + * Default X and Y resolution. + */ + #define X_DPI 72 + #define Y_DPI 72 + + /* Monochrome. */ + + private dev_proc_print_page(pcxmono_print_page); + + gx_device_printer gs_pcxmono_device = + prn_device(prn_std_procs, "pcxmono", + WIDTH_10THS, HEIGHT_10THS, + X_DPI, Y_DPI, + 0,0,0,0, /* margins */ + 1, pcxmono_print_page); + + /* 4-bit planar (EGA/VGA-style) color. */ + + private dev_proc_print_page(pcx16_print_page); + + private gx_device_procs pcx16_procs = + prn_color_procs(gdev_prn_open, gdev_prn_output_page, gdev_prn_close, + pc_4bit_map_rgb_color, pc_4bit_map_color_rgb); + gx_device_printer gs_pcx16_device = + prn_device(pcx16_procs, "pcx16", + WIDTH_10THS, HEIGHT_10THS, + X_DPI, Y_DPI, + 0,0,0,0, /* margins */ + 4, pcx16_print_page); + + /* Chunky 8-bit (SuperVGA-style) color. */ + /* (Uses a fixed palette of 3,3,2 bits.) */ + + private dev_proc_print_page(pcx256_print_page); + + private gx_device_procs pcx256_procs = + prn_color_procs(gdev_prn_open, gdev_prn_output_page, gdev_prn_close, + pc_8bit_map_rgb_color, pc_8bit_map_color_rgb); + gx_device_printer gs_pcx256_device = + prn_device(pcx256_procs, "pcx256", + WIDTH_10THS, HEIGHT_10THS, + X_DPI, Y_DPI, + 0,0,0,0, /* margins */ + 8, pcx256_print_page); + + /* ------ Private definitions ------ */ + + typedef struct pcx_header_s { + byte manuf; /* always 0x0a */ + byte version; /* version info = 0,2,3,5 */ + byte encoding; /* 1=RLE */ + byte bpp; /* bits per pixel */ + ushort x1; /* picture dimensions */ + ushort y1; + ushort x2; + ushort y2; + ushort hres; /* horz. resolution */ + ushort vres; /* vert. resolution */ + byte palette[16*3]; /* color palette */ + byte vmode; /* video mode for graphics board */ + byte nplanes; /* number of color planes */ + ushort bpl; /* number of bytes per line (uncompresses) */ + ushort palinfo; /* palette info 1=color, 2=grey */ + ushort shres; /* scanner horz. resolution */ + ushort svres; /* scanner vert. resolution */ + byte xtra[58]; /* fill out header to 128 bytes */ + } pcx_header; + + /* + ** version info for PCX is as follows + ** + ** 0 == 2.5 + ** 2 == 2.8 w/palette info + ** 3 == 2.8 without palette info + ** 5 == 3.0 + ** + */ + + /* Forward declarations */ + private void pcx_write_rle(P3(byte *, byte *, FILE *)); + private int pcx_write_page(P4(gx_device_printer *, FILE *, pcx_header _ss *, int)); + + /* Write an "old" PCX page. */ + static byte ega_palette[16*3] = { + 0x00,0x00,0x00, 0x00,0x00,0xaa, 0x00,0xaa,0x00, 0x00,0xaa,0xaa, + 0xaa,0x00,0x00, 0xaa,0x00,0xaa, 0xaa,0xaa,0x00, 0xaa,0xaa,0xaa, + 0x55,0x55,0x55, 0x55,0x55,0xff, 0x55,0xff,0x55, 0x55,0xff,0xff, + 0xff,0x55,0x55, 0xff,0x55,0xff, 0xff,0xff,0x55, 0xff,0xff,0xff + }; + private int + pcx16_print_page(gx_device_printer *pdev, FILE *file) + { pcx_header header; + header.version = 2; + header.bpp = 1; + header.nplanes = 4; + /* Fill the EGA palette appropriately. */ + memcpy((byte *)header.palette, ega_palette, sizeof(ega_palette)); + return pcx_write_page(pdev, file, &header, 1); + } + + /* Write a "new" PCX page. */ + private int + pcx256_print_page(gx_device_printer *pdev, FILE *file) + { pcx_header header; + int code; + header.version = 5; + header.bpp = 8; + header.nplanes = 1; + /* Clear the EGA palette */ + memset((byte *)header.palette, 0, sizeof(header.palette)); + code = pcx_write_page(pdev, file, &header, 0); + if ( code >= 0 ) + { /* Write out the palette. */ + fputc(0x0c, file); + code = pc_write_palette((gx_device *)pdev, 256, file); + } + return code; + } + + /* Write a monochrome PCX page. */ + private int + pcxmono_print_page(gx_device_printer *pdev, FILE *file) + { pcx_header header; + header.version = 2; + header.bpp = 1; + header.nplanes = 1; + /* Clear the EGA palette */ + memset((byte *)header.palette, 0, sizeof(header.palette)); + return pcx_write_page(pdev, file, &header, 0); + } + + /* Write out a page in PCX format. */ + /* This routine is used for all three formats (monochrome, planar */ + /* "8-bit" actually 4-bit color, and chunky 8-bit color.) */ + private int + pcx_write_page(gx_device_printer *pdev, FILE *file, pcx_header _ss *phdr, + int planar) + { int raster = gdev_prn_bytes_per_scan_line(pdev); + int height = pdev->height; + int depth = pdev->color_info.depth; + uint rsize = (pdev->width + 7) >> 3; + byte *row = (byte *)gs_malloc(raster + rsize, 1, "pcx file buffer"); + byte *end = row + raster; + byte *plane = end; + int y; + int code = 0; /* return code */ + if ( row == 0 ) /* can't allocate row buffer */ + return gs_error_VMerror; + + /* setup the header struct */ + + phdr->manuf = 10; + /* version and bpp were set by the caller */ + phdr->encoding = 1; /* 1 for rle 8-bit encoding */ + phdr->x1 = 0; + phdr->y1 = 0; + phdr->x2 = pdev->width-1; + phdr->y2 = height-1; + phdr->hres = (int)pdev->x_pixels_per_inch; + phdr->vres = (int)pdev->y_pixels_per_inch; + phdr->vmode = 0; + /* nplanes was set by the caller */ + phdr->bpl = (planar && depth > 1 ? rsize : raster); + phdr->palinfo = (gx_device_has_color(pdev) ? 1 : 2); + + /* Write the header. */ + + if ( fwrite((const char *)phdr, 1, 128, file) < 128 ) + { code = gs_error_ioerror; + goto pcx_done; + } + + /* Dump the contents of the image. */ + for ( y = 0; y < height; y++ ) + { gdev_prn_copy_scan_lines(pdev, y, row, raster); + switch ( depth ) + { + case 1: + { /* PCX assumes 0=black, 1=white. */ + register byte *bp; + for ( bp = row; bp < end; bp++ ) + *bp = ~*bp; + pcx_write_rle(row, end, file); + } + break; + case 8: + { register int shift; + + if ( !gx_device_has_color(pdev) ) + { /* Can't map gray scale */ + code = gs_error_undefinedresult; + goto pcx_done; + } + + if ( !planar ) + { /* Just write the bits */ + pcx_write_rle(row, end, file); + break; + } + + for ( shift = 0; shift < 4; shift++ ) + { register byte *from, *to; + register int bmask = 1 << shift; + for ( from = row, to = plane; + from < end; from += 8 + ) + { *to++ = + ((((uint)from[0] & bmask) << 7) + + (((uint)from[1] & bmask) << 6) + + (((uint)from[2] & bmask) << 5) + + (((uint)from[3] & bmask) << 4) + + (((uint)from[4] & bmask) << 3) + + (((uint)from[5] & bmask) << 2) + + (((uint)from[6] & bmask) << 1) + + (((uint)from[7] & bmask))) + >> shift; + } + pcx_write_rle(plane, to, file); + } + } + break; + + default: + code = gs_error_undefinedresult; + goto pcx_done; + + } + } + + pcx_done: + gs_free((char *)row, raster + rsize, 1, "pcx file buffer"); + + return code; + } + + /* ------ Internal routines ------ */ + + /* Write one line in PCX run-length-encoded format. */ + private void + pcx_write_rle(byte *from, byte *end, FILE *file) + { while ( from < end ) + { byte data = *from++; + int count = 1; + while ( (from < end) && (*from == data) ) + count++, from++; + while ( count > 63 ) + { putc(0xff, file); + putc(data, file); + count -= 63; + } + if ( count != 1 || data >= 0xc0 ) + { putc(count | 0xc0, file); + } + putc(data, file); + } + } diff -rc2N gs24/gdevprn.c gs241/gdevprn.c *** gs24/gdevprn.c Wed Mar 18 13:43:32 1992 --- gs241/gdevprn.c Thu Apr 9 04:04:22 1992 *************** *** 64,70 **** ) { /* Buffer the image in a command list. */ ! uint space = ppdev->buffer_space = ppdev->use_buffer_space; ! base = (byte *)gs_malloc(space, 1, "command list buffer"); ! if ( base == 0 ) return -1; pcldev->mdev = *mdev; ppdev->buf = base; --- 64,76 ---- ) { /* Buffer the image in a command list. */ ! uint space; ! for ( space = ppdev->use_buffer_space; ; ) ! { base = (byte *)gs_malloc(space, 1, ! "command list buffer"); ! if ( base != 0 ) break; ! if ( (space >>= 1) < PRN_BUFFER_SPACE ) ! return -1; /* no hope */ ! } ! ppdev->buffer_space = space; pcldev->mdev = *mdev; ppdev->buf = base; diff -rc2N gs24/gdevprn.h gs241/gdevprn.h *** gs24/gdevprn.h Mon Feb 24 16:54:02 1992 --- gs241/gdevprn.h Sat Apr 11 05:33:54 1992 *************** *** 129,135 **** * can't cast a computed float to an int. That's why we specify * the page width and height in inches/10 instead of inches. */ ! #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) {\ ! sizeof(gx_device_printer),\ &procs,\ dev_name,\ --- 129,138 ---- * can't cast a computed float to an int. That's why we specify * the page width and height in inches/10 instead of inches. + * + * Note that the macro is broken up so as to be usable for devices that + * add further initialized state to the printer device. */ ! #define prn_device_body(devtype, procs, dev_name, width_10ths, height_10ths, x_dpi, y_dpi, l_margin, b_margin, r_margin, t_margin, num_comp, depth, max_gray, max_rgb, dither_gray, dither_rgb, print_page)\ ! sizeof(devtype),\ &procs,\ dev_name,\ *************** *** 139,149 **** 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 */\ --- 142,146 ---- y_dpi,\ l_margin, b_margin, r_margin, t_margin,\ ! { num_comp, depth, max_gray, max_rgb, dither_gray, dither_rgb },\ 0, /* not initialized yet */\ { 0 }, /* skip */\ *************** *** 151,155 **** PRN_MAX_BITMAP,\ PRN_BUFFER_SPACE,\ ! { 0 } /* fname */\ } --- 148,164 ---- PRN_MAX_BITMAP,\ 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,\ ! (color_bits > 1 ? 3 : 1),\ ! ((color_bits > 1) & (color_bits < 8) ? 8 : color_bits),\ ! (color_bits >= 8 ? 255 : 1),\ ! (color_bits >= 8 ? 255 : color_bits > 1 ? 1 : 0),\ ! (color_bits >= 8 ? 5 : 2),\ ! (color_bits >= 8 ? 5 : color_bits > 1 ? 2 : 0),\ ! print_page)\ } diff -rc2N gs24/gdevsun.c gs241/gdevsun.c *** gs24/gdevsun.c Sun Feb 16 18:21:50 1992 --- gs241/gdevsun.c Mon Apr 6 13:59:08 1992 *************** *** 1,3 **** ! /* Copyright (C) 1989, 1990, 1991 Aladdin Enterprises. All rights reserved. Distributed by Free Software Foundation, Inc. --- 1,3 ---- ! /* Copyright (C) 1989, 1992 Aladdin Enterprises. All rights reserved. Distributed by Free Software Foundation, Inc. *************** *** 20,35 **** /* gdevsun.c */ /* SunView driver for Ghostscript */ #include #include #include ! /* Hack to get around the fact that something in the SunView library */ ! /* defines uint and ushort.... */ ! # define uint _uint ! # define ushort _ushort ! #include "gx.h" /* for gx_bitmap; includes std.h */ ! # undef _uint ! # undef _ushort #include "gsmatrix.h" /* needed for gxdevice.h */ #include "gxdevice.h" #ifndef DEFAULT_DPI --- 20,33 ---- /* gdevsun.c */ /* SunView driver for Ghostscript */ + #include "gx.h" /* for gx_bitmap; includes std.h */ + #include #include + #include #include ! #include "gsmatrix.h" /* needed for gxdevice.h */ #include "gxdevice.h" + #include "malloc_.h" #ifndef DEFAULT_DPI *************** *** 37,42 **** #endif - #define COLOR 1 /* choose color or monochrome */ - /* Procedures */ dev_proc_open_device(sun_open); --- 35,38 ---- *************** *** 69,72 **** --- 65,70 ---- }; + #define CMSNAME "GHOSTVIEW" /* SunView colormap name */ + /* Define the SunView device */ typedef struct gx_device_sun { *************** *** 77,80 **** --- 75,82 ---- struct mpr_data mpr; Pixrect pr; + int truecolor; /* use truecolor mapping */ + gx_color_index ncols; /* allocated colors */ + byte *red, *green, *blue; /* colormap */ + char cmsname[sizeof(CMSNAME)+9];/* color map name */ #if !arch_is_big_endian /* need to swap bits & bytes */ # define BUF_WIDTH_BYTES (((int)(8.5*DEFAULT_DPI)+15)/16*2) *************** *** 106,124 **** /* The instance is public. */ - #if COLOR /* ****** */ - gx_device_sun gs_sunview_device = { - sizeof(gx_device_sun), - &sun_procs, - "sunview", - (int)(8.5*DEFAULT_DPI), (int)(11*DEFAULT_DPI), /* x and y extent */ - DEFAULT_DPI, DEFAULT_DPI, /* x and y density */ - /* Following parameters are initialized for color */ - 1, /* has color */ - 3, /* max r-g-b value */ - 8, /* bits per color pixel */ - 0, /* connection not initialized */ - /* End of monochrome/color parameters */ - }; - #else /* ****** */ gx_device_sun gs_sunview_device = { sizeof(gx_device_sun), --- 108,111 ---- *************** *** 127,138 **** (int)(8.5*DEFAULT_DPI), (int)(11*DEFAULT_DPI), /* x and y extent */ DEFAULT_DPI, DEFAULT_DPI, /* x and y density */ ! /* Following parameters are initialized for monochrome */ ! 0, /* has color */ ! 1, /* max r-g-b value */ ! 1, /* bits per color pixel */ 0, /* connection not initialized */ - /* End of monochrome/color parameters */ }; - #endif /* ****** */ /* Macro for casting gx_device argument */ --- 114,121 ---- (int)(8.5*DEFAULT_DPI), (int)(11*DEFAULT_DPI), /* x and y extent */ DEFAULT_DPI, DEFAULT_DPI, /* x and y density */ ! no_margins, ! dci_color(0,0,0), /* fill in later from display depth */ 0, /* connection not initialized */ }; /* Macro for casting gx_device argument */ *************** *** 145,148 **** --- 128,224 ---- return -1 + /* + * The macros below define the colormap configuration used on 8-bit + * pseudo-color displays. + */ + /* + * The following macros define the number of bits used to represent rgb colors. + * The total must not exceed the display depth. + * Note that the RGB dimensions could have an uneven number of bits assigned + * to them, but that will cause dithering to not work very well, since + * gs assumes the dither ramp is the same for all 3 color dimensions. + * + * Setting RED_BITS to n will pre-allocate a color-cube of 2^(3n) entries. + * The remaining entries are allocated on demand for colors requested by + * sun_map_rgb_color(), until the color map is full. At that point gs will + * fall back onto dithering using the pre-allocated colors. + * As a special case, if RED_BITS = GREEN_BITS = BLUE_BITS = 0, only + * black and white are pre-allocated. + */ + #define RED_BITS 2 /* everything depends on this one */ + #define GREEN_BITS RED_BITS + #define BLUE_BITS RED_BITS + #define DEPTH 8 /* don't change this */ + #define RGB_BITS (RED_BITS + GREEN_BITS + BLUE_BITS) + /* + * Smallest # bits per dimension + */ + #define MAX_BITS RED_BITS + #if (GREEN_BITS > MAX_BITS) + #undef MAX_BITS + #define MAX_BITS GREEN_BITS + #endif + #if (BLUE_BITS > MAX_BITS) + #undef MAX_BITS + #define MAX_BITS BLUE_BITS + #endif + /* + * masks to pull out rgb components + */ + #define BLUE_MASK ((1 << BLUE_BITS) - 1) + #define GREEN_MASK ((1 << (BLUE_BITS + GREEN_BITS)) - 1 - BLUE_MASK) + #define RED_MASK ((1 << (BLUE_BITS + GREEN_BITS + RED_BITS)) - 1 \ + - BLUE_MASK - GREEN_MASK) + /* + * number of colors on rgb dimensions + */ + #define RED_COLS (1 << RED_BITS) + #define GREEN_COLS (1 << GREEN_BITS) + #define BLUE_COLS (1 << BLUE_BITS) + #define RGB_COLS (RED_COLS * GREEN_COLS * BLUE_COLS) + #define MAX_COLS (1 << MAX_BITS) + /* + * maximum number of colors in map + */ + #define ALL_COLS (1 << DEPTH) /* 256 */ + + #if (RGB_BITS < 0) || (RGB_BITS > DEPTH) + Display_does_not_support_this_many_colors + #endif + + /* + * The macros below define the color mapping used on 24-bit true-color + * displays. + * FAKE_TRUE_COLOR is used for debugging only. It simulates a true-color + * type mapping on an 8-bit pseudo-color display. + #define FAKE_TRUE_COLOR + */ + #ifdef FAKE_TRUE_COLOR + # define TRUE_RED_BITS 3 /* everything depends on this one */ + # define TRUE_GREEN_BITS 2 + # define TRUE_BLUE_BITS (DEPTH - TRUE_RED_BITS - TRUE_GREEN_BITS) + #else + # define TRUE_RED_BITS 8 /* everything depends on this one */ + # define TRUE_GREEN_BITS TRUE_RED_BITS + # define TRUE_BLUE_BITS TRUE_RED_BITS + #endif ./* FAKE_TRUE_COLOR */ + #define TRUE_DEPTH (TRUE_RED_BITS + TRUE_GREEN_BITS + TRUE_BLUE_BITS) + /* + * Masks to pull out rgb components. Note that the bit order is BGR from + * high to low order bits. + */ + #define TRUE_RED_MASK ((1 << TRUE_RED_BITS) - 1) + #define TRUE_GREEN_MASK ((1 << (TRUE_RED_BITS + TRUE_GREEN_BITS)) - 1 \ + - TRUE_RED_MASK) + #define TRUE_BLUE_MASK ((1 << (TRUE_RED_BITS + TRUE_GREEN_BITS \ + + TRUE_BLUE_BITS)) - 1 \ + - TRUE_GREEN_MASK - TRUE_RED_MASK) + /* + * number of colors on rgb dimensions + */ + #define TRUE_RED_COLS (1 << TRUE_RED_BITS) + #define TRUE_GREEN_COLS (1 << TRUE_GREEN_BITS) + #define TRUE_BLUE_COLS (1 << TRUE_BLUE_BITS) + /* Initialize the device. */ private Notify_value destroy_func(); *************** *** 161,164 **** --- 237,242 ---- WIN_HEIGHT, xdev->width + 20, WIN_HEIGHT, xdev->height + 40, 0); + if (xdev->frame == (Frame)0) + return -1; xdev->canvas = window_create(xdev->frame, CANVAS, CANVAS_AUTO_EXPAND, FALSE, *************** *** 166,169 **** --- 244,250 ---- CANVAS_WIDTH, xdev->width, CANVAS_HEIGHT, xdev->height, + #ifndef PRE_IBIS /* try to use 24-bit visual if OS supports it */ + CANVAS_COLOR24, TRUE, + #endif WIN_VERTICAL_SCROLLBAR, scrollbar_create(0), WIN_HORIZONTAL_SCROLLBAR, scrollbar_create(0), *************** *** 170,184 **** 0); xdev->pw = canvas_pixwin(xdev->canvas); ! if ( xdev->has_color ) ! { byte Red[64], Green[64], Blue[64]; ! int j; ! for ( j = 0; j < 64; j++ ) ! { Red[63 - j] = ((j & 0x30) >> 4) * (255 / 3); ! Green[63 - j] = ((j & 0xc) >> 2) * (255 / 3); ! Blue[63 - j] = ((j & 0x3)) * (255 / 3); ! } ! pw_setcmsname(xdev->pw, "abc"); ! pw_putcolormap(xdev->pw, 0, 64, Red, Green, Blue); } window_set(xdev->frame, WIN_SHOW, TRUE, 0); /* Interpose a destroy function to keep Ghostscript from */ --- 251,393 ---- 0); xdev->pw = canvas_pixwin(xdev->canvas); ! ! switch (xdev->pw->pw_pixrect->pr_depth) { ! static gx_device_color_info mono_ci = ! dci_black_and_white; ! /* ! * If the pre-allocated color cube leaves room for spare entries, ! * tell gs we can render colors exactly. Otherwise admit our ! * limitations. ! */ ! static gx_device_color_info color_ci = ! #if (RGB_COLS < ALL_COLS) ! dci_color(DEPTH, 31, MAX_COLS); ! #else ! dci_color(DEPTH, MAX_COLS - 1, MAX_COLS); ! #endif ! static gx_device_color_info truecolor_ci = ! dci_color(TRUE_DEPTH,31,4); ! case 1: ! /* mono display */ ! xdev->color_info = mono_ci; ! break; ! #ifndef FAKE_TRUE_COLOR ! case DEPTH: ! /* pseudo-color display */ ! xdev->color_info = color_ci; ! xdev->truecolor = 0; ! break; ! #endif /* FAKE_TRUE_COLOR */ ! case TRUE_DEPTH: ! case TRUE_DEPTH+8: /* I'm not sure whether the XBGR frame buffer ! returns depth 24 or 32. */ ! /* pseudo-color display */ ! xdev->color_info = truecolor_ci; ! xdev->truecolor = 1; ! break; ! default: ! eprintf1("gs: Cannot handle display of depth %d.\n", ! xdev->pw->pw_pixrect->pr_depth); ! return -1; ! } ! ! if ( gx_device_has_color(xdev) ! #ifndef FAKE_TRUE_COLOR ! && !xdev->truecolor ! #endif ! ) ! { ! gx_color_index j; ! ! /* ! * Create the pre-allocated colorcube. ! */ ! xdev->red = (byte *)malloc(ALL_COLS); ! xdev->green = (byte *)malloc(ALL_COLS); ! xdev->blue = (byte *)malloc(ALL_COLS); ! if (!xdev->red || !xdev->green || !xdev->blue) { ! eprintf("gs: no memory for colomap\n"); ! return -1; ! } ! ! #ifdef FAKE_TRUE_COLOR ! /* ! * Fit the largest possible color cube into the colormap. ! */ ! for ( j = 0; j < ALL_COLS; j++ ) { ! xdev->blue[j] = ! (double)((j & TRUE_BLUE_MASK) ! >> (TRUE_GREEN_BITS + TRUE_RED_BITS)) ! / (TRUE_BLUE_COLS - 1) ! * (ALL_COLS - 1); ! xdev->green[j] = ! (double)((j & TRUE_GREEN_MASK) >> TRUE_RED_BITS) ! / (TRUE_GREEN_COLS - 1) ! * (ALL_COLS - 1); ! xdev->red[j] = ! (double)((j & TRUE_RED_MASK)) ! / (TRUE_RED_COLS - 1) ! * (ALL_COLS - 1); ! } ! #else /* !FAKE_TRUE_COLOR */ ! /* ! * Black and white are allocated in the first two slots, ! * so as to be compatible with the monochrome colormap. ! * This prevents most text etc. to go technicolor as focus ! * changes into the ghostscript window. ! */ ! cms_monochromeload(xdev->red, xdev->green, xdev->blue); ! ! /* ! * The remaining slots up to RGB_COLS-1 are filled with ! * evenly spaced points from the colorcube. ! */ ! for ( j = 2; j < RGB_COLS; j++ ) { ! int color = j - 1; /* bit pattern corresponding to color */ ! xdev->red[j] = ! (double)((color & RED_MASK) >> (GREEN_BITS + BLUE_BITS)) ! / (RED_COLS - 1) ! * (ALL_COLS - 1); ! xdev->green[j] = ! (double)((color & GREEN_MASK) >> BLUE_BITS) ! / (GREEN_COLS - 1) ! * (ALL_COLS - 1); ! xdev->blue[j] = ! (double)((color & BLUE_MASK)) ! / (BLUE_COLS - 1) ! * (ALL_COLS - 1); ! } ! #endif /* FAKE_TRUE_COLOR */ ! ! /* ! * Set the high-water mark to the end of the colorcube. ! */ ! xdev->ncols = j; ! ! /* ! * The unusued entries are filled so that the last entry is ! * always different from the 0th entry. This is a requirement ! * for SunWindows. ! */ ! for ( ; j < ALL_COLS; j++) { ! xdev->red[j] = xdev->green[j] = xdev->blue[j] = ! ~xdev->red[0]; ! } ! ! /* ! * Install the colormap. ! */ ! sprintf(xdev->cmsname, "%s-%d", CMSNAME, getpid()); ! pw_setcmsname(xdev->pw, xdev->cmsname); ! pw_putcolormap(xdev->pw, 0, ALL_COLS, ! xdev->red, xdev->green, xdev->blue); } + else { + xdev->ncols = 0; + xdev->red = (byte *)0; + xdev->green = (byte *)0; + xdev->blue = (byte *)0; + } + window_set(xdev->frame, WIN_SHOW, TRUE, 0); /* Interpose a destroy function to keep Ghostscript from */ *************** *** 191,197 **** /* Prevent the user from closing the window. */ private Notify_value ! destroy_func(frame,status) ! Frame frame; ! Destroy_status status; { if ( status == DESTROY_CHECKING ) { notify_veto_destroy(frame); --- 400,404 ---- /* Prevent the user from closing the window. */ private Notify_value ! destroy_func(Frame frame, Destroy_status status) { if ( status == DESTROY_CHECKING ) { notify_veto_destroy(frame); *************** *** 208,211 **** --- 415,425 ---- xdev->canvas = (Canvas)0; xdev->pw = (Pixwin *)0; + xdev->ncols = 0; + if (xdev->red) + free(xdev->red); + if (xdev->green) + free(xdev->green); + if (xdev->blue) + free(xdev->blue); return 0; } *************** *** 218,228 **** } ! /* Map RGB to color number - simple 64 color system for 8 bit displays */ gx_color_index sun_map_rgb_color(gx_device *dev, unsigned short red, unsigned short green, unsigned short blue) ! { if ( !dev->has_color) ! return gx_default_map_rgb_color(dev, red, green, blue); ! return (63 - ((red << 4) + (green << 2) + blue)); } --- 432,512 ---- } ! /* Map RGB to color number - ! Look for existing entry in colormap, or create a new one, or ! give up if no free colormap entries (requesting dithering). ! */ gx_color_index sun_map_rgb_color(gx_device *dev, unsigned short red, unsigned short green, unsigned short blue) ! { if ( !gx_device_has_color(dev) ) ! /* ! * Invert default color index to match mono display ! * pixel values (black = 1, white = 0). ! */ ! return !gx_default_map_rgb_color(dev, red, green, blue); ! else if ( !xdev->truecolor ) { ! byte red_val, green_val, blue_val; ! gx_color_index i; ! static int warn = 1; ! ! /* ! * Determine the RGB values at display resolution we ! * ideally would want this color to be mapped into. ! */ ! red_val = (double)red/gx_max_color_value * (ALL_COLS - 1); ! green_val = (double)green/gx_max_color_value * (ALL_COLS - 1); ! blue_val = (double)blue/gx_max_color_value * (ALL_COLS - 1); ! ! /* ! * Look for an exact match among the colors already allocated. ! * This includes the pre-allocated default color cube. ! */ ! for (i = 0; i < xdev->ncols; i++) { ! if (xdev->red[i] == red_val && ! xdev->green[i] == green_val && ! xdev->blue[i] == blue_val) { ! return i; ! } ! } ! ! /* ! * If we run out of space in the color map, let gs know. ! * It will call us again to request colors to do the ! * dithering, and hopefully request only RGB values that ! * match the colorcube entries. IF NOT, WE WILL LOOP ! * FOREVER! ! */ ! if (xdev->ncols == ALL_COLS) { ! if (warn) { ! eprintf("gs: last spare color map entry allocated\n"); ! warn = 0; ! } ! return gx_no_color_index; ! } ! ! /* ! * Allocate new color in map. ! */ ! xdev->red[i] = red_val; ! xdev->green[i] = green_val; ! xdev->blue[i] = blue_val; ! pw_setcmsname(xdev->pw, xdev->cmsname); ! pw_putcolormap(xdev->pw, xdev->ncols, 1, ! &xdev->red[i], &xdev->green[i], &xdev->blue[i]); ! ! xdev->ncols++; ! ! if (xdev->ncols == ALL_COLS) ! ! return i; ! } ! else { /* true color mapping -- ! color index encodes all 3 RGB values */ ! return ((blue >> (gx_color_value_bits - TRUE_BLUE_BITS)) ! << (TRUE_GREEN_BITS + TRUE_RED_BITS)) | ! ((green >> (gx_color_value_bits - TRUE_GREEN_BITS)) ! << TRUE_RED_BITS) | ! (red >> (gx_color_value_bits - TRUE_RED_BITS)); ! } } *************** *** 231,241 **** sun_map_color_rgb(gx_device *dev, gx_color_index color, unsigned short rgb[3]) ! { if ( !dev->has_color ) ! return gx_default_map_color_rgb(dev, color, rgb); ! color = 63 - color; ! rgb[0] = (unsigned short)((color & 0x30) >> 4); ! rgb[1] = (unsigned short)((color & 0x0c) >> 2); ! rgb[2] = (unsigned short)((color & 0x03)); ! return 0; } --- 515,550 ---- sun_map_color_rgb(gx_device *dev, gx_color_index color, unsigned short rgb[3]) ! { if ( !gx_device_has_color(dev) ) ! return gx_default_map_color_rgb(dev, !color, rgb); ! else if ( !xdev->truecolor ) { ! /* ! * We just use the colormap to map back to rgb values. ! */ ! if (color >= xdev->ncols) { ! eprintf1("gs: attempt to get RGB values for unallocated color index %d\n", color); ! return -1; ! } ! rgb[0] = (double)xdev->red[color] / (ALL_COLS - 1) ! * gx_max_color_value; ! rgb[1] = (double)xdev->green[color] / (ALL_COLS - 1) ! * gx_max_color_value; ! rgb[2] = (double)xdev->blue[color] / (ALL_COLS - 1) ! * gx_max_color_value; ! return 0; ! } ! else { /* true color mapping */ ! rgb[0] = (double)((unsigned short)(color & TRUE_RED_MASK)) ! / (TRUE_RED_COLS - 1) ! * gx_max_color_value; ! rgb[1] = (double)((unsigned short)(color & TRUE_GREEN_MASK) ! >> TRUE_RED_BITS) ! / (TRUE_GREEN_COLS - 1) ! * gx_max_color_value; ! rgb[2] = (double)((unsigned short)(color & TRUE_BLUE_MASK) ! >> (TRUE_GREEN_BITS + TRUE_RED_BITS)) ! / (TRUE_BLUE_COLS - 1) ! * gx_max_color_value; ! return 0; ! } } *************** *** 245,248 **** --- 554,558 ---- int x, int y, int w, int h, gx_color_index color) { check_rect(); + pw_write(xdev->pw, x, y, w, h, PIX_SRC | PIX_COLOR((int)(color)), (Pixrect *)0, 0, 0); *************** *** 311,315 **** extern struct pixrectops mem_ops; ! if ( !dev->has_color ) return sun_copy_mono(dev, base, sourcex, raster, id, x, y, w, h, --- 621,625 ---- extern struct pixrectops mem_ops; ! if ( !gx_device_has_color(dev) ) return sun_copy_mono(dev, base, sourcex, raster, id, x, y, w, h, diff -rc2N gs24/gdevsvga.c gs241/gdevsvga.c *** gs24/gdevsvga.c Sun Feb 16 18:21:32 1992 --- gs241/gdevsvga.c Wed Apr 15 15:22:00 1992 *************** *** 68,71 **** --- 68,75 ---- int select_reg; /* page-select register */ } atiw; + struct { + int et_model; /* 4 for ET4000, */ + /* 3 for ET3000 */ + } tseng; } info; }; *************** *** 125,129 **** (*fbdev->set_page)(fbdev, (fbdev->page = index >> 16), wnum);\ }\ ! ptr = (fb_ptr)MK_PTR(regen, (uint)index);\ } #define set_pixel_write_ptr(ptr, fbdev, x, y)\ --- 129,133 ---- (*fbdev->set_page)(fbdev, (fbdev->page = index >> 16), wnum);\ }\ ! ptr = (fb_ptr)MK_PTR(regen, (ushort)index);\ } #define set_pixel_write_ptr(ptr, fbdev, x, y)\ *************** *** 371,375 **** } else ! { uint left = -PTR_OFF(ptr); memset(ptr, (byte)color, left); set_pixel_write_ptr(ptr, fb_dev, x + left, y + h - 1 - yi); --- 375,379 ---- } else ! { uint left = (uint)0x10000 - PTR_OFF(ptr); memset(ptr, (byte)color, left); set_pixel_write_ptr(ptr, fb_dev, x + left, y + h - 1 - yi); *************** *** 399,403 **** memcpy(dest, src, bytes_per_row); else ! { uint left = -PTR_OFF(src); memcpy(dest, src, left); set_pixel_read_ptr(src, fb_dev, left, y); --- 403,407 ---- memcpy(dest, src, bytes_per_row); else ! { uint left = (uint)0x10000 - PTR_OFF(src); memcpy(dest, src, left); set_pixel_read_ptr(src, fb_dev, left, y); *************** *** 655,659 **** --- 659,673 ---- }; int mode = svga_find_mode(dev, mode_table); + fb_ptr p0 = (fb_ptr)MK_PTR(regen, 0); if ( mode < 0 ) return -1; /* mode not available */ + /* Figure out whether we have an ET3000 or an ET4000 */ + /* by playing with the segment register. */ + outportb(0x3cd, 0x44); + *p0 = 4; /* byte 0, page 4 */ + outportb(0x3cd, 0x40); + *p0 = 3; /* byte 0, page 0 */ + fb_dev->info.tseng.et_model = *p0; + /* read page 0 if ET3000, */ + /* page 4 if ET4000 */ return svga_open(dev, mode); } *************** *** 663,667 **** private void tseng_set_page(gx_device_svga *dev, int pn, int wnum) ! { /****** WE DON'T KNOW HOW TO SET THE READ PAGE ******/ ! outportb(0x3cd, 0x40 + pn); } --- 677,685 ---- private void tseng_set_page(gx_device_svga *dev, int pn, int wnum) ! { /* The ET3000 has read page = 5:3, write page = 2:0; */ ! /* the ET4000 has read page = 7:4, write page = 3:0. */ ! int shift = dev->info.tseng.et_model; ! int mask = (1 << shift) - 1; ! if ( wnum ) pn <<= shift, mask <<= shift; ! outportb(0x3cd, (inportb(0x3cd) & ~mask) + pn); } diff -rc2N gs24/gdevxini.c gs241/gdevxini.c *** gs24/gdevxini.c Wed Mar 18 12:56:42 1992 --- gs241/gdevxini.c Mon Apr 20 12:32:04 1992 *************** *** 26,30 **** #include "gdevx.h" ! extern char *getenv(P1(char *)); extern double atof(P1(const char *)); --- 26,30 ---- #include "gdevx.h" ! extern char *getenv(P1(const char *)); extern double atof(P1(const char *)); *************** *** 94,101 **** exit(1); } - #if HaveStdCMap && defined(sun) - /* Keep Sun's Dynamic linker happy */ - XtToolkitInitialize(); - #endif if ( (window_id = getenv("GHOSTVIEW")) ) { if ( !(xdev->ghostview = sscanf(window_id, "%d %d", --- 94,97 ---- *************** *** 127,131 **** int left_margin = 0, bottom_margin = 0; int right_margin = 0, top_margin = 0; ! orientation page_orientation; float xppp, yppp; /* pixels per point */ nitems = sscanf(buf, --- 123,131 ---- int left_margin = 0, bottom_margin = 0; int right_margin = 0, top_margin = 0; ! /* We declare page_orientation as an int so that we can */ ! /* use an int * to reference it for sscanf; compilers */ ! /* might be tempted to use less space to hold it if */ ! /* it was declared as an orientation. */ ! int /*orientation*/ page_orientation; float xppp, yppp; /* pixels per point */ nitems = sscanf(buf, *************** *** 239,262 **** } - if ( !xdev->std_cmap ) - { if ( XmuLookupStandardColormap(xdev->dpy, DefaultScreen(xdev->dpy), - xdev->vinfo->visualid, - xdev->vinfo->depth, - prop, False, True) ) - { if ( XGetRGBColormaps(xdev->dpy, RootWindowOfScreen(xdev->scr), - &scmap, &nitems, prop) ) - { int i; - for ( i = 0, sp = scmap ; i < nitems ; i++, sp++) - { if ( (xdev->ghostview && (xdev->cmap == - sp->colormap)) || - (!xdev->ghostview && (xdev->vinfo->visualid == - sp->visualid)) ) - { xdev->std_cmap = sp; - break; - } - } - } - } - } if ( xdev->std_cmap ) { xdev->cmap = xdev->std_cmap->colormap; --- 239,242 ---- *************** *** 469,473 **** &xswa); XChangeProperty(xdev->dpy, xdev->win, XA_WM_NAME, XA_STRING, 8, ! PropModeReplace, (unsigned char *)PROGRAM_NAME, strlen(PROGRAM_NAME)); XSetNormalHints(xdev->dpy, xdev->win, &sizehints); --- 449,453 ---- &xswa); XChangeProperty(xdev->dpy, xdev->win, XA_WM_NAME, XA_STRING, 8, ! PropModeReplace, (const unsigned char *)PROGRAM_NAME, strlen(PROGRAM_NAME)); XSetNormalHints(xdev->dpy, xdev->win, &sizehints); diff -rc2N gs24/ghost.h gs241/ghost.h *** gs24/ghost.h Thu Feb 6 12:55:34 1992 --- gs241/ghost.h Mon Apr 20 17:15:12 1992 *************** *** 1,3 **** ! /* Copyright (C) 1989, 1990, 1991 Aladdin Enterprises. All rights reserved. Distributed by Free Software Foundation, Inc. --- 1,3 ---- ! /* Copyright (C) 1989, 1992 Aladdin Enterprises. All rights reserved. Distributed by Free Software Foundation, Inc. *************** *** 120,125 **** #define a_executable 0x40 #define a_all (a_write+a_read+a_execute) /* Define the attribute names for debugging printout. */ ! #define attr_print_string "mnswrxe.....????" /* Abstract types */ --- 120,128 ---- #define a_executable 0x40 #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 "mnswrxe......???" /* Abstract types */ *************** *** 156,160 **** #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_shift 7 #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 */ --- 159,162 ---- *************** *** 163,167 **** ((rp)->tas.type_attrs >= (t_next_index << r_type_shift) ?\ t_operator : r_type(rp)) ! #define r_type_xe(rp) ((rp)->tas.type_attrs >> (r_type_shift - 2)) #define r_type_attrs(rp) ((rp)->tas.type_attrs) /* reading only */ #define r_has_attrs(rp,mask) !(~r_type_attrs(rp) & (mask)) --- 165,171 ---- ((rp)->tas.type_attrs >= (t_next_index << r_type_shift) ?\ t_operator : r_type(rp)) ! #define type_xe(tas) ((tas) >> (r_type_shift - 2)) ! #define r_type_xe(rp) type_xe((rp)->tas.type_attrs) ! #define type_xe_value(t,xe) type_xe(((t) << r_type_shift) + (xe)) #define r_type_attrs(rp) ((rp)->tas.type_attrs) /* reading only */ #define r_has_attrs(rp,mask) !(~r_type_attrs(rp) & (mask)) *************** *** 169,173 **** (r_type_attrs(rp) & (mask1)) #define r_has_type_attrs(rp,typ,mask)\ ! (((rp)->tas.type_attrs & ((0x1f << r_type_shift) + (mask))) ==\ (((typ) << r_type_shift) + (mask))) #define r_set_attrs(rp,mask) ((rp)->tas.type_attrs |= (mask)) --- 173,178 ---- (r_type_attrs(rp) & (mask1)) #define r_has_type_attrs(rp,typ,mask)\ ! (((rp)->tas.type_attrs & ((((1 << r_type_bits) - 1) << r_type_shift)\ ! + (mask))) ==\ (((typ) << r_type_shift) + (mask))) #define r_set_attrs(rp,mask) ((rp)->tas.type_attrs |= (mask)) diff -rc2N gs24/gp.h gs241/gp.h *** gs24/gp.h Thu Mar 19 12:43:22 1992 --- gs241/gp.h Wed Apr 8 00:20:26 1992 *************** *** 27,42 **** */ ! /* ------ Initialization ------ */ ! /* This routine is called early in the Ghostscript initialization. */ ! /* It should do as little as possible. In particular, it should not */ ! /* do things like open display connections: that is the responsibility */ ! /* of the display device driver. */ extern void gp_init(P0()); /* ------ Date and time ------ */ ! /* Read the current date (in days since Jan. 1, 1980) into pdt[0], */ ! /* and time (in milliseconds since midnight) into pdt[1]. */ extern void gp_get_clock(P1(long *pdt)); --- 27,52 ---- */ ! /* ------ Initialization/termination ------ */ ! /* ! * This routine is called early in the Ghostscript initialization. ! * It should do as little as possible. In particular, it should not ! * do things like open display connections: that is the responsibility ! * of the display device driver. ! */ extern void gp_init(P0()); + /* + * This routine is called just before Ghostscript exits (normally or + * abnormally). It too should do as little as possible. + */ + extern void gp_exit(P0()); + /* ------ Date and time ------ */ ! /* ! * Read the current date (in days since Jan. 1, 1980) into pdt[0], ! * and time (in milliseconds since midnight) into pdt[1]. ! */ extern void gp_get_clock(P1(long *pdt)); *************** *** 43,49 **** /* ------ Screen management ------ */ ! /* These routines are only relevant in a single-window environment */ ! /* such as a PC; on platforms with window systems, the 'make current' */ ! /* routines do nothing. */ struct gx_device_s; --- 53,61 ---- /* ------ Screen management ------ */ ! /* ! * These routines are only relevant in a single-window environment ! * such as a PC; on platforms with window systems, the 'make current' ! * routines do nothing. ! */ struct gx_device_s; *************** *** 60,67 **** /* ------ Printer accessing ------ */ ! /* Open a connection to a printer. A null file name means use the */ ! /* standard printer connected to the machine, if any. */ ! /* If possible, support "|command" for opening an output pipe. */ ! /* Return NULL if the connection could not be opened. */ extern FILE *gp_open_printer(P1(char *fname)); --- 72,81 ---- /* ------ Printer accessing ------ */ ! /* ! * Open a connection to a printer. A null file name means use the ! * standard printer connected to the machine, if any. ! * If possible, support "|command" for opening an output pipe. ! * Return NULL if the connection could not be opened. ! */ extern FILE *gp_open_printer(P1(char *fname)); diff -rc2N gs24/gp_dosfb.c gs241/gp_dosfb.c *** gs24/gp_dosfb.c Fri Mar 6 15:34:34 1992 --- gs241/gp_dosfb.c Wed Apr 8 00:23:00 1992 *************** *** 187,189 **** fclose(gfile); return 0; ! } \ No newline at end of file --- 187,189 ---- fclose(gfile); return 0; ! } diff -rc2N gs24/gp_itbc.c gs241/gp_itbc.c *** gs24/gp_itbc.c Sun Mar 22 04:50:44 1992 --- gs241/gp_itbc.c Mon Apr 13 05:57:00 1992 *************** *** 42,46 **** private void handle_FPE(P3(int, int, int *)); ! /* Do platform-dependent initialization */ #if CPU_TYPE > 86 /* Internal routine to set flags and read them back. */ --- 42,46 ---- private void handle_FPE(P3(int, int, int *)); ! /* Do platform-dependent initialization. */ #if CPU_TYPE > 86 /* Internal routine to set flags and read them back. */ *************** *** 130,133 **** --- 130,162 ---- regs[3], regs[4], regs[10], regs[9]); exit(1); + } + + /* Do platform-dependent cleanup. */ + void + gp_exit() + { + } + + /* ------ Printer accessing ------ */ + + /* Open a connection to a printer. A null file name means use the */ + /* standard printer connected to the machine, if any. */ + /* Return NULL if the connection could not be opened. */ + extern void gp_set_printer_binary(P1(int)); + FILE * + gp_open_printer(char *fname) + { if ( strlen(fname) == 0 || !strcmp(fname, "PRN") ) + { gp_set_printer_binary(fileno(stdprn)); + return stdprn; + } + else + return fopen(fname, "wb"); + } + + /* Close the connection to the printer. */ + void + gp_close_printer(FILE *pfile, const char *fname) + { if ( pfile != stdprn ) + fclose(pfile); } diff -rc2N gs24/gp_iwatc.c gs241/gp_iwatc.c *** gs24/gp_iwatc.c Sat Mar 21 03:38:34 1992 --- gs241/gp_iwatc.c Mon Apr 13 05:57:34 1992 *************** *** 32,38 **** --- 32,42 ---- unsigned _stklen = 8000; /* default is 4096, we need more */ + /* Define a substitute for stdprn (see below). */ + private FILE *gs_stdprn; + /* Forward declarations */ private void handle_FPE(P1(int)); + /* Do platform-dependent initialization. */ extern void gp_init_console(P0()); void *************** *** 39,42 **** --- 43,47 ---- gp_init() { _fmode = O_BINARY; /* Open files in 'binary' mode */ + gs_stdprn = 0; /* Set up the handler for numeric exceptions. */ signal(SIGFPE, handle_FPE); *************** *** 50,53 **** --- 55,96 ---- { eprintf("Numeric exception:\n"); exit(1); + } + + /* Do platform-dependent cleanup. */ + void + gp_exit() + { + } + + /* ------ Printer accessing ------ */ + + /* Open a connection to a printer. A null file name means use the */ + /* standard printer connected to the machine, if any. */ + /* Return NULL if the connection could not be opened. */ + extern void gp_set_printer_binary(P1(int)); + FILE * + gp_open_printer(char *fname) + { if ( strlen(fname) == 0 || !strcmp(fname, "PRN") ) + { if ( gs_stdprn == 0 ) + { /* We have to effectively reopen the printer, */ + /* because the Watcom library does \n -> \r\n */ + /* substitution on the stdprn stream. */ + int fno = dup(fileno(stdprn)); + setmode(fno, O_BINARY); + gs_stdprn = fdopen(fno, "wb"); + gp_set_printer_binary(fileno(gs_stdprn)); + } + return gs_stdprn; + } + else + return fopen(fname, "wb"); + } + + /* Close the connection to the printer. */ + void + gp_close_printer(FILE *pfile, const char *fname) + { fclose(pfile); + if ( pfile == gs_stdprn ) + gs_stdprn = 0; } diff -rc2N gs24/gp_msdos.c gs241/gp_msdos.c *** gs24/gp_msdos.c Sat Mar 21 03:38:36 1992 --- gs241/gp_msdos.c Mon Apr 13 05:56:24 1992 *************** *** 21,24 **** --- 21,25 ---- /* Common platform-specific routines for MS-DOS (any compiler) */ #include + #include #include "dos_.h" #include "string_.h" *************** *** 61,91 **** /* ------ Printer accessing ------ */ ! /* Open a connection to a printer. A null file name means use the */ ! /* standard printer connected to the machine, if any. */ ! /* Return NULL if the connection could not be opened. */ ! FILE * ! gp_open_printer(char *fname) ! { if ( strlen(fname) == 0 || !strcmp(fname, "PRN") ) ! { union REGS regs; ! regs.h.ah = 0x44; /* ioctl */ ! regs.h.al = 0; /* get device info */ ! regs.rshort.bx = fileno(stdprn); ! intdos(®s, ®s); ! regs.h.dl |= 0x20; /* binary (no ^Z intervention) */ ! regs.h.dh = 0; ! regs.h.ah = 0x44; /* ioctl */ ! regs.h.al = 1; /* set device info */ ! intdos(®s, ®s); ! return stdprn; ! } ! else ! return fopen(fname, "wb"); ! } ! ! /* Close the connection to the printer. */ void ! gp_close_printer(FILE *pfile, const char *fname) ! { if ( pfile != stdprn ) ! fclose(pfile); } --- 62,79 ---- /* ------ Printer accessing ------ */ ! /* Put the printer into binary mode. This is not a standard gp procedure, */ ! /* but all MS-DOS configurations need it. */ void ! gp_set_printer_binary(int prnfno) ! { union REGS regs; ! regs.h.ah = 0x44; /* ioctl */ ! regs.h.al = 0; /* get device info */ ! regs.rshort.bx = prnfno; ! intdos(®s, ®s); ! regs.h.dl |= 0x20; /* binary (no ^Z intervention) */ ! regs.h.dh = 0; ! regs.h.ah = 0x44; /* ioctl */ ! regs.h.al = 1; /* set device info */ ! intdos(®s, ®s); } diff -rc2N gs24/gp_unix.c gs241/gp_unix.c *** gs24/gp_unix.c Fri Mar 20 10:01:56 1992 --- gs241/gp_unix.c Wed Apr 8 00:21:34 1992 *************** *** 31,37 **** extern int pclose(); ! /* Do platform-dependent initialization */ void gp_init() { } --- 31,43 ---- extern int pclose(); ! /* Do platform-dependent initialization. */ void gp_init() + { + } + + /* Do platform-dependent cleanup. */ + void + gp_exit() { } diff -rc2N gs24/gp_vms.c gs241/gp_vms.c *** gs24/gp_vms.c Thu Mar 19 17:51:00 1992 --- gs241/gp_vms.c Wed Apr 8 00:21:12 1992 *************** *** 59,65 **** } ! /* Do platform-dependent interpreter initialization */ void gp_init() { } --- 59,71 ---- } ! /* Do platform-dependent initialization. */ void gp_init() + { + } + + /* Do platform-dependent cleanup. */ + void + gp_exit() { } diff -rc2N gs24/gs.c gs241/gs.c *** gs24/gs.c Fri Mar 20 03:57:26 1992 --- gs241/gs.c Tue Apr 21 05:19:18 1992 *************** *** 29,32 **** --- 29,40 ---- #include "store.h" #include "stream.h" + + #ifndef GS_LIB + # define GS_LIB "GS_LIB" + #endif + + #ifndef PROGRAM_NAME + # define PROGRAM_NAME "Ghostscript" + #endif /* Library routines not declared in a standard header */ *************** *** 38,42 **** const char **gs_lib_paths; private int gs_lib_count; ! private const char *gs_lib_env_path; /* Configuration information imported from gconfig.c. */ --- 46,50 ---- const char **gs_lib_paths; private int gs_lib_count; ! private char *gs_lib_env_path; /* Configuration information imported from gconfig.c. */ *************** *** 43,46 **** --- 51,55 ---- extern const char *gs_lib_default_path; extern const char *gs_init_file; + extern ref gs_init_file_array[]; /* Device procedures imported from gsdevice.c. */ *************** *** 74,77 **** --- 83,88 ---- /* Forward references */ + private int esc_strlen(P1(const char *)); + private void esc_strcat(P2(char *, const char *)); private void runarg(P4(char **, char *, char *, int)); private void run_string(P1(char *)); *************** *** 103,111 **** /* Initialize the file search paths */ gs_lib_env_path = 0; ! { char *lib = getenv("GS_LIB"); if ( lib != 0 ) { int len = strlen(lib); gs_lib_env_path = gs_malloc(len + 1, 1, "GS_LIB"); ! strcpy((char *)gs_lib_env_path, lib); } } --- 114,122 ---- /* Initialize the file search paths */ gs_lib_env_path = 0; ! { char *lib = getenv(GS_LIB); if ( lib != 0 ) { int len = strlen(lib); gs_lib_env_path = gs_malloc(len + 1, 1, "GS_LIB"); ! strcpy(gs_lib_env_path, lib); } } *************** *** 121,125 **** quiet = 0; user_errors = 1; ! num_files = gs_main(argc, argv, "GS.MAP", swproc, argproc); if ( num_files == 0 ) { init2(); --- 132,136 ---- quiet = 0; user_errors = 1; ! num_files = gs_main(argc, argv, swproc, argproc); if ( num_files == 0 ) { init2(); *************** *** 275,278 **** --- 286,310 ---- } + /* Define versions of strlen and strcat that insert \ escapes */ + /* before \, (, and ). */ + #define needs_esc(ch) ((ch) == '(' || (ch) == ')' || (ch) == '\\') + private int + esc_strlen(const char *str) + { int n = strlen(str); + const char *p; + for ( p = str; *p; p++ ) if ( needs_esc(*p) ) n++; + return n; + } + private void + esc_strcat(char *dest, const char *src) + { char *d = dest + strlen(dest); + const char *p; + for ( p = src; *p; p++ ) + { if ( needs_esc(*p) ) *d++ = '\\'; + *d++ = *p; + } + *d = 0; + } + /* Process file names */ void *************** *** 284,292 **** { char *arg = *argp; static char *pex = ")run}execute"; ! int len = strlen(pre) + strlen(arg) + strlen(post) + strlen(pex) + 1; char *line; int i; for ( i = 1; i <= nstrs; i++ ) ! len += strlen(argp[i]) + 2; init2(); /* Finish initialization */ line = gs_malloc(len, 1, "argproc"); --- 316,324 ---- { char *arg = *argp; static char *pex = ")run}execute"; ! int len = strlen(pre) + esc_strlen(arg) + strlen(post) + strlen(pex) + 1; char *line; int i; for ( i = 1; i <= nstrs; i++ ) ! len += esc_strlen(argp[i]) + 2; init2(); /* Finish initialization */ line = gs_malloc(len, 1, "argproc"); *************** *** 298,306 **** for ( i = 1; i <= nstrs; i++ ) { strcat(line, "("); ! strcat(line, argp[i]); strcat(line, ")"); } strcat(line, post); ! strcat(line, arg); strcat(line, pex); run_string(line); --- 330,338 ---- for ( i = 1; i <= nstrs; i++ ) { strcat(line, "("); ! esc_strcat(line, argp[i]); strcat(line, ")"); } strcat(line, post); ! esc_strcat(line, arg); strcat(line, pex); run_string(line); *************** *** 337,340 **** --- 369,382 ---- interp_init(1); /* requires obj_init */ op_init(); /* requires obj_init, scan_init */ + /* Set up the array of additional initialization files. */ + { ref *ifp = gs_init_file_array; + ref ifa; + for ( ; ifp->value.bytes != 0; ifp++ ) + r_set_size(ifp, strlen((const char *)ifp->value.bytes)); + make_tasv(&ifa, t_array, a_read + a_execute, + ifp - gs_init_file_array, refs, + gs_init_file_array); + initial_enter_name("INITFILES", &ifa); + } /* Execute the standard initialization file. */ run_file(gs_init_file, user_errors); diff -rc2N gs24/gs.mak gs241/gs.mak *** gs24/gs.mak Tue Mar 24 16:10:32 1992 --- gs241/gs.mak Tue Apr 21 04:15:04 1992 *************** *** 27,30 **** --- 27,33 ---- # DEVICE_DEVS - the devices to include in the executable. # See devs.mak for details. + # DEVICE_DEVS2...DEVICE_DEVS5 - additional devices, if the definition of + # DEVICE_DEVS doesn't fit on one line. + # See devs.mak for details. # FEATURE_DEVS - the optional features to include in the # executable. Current features are: *************** *** 60,63 **** --- 63,68 ---- # AK - if source files must be converted from ANSI to K&R syntax, # this is ansi2knr$(XE); if not, it is null. + # 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. *************** *** 158,161 **** --- 163,167 ---- gxfont_h=gxfont.h $(gsfont_h) gximage_h=gximage.h + gxlum_h=gxlum.h gxmatrix_h=gxmatrix.h $(gsmatrix_h) gxop1_h=gxop1.h *************** *** 184,188 **** gxcolor.$(OBJ): gxcolor.c $(GXERR) \ ! $(gxfixed_h) $(gxmatrix_h) $(gxdevice_h) $(gzcolor_h) $(gzht_h) $(gzstate_h) gxcpath.$(OBJ): gxcpath.c $(GXERR) \ --- 190,194 ---- gxcolor.$(OBJ): gxcolor.c $(GXERR) \ ! $(gxfixed_h) $(gxmatrix_h) $(gxdevice_h) $(gxlum_h) $(gzcolor_h) $(gzht_h) $(gzstate_h) gxcpath.$(OBJ): gxcpath.c $(GXERR) \ *************** *** 190,194 **** gxdither.$(OBJ): gxdither.c $(GX) \ ! $(gxfixed_h) $(gxmatrix_h) $(gzstate_h) $(gzdevice_h) $(gzcolor_h) $(gzht_h) gxdraw.$(OBJ): gxdraw.c $(GX) \ --- 196,200 ---- gxdither.$(OBJ): gxdither.c $(GX) \ ! $(gxfixed_h) $(gxlum_h) $(gxmatrix_h) $(gzstate_h) $(gzdevice_h) $(gzcolor_h) $(gzht_h) gxdraw.$(OBJ): gxdraw.c $(GX) \ *************** *** 274,282 **** $(gs_h) $(gxdevice_h) $(gxdevmem_h) $(gdevmem_h) ###### Files dependent on the installed devices, features, and platform. ###### Generating gconfig.h also generates obj*.tr and lib.tr. ! gconfig.h gconfig.ps obj.tr lib.tr: devs.mak $(MAKEFILE) $(UNIQ) $(DEVICE_DEVS) $(FEATURE_DEVS) $(PLATFORM).dev $(SHP)gsconfig $(DEVICE_DEVS) + $(SHP)gsconfig + $(FEATURE_DEVS) $(PLATFORM).dev --- 280,297 ---- $(gs_h) $(gxdevice_h) $(gxdevmem_h) $(gdevmem_h) + gdevmem3.$(OBJ): gdevmem3.c $(AK) \ + $(gs_h) $(gxdevice_h) $(gxdevmem_h) $(gdevmem_h) + ###### Files dependent on the installed devices, features, and platform. ###### Generating gconfig.h also generates obj*.tr and lib.tr. ! gconfig.h obj.tr objw.tr lib.tr: devs.mak $(MAKEFILE) $(UNIQ) \ ! $(DEVICE_DEVS) $(DEVICE_DEVS2) $(DEVICE_DEVS3) $(DEVICE_DEVS4) $(DEVICE_DEVS5)\ ! $(FEATURE_DEVS) $(PLATFORM).dev $(SHP)gsconfig $(DEVICE_DEVS) + + $(SHP)gsconfig + $(DEVICE_DEVS2) + + $(SHP)gsconfig + $(DEVICE_DEVS3) + + $(SHP)gsconfig + $(DEVICE_DEVS4) + + $(SHP)gsconfig + $(DEVICE_DEVS5) + $(SHP)gsconfig + $(FEATURE_DEVS) $(PLATFORM).dev *************** *** 296,300 **** gxdither.$(OBJ) gxdraw.$(OBJ) gxfill.$(OBJ) \ gxht.$(OBJ) gxpath.$(OBJ) gxpath2.$(OBJ) gxstroke.$(OBJ) \ ! gdevmem1.$(OBJ) gdevmem2.$(OBJ) gconfig.$(OBJ) # ------------------------------ Interpreter ------------------------------ # --- 311,315 ---- gxdither.$(OBJ) gxdraw.$(OBJ) gxfill.$(OBJ) \ gxht.$(OBJ) gxpath.$(OBJ) gxpath2.$(OBJ) gxstroke.$(OBJ) \ ! gdevmem1.$(OBJ) gdevmem2.$(OBJ) gdevmem3.$(OBJ) gconfig.$(OBJ) # ------------------------------ Interpreter ------------------------------ # *************** *** 306,309 **** --- 321,325 ---- ccfont_h=ccfont.h dict_h=dict.h + dstack_h=dstack.h errors_h=errors.h estack_h=estack.h *************** *** 332,335 **** --- 348,352 ---- comp1_h=comp1.h $(ghost_h) $(oper_h) $(gserrors_h) $(gxfixed_h) $(gxop1_h) + gdevpccm_h=gdevpccm.h gdevpcl_h=gdevpcl.h gdevprn_h=gdevprn.h $(memory__h) $(string__h) $(gs_h) \ *************** *** 344,348 **** iccfont.$(OBJ): iccfont.c $(GH) \ ! $(ghost_h) $(alloc_h) $(ccfont_h) $(dict_h) $(errors_h) $(name_h) $(save_h) $(store_h) idebug.$(OBJ): idebug.c $(GH) \ --- 361,365 ---- iccfont.$(OBJ): iccfont.c $(GH) \ ! $(ghost_h) $(alloc_h) $(ccfont_h) $(dict_h) $(dstack_h) $(errors_h) $(name_h) $(save_h) $(store_h) idebug.$(OBJ): idebug.c $(GH) \ *************** *** 349,355 **** $(iutil_h) $(dict_h) $(name_h) $(ostack_h) $(opdef_h) $(packed_h) $(store_h) ! idict.$(OBJ): idict.c $(GH) $(alloc_h) $(errors_h) $(name_h) $(packed_h) $(save_h) $(store_h) $(iutil_h) $(dict_h) ! iinit.$(OBJ): iinit.c $(GH) gconfig.h $(alloc_h) $(dict_h) $(errors_h) $(name_h) $(oper_h) $(store_h) iname.$(OBJ): iname.c $(GH) $(alloc_h) $(errors_h) $(name_h) $(store_h) --- 366,372 ---- $(iutil_h) $(dict_h) $(name_h) $(ostack_h) $(opdef_h) $(packed_h) $(store_h) ! idict.$(OBJ): idict.c $(GH) $(alloc_h) $(errors_h) $(name_h) $(packed_h) $(save_h) $(store_h) $(iutil_h) $(dict_h) $(dstack_h) ! iinit.$(OBJ): iinit.c $(GH) gconfig.h $(alloc_h) $(dict_h) $(dstack_h) $(errors_h) $(name_h) $(oper_h) $(store_h) iname.$(OBJ): iname.c $(GH) $(alloc_h) $(errors_h) $(name_h) $(store_h) *************** *** 357,361 **** isave.$(OBJ): isave.c $(GH) $(alloc_h) $(astate_h) $(name_h) $(packed_h) $(save_h) $(store_h) ! iscan.$(OBJ): iscan.c $(GH) $(alloc_h) $(dict_h) $(errors_h) $(iutil_h) \ $(name_h) $(ostack_h) $(packed_h) $(store_h) $(stream_h) $(scanchar_h) --- 374,378 ---- isave.$(OBJ): isave.c $(GH) $(alloc_h) $(astate_h) $(name_h) $(packed_h) $(save_h) $(store_h) ! iscan.$(OBJ): iscan.c $(GH) $(alloc_h) $(dict_h) $(dstack_h) $(errors_h) $(iutil_h) \ $(name_h) $(ostack_h) $(packed_h) $(store_h) $(stream_h) $(scanchar_h) *************** *** 381,385 **** zcontrol.$(OBJ): zcontrol.c $(OP) $(estack_h) $(iutil_h) $(store_h) ! zdict.$(OBJ): zdict.c $(OP) $(dict_h) $(store_h) zfile.$(OBJ): zfile.c $(OP) $(gp_h) \ --- 398,402 ---- zcontrol.$(OBJ): zcontrol.c $(OP) $(estack_h) $(iutil_h) $(store_h) ! zdict.$(OBJ): zdict.c $(OP) $(dict_h) $(dstack_h) $(store_h) zfile.$(OBJ): zfile.c $(OP) $(gp_h) \ *************** *** 396,400 **** zmath.$(OBJ): zmath.c $(OP) $(store_h) ! zmisc.$(OBJ): zmisc.c $(OP) $(gp_h) $(alloc_h) $(dict_h) $(name_h) $(packed_h) $(store_h) \ $(gstype1_h) $(gxfixed_h) --- 413,418 ---- zmath.$(OBJ): zmath.c $(OP) $(store_h) ! zmisc.$(OBJ): zmisc.c $(OP) $(gp_h) \ ! $(alloc_h) $(dict_h) $(dstack_h) $(name_h) $(packed_h) $(store_h) \ $(gstype1_h) $(gxfixed_h) *************** *** 414,418 **** ztype.$(OBJ): ztype.c $(OP) $(dict_h) $(iutil_h) $(name_h) $(stream_h) $(store_h) ! zvmem.$(OBJ): zvmem.c $(OP) $(alloc_h) $(dict_h) $(estack_h) $(save_h) $(state_h) $(store_h) \ $(gsmatrix_h) $(gsstate_h) --- 432,436 ---- ztype.$(OBJ): ztype.c $(OP) $(dict_h) $(iutil_h) $(name_h) $(stream_h) $(store_h) ! zvmem.$(OBJ): zvmem.c $(OP) $(alloc_h) $(dict_h) $(dstack_h) $(estack_h) $(save_h) $(state_h) $(store_h) \ $(gsmatrix_h) $(gsstate_h) *************** *** 419,423 **** ###### Graphics operators ! zchar.$(OBJ): zchar.c $(OP) $(gxmatrix_h) $(gschar_h) $(gstype1_h) $(gxdevice_h) $(gxfixed_h) $(gxfont_h) $(gzpath_h) $(gzstate_h) $(alloc_h) $(dict_h) $(font_h) $(estack_h) $(state_h) $(store_h) zcolor.$(OBJ): zcolor.c $(OP) $(alloc_h) $(estack_h) $(gxfixed_h) $(gxmatrix_h) $(gzstate_h) $(gxdevice_h) $(gzcolor_h) $(iutil_h) $(state_h) $(store_h) --- 437,441 ---- ###### Graphics operators ! zchar.$(OBJ): zchar.c $(OP) $(gxmatrix_h) $(gschar_h) $(gstype1_h) $(gxdevice_h) $(gxfixed_h) $(gxfont_h) $(gzpath_h) $(gzstate_h) $(alloc_h) $(dict_h) $(dstack_h) $(font_h) $(estack_h) $(state_h) $(store_h) zcolor.$(OBJ): zcolor.c $(OP) $(alloc_h) $(estack_h) $(gxfixed_h) $(gxmatrix_h) $(gzstate_h) $(gxdevice_h) $(gzcolor_h) $(iutil_h) $(state_h) $(store_h) *************** *** 474,478 **** ibnum.$(OBJ): ibnum.c $(GH) $(errors_h) $(stream_h) $(bnum_h) $(btoken_h) ! ibscan.$(OBJ): ibscan.c $(GH) $(errors_h) $(alloc_h) $(dict_h) $(iutil_h) $(name_h) $(ostack_h) $(save_h) $(store_h) $(stream_h) $(bseq_h) $(btoken_h) $(bnum_h) zbseq.$(OBJ): zbseq.c $(OP) $(save_h) $(store_h) $(stream_h) $(file_h) $(name_h) $(bnum_h) $(btoken_h) $(bseq_h) --- 492,497 ---- ibnum.$(OBJ): ibnum.c $(GH) $(errors_h) $(stream_h) $(bnum_h) $(btoken_h) ! ibscan.$(OBJ): ibscan.c $(GH) $(errors_h) \ ! $(alloc_h) $(dict_h) $(dstack_h) $(iutil_h) $(name_h) $(ostack_h) $(save_h) $(store_h) $(stream_h) $(bseq_h) $(btoken_h) $(bnum_h) zbseq.$(OBJ): zbseq.c $(OP) $(save_h) $(store_h) $(stream_h) $(file_h) $(name_h) $(bnum_h) $(btoken_h) $(bseq_h) *************** *** 482,486 **** zupath.$(OBJ): zupath.c $(OP) \ ! $(dict_h) $(iutil_h) $(state_h) $(store_h) $(stream_h) $(bnum_h) \ $(gscoord_h) $(gsmatrix_h) $(gspaint_h) $(gspath_h) $(gsstate_h) \ $(gxfixed_h) $(gxdevice_h) $(gxpath_h) --- 501,505 ---- zupath.$(OBJ): zupath.c $(OP) \ ! $(dict_h) $(dstack_h) $(iutil_h) $(state_h) $(store_h) $(stream_h) $(bnum_h) \ $(gscoord_h) $(gsmatrix_h) $(gspaint_h) $(gspath_h) $(gsstate_h) \ $(gxfixed_h) $(gxdevice_h) $(gxpath_h) *************** *** 555,559 **** $(SHP)gssetmod ccfonts $(ccfonts_) iccfont.$(OBJ) $(SHP)gsaddmod ccfonts -oper font_Ugly font_Courier - $(SHP)gsaddmod ccfonts -ps gs_ccfnt ugly.$(OBJ): ugly.c $(CCFONT) --- 574,577 ---- *************** *** 561,564 **** --- 579,586 ---- cour.$(OBJ): cour.c $(CCFONT) + psyr.$(OBJ): psyr.c $(CCFONT) + + pzdr.$(OBJ): pzdr.c $(CCFONT) + # ----------------------------- Main program ------------------------------ # *************** *** 571,575 **** interp.$(OBJ): interp.c $(GH) \ ! $(errors_h) $(estack_h) $(name_h) $(dict_h) $(oper_h) $(ostack_h) $(packed_h) $(save_h) $(store_h) $(stream_h) $(CCINT) interp.c --- 593,597 ---- interp.$(OBJ): interp.c $(GH) \ ! $(errors_h) $(estack_h) $(name_h) $(dict_h) $(dstack_h) $(oper_h) $(ostack_h) $(packed_h) $(save_h) $(store_h) $(stream_h) $(CCINT) interp.c diff -rc2N gs24/gs.tr gs241/gs.tr *** gs24/gs.tr Fri Feb 7 02:52:24 1992 --- gs241/gs.tr Sun Apr 12 15:05:16 1992 *************** *** 1,3 **** ! gs gsmain trace+ ialloc idebug idict iinit iname+ interp isave iscan iutil sfilter stream+ --- 1,3 ---- ! gs gsmain+ ialloc idebug idict iinit iname+ interp isave iscan iutil sfilter stream+ *************** *** 12,14 **** gxcache gxclist gxcolor gxcpath gxdither gxdraw gxfill+ gxht gxpath gxpath2 gxstroke+ ! gdevmem1 gdevmem2 gconfig+ --- 12,14 ---- gxcache gxclist gxcolor gxcpath gxdither gxdraw gxfill+ gxht gxpath gxpath2 gxstroke+ ! gdevmem1 gdevmem2 gdevmem3 gconfig+ diff -rc2N gs24/gs_ccfnt.ps gs241/gs_ccfnt.ps *** gs24/gs_ccfnt.ps Sat Feb 29 05:44:28 1992 --- gs241/gs_ccfnt.ps *************** *** 1,42 **** - % Copyright (C) 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. - - % Initialization file to register precompiled fonts. - - % Find all the precompiled font operators in systemdict. - mark systemdict - { pop dup length 6 gt - { dup =string cvs 0 6 getinterval (.font_) ne { pop } if } - { pop } - ifelse - } - forall - - % Create the fonts, and fix up the Encoding if needed. - counttomark dup dict begin - { dup cvx exec dup begin - Encoding type /stringtype eq - { Encoding cvn cvx exec /Encoding exch def - } - if - exch pop FontName exch - end def - } - repeat pop - currentdict end /CompiledFonts exch def --- 0 ---- diff -rc2N gs24/gs_fonts.ps gs241/gs_fonts.ps *** gs24/gs_fonts.ps Thu Mar 5 17:04:56 1992 --- gs241/gs_fonts.ps Mon Apr 20 17:44:16 1992 *************** *** 31,34 **** --- 31,43 ---- /defaultfontname /Ugly def + % Put an entry into a dictionary, with automatic expansion. + /.xput + { 2 index length 3 index maxlength eq + { 3 copy pop known not + { 2 index dup length 3 mul 2 idiv 1 add setmaxlength + } if + } if + put + } bind def % Internal procedure to load the font name -> font file name map *************** *** 47,51 **** { % The stack contains a mark, the dictionary, the font name, % the file name, and additional information about the font. ! counttomark 3 sub { pop } repeat put 1 index } bind def --- 56,60 ---- { % The stack contains a mark, the dictionary, the font name, % the file name, and additional information about the font. ! counttomark 3 sub { pop } repeat .xput 1 index } bind def *************** *** 92,96 **** stopped { count d sub { pop } repeat end /invalidfont signalerror } ! { end dup FontDirectory 4 2 roll put } ifelse } odef --- 101,105 ---- stopped { count d sub { pop } repeat end /invalidfont signalerror } ! { end dup FontDirectory 4 2 roll .xput } ifelse } odef *************** *** 317,321 **** { DISKFONTS { 1 index (r) file ! FontFileDirectory exch 4 index exch put } if --- 326,330 ---- { DISKFONTS { 1 index (r) file ! FontFileDirectory exch 4 index exch .xput } if *************** *** 404,407 **** --- 413,434 ---- end } bind def + + % Find all the precompiled font operators in systemdict. + systemdict + { exch =string cvs (.font_) anchorsearch + { pop pop exec % execute the operator, returns the font dictionary + dup begin + Encoding type /stringtype eq + { Encoding cvn cvx exec /Encoding exch def + } + if + FontName exch + end definefont pop + } + { pop pop + } + ifelse + } + forall diff -rc2N gs24/gs_init.ps gs241/gs_init.ps *** gs24/gs_init.ps Tue Mar 24 16:14:54 1992 --- gs241/gs_init.ps Tue Apr 21 05:22:08 1992 *************** *** 24,30 **** currentdict /DEBUG known /DEBUG exch def /VMDEBUG ! DEBUG {{vmstatus pop ( ) cvs print pop ( ) print systemdict length ( ) cvs print (\n) print flush}} ! {{}} ifelse def currentdict /ASCIIOUT known /ASCIIOUT exch def --- 24,30 ---- currentdict /DEBUG known /DEBUG exch def /VMDEBUG ! DEBUG {{print vmstatus pop ( ) cvs print pop ( ) print systemdict length ( ) cvs print (\n) print flush}} ! {{pop}} ifelse def currentdict /ASCIIOUT known /ASCIIOUT exch def *************** *** 50,54 **** systemdict begin ! VMDEBUG % Define true and false. --- 50,54 ---- systemdict begin ! (START ) VMDEBUG % Define true and false. *************** *** 104,110 **** .stderr flushfile pop pop pop setmatrix initclip} odef ! % See the definition of revision below. ! /gsversion ! {revision 100 div} def /handleerror {errordict /handleerror get exec} bind def --- 104,111 ---- .stderr flushfile pop pop pop setmatrix initclip} odef ! % The "revision" is the Ghostscript release number x 100 + the sub-release. ! /gsrevision 241 def ! /gsrevisiondate ! (4/21/92) def /handleerror {errordict /handleerror get exec} bind def *************** *** 123,128 **** /pstack {0 1 count 3 sub {index ==} for} def /quit {0 .quit} odef ! % The "revision" is the Ghostscript release number x 100. ! /revision 240 def /run {dup type /filetype eq { true } --- 124,128 ---- /pstack {0 1 count 3 sub {index ==} for} def /quit {0 .quit} odef ! /revision gsrevision def /run {dup type /filetype eq { true } *************** *** 141,145 **** /stack {0 1 count 3 sub {index =} for} bind def /start { QUIET not ! {(Ghostscript ) print gsversion =only ( (3/25/92)\n) print ( Copyright (C) 1990, 1992 Aladdin Enterprises, Menlo Park, CA.\n) print ( All rights reserved.\n) print --- 141,147 ---- /stack {0 1 count 3 sub {index =} for} bind def /start { QUIET not ! {(Ghostscript ) print gsrevision 10 idiv 10 div =only ! gsrevision 10 mod dup 0 ne { (.) print =only } { pop } ifelse ! ( \() print gsrevisiondate print (\)\n) print ( Copyright (C) 1990, 1992 Aladdin Enterprises, Menlo Park, CA.\n) print ( All rights reserved.\n) print *************** *** 229,232 **** --- 231,246 ---- } bind def + % Define a few Level 2 operators that are needed by other things in + % the initialization files. + + /dicttomark % (the Level 2 >> operator) + { counttomark 2 idiv dup dict begin + { def } repeat pop currentdict end + } bind def + + (<<) cvn /mark load def + (>>) cvn /dicttomark load odef + /deviceinfo { getdeviceprops dicttomark } odef + % Define simplified versions of the composite font operators % that work with (and only with) non-composite fonts. *************** *** 277,284 **** ifelse } bind def - /dicttomark % (the Level 2 >> operator) - { counttomark 2 idiv dup dict begin - { def } repeat pop currentdict end - } bind def /finddevice { systemdict /devicedict get exch get } bind def --- 291,294 ---- *************** *** 324,332 **** stopped { (Can't find initialization file ) print ! .currentfilename = flush quit } if exch pop cvx stopped { (While reading ) print .currentfilename print (:\n) print flush ! handleerror quit } if } bind def --- 334,342 ---- stopped { (Can't find initialization file ) print ! .currentfilename = flush 1 .quit } if exch pop cvx stopped { (While reading ) print .currentfilename print (:\n) print flush ! handleerror 1 .quit } if } bind def *************** *** 364,368 **** (\n) print flush } if ! quit } if % detect error recursion $error /.inerror true put --- 374,378 ---- (\n) print flush } if ! 1 .quit } if % detect error recursion $error /.inerror true put *************** *** 500,504 **** /write==only exch def ! VMDEBUG % Define the font directory. --- 510,514 ---- /write==only exch def ! (END PROCS ) VMDEBUG % Define the font directory. *************** *** 606,609 **** --- 616,621 ---- end + (END FONTDIR/ENCS ) VMDEBUG + % Construct a dictionary of all available devices. mark *************** *** 619,622 **** --- 631,636 ---- $error /newerror false put % remove error indication + (END DEVS ) VMDEBUG + % Define statusdict, for the benefit of programs % that think they are running on a LaserWriter or similar printer. *************** *** 623,628 **** (gs_statd.ps) run % Load the initialization files for optional features. ! (gconfig.ps) run % Establish a default upper limit in the character cache, --- 637,647 ---- (gs_statd.ps) run + (END STATD ) VMDEBUG + % Load the initialization files for optional features. ! systemdict /INITFILES known ! { INITFILES { run } forall ! } ! if % Establish a default upper limit in the character cache, *************** *** 635,639 **** NOCACHE { 1 setcachelimit } if ! VMDEBUG % Load the standard font environment. --- 654,658 ---- NOCACHE { 1 setcachelimit } if ! (END CONFIG ) VMDEBUG % Load the standard font environment. *************** *** 640,643 **** --- 659,664 ---- (gs_fonts.ps) run + (END GS_FONTS ) VMDEBUG + % Create a null font. This is the initial font. 7 dict dup begin *************** *** 654,662 **** FontDirectory /NullFont undef ! % Check for precompiled fonts. ! /CompiledFonts where ! { CompiledFonts exch /CompiledFonts undef { definefont pop } forall ! } ! if % Restore the real definition of run. --- 675,679 ---- FontDirectory /NullFont undef ! (END FONTS ) VMDEBUG % Restore the real definition of run. *************** *** 682,753 **** WRITESYSTEMDICT not { systemdict readonly pop } if % Establish a default environment. ! DISPLAYING ! { systemdict /DEVICE known ! { devicedict DEVICE known not ! { (Unknown device: ) print DEVICE = ! flush quit ! } ! if } if ! defaultdevice ! false [ /DEVICEWIDTH /DEVICEHEIGHT /DEVICEXRESOLUTION /DEVICEYRESOLUTION ] ! { systemdict exch known or } ! forall ! { % Adjust the device parameters per the command line. ! getdeviceprops dicttomark begin ! 6 dict begin ! /dw HWSize 0 get def ! /dh HWSize 1 get def ! /dmat InitialMatrix def ! /dxres HWResolution 0 get def ! /dyres HWResolution 1 get def ! /DEVICEXRESOLUTION where ! { pop /drq DEVICEXRESOLUTION dxres div def ! 0 2 4 ! { dup ! dmat exch get drq mul ! dmat 3 1 roll put ! } ! for ! dw drq mul cvi /dw exch def ! /dxres DEVICEXRESOLUTION def ! } ! if ! /DEVICEYRESOLUTION where ! { pop /drq DEVICEYRESOLUTION dyres div def ! 1 2 5 ! { dup ! dmat exch get drq mul ! dmat 3 1 roll put ! } ! for ! dh drq mul cvi /dh exch def ! /dyres DEVICEYRESOLUTION def ! } ! if ! /DEVICEWIDTH where ! { pop /dw DEVICEWIDTH def } ! if ! /DEVICEHEIGHT where ! { pop /dh DEVICEHEIGHT def } ! if ! mark ! /HWSize [ dw dh ] /HWResolution [ dxres dyres ] /InitialMatrix dmat ! defaultdevice putdeviceprops ! end end } if ! systemdict /OUTPUTFILE known ! { mark /OutputFile OUTPUTFILE 4 -1 roll putdeviceprops } if ! setdevice % does an erasepage ! } ! { nulldevice } ! ifelse 1 setflat % initgraphics doesn't set this { } settransfer % ditto --- 699,778 ---- WRITESYSTEMDICT not { systemdict readonly pop } if + % Define a procedure for skipping over an unneeded section of code. + % This avoids allocating space for the skipped procedures. + /.skipeof % string -> + { { dup currentfile =string readline pop eq { exit } if } loop pop + } bind def + % Establish a default environment. ! ! DISPLAYING not ! { nulldevice (%END DISPLAYING) .skipeof ! } if ! systemdict /DEVICE known ! { devicedict DEVICE known not ! { (Unknown device: ) print DEVICE = ! flush 1 .quit } if ! } ! if ! defaultdevice ! systemdict /DEVICEWIDTH known ! systemdict /DEVICEHEIGHT known or ! systemdict /DEVICEXRESOLUTION known or ! systemdict /DEVICEYRESOLUTION known or ! not { (%END DEVICE) .skipeof } if ! % Adjust the device parameters per the command line. ! getdeviceprops dicttomark begin ! 6 dict begin ! /dw HWSize 0 get def ! /dh HWSize 1 get def ! /dmat InitialMatrix def ! /dxres HWResolution 0 get def ! /dyres HWResolution 1 get def ! /DEVICEXRESOLUTION where ! { pop /drq DEVICEXRESOLUTION dxres div def ! 0 2 4 ! { dup ! dmat exch get drq mul ! dmat 3 1 roll put } ! for ! dw drq mul cvi /dw exch def ! /dxres DEVICEXRESOLUTION def } if ! /DEVICEYRESOLUTION where ! { pop /drq DEVICEYRESOLUTION dyres div def ! 1 2 5 ! { dup ! dmat exch get drq mul ! dmat 3 1 roll put ! } ! for ! dh drq mul cvi /dh exch def ! /dyres DEVICEYRESOLUTION def ! } ! if ! /DEVICEWIDTH where ! { pop /dw DEVICEWIDTH def } ! if ! /DEVICEHEIGHT where ! { pop /dh DEVICEHEIGHT def } if ! mark ! /HWSize [ dw dh ] /HWResolution [ dxres dyres ] /InitialMatrix dmat ! defaultdevice putdeviceprops ! end end ! %END DEVICE ! systemdict /OUTPUTFILE known ! { mark /OutputFile OUTPUTFILE 4 -1 roll putdeviceprops } ! if ! setdevice % does an erasepage ! %END DISPLAYING ! 1 setflat % initgraphics doesn't set this { } settransfer % ditto *************** *** 754,758 **** 72 72 dtransform abs exch abs min % min(|dpi x|,|dpi y|) ! dup 200 lt systemdict /DITHERPPI known not and { % Low-res device, use ordered dither spot function % The following 'ordered dither' spot function was contributed by --- 779,783 ---- 72 72 dtransform abs exch abs min % min(|dpi x|,|dpi y|) ! dup 150 lt systemdict /DITHERPPI known not and { % Low-res device, use ordered dither spot function % The following 'ordered dither' spot function was contributed by *************** *** 795,800 **** gsave - VMDEBUG - % Define control-D as a no-op. This is a hack to get around problems % in some common PostScript-generating applications. --- 820,823 ---- *************** *** 804,807 **** --- 827,832 ---- % Turn off array packing for interactive use. false setpacking + + (END INIT ) VMDEBUG QUIET not { (done.\n) print flush } if diff -rc2N gs24/gs_lev2.ps gs241/gs_lev2.ps *** gs24/gs_lev2.ps Sun Feb 16 17:41:10 1992 --- gs241/gs_lev2.ps Tue Apr 7 16:37:22 1992 *************** *** 21,29 **** % When this is run, systemdict is still writable. - % ------ Dictionaries ------ % - - (<<) cvn /mark load def - (>>) cvn /dicttomark load odef - % ------ Painting ------ % --- 21,24 ---- diff -rc2N gs24/gsaddres gs241/gsaddres *** gs24/gsaddres Mon Mar 16 17:58:58 1992 --- gs241/gsaddres Tue Apr 21 05:16:56 1992 *************** *** 22,26 **** -ps) shift for f in $*; do ! echo \(${f}.ps\) run >>_temp_.dps done;; esac --- 22,26 ---- -ps) shift for f in $*; do ! echo psfile_\(\"${f}.ps\"\) >>_temp_.dps done;; esac diff -rc2N gs24/gsaddres.bat gs241/gsaddres.bat *** gs24/gsaddres.bat Mon Feb 3 16:13:48 1992 --- gs241/gsaddres.bat Tue Apr 21 05:16:50 1992 *************** *** 39,43 **** shift if '%1'=='' goto done ! echo (%1.ps) run >>_temp_.dps goto -ps rem - - - - - - - - done - - - - - - - - --- 39,43 ---- shift if '%1'=='' goto done ! echo psfile_("%1.ps") >>_temp_.dps goto -ps rem - - - - - - - - done - - - - - - - - diff -rc2N gs24/gsbj.bat gs241/gsbj.bat *** gs24/gsbj.bat Thu Feb 27 02:31:06 1992 --- gs241/gsbj.bat Sat Apr 18 04:26:42 1992 *************** *** 1 **** ! @gs -q -A -sDEVICE=bj10e -dDISKFONTS -dNOPAUSE -- gslp.ps %1 %2 %3 %4 %5 %6 %7 %8 %9 \ No newline at end of file --- 1 ---- ! @gs -q -sDEVICE=bj10e -dDISKFONTS -dNOPAUSE -- gslp.ps %1 %2 %3 %4 %5 %6 %7 %8 %9 \ No newline at end of file diff -rc2N gs24/gschar.c gs241/gschar.c *** gs24/gschar.c Fri Mar 6 11:32:10 1992 --- gs241/gschar.c Wed Apr 8 09:29:36 1992 *************** *** 1,3 **** ! /* Copyright (C) 1989, 1990, 1991 Aladdin Enterprises. All rights reserved. Distributed by Free Software Foundation, Inc. --- 1,3 ---- ! /* Copyright (C) 1989, 1992 Aladdin Enterprises. All rights reserved. Distributed by Free Software Foundation, Inc. *************** *** 387,391 **** { case sws_none: ! return_error(gs_error_invalidfont); /* WRONG */ case sws_cache: { /* Finish installing the cache entry. */ --- 387,394 ---- { case sws_none: ! /* Adobe interpreters assume a character width of 0, */ ! /* even though the documentation says this is an error.... */ ! penum->wxy.x = penum->wxy.y = 0; ! break; case sws_cache: { /* Finish installing the cache entry. */ diff -rc2N gs24/gsconfig gs241/gsconfig *** gs24/gsconfig Tue Mar 17 10:03:32 1992 --- gs241/gsconfig Tue Apr 21 04:16:14 1992 *************** *** 5,11 **** touch _temp_.dob _temp_.dlb _temp_.d rm -f _temp_.dh _temp_.dop _temp_.dps ! echo /\* \*/ >_temp_.dh ! echo /\* \*/ >_temp_.dop ! echo % >_temp_.dps fi rm -f _temp_.c --- 5,10 ---- touch _temp_.dob _temp_.dlb _temp_.d rm -f _temp_.dh _temp_.dop _temp_.dps ! echo '/* This file was automatically generated by Ghostscript (gsconfig). */' > _temp_.dh ! touch _temp_.dop _temp_.dps fi rm -f _temp_.c *************** *** 12,16 **** cat <_temp_.c /bin/sh < _temp_.d ! rm -f obj.tr gconfig.h lib.tr gconfig.ps sort <_temp_.dob | uniq >obj.tr mv _temp_.dh gconfig.h --- 11,15 ---- cat <_temp_.c /bin/sh < _temp_.d ! rm -f obj.tr gconfig.h lib.tr sort <_temp_.dob | uniq >obj.tr mv _temp_.dh gconfig.h *************** *** 17,21 **** sort <_temp_.dop | uniq >>gconfig.h mv _temp_.dlb lib.tr ! sort <_temp_.dps | uniq >gconfig.ps rm -f _temp_.d* EOF --- 16,20 ---- sort <_temp_.dop | uniq >>gconfig.h mv _temp_.dlb lib.tr ! sort <_temp_.dps | uniq >>gconfig.h rm -f _temp_.d* EOF diff -rc2N gs24/gsconfig.bat gs241/gsconfig.bat *** gs24/gsconfig.bat Sat Mar 7 10:08:32 1992 --- gs241/gsconfig.bat Tue Apr 21 04:10:48 1992 *************** *** 3,10 **** echo + >_temp_.dob echo # >_temp_.dow ! echo /* */ >_temp_.dh echo /* */ >_temp_.dop echo + >_temp_.dlb - echo %% >_temp_.dps echo @echo off >_temp_.bat goto top --- 3,10 ---- echo + >_temp_.dob echo # >_temp_.dow ! echo /* This file was automatically generated by Ghostscript (gsconfig.bat). */ >_temp_.dh echo /* */ >_temp_.dop + echo /* */ >_temp_.dps echo + >_temp_.dlb echo @echo off >_temp_.bat goto top *************** *** 19,30 **** :done command /c _temp_.bat ! sort <_temp_.dob | %GS_RUN_EXE% uniq >obj.tr ! sort <_temp_.dow | %GS_RUN_EXE% uniq >objw.tr if exist gconfig.h erase gconfig.h rename _temp_.dh gconfig.h ! sort <_temp_.dop | %GS_RUN_EXE% uniq >>gconfig.h if exist lib.tr erase lib.tr rename _temp_.dlb lib.tr ! sort <_temp_.dps | %GS_RUN_EXE% uniq >gconfig.ps erase _temp_.d* erase _temp_.bat --- 19,30 ---- :done command /c _temp_.bat ! sort <_temp_.dob | uniq >obj.tr ! sort <_temp_.dow | uniq >objw.tr if exist gconfig.h erase gconfig.h rename _temp_.dh gconfig.h ! sort <_temp_.dop | uniq >>gconfig.h if exist lib.tr erase lib.tr rename _temp_.dlb lib.tr ! sort <_temp_.dps | uniq >>gconfig.h erase _temp_.d* erase _temp_.bat diff -rc2N gs24/gsdevice.c gs241/gsdevice.c *** gs24/gsdevice.c Wed Mar 4 18:02:24 1992 --- gs241/gsdevice.c Tue Apr 7 16:19:02 1992 *************** *** 115,119 **** /* Get the name of a device */ ! char * gs_devicename(gx_device *dev) { return dev->dname; --- 115,119 ---- /* Get the name of a device */ ! const char * gs_devicename(gx_device *dev) { return dev->dname; *************** *** 479,483 **** plist[1].value.a.size = 2; plist[2].value.a.size = 6; ! plist[3].value.a.p.s = dev->dname; plist[3].value.a.size = -1; pi = &plist[4]; --- 479,483 ---- plist[1].value.a.size = 2; plist[2].value.a.size = 6; ! plist[3].value.a.p.s = (char *)dev->dname; plist[3].value.a.size = -1; pi = &plist[4]; diff -rc2N gs24/gsfile.c gs241/gsfile.c *** gs24/gsfile.c Tue Mar 3 14:33:40 1992 --- gs241/gsfile.c Thu Apr 9 17:55:32 1992 *************** *** 35,39 **** uint rsize = raster * 3; /* * 3 just for mapped color */ byte *row = (byte *)gs_malloc(rsize, 1, "ppm file buffer"); ! char *header; int y; int code = 0; /* return code */ --- 35,39 ---- uint rsize = raster * 3; /* * 3 just for mapped color */ byte *row = (byte *)gs_malloc(rsize, 1, "ppm file buffer"); ! const char *header; int y; int code = 0; /* return code */ diff -rc2N gs24/gsimage.c gs241/gsimage.c *** gs24/gsimage.c Wed Mar 25 10:05:32 1992 --- gs241/gsimage.c Sat Apr 18 14:39:58 1992 *************** *** 274,279 **** penum->render = (spp == 1 ? image_render_mono : image_render_color); - /* If the image is 1-for-1 with the device, */ - /* we don't want to spread the samples. */ /* The following should just be an assignment of */ /* a conditional expression, but the Ultrix C compiler */ --- 274,277 ---- *************** *** 280,284 **** /* can't handle it. */ if ( penum->render == image_render_direct ) ! penum->unpack = image_unpack_8; else if ( spread != 1 ) penum->unpack = spread_procs[index_bps]; --- 278,289 ---- /* can't handle it. */ if ( penum->render == image_render_direct ) ! { penum->unpack = image_unpack_8; ! /* If the image is 1-for-1 with the device, */ ! /* we don't want to spread the samples, */ ! /* but we have to reset bps to prevent the buffer */ ! /* pointer from being incremented by 8 bytes */ ! /* per input byte. */ ! penum->bps = 8; ! } else if ( spread != 1 ) penum->unpack = spread_procs[index_bps]; *************** *** 340,344 **** uint bcount = min(dleft, rsize - pos); byte *bptr = ! penum->buffer + (pos << 3) / penum->bps * penum->spread; int px; for ( px = 0; px < penum->spread; px++ ) --- 345,349 ---- uint bcount = min(dleft, rsize - pos); byte *bptr = ! penum->buffer + (pos << 3) / penum->bps * penum->spread; int px; for ( px = 0; px < penum->spread; px++ ) *************** *** 560,563 **** --- 565,572 ---- dprintf4("[b]direct (%d,%d),(%d,%d)\n", ix, iy, iw, ih); #endif + /* Check for inverted imagemask */ + if ( penum->map4to32 == map_4_to_32_invert ) + zero = penum->icolor1.color1, + one = penum->icolor0.color1; if ( ih == 1 && h == 1 && penum->fyy >= 0 ) { /* We can do the whole thing at once. */ diff -rc2N gs24/gsmain.c gs241/gsmain.c *** gs24/gsmain.c Fri Mar 6 11:55:16 1992 --- gs241/gsmain.c Thu Apr 16 16:43:40 1992 *************** *** 31,40 **** * This routine provides the following standard services for parsing * a command line: ! * - setting debug flags (-A, -e, -E switches); ! * - tracing (-T, -Z switches) [if debugging]; * - passing other arguments and switches back to the caller. * * Calling convention: ! * gs_main(argc, argv, map_name, switch_proc, arg_proc) * Calls * switch_proc(&switch, rest_of_arg) for switches, --- 31,39 ---- * This routine provides the following standard services for parsing * a command line: ! * - setting debug flags (-A, -e, -E switches; -Z switch if debugging); * - passing other arguments and switches back to the caller. * * Calling convention: ! * gs_main(argc, argv, switch_proc, arg_proc) * Calls * switch_proc(&switch, rest_of_arg) for switches, *************** *** 53,61 **** int ! gs_main(int argc, char *argv[], const char *map_name, int (*switch_proc)(P2(char **, char *)), void (*arg_proc)(P2(char **, int))) { int argi = 1; - FILE *mapf = NULL; int arg_count = 0; gs_log_errors = 0; --- 52,59 ---- int ! gs_main(int argc, char *argv[], int (*switch_proc)(P2(char **, char *)), void (*arg_proc)(P2(char **, int))) { int argi = 1; int arg_count = 0; gs_log_errors = 0; *************** *** 120,128 **** case 'Z': #ifdef DEBUG - /* Print the address of 'main' so that */ - /* we can decipher stack traces later. */ - { extern main(); - printf("[Z]main = %lx\n", (ulong)main); - } if ( !arg[1] ) { /* No options, set all flags */ --- 118,121 ---- *************** *** 137,178 **** #endif break; - case 'T': - if ( mapf == NULL ) - { /* Open the map file and look up 'main' */ - extern FILE *trace_open_map(P2(const char *, long *)); - mapf = trace_open_map(map_name, NULL); - if ( mapf == NULL ) - { printf("Map file %s is apparently missing or malformed\n", map_name); - break; - } - /* Print the address of 'main' so that */ - /* we can decipher return addresses later. */ - { extern main(); - printf("[T]main = %lx\n", (ulong)main); - } - } - { char *delim; - char *tname; - char *targs = NULL; - int rsize = 0; - extern int trace_flush_flag; - delim = strchr(arg, ':'); - if ( delim != NULL ) - { sscanf(delim + 1, "%d", &rsize); - *delim = 0; /* terminate name */ - delim = strchr(delim + 1, ':'); - if ( delim != NULL ) - targs = delim + 1; - } - tname = gs_malloc(strlen(arg) + 1, 1, - "-T switch"); - strcpy(tname, arg); - *tname = '_'; - strupr(tname); - if ( trace_name(tname, mapf, targs, rsize) < 0 ) - printf("%s not found\n", tname); - trace_flush_flag = 1; - } - break; } } --- 130,133 ---- *************** *** 187,190 **** --- 142,146 ---- void file_close_all(P0()); int gs_closedevice(P1(gx_device *)); + void gp_exit(P0()); void gs_exit(int code) *************** *** 197,200 **** --- 153,158 ---- /* Release all memory acquired with malloc. */ gs_malloc_release(); + /* Do platform-specific cleanup. */ + gp_exit(); exit(code); } diff -rc2N gs24/gsmisc.c gs241/gsmisc.c *** gs24/gsmisc.c Sat Mar 21 07:03:10 1992 --- gs241/gsmisc.c Thu Apr 16 14:11:40 1992 *************** *** 39,62 **** byte gs_alloc_fill_free = 0xf1; - /* A handy table for counting 1-bits. */ - const byte count_bits_table[256] = { - 0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4, - 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, - 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, - 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, - 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, - 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, - 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, - 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, - 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, - 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, - 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, - 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, - 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, - 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, - 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, - 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8 - }; - /* Generate a block of unique IDs. */ static ulong gs_next_id = 0; --- 39,42 ---- *************** *** 88,123 **** gs_malloc(uint num_elts, uint elt_size, const char *client_name) { char *ptr; ! uint size; if ( num_elts > (max_uint - sizeof(malloc_block)) / elt_size ) { /* Can't represent the size in a uint! */ ! lprintf3("%s: malloc(%u,%u) too large for size_t\n", ! client_name, num_elts, elt_size); ! return 0; ! } ! size = num_elts * elt_size; ! ptr = malloc(size + sizeof(malloc_block)); ! if ( ptr == 0 ) ! { if ( gs_alloc_debug ) ! lprintf3("%s: malloc(%u,%u) failed\n", ! client_name, num_elts, elt_size); } else ! { malloc_block *bp = (malloc_block *)ptr; ! bp->next = malloc_list; ! bp->size = size; ! bp->cname = client_name; ! malloc_list = bp; ! ptr = (char *)(bp + 1); ! #ifdef DEBUG ! if ( gs_debug['A'] | gs_debug['a'] ) ! dprintf3("[a+]%lx:%u (%s)\n", ! (ulong)ptr, bp->size, client_name); ! #endif ! if ( gs_alloc_debug ) ! { /* Clear the block in an attempt to track down */ ! /* uninitialized data errors. */ ! memset(ptr, gs_alloc_fill_alloc, size); ! } } return ptr; } --- 68,100 ---- gs_malloc(uint num_elts, uint elt_size, const char *client_name) { char *ptr; ! const char *msg = ""; if ( num_elts > (max_uint - sizeof(malloc_block)) / elt_size ) { /* Can't represent the size in a uint! */ ! msg = "too large for size_t"; ! ptr = 0; } else ! { uint size = num_elts * elt_size; ! ptr = malloc(size + sizeof(malloc_block)); ! if ( ptr == 0 ) ! msg = "failed"; ! else ! { malloc_block *bp = (malloc_block *)ptr; ! bp->next = malloc_list; ! bp->size = size; ! bp->cname = client_name; ! malloc_list = bp; ! msg = "OK"; ! ptr = (char *)(bp + 1); ! if ( gs_alloc_debug ) ! { /* Clear the block in an attempt to track down */ ! /* uninitialized data errors. */ ! memset(ptr, gs_alloc_fill_alloc, size); ! } ! } } + if ( gs_alloc_debug || !*msg ) + dprintf5("gs_malloc(%s)(%u, %u) = 0x%lx: %s\n", client_name, + num_elts, elt_size, (ulong)ptr, msg); return ptr; } *************** *** 125,132 **** gs_free(char *ptr, uint num_elts, uint elt_size, const char *client_name) { malloc_block *bp = malloc_list; ! #ifdef DEBUG ! if ( gs_debug['A'] | gs_debug['a'] ) ! dprintf2("[a-]%lx:%u\n", (ulong)ptr, num_elts * elt_size); ! #endif if ( ptr == (char *)(bp + 1) ) { --- 102,108 ---- gs_free(char *ptr, uint num_elts, uint elt_size, const char *client_name) { malloc_block *bp = malloc_list; ! if ( gs_alloc_debug ) ! dprintf4("gs_free(%s)(0x%lx, %u, %u)\n", client_name, ! (ulong)ptr, num_elts, elt_size); if ( ptr == (char *)(bp + 1) ) { *************** *** 184,188 **** void memswab(const char *src, char *dest, int count) ! { register const uint *sptr = (uint *)src; register uint *dptr = (uint *)dest; register int x; --- 160,164 ---- void memswab(const char *src, char *dest, int count) ! { register const uint *sptr = (const uint *)src; register uint *dptr = (uint *)dest; register int x; *************** *** 209,219 **** { case 6: ! w = ((ushort *)sptr)[2]; ((ushort *)dptr)[2] = (w >> 8) + (w << 8); case 4: ! w = ((ushort *)sptr)[1]; ((ushort *)dptr)[1] = (w >> 8) + (w << 8); case 2: ! w = ((ushort *)sptr)[0]; ((ushort *)dptr)[0] = (w >> 8) + (w << 8); case 0: --- 185,195 ---- { case 6: ! w = ((const ushort *)sptr)[2]; ((ushort *)dptr)[2] = (w >> 8) + (w << 8); case 4: ! w = ((const ushort *)sptr)[1]; ((ushort *)dptr)[1] = (w >> 8) + (w << 8); case 2: ! w = ((const ushort *)sptr)[0]; ((ushort *)dptr)[0] = (w >> 8) + (w << 8); case 0: diff -rc2N gs24/gspath.c gs241/gspath.c *** gs24/gspath.c Wed Mar 25 10:08:30 1992 --- gs241/gspath.c Wed Apr 8 18:49:50 1992 *************** *** 153,157 **** { float w = sin0; sin0 = -cos0; cos0 = w; x3r = axc + cos0, y3r = ayc + sin0; - /* Must cast doubles to floats explicitly */ code = arc_add(pgs, ar, x0, y0, x3r, y3r, (x0 + cos0), --- 153,156 ---- *************** *** 169,173 **** { float w = cos0; cos0 = -sin0; sin0 = w; x3r = axc + cos0, y3r = ayc + sin0; - /* Must cast doubles to floats explicitly */ code = arc_add(pgs, ar, x0, y0, x3r, y3r, (x0 + cos0), --- 168,171 ---- *************** *** 181,185 **** } /* Compute the intersection of the tangents. */ ! { float trad = tan(fixed2float(adiff) * (degrees_to_radians / 2)); float ang2r = fixed2float(ang2) * degrees_to_radians; code = arc_add(pgs, ar, x0, y0, --- 179,183 ---- } /* Compute the intersection of the tangents. */ ! { double trad = tan(fixed2float(adiff) * (degrees_to_radians / 2)); float ang2r = fixed2float(ang2) * degrees_to_radians; code = arc_add(pgs, ar, x0, y0, *************** *** 220,224 **** double denom = sqrt(sql0 * sql2) - (dx0 * dx2 + dy0 * dy2); /* Check for collinear points. */ ! if ( fabs(num) < 1.0e-6 || fabs(denom) < 1.0e-6) { gs_fixed_point pt; code = gs_point_transform2fixed(&pgs->ctm, ax1, ay1, &pt); --- 218,222 ---- double denom = sqrt(sql0 * sql2) - (dx0 * dx2 + dy0 * dy2); /* Check for collinear points. */ ! if ( fabs(num) < 1.0e-6 || fabs(denom) < 1.0e-6 ) { gs_fixed_point pt; code = gs_point_transform2fixed(&pgs->ctm, ax1, ay1, &pt); *************** *** 252,262 **** int first) { gx_path *path = pgs->path; ! int code; gs_fixed_point p0, p3, pt, cpt; /* Compute the fraction coefficient for the curve. */ /* See gx_path_add_arc for details. */ ! floatp dx = xt - x0, dy = yt - y0; ! double ratio2 = (dx * dx + dy * dy) / (r * r); ! float fraction = (4.0/3.0) / (1 + sqrt(1 + ratio2)); #ifdef DEBUG if ( gs_debug['r'] ) --- 250,266 ---- int first) { gx_path *path = pgs->path; ! floatp dx = xt - x0, dy = yt - y0; ! floatp fraction; gs_fixed_point p0, p3, pt, cpt; + int code; /* Compute the fraction coefficient for the curve. */ /* See gx_path_add_arc for details. */ ! if ( fabs(r) < 1.0e-4 ) /* almost zero radius */ ! { fraction = 0.0; ! } ! else ! { double ratio2 = (dx * dx + dy * dy) / (r * r); ! fraction = (4.0/3.0) / (1 + sqrt(1 + ratio2)); ! } #ifdef DEBUG if ( gs_debug['r'] ) diff -rc2N gs24/gsprops.h gs241/gsprops.h *** gs24/gsprops.h Sat Mar 21 02:28:02 1992 --- gs241/gsprops.h Tue Apr 7 15:43:46 1992 *************** *** 88,92 **** /* Finally, define the structure of a property item. */ struct gs_prop_item_s { ! char *pname; int name_size; /* -1 means use strlen */ gs_prop_type type; --- 88,92 ---- /* Finally, define the structure of a property item. */ struct gs_prop_item_s { ! const char *pname; int name_size; /* -1 means use strlen */ gs_prop_type type; diff -rc2N gs24/gssetmod gs241/gssetmod *** gs24/gssetmod Mon Mar 16 17:57:30 1992 --- gs241/gssetmod Tue Apr 7 15:31:06 1992 *************** *** 2,4 **** --- 2,5 ---- shift rm -f ${m}.dev + echo '# This file was automatically generated by Ghostscript (gssetmod).' >${m}.dev echo ./gsaddres -obj $* >${m}.dev diff -rc2N gs24/gssetmod.bat gs241/gssetmod.bat *** gs24/gssetmod.bat Mon Nov 4 03:11:20 1991 --- gs241/gssetmod.bat Fri Apr 17 14:11:28 1992 *************** *** 1 **** ! @echo @command /c gsaddres -obj %2 %3 %4 %5 %6 %7 %8 %9 >%1.dev --- 1,3 ---- ! @echo off ! echo @rem This file was automatically generated by Ghostscript (gssetmod). >%1.dev ! gsaddmod %1 -obj %2 %3 %4 %5 %6 %7 %8 %9 diff -rc2N gs24/gsstate.c gs241/gsstate.c *** gs24/gsstate.c Fri Mar 6 11:49:24 1992 --- gs241/gsstate.c Tue Apr 7 15:40:12 1992 *************** *** 267,271 **** alloc_gstate_contents(register gs_state *pgs) { proc_alloc_t palloc = pgs->memory_procs.alloc; ! static char *cname = "alloc_gstate_contents"; #define galloc(element,type,fail)\ if ( (pgs->element = (type *)(*palloc)(1, sizeof(type), cname)) == 0 ) goto fail --- 267,271 ---- alloc_gstate_contents(register gs_state *pgs) { proc_alloc_t palloc = pgs->memory_procs.alloc; ! static const char cname[] = "alloc_gstate_contents"; #define galloc(element,type,fail)\ if ( (pgs->element = (type *)(*palloc)(1, sizeof(type), cname)) == 0 ) goto fail *************** *** 303,307 **** free_gstate_contents(gs_state *pgs) { proc_free_t pfree = pgs->memory_procs.free; ! static char *cname = "free_gstate_contents"; gx_cpath_release(pgs->clip_path); gx_path_release(pgs->path); --- 303,307 ---- free_gstate_contents(gs_state *pgs) { proc_free_t pfree = pgs->memory_procs.free; ! static const char cname[] = "free_gstate_contents"; gx_cpath_release(pgs->clip_path); gx_path_release(pgs->path); diff -rc2N gs24/gsstate.h gs241/gsstate.h *** gs24/gsstate.h Fri Mar 6 11:49:26 1992 --- gs241/gsstate.h Tue Apr 7 16:18:42 1992 *************** *** 66,70 **** int gs_setdevice(P2(gs_state *, gx_device *)); gx_device * gs_currentdevice(P1(gs_state *)); ! char * gs_devicename(P1(gx_device *)); void gs_deviceinitialmatrix(P2(gx_device *, gs_matrix *)); int gs_closedevice(P1(gx_device *)); --- 66,70 ---- int gs_setdevice(P2(gs_state *, gx_device *)); gx_device * gs_currentdevice(P1(gs_state *)); ! const char * gs_devicename(P1(gx_device *)); void gs_deviceinitialmatrix(P2(gx_device *, gs_matrix *)); int gs_closedevice(P1(gx_device *)); diff -rc2N gs24/gstype1.c gs241/gstype1.c *** gs24/gstype1.c Sun Mar 15 17:14:12 1992 --- gs241/gstype1.c Mon Apr 6 16:11:56 1992 *************** *** 100,104 **** int charpath_flag; /* 0 for show, 1 for false */ /* charpath, 2 for true charpath */ ! int paint_type; /* 0 for fill, non-0 for stroke */ fixed_coeff fc; /* cached fixed coefficients */ float flatness; /* flatness for character curves */ --- 100,104 ---- int charpath_flag; /* 0 for show, 1 for false */ /* charpath, 2 for true charpath */ ! int paint_type; /* 0/3 for fill, 1/2 for stroke */ fixed_coeff fc; /* cached fixed coefficients */ float flatness; /* flatness for character curves */ *************** *** 517,520 **** --- 517,527 ---- /* This is a real endchar. Handle it below. */ return type1_endchar(pis, pgs, sppath); + case c_undoc15: dc(" undoc15") + /* + * NOTE: this opcode is not documented by Adobe, + * but is used in some Adobe fonts. I have no idea + * what it is supposed to do. + */ + cnext; case c_rmoveto: dc("rmoveto") accum_xy(cs0, cs1); *************** *** 531,535 **** /* Fill up the dispatch up to 32. */ case c_undef0: case c_undef2: - case c_undef15: case c_undef16: case c_undef17: case c_undef18: case c_undef19: case c_undef20: case c_undef23: --- 538,541 ---- *************** *** 600,604 **** lw += c2 << 8; *++csp = int2fixed(lw); ! if ( lw != fixed2int_var(*csp) ) return_error(gs_error_rangecheck); } goto pushed; --- 606,610 ---- lw += c2 << 8; *++csp = int2fixed(lw); ! if ( lw != fixed2long(*csp) ) return_error(gs_error_rangecheck); } goto pushed; *************** *** 647,651 **** private int near type1_endchar(gs_type1_state *pis, gs_state *pgs, gx_path *ppath) ! { fixed ftx = pgs->ctm.tx_fixed, fty = pgs->ctm.ty_fixed; int code; /* Set the current point to the character origin: */ --- 653,658 ---- private int near type1_endchar(gs_type1_state *pis, gs_state *pgs, gx_path *ppath) ! { int use_stroke = pis->paint_type == 1 || pis->paint_type == 2; ! fixed ftx = pgs->ctm.tx_fixed, fty = pgs->ctm.ty_fixed; int code; /* Set the current point to the character origin: */ *************** *** 675,679 **** /* setcachedevice also adds 1 or 2 pixels, */ /* so we don't have to worry about rounding. */ ! if ( pis->paint_type ) { float adjust = gs_currentlinewidth(pgs); if ( adjust < 1 ) adjust = 1; --- 682,686 ---- /* setcachedevice also adds 1 or 2 pixels, */ /* so we don't have to worry about rounding. */ ! if ( use_stroke ) { float adjust = gs_currentlinewidth(pgs); if ( adjust < 1 ) adjust = 1; *************** *** 703,707 **** ******/ gx_color_load(pgs->dev_color, pgs); ! return (pis->paint_type ? gs_stroke(pgs) : gs_fill_adjust(pgs, float2fixed(type1_fill_adjust))); } --- 710,714 ---- ******/ gx_color_load(pgs->dev_color, pgs); ! return (use_stroke ? gs_stroke(pgs) : gs_fill_adjust(pgs, float2fixed(type1_fill_adjust))); } diff -rc2N gs24/gsutil.c gs241/gsutil.c *** gs24/gsutil.c Fri Mar 20 11:31:18 1992 --- gs241/gsutil.c Tue Apr 7 15:41:00 1992 *************** *** 107,111 **** int i, j; for ( pti = template, ppi = pknown, j = 0; j < tcount; pti++, ppi++, j++ ) ! { char *tstr = pti->pname; int tlen = pti->name_size; if ( tstr == 0 ) continue; /* no name */ --- 107,111 ---- int i, j; for ( pti = template, ppi = pknown, j = 0; j < tcount; pti++, ppi++, j++ ) ! { const char *tstr = pti->pname; int tlen = pti->name_size; if ( tstr == 0 ) continue; /* no name */ *************** *** 114,118 **** for ( pli = plist, i = 0; i < count; pli++, i++ ) if ( pli->status == pv_set ) ! { char *lstr = pli->pname; int llen = pli->name_size; if ( lstr == 0 ) continue; --- 114,118 ---- for ( pli = plist, i = 0; i < count; pli++, i++ ) if ( pli->status == pv_set ) ! { const char *lstr = pli->pname; int llen = pli->name_size; if ( lstr == 0 ) continue; diff -rc2N gs24/gsw.tr gs241/gsw.tr *** gs24/gsw.tr Wed Feb 26 18:02:48 1992 --- gs241/gsw.tr Sun Apr 12 15:05:28 1992 *************** *** 1,5 **** NAME gs OPTION MAP=gs ! FILE gs,gsmain,utrace FILE ialloc,idebug,idict,iinit,iname FILE interp,isave,iscan,iutil,sfilter,stream --- 1,5 ---- NAME gs OPTION MAP=gs ! FILE gs,gsmain FILE ialloc,idebug,idict,iinit,iname FILE interp,isave,iscan,iutil,sfilter,stream *************** *** 14,16 **** FILE gxcache,gxclist,gxcolor,gxcpath,gxdither,gxdraw,gxfill FILE gxht,gxpath,gxpath2,gxstroke ! FILE gdevmem1,gdevmem2,gconfig --- 14,16 ---- FILE gxcache,gxclist,gxcolor,gxcpath,gxdither,gxdraw,gxfill FILE gxht,gxpath,gxpath2,gxstroke ! FILE gdevmem1,gdevmem2,gdevmem3,gconfig diff -rc2N gs24/gx.h gs241/gx.h *** gs24/gx.h Fri Mar 6 11:53:18 1992 --- gs241/gx.h Fri Apr 17 16:17:36 1992 *************** *** 19,23 **** /* gx.h */ ! /* Common internal definitions for Ghostscript imaging library */ #include "gs.h" --- 19,23 ---- /* gx.h */ ! /* Common internal definitions for Ghostscript library */ #include "gs.h" *************** *** 24,27 **** --- 24,55 ---- /* Debugging options array */ extern char gs_debug[128]; + + /* Debugging printout macros. */ + #ifdef DEBUG + # define if_d_c(c)\ + if(c>='a' && c<='z' ? gs_debug[c] | gs_debug[c^32] : gs_debug[c]) + # define if_debug0(c,s)\ + if_d_c(c) dprintf(s) + # define if_debug1(c,s,a1)\ + if_d_c(c) dprintf1(s,a1) + # define if_debug2(c,s,a1,a2)\ + if_d_c(c) dprintf2(s,a1,a2) + # define if_debug3(c,s,a1,a2,a3)\ + if_d_c(c) dprintf3(s,a1,a2,a3) + # define if_debug4(c,s,a1,a2,a3,a4)\ + if_d_c(c) dprintf4(s,a1,a2,a3,a4) + # define if_debug5(c,s,a1,a2,a3,a4,a5)\ + if_d_c(c) dprintf5(s,a1,a2,a3,a4,a5) + # define if_debug6(c,s,a1,a2,a3,a4,a5,a6)\ + if_d_c(c) dprintf6(s,a1,a2,a3,a4,a5,a6) + #else + # define if_debug0(c,s) 0 + # define if_debug1(c,s,a1) 0 + # define if_debug2(c,s,a1,a2) 0 + # define if_debug3(c,s,a1,a2,a3) 0 + # define if_debug4(c,s,a1,a2,a3,a4) 0 + # define if_debug5(c,s,a1,a2,a3,a4,a5) 0 + # define if_debug6(c,s,a1,a2,a3,a4,a5,a6) 0 + #endif /* Error return macro */ diff -rc2N gs24/gxcache.c gs241/gxcache.c *** gs24/gxcache.c Fri Mar 6 11:32:00 1992 --- gs241/gxcache.c Sat Apr 18 02:21:50 1992 *************** *** 109,112 **** --- 109,114 ---- } fsize += cch->size; + if_debug2('K', "[K]merging free 0x%lx(%u)\n", + (ulong)cch, cch->size); cc->head.size = fsize; if ( fsize == cdsize || *************** *** 118,127 **** #undef hcc if ( fsize > cdsize ) ! shorten_cached_char(dir, cc, fsize - cdsize); ! #ifdef DEBUG ! if ( gs_debug['k'] | gs_debug['K'] ) ! dprintf4("[k]adding 0x%lx:%u(%u,%u)\n", ! (ulong)cc, (uint)cdsize, iwidth, iheight); ! #endif bits = cc_bits(cc); memset((char *)bits, 0, (uint)isize); --- 120,129 ---- #undef hcc if ( fsize > cdsize ) ! { shorten_cached_char(dir, cc, fsize - cdsize); ! if_debug2('K', "[K]shortening 0x%lx by %u (initial)\n", ! (ulong)cc, (uint)(fsize - cdsize)); ! } ! if_debug4('k', "[k]adding 0x%lx:%u(%u,%u)\n", ! (ulong)cc, (uint)cdsize, iwidth, iheight); bits = cc_bits(cc); memset((char *)bits, 0, (uint)isize); *************** *** 148,151 **** --- 150,155 ---- cc->head.pair->num_chars--; } + if_debug2('k', "[k]freeing 0x%lx, pair=0x%lx\n", + (ulong)cc, (ulong)cc->head.pair); cc_set_free(cc); } *************** *** 221,229 **** { shorten_cached_char(dir, cc, diff); dir->bsize -= diff; ! #ifdef DEBUG ! if ( gs_debug['K'] ) ! dprintf2("[K]shortening 0x%lx by %u\n", (ulong)cc, ! diff); ! #endif } } --- 225,230 ---- { shorten_cached_char(dir, cc, diff); dir->bsize -= diff; ! if_debug2('K', "[K]shortening 0x%lx by %u (mdev overhead)\n", ! (ulong)cc, diff); } } *************** *** 289,296 **** dev = (gx_device *)&cdev; (*dev->procs->open_device)(dev); ! #ifdef DEBUG ! if ( gs_debug['K'] ) ! dputs("[K](clipping)\n"); ! #endif } /* Copy the bits. */ --- 290,294 ---- dev = (gx_device *)&cdev; (*dev->procs->open_device)(dev); ! if_debug0('K', "[K](clipping)\n"); } /* Copy the bits. */ *************** *** 307,310 **** --- 305,310 ---- { cached_fm_pair *pair = dir->mdata; int count = dir->mmax; + if_debug1('k', "[k]purging font 0x%lx\n", + (ulong)font); while ( count-- ) { if ( pair->font == font ) purge_fm_pair(dir, pair); *************** *** 324,327 **** --- 324,329 ---- cc->head.size -= diff; next = (cached_char_head *)((byte *)cc + cc->head.size); + if_debug2('K', "[K]shortening creates free block 0x%lx(%u)\n", + (ulong)next, diff); cc_head_set_free(next); next->size = diff; *************** *** 332,335 **** --- 334,339 ---- purge_fm_pair(gs_font_dir *dir, cached_fm_pair *pair) { int chi; + if_debug1('k', "[k]purging pair 0x%lx\n", + (ulong)pair); for ( chi = dir->chars_mask; pair->num_chars != 0; ) { cached_char **pcc = dir->chars + chi--; diff -rc2N gs24/gxclist.c gs241/gxclist.c *** gs24/gxclist.c Sat Mar 14 04:22:18 1992 --- gs241/gxclist.c Thu Apr 16 18:06:32 1992 *************** *** 252,263 **** sizeof(tile_slot) + cldev->tile_band_mask_size + cldev->tile.raster * cldev->tile.size.y; ! cldev->num_tiles = cldev->tile_data_size / (sizeof(tile_hash) * 3 /*(worst case)*/ + cldev->tile_slot_size); ! hc = (cldev->num_tiles - 1) * 2; while ( (hc + 1) & hc ) hc |= hc >> 1; /* make mask */ ! if ( hc >= cldev->num_tiles * 3 ) hc >>= 1; if ( hc > 255 ) /* slot index in set_tile is only 1 byte */ { hc = 255; ! if ( cldev->num_tiles > 200 ) cldev->num_tiles = 200; } cldev->tile_hash_mask = hc; --- 252,264 ---- sizeof(tile_slot) + cldev->tile_band_mask_size + cldev->tile.raster * cldev->tile.size.y; ! cldev->tile_max_count = cldev->tile_data_size / (sizeof(tile_hash) * 3 /*(worst case)*/ + cldev->tile_slot_size); ! hc = (cldev->tile_max_count - 1) * 2; while ( (hc + 1) & hc ) hc |= hc >> 1; /* make mask */ ! if ( hc >= cldev->tile_max_count * 3 ) hc >>= 1; if ( hc > 255 ) /* slot index in set_tile is only 1 byte */ { hc = 255; ! if ( cldev->tile_max_count > 200 ) ! cldev->tile_max_count = 200; } cldev->tile_hash_mask = hc; *************** *** 265,271 **** #ifdef DEBUG if ( gs_debug['l'] | gs_debug['L'] ) ! dprintf5("[l]tile.size=%dx%d, slot_size=%d, num_tiles=%d, hc=%d\n", cldev->tile.size.x, cldev->tile.size.y, ! cldev->tile_slot_size, cldev->num_tiles, hc); #endif cldev->tile_hash_table = --- 266,272 ---- #ifdef DEBUG if ( gs_debug['l'] | gs_debug['L'] ) ! dprintf5("[l]tile.size=%dx%d, slot_size=%d, max_count=%d, hc=%d\n", cldev->tile.size.x, cldev->tile.size.y, ! cldev->tile_slot_size, cldev->tile_max_count, hc); #endif cldev->tile_hash_table = *************** *** 347,350 **** --- 348,356 ---- cb.band = band; cb.pos = ftell(cfile); + #ifdef DEBUG + if ( gs_debug['l'] | gs_debug['L'] ) + dprintf2("[l]writing for band %d at %ld\n", + band, cb.pos); + #endif clist_write(bfile, (byte *)&cb, sizeof(cb)); for ( ; cp != 0; cp = cp->next ) *************** *** 572,591 **** tile_slot *old_tile, *new_tile; int slot_index; - if ( pcls->tile == &no_tile ) - { byte *dp; - if ( tile->raster != ((tile->size.x + 31) >> 5) << 2 || - tile_size > cldev->tile_max_size - ) - return -1; - if ( tile->size.x != cldev->tile.size.x || - tile->size.y != cldev->tile.size.y - ) - { cldev->tile = *tile; /* reset size, raster */ - clist_init_tiles(cldev); - } - dp = cmd_put_op(cldev, pcls, 1 + sizeof(cldev->tile.size)); - count_op(*dp = (byte)cmd_opv_set_tile_size); - memcpy(dp + 1, &cldev->tile.size, sizeof(cldev->tile.size)); - } /* Look up the tile in the cache. */ top: { gx_bitmap_id id = tile->id; --- 578,581 ---- *************** *** 596,600 **** (probe & cldev->tile_hash_mask); if ( (slot_index = hptr->slot_index) < 0 ) /* empty entry */ ! { if ( cldev->tile_count == cldev->num_tiles ) { /* Punt. */ clist_init_tiles(cldev); --- 586,604 ---- (probe & cldev->tile_hash_mask); if ( (slot_index = hptr->slot_index) < 0 ) /* empty entry */ ! { /* Must change tiles. Check whether the */ ! /* tile size has changed. */ ! if ( tile->size.x != cldev->tile.size.x || ! tile->size.y != cldev->tile.size.y ! ) ! { if ( tile->raster != ! ((tile->size.x + 31) >> 5) << 2 || ! tile_size > cldev->tile_max_size ! ) ! return -1; ! cldev->tile = *tile; /* reset size, raster */ ! clist_init_tiles(cldev); ! goto top; ! } ! if ( cldev->tile_count == cldev->tile_max_count ) { /* Punt. */ clist_init_tiles(cldev); *************** *** 610,614 **** if ( gs_debug['L'] ) dprintf3("[L]adding tile %d, hash=%d, id=%lx\n", ! slot_index, hptr - cldev->tile_hash_table, id); #endif --- 614,619 ---- if ( gs_debug['L'] ) dprintf3("[L]adding tile %d, hash=%d, id=%lx\n", ! slot_index, ! (int)(hptr - cldev->tile_hash_table), id); #endif *************** *** 655,659 **** } else ! { if ( tile->size.x <= 16 ) { dp = cmd_put_op(cldev, pcls, 2 + (tile_size >> 1)); cmd_put_short_bits(dp + 2, new_data, tile->raster, 2, tile->size.y); --- 660,671 ---- } else ! { if ( old_tile == &no_tile ) ! { byte *dp = cmd_put_op(cldev, pcls, ! 1 + sizeof(cldev->tile.size)); ! count_op(*dp = (byte)cmd_opv_set_tile_size); ! memcpy(dp + 1, &cldev->tile.size, ! sizeof(cldev->tile.size)); ! } ! if ( tile->size.x <= 16 ) { dp = cmd_put_op(cldev, pcls, 2 + (tile_size >> 1)); cmd_put_short_bits(dp + 2, new_data, tile->raster, 2, tile->size.y); diff -rc2N gs24/gxclist.h gs241/gxclist.h *** gs24/gxclist.h Fri Feb 28 16:43:10 1992 --- gs241/gxclist.h Thu Apr 16 17:52:08 1992 *************** *** 68,72 **** /* each tile in the cache */ uint tile_count; /* # of occupied entries in cache */ ! uint num_tiles; /* capacity of the cache */ /* Following are used for both writing and reading. */ byte *tile_data; /* data for cached tiles */ --- 68,72 ---- /* each tile in the cache */ uint tile_count; /* # of occupied entries in cache */ ! uint tile_max_count; /* capacity of the cache */ /* Following are used for both writing and reading. */ byte *tile_data; /* data for cached tiles */ diff -rc2N gs24/gxcolor.c gs241/gxcolor.c *** gs24/gxcolor.c Sun Feb 16 15:39:54 1992 --- gs241/gxcolor.c Fri Apr 10 15:56:16 1992 *************** *** 1,3 **** ! /* Copyright (C) 1989, 1990, 1991 Aladdin Enterprises. All rights reserved. Distributed by Free Software Foundation, Inc. --- 1,3 ---- ! /* Copyright (C) 1989, 1992 Aladdin Enterprises. All rights reserved. Distributed by Free Software Foundation, Inc. *************** *** 23,26 **** --- 23,27 ---- #include "gserrors.h" #include "gxfixed.h" /* for gxmatrix.h */ + #include "gxlum.h" #include "gxmatrix.h" #include "gxdevice.h" /* for gx_color_index */ diff -rc2N gs24/gxcpath.c gs241/gxcpath.c *** gs24/gxcpath.c Tue Mar 24 16:02:50 1992 --- gs241/gxcpath.c Wed Apr 15 13:19:22 1992 *************** *** 1,3 **** ! /* Copyright (C) 1991 Aladdin Enterprises. All rights reserved. Distributed by Free Software Foundation, Inc. --- 1,3 ---- ! /* Copyright (C) 1991, 1992 Aladdin Enterprises. All rights reserved. Distributed by Free Software Foundation, Inc. *************** *** 171,175 **** set_pt(q, q); pseg = pseg->next; set_pt(p, q); pseg = pseg->next; ! set_pt(p, p); #undef set_pt } --- 171,176 ---- set_pt(q, q); pseg = pseg->next; set_pt(p, q); pseg = pseg->next; ! if ( pseg != 0 ) /* might be an open rectangle */ ! set_pt(p, p); #undef set_pt } *************** *** 199,205 **** if ( code < 0 ) return code; pcpath->list = adev.list; - /* The quick check must fail. */ - pcpath->cbox.p.x = pcpath->cbox.p.y = 0; - pcpath->cbox.q.x = pcpath->cbox.q.y = 0; gx_path_init(&pcpath->path, &pcpath->path.memory_procs); pcpath->path.bbox.p.x = int2fixed(adev.bbox.p.x); --- 200,203 ---- *************** *** 207,210 **** --- 205,219 ---- pcpath->path.bbox.q.x = int2fixed(adev.bbox.q.x); pcpath->path.bbox.q.y = int2fixed(adev.bbox.q.y); + /* Note that the result of the intersection might be */ + /* a single rectangle. This will cause clip_path_is_rect.. */ + /* to return true. This, in turn, requires that */ + /* we set pcpath->cbox correctly. */ + if ( clip_list_is_rectangle(&adev.list) ) + pcpath->cbox = pcpath->path.bbox; + else + { /* The quick check must fail. */ + pcpath->cbox.p.x = pcpath->cbox.p.y = 0; + pcpath->cbox.q.x = pcpath->cbox.q.y = 0; + } pcpath->segments_valid = 0; pcpath->shares_list = 0; diff -rc2N gs24/gxdevice.h gs241/gxdevice.h *** gs24/gxdevice.h Wed Mar 25 10:04:56 1992 --- gs241/gxdevice.h Tue Apr 7 15:41:20 1992 *************** *** 65,69 **** int params_size; /* size of this structure */\ gx_device_procs *procs;\ ! char *dname; /* the device name */\ int width; /* width in pixels */\ int height; /* height in pixels */\ --- 65,69 ---- int params_size; /* size of this structure */\ gx_device_procs *procs;\ ! const char *dname; /* the device name */\ int width; /* width in pixels */\ int height; /* height in pixels */\ diff -rc2N gs24/gxdevmem.h gs241/gxdevmem.h *** gs24/gxdevmem.h Fri Mar 6 01:46:26 1992 --- gs241/gxdevmem.h Sat Apr 18 15:42:32 1992 *************** *** 30,37 **** * since it's so awkward to get the effect of subclasses in C. * - ********************************************************** - ******* 2- and 4-BIT DEVICES ARE NOT SUPPORTED YET ******* - ********************************************************** - * * On little-endian machines, the bytes can be stored in either order. * Little-endian order is the default, since this allows efficient --- 30,33 ---- *************** *** 61,64 **** --- 57,62 ---- extern gx_device_memory mem_mono_device, + mem_mapped2_color_device, + mem_mapped4_color_device, mem_mapped8_color_device, mem_true16_color_device, *************** *** 70,74 **** /* for the bitmap. Here is the routine that computes this */ /* from the width and height in the device structure. */ ! extern ulong gdev_mem_bitmap_size(P1(const gx_device_memory *)); /* Determine the appropriate memory device for a given */ --- 68,72 ---- /* for the bitmap. Here is the routine that computes this */ /* from the width and height in the device structure. */ ! extern ulong gdev_mem_bitmap_size(P1(gx_device_memory *)); /* Determine the appropriate memory device for a given */ diff -rc2N gs24/gxdither.c gs241/gxdither.c *** gs24/gxdither.c Sun Feb 16 15:47:04 1992 --- gs241/gxdither.c Fri Apr 10 15:56:26 1992 *************** *** 1,3 **** ! /* Copyright (C) 1989, 1990, 1991 Aladdin Enterprises. All rights reserved. Distributed by Free Software Foundation, Inc. --- 1,3 ---- ! /* Copyright (C) 1989, 1992 Aladdin Enterprises. All rights reserved. Distributed by Free Software Foundation, Inc. *************** *** 21,24 **** --- 21,25 ---- #include "gx.h" #include "gxfixed.h" + #include "gxlum.h" #include "gxmatrix.h" #include "gzstate.h" *************** *** 96,107 **** #define _fc(f, maxv)\ (gx_color_value)(((f) * (max_color_param_long * 2) + maxv) / (maxv * 2)) private gx_color_value ! q0[] = { 0 }, ! q1[] = { 0, 0xffff }, ! q2[] = { 0, _fc(1,2), 0xffff }, ! q3[] = { 0, _fc(1,3), _fc(2,3), 0xffff }, ! q4[] = { 0, _fc(1,4), _fc(2,4), _fc(3,4), 0xffff }, ! q5[] = { 0, _fc(1,5), _fc(2,5), _fc(3,5), _fc(4,5), 0xffff }, ! q6[] = { 0, _fc(1,6), _fc(2,6), _fc(3,6), _fc(4,6), _fc(5,6), 0xffff }, q7[] = { 0, _fc(1,7), _fc(2,7), _fc(3,7), _fc(4,7), _fc(5,7), _fc(6,7), 0xffff }; private gx_color_value _ds *color_quo[8] = { q0, q1, q2, q3, q4, q5, q6, q7 }; --- 97,117 ---- #define _fc(f, maxv)\ (gx_color_value)(((f) * (max_color_param_long * 2) + maxv) / (maxv * 2)) + /* We have to split up the following because of a bug in the IBM AIX 3.2 */ + /* C compiler. */ private gx_color_value ! q0[] = { 0 }; ! private gx_color_value ! q1[] = { 0, 0xffff }; ! private gx_color_value ! q2[] = { 0, _fc(1,2), 0xffff }; ! private gx_color_value ! q3[] = { 0, _fc(1,3), _fc(2,3), 0xffff }; ! private gx_color_value ! q4[] = { 0, _fc(1,4), _fc(2,4), _fc(3,4), 0xffff }; ! private gx_color_value ! q5[] = { 0, _fc(1,5), _fc(2,5), _fc(3,5), _fc(4,5), 0xffff }; ! private gx_color_value ! q6[] = { 0, _fc(1,6), _fc(2,6), _fc(3,6), _fc(4,6), _fc(5,6), 0xffff }; ! private gx_color_value q7[] = { 0, _fc(1,7), _fc(2,7), _fc(3,7), _fc(4,7), _fc(5,7), _fc(6,7), 0xffff }; private gx_color_value _ds *color_quo[8] = { q0, q1, q2, q3, q4, q5, q6, q7 }; diff -rc2N gs24/gxfill.c gs241/gxfill.c *** gs24/gxfill.c Thu Mar 5 16:51:40 1992 --- gs241/gxfill.c Thu Apr 9 17:53:58 1992 *************** *** 310,316 **** int first_dir, prev_dir, dir; segment *prev; ! fixed xmin = ll->box.p.x, ymin = ll->box.p.y; ! fixed xmax = ll->box.q.x, ymax = ll->box.q.y; int code; while ( pseg ) { switch ( pseg->type ) --- 310,319 ---- int first_dir, prev_dir, dir; segment *prev; ! /* fixed xmin = ll->box.p.x; */ /* not currently used */ ! fixed ymin = ll->box.p.y; ! fixed xmax = ll->box.q.x; ! fixed ymax = ll->box.q.y; int code; + while ( pseg ) { switch ( pseg->type ) diff -rc2N gs24/gxht.c gs241/gxht.c *** gs24/gxht.c Thu Feb 27 16:16:06 1992 --- gs241/gxht.c Thu Apr 16 18:14:10 1992 *************** *** 232,237 **** if ( num_cached > size ) num_cached = size; if ( num_cached > max_cached_tiles ) num_cached = max_cached_tiles; ! if ( num_cached <= max_cached_tiles / 2 ) ! height_unit <<= 1, tile_bytes <<= 1; pcache->base_id = gs_next_ids(size); for ( i = 0; i < num_cached; i++ ) --- 232,240 ---- if ( num_cached > size ) num_cached = size; if ( num_cached > max_cached_tiles ) num_cached = max_cached_tiles; ! if ( num_cached == size && num_cached <= max_cached_tiles / 2 ) ! { /* We can afford to replicate every tile vertically, */ ! /* which will reduce breakage when tiling. */ ! height_unit <<= 1, tile_bytes <<= 1; ! } pcache->base_id = gs_next_ids(size); for ( i = 0; i < num_cached; i++ ) diff -rc2N gs24/gxlum.h gs241/gxlum.h *** gs24/gxlum.h --- gs241/gxlum.h Fri Apr 10 15:54:32 1992 *************** *** 0 **** --- 1,27 ---- + /* Copyright (C) 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. */ + + /* gxlum.h */ + /* Luminance computation parameters for Ghostscript */ + + /* Color weights used for computing luminance. */ + #define lum_red_weight 299 + #define lum_green_weight 587 + #define lum_blue_weight 114 + #define lum_all_weights (lum_red_weight + lum_green_weight + lum_blue_weight) diff -rc2N gs24/gxpath2.c gs241/gxpath2.c *** gs24/gxpath2.c Thu Feb 13 15:59:46 1992 --- gs241/gxpath2.c Wed Apr 8 11:30:14 1992 *************** *** 1,3 **** ! /* Copyright (C) 1989, 1990, 1991 Aladdin Enterprises. All rights reserved. Distributed by Free Software Foundation, Inc. --- 1,3 ---- ! /* Copyright (C) 1989, 1992 Aladdin Enterprises. All rights reserved. Distributed by Free Software Foundation, Inc. *************** *** 111,114 **** --- 111,115 ---- /* Test if a path is a rectangle. */ /* If so, return its bounding box. */ + /* Note that this must recognize open as well as closed rectangles. */ int gx_path_is_rectangle(gx_path *ppath, gs_fixed_rect *pbox) *************** *** 119,124 **** (pseg2 = pseg1->next) != 0 && (pseg3 = pseg2->next) != 0 && ! (pseg4 = pseg3->next) != 0 && ! pseg4->type == s_line_close && ppath->curve_count == 0 ) --- 120,124 ---- (pseg2 = pseg1->next) != 0 && (pseg3 = pseg2->next) != 0 && ! ((pseg4 = pseg3->next) == 0 || pseg4->type == s_line_close) && ppath->curve_count == 0 ) *************** *** 266,271 **** /* Table of f(i) = 256 * sqrt(1 + (i/64)^2). */ /* This is good to within 1% or better. */ ! #define scaled_sqrt_shift 6 /* scaling of index */ ! #define sqrt_scale_shift 8 /* scaling of value */ private int scaled_sqrt_tab[65] = { 256, 256, 256, 256, 256, 256, 257, 257, --- 266,271 ---- /* Table of f(i) = 256 * sqrt(1 + (i/64)^2). */ /* This is good to within 1% or better. */ ! #define sqrt_index_shift 6 /* scaling of index */ ! #define sqrt_value_shift 8 /* scaling of value */ private int scaled_sqrt_tab[65] = { 256, 256, 256, 256, 256, 256, 257, 257, *************** *** 334,338 **** int shift; reduce_3(ady3, short_max); ! d = (scaled_sqrt_tab[(ady3 << scaled_sqrt_shift) / adx3] * scaled_flat) >> sqrt_scale_shift; dx = x1 - x0, dy = y1 - y0; reduce_d(dx); --- 334,338 ---- int shift; reduce_3(ady3, short_max); ! d = (scaled_sqrt_tab[(ady3 << sqrt_index_shift) / adx3] * scaled_flat) >> sqrt_value_shift; dx = x1 - x0, dy = y1 - y0; reduce_d(dx); *************** *** 350,354 **** int shift; reduce_3(adx3, short_max); ! d = (scaled_sqrt_tab[(adx3 << scaled_sqrt_shift) / ady3] * scaled_flat) >> sqrt_scale_shift; dy = y1 - y0, dx = x1 - x0; reduce_d(dy); --- 350,354 ---- int shift; reduce_3(adx3, short_max); ! d = (scaled_sqrt_tab[(adx3 << sqrt_index_shift) / ady3] * scaled_flat) >> sqrt_value_shift; dy = y1 - y0, dx = x1 - x0; reduce_d(dy); diff -rc2N gs24/gxstroke.c gs241/gxstroke.c *** gs24/gxstroke.c Mon Mar 23 16:54:12 1992 --- gs241/gxstroke.c Sat Apr 18 15:30:40 1992 *************** *** 127,134 **** */ int reflected = ! (uniform ? uniform < 0 : skewed ? xy * yx < xx * yy : (xx < 0) == (yy < 0)); ! float line_width = lp->width; int always_thin; float line_width_and_scale; --- 127,134 ---- */ int reflected = ! (uniform ? uniform > 0 : skewed ? xy * yx < xx * yy : (xx < 0) == (yy < 0)); ! float line_width = lp->width; /* this is *half* the line width! */ int always_thin; float line_width_and_scale; *************** *** 156,160 **** if ( xxa < 0 ) xxa = -xxa; if ( yya < 0 ) yya = -yya; ! always_thin = (max(xxa, yya) * line_width < 1.0); } else --- 156,160 ---- if ( xxa < 0 ) xxa = -xxa; if ( yya < 0 ) yya = -yya; ! always_thin = (max(xxa, yya) * line_width < 0.5); } else *************** *** 165,169 **** if ( cross < 0 ) cross = 0; always_thin = ! ((max(xsq, ysq) + cross) * line_width * line_width < 1.0); } line_width_and_scale = line_width * (float)int2fixed(1); --- 165,169 ---- if ( cross < 0 ) cross = 0; always_thin = ! ((max(xsq, ysq) + cross) * line_width * line_width < 0.5); } line_width_and_scale = line_width * (float)int2fixed(1); *************** *** 237,252 **** { /* We can save a lot of work in this case. */ float dpx = udx, dpy = udy; ! float wl = line_width_and_scale * xx / hypot(dpx, dpy); pl.e.cdelta.x = (fixed)(dpx * wl); pl.e.cdelta.y = (fixed)(dpy * wl); ! if ( uniform > 0 ) /* xx == yy */ ! { pl.width.x = pl.e.cdelta.y; ! pl.width.y = -pl.e.cdelta.x; ! } ! else /* xx == -yy */ ! { pl.width.x = -pl.e.cdelta.y; ! pl.width.y = pl.e.cdelta.x; ! } } else --- 237,249 ---- { /* We can save a lot of work in this case. */ float dpx = udx, dpy = udy; ! float wl = line_width_and_scale * xx / hypot(dpx, dpy); + if ( wl < 0 ) wl = -wl; pl.e.cdelta.x = (fixed)(dpx * wl); pl.e.cdelta.y = (fixed)(dpy * wl); ! pl.width.x = -pl.e.cdelta.y; ! pl.width.y = pl.e.cdelta.x; ! pl.thin = 0; /* if not always_thin, */ ! /* then never thin. */ } else *************** *** 288,295 **** pl.width.x -= (fixed)(dpt.x * yx), pl.width.y += (fixed)(dpt.y * xy); } - pl.thin = - any_abs(pl.width.x) + any_abs(pl.width.y) < - float2fixed(0.75); if ( !pl.thin ) compute_caps(&pl); } --- 285,292 ---- pl.width.x -= (fixed)(dpt.x * yx), pl.width.y += (fixed)(dpt.y * xy); + pl.thin = + any_abs(pl.width.x) + any_abs(pl.width.y) < + float2fixed(0.75); } if ( !pl.thin ) compute_caps(&pl); } diff -rc2N gs24/gxtype1.h gs241/gxtype1.h *** gs24/gxtype1.h Sun Mar 15 12:40:54 1992 --- gs241/gxtype1.h Sun Mar 29 14:32:24 1992 *************** *** 39,43 **** c_hsbw = 13, c_endchar = 14, ! c_undef15 = 15, c_undef16 = 16, c_undef17 = 17, --- 39,44 ---- c_hsbw = 13, c_endchar = 14, ! c_undoc15 = 15, /* Undocumented by Adobe, */ ! /* but used in some Adobe fonts. */ c_undef16 = 16, c_undef17 = 17, diff -rc2N gs24/gzcolor.h gs241/gzcolor.h *** gs24/gzcolor.h Sun Feb 16 15:01:54 1992 --- gs241/gzcolor.h Fri Apr 10 15:54:42 1992 *************** *** 1,3 **** ! /* Copyright (C) 1989, 1990, 1991 Aladdin Enterprises. All rights reserved. Distributed by Free Software Foundation, Inc. --- 1,3 ---- ! /* Copyright (C) 1989, 1992 Aladdin Enterprises. All rights reserved. Distributed by Free Software Foundation, Inc. *************** *** 21,24 **** --- 21,25 ---- /* Private definition of color representation for Ghostscript */ #include "gscolor.h" /* client interface */ + #include "gxlum.h" /* Colors as seen by clients. */ *************** *** 65,74 **** ((pcolor)->luminance_set ? (pcolor)->luminance :\ gx_color_luminance(pcolor)) - - /* Color weights in 100ths, used for computing luminance. */ - #define lum_red_weight 30 - #define lum_green_weight 59 - #define lum_blue_weight 11 - #define lum_all_weights (lum_red_weight + lum_green_weight + lum_blue_weight) /* --- 66,69 ---- diff -rc2N gs24/history.doc gs241/history.doc *** gs24/history.doc Tue Mar 24 06:19:56 1992 --- gs241/history.doc Tue Apr 21 04:14:32 1992 *************** *** 26,29 **** --- 26,168 ---- README. + Version 2.4.1 (4/21/92) + ============= + + This is a quick release to fix minor problems discovered in 2.4, and + to add a few improvements that didn't quite make it into 2.4. It + also adds GIF and PCX file support. + + Procedures + ---------- + + Fixes bugs: + - Some makefile dependencies, and the ccgs script, caused trouble + for parallel versions of `make'. + - Compiling genarch with -O with gcc on the RS/6000 produced a + buggy executable. + + Fixes some minor problems in make.doc. + + Adds DEVICE_DEVS2..5 to handle long device lists. + + Removes the need to set GS_RUN_EXE when using the Watcom compiler on + MS-DOS systems. + + Gets rid of gs_ccfnt.ps, merging its function into gs_fonts.ps. + + Gets rid of gconfig.ps; this information is now compiled in gconfig.c. + + Utilities + --------- + + Fixes bugs: + - The palette for pstoppm in 8-bit mode didn't contain all 8 + primary colors. + - font2c used just values_ to mean &values_[0]; some compilers + couldn't handle this. + + Makes font2c insert `const' in many appropriate places. + + Drivers + ------- + + Fixes bugs: + - The SunView driver had not been updated properly for 2.4 and was + pretty thoroughly broken. + - None of the printer drivers worked properly with the Watcom + compiler, because stdprn was doing \n -> \r\n substitution. + - If the generic printer driver couldn't allocate the requested + size command list buffer, it gave up rather than trying to allocate a + smaller buffer. + - The SuperVGA drivers (except for the VESA driver) didn't + work with the Watcom compiler, because a couple of places in the + drivers weren't truncating the offset of "segmented" pointers + properly. + - Some of the H-P used *b#Y rather than *p+#Y for + vertical positioning; this apparently is wrong, at least for the + LJIIp. + + Removes the dependence of the X Windows driver on Xt, Xext, and Xmu. As a + result, Ghostscript will not install a standard colormap itself, but it + will use one if one is already installed. + + Adds a set of drivers for Portable Bitmap, Graymap, and Pixmap file + formats. + + Adds drivers for monochrome, EGA/VGA-style, and SuperVGA-style PCX + file formats. + + Adds drivers for monochrome and 256-color GIF file formats. + + Fonts + ----- + + Adds ZapfChancery-MediumItalic as a copy of ZapfChancery-Oblique. + + Interpreter + ----------- + + Fixes bugs: + - A value with l_new set could 'escape' to save level 0 on a + stack; if stored, it prevented the slot from being saved and restored + properly. + - 16#7fffffff + 1 gave the floating point equivalent of -2^31, not + 2^31. + - The PFBDecode filter computed the packet length incorrectly if + the 0x8000-bit of the length was set. + - 5-byte numbers in Type 1 CharStrings complained of a rangecheck + if they exceeded 16 bits, rather than if they exceeded the integer part of + a fixed. + - (, ), and \ appearing in file name arguments in the command + line did not work properly. + + Adds 'const' in many places. + + Changes the random number generator to be the same as the one used in + Level 2 PostScript (as reported by Ed Taft on comp.lang.postscript). + + Exits with code 1 rather than code 0 on an unrecoverable error detected at + the PostScript level. + + Makes dictionaries expand automatically when they fill up. + + Adds gp_exit to complement gp_init. + + Changes dictionaries to always allocate a power of 2 entries on + 32-bit machines. Changes the name table to allocate indices + scattered, so dictionary lookup doesn't have to do a multiply to + scramble the index. + + Changes the handling of currentfile to do "shallow binding" so stack + searching is almost never required. + + Library + ------- + + Fixes bugs: + - arc and arcn got a numeric exception if the radius was zero. + - The undocumented 15 opcode in Type 1 fonts wasn't ignored. + - PaintType 3 wasn't allowed. (It isn't clear what it should + mean; we treat it as equivalent to 0.) + - The VAX/VMS C compiler was generating incorrect code for the + chi_bits and cmask macros in gdevmem, producing incorrect output. + - If the result of the slow algorithm for intersecting clipping + paths was a rectangle, the wrong thing happened (cbox didn't get set). + - gx_path_is_rectangle didn't recognize open rectangles. + - clist_change_tile didn't check properly whether the tile + size had changed, so changing the screen could produce invalid band + files. + - The image operators did the wrong thing in the 1-for-1 + case, interleaving N bytes of data with 7*N bytes of garbage. + - stroke sometimes handled bevel and miter joins wrong in + reflected coordinate systems. + - init_ht checked incorrectly whether there was enough room + to Y-replicate tiles, so sometimes it did it when it shouldn't have. + - stroke sometimes thought lines were thin when they weren't. + + Adds 'const' in many places. + + Adds support for 2- and 4-bit-per-pixel memory devices. + Version 2.4 (3/25/92) =========== diff -rc2N gs24/ialloc.c gs241/ialloc.c *** gs24/ialloc.c Wed Mar 4 17:38:14 1992 --- gs241/ialloc.c Sat Apr 18 07:26:00 1992 *************** *** 1,3 **** ! /* Copyright (C) 1989, 1990, 1991 Aladdin Enterprises. All rights reserved. Distributed by Free Software Foundation, Inc. --- 1,3 ---- ! /* Copyright (C) 1989, 1992 Aladdin Enterprises. All rights reserved. Distributed by Free Software Foundation, Inc. *************** *** 65,68 **** --- 65,69 ---- ap->palloc = palloc; ap->pfree = pfree; + ap->last_freed = 0; { extern void alloc_save_init(P0()); alloc_save_init(); *************** *** 171,198 **** { /* In another segment, check its save level. */ int level = ap->save_level; ! alloc_chunk *cp = ap->current.next; ! for ( ; ; cp = cp->next ) ! { if ( cp != 0 ) ! { switch ( cp->save_level - level ) ! { ! case 0: ! if ( ptr_is_in_chunk(obj, cp) ) ! { if ( ptr_lt(obj, cp->bot) ) goto pbf; ! else break; ! } ! else continue; ! case -1: ! /* Might be alloc'ed since the save, */ ! /* or might not be aligned. */ ! if ( ptr_lt(obj, ap->saved_cbot) ) ! goto pbf; ! } ! } ! /* Older save level, not freeable. */ ! alloc_print('-', '\\', obj, size); ! return; ! } pbf: /* If we get here, OK to put the block on a free list. */ ! ; } else if ( obj >= ap->cbot ) /* not aligned object, punt */ --- 172,201 ---- { /* In another segment, check its save level. */ int level = ap->save_level; ! alloc_chunk *cp = ap->last_freed; ! if ( cp != 0 && ptr_is_in_chunk(obj, cp) ) /* cache hit */ ! { if ptr_lt(obj, cp->bot) goto pxf; ! else goto pnf; ! } ! for ( cp = ap->current.next; cp != 0; cp = cp->next ) ! { switch ( cp->save_level - level ) ! { ! case 0: ! if ( ptr_is_in_chunk(obj, cp) ) ! { if ( ptr_lt(obj, cp->bot) ) goto pbf; ! else goto pnf; ! } ! else continue; ! case -1: ! /* Might be alloc'ed since the save, */ ! /* or might not be aligned. */ ! if ( ptr_lt(obj, ap->saved_cbot) ) goto pbf; ! } ! } ! pnf: /* Older save level or unaligned, not freeable. */ ! alloc_print('-', '\\', obj, size); ! return; pbf: /* If we get here, OK to put the block on a free list. */ ! ap->last_freed = cp; ! pxf: ; } else if ( obj >= ap->cbot ) /* not aligned object, punt */ diff -rc2N gs24/ibscan.c gs241/ibscan.c *** gs24/ibscan.c Sun Dec 29 11:04:56 1991 --- gs241/ibscan.c Thu Apr 16 12:54:16 1992 *************** *** 1,3 **** ! /* Copyright (C) 1989, 1990, 1991 Aladdin Enterprises. All rights reserved. Distributed by Free Software Foundation, Inc. --- 1,3 ---- ! /* Copyright (C) 1989, 1992 Aladdin Enterprises. All rights reserved. Distributed by Free Software Foundation, Inc. *************** *** 25,28 **** --- 25,29 ---- #include "alloc.h" #include "dict.h" + #include "dstack.h" /* for immediately evaluated names */ #include "iutil.h" #include "name.h" diff -rc2N gs24/iccfont.c gs241/iccfont.c *** gs24/iccfont.c Thu Mar 5 16:32:12 1992 --- gs241/iccfont.c Mon Apr 20 17:36:00 1992 *************** *** 25,28 **** --- 25,29 ---- #include "ccfont.h" #include "dict.h" + #include "dstack.h" #include "errors.h" #include "name.h" *************** *** 60,65 **** } else /* must have kp->num_str_keys != 0 */ ! { char *skp = *(kp->str_keys++); ! code = name_ref((byte *)skp, strlen(skp), &kname, 0); kp->num_str_keys--; } --- 61,66 ---- } else /* must have kp->num_str_keys != 0 */ ! { const char *skp = *(kp->str_keys++); ! code = name_ref((const byte *)skp, strlen(skp), &kname, 0); kp->num_str_keys--; } diff -rc2N gs24/idebug.c gs241/idebug.c *** gs24/idebug.c Wed Mar 18 13:20:22 1992 --- gs241/idebug.c Wed Apr 8 01:05:30 1992 *************** *** 40,52 **** /* Print a ref */ void ! debug_print_ref(const ref *pref) { unsigned size = r_size(pref); - ushort elt; ref nref; dprintf1("(%x)", r_type_attrs(pref)); ! elt = *(ushort *)pref; ! if ( elt <= packed_max_full_ref ) ! switch ( r_type(pref) ) { case t_array: --- 40,50 ---- /* Print a ref */ + void debug_print_ref(P1(const ref *)); void ! debug_print_full_ref(const ref *pref) { unsigned size = r_size(pref); ref nref; dprintf1("(%x)", r_type_attrs(pref)); ! switch ( r_type(pref) ) { case t_array: *************** *** 90,94 **** dprintf1("op(0x%x", size); if ( size ) ! dprintf1(":%s", (char *)(op_def_table[size]->oname + 1)); dprintf1(")0x%lx", (ulong)pref->value.opproc); break; --- 88,92 ---- dprintf1("op(0x%x", size); if ( size ) ! dprintf1(":%s", (const char *)(op_def_table[size]->oname + 1)); dprintf1(")0x%lx", (ulong)pref->value.opproc); break; *************** *** 101,106 **** default: dprintf1("type 0x%x", r_type(pref)); } ! else ! switch ( elt >> packed_type_shift ) { case pt_executable_operator: --- 99,108 ---- default: dprintf1("type 0x%x", r_type(pref)); } ! } ! void ! debug_print_packed_ref(const ref_packed *pref) ! { ushort elt = *pref; ! ref nref; ! switch ( elt >> packed_type_shift ) { case pt_executable_operator: *************** *** 123,126 **** --- 125,135 ---- } } + void + debug_print_ref(const ref *pref) + { if ( r_is_packed(pref) ) + debug_print_packed_ref((const ref_packed *)pref); + else + debug_print_full_ref(pref); + } /* Print a string */ *************** *** 149,153 **** if ( *ap != '.' ) dputc(((attrs & 1) ? *ap : '-')); ! dprintf2(" 0x%04x 0x%08lx", r_size(p), *(ulong *)&p->value); if ( obj_cvs(p, (byte *)buf, buf_size, &plen) >= 0 && ((buf[plen] = 0), strcmp(buf, "--nostringval--")) --- 158,162 ---- if ( *ap != '.' ) dputc(((attrs & 1) ? *ap : '-')); ! dprintf2(" 0x%04x 0x%08lx", r_size(p), *(const ulong *)&p->value); if ( obj_cvs(p, (byte *)buf, buf_size, &plen) >= 0 && ((buf[plen] = 0), strcmp(buf, "--nostringval--")) *************** *** 196,202 **** default: dprintf2 ("%s at 0x%lx isn't an array.\n", ! ((type >= 0 && type < countof(type_strings)) ? ! type_strings[type] : "????"), ! (ulong)array); return; case t_oparray: --- 205,211 ---- default: dprintf2 ("%s at 0x%lx isn't an array.\n", ! (type < countof(type_strings) ? ! type_strings[type] : "????"), ! (ulong)array); return; case t_oparray: diff -rc2N gs24/idict.c gs241/idict.c *** gs24/idict.c Wed Mar 18 16:21:06 1992 --- gs241/idict.c Sun Apr 19 14:45:30 1992 *************** *** 29,32 **** --- 29,33 ---- #include "iutil.h" /* for obj_eq */ #include "dict.h" /* interface definition */ + #include "dstack.h" /* ditto */ /* *************** *** 33,44 **** * A dictionary is a structure of three elements (refs): * ! * count - a t_integer whose value says how many entries ! * are occupied (N). * ! * keys - a t_shortarray or t_array of N+1 elements, containing * the keys. * ! * values - a t_array of N+1 elements, containing the values. * * In the packed form, unused or deleted entries contain packed_key_empty * or packed_key_deleted respectively; in the unpacked form, unused --- 34,58 ---- * A dictionary is a structure of three elements (refs): * ! * count - a t_integer whose value says how many entries are ! * occupied (N), and whose size says how many elements the client ! * thinks the dictionary can hold (C). C may be less than M (see below). * ! * keys - a t_shortarray or t_array of M+1 elements, containing * the keys. * ! * values - a t_array of M+1 elements, containing the values. * + * C < M is possible because on 32-bit systems, we round up M so that + * M is a power of 2; this allows us to use masking rather than division + * for computing the initial hash probe. However, C is always the + * maxlength specified by the client, so clients get a consistent story. + */ + #define dict_round_size (!arch_ints_are_short) + #if dict_round_size + # define hash_mod(hash, size) ((hash) & ((size) - 1)) + #else + # define hash_mod(hash, size) ((hash) % (size)) + #endif + /* * In the packed form, unused or deleted entries contain packed_key_empty * or packed_key_deleted respectively; in the unpacked form, unused *************** *** 64,69 **** --- 78,86 ---- * entries are almost never deleted. */ + #define d_maxlength(dct) r_size(&(dct)->count) + #define d_set_maxlength(dct,siz) r_set_size(&(dct)->count,siz) #define nslots(dct) r_size(&(dct)->values) #define npairs(dct) (nslots(dct) - 1) + #define d_length(dct) ((uint)((dct)->count.value.intval)) /* Define the size of the largest valid dictionary. */ *************** *** 73,78 **** const uint dict_max_size = max_ushort / 2 - 2; /* Define the hashing function for names. */ ! #define dict_name_index_hash(nidx) ((nidx) * 30503) /* Define whether dictionaries are packed by default. */ --- 90,100 ---- const uint dict_max_size = max_ushort / 2 - 2; + /* Define whether dictionaries expand automatically when full. */ + int dict_auto_expand = 1; + /* Define the hashing function for names. */ ! /* We don't have to scramble the index, because */ ! /* indices are assigned in a scattered order (see name_ref in iname.c). */ ! #define dict_name_index_hash(nidx) (nidx) /* Define whether dictionaries are packed by default. */ *************** *** 109,116 **** private int dict_create_contents(uint size, dict *pdict, int pack) ! { uint asize = (size == 0 ? 1 : size) + 1; ! ref *vp = alloc_refs(asize, "dict_create(values)"); register uint i; ref *zp; if ( vp == 0 ) return e_VMerror; make_tasv_new(&pdict->values, t_array, a_all, asize, refs, vp); --- 131,146 ---- private int dict_create_contents(uint size, dict *pdict, int pack) ! { uint csize = (size == 0 ? 1 : size); /* client-specified size */ ! uint asize = csize; ! ref *vp; register uint i; ref *zp; + #if dict_round_size + /* Round up the actual allocated size to the next higher */ + /* power of 2, so we can use & instead of %. */ + while ( asize & (asize - 1) ) asize = (asize | (asize >> 1)) + 1; + #endif + asize++; /* allow room for wraparound entry */ + vp = alloc_refs(asize, "dict_create(values)"); if ( vp == 0 ) return e_VMerror; make_tasv_new(&pdict->values, t_array, a_all, asize, refs, vp); *************** *** 132,135 **** --- 162,166 ---- } make_tv_new(&pdict->count, t_integer, intval, 0); + d_set_maxlength(pdict, csize); return 0; } *************** *** 149,153 **** ref_packed *kbot = pdict->keys.value.packed;\ register ref_packed *kp;\ ! for ( kp = kbot + (hash % size) + 2; ; )\ { if ( *--kp == kpack )\ { pre (pdict->values.value.refs + (kp - kbot));\ --- 180,184 ---- ref_packed *kbot = pdict->keys.value.packed;\ register ref_packed *kp;\ ! for ( kp = kbot + hash_mod(hash, size) + 2; ; )\ { if ( *--kp == kpack )\ { pre (pdict->values.value.refs + (kp - kbot));\ *************** *** 240,244 **** register ref *kp; ref *pslot = 0; ! for ( kp = kbot + (hash % size) + 2; ; ) { --kp; if ( (etype = r_type(kp)) == ktype ) --- 271,275 ---- register ref *kp; ref *pslot = 0; ! for ( kp = kbot + hash_mod(hash, size) + 2; ; ) { --kp; if ( (etype = r_type(kp)) == ktype ) *************** *** 312,316 **** register ref *kp; /* Search the dictionary */ ! for ( kp = kbot + (hash % size) + 2; ; ) { --kp; if ( r_has_type(kp, t_name) ) --- 343,347 ---- register ref *kp; /* Search the dictionary */ ! for ( kp = kbot + hash_mod(hash, size) + 2; ; ) { --kp; if ( r_has_type(kp, t_name) ) *************** *** 346,350 **** dict_put(ref *pdref /* t_dictionary */, const ref *pkey, const ref *pvalue) { ref *pvslot; ! if ( dict_find(pdref, pkey, &pvslot) <= 0 ) /* not found */ { /* Check for overflow */ dict *pdict = pdref->value.pdict; --- 377,381 ---- dict_put(ref *pdref /* t_dictionary */, const ref *pkey, const ref *pvalue) { ref *pvslot; ! top: if ( dict_find(pdref, pkey, &pvslot) <= 0 ) /* not found */ { /* Check for overflow */ dict *pdict = pdref->value.pdict; *************** *** 351,356 **** ref kname; uint index = pvslot - pdict->values.value.refs; ! if ( pdict->count.value.intval == npairs(pdict) ) ! return e_dictfull; /* If the key is a string, convert it to a name. */ if ( r_has_type(pkey, t_string) ) --- 382,400 ---- ref kname; uint index = pvslot - pdict->values.value.refs; ! if ( d_length(pdict) == npairs(pdict) ) ! { int code; ! ulong new_size; ! if ( !dict_auto_expand ) ! return e_dictfull; ! new_size = (ulong)npairs(pdict) * 3 / 2 + 2; ! if ( new_size > dict_max_size ) ! { if ( npairs(pdict) >= dict_max_size ) ! return e_dictfull; ! new_size = dict_max_size; ! } ! code = dict_resize(pdref, (uint)new_size); ! if ( code < 0 ) return code; ! goto top; /* keep things simple */ ! } /* If the key is a string, convert it to a name. */ if ( r_has_type(pkey, t_string) ) *************** *** 396,399 **** --- 440,445 ---- else { ref *kp = pdict->keys.value.refs + index; + if_debug2('d', "[d]%lx fill key %lx\n", + (ulong)pdict, (ulong)kp); ref_assign_old(kp, pkey, "dict_put(key)"); /* set key of pair */ } *************** *** 418,421 **** --- 464,471 ---- } } + if_debug6('d', "[d]in %lx put %lx: %lx %lx -> %lx %lx\n", + (ulong)pdref->value.pdict, (ulong)pvslot, + ((ulong *)pvslot)[0], ((ulong *)pvslot)[1], + ((ulong *)pvalue)[0], ((ulong *)pvalue)[1]); ref_assign_old(pvslot, pvalue, "dict_put(value)"); return 0; *************** *** 482,486 **** uint dict_length(const ref *pdref /* t_dictionary */) ! { return (uint)(pdref->value.pdict->count.value.intval); } --- 532,536 ---- uint dict_length(const ref *pdref /* t_dictionary */) ! { return d_length(pdref->value.pdict); } *************** *** 488,492 **** uint dict_maxlength(const ref *pdref /* t_dictionary */) ! { return npairs(pdref->value.pdict); } --- 538,542 ---- uint dict_maxlength(const ref *pdref /* t_dictionary */) ! { return d_maxlength(pdref->value.pdict); } *************** *** 511,515 **** ref drto; int code; ! if ( (code = dict_create_contents(new_size, &dnew, dict_is_packed(pdict))) < 0 ) return code; make_tav_new(&drto, t_dictionary, a_all, pdict, &dnew); dict_copy(pdrfrom, &drto); /* can't fail */ --- 561,571 ---- ref drto; int code; ! if ( new_size < d_length(pdict) ) ! { if ( !dict_auto_expand ) ! return e_dictfull; ! new_size = d_length(pdict); ! } ! if ( (code = dict_create_contents(new_size, &dnew, dict_is_packed(pdict))) < 0 ) ! return code; make_tav_new(&drto, t_dictionary, a_all, pdict, &dnew); dict_copy(pdrfrom, &drto); /* can't fail */ *************** *** 524,527 **** --- 580,585 ---- ref_assign_old(&pdict->keys, &dnew.keys, "dict_resize(keys)"); ref_assign_old(&pdict->values, &dnew.values, "dict_resize(values)"); + ref_save(&pdict->count, "dict_resize(size)"); + d_set_maxlength(pdict, new_size); return 0; } diff -rc2N gs24/iinit.c gs241/iinit.c *** gs24/iinit.c Mon Mar 16 18:04:12 1992 --- gs241/iinit.c Tue Apr 21 05:17:06 1992 *************** *** 24,27 **** --- 24,28 ---- #include "alloc.h" #include "dict.h" + #include "dstack.h" #define INCLUDE_ERROR_NAMES /* see errors.h */ #include "errors.h" *************** *** 94,99 **** } ! /* Optional devices are handled in gconfig.c. */ #define device_(dev) /* Initialize the operators */ --- 95,101 ---- } ! /* Optional devices and .ps files are handled in gconfig.c. */ #define device_(dev) + #define psfile_(fns) /* Initialize the operators */ *************** *** 156,160 **** op_def_ptr _ds *tptr; op_def_ptr def; ! char _ds *nstr; /* Do a first pass just to count the operators. */ --- 158,162 ---- op_def_ptr _ds *tptr; op_def_ptr def; ! const char _ds *nstr; /* Do a first pass just to count the operators. */ diff -rc2N gs24/iname.c gs241/iname.c *** gs24/iname.c Wed Mar 4 17:36:54 1992 --- gs241/iname.c Sat Apr 18 02:14:10 1992 *************** *** 1,3 **** ! /* Copyright (C) 1989, 1990, 1991 Aladdin Enterprises. All rights reserved. Distributed by Free Software Foundation, Inc. --- 1,3 ---- ! /* Copyright (C) 1989, 1992 Aladdin Enterprises. All rights reserved. Distributed by Free Software Foundation, Inc. *************** *** 32,35 **** --- 32,36 ---- #define nt_log2_sub_size 7 #define nt_sub_size (1 << nt_log2_sub_size) + #define nt_sub_index_mask (nt_sub_size - 1) #define nt_hash_size 256 /* must be a power of 2 */ #define nt_1char_size 256 /* must cover a full byte */ *************** *** 40,47 **** ref count; /* t_integer */ #define nt_count(nt) (uint)((nt)->count.value.intval) } name_table; #define name_index_ptr(nt, index)\ ! ((nt)->table[(index) >> nt_log2_sub_size] + ((index) & (nt_sub_size - 1))) /* The one and only name table (for now). */ private name_table *the_nt; --- 41,69 ---- ref count; /* t_integer */ #define nt_count(nt) (uint)((nt)->count.value.intval) + #define set_nt_count(nt,cnt) ((nt)->count.value.intval = (cnt)) } name_table; #define name_index_ptr(nt, index)\ ! ((nt)->table[(index) >> nt_log2_sub_size] + ((index) & nt_sub_index_mask)) + /* + * Scramble the assignment order within a sub-table, so that + * dictionary lookup doesn't have to scramble the index. + * The algorithm must have three properties: + * - It must map 0 to 0; + * - It must only scramble the sub-table index; + * - It must be a permutation on the sub-table index. + * We do something very simple for now. + */ + #define name_count_to_index(cnt)\ + (((cnt) & (-nt_sub_size)) + (((cnt) * 59) & nt_sub_index_mask)) + /* We also store the reverse permutation, for age checking in restore. */ + #define name_index_to_count(idx)\ + ((idx) ^ name_sub_index_to_count[(idx) & nt_sub_index_mask]) + #if nt_sub_size <= 256 + private byte name_sub_index_to_count[nt_sub_size]; + #else + private ushort name_sub_index_to_count[nt_sub_size]; + #endif + /* The one and only name table (for now). */ private name_table *the_nt; *************** *** 56,60 **** void name_init() ! { uint i; the_nt = (name_table *)alloc(1, sizeof(name_table), "name_init"); memset(the_nt, 0, sizeof(name_table)); --- 78,87 ---- void name_init() ! { register uint i; ! /* Initialize the index_to_count map. */ ! for ( i = 0; i < nt_sub_size; i++ ) ! { uint idx = name_count_to_index(i); ! name_sub_index_to_count[idx] = idx ^ i; ! } the_nt = (name_table *)alloc(1, sizeof(name_table), "name_init"); memset(the_nt, 0, sizeof(name_table)); *************** *** 61,65 **** make_int(&the_nt->count, 1); for ( i = 0; i <= nt_1char_size; i += nt_sub_size ) ! { the_nt->count.value.intval = i + 1; name_alloc_sub(the_nt); } --- 88,92 ---- make_int(&the_nt->count, 1); for ( i = 0; i <= nt_1char_size; i += nt_sub_size ) ! { set_nt_count(the_nt, i + 1); name_alloc_sub(the_nt); } *************** *** 76,80 **** ushort size = (ushort)isize; /* see name.h */ if ( size == 1 ) ! { pname = name_index_ptr(the_nt, *ptr + 1); if ( pname->string_size != 0 ) { make_name(pref, pname); --- 103,109 ---- ushort size = (ushort)isize; /* see name.h */ if ( size == 1 ) ! { uint ccnt = *ptr + 1; ! uint nidx = name_count_to_index(ccnt); ! pname = name_index_ptr(the_nt, nidx); if ( pname->string_size != 0 ) { make_name(pref, pname); *************** *** 82,87 **** } if ( enterflag < 0 ) return e_undefined; ! pname->index = *ptr + 1; pname->next_index = 0; } else --- 111,118 ---- } if ( enterflag < 0 ) return e_undefined; ! pname->index = nidx; pname->next_index = 0; + if_debug4('n', "[n]new name 0x%lx#%u, length=%u, count=%u\n", + (ulong)pname, nidx, isize, ccnt); } else *************** *** 90,93 **** --- 121,125 ---- ((ushort)string_hash(ptr, size) & (nt_hash_size - 1)); uint nidx = *phash; + uint ncnt; while ( nidx != 0 ) { pname = name_index_ptr(the_nt, nidx); *************** *** 106,110 **** if ( code < 0 ) return code; } ! nidx = nt_count(the_nt); pname = name_index_ptr(the_nt, nidx); pname->index = nidx; --- 138,143 ---- if ( code < 0 ) return code; } ! ncnt = nt_count(the_nt); ! nidx = name_count_to_index(ncnt); pname = name_index_ptr(the_nt, nidx); pname->index = nidx; *************** *** 111,116 **** pname->next_index = *phash; *phash = nidx; ref_save(&the_nt->count, "name_ref(count)"); ! the_nt->count.value.intval = nidx + 1; } /* Name was not in the table. Make a new entry. */ --- 144,151 ---- pname->next_index = *phash; *phash = nidx; + if_debug4('n', "[n]new name 0x%lx#%u, length=%u, count=%u\n", + (ulong)pname, nidx, isize, ncnt); ref_save(&the_nt->count, "name_ref(count)"); ! set_nt_count(the_nt, ncnt + 1); } /* Name was not in the table. Make a new entry. */ *************** *** 165,177 **** /* Get the current name count. */ ! ushort ! name_next_index() { return nt_count(the_nt); } /* Clean up the name table before a restore. */ /* The count will be reset, and added subtables will be freed. */ /* All we have to do is remove initial entries from the hash chains, */ ! /* since we know they are linked in decreasing index order. */ /* (There will be some spurious non-zero entries in the subtable table, */ /* but this doesn't matter since they will never be accessed.) */ --- 200,219 ---- /* Get the current name count. */ ! uint ! name_count() { return nt_count(the_nt); } + /* Check whether a name was created since a given count. */ + int + name_is_since_count(ref *pnref, uint cnt) + { return name_index_to_count(name_index(pnref)) >= cnt; + } + /* Clean up the name table before a restore. */ /* The count will be reset, and added subtables will be freed. */ /* All we have to do is remove initial entries from the hash chains, */ ! /* since we know they are linked in decreasing index order */ ! /* (by sub-table, but not within each sub-table.) */ /* (There will be some spurious non-zero entries in the subtable table, */ /* but this doesn't matter since they will never be accessed.) */ *************** *** 178,186 **** void name_restore(uint old_count) ! { register ushort *phash = &the_nt->hash[0]; register uint i; for ( i = 0; i < nt_hash_size; phash++, i++ ) ! { while ( *phash >= old_count ) ! *phash = name_index_ptr(the_nt, *phash)->next_index; } } --- 220,234 ---- void name_restore(uint old_count) ! { ushort *phash = &the_nt->hash[0]; ! uint old_sub = old_count & -nt_sub_size; register uint i; for ( i = 0; i < nt_hash_size; phash++, i++ ) ! { register ushort *pnh = phash; ! while ( *pnh >= old_sub ) ! { if ( name_index_to_count(*pnh) < old_count ) ! pnh = &name_index_ptr(the_nt, *pnh)->next_index; ! else ! *pnh = name_index_ptr(the_nt, *pnh)->next_index; ! } } } diff -rc2N gs24/interp.c gs241/interp.c *** gs24/interp.c Wed Feb 5 16:56:34 1992 --- gs241/interp.c Mon Apr 20 19:06:08 1992 *************** *** 1,3 **** ! /* Copyright (C) 1989, 1990, 1991 Aladdin Enterprises. All rights reserved. Distributed by Free Software Foundation, Inc. --- 1,3 ---- ! /* Copyright (C) 1989, 1992 Aladdin Enterprises. All rights reserved. Distributed by Free Software Foundation, Inc. *************** *** 26,29 **** --- 26,30 ---- #include "name.h" #include "dict.h" + #include "dstack.h" #include "oper.h" #include "packed.h" *************** *** 35,38 **** --- 36,40 ---- extern int obj_le(P2(os_ptr, os_ptr)); extern int zop_add(P1(os_ptr)); + extern int zop_def(P1(os_ptr)); extern int zop_sub(P1(os_ptr)); *************** *** 39,47 **** /* The procedure to call if an operator requests rescheduling. */ /* This causes an error unless the context machinery has been installed. */ ! private int no_reschedule(P0()); int (*gs_interp_reschedule_proc)(P0()) = no_reschedule; /* The procedure to call for time-slicing. */ /* This is a no-op unless the context machinery has been installed. */ ! private int no_time_slice(P0()); int (*gs_interp_time_slice_proc)(P0()) = no_time_slice; --- 41,49 ---- /* The procedure to call if an operator requests rescheduling. */ /* This causes an error unless the context machinery has been installed. */ ! private int no_reschedule() { return e_invalidcontext; } int (*gs_interp_reschedule_proc)(P0()) = no_reschedule; /* The procedure to call for time-slicing. */ /* This is a no-op unless the context machinery has been installed. */ ! private int no_time_slice() { return 0; } int (*gs_interp_time_slice_proc)(P0()) = no_time_slice; *************** *** 75,78 **** --- 77,81 ---- os_ptr osbot, osp, ostop; es_ptr esbot, esp, estop; + es_ptr esfile; /* cache pointer to currentfile */ ds_ptr dsp, dstop; *************** *** 88,91 **** --- 91,95 ---- #define tx_op t_next_index extern int zadd(P1(os_ptr)); + extern int zdef(P1(os_ptr)); extern int zdup(P1(os_ptr)); extern int zexch(P1(os_ptr)); *************** *** 97,104 **** extern int zsub(P1(os_ptr)); private op_proc_p special_ops[] = { ! zadd, zdup, zexch, zif, zifelse, zle, zpop, zroll, zsub }; typedef enum { tx_op_add = tx_op, tx_op_dup, tx_op_exch, --- 101,109 ---- extern int zsub(P1(os_ptr)); private op_proc_p special_ops[] = { ! zadd, zdef, zdup, zexch, zif, zifelse, zle, zpop, zroll, zsub }; typedef enum { tx_op_add = tx_op, + tx_op_def, tx_op_dup, tx_op_exch, *************** *** 134,137 **** --- 139,143 ---- } esbot = estack, esp = estack - 1, estop = estack + (max_estack-1); + esfile = 0; /* Initialize the dictionary stack to the first ndict */ /* dictionaries. ndict is a parameter because during */ *************** *** 139,150 **** dsp = dstack + ndict - 1, dstop = dstack + (max_dstack-1); } - private int - no_reschedule() - { return e_invalidcontext; - } - private int - no_time_slice() - { return 0; - } /* Look up an operator during initialization, */ --- 145,148 ---- *************** *** 249,252 **** --- 247,251 ---- register ref *pvalue; os_ptr whichp; + esfile = 0; /* clear cache */ /* We want to recognize executable arrays here, */ /* so we push the argument on the estack and enter */ *************** *** 301,313 **** /* Object that have attributes (arrays, dictionaries, files, and strings) */ /* use lit and exec; other objects use plain and plain_exec. */ ! #define rsa(attrs) (attrs >> (r_type_shift - 2)) ! #define rsa_execute rsa(a_execute) ! #define rsa_executable rsa(a_executable) ! #define lit(t) (((t) << 2) + rsa_execute) ! #define exec(t) (((t) << 2) + rsa_execute + rsa_executable) ! #define nox(t) ((t) << 2) ! #define nox_exec(t) (((t) << 2) + rsa_executable) ! #define plain(t) ((t) << 2) ! #define plain_exec(t) (((t) << 2) + rsa_executable) /* * We have to populate enough cases of the switch statement to force --- 300,309 ---- /* Object that have attributes (arrays, dictionaries, files, and strings) */ /* use lit and exec; other objects use plain and plain_exec. */ ! #define lit(t) type_xe_value(t, a_execute) ! #define exec(t) type_xe_value(t, a_execute + a_executable) ! #define nox(t) type_xe_value(t, 0) ! #define nox_exec(t) type_xe_value(t, a_executable) ! #define plain(t) type_xe_value(t, 0) ! #define plain_exec(t) type_xe_value(t, a_executable) /* * We have to populate enough cases of the switch statement to force *************** *** 334,343 **** case plain(t_boolean): case plain_exec(t_boolean):\ case plain(t_condition): case plain_exec(t_condition):\ ! case lit(t_dictionary): case nox(t_dictionary):\ case lit(t_file): case nox(t_file):\ case plain(t_fontID): case plain_exec(t_fontID):\ ! case plain(t_gstate): case plain_exec(t_gstate) ! #define cases_lit_2()\ ! case plain(t_integer): case plain_exec(t_integer):\ case plain(t_lock): case plain_exec(t_lock):\ case plain(t_mark): case plain_exec(t_mark):\ --- 330,340 ---- case plain(t_boolean): case plain_exec(t_boolean):\ case plain(t_condition): case plain_exec(t_condition):\ ! case lit(t_dictionary): case nox(t_dictionary) ! #define cases_lit_2()\ case lit(t_file): case nox(t_file):\ case plain(t_fontID): case plain_exec(t_fontID):\ ! case plain(t_gstate): case plain_exec(t_gstate):\ ! case plain(t_integer): case plain_exec(t_integer) ! #define cases_lit_3()\ case plain(t_lock): case plain_exec(t_lock):\ case plain(t_mark): case plain_exec(t_mark):\ *************** *** 345,353 **** case plain(t_null):\ case plain(t_oparray):\ ! case plain(t_operator):\ ! case plain(t_real): case plain_exec(t_real) ! #define cases_lit_3()\ case plain(t_save): case plain_exec(t_save):\ ! case lit(t_string): case nox(t_string):\ case lit(t_mixedarray): case nox(t_mixedarray):\ case lit(t_shortarray): case nox(t_shortarray):\ --- 342,351 ---- case plain(t_null):\ case plain(t_oparray):\ ! case plain(t_operator) ! #define cases_lit_4()\ ! case plain(t_real): case plain_exec(t_real):\ case plain(t_save): case plain_exec(t_save):\ ! case lit(t_string): case nox(t_string) ! #define cases_lit_5()\ case lit(t_mixedarray): case nox(t_mixedarray):\ case lit(t_shortarray): case nox(t_shortarray):\ *************** *** 357,360 **** --- 355,360 ---- cases_lit_2(): cases_lit_3(): + cases_lit_4(): + cases_lit_5(): break; /* Special operators. */ *************** *** 364,367 **** --- 364,372 ---- iosp--; next(); + case plain_exec(tx_op_def): + x_def: if ( (code = zop_def(iosp)) < 0 ) + return_with_error (code, iref); + iosp -= 2; + next(); case plain_exec(tx_op_dup): x_dup: if ( iosp < op_nargs_check(1) ) *************** *** 401,404 **** --- 406,411 ---- ifup: switch( r_type_xe(whichp) ) { + case exec(t_file): + esfile = 0; /* clear currentfile cache */ default: ref_assign(iesp + 1, whichp); *************** *** 410,422 **** case exec(t_shortarray): ; } ! iref = whichp->value.refs; ! icount = r_size(whichp); ! if ( --icount <= 0 ) /* <= 1 more elements */ ! { if ( icount < 0 ) goto up; ! } ! else ! { iesp++; ! ref_assign(iesp, whichp); } goto top; case plain_exec(tx_op_le): --- 417,429 ---- case exec(t_shortarray): ; } ! if ( (icount = r_size(whichp) - 1) <= 0 ) ! { if ( icount < 0 ) goto up; /* 0-element proc */ ! iref = whichp->value.refs; /* 1-element proc */ ! goto top; } + ++iesp; + /* Do a ref_assign, but also set iref. */ + iesp->tas = whichp->tas; + iref = iesp->value.refs = whichp->value.refs; goto top; case plain_exec(tx_op_le): *************** *** 449,460 **** pvalue = &op_array_table.value.refs[op_index(iref) - op_def_count]; ! prst: store_state(iesp); ! pr: if ( iesp >= estop ) return_with_error (e_execstackoverflow, pvalue); ++iesp; ! ref_assign(iesp, pvalue); ! iref = pvalue->value.refs; ! icount = r_size(pvalue) - 1; ! if ( icount <= 0 ) { if ( icount < 0 ) goto up; iesp--; } goto top; case plain_exec(t_operator): --- 456,473 ---- pvalue = &op_array_table.value.refs[op_index(iref) - op_def_count]; ! prst: /* Prepare to call the procedure (array) in *pvalue. */ ! store_state(iesp); ! pr: /* Call the array in *pvalue. State has been stored. */ ! if ( (icount = r_size(pvalue) - 1) <= 0 ) ! { if ( icount < 0 ) goto up; /* 0-element proc */ ! iref = pvalue->value.refs; /* 1-element proc */ ! goto top; ! } ! if ( iesp >= estop ) return_with_error (e_execstackoverflow, pvalue); ++iesp; ! /* Do a ref_assign, but also set iref. */ ! iesp->tas = pvalue->tas; ! iref = iesp->value.refs = pvalue->value.refs; goto top; case plain_exec(t_operator): *************** *** 510,513 **** --- 523,528 ---- pvalue = pdvalue; } + /* Dispatch on the type of the value. */ + /* Again, we have to over-populate the switch. */ switch ( r_type_xe(pvalue) ) { *************** *** 514,517 **** --- 529,543 ---- cases_nox(): /* access errors */ return_with_error (e_invalidaccess, iref); + cases_lit_1(): + cases_lit_2(): + cases_lit_3(): + cases_lit_4(): + cases_lit_5(): + /* Just push the value */ + if ( iosp >= ostop ) + return_with_error (e_stackoverflow, pvalue); + ++iosp; + ref_assign(iosp, pvalue); + next(); case exec(t_array): case exec(t_mixedarray): *************** *** 520,523 **** --- 546,550 ---- goto prst; case plain_exec(tx_op_add): goto x_add; + case plain_exec(tx_op_def): goto x_def; case plain_exec(tx_op_dup): goto x_dup; case plain_exec(tx_op_exch): goto x_exch; *************** *** 528,531 **** --- 555,565 ---- case plain_exec(tx_op_roll): goto x_roll; case plain_exec(tx_op_sub): goto x_sub; + case plain_exec(t_null): + goto bot; + case plain_exec(t_oparray): + pvalue = + &op_array_table.value.refs[op_index(pvalue) - + op_def_count]; + goto prst; case plain_exec(t_operator): { /* Shortcut for operators. */ *************** *** 558,571 **** return_with_error (code, pvalue); } ! cases_lit_1(): ! cases_lit_2(): ! cases_lit_3(): ! /* Just push the value */ ! if ( iosp >= ostop ) ! return_with_error (e_stackoverflow, pvalue); ! ++iosp; ! ref_assign(iosp, pvalue); ! next(); ! default: /* handles other literals */ /* Not a procedure, reinterpret it. */ store_state(iesp); --- 592,599 ---- return_with_error (code, pvalue); } ! case plain_exec(t_name): ! case exec(t_file): ! case exec(t_string): ! default: /* Not a procedure, reinterpret it. */ store_state(iesp); diff -rc2N gs24/isave.c gs241/isave.c *** gs24/isave.c Tue Mar 24 02:54:38 1992 --- gs241/isave.c Thu Apr 16 13:25:34 1992 *************** *** 136,140 **** alloc_state state; alloc_state_ptr cap; ! ushort name_count; }; --- 136,140 ---- alloc_state state; alloc_state_ptr cap; ! uint name_cnt; }; *************** *** 173,177 **** save->state = *ap; save->cap = ap; ! save->name_count = name_next_index(); /* Reset the l_new attribute in all slots. The only slots that */ /* can have the attribute set are the ones on the changes chain. */ --- 173,177 ---- save->state = *ap; save->cap = ap; ! save->name_cnt = name_count(); /* Reset the l_new attribute in all slots. The only slots that */ /* can have the attribute set are the ones on the changes chain. */ *************** *** 185,188 **** --- 185,197 ---- ap->saved_cbot = ap->cbot; ap->saved_ctop = ap->ctop; + /* Clear the last_freed cache, because the cache pointer */ + /* must point to a chunk at the current save level. */ + ap->last_freed = 0; + #ifdef DEBUG + if ( gs_debug['u'] ) + { dprintf3("[u]save at %lx: cbot=%lx ctop=%lx\n", (ulong)save, + (ulong)ap->cbot, (ulong)ap->ctop); + } + #endif set_in_save(); return save; *************** *** 244,248 **** #ifdef DEBUG if ( gs_debug['u'] ) ! { dprintf3("[u]alloc_free_refs (%lx,%d) %s", (ulong)ptr, num_refs, client_name); } --- 253,257 ---- #ifdef DEBUG if ( gs_debug['u'] ) ! { dprintf3("[u]alloc_free_refs (%lx,%d) %s\n", (ulong)ptr, num_refs, client_name); } *************** *** 296,299 **** --- 305,313 ---- register alloc_state_ptr ap = save->cap; + #ifdef DEBUG + if ( gs_debug['U'] ) + dprintf2("[U]is_since_save %lx, %lx:\n", (ulong)ptr, (ulong)save); + #endif + /* Check against current chunk at the time of the save */ if ( ptr_is_in_chunk(ptr, &save->state.current) ) *************** *** 300,303 **** --- 314,322 ---- { /* In the chunk, check against allocation pointers */ /* at the time of the save */ + #ifdef DEBUG + if ( gs_debug['U'] ) + dprintf2("[U?] current chunk %lx, %lx\n", + (ulong)save->state.cbot, (ulong)save->state.ctop); + #endif return ( (ptr_ord_t)ptr >= (ptr_ord_t)save->state.cbot && (ptr_ord_t)ptr < (ptr_ord_t)save->state.ctop ); *************** *** 307,311 **** { alloc_chunk *chunk = &ap->current; while ( chunk->save_level > save->state.save_level ) ! { if ( ptr_is_in_chunk(ptr, chunk) ) return 1; chunk = chunk->next; } --- 326,338 ---- { alloc_chunk *chunk = &ap->current; while ( chunk->save_level > save->state.save_level ) ! { if ( ptr_is_in_chunk(ptr, chunk) ) ! { ! #ifdef DEBUG ! if ( gs_debug['U'] ) ! dprintf3("[U+] new chunk %lx: %lx, %lx\n", chunk, ! (ulong)chunk->base, (ulong)chunk->limit); ! #endif ! return 1; ! } chunk = chunk->next; } *************** *** 317,321 **** { alloc_block *mblk = asp->malloc_chain; for ( ; mblk != 0; mblk = mblk->next ) ! if ( alloc_block_size + (char *)mblk == ptr ) return 1; } } --- 344,355 ---- { alloc_block *mblk = asp->malloc_chain; for ( ; mblk != 0; mblk = mblk->next ) ! if ( alloc_block_size + (char *)mblk == ptr ) ! { ! #ifdef DEBUG ! if ( gs_debug['U'] ) ! dprintf("[U+] malloc'ed\n"); ! #endif ! return 1; ! } } } *************** *** 328,332 **** int alloc_name_is_since_save(ref *pnref, alloc_save *save) ! { return pnref->value.pname->index >= save->name_count; } --- 362,366 ---- int alloc_name_is_since_save(ref *pnref, alloc_save *save) ! { return name_is_since_count(pnref, save->name_cnt); } *************** *** 350,353 **** --- 384,393 ---- alloc_save *sprev; + #ifdef DEBUG + if ( gs_debug['u'] ) + { dprintf1("[u]restore from %lx\n", (ulong)save); + } + #endif + /* Iteratively restore the state */ do *************** *** 361,365 **** /* Adjust the name table. */ ! name_restore(sprev->name_count); /* Undo changes since the save. */ --- 401,405 ---- /* Adjust the name table. */ ! name_restore(sprev->name_cnt); /* Undo changes since the save. */ *************** *** 420,423 **** --- 460,466 ---- ap->saved_cbot = sprev->state.cbot, ap->saved_ctop = sprev->state.ctop; + /* Clear the last_freed cache, because the cache pointer */ + /* must point to a chunk at the current save level. */ + ap->last_freed = 0; if ( ap->save_level == 0 ) set_not_in_save(); diff -rc2N gs24/iscan.c gs241/iscan.c *** gs24/iscan.c Sat Feb 15 08:27:06 1992 --- gs241/iscan.c Thu Apr 16 12:52:42 1992 *************** *** 1,3 **** ! /* Copyright (C) 1989, 1990, 1991 Aladdin Enterprises. All rights reserved. Distributed by Free Software Foundation, Inc. --- 1,3 ---- ! /* Copyright (C) 1989, 1992 Aladdin Enterprises. All rights reserved. Distributed by Free Software Foundation, Inc. *************** *** 25,28 **** --- 25,29 ---- #include "alloc.h" #include "dict.h" /* for //name lookup */ + #include "dstack.h" /* ditto */ #include "errors.h" #include "iutil.h" *************** *** 202,206 **** if ( scan_enable_level2 ) { c = sgetc(s); ! if ( c != EOFC ) sputback(s); switch ( c ) { --- 203,207 ---- if ( scan_enable_level2 ) { c = sgetc(s); ! if ( char_is_data(c) ) sputback(s); switch ( c ) { *************** *** 309,313 **** name_ref((byte *)0, 0, myref, 1); /* Check for \r\n */ ! if ( c == '\r' && (c = sgetc(s)) != '\n' && c != EOFC ) sputback(s); goto have_name; --- 310,314 ---- name_ref((byte *)0, 0, myref, 1); /* Check for \r\n */ ! if ( c == '\r' && (c = sgetc(s)) != '\n' && char_is_data(c) ) sputback(s); goto have_name; *************** *** 319,323 **** { case '\r': ! if ( (c = sgetc(s)) != '\n' && c != EOFC ) sputback(s); /* falls through */ --- 320,324 ---- { case '\r': ! if ( (c = sgetc(s)) != '\n' && char_is_data(c) ) sputback(s); /* falls through */ *************** *** 326,329 **** --- 327,332 ---- case EOFC: goto ceof; + case ERRC: + goto cerr; } ceof: ; *************** *** 332,335 **** --- 335,341 ---- retcode = (pstack != 0 ? e_syntaxerror : 1); break; + case ERRC: + cerr: retcode = e_ioerror; + break; /* Check for a Level 2 funny name (<< or >>). */ *************** *** 342,346 **** goto have_name; } ! if ( c1 != EOFC ) sputback(s); } retcode = e_syntaxerror; break; --- 348,352 ---- goto have_name; } ! if ( char_is_data(c1) ) sputback(s); } retcode = e_syntaxerror; break; *************** *** 431,435 **** case ctype_space: /* Check for \r\n */ ! if ( c == '\r' && (c = sgetc(s)) != '\n' && c != EOFC ) sputback(s); case ctype_eof: ; --- 437,441 ---- case ctype_space: /* Check for \r\n */ ! if ( c == '\r' && (c = sgetc(s)) != '\n' && char_is_data(c) ) sputback(s); case ctype_eof: ; *************** *** 535,544 **** switch ( c = ngetc(sp) ) { ! default: return(e_syntaxerror); /* not terminated properly */ ! case '.': c = ngetc(sp); goto fd; ! case 'e': case 'E': goto fsd; case EOFC: /* return a float */ make_real_new(pref, (float)(sign < 0 ? -dval : dval)); ! return(0); } } --- 541,555 ---- switch ( c = ngetc(sp) ) { ! default: ! return(e_syntaxerror); /* not terminated properly */ ! case '.': ! c = ngetc(sp); goto fd; ! case 'e': case 'E': ! goto fsd; case EOFC: /* return a float */ make_real_new(pref, (float)(sign < 0 ? -dval : dval)); ! return 0; ! case ERRC: ! return e_ioerror; } } *************** *** 545,552 **** switch ( c = ngetc(sp) ) { ! case EOFC: break; ! case '.': c = ngetc(sp); goto fi; ! default: return(e_syntaxerror); /* not terminated properly */ ! case 'e': case 'E': goto fsi; case '#': if ( sign || ival < min_radix || ival > max_radix ) --- 556,569 ---- switch ( c = ngetc(sp) ) { ! case EOFC: ! break; ! case ERRC: ! return e_ioerror; ! case '.': ! c = ngetc(sp); goto fi; ! default: ! return(e_syntaxerror); /* not terminated properly */ ! case 'e': case 'E': ! goto fsi; case '#': if ( sign || ival < min_radix || ival > max_radix ) *************** *** 554,558 **** code = scan_int(&sp, end, (int)ival, 1, &ival, NULL); if ( code ) return(code); ! if ( ngetc(sp) != EOFC ) return(e_syntaxerror); } /* Return an integer */ --- 571,583 ---- code = scan_int(&sp, end, (int)ival, 1, &ival, NULL); if ( code ) return(code); ! switch ( ngetc(sp) ) ! { ! case EOFC: ! break; ! case ERRC: ! return(e_ioerror); ! default: ! return(e_syntaxerror); ! } } /* Return an integer */ *************** *** 607,611 **** c = ngetc(sp); } ! if ( c != EOFC ) return(e_syntaxerror); /* Compute dval * 10^exp10. */ if ( exp10 > 0 ) --- 632,636 ---- c = ngetc(sp); } ! if ( c != EOFC ) return(c == ERRC ? e_ioerror : e_syntaxerror); /* Compute dval * 10^exp10. */ if ( exp10 > 0 ) *************** *** 660,664 **** { c = ngetc(sp); if ( convert_digit_fails(c, d) ) ! { if ( c != EOFC ) nputback(sp); if ( (int)ival < 0 && !nosign ) { d = ival % radix; --- 685,689 ---- { c = ngetc(sp); if ( convert_digit_fails(c, d) ) ! { if ( char_is_data(c) ) nputback(sp); if ( (int)ival < 0 && !nosign ) { d = ival % radix; *************** *** 680,684 **** { c = ngetc(sp); if ( convert_digit_fails(c, d) ) ! { if ( c != EOFC ) nputback(sp); if ( (long)lval < 0 && !nosign ) { d = lval % radix; --- 705,709 ---- { c = ngetc(sp); if ( convert_digit_fails(c, d) ) ! { if ( char_is_data(c) ) nputback(sp); if ( (long)lval < 0 && !nosign ) { d = lval % radix; *************** *** 700,704 **** { c = ngetc(sp); if ( convert_digit_fails(c, d) ) ! { if ( c != EOFC ) nputback(sp); *pdval = dval; nreturn(1); --- 725,729 ---- { c = ngetc(sp); if ( convert_digit_fails(c, d) ) ! { if ( char_is_data(c) ) nputback(sp); *pdval = dval; nreturn(1); *************** *** 736,739 **** --- 761,767 ---- dynamic_free(&da); return e_syntaxerror; + case ERRC: + dynamic_free(&da); + return e_ioerror; case '\\': if ( from_string ) break; *************** *** 747,751 **** case '\r': /* ignore, check for following \n */ c = sgetc(s); ! if ( c != '\n' && c != EOFC ) sputback(s); goto top; --- 775,779 ---- case '\r': /* ignore, check for following \n */ c = sgetc(s); ! if ( c != '\n' && char_is_data(c) ) sputback(s); goto top; *************** *** 763,769 **** } } ! if ( d == EOFC ) { dynamic_free(&da); ! return e_syntaxerror; } sputback(s); --- 791,797 ---- } } ! if ( char_is_signal(d) ) { dynamic_free(&da); ! return (d == ERRC ? e_ioerror : e_syntaxerror); } sputback(s); *************** *** 779,783 **** case '\r': /* convert to \n */ c = sgetc(s); ! if ( c != '\n' && c != EOFC ) sputback(s); c = '\n'; --- 807,811 ---- case '\r': /* convert to \n */ c = sgetc(s); ! if ( c != '\n' && char_is_data(c) ) sputback(s); c = '\n'; diff -rc2N gs24/lines.ps gs241/lines.ps *** gs24/lines.ps Sat Mar 21 01:36:12 1992 --- gs241/lines.ps Mon Apr 13 16:42:06 1992 *************** *** 90,91 **** --- 90,95 ---- showpage grestore + + % End + + quit diff -rc2N gs24/maint.mak gs241/maint.mak *** gs24/maint.mak Wed Mar 25 02:33:38 1992 --- gs241/maint.mak Sun Apr 19 03:45:00 1992 *************** *** 24,28 **** DRIVE=a: ! LABEL=032592 # Targets: --- 24,28 ---- DRIVE=a: ! LABEL=041992 # Targets: *************** *** 30,34 **** # xfer -- make a diskette for transferring files to the Sun # release -- make the .BE files for a release ! # diskette -- make a MS-DOS diskette set # Remember to erase *.zip / *.z / *.be, if needed, before running these. --- 30,34 ---- # xfer -- make a diskette for transferring files to the Sun # release -- make the .BE files for a release ! # disk720, disk1.2, disk1.44 -- make a MS-DOS diskette set # Remember to erase *.zip / *.z / *.be, if needed, before running these. *************** *** 63,67 **** copy \cp.bat copy \rm.bat ! tar -b1 -cf _temp_.t -ubat g*.asm i*.asm gs*.bat cp.bat bdftops.bat font2c.bat pfbtogs.bat rm.bat compress -i _temp_.t rm tar1.z --- 63,67 ---- copy \cp.bat copy \rm.bat ! tar -b1 -cf _temp_.t -ubat g*.asm i*.asm gs*.bat cp.bat bdftops.bat font2c.bat pfbtogs.bat showpbm.bat rm.bat compress -i _temp_.t rm tar1.z *************** *** 68,73 **** rename _temp_.txz tar1.z ! tar2.z: ansi2knr.c checkall ega.c trace.c uniq.c utrace.c ! tar -b1 -cf _temp_.t ansi2knr.c checkall ega.c trace.c uniq.c utrace.c compress -i _temp_.t rm tar2.z --- 68,73 ---- rename _temp_.txz tar1.z ! tar2.z: ansi2knr.c checkall ega.c uniq.c ! tar -b1 -cf _temp_.t ansi2knr.c checkall ega.c uniq.c compress -i _temp_.t rm tar2.z *************** *** 117,121 **** tar7.z: fontmap license readme bdftops font2c pfbtogs ccgs echoq ! tar -b1 -cf _temp_.t fontmap license readme bdftops font2c pfbtogs gs*. ccgs echoq compress -i _temp_.t rm tar7.z --- 117,121 ---- tar7.z: fontmap license readme bdftops font2c pfbtogs ccgs echoq ! tar -b1 -cf _temp_.t fontmap license readme bdftops font2c pfbtogs showpbm gs*. ccgs echoq compress -i _temp_.t rm tar7.z *************** *** 125,135 **** # We have to juggle things carefully to make the files fit. ! diskette diskset: ! make diskette1 ! make diskette2 ! make diskette3 @echo ---------------- Done. ---------------- # ------ Here are the ZIP files that go onto the diskettes. ------ gsexe.zip: gs.exe gs386.exe --- 125,148 ---- # We have to juggle things carefully to make the files fit. ! disk720: ! make disk1dd ! make disk2dd ! make disk3dd ! make disk4dd ! make disk5dd ! make disk6dd ! make disk7dd @echo ---------------- Done. ---------------- + disk1.2 disk1.44: + make disk1hd + make disk2hd + make disk3hd + make disk4hd + @echo ---------------- Done. ---------------- + # ------ Here are the ZIP files that go onto the diskettes. ------ + # We have to break them up so they will fit onto 720Kb media, + # and so that two of them will fit onto 1.2Mb media. gsexe.zip: gs.exe gs386.exe *************** *** 139,144 **** gsfiles.zip: bdftops.bat if exist _temp_.zip erase _temp_.zip ! pkzip _temp_.zip gs*.bat bdftops.bat font2c.bat pfbtogs.bat *.doc ! pkzip -a _temp_.zip *.ps fontmap license readme bdftops font2c pfbtogs pkzip -d _temp_.zip q* q*.* t.* comp1.* if exist gsfiles.zip erase gsfiles.zip --- 152,157 ---- gsfiles.zip: bdftops.bat if exist _temp_.zip erase _temp_.zip ! pkzip _temp_.zip gs*.bat bdftops.bat font2c.bat pfbtogs.bat showpbm.bat *.doc ! pkzip -a _temp_.zip *.ps fontmap license readme bdftops font2c pfbtogs showpbm pkzip -d _temp_.zip q* q*.* t.* comp1.* if exist gsfiles.zip erase gsfiles.zip *************** *** 145,171 **** rename _temp_.zip gsfiles.zip ! gsfonts1.zip: fonts\ptmr.gsf ! if exist gsfonts1.zip erase gsfonts1.zip ! pkzip gsfonts1.zip fonts\p*.gsf ! ! gsfonts2.zip: hershey\hrsy_r.gsf ! if exist _temp_.zip erase _temp_.zip ! pkzip _temp_.zip hershey\*.gsf ! pkzip -a _temp_.zip fonts\b*.gsf fonts\z*.gsf fonts\*.pfa ! if exist gsfonts2.zip erase gsfonts2.zip ! rename _temp_.zip gsfonts2.zip ! ! gssrc1.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 zlzw*.c slzw*.c comp1.* - if exist gssrc1.zip erase gssrc1.zip - rename _temp_.zip gssrc1.zip - - gssrc2.zip: ansi2knr.c - if exist _temp_.zip erase _temp_.zip pkzip _temp_.zip \rm.bat \cp.bat pkzip -a _temp_.zip g*.asm i*.asm ! pkzip -a _temp_.zip ansi2knr.c ega.c trace.c uniq.c utrace.c turboc.cfg pkzip -a _temp_.zip *.h *.mak *.man *.sh *.tr tar_*. ugly*.* pkzip -a _temp_.zip gs*. ccgs echoq --- 158,166 ---- rename _temp_.zip gsfiles.zip ! gssrc1.zip: ansi2knr.c if exist _temp_.zip erase _temp_.zip pkzip _temp_.zip \rm.bat \cp.bat pkzip -a _temp_.zip g*.asm i*.asm ! pkzip -a _temp_.zip ansi2knr.c ega.c uniq.c turboc.cfg pkzip -a _temp_.zip *.h *.mak *.man *.sh *.tr tar_*. ugly*.* pkzip -a _temp_.zip gs*. ccgs echoq *************** *** 172,188 **** 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 gssrc2.zip erase gssrc2.zip rename _temp_.zip gssrc2.zip # ------ Now the actual contents of the diskettes. ------ ! diskette1: readme.1st gsexe.zip gsfiles.zip gssrc1.zip ! @askdisk 1 ! chkdsk $(DRIVE) ! echo $(LABEL)_1$3 >_temp_ ! label $(DRIVE) <_temp_ xcopy readme.1st $(DRIVE) /v xcopy \utils\pkunzip.exe $(DRIVE) /v xcopy gsexe.zip $(DRIVE) /v xcopy gsfiles.zip $(DRIVE) /v xcopy gssrc1.zip $(DRIVE) /v --- 167,217 ---- 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 + + 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 zlzw*.c slzw*.c comp1.* if exist gssrc2.zip erase gssrc2.zip rename _temp_.zip gssrc2.zip + gsfonts1.zip: fonts\bchr.gsf fonts\pagk.gsf fonts\pbkd.gsf fonts\pcrro.gsf + if exist _temp_.zip erase _temp_.zip + pkzip _temp_.zip fonts\b*.gsf fonts\pa*.gsf fonts\pb*.gsf fonts\pc*.gsf + if exist gsfonts1.zip erase gsfonts1.zip + rename _temp_.zip gsfonts1.zip + + gsfonts2.zip: fonts\phvr.gsf fonts\pncr.gsf fonts\pplr.gsf + if exist _temp_.zip erase _temp_.zip + pkzip _temp_.zip fonts\ph*.gsf fonts\pn*.gsf fonts\pp*.gsf + if exist gsfonts2.zip erase gsfonts2.zip + rename _temp_.zip gsfonts2.zip + + gsfonts3.zip: fonts\psyr.gsf fonts\ptmr.gsf fonts\pzdr.gsf fonts\zcr.gsf + if exist _temp_.zip erase _temp_.zip + pkzip _temp_.zip fonts\ps*.gsf fonts\pt*.gsf fonts\pz*.gsf fonts\z*.gsf + if exist gsfonts3.zip erase gsfonts3.zip + rename _temp_.zip gsfonts3.zip + + gsfonts4.zip: fonts\cour.pfa hershey\hrsy_r.gsf + if exist _temp_.zip erase _temp_.zip + pkzip _temp_.zip hershey\*.gsf fonts\*.pfa + if exist gsfonts4.zip erase gsfonts4.zip + rename _temp_.zip gsfonts4.zip + # ------ Now the actual contents of the diskettes. ------ ! # Double density diskettes (720K) ! ! disk1dd: readme.1st gsexe.zip ! @askdisk 1 $(DRIVE) $(LABEL)_1$7 xcopy readme.1st $(DRIVE) /v xcopy \utils\pkunzip.exe $(DRIVE) /v xcopy gsexe.zip $(DRIVE) /v + dir $(DRIVE) + + disk2dd: gsfiles.zip gssrc1.zip + @askdisk 2 $(DRIVE) $(LABEL)_2$7 xcopy gsfiles.zip $(DRIVE) /v xcopy gssrc1.zip $(DRIVE) /v *************** *** 189,204 **** dir $(DRIVE) ! diskette2: gsfonts1.zip ! @askdisk 2 ! echo $(LABEL)_2$3 >_temp_ ! label $(DRIVE) <_temp_ xcopy gsfonts1.zip $(DRIVE) /v dir $(DRIVE) ! diskette3: gsfonts2.zip gssrc2.zip ! @askdisk 3 ! echo $(LABEL)_3$3 >_temp_ ! label $(DRIVE) <_temp_ xcopy gssrc2.zip $(DRIVE) /v xcopy gsfonts2.zip $(DRIVE) /v dir $(DRIVE) --- 218,271 ---- dir $(DRIVE) ! disk3dd: gssrc2.zip ! @askdisk 3 $(DRIVE) $(LABEL)_3$7 ! xcopy gssrc2.zip $(DRIVE) /v ! dir $(DRIVE) ! ! disk4dd: gsfonts1.zip ! @askdisk 4 $(DRIVE) $(LABEL)_4$7 xcopy gsfonts1.zip $(DRIVE) /v dir $(DRIVE) ! disk5dd: gsfonts2.zip ! @askdisk 5 $(DRIVE) $(LABEL)_5$7 ! xcopy gsfonts2.zip $(DRIVE) /v ! dir $(DRIVE) ! ! disk6dd: gsfonts3.zip ! @askdisk 6 $(DRIVE) $(LABEL)_6$7 ! xcopy gsfonts3.zip $(DRIVE) /v ! dir $(DRIVE) ! ! disk7dd: gsfonts4.zip ! @askdisk 7 $(DRIVE) $(LABEL)_7$7 ! xcopy gsfonts4.zip $(DRIVE) /v ! dir $(DRIVE) ! ! # High density diskettes (1.2Mb or 1.44Mb) ! ! disk1hd: readme.1st gsexe.zip gsfiles.zip ! @askdisk 1 $(DRIVE) $(LABEL)_1$4 ! xcopy readme.1st $(DRIVE) /v ! xcopy \utils\pkunzip.exe $(DRIVE) /v ! xcopy gsexe.zip $(DRIVE) /v ! xcopy gsfiles.zip $(DRIVE) /v ! dir $(DRIVE) ! ! disk2hd: gssrc1.zip gssrc2.zip ! @askdisk 2 $(DRIVE) $(LABEL)_2$4 ! xcopy gssrc1.zip $(DRIVE) /v xcopy gssrc2.zip $(DRIVE) /v + dir $(DRIVE) + + disk3hd: gsfonts1.zip gsfonts2.zip + @askdisk 3 $(DRIVE) $(LABEL)_3$4 + xcopy gsfonts1.zip $(DRIVE) /v xcopy gsfonts2.zip $(DRIVE) /v + dir $(DRIVE) + + disk4hd: gsfonts3.zip gsfonts4.zip + @askdisk 4 $(DRIVE) $(LABEL)_4$4 + xcopy gsfonts3.zip $(DRIVE) /v + xcopy gsfonts4.zip $(DRIVE) /v dir $(DRIVE) diff -rc2N gs24/make.doc gs241/make.doc *** gs24/make.doc Wed Mar 25 03:28:14 1992 --- gs241/make.doc Tue Apr 21 04:13:32 1992 *************** *** 36,41 **** the DOS extender, dos4gw.exe. - On Unix systems, gs. ! - The interpreter initialization files: gconfig.ps, ! gs_init.ps, gs_statd.ps, gs_fonts.ps, and sym__enc.ps. - The font map: Fontmap. - The default font: uglyr.gsf. --- 36,40 ---- the DOS extender, dos4gw.exe. - On Unix systems, gs. ! - The interpreter initialization files: gs_*.ps and sym__enc.ps. - The font map: Fontmap. - The default font: uglyr.gsf. *************** *** 71,75 **** - The debugging options (macro TDEBUG); ! - The set of device drivers to be included (DEVICE_DEVS macro); - The set of optional features to be included (FEATURE_DEVS macro). --- 70,75 ---- - The debugging options (macro TDEBUG); ! - The set of device drivers to be included (DEVICE_DEVS ! and DEVICE_DEVS2..5 macros); - The set of optional features to be included (FEATURE_DEVS macro). *************** *** 112,125 **** ******** ! The makefile distributed with Ghostscript selects the following devices ! for inclusion in the build: ! VGA, EGA, and VESA (SuperVGA) display drivers; ! A BGI (Borland Graphics Interface) driver that handles ! CGA and Hercules displays; ! Epson-compatible 9-pin dot matrix printer at 120 x 60 DPI; ! Epson-compatible 24-pin dot matrix printer at 180 x 180 DPI; ! Canon BJ-10e; ! H-P PaintJet, DeskJet, and LaserJet. To build Ghostscript, you need MS-DOS version 3.3 or later, and a Borland --- 112,139 ---- ******** ! The makefiles distributed with Ghostscript select the following ! devices for inclusion in the executable: ! Turbo C: ! VGA and EGA displays ! Epson-compatible dot matrix printers ! (default resolution 180 x 180 DPI) ! Canon BJ-10e (BubbleJet) printer ! (default resolution 360 x 360 DPI) ! Borland C++: all of the above, plus: ! H-P DeskJet and LaserJet family printers ! (default resolution 300 DPI) ! GIF file format ! Watcom C/386: all of the above, plus: ! (partial) Display PostScript and PostScript Level 2 features ! Tseng ET3000/ET4000 SuperVGA displays ! H-P PaintJet printer ! PBM/PGM/PPM file formats ! PCX file format ! ! These options were chosen to strike a balance between RAM consumption and ! likely usefulness. (Turbo C is limited to 640K and does not support code ! overlaying; Borland C++ is limited to 640K, but supports code overlaying; ! Watcom C/386 is not limited to 640K.) To build Ghostscript, you need MS-DOS version 3.3 or later, and a Borland *************** *** 134,137 **** --- 148,152 ---- command make + You must have COMMAND.COM in your path to build Ghostscript. There is a special 'make' target that simply attempts to compile all the *************** *** 215,219 **** depending on whether your C compiler is a standard Kernighan & Ritchie C ! compiler, gcc, or an ANSI C compiler other than gcc respectively. If the X11 client header files are located in some directory which your --- 230,236 ---- depending on whether your C compiler is a standard Kernighan & Ritchie C ! compiler, gcc being used in ANSI mode, or an ANSI C compiler other than ! gcc respectively. (If you want to use gcc in non-ANSI mode, use ! unix-cc.mak and define the CC macro to refer to gcc.) If the X11 client header files are located in some directory which your *************** *** 246,250 **** Similarly, some versions of the X server do not implement bitmap/pixmap displaying properly. This may show up as white or black rectangles where ! characters should appear. If this happens, it may help you to change private int use_XPutImage = 1; to --- 263,269 ---- Similarly, some versions of the X server do not implement bitmap/pixmap displaying properly. This may show up as white or black rectangles where ! characters should appear, or characters may appear in "inverse video" ! (e.g., white on a black rectangle). If this happens, it may help you to ! change private int use_XPutImage = 1; to *************** *** 281,305 **** ----------------------- ! There is apparently a bug in the MIPS C compiler which causes gxdither.c ! to compile incorrectly if optimization is enabled (-O). Until a ! work-around is found, do not use -O with the MIPS C compiler. ! ! On the Apollo, you must run the compiler in ANSI-compatible mode (i.e., ! set AK= in the makefile); otherwise, it gives incorrect ! error messages for any function declared as returning a float value. ! ! Due to a compiler bug, if you are building Ghostscript on an Intel 80386 ! system using a version of gcc older than version 1.38, you must not use ! the -O option. ! ! GNU make 3.59 can't handle the final linking step in some cases; use the ! platform's standard make (e.g., /bin/make) if this happens. ! ! The Sun unbundled C compiler (SC1.0) doesn't compile Ghostscript properly ! if the -fast option is selected: Ghostscript core-dumps in build_gs_font. ! Use -g, or use gcc. ! ! On the IBM RS/6000, you must define _POSIX_SOURCE and you must use the c89 ! compiler, not cc, e.g.: make -f unix-ansi.mak CC=c89 XCFLAGS=-D_POSIX_SOURCE \ --- 300,334 ---- ----------------------- ! MIPS: ! There is apparently a bug in the MIPS C compiler which causes ! gxdither.c to compile incorrectly if optimization is enabled (-O). Until ! a work-around is found, do not use -O with the MIPS C compiler. ! ! Apollo: ! You must run the compiler in ANSI-compatible mode (i.e., set AK= ! in the makefile); otherwise, it gives incorrect error ! messages for any function declared as returning a float value. ! ! 386 Unix: ! Due to a compiler bug, if you are building Ghostscript on an Intel ! 80386 system using a version of gcc older than version 1.38, you must not ! use the -O option. ! ! Any platform with GNU make: ! GNU make 3.59 can't handle the final linking step in some cases; ! use the platform's standard make (e.g., /bin/make) if this happens. ! ! Sun: ! The Sun unbundled C compiler (SC1.0) doesn't compile Ghostscript ! properly if the -fast option is selected: Ghostscript core-dumps in ! build_gs_font. Use -g, or use gcc. ! The standard Sun cc may not compile iscan.c correctly if ! optimization (-O) is selected. One symptom is that numbers such as 1.e-3 ! give a syntax error. This has been observed on a SPARCstation running ! SunOS 4.1.1. If this happens, use -g for this file, or use gcc. ! ! RS/6000: ! IBM RS/6000, you must define _POSIX_SOURCE and you must use the ! c89 compiler, not cc, e.g.: make -f unix-ansi.mak CC=c89 XCFLAGS=-D_POSIX_SOURCE \ *************** *** 306,316 **** XINCLUDE=-I/usr/misc/X11/include XLIBDIRS=-L/usr/misc/X11/lib ! Also, apparently some (but not all) releases of the C library declare the ! hypot function: if the declaration in math_.h produces an error message, ! try removing it. Also, the IBM X11R3 server is known to be buggy: use the ! MIT X server if possible. Even beyond all this, many people have trouble ! with Ghostscript on the RS/6000. The usual symptom is that it compiles ! and links OK, but produces garbaged output on the screen. The problem may ! be related to particular versions of AIX or the X server; we don't have enough information at this time. The following combinations of AIX and X are known to fail: --- 335,345 ---- XINCLUDE=-I/usr/misc/X11/include XLIBDIRS=-L/usr/misc/X11/lib ! Apparently some (but not all) releases of the C library declare the hypot ! function: if the declaration in math_.h produces an error message, try ! removing it. Also, the IBM X11R3 server is known to be buggy: use the MIT ! X server if possible. Even beyond all this, many people have trouble with ! Ghostscript on the RS/6000. The usual symptom is that it compiles and ! links OK, but produces garbaged output on the screen. The problem may be ! related to particular versions of AIX or the X server; we don't have enough information at this time. The following combinations of AIX and X are known to fail: *************** *** 319,323 **** AIX 3.1.5, MIT X11R5, c89 ! For ISC Unix with gcc, an appropriate make invocation is: make XCFLAGS="-D__SVR3 -posix" LDFLAGS="-shlib -posix" \ EXTRALIBS="-linet -lnsl_s" --- 348,353 ---- AIX 3.1.5, MIT X11R5, c89 ! ISC Unix: ! For ISC Unix with gcc, an appropriate make invocation is: make XCFLAGS="-D__SVR3 -posix" LDFLAGS="-shlib -posix" \ EXTRALIBS="-linet -lnsl_s" *************** *** 324,334 **** If this doesn't work for you, try removing the -shlib. ! The SCO Unix C compiler apparently can't handle the Pn macros in std.h. ! If you get strange compilation errors on SCO Unix, see if you can get a ! compiler fix from SCO. Meanwhile, to use gcc with SCO ODT, see gcc-head.mak for the appropriate switch settings. ! Many versions of DEC's X server (DECwindows) have bugs that require ! setting use_XPutImage or use_XSetTile to 0, as described above. ******** --- 354,370 ---- If this doesn't work for you, try removing the -shlib. ! SCO Unix: ! The SCO Unix C compiler apparently can't handle the Pn macros in ! std.h. If you get strange compilation errors on SCO Unix, see if you can ! get a compiler fix from SCO. Meanwhile, to use gcc with SCO ODT, see gcc-head.mak for the appropriate switch settings. ! DEC (Ultrix): ! Many versions of DEC's X server (DECwindows) have bugs that ! require setting use_XPutImage or use_XSetTile to 0, as described above. ! ! H-P 700 series: ! You may need to use +O1 rather than -O to get the compiler to ! produce correct code. ******** diff -rc2N gs24/name.h gs241/name.h *** gs24/name.h Wed Mar 4 17:36:06 1992 --- gs241/name.h Thu Apr 16 13:21:36 1992 *************** *** 1,3 **** ! /* Copyright (C) 1989, 1990, 1991 Aladdin Enterprises. All rights reserved. Distributed by Free Software Foundation, Inc. --- 1,3 ---- ! /* Copyright (C) 1989, 1992 Aladdin Enterprises. All rights reserved. Distributed by Free Software Foundation, Inc. *************** *** 60,66 **** /* Conversion between names and indices. */ #define name_index(pnref) ((pnref)->value.pname->index) ! extern void name_index_ref(P2(uint index /* should be ushort*/, ref *pnref)); ! extern ushort name_next_index(P0()); /* Clean up the name table before a restore. */ --- 60,67 ---- /* Conversion between names and indices. */ #define name_index(pnref) ((pnref)->value.pname->index) ! extern void name_index_ref(P2(uint index /* should be ushort */, ref *pnref)); ! extern uint name_count(P0()); ! extern int name_is_since_count(P2(ref *, uint)); /* Clean up the name table before a restore. */ diff -rc2N gs24/npacked.h gs241/npacked.h *** gs24/npacked.h Sun Mar 1 08:06:10 1992 --- gs241/npacked.h Wed Apr 15 15:30:02 1992 *************** *** 28,32 **** bytes it occupies. The encoding: ! 00--tttt texrwsnm full 8-byte object 01m0jjjj jjjjjjjj executable operator (for bind) 01m1vvvv vvvvvvvv integer (biased by packed_min_intval) --- 28,32 ---- bytes it occupies. The encoding: ! 00-ttttt texrwsnm full 8-byte object 01m0jjjj jjjjjjjj executable operator (for bind) 01m1vvvv vvvvvvvv integer (biased by packed_min_intval) *************** *** 101,105 **** /* Make a packed array */ ! extern int make_packed_array(P4(ref *, uint, ref *, char *)); /* Get an element from a packed array. */ --- 101,105 ---- /* Make a packed array */ ! extern int make_packed_array(P4(ref *, uint, ref *, const char *)); /* Get an element from a packed array. */ diff -rc2N gs24/objw.tr gs241/objw.tr *** gs24/objw.tr --- gs241/objw.tr Tue Apr 21 05:41:02 1992 *************** *** 0 **** --- 1,13 ---- + # + FILE gdevbj10.obj + FILE gdevdjet.obj + FILE gdevegaa.obj + FILE gdevepsn.obj + FILE gdevgif.obj + FILE gdevpccm.obj + FILE gdevpcfb.obj + FILE gdevpcl.obj + FILE gdevprn.obj + FILE gp_dosfb.obj + FILE gp_itbc.obj + FILE gp_msdos.obj diff -rc2N gs24/opdef.h gs241/opdef.h *** gs24/opdef.h Mon Dec 2 14:39:52 1991 --- gs241/opdef.h Tue Apr 7 15:50:52 1992 *************** *** 1,3 **** ! /* Copyright (C) 1991 Aladdin Enterprises. All rights reserved. Distributed by Free Software Foundation, Inc. --- 1,3 ---- ! /* Copyright (C) 1991, 1992 Aladdin Enterprises. All rights reserved. Distributed by Free Software Foundation, Inc. *************** *** 54,62 **** */ typedef struct { ! char _ds *oname; op_proc_p proc; int _ds *oindex; } op_def; ! typedef op_def _ds *op_def_ptr; #define op_def_end(iproc) {(char _ds *)0, (op_proc_p)iproc} --- 54,62 ---- */ typedef struct { ! const char _ds *oname; op_proc_p proc; int _ds *oindex; } op_def; ! typedef op_def const _ds *op_def_ptr; #define op_def_end(iproc) {(char _ds *)0, (op_proc_p)iproc} diff -rc2N gs24/oper.h gs241/oper.h *** gs24/oper.h Thu Mar 5 16:25:22 1992 --- gs241/oper.h Mon Apr 20 17:17:30 1992 *************** *** 1,3 **** ! /* Copyright (C) 1989, 1990, 1991 Aladdin Enterprises. All rights reserved. Distributed by Free Software Foundation, Inc. --- 1,3 ---- ! /* Copyright (C) 1989, 1992 Aladdin Enterprises. All rights reserved. Distributed by Free Software Foundation, Inc. *************** *** 27,31 **** /* Structure for initializing variables that hold name constants. */ typedef struct { ! char _ds *vname; ref _ds *pvref; } names_def; --- 27,31 ---- /* Structure for initializing variables that hold name constants. */ typedef struct { ! const char _ds *vname; ref _ds *pvref; } names_def; *************** *** 73,80 **** /* Check for procedure */ #define check_proc(rf)\ ! switch ( r_type(&rf) )\ ! { default: return e_typecheck;\ ! case t_array: case t_mixedarray: case t_shortarray: ; }\ ! if ( !r_has_attrs(&rf,a_execute+a_executable) ) return e_invalidaccess /* Check for read, write, or execute access. */ --- 73,84 ---- /* Check for procedure */ #define check_proc(rf)\ ! switch ( r_type_xe(&rf) )\ ! { default:\ ! return(r_has_attrs(&rf, a_execute + a_executable) ? e_typecheck :\ ! e_invalidaccess);\ ! case type_xe_value(t_array, a_execute + a_executable):\ ! case type_xe_value(t_mixedarray, a_execute + a_executable):\ ! case type_xe_value(t_shortarray, a_execute + a_executable): ;\ ! } /* Check for read, write, or execute access. */ diff -rc2N gs24/packed.h gs241/packed.h *** gs24/packed.h Tue Mar 3 17:35:40 1992 --- gs241/packed.h Wed Apr 15 15:30:08 1992 *************** *** 28,32 **** bytes it occupies. The encoding: ! 00--tttt texrwsnm full 8-byte object 010jjjjj jjjjjjjj executable operator (for bind) 011vvvvv vvvvvvvv integer (biased by packed_min_intval) --- 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) *************** *** 92,96 **** /* Make a packed array */ ! extern int make_packed_array(P4(ref *, uint, ref *, char *)); /* Get an element from a packed array. */ --- 92,96 ---- /* Make a packed array */ ! extern int make_packed_array(P4(ref *, uint, ref *, const char *)); /* Get an element from a packed array. */ diff -rc2N gs24/phonbook.ps gs241/phonbook.ps *** gs24/phonbook.ps Thu Mar 19 15:45:36 1992 --- gs241/phonbook.ps Sun Apr 19 14:33:54 1992 *************** *** 20,24 **** % Print a template for a name / address / phone book. ! /HeadingFont { (Helvetica) 12 selectfont } def /HeadingHeight 40 def /NameHeading (Name and Address) def --- 20,24 ---- % Print a template for a name / address / phone book. ! /HeadingFont { (Helvetica) findfont 12 scalefont setfont } def /HeadingHeight 40 def /NameHeading (Name and Address) def *************** *** 25,29 **** /NumberHeading (Telephone) def ! /AreaCodeFont { (Helvetica) 6 selectfont } def /SpacerLineWidth 0.3 def --- 25,29 ---- /NumberHeading (Telephone) def ! /AreaCodeFont { (Helvetica) findfont 6 scalefont setfont } def /SpacerLineWidth 0.3 def diff -rc2N gs24/psfiles.doc gs241/psfiles.doc *** gs24/psfiles.doc Thu Mar 19 15:42:00 1992 --- gs241/psfiles.doc Sun Mar 29 11:18:58 1992 *************** *** 1,3 **** ! Copyright (C) 1990, 1991 Aladdin Enterprises. All rights reserved. Distributed by Free Software Foundation, Inc. --- 1,3 ---- ! Copyright (C) 1990, 1992 Aladdin Enterprises. All rights reserved. Distributed by Free Software Foundation, Inc. *************** *** 69,72 **** --- 69,74 ---- colorcir.ps - A set of nested ellipses made up of colored bars. + + tiger.ps - A dramatic colored picture of a tiger's head. Utilities diff -rc2N gs24/pstoppm.ps gs241/pstoppm.ps *** gs24/pstoppm.ps Fri Jan 17 16:14:30 1992 --- gs241/pstoppm.ps Mon Apr 6 13:46:02 1992 *************** *** 3,6 **** --- 3,8 ---- %% For Ghostscript 2.4. %% + %% Modified by L. Peter Deutsch 4/6/92: + %% Ghostscript 2.4 requires all 8 primary colors to be in the palette. %% Modified by L. Peter Deutsch 1/17/92: %% the palette for makeimagedevice is now a string, not an array. *************** *** 40,44 **** /Palette8 %========== Here we define all 256 color entries. ====== ! %========== Colors were taken from the X Windows default colors. ====== < 000000 ffffff a8a8a8 ebebeb 5c5c5c 373737 5f929e 85ccdd --- 42,47 ---- /Palette8 %========== Here we define all 256 color entries. ====== ! %========== Colors were taken from the X Windows default colors, ====== ! %========== hacked up a little so we get all 8 primaries. ====== < 000000 ffffff a8a8a8 ebebeb 5c5c5c 373737 5f929e 85ccdd *************** *** 49,53 **** fe837e fefc6a fe0c9a fe0350 fe08b5 6715fe fefb3f fe544b 00c000 20c000 40c000 60c000 80c000 a0c000 c0c000 e0c000 ! 00e000 20e000 40e000 60e000 80e000 a0e000 c0e000 e0e000 000040 200040 400040 600040 800040 a00040 c00040 e00040 002040 202040 402040 602040 802040 a02040 c02040 e02040 --- 52,56 ---- fe837e fefc6a fe0c9a fe0350 fe08b5 6715fe fefb3f fe544b 00c000 20c000 40c000 60c000 80c000 a0c000 c0c000 e0c000 ! 00ff00 20e000 40e000 60e000 80e000 a0e000 c0e000 e0e000 000040 200040 400040 600040 800040 a00040 c00040 e00040 002040 202040 402040 602040 802040 a02040 c02040 e02040 *************** *** 66,70 **** 00c080 20c080 40c080 60c080 80c080 a0c080 c0c080 e0c080 00e080 20e080 40e080 60e080 80e080 a0e080 c0e080 e0e080 ! 0000c0 2000c0 4000c0 6000c0 8000c0 a000c0 c000c0 e000c0 0020c0 2020c0 4020c0 6020c0 8020c0 a020c0 c020c0 e020c0 0040c0 2040c0 4040c0 6040c0 8040c0 a040c0 c040c0 e040c0 --- 69,73 ---- 00c080 20c080 40c080 60c080 80c080 a0c080 c0c080 e0c080 00e080 20e080 40e080 60e080 80e080 a0e080 c0e080 e0e080 ! 0000ff 2000c0 4000c0 6000c0 8000c0 a000c0 c000c0 ff00ff 0020c0 2020c0 4020c0 6020c0 8020c0 a020c0 c020c0 e020c0 0040c0 2040c0 4040c0 6040c0 8040c0 a040c0 c040c0 e040c0 *************** *** 73,77 **** 00a0c0 20a0c0 40a0c0 60a0c0 80a0c0 a0a0c0 c0a0c0 e0a0c0 00c0c0 20c0c0 40c0c0 60c0c0 80c0c0 a0c0c0 c0c0c0 e0c0c0 ! 00e0c0 20e0c0 40e0c0 60e0c0 80e0c0 a0e0c0 c0e0c0 e0e0c0 > def --- 76,80 ---- 00a0c0 20a0c0 40a0c0 60a0c0 80a0c0 a0a0c0 c0a0c0 e0a0c0 00c0c0 20c0c0 40c0c0 60c0c0 80c0c0 a0c0c0 c0c0c0 e0c0c0 ! 00ffff 20e0c0 40e0c0 60e0c0 80e0c0 a0e0c0 c0e0c0 e0e0c0 > def diff -rc2N gs24/readme.doc gs241/readme.doc *** gs24/readme.doc Tue Mar 24 17:14:54 1992 --- gs241/readme.doc Sat Apr 18 11:42:20 1992 *************** *** 1,3 **** ! Copyright (C) 1990, 1991 Aladdin Enterprises. All rights reserved. Distributed by Free Software Foundation, Inc. --- 1,3 ---- ! Copyright (C) 1990, 1992 Aladdin Enterprises. All rights reserved. Distributed by Free Software Foundation, Inc. *************** *** 20,25 **** - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ! This file, readme.doc, describes problems and new features in the current ! release of Ghostscript. This file describes version 2.4 of Ghostscript. For an overview of Ghostscript and a list of the documentation files, see --- 20,26 ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ! This file, readme.doc, describes problems and new features in the ! current release of Ghostscript. This file describes version 2.4.1 of ! Ghostscript. For an overview of Ghostscript and a list of the documentation files, see *************** *** 32,90 **** section of history.doc for full details. ! The default MS-DOS configuration now includes VGA (default), EGA, VESA ! (SuperVGA), Epson, BubbleJet, PaintJet, DeskJet, and LaserJet drivers. ! The VESA driver is new. There are several other new drivers as well. ! A new file landscap.ps makes it easy to display landscape-mode output ! rotated by 90 degrees. ! It is now possible to select the resolution dynamically for printers. ! If one includes -dDISKFONTS in the command line, Ghostscript loads ! individual characters from fonts dynamically. This may allow one to fit ! more fonts in RAM, at the expense of slower rendering. This works both ! for Ghostscript's own fonts (except for the Courier family), and for any ! Type 1 fonts that do not use eexec encryption. ! Type 1 fonts now do look at the Metrics information. The Ghostscript ! fonts now have the same character spacing as the Adobe fonts. ! clip and eoclip now intersect the new clipping path with the old one, as ! they should. ! Transfer functions work for images. - The X11 driver includes the changes to support Ghostview. - - You can now put .PFB fonts in the Fontmap directly -- you no longer need - to run pfbtogs. - - You can now send printer output to the printer directly, to a set of - files, or (on Unix systems) to a pipe; see use.doc for details. - - You can precompile fonts into C and link them into the executable. They - don't run any faster, but you eliminate the loading time. (Don't attempt - this on MS-DOS systems, unless you are using the Watcom compiler or - running under Windows.) See fonts.doc for details. - - Ghostscript now implements essentially all the facilities of Display - PostScript that are also in Level 2 PostScript, except for garbage - collection: binary tokens, rectangles, user paths, insideness testing, and - a variety of other odds and ends. (The garbage collection operators are - provided, but they have no effect.) - - Changes - ------- - - Some of the Ghostscript extensions have changed, specifically - makeimagedevice, and some have been removed. See history.doc for details. - - For driver authors only: There have been incompatible changes in the - gx_device structure, and in the specification of the map_rgb_color, - map_color_rgb, copy_mono, and copy_color driver procedures; also, the - fill_ and tile_trapezoid procedures have been removed, and new get_bits, - get_props, and put_props procedures have been added. See drivers.doc for - details. - Known problems ============== --- 33,58 ---- section of history.doc for full details. ! The SunView driver works again. ! The SuperVGA drivers, except for the VESA driver, now work with the ! 32-bit MS-DOS executable. ! You can use \ in file names on the command line on MS-DOS. ! You no longer need to set GS_RUN_EXE=dos4gw when using the Watcom ! compiler. ! Dictionaries expand automatically when they fill up. (No more dictfull ! errors.) ! There are new drivers that produce all six types of Portable Bitmap / ! Graymap / Pixmap output. (writeppmfile is still supported, but it ! will be removed in the next release.) ! There are new drivers that produce three flavors of PCX files ! (black-and-white, EGA/VGA-style 16-color, and SuperVGA-style ! 256-color), and two flavors of GIF files (black-and-white and ! 256-color). Known problems ============== *************** *** 159,162 **** --- 127,134 ---- Halftone patterns "flip over" at the 50% coverage point, producing anomalous visual effects on some color devices. + + We have not been able to test 2-, 4-, and 16-bit memory devices as + thoroughly as 1-, 8-, 24-, and 32-bit devices; please report any + problems. Non-graphics bugs diff -rc2N gs24/sfilter.c gs241/sfilter.c *** gs24/sfilter.c Fri Feb 28 12:44:10 1992 --- gs241/sfilter.c Sat Apr 18 18:43:34 1992 *************** *** 222,226 **** } s->record_left = sgetc(strm); ! s->record_left += sgetc(strm) << 8; s->record_left += (ulong)sgetc(strm) << 16; s->record_left += (ulong)sgetc(strm) << 24; --- 222,226 ---- } s->record_left = sgetc(strm); ! s->record_left += (ulong)sgetc(strm) << 8; s->record_left += (ulong)sgetc(strm) << 16; s->record_left += (ulong)sgetc(strm) << 24; diff -rc2N gs24/showpbm gs241/showpbm *** gs24/showpbm --- gs241/showpbm Wed Apr 15 18:13:58 1992 *************** *** 0 **** --- 1 ---- + gs -q -dNODISPLAY -- showpbm.ps $* diff -rc2N gs24/showpbm.bat gs241/showpbm.bat *** gs24/showpbm.bat --- gs241/showpbm.bat Sat Apr 11 04:00:50 1992 *************** *** 0 **** --- 1 ---- + @gs -q -- showpbm.ps %1 %2 %3 %4 %5 %6 %7 %8 %9 >t diff -rc2N gs24/showpbm.ps gs241/showpbm.ps *** gs24/showpbm.ps --- gs241/showpbm.ps Wed Apr 15 18:13:22 1992 *************** *** 0 **** --- 1,78 ---- + % Copyright (C) 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. + + % showpbm.ps + % Display a PBM/PGM/PPM file. Currently only handles "raw" formats (P4-P6). + + /s 100 string def + /readmaxv + { f s readline pop cvx exec /maxv exch def + } def + /pdict 6 dict def + pdict begin + /P1 [ { /rsize w 7 add 8 idiv def } + { } + ] def + /P2 [ { readmaxv /rsize w def } + { } + ] def + /P3 [ { readmaxv /rsize w 3 mul def } + { } + ] def + /P4 [ { /rsize w 7 add 8 idiv def } + { true exch { f row readstring pop } imagemask } + ] def + /P5 [ { readmaxv /rsize w def } + { 8 exch { f row readstring pop } image } + ] def + /P6 [ { readmaxv /rsize w 3 mul def } + { 8 exch { f row readstring pop } false 3 colorimage } + ] def + end + /showpbm % filename -> + { (r) file /f exch def + f s readline pop cvn /pn exch def % Pn + f s readline pop % check for comment + (#) anchorsearch + { pop pop f s readline pop } + if + cvx exec /h exch def /w exch def + pdict pn get dup /rprocs exch def + 0 get exec + /row rsize string def + [1 0 0 -1 0 h] setmatrix + erasepage + 0 setgray + w h [1 0 0 -1 0 h] rprocs 1 get exec + showpage + } def + + % If the program was invoked from the command line, run it now. + [ shellarguments + { counttomark 1 eq + { showpbm + } + { cleartomark + (Usage: showpbm filename.p*m\n) print + ( e.g.: showpbm my.ppm\n) print flush + mark + } + ifelse + } + if pop diff -rc2N gs24/stream.c gs241/stream.c *** gs24/stream.c Thu Mar 5 16:21:26 1992 --- gs241/stream.c Sat Apr 18 18:44:08 1992 *************** *** 192,198 **** /* Answer EOFC if we reached end-of-file before filling the string, */ /* 0 if we filled the string first, or ERRC on error. */ ! /* *odd_digit should be -1 initially: */ ! /* if an odd number of hex digits was read, *odd_digit is set to */ ! /* the odd digit value, otherwise *odd_digit is set to -1. */ /* If ignore_garbage is true, characters other than hex digits are ignored; */ /* if ignore_garbage is false, characters other than hex digits or */ --- 192,198 ---- /* Answer EOFC if we reached end-of-file before filling the string, */ /* 0 if we filled the string first, or ERRC on error. */ ! /* s->odd should be -1 initially: */ ! /* if an odd number of hex digits was read, s->odd is set to */ ! /* the odd digit value, otherwise s->odd is set to -1. */ /* If ignore_garbage is true, characters other than hex digits are ignored; */ /* if ignore_garbage is false, characters other than hex digits or */ diff -rc2N gs24/stream.h gs241/stream.h *** gs24/stream.h Thu Mar 5 16:21:06 1992 --- gs241/stream.h Sat Apr 18 18:42:58 1992 *************** *** 22,30 **** /* Requires stdio.h */ ! /* Note that the stream package works with bytes, not chars. */ ! /* This is to ensure unsigned representation on all systems. */ ! /* A stream can only be read or written, not both. */ ! /* Note also that the read procedure returns an int, */ ! /* not a char or a byte, so we can use negative values for EOFC and ERRC. */ typedef struct stream_s stream; typedef struct { --- 22,35 ---- /* Requires stdio.h */ ! /* ! * Note that the stream package works with bytes, not chars. ! * This is to ensure unsigned representation on all systems. ! * A stream currently can only be read or written, not both. ! * Note also that the read procedure returns an int, ! * not a char or a byte, so we can use negative values for EOFC and ERRC. ! * We distinguish "data" from "signal" results (EOFC, ERRC) with a macro: ! */ ! #define char_is_data(c) ((c) >= 0) ! #define char_is_signal(c) ((c) < 0) typedef struct stream_s stream; typedef struct { *************** *** 169,173 **** /* We cast EOFC and ERRC to int explicitly, because some compilers */ /* don't do this if the other arm of a conditional is a byte. */ ! /* Clients know that return values <0 are exceptional. */ #define EOFC ((int)(-1)) #define ERRC ((int)(-2)) --- 174,179 ---- /* We cast EOFC and ERRC to int explicitly, because some compilers */ /* don't do this if the other arm of a conditional is a byte. */ ! /* Clients should use char_is_data and char_is_signal (see above) */ ! /* to test for exceptional results. */ #define EOFC ((int)(-1)) #define ERRC ((int)(-2)) diff -rc2N gs24/tbcplus.mak gs241/tbcplus.mak *** gs24/tbcplus.mak Wed Mar 25 14:13:24 1992 --- gs241/tbcplus.mak Mon Apr 20 03:18:08 1992 *************** *** 183,194 **** # Choose the language feature(s) to include. See gs.mak for details. ! # Since code overlays are available, we include all the supported ! # optional features. ! FEATURE_DEVS=filter.dev dps.dev level2.dev # Choose the device(s) to include. See devs.mak for details. ! DEVICE_DEVS=vga.dev ega.dev vesa.dev epson.dev bj10e.dev deskjet.dev laserjet.dev paintjet.dev !include "gs.mak" !include "devs.mak" --- 183,196 ---- # Choose the language feature(s) to include. See gs.mak for details. ! # Even though code overlays are available, we don't include any of the ! # optional features, because they cost a significant amount of non-code space. ! FEATURE_DEVS= # Choose the device(s) to include. See devs.mak for details. ! DEVICE_DEVS=vga.dev ega.dev epson.dev bj10e.dev ! DEVICE_DEVS2=deskjet.dev djet500.dev laserjet.dev ljetplus.dev ljet2p.dev ljet3.dev ! DEVICE_DEVS3=gifmono.dev gif8.dev !include "gs.mak" !include "devs.mak" *************** *** 235,244 **** echo $(LIBOVL) $(LIBDIR)\$(FPLIB) $(LIBDIR)\math$(MM) $(LIBDIR)\c$(MM) >$(LIBCTR) - # Tracing package - - # trace.c must be compiled without the -a switch! - trace.obj: trace.c - $(CC) $(CCFLAGS) $(CYO) -a- -O -c trace.c - LIBDOS=$(LIB) obj.tr --- 237,240 ---- *************** *** 245,249 **** # Interpreter main program ! GS_ALL=gs.$(OBJ) $(INT) $(INTASM) gsmain.$(OBJ) trace.$(OBJ)\ $(LIBDOS) $(LIBCTR) obj.tr lib.tr --- 241,245 ---- # Interpreter main program ! GS_ALL=gs.$(OBJ) $(INT) $(INTASM) gsmain.$(OBJ)\ $(LIBDOS) $(LIBCTR) obj.tr lib.tr diff -rc2N gs24/tiger.ps gs241/tiger.ps *** gs24/tiger.ps --- gs241/tiger.ps Sun Mar 29 11:17:48 1992 *************** *** 0 **** --- 1,2733 ---- + %!PS-Adobe-2.0 EPSF-1.2 + %%Creator: Adobe Illustrator(TM) 1.2d4 + %%For: OpenWindows Version 2 + %%Title: tiger.eps + %%CreationDate: 4/12/90 3:20 AM + %%DocumentProcSets: Adobe_Illustrator_1.2d1 0 0 + %%DocumentSuppliedProcSets: Adobe_Illustrator_1.2d1 0 0 + %%BoundingBox: 22 171 567 738 + %%EndComments + + %%BeginProcSet:Adobe_Illustrator_1.2d1 0 0 + + /Adobe_Illustrator_1.2d1 dup 100 dict def load begin + % definition operators + /bdef {bind def} bind def + /ldef {load def} bdef + /xdef {exch def} bdef + % graphic state operators + /_K { 3 index add neg dup 0 lt {pop 0} if 3 1 roll } bdef + /_k /setcmybcolor where { + /setcmybcolor get + } { + { 1 sub 4 1 roll _K _K _K setrgbcolor pop } bind + } ifelse def + /g {/_b xdef /p {_b setgray} def} bdef + /G {/_B xdef /P {_B setgray} def} bdef + /k {/_b xdef /_y xdef /_m xdef /_c xdef /p {_c _m _y _b _k} def} bdef + /K {/_B xdef /_Y xdef /_M xdef /_C xdef /P {_C _M _Y _B _k} def} bdef + /d /setdash ldef + /_i currentflat def + /i {dup 0 eq {pop _i} if setflat} bdef + /j /setlinejoin ldef + /J /setlinecap ldef + /M /setmiterlimit ldef + /w /setlinewidth ldef + % path construction operators + /_R {.25 sub round .25 add} bdef + /_r {transform _R exch _R exch itransform} bdef + /c {_r curveto} bdef + /C /c ldef + /v {currentpoint 6 2 roll _r curveto} bdef + /V /v ldef + /y {_r 2 copy curveto} bdef + /Y /y ldef + /l {_r lineto} bdef + /L /l ldef + /m {_r moveto} bdef + % path painting operators + /n /newpath ldef + /N /n ldef + /F {p fill} bdef + /f {closepath F} bdef + /S {P stroke} bdef + /s {closepath S} bdef + /B {gsave F grestore S} bdef + /b {closepath B} bdef + end + %%EndProcSet + %%EndProlog + + %%Page: 1 1 + + Adobe_Illustrator_1.2d1 begin + + .8 setgray + clippath fill + -110 -300 translate + 1.1 dup scale + + 0 g + 0 G + 0 i + 0 J + 0 j + 0.172 w + 10 M + []0 d + 0 0 0 0 k + + 177.696 715.715 m + 177.797 713.821 176.973 713.84 v + 176.149 713.859 159.695 761.934 139.167 759.691 C + 156.95 767.044 177.696 715.715 V + b + 181.226 718.738 m + 180.677 716.922 179.908 717.221 v + 179.14 717.519 180.023 768.325 159.957 773.199 C + 179.18 774.063 181.226 718.738 V + b + 208.716 676.41 m + 210.352 675.45 209.882 674.773 v + 209.411 674.096 160.237 686.898 150.782 668.541 C + 154.461 687.428 208.716 676.41 V + b + 205.907 666.199 m + 207.763 665.803 207.529 665.012 v + 207.296 664.221 156.593 660.879 153.403 640.478 C + 150.945 659.563 205.907 666.199 V + b + 201.696 671.724 m + 203.474 671.061 203.128 670.313 v + 202.782 669.565 152.134 673.654 146.002 653.936 C + 146.354 673.175 201.696 671.724 V + b + 190.991 689.928 m + 192.299 688.554 191.66 688.033 v + 191.021 687.512 147.278 713.366 133.131 698.324 C + 141.872 715.467 190.991 689.928 V + b + 183.446 685.737 m + 184.902 684.52 184.326 683.929 v + 183.75 683.339 137.362 704.078 125.008 687.531 C + 131.753 705.553 183.446 685.737 V + b + 180.846 681.665 m + 182.454 680.657 181.964 679.994 v + 181.474 679.331 132.692 693.554 122.709 675.478 C + 126.934 694.251 180.846 681.665 V + b + 191.58 681.051 m + 192.702 679.52 192.001 679.085 v + 191.3 678.65 151.231 709.898 135.273 696.793 C + 146.138 712.674 191.58 681.051 V + b + 171.8 710 m + 172.4 708.2 171.6 708 v + 170.8 707.8 142.2 749.8 122.999 742.2 C + 138.2 754 171.8 710 V + b + 172.495 703.021 m + 173.47 701.392 172.731 701.025 v + 171.993 700.657 135.008 735.501 117.899 723.939 C + 130.196 738.739 172.495 703.021 V + b + 172.38 698.651 m + 173.502 697.12 172.801 696.685 v + 172.1 696.251 132.031 727.498 116.073 714.393 C + 126.938 730.274 172.38 698.651 V + b + 0 J 1 w + 170.17 696.935 m + 170.673 690.887 171.661 684.318 173.4 681.199 C + 169.8 668.799 178.6 655.599 V + 178.2 648.399 179.8 645.199 V + 183.8 636.799 188.6 635.999 v + 192.484 635.352 201.207 632.283 211.068 630.879 c + 228.2 616.799 225 603.999 V + 224.6 587.599 221 585.999 V + 232.6 597.199 223 580.399 V + 218.6 561.599 l + 244.2 583.199 228.6 564.799 V + 218.6 538.799 l + 238.2 557.199 231 548.799 V + 227.8 539.999 l + 271 567.199 240.2 537.599 V + 248.2 541.199 252.6 538.399 V + 259.4 539.599 258.6 537.999 V + 237.8 527.599 234.2 509.199 V + 242.6 519.199 239.4 508.399 V + 239.8 496.799 l + 243.8 518.399 243.4 480.799 V + 262.6 498.799 251 477.999 V + 251 461.199 l + 266.2 477.599 259.8 464.799 V + 269.8 473.599 265.8 458.399 V + 265 447.999 269.4 459.199 V + 285.4 489.799 279.4 463.599 V + 278.6 444.399 283.4 459.199 V + 283.8 448.799 293 441.599 V + 291.8 492.399 304.6 456.399 V + 308.6 439.999 l + 311.4 449.199 311 454.399 V + 325.8 470.799 319 446.399 V + 334.2 469.199 331 455.999 V + 323.4 439.999 325 435.199 V + 341.8 469.999 343 471.599 V + 341 429.198 351.8 465.199 V + 357.4 453.199 354.6 448.799 V + 362.6 456.799 361.8 459.999 V + 366.4 468.199 369.2 454.599 V + 371 445.199 372.6 448.399 V + 376.6 424.398 377.8 447.199 V + 379.4 460.799 372.2 472.399 V + 373 475.599 370.2 479.599 v + 383.8 457.999 376.6 486.799 V + 387.801 478.799 389.001 478.799 V + 375.4 501.999 384.2 497.199 V + 379 507.599 397.001 495.599 V + 381 511.599 398.601 501.999 V + 406.601 495.599 399.001 505.599 V + 384.6 521.599 406.601 503.599 V + 418.201 487.199 419.001 484.399 V + 409.001 513.599 404.601 516.399 V + 413.001 552.799 454.201 537.199 V + 461.001 519.999 465.401 538.399 V + 478.201 544.799 489.401 517.199 V + 493.401 530.799 492.601 533.599 V + 499.401 532.399 498.601 533.599 V + 511.801 529.199 513.001 529.999 V + 519.801 523.199 520.201 526.799 V + 529.401 523.999 527.401 527.599 V + 536.201 511.999 536.601 508.399 V + 539.001 522.399 l + 541.001 519.599 l + 542.601 527.199 541.801 528.399 v + 541.001 529.599 561.801 521.599 566.601 500.799 C + 568.601 492.399 l + 574.601 507.199 573.001 511.199 V + 578.201 510.399 578.601 505.999 V + 582.601 529.199 577.801 535.199 V + 582.201 535.999 583.401 532.399 V + 583.401 539.599 l + 590.601 538.799 590.601 541.199 V + 595.001 545.199 597.001 540.399 V + 584.601 575.599 603.001 556.399 V + 610.201 545.599 606.601 564.399 v + 603.001 583.199 599.001 584.799 603.801 585.199 C + 604.601 588.799 602.601 590.399 v + 600.601 591.999 603.801 590.399 y + 608.601 586.399 603.401 608.399 V + 609.801 606.799 597.801 635.999 V + 600.601 638.399 596.601 646.799 V + 604.601 642.399 607.401 643.999 V + 607.001 645.599 603.801 649.599 V + 582.201 704.4 602.601 682.399 V + 614.451 668.849 608.051 691.649 V + 598.94 715.659 599.717 719.955 V + 170.17 696.935 l + b + 0.2 0.55 0.85 0 k + 599.717 719.755 m + 600.345 719.574 602.551 718.45 603.801 716.8 C + 610.601 706 605.401 724.4 V + 596.201 753.2 605.001 742 V + 611.001 734.8 607.801 748.4 v + 603.936 764.827 601.401 771.2 y + 613.001 766.4 586.201 806 V + 595.001 802.4 l + 575.401 842 553.801 847.2 V + 545.801 853.2 l + 584.201 891.2 571.401 928 V + 564.601 933.2 555.001 924 V + 548.601 919.2 542.601 920.8 V + 511.801 919.6 509.801 919.6 v + 507.801 919.6 473.001 956.8 407.401 939.2 C + 402.201 937.2 397.801 938.4 V + 379.4 954.4 330.6 931.6 v + 320.6 929.6 319 929.6 v + 317.4 929.6 314.6 929.6 306.6 923.2 c + 298.6 916.8 298.2 916 296.2 914.4 C + 279.8 903.2 275 902.4 V + 263.4 896 259 886 V + 255.4 884.8 l + 253.8 877.6 253.4 876.4 V + 248.6 872.8 247.8 867.2 V + 239 861.2 239.4 856.8 V + 237.8 851.6 237 846.8 V + 229.8 842 230.6 839.2 V + 223 825.2 224.2 818.4 V + 217.8 818.8 215 816.4 V + 214.2 811.6 212.6 811.2 V + 209.8 810 212.2 806 V + 210.6 803.2 210.2 801.6 V + 211 798.8 206.6 793.2 V + 200.2 774.4 202.2 769.2 V + 202.6 764.4 199.8 762.8 V + 196.2 763.2 204.6 751.2 V + 205.4 750 202.2 747.6 V + 185 744 182.6 727.6 V + 169 712.8 169 707.6 v + 169 705.295 169.271 702.148 169.97 697.535 C + 169.4 689.199 197 688.399 v + 224.6 687.599 599.717 719.755 Y + b + 184.4 697.4 m + 159.4 736.8 173.8 680.399 Y + 182.6 645.999 312.2 683.599 y + 481.001 714 492.201 718 v + 503.401 722 598.601 715.6 y + 593.001 732.4 L + 528.201 778.8 509.001 755.6 495.401 759.6 c + 481.801 763.6 484.201 754 481.001 753.2 c + 477.801 752.4 438.601 777.2 432.201 776.4 c + 425.801 775.6 400.459 799.351 415.401 767.6 c + 431.401 733.6 357 728.4 340.2 739.6 c + 323.4 750.8 347.4 721.2 Y + 365.8 701.2 331.4 718 y + 297 730.8 273 705.2 269.8 704.4 c + 266.6 703.6 261.8 700.4 261 706.8 c + 260.2 713.2 252.69 729.901 221 703.6 c + 201 686.999 187.2 709 Y + 184.4 697.4 L + f + 0.09 0.5 0.772 0 k + 433.51 774.654 m + 427.11 773.854 401.743 797.593 416.71 765.854 c + 433.31 730.654 358.31 726.654 341.51 737.854 c + 324.709 749.054 348.71 719.454 Y + 367.11 699.454 332.709 716.254 y + 298.309 729.054 274.309 703.454 271.109 702.654 c + 267.909 701.854 263.109 698.654 262.309 705.054 c + 261.509 711.454 254.13 727.988 222.309 701.854 c + 201.073 684.508 187.582 705.963 Y + 184.382 695.854 L + 159.382 735.654 174.454 677.345 Y + 183.255 642.944 313.509 681.854 y + 482.31 712.254 493.51 716.254 v + 504.71 720.254 599.038 713.927 y + 593.51 731.236 L + 528.71 777.636 510.31 753.854 496.71 757.854 c + 483.11 761.854 485.51 752.254 482.31 751.454 c + 479.11 750.654 439.91 775.454 433.51 774.654 c + f + 0.081 0.45 0.695 0 k + 434.819 772.909 m + 428.419 772.109 403.685 796.138 418.019 764.109 c + 434.219 727.908 359.619 724.908 342.819 736.108 c + 326.019 747.308 350.019 717.708 Y + 368.419 697.708 334.019 714.508 y + 299.619 727.308 275.618 701.708 272.418 700.908 c + 269.218 700.108 264.418 696.908 263.618 703.308 c + 262.818 709.708 255.57 726.075 223.618 700.108 c + 201.145 682.017 187.964 702.926 Y + 184.364 694.308 L + 160.564 733.308 175.109 674.29 Y + 183.909 639.89 314.819 680.108 y + 483.619 710.508 494.819 714.508 v + 506.019 718.508 599.474 712.254 y + 594.02 730.072 L + 529.219 776.472 511.619 752.109 498.019 756.109 c + 484.419 760.109 486.819 750.509 483.619 749.708 c + 480.419 748.908 441.219 773.709 434.819 772.909 c + f + 0.072 0.4 0.618 0 k + 436.128 771.163 m + 429.728 770.363 404.999 794.395 419.328 762.363 c + 436.128 724.807 360.394 723.518 344.128 734.363 c + 327.328 745.563 351.328 715.963 Y + 369.728 695.963 335.328 712.763 y + 300.928 725.563 276.928 699.963 273.728 699.163 c + 270.528 698.363 265.728 695.163 264.928 701.563 c + 264.128 707.963 257.011 724.161 224.927 698.363 c + 201.218 679.526 188.345 699.89 Y + 184.345 692.763 L + 162.545 729.563 175.764 671.235 Y + 184.564 636.835 316.128 678.363 y + 484.928 708.763 496.129 712.763 v + 507.329 716.763 599.911 710.581 y + 594.529 728.908 L + 529.729 775.309 512.929 750.363 499.329 754.363 c + 485.728 758.363 488.128 748.763 484.928 747.963 c + 481.728 747.163 442.528 771.963 436.128 771.163 c + f + 0.063 0.35 0.54 0 k + 437.438 769.417 m + 431.037 768.617 406.814 792.871 420.637 760.617 c + 437.438 721.417 362.237 721.417 345.437 732.617 c + 328.637 743.817 352.637 714.217 Y + 371.037 694.217 336.637 711.017 y + 302.237 723.817 278.237 698.217 275.037 697.417 c + 271.837 696.617 267.037 693.417 266.237 699.817 c + 265.437 706.217 258.452 722.248 226.237 696.617 c + 201.291 677.035 188.727 696.854 Y + 184.327 691.217 L + 164.527 726.018 176.418 668.181 Y + 185.218 633.78 317.437 676.617 y + 486.238 707.017 497.438 711.017 v + 508.638 715.017 600.347 708.908 y + 595.038 727.745 L + 530.238 774.145 514.238 748.617 500.638 752.617 c + 487.038 756.617 489.438 747.017 486.238 746.217 c + 483.038 745.417 443.838 770.217 437.438 769.417 c + f + 0.054 0.3 0.463 0 k + 438.747 767.672 m + 432.347 766.872 406.383 790.323 421.947 758.872 c + 441.147 720.072 363.546 719.672 346.746 730.872 c + 329.946 742.072 353.946 712.472 Y + 372.346 692.472 337.946 709.272 y + 303.546 722.072 279.546 696.472 276.346 695.672 c + 273.146 694.872 268.346 691.672 267.546 698.072 c + 266.746 704.472 259.892 720.335 227.546 694.872 c + 201.364 674.544 189.109 693.817 Y + 184.309 689.672 L + 166.309 722.872 177.073 665.126 Y + 185.873 630.726 318.746 674.872 y + 487.547 705.272 498.747 709.272 v + 509.947 713.272 600.783 707.236 y + 595.547 726.581 L + 530.747 772.981 515.547 746.872 501.947 750.872 c + 488.347 754.872 490.747 745.272 487.547 744.472 c + 484.347 743.672 445.147 768.472 438.747 767.672 c + f + 0.045 0.25 0.386 0 k + 440.056 765.927 m + 433.655 765.127 407.313 788.387 423.255 757.127 c + 443.656 717.126 364.855 717.926 348.055 729.126 c + 331.255 740.326 355.255 710.726 Y + 373.655 690.726 339.255 707.526 y + 304.855 720.326 280.855 694.726 277.655 693.926 c + 274.455 693.126 269.655 689.926 268.855 696.326 c + 268.055 702.726 261.332 718.422 228.855 693.126 c + 201.436 672.053 189.491 690.781 Y + 184.291 688.126 L + 168.291 718.326 177.727 662.071 Y + 186.527 627.671 320.055 673.126 y + 488.856 703.526 500.056 707.526 v + 511.256 711.526 601.22 705.563 y + 596.056 725.417 L + 531.256 771.817 516.856 745.126 503.256 749.126 c + 489.656 753.127 492.056 743.526 488.856 742.726 c + 485.656 741.926 446.456 766.727 440.056 765.927 c + f + 0.036 0.2 0.309 0 k + 441.365 764.181 m + 434.965 763.381 407.523 786.056 424.565 755.381 c + 446.565 715.781 366.164 716.181 349.364 727.381 c + 332.564 738.581 356.564 708.981 Y + 374.964 688.981 340.564 705.781 y + 306.164 718.581 282.164 692.981 278.964 692.181 c + 275.764 691.381 270.964 688.181 270.164 694.581 c + 269.364 700.981 262.773 716.508 230.164 691.381 c + 201.509 669.562 189.873 687.744 Y + 184.273 686.581 L + 169.872 714.981 178.382 659.017 Y + 187.182 624.616 321.364 671.381 y + 490.165 701.781 501.365 705.781 v + 512.565 709.781 601.656 703.89 y + 596.565 724.254 L + 531.765 770.654 518.165 743.381 504.565 747.381 c + 490.965 751.381 493.365 741.781 490.165 740.981 c + 486.965 740.181 447.765 764.981 441.365 764.181 c + f + 0.027 0.15 0.231 0 k + 442.674 762.435 m + 436.274 761.635 408.832 784.311 425.874 753.635 c + 447.874 714.035 367.474 714.435 350.674 725.635 c + 333.874 736.835 357.874 707.235 Y + 376.274 687.235 341.874 704.035 y + 307.473 716.835 283.473 691.235 280.273 690.435 c + 277.073 689.635 272.273 686.435 271.473 692.835 c + 270.673 699.235 264.214 714.595 231.473 689.635 c + 201.582 667.071 190.255 684.707 Y + 184.255 685.035 L + 170.654 711.436 179.037 655.962 Y + 187.837 621.562 322.673 669.635 y + 491.474 700.035 502.674 704.035 v + 513.874 708.035 602.093 702.217 y + 597.075 723.09 L + 532.274 769.49 519.474 741.635 505.874 745.635 c + 492.274 749.635 494.674 740.035 491.474 739.235 c + 488.274 738.435 449.074 763.235 442.674 762.435 c + f + 0.018 0.1 0.154 0 k + 443.983 760.69 m + 437.583 759.89 410.529 782.777 427.183 751.89 c + 449.183 711.09 368.783 712.69 351.983 723.89 c + 335.183 735.09 359.183 705.49 Y + 377.583 685.49 343.183 702.29 y + 308.783 715.09 284.783 689.49 281.583 688.69 c + 278.382 687.89 273.582 684.69 272.782 691.09 c + 271.982 697.49 265.654 712.682 232.782 687.89 c + 201.655 664.58 190.637 681.671 Y + 184.236 683.49 L + 171.236 707.49 179.691 652.907 Y + 188.491 618.507 323.983 667.89 y + 492.783 698.29 503.983 702.29 v + 515.183 706.29 602.529 700.544 y + 597.583 721.926 L + 532.783 768.327 520.783 739.89 507.183 743.89 c + 493.583 747.89 495.983 738.29 492.783 737.49 c + 489.583 736.69 450.383 761.49 443.983 760.69 c + f + 0.009 0.05 0.077 0 k + 445.292 758.945 m + 438.892 758.145 412.917 781.589 428.492 750.145 c + 449.692 707.344 370.092 710.944 353.292 722.144 c + 336.492 733.344 360.492 703.744 Y + 378.892 683.744 344.492 700.544 y + 310.092 713.344 286.092 687.744 282.892 686.944 c + 279.692 686.144 274.892 682.944 274.092 689.344 c + 273.292 695.744 267.095 710.768 234.092 686.144 c + 201.727 662.089 191.018 678.635 Y + 184.218 681.944 L + 171.418 705.144 180.346 649.853 Y + 189.146 615.453 325.292 666.144 y + 494.093 696.544 505.293 700.544 v + 516.493 704.544 602.965 698.872 y + 598.093 720.763 L + 533.292 767.163 522.093 738.144 508.493 742.144 c + 494.893 746.145 497.293 736.544 494.093 735.744 c + 490.892 734.944 451.692 759.745 445.292 758.945 c + f + 1 g + 184.2 680.399 m + 171.4 702.4 181 646.799 Y + 189.8 612.399 326.6 664.399 y + 495.401 694.8 506.601 698.8 v + 517.801 702.8 603.401 697.2 y + 598.601 719.6 L + 533.801 766 523.401 736.4 509.801 740.4 c + 496.201 744.4 498.601 734.8 495.401 734 c + 492.201 733.2 453.001 758 446.601 757.2 c + 440.201 756.4 414.981 780.207 429.801 748.4 c + 452.028 700.693 369.041 710.773 354.6 720.4 c + 337.8 731.6 361.8 702 Y + 380.2 681.999 345.8 698.8 y + 311.4 711.6 287.4 685.999 284.2 685.199 c + 281 684.399 276.2 681.199 275.4 687.599 c + 274.6 694 268.535 708.856 235.4 684.399 c + 201.8 659.599 191.4 675.599 Y + 184.2 680.399 L + f + 0 g + 225.8 650.399 m + 218.6 638.799 239.4 625.599 V + 240.8 624.199 222.8 628.399 V + 216.6 630.399 215 640.799 V + 210.2 645.199 205.4 650.799 v + 200.6 656.399 225.8 650.399 y + f + 0.8 g + 365.8 698 m + 383.498 671.179 382.9 666.399 v + 381.6 655.999 381.4 646.399 384.6 642.399 c + 387.801 638.399 396.601 605.199 y + 396.201 603.999 408.601 641.999 V + 420.201 657.999 400.201 676.399 V + 365 705.2 365.8 698 v + f + 0 g + 1 J 0.1 w + 245.8 623.599 m + 257 616.399 242.6 585.199 V + 249 587.599 l + 248.2 576.399 245 573.999 V + 252.2 577.199 l + 257 569.199 253 564.399 V + 269.8 556.399 269 549.999 V + 275.4 557.999 271.4 564.399 v + 267.4 570.799 260.2 566.799 261 585.199 C + 252.2 581.999 l + 257.8 590.799 257.8 597.199 V + 249.8 594.799 l + 265.269 621.377 254.6 622.799 v + 248.6 623.599 245.8 623.599 Y + f + 0.8 g + 278.2 606.799 m + 281 611.199 278.2 610.399 v + 275.4 609.599 244.2 594.799 238.2 585.199 C + 272.6 609.599 278.2 606.799 V + f + 288.6 598.799 m + 291.4 603.199 288.6 602.399 v + 285.8 601.599 254.6 586.799 248.6 577.199 C + 283 601.599 288.6 598.799 V + f + 301.8 613.999 m + 304.6 618.399 301.8 617.599 v + 299 616.799 267.8 601.999 261.8 592.399 C + 296.2 616.799 301.8 613.999 V + f + 278.6 570.399 m + 278.6 576.399 275.8 575.599 v + 273 574.799 237 557.199 231 547.599 C + 273 573.199 278.6 570.399 V + f + 279.8 581.199 m + 281 585.999 278.2 585.199 V + 276.2 585.199 249.8 573.599 243.8 563.999 C + 273.4 585.599 279.8 581.199 V + f + 265.4 533.599 m + 255.4 525.999 l + 265.8 533.599 269.4 532.399 V + 262.6 521.199 261.8 515.999 V + 272.2 528.799 277.8 528.399 V + 285.4 527.999 285.4 517.199 V + 291 527.599 294.2 527.199 V + 295.4 520.799 294.2 513.999 V + 298.2 521.599 302.2 519.999 V + 308.6 521.999 307.8 510.399 V + 307.8 499.999 307 497.199 V + 312.6 523.599 315 523.999 V + 323 525.199 327.8 516.399 V + 323.8 523.999 328.6 521.999 V + 339.4 520.399 342.6 513.599 V + 335.8 525.599 341.4 522.399 V + 348.2 522.399 349.4 515.999 V + 357.8 494.799 359.8 493.199 V + 352.2 514.799 353.8 514.799 V + 351.8 526.799 357 511.999 V + 353.8 525.999 359.4 525.199 v + 365 524.399 369.4 514.399 377.8 516.799 C + 387.401 511.199 389.401 580.399 V + 265.4 533.599 L + f + 0 g + 0 J 1 w + 270.2 626.399 m + 285 632.399 325 626.399 V + 332.2 625.999 339 634.799 v + 345.8 643.599 372.6 650.799 379 648.799 C + 388.601 642.399 l + 389.401 641.199 l + 401.801 630.799 402.201 623.199 v + 402.601 615.599 387.801 567.599 378.2 551.599 c + 368.6 535.599 359 523.199 339.8 525.599 C + 319 529.599 293.4 525.599 v + 264.2 527.199 261.4 535.199 v + 258.6 543.199 272.6 558.399 y + 277 566.799 275.8 581.199 v + 274.6 595.599 275 623.599 270.2 626.399 c + f + 0.1 0.6 0.45 0 k + 292.2 624.399 m + 300.6 605.999 271 540.799 y + 269 539.199 283.66 533.154 293.8 535.599 c + 304.746 538.237 345 533.999 Y + 368.6 549.599 381.4 593.999 y + 391.801 617.999 374.2 621.199 v + 356.6 624.399 292.2 624.399 y + f + 0.1 0.6 0.45 0.2 k + 290.169 593.503 m + 293.495 606.293 295.079 618.094 292.2 624.399 c + 354.6 617.999 365.8 638.799 v + 370.041 646.674 384.801 615.999 384.4 606.399 c + 321.4 591.999 306.6 603.199 V + 290.169 593.503 L + f + 0.1 0.6 0.45 0.25 k + 294.6 577.199 m + 296.6 569.999 294.2 565.999 V + 292.6 565.199 291.4 564.799 V + 292.6 561.199 298.6 559.599 V + 300.6 555.199 303 554.799 v + 305.4 554.399 310.2 548.799 314.2 549.999 c + 318.2 551.199 329.4 555.199 y + 335 558.399 343.8 554.799 V + 346.175 555.601 346.6 559.599 v + 347.1 564.299 350.2 567.999 352.2 569.999 c + 354.2 571.999 363.8 584.799 362.6 585.199 c + 361.4 585.599 294.6 577.199 Y + f + 0 0.55 0.5 0 k + 290.2 625.599 m + 287.4 603.199 290.6 594.799 v + 293.8 586.399 293 584.399 292.2 580.399 c + 291.4 576.399 295.8 566.399 301.4 560.399 C + 313.4 558.799 l + 328.6 562.399 337.8 559.599 V + 346.794 558.256 350.2 573.199 V + 355 579.599 362.2 582.399 v + 369.4 585.199 376.6 626.799 372.6 634.799 c + 368.6 642.799 354.2 647.199 338.2 631.599 c + 322.2 615.999 320.2 632.799 290.2 625.599 C + b + 0 0 0.2 0 k + 0.5 w + 291.8 550.799 m + 291 552.799 286.6 553.199 V + 264.2 556.799 255.8 569.199 V + 249 574.799 253.4 563.199 V + 263.8 542.799 270.6 539.999 V + 287 535.999 291.8 550.799 V + b + 0 0.55 0.5 0.2 k + 1 w + 371.742 614.771 m + 372.401 622.677 374.354 631.291 372.6 634.799 c + 366.154 647.693 349.181 642.305 338.2 631.599 c + 322.2 615.999 320.2 632.799 290.2 625.599 C + 288.455 611.636 289.295 601.624 v + 326.6 613.199 327.4 607.599 V + 329 610.799 338.2 610.799 v + 347.4 610.799 370.142 611.971 371.742 614.771 C + f + 0 g + 0 0.55 0.5 0.35 K + 2 w + 328.6 624.799 m + 333.4 619.999 329.8 610.399 V + 315.4 594.399 317.4 580.399 v + S + 0 0 0.2 0 k + 0 G + 0.5 w + 280.6 539.999 m + 276.2 552.799 285 545.999 V + 289.8 543.999 288.6 542.399 v + 287.4 540.799 281.8 536.799 280.6 539.999 C + b + 285.64 538.799 m + 282.12 549.039 289.16 543.599 V + 293.581 541.151 292.04 540.719 v + 287.48 539.439 292.04 536.879 285.64 538.799 C + b + 290.44 538.799 m + 286.92 549.039 293.96 543.599 V + 298.335 541.289 296.84 540.719 v + 293.48 539.439 296.84 536.879 290.44 538.799 C + b + 297.04 538.599 m + 293.52 548.839 300.56 543.399 V + 304.943 541.067 303.441 540.519 v + 300.48 539.439 303.441 536.679 297.04 538.599 C + b + 303.52 538.679 m + 300 548.919 307.041 543.479 V + 310.881 541.879 309.921 540.599 v + 308.961 539.319 309.921 536.759 303.52 538.679 C + b + 310.2 537.999 m + 305.4 550.399 314.6 543.999 V + 319.4 541.999 318.2 540.399 v + 317 538.799 318.2 535.599 310.2 537.999 C + b + 0 g + 0.1 0.6 0.45 0.25 K + 2 w + 281.8 555.199 m + 295 557.999 301 554.799 V + 307 553.599 308.2 553.999 v + 309.4 554.399 312.6 554.799 y + S + 315.8 546.399 m + 327.8 559.999 339.8 555.599 v + 346.816 553.026 345.8 556.399 346.6 559.199 c + 347.4 561.999 347.6 566.199 352.6 569.199 c + S + 0 0 0.2 0 k + 0 G + 0.5 w + 333 562.399 m + 329 573.199 326.2 560.399 v + 323.4 547.599 320.2 543.999 318.6 541.199 C + 318.6 535.999 327 536.399 V + 337.8 536.799 338.2 539.599 v + 338.6 542.399 337 553.999 333 562.399 C + b + 0 g + 0.1 0.6 0.45 0.25 K + 2 w + 347 555.199 m + 350.6 557.599 353 556.399 v + S + 353.5 571.599 m + 356.4 576.499 361.2 577.299 v + S + 0.7 g + 0 G + 1 w + 274.2 534.799 m + 292.2 531.599 296.6 533.199 V + 305.4 533.199 297 531.199 V + 284.2 531.199 276.2 532.399 V + 264.6 537.999 274.2 534.799 V + f + 0 0 0.2 0 k + 0.5 w + 288.2 627.999 m + 305.8 627.999 307.8 627.199 V + 315 596.399 311.4 588.799 V + 310.2 585.999 307.4 591.599 V + 289 624.399 285.8 626.399 v + 282.6 628.399 287 627.999 288.2 627.999 C + b + 211.1 630.699 m + 220 628.999 232.6 626.399 V + 237.4 603.999 240.6 599.199 v + 243.8 594.399 240.2 594.399 236.6 597.199 c + 233 599.999 218.2 613.999 216.2 618.399 c + 214.2 622.799 211.1 630.699 y + b + 232.961 626.182 m + 238.761 624.634 239.77 622.419 v + 240.778 620.205 238.568 616.908 y + 237.568 613.603 236.366 615.765 v + 235.164 617.928 232.292 625.588 232.961 626.182 c + b + 0 g + 233 626.399 m + 236.6 621.199 240.2 621.199 v + 243.8 621.199 244.182 621.612 247 620.999 c + 251.6 619.999 251.2 621.999 257.8 620.799 c + 260.44 620.319 263 621.199 265.8 619.999 c + 268.6 618.799 271.8 619.599 273 621.599 c + 274.2 623.599 279 627.799 Y + 266.2 625.999 263.4 625.199 V + 241 623.999 233 626.399 V + f + 0 0 0.2 0 k + 277.6 626.199 m + 271.15 622.699 270.75 620.299 v + 270.35 617.899 276 614.199 y + 278.75 609.599 279.35 611.999 v + 279.95 614.399 278.4 625.799 277.6 626.199 c + b + 240.115 620.735 m + 247.122 609.547 247.339 620.758 V + 247.896 622.016 246.136 622.038 v + 240.061 622.114 241.582 626.216 240.115 620.735 C + b + 247.293 620.486 m + 255.214 609.299 254.578 620.579 V + 254.585 620.911 252.832 621.064 v + 248.085 621.478 248.43 625.996 247.293 620.486 C + b + 254.506 620.478 m + 262.466 609.85 261.797 619.516 V + 261.916 620.749 260.262 621.05 v + 256.37 621.756 256.159 625.005 254.506 620.478 C + b + 261.382 620.398 m + 269.282 608.837 269.63 618.618 V + 271.274 619.996 269.528 620.218 v + 263.71 620.958 264.508 625.412 261.382 620.398 C + b + 0 0 0.2 0.1 k + 225.208 616.868 m + 217.55 618.399 l + 214.95 623.399 212.85 629.549 y + 219.2 628.549 231.7 625.749 V + 232.576 622.431 234.048 616.636 v + 225.208 616.868 l + f + 290.276 621.53 m + 288.61 624.036 287.293 625.794 286.643 626.2 c + 283.63 628.083 287.773 627.706 288.902 627.706 C + 305.473 627.706 307.356 626.953 V + 307.88 624.711 308.564 621.32 V + 298.476 623.33 290.276 621.53 V + f + 0.2 0.55 0.85 0 k + 1 w + 343.88 759.679 m + 371.601 755.719 397.121 791.359 398.881 801.04 c + 400.641 810.72 390.521 822.6 Y + 391.841 825.68 387.001 839.76 381.721 849 c + 376.441 858.24 360.54 857.266 343 858.24 c + 327.16 859.12 308.68 835.8 307.36 834.04 c + 306.04 832.28 312.2 793.999 313.52 788.279 c + 314.84 782.559 312.2 756.159 y + 346.44 765.259 316.16 763.639 343.88 759.679 c + f + 0.08 0.44 0.68 0 k + 308.088 833.392 m + 306.792 831.664 312.84 794.079 314.136 788.463 c + 315.432 782.847 312.84 756.927 y + 345.512 765.807 316.728 764.271 343.944 760.383 c + 371.161 756.495 396.217 791.487 397.945 800.992 c + 399.673 810.496 389.737 822.16 Y + 391.033 825.184 386.281 839.008 381.097 848.08 c + 375.913 857.152 360.302 856.195 343.08 857.152 c + 327.528 858.016 309.384 835.12 308.088 833.392 c + f + 0.06 0.33 0.51 0 k + 308.816 832.744 m + 307.544 831.048 313.48 794.159 314.752 788.647 c + 316.024 783.135 313.48 757.695 y + 344.884 766.855 317.296 764.903 344.008 761.087 c + 370.721 757.271 395.313 791.615 397.009 800.944 c + 398.705 810.272 388.953 821.72 Y + 390.225 824.688 385.561 838.256 380.473 847.16 c + 375.385 856.064 360.063 855.125 343.16 856.064 c + 327.896 856.912 310.088 834.44 308.816 832.744 c + f + 0.04 0.22 0.34 0 k + 309.544 832.096 m + 308.296 830.432 314.12 794.239 315.368 788.831 c + 316.616 783.423 314.12 758.463 y + 343.556 767.503 317.864 765.535 344.072 761.791 c + 370.281 758.047 394.409 791.743 396.073 800.895 c + 397.737 810.048 388.169 821.28 Y + 389.417 824.192 384.841 837.504 379.849 846.24 c + 374.857 854.976 359.824 854.055 343.24 854.976 c + 328.264 855.808 310.792 833.76 309.544 832.096 c + f + 0.02 0.11 0.17 0 k + 310.272 831.448 m + 309.048 829.816 314.76 794.319 315.984 789.015 c + 317.208 783.711 314.76 759.231 y + 342.628 768.151 318.432 766.167 344.136 762.495 c + 369.841 758.823 393.505 791.871 395.137 800.848 c + 396.769 809.824 387.385 820.84 Y + 388.609 823.696 384.121 836.752 379.225 845.32 c + 374.329 853.888 359.585 852.985 343.32 853.888 c + 328.632 854.704 311.496 833.08 310.272 831.448 c + f + 1 g + 344.2 763.2 m + 369.4 759.6 392.601 792 394.201 800.8 c + 395.801 809.6 386.601 820.4 Y + 387.801 823.2 383.4 836 378.6 844.4 c + 373.8 852.8 359.346 851.914 343.4 852.8 c + 329 853.6 312.2 832.4 311 830.8 c + 309.8 829.2 315.4 794.4 316.6 789.2 c + 317.8 784 315.4 760 y + 340.9 768.6 319 766.8 344.2 763.2 c + f + 0.8 g + 390.601 797.2 m + 362.8 789.6 351.2 791.2 V + 335.4 797.8 326.6 776 V + 323 768.8 321 766.8 v + 319 764.8 390.601 797.2 Y + f + 0 g + 394.401 799.4 m + 365.4 787.2 355.4 787.6 v + 339 792.2 330.6 777.6 V + 322.2 768.4 319 766.8 V + 318.6 765.2 325 769.2 V + 335.4 764 l + 350.2 754.4 359.8 770.4 V + 363.8 781.6 363.8 783.6 v + 363.8 785.6 385 791.2 386.601 791.6 c + 388.201 792 394.801 796.2 394.401 799.4 C + f + 0.4 0.2 0.8 0 k + 347 763.486 m + 340.128 763.486 331.755 767.351 331.755 773.6 c + 331.755 779.848 340.128 786.113 347 786.113 c + 353.874 786.113 359.446 781.048 359.446 774.8 c + 359.446 768.551 353.874 763.486 347 763.486 c + f + 0.4 0.2 0.8 0.2 k + 343.377 780.17 m + 338.531 779.448 333.442 777.945 333.514 778.161 c + 335.054 782.78 341.415 786.113 347 786.113 c + 351.296 786.113 355.084 784.135 357.32 781.125 c + 352.004 781.455 343.377 780.17 v + f + 1 g + 355.4 780.4 m + 351 783.6 351 781.4 V + 354.6 777 355.4 780.4 V + f + 0 g + 345.4 772.274 m + 342.901 772.274 340.875 774.3 340.875 776.8 c + 340.875 779.299 342.901 781.325 345.4 781.325 c + 347.9 781.325 349.926 779.299 349.926 776.8 c + 349.926 774.3 347.9 772.274 345.4 772.274 c + f + 0.2 0.55 0.85 0 k + 241.4 785.6 m + 238.2 806.8 240.6 811.2 V + 251.4 821.2 251 824.8 V + 250.6 842.8 249.4 843.6 v + 248.2 844.4 240.6 850.4 234.6 844 C + 224.2 826 225 819.6 V + 225 817.6 l + 217.4 818 215.8 816 V + 214.6 810.8 213.4 810.4 V + 210.6 808 212.6 805.2 V + 210.6 802.8 211 798.8 V + 218.6 794.8 L + 220.6 780.4 231.4 775.2 v + 236.236 772.871 239.4 779.6 241.4 785.6 c + f + 1 g + 240.4 787.44 m + 237.52 806.52 239.68 810.48 V + 249.4 819.48 249.04 822.72 V + 248.68 838.92 247.6 839.64 v + 246.52 840.36 239.68 845.76 234.28 840 C + 224.92 823.8 225.64 818.04 V + 225.64 816.24 l + 218.8 816.6 217.36 814.8 V + 216.28 810.12 215.2 809.76 V + 212.68 807.6 214.48 805.08 V + 212.68 802.92 213.04 799.32 V + 219.88 795.72 L + 221.68 782.76 231.4 778.08 v + 235.752 775.985 238.6 782.04 240.4 787.44 c + f + 0.075 0.412 0.637 0 k + 248.95 842.61 m + 247.86 843.47 240.37 849.24 234.52 843 C + 224.38 825.45 225.16 819.21 V + 225.16 817.26 l + 217.75 817.65 216.19 815.7 V + 215.02 810.63 213.85 810.24 V + 211.12 807.9 213.07 805.17 V + 211.12 802.83 211.51 798.93 V + 218.92 795.03 L + 220.87 780.99 231.4 775.92 v + 236.114 773.65 239.2 780.21 241.15 786.06 c + 238.03 806.73 240.37 811.02 V + 250.9 820.77 250.51 824.28 V + 250.12 841.83 248.95 842.61 V + f + 0.05 0.275 0.425 0 k + 248.5 841.62 m + 247.52 842.54 240.14 848.08 234.44 842 C + 224.56 824.9 225.32 818.82 V + 225.32 816.92 l + 218.1 817.3 216.58 815.4 V + 215.44 810.46 214.3 810.08 V + 211.64 807.8 213.54 805.14 V + 211.64 802.86 212.02 799.06 V + 219.24 795.26 L + 221.14 781.58 231.4 776.64 v + 235.994 774.428 239 780.82 240.9 786.52 c + 237.86 806.66 240.14 810.84 V + 250.4 820.34 250.02 823.76 V + 249.64 840.86 248.5 841.62 V + f + 0.025 0.137 0.212 0 k + 248.05 840.63 m + 247.18 841.61 239.91 846.92 234.36 841 C + 224.74 824.35 225.48 818.43 V + 225.48 816.58 l + 218.45 816.95 216.97 815.1 V + 215.86 810.29 214.75 809.92 V + 212.16 807.7 214.01 805.11 V + 212.16 802.89 212.53 799.19 V + 219.56 795.49 L + 221.41 782.17 231.4 777.36 v + 235.873 775.206 238.8 781.43 240.65 786.98 c + 237.69 806.59 239.91 810.66 V + 249.9 819.91 249.53 823.24 V + 249.16 839.89 248.05 840.63 V + f + 1 g + 240.4 787.54 m + 237.52 806.52 239.68 810.48 V + 249.4 819.48 249.04 822.72 V + 248.68 838.92 247.6 839.64 V + 246.84 840.68 239.68 845.76 234.28 840 C + 224.92 823.8 225.64 818.04 V + 225.64 816.24 l + 218.8 816.6 217.36 814.8 V + 216.28 810.12 215.2 809.76 V + 212.68 807.6 214.48 805.08 V + 212.68 802.92 213.04 799.32 V + 219.88 795.72 L + 221.68 782.76 231.4 778.08 v + 235.752 775.985 238.6 782.14 240.4 787.54 c + f + 0.8 g + 237.3 793.8 m + 215.7 804 214.8 804.8 V + 223.9 796.6 224.7 796.6 v + 225.5 796.6 237.3 793.8 Y + f + 0 g + 220.2 800 m + 238.6 796.4 238.6 792 v + 238.6 789.088 238.357 775.669 233 777.2 c + 224.6 779.6 228.2 794 220.2 800 c + f + 0.4 0.2 0.8 0 k + 228.6 796.2 m + 237.578 794.726 238.6 792 v + 239.2 790.4 239.863 782.092 234.4 781 c + 229.848 780.089 227.618 790.31 228.6 796.2 c + f + 0 g + 314.595 753.651 m + 314.098 755.393 315.409 755.262 317.2 755.8 c + 319.2 756.4 331.4 760.2 332.2 762.8 c + 333 765.4 346.2 761 Y + 348 760.2 352.4 757.6 Y + 357.2 756.4 363.8 756 Y + 366.2 755 369.6 752.2 Y + 384.2 742 396.601 749.2 Y + 416.601 755.8 410.601 773 Y + 407.601 782 410.801 785.4 Y + 411.001 789.2 418.201 782.8 Y + 420.801 778.6 421.601 773.6 Y + 429.601 762.4 426.201 780.2 Y + 426.401 781.2 423.601 784.8 423.601 786 c + 423.601 787.2 421.801 790.6 Y + 418.801 794 421.201 801 Y + 423.001 814.8 420.801 813 Y + 419.601 814.8 410.401 804.8 Y + 408.201 801.4 402.201 799.8 Y + 399.401 798 396.001 799.4 Y + 393.401 799.8 387.801 792.8 Y + 390.601 793 393.001 788.6 395.401 788.4 c + 397.801 788.2 399.601 790.8 401.201 791.4 c + 402.801 792 405.601 786.2 Y + 406.001 783.6 400.401 778.8 Y + 400.001 774.2 398.401 775.8 Y + 395.401 776.4 394.201 772.6 393.201 768 c + 392.201 763.4 388.001 763 y + 386.401 755.6 385.2 758.6 Y + 385 764.2 379 758.4 Y + 377.8 756.4 373.2 758.6 Y + 366.4 760.6 368.8 762.6 Y + 370.6 764.8 381.8 762.6 Y + 384 764.2 376 768.2 Y + 375.4 770 376.4 774.4 Y + 377.6 777.6 384.4 783.2 Y + 393.801 784.4 391.001 786 Y + 384.801 791.2 379 783.6 Y + 376.8 777.4 359.4 762.4 Y + 354.6 759 357.2 765.8 353.2 762.4 c + 349.2 759 328.6 768 y + 317.038 769.193 314.306 753.451 310.777 756.571 c + 316.195 748.051 314.595 753.651 v + f + 509.401 920 m + 483.801 912 481.001 893.2 V + 478.601 870.4 499.001 852.8 V + 499.401 846.4 501.401 843.2 v + 499.801 838.4 518.601 846 V + 545.801 854.4 l + 552.201 856.8 557.401 865.6 v + 562.601 874.4 577.801 893.2 574.201 918.4 C + 575.401 929.6 569.401 930 V + 561.001 931.6 553.801 924 V + 547.001 920.8 544.601 921.2 V + 509.401 920 L + f + 564.022 920.99 m + 566.122 929.92 561.282 925.08 V + 554.242 919.36 546.761 919.36 V + 532.241 917.16 527.841 903.96 V + 523.881 877.12 531.801 871.4 V + 536.641 863.92 543.681 870.52 v + 550.722 877.12 566.222 907.35 564.022 920.99 C + f + 0.2 g + 563.648 920.632 m + 565.738 929.376 560.986 924.624 V + 554.074 919.008 546.729 919.008 V + 532.473 916.848 528.153 903.888 V + 524.265 877.536 532.041 871.92 V + 536.793 864.576 543.705 871.056 v + 550.618 877.536 565.808 907.24 563.648 920.632 C + f + 0.4 g + 563.274 920.274 m + 565.354 928.832 560.69 924.168 V + 553.906 918.656 546.697 918.656 V + 532.705 916.536 528.465 903.816 V + 524.649 877.952 532.281 872.44 V + 536.945 865.232 543.729 871.592 v + 550.514 877.952 565.394 907.13 563.274 920.274 C + f + 0.6 g + 562.9 919.916 m + 564.97 928.288 560.394 923.712 V + 553.738 918.304 546.665 918.304 V + 532.937 916.224 528.777 903.744 V + 525.033 878.368 532.521 872.96 V + 537.097 865.888 543.753 872.128 v + 550.41 878.368 564.98 907.02 562.9 919.916 C + f + 0.8 g + 562.526 919.558 m + 564.586 927.744 560.098 923.256 V + 553.569 917.952 546.633 917.952 V + 533.169 915.912 529.089 903.672 V + 525.417 878.784 532.761 873.48 V + 537.249 866.544 543.777 872.664 v + 550.305 878.784 564.566 906.91 562.526 919.558 C + f + 1 g + 562.151 919.2 m + 564.201 927.2 559.801 922.8 V + 553.401 917.6 546.601 917.6 V + 533.401 915.6 529.401 903.6 V + 525.801 879.2 533.001 874 V + 537.401 867.2 543.801 873.2 v + 550.201 879.2 564.151 906.8 562.151 919.2 C + f + 0.1 0.55 0.85 0.3 k + 350.6 716 m + 330.2 735.2 322.2 736 V + 287.8 740 273 722 V + 290.6 742.4 318.2 736.8 V + 296.6 741.2 284.2 738 V + 267.4 738 257.8 724 V + 255 719.2 l + 259 734 277.4 740 V + 300.2 744.8 311 740 V + 289.4 746.8 279.4 744.8 V + 249 747.2 236.2 720.8 V + 240.2 735.2 255 742.4 V + 268.6 751.2 289 748.4 V + 303.4 745.2 308.6 742.8 v + 313.8 740.4 312.6 743.2 304.2 748 C + 298.6 758 284.6 757.6 V + 241.8 754 231.4 742 V + 245 753.2 255.4 756 V + 277.8 764 286.2 763.2 V + 311 762.2 318.6 766.2 V + 307.4 761.2 310.6 758 v + 313.8 754.8 320.6 747.2 320.6 746 c + 320.6 744.8 344.8 722.7 348.4 718.3 C + 350.6 716 l + f + 0.8 g + 1 J 0.1 w + 489 522 m + 473.5 558.5 461 568 V + 487 552 490.5 534 V + 490.5 524 489 522 V + f + 536 514.5 m + 509.5 569.5 491 593.5 V + 534.5 556 539.5 529.5 V + 540 524 l + 537 526.5 l + 536.5 517.5 536 514.5 V + f + 592.5 563 m + 530 622.5 528.5 625 V + 589 559 592 551.5 V + 590 560.5 592.5 563 V + f + 404 519.5 m + 423.5 571.5 442.5 549 V + 457.5 539 457 536 V + 453 542.5 435 542 V + 416 545 404 519.5 V + f + 594.5 647 m + 549.5 675.5 542 677 v + 530.193 679.361 591.5 648 596.5 637.5 C + 598.5 640 594.5 647 V + f + 0 g + 0 J 1 w + 443.801 540.399 m + 464.201 542.399 471.001 549.199 V + 475.401 545.599 l + 493.001 583.999 l + 496.601 578.799 l + 511.001 593.599 510.201 601.599 v + 509.401 609.599 523.001 595.599 y + 522.201 607.199 529.401 600.399 V + 527.001 615.999 535.401 607.999 V + 524.864 638.156 547.401 612.399 v + 553.001 605.999 548.601 612.799 y + 522.601 660.799 544.201 646.399 v + 546.201 669.199 545.001 673.599 v + 543.801 677.999 541.801 700.4 537.001 705.6 c + 532.201 710.8 537.401 712.4 543.001 707.2 C + 531.801 731.2 545.001 719.2 V + 541.401 734.4 537.001 737.2 V + 531.401 754.4 546.601 743.6 V + 542.201 756 539.001 759.2 V + 527.401 786.8 534.601 782 V + 539.001 778.4 l + 532.201 792.4 538.601 788 v + 545.001 783.6 545.001 784 y + 523.801 817.2 544.201 799.6 V + 536.042 813.518 532.601 820.4 V + 513.801 840.8 528.201 834.4 V + 533.001 832.8 l + 524.201 842.8 516.201 844.4 v + 508.201 846 518.601 852.4 525.001 850.4 c + 531.401 848.4 547.001 840.8 y + 559.801 822 563.801 821.6 V + 543.801 829.2 549.801 821.2 V + 564.201 807.2 557.001 807.6 V + 551.001 800.4 555.801 791.6 V + 537.342 809.991 552.201 784.4 v + 559.001 768 l + 534.601 792.8 545.801 770.8 V + 563.001 747.2 565.001 746.8 v + 567.001 746.4 571.401 737.6 y + 567.001 739.6 l + 572.201 730.8 l + 561.001 742.8 567.001 729.6 V + 572.601 715.2 l + 552.201 737.2 565.801 707.6 V + 549.401 712.8 558.201 695.6 V + 556.601 679.599 557.001 674.399 v + 557.401 669.199 558.601 640.799 554.201 632.799 c + 549.801 624.799 560.201 605.599 562.201 601.599 c + 564.201 597.599 567.801 586.799 559.001 595.999 c + 550.201 605.199 554.601 599.599 556.601 590.799 c + 558.601 581.999 564.601 566.399 563.801 560.799 C + 562.601 559.599 559.401 563.199 V + 544.601 585.999 546.201 571.599 V + 545.001 563.599 541.801 554.799 V + 538.601 543.999 538.601 552.799 V + 535.401 569.599 532.601 561.999 v + 529.801 554.399 526.201 548.399 523.401 545.999 c + 520.601 543.599 515.401 566.399 514.201 555.999 C + 502.201 568.399 497.401 551.999 V + 485.801 535.599 l + 485.401 547.999 484.201 541.999 V + 454.201 535.999 443.801 540.399 V + f + 409.401 897.2 m + 397.801 905.2 393.801 904.8 v + 389.801 904.4 421.401 913.6 462.601 886 C + 467.401 883.2 471.001 883.6 V + 474.201 881.2 471.401 877.6 V + 462.601 868 473.801 856.8 V + 492.201 850 486.601 858.8 V + 497.401 854.8 499.801 850.8 v + 502.201 846.8 501.001 850.8 y + 494.601 858 488.601 863.2 V + 483.401 865.2 480.601 873.6 v + 477.801 882 475.401 892 479.801 895.2 C + 475.801 890.8 476.601 894.8 v + 477.401 898.8 481.001 902.4 482.601 902.8 c + 484.201 903.2 500.601 919 507.401 919.4 C + 498.201 918 495.201 919 v + 492.201 920 465.601 931.4 459.601 932.6 C + 442.801 939.2 454.801 937.2 V + 490.601 933.4 508.801 920.2 V + 501.601 928.6 483.201 935.6 V + 461.001 948.2 425.801 943.2 V + 408.001 940 400.201 938.2 V + 397.601 938.8 397.001 939.2 v + 396.401 939.6 384.6 948.6 357 941.6 C + 340 937 331.4 932.2 V + 316.2 931 312.6 927.8 V + 294 913.2 292 912.4 v + 290 911.6 278.6 904 277.8 903.6 C + 302.4 910.2 304.8 912.6 v + 307.2 915 324.6 917.6 327 916.2 c + 329.4 914.8 337.8 915.4 328.2 914.8 C + 403.801 900 404.601 898 v + 405.401 896 409.401 897.2 y + f + 0.2 0.55 0.85 0 k + 480.801 906.4 m + 470.601 913.8 468.601 913.8 v + 466.601 913.8 454.201 924 450.001 923.6 c + 445.801 923.2 433.601 933.2 406.201 925 C + 405.601 927 409.201 927.8 V + 415.601 930 416.001 930.6 V + 436.201 934.8 443.401 931.2 V + 452.601 928.6 458.801 922.4 V + 470.001 919.2 473.201 920.2 V + 482.001 918 482.401 916.2 V + 488.201 913.2 486.401 910.6 V + 486.801 909 480.801 906.4 V + f + 468.33 908.509 m + 469.137 907.877 470.156 907.779 470.761 906.97 c + 470.995 906.656 470.706 906.33 470.391 906.233 c + 469.348 905.916 468.292 906.486 467.15 905.898 c + 466.748 905.691 466.106 905.873 465.553 906.022 c + 463.921 906.463 462.092 906.488 460.401 905.8 C + 458.416 906.929 456.056 906.345 453.975 907.346 c + 453.917 907.373 453.695 907.027 453.621 907.054 c + 450.575 908.199 446.832 907.916 444.401 910.2 C + 441.973 910.612 439.616 911.074 437.188 911.754 c + 435.37 912.263 433.961 913.252 432.341 914.084 c + 430.964 914.792 429.507 915.314 427.973 915.686 c + 426.11 916.138 424.279 916.026 422.386 916.546 c + 422.293 916.571 422.101 916.227 422.019 916.254 c + 421.695 916.362 421.405 916.945 421.234 916.892 c + 419.553 916.37 418.065 917.342 416.401 917 C + 415.223 918.224 413.495 917.979 411.949 918.421 c + 408.985 919.269 405.831 917.999 402.801 919 C + 406.914 920.842 411.601 919.61 415.663 921.679 c + 417.991 922.865 420.653 921.763 423.223 922.523 c + 423.71 922.667 424.401 922.869 424.801 922.2 C + 424.935 922.335 425.117 922.574 425.175 922.546 c + 427.625 921.389 429.94 920.115 432.422 919.049 c + 432.763 918.903 433.295 919.135 433.547 918.933 c + 435.067 917.717 437.01 917.82 438.401 916.6 C + 440.099 917.102 441.892 916.722 443.621 917.346 c + 443.698 917.373 443.932 917.032 443.965 917.054 c + 445.095 917.802 446.25 917.531 447.142 917.227 c + 447.48 917.112 448.143 916.865 448.448 916.791 c + 449.574 916.515 450.43 916.035 451.609 915.852 c + 451.723 915.834 451.908 916.174 451.98 916.146 c + 453.103 915.708 454.145 915.764 454.801 914.6 C + 454.936 914.735 455.101 914.973 455.183 914.946 c + 456.21 914.608 456.859 913.853 457.96 913.612 c + 458.445 913.506 459.057 912.88 459.633 912.704 c + 462.025 911.973 463.868 910.444 466.062 909.549 c + 466.821 909.239 467.697 909.005 468.33 908.509 c + f + 391.696 922.739 m + 389.178 924.464 386.81 925.57 384.368 927.356 c + 384.187 927.489 383.827 927.319 383.625 927.441 c + 382.618 928.05 381.73 928.631 380.748 929.327 c + 380.209 929.709 379.388 929.698 378.88 929.956 c + 376.336 931.248 373.707 931.806 371.2 933 C + 371.882 933.638 373.004 933.394 373.6 934.2 C + 373.795 933.92 374.033 933.636 374.386 933.827 c + 376.064 934.731 377.914 934.884 379.59 934.794 c + 381.294 934.702 383.014 934.397 384.789 934.125 c + 385.096 934.078 385.295 933.555 385.618 933.458 c + 387.846 932.795 390.235 933.32 392.354 932.482 c + 393.945 931.853 395.515 931.03 396.754 929.755 c + 397.006 929.495 396.681 929.194 396.401 929 C + 396.789 929.109 397.062 928.903 397.173 928.59 c + 397.257 928.351 397.257 928.049 397.173 927.81 c + 397.061 927.498 396.782 927.397 396.408 927.346 c + 395.001 927.156 396.773 928.536 396.073 928.088 c + 394.8 927.274 395.546 925.868 394.801 924.6 C + 394.521 924.794 394.291 925.012 394.401 925.4 C + 394.635 924.878 394.033 924.588 393.865 924.272 c + 393.48 923.547 392.581 922.132 391.696 922.739 c + f + 359.198 915.391 m + 356.044 916.185 352.994 916.07 349.978 917.346 c + 349.911 917.374 349.688 917.027 349.624 917.054 c + 348.258 917.648 347.34 918.614 346.264 919.66 c + 345.351 920.548 343.693 920.161 342.419 920.648 c + 342.095 920.772 341.892 921.284 341.591 921.323 c + 340.372 921.48 339.445 922.429 338.4 923 C + 340.736 923.795 343.147 923.764 345.609 924.148 c + 345.722 924.166 345.867 923.845 346 923.845 c + 346.136 923.845 346.266 924.066 346.4 924.2 C + 346.595 923.92 346.897 923.594 347.154 923.848 c + 347.702 924.388 348.258 924.198 348.798 924.158 c + 348.942 924.148 349.067 923.845 349.2 923.845 c + 349.336 923.845 349.467 924.156 349.6 924.156 c + 349.736 924.155 349.867 923.845 350 923.845 c + 350.136 923.845 350.266 924.066 350.4 924.2 C + 351.092 923.418 351.977 923.972 352.799 923.793 c + 353.837 923.566 354.104 922.418 355.178 922.12 c + 359.893 920.816 364.03 918.671 368.393 916.584 c + 368.7 916.437 368.91 916.189 368.8 915.8 C + 369.067 915.8 369.38 915.888 369.57 915.756 c + 370.628 915.024 371.669 914.476 372.366 913.378 c + 372.582 913.039 372.253 912.632 372.02 912.684 c + 367.591 913.679 363.585 914.287 359.198 915.391 c + f + 345.338 871.179 m + 343.746 872.398 343.162 874.429 342.034 876.221 c + 341.82 876.561 342.094 876.875 342.411 876.964 c + 342.971 877.123 343.514 876.645 343.923 876.443 c + 345.668 875.581 347.203 874.339 349.2 874.2 C + 351.19 871.966 355.45 871.581 355.457 868.2 c + 355.458 867.341 354.03 868.259 353.6 867.4 C + 351.149 868.403 348.76 868.3 346.38 869.767 c + 345.763 870.148 346.093 870.601 345.338 871.179 c + f + 317.8 923.756 m + 317.935 923.755 324.966 923.522 324.949 923.408 c + 324.904 923.099 317.174 922.05 316.81 922.22 c + 316.646 922.296 309.134 919.866 309 920 C + 309.268 920.135 317.534 923.756 317.8 923.756 c + f + 0 g + 333.2 914 m + 318.4 912.2 314 911 v + 309.6 909.8 291 902.2 288 900.2 C + 274.6 894.8 257.6 874.8 V + 265.2 878.2 267.4 881 V + 281 893.6 280.8 891 V + 293 899.6 292.4 897.4 V + 316.8 908.6 314.8 905.4 V + 336.4 910 335.4 908 V + 354.2 903.6 351.4 903.4 V + 345.6 902.2 352 898.6 V + 348.6 894.2 343.2 898.2 v + 337.8 902.2 340.8 900 335.8 899 C + 333.2 898.2 328.6 902.2 V + 323 906.8 314.2 903.2 V + 283.6 890.6 281.6 890 V + 278 887.2 275.6 883.6 V + 269.8 879.2 266.8 877.8 V + 254 866.2 252.8 864.8 V + 249.4 859.6 248.6 859.2 V + 255 863 257 865 V + 271 875 276.4 875.8 V + 280.8 878.8 281.6 880.2 V + 296 889.4 300.2 889.4 V + 309.4 884.2 311.8 891.2 V + 317.6 893 323.2 891.8 V + 326.4 894.4 325.6 896.6 V + 327.2 898.4 328.2 894.6 V + 331.6 891 336.4 893 V + 340.4 893.2 338.4 890.8 V + 334 887 322.2 886.8 V + 309.8 886.2 293.4 878.6 V + 263.6 868.2 254.4 857.8 V + 248 849 242.6 847.8 V + 236.8 847 230.8 839.6 V + 240.6 845.4 249.6 845.4 V + 253.6 847.8 249.8 844.2 V + 246.2 836.6 247.8 831.2 V + 247.2 826 246.4 824.4 V + 238.6 811.6 238.6 809.2 v + 238.6 806.8 239.8 797 240.2 796.4 c + 240.6 795.8 239.2 798 243 795.6 c + 246.8 793.2 249.6 791.6 250.4 788.8 c + 251.2 786 248.4 794.2 248.2 796 c + 248 797.8 243.8 805 244.6 807.4 C + 245.6 806.4 246.4 805 V + 245.8 805.6 246.4 809.2 V + 247.2 814.4 248.6 817.6 v + 250 820.8 252 824.6 252.4 825.4 c + 252.8 826.2 252.8 832 254.2 829.4 C + 257.6 826.8 l + 254.8 829.4 257 831.6 V + 256 837.2 257.8 839.8 V + 264.8 848.2 266.4 849.2 v + 268 850.2 266.6 849.8 y + 272.6 854 266.8 852.4 V + 262.8 850.8 259.8 850.8 V + 252.2 848.8 256.2 853 v + 260.2 857.2 270.2 862.6 274 862.4 C + 274.8 860.8 l + 286 863.2 l + 284.8 862.4 l + 284.6 862.6 288.8 863 v + 293 863.4 298.8 862 300.2 863.8 c + 301.6 865.6 305 866.6 304.6 865.2 c + 304.2 863.8 304 861.8 y + 309 867.6 308.4 865.4 v + 307.8 863.2 299.6 858 298.2 851.8 C + 308.6 860 l + 312.2 863 l + 315.8 860.8 316 862.4 v + 316.2 864 320.8 869.8 322 869.6 c + 323.2 869.4 325.2 872.2 325 869.6 c + 324.8 867 332.4 861.6 y + 335.6 863.4 337 862 v + 338.4 860.6 342.6 881.8 y + 367.6 892.4 l + 411.201 895.8 l + 394.201 902.6 l + 333.2 914 l + f + 0.2 0.55 0.85 0.5 K + 1 J 2 w + 351.4 715 m + 336.4 731.8 328 734.4 V + 314.6 741.2 290 733.4 v + S + 324.8 735.8 m + 299.6 743.8 284.2 739.6 V + 265.8 737.6 257.4 723.8 v + S + 321.2 737 m + 304.2 744.2 289.4 746.4 V + 272.8 749 256.2 741.8 V + 244 735.8 238.6 725.6 v + S + 322.2 736.6 m + 306.8 747.6 305.8 749 V + 298.8 760 285.8 760.4 V + 264.4 759.6 247.2 751.6 v + S + 0 G + 0 J 1 w + 320.895 745.593 m + 322.437 744.13 349.4 715.2 Y + 384.6 678.599 356.6 712.8 Y + 349 717.6 339.8 736.4 Y + 338.6 739.2 353.8 729.2 Y + 357.8 728.4 371.4 709.2 Y + 364.6 711.6 369.4 704.4 Y + 372.2 702.4 392.601 686.799 Y + 396.201 682.799 400.201 681.199 Y + 414.201 686.399 407.801 673.199 Y + 410.201 666.399 415.801 677.999 Y + 427.001 694.8 410.601 692.399 Y + 380.6 689.599 373.8 705.6 Y + 371.4 708 380.2 705.6 Y + 388.601 703.6 373 718 Y + 375.4 718 384.6 711.2 Y + 395.001 702 397.001 704 Y + 415.001 712.8 425.401 705.2 Y + 427.401 703.6 421.801 696.8 423.401 691.599 c + 425.001 686.399 429.801 673.999 Y + 427.401 672.399 427.801 661.599 Y + 444.601 638.399 435.001 640.399 Y + 419.401 640.799 434.201 633.199 Y + 437.401 631.199 446.201 623.999 Y + 443.401 625.199 441.801 619.999 Y + 446.601 615.999 443.801 611.199 Y + 437.801 609.999 436.601 605.999 Y + 443.401 597.999 433.401 597.599 Y + 437.001 593.199 432.201 581.199 Y + 427.401 581.199 421.001 575.599 Y + 423.401 570.799 413.001 565.199 Y + 404.601 563.599 407.401 556.799 Y + 399.401 550.799 397.001 534.799 Y + 396.201 524.399 393.801 521.199 399.001 523.199 c + 404.201 525.199 403.401 537.599 Y + 398.601 553.199 441.401 569.199 Y + 445.401 570.799 446.201 575.999 Y + 448.201 575.599 457.001 567.999 Y + 464.601 556.799 465.001 565.999 Y + 466.201 569.599 464.601 575.599 Y + 470.601 597.199 456.601 603.599 Y + 446.601 637.199 460.601 628.799 Y + 463.401 623.199 474.201 617.999 y + 477.801 620.399 L + 476.201 625.199 484.601 631.199 Y + 487.401 624.799 493.401 632.799 Y + 497.001 657.199 509.401 642.799 Y + 513.401 641.599 514.601 648.399 Y + 518.201 658.799 514.601 672.399 Y + 518.201 672.799 527.801 666.799 Y + 530.601 670.399 521.401 687.199 525.401 684.799 c + 529.401 682.399 533.801 680.799 Y + 534.601 682.799 524.601 695.199 Y + 520.201 698 515.001 718.4 Y + 522.201 714.8 512.201 730 Y + 512.201 733.2 518.201 744.4 Y + 517.401 751.2 518.201 750.8 Y + 521.001 749.6 529.001 748 522.201 754.4 c + 515.401 760.8 523.001 765.6 Y + 527.401 768.4 513.801 768 Y + 508.601 772.4 509.001 776.4 Y + 517.001 774.4 502.601 788.8 500.201 792.4 c + 497.801 796 507.401 801.2 Y + 520.601 804.8 509.001 808 Y + 489.401 807.6 500.201 818.4 Y + 506.201 818 504.601 820.4 Y + 499.401 821.6 489.801 828 Y + 485.801 831.6 489.401 830.8 Y + 506.201 829.6 477.401 840.8 Y + 485.401 840.8 467.401 851.2 Y + 465.401 852.8 462.201 860.4 Y + 456.201 865.6 451.401 872.4 Y + 451.001 876.8 446.201 881.6 Y + 434.601 895.2 429.001 894.8 Y + 414.201 898.4 409.001 897.6 Y + 356.2 893.2 l + 329.8 880.4 337.6 859.4 Y + 344 851 353.2 854.8 Y + 357.8 861 369.4 858.8 Y + 389.801 855.6 387.201 859.2 Y + 384.801 863.8 368.6 870 368.4 870.6 c + 368.2 871.2 359.4 874.6 Y + 356.4 875.8 352 885 Y + 348.8 888.4 364.6 882.6 Y + 363.4 881.6 370.8 877.6 Y + 388.201 878.6 398.801 867.8 Y + 409.601 851.2 409.801 859.4 Y + 412.601 868.8 400.801 890 Y + 401.201 892 409.401 885.4 Y + 410.801 887.4 411.601 881.6 Y + 411.801 879.2 415.601 871.2 Y + 418.401 858.2 422.001 865.6 Y + 426.601 856.2 L + 428.001 853.6 422.001 846 Y + 421.801 843.2 422.601 843.4 417.001 835.8 c + 411.401 828.2 414.801 823.8 Y + 413.401 817.2 422.201 817.6 Y + 424.801 815.4 428.201 815.4 Y + 430.001 813.4 432.401 814 Y + 434.001 817.8 440.201 815.8 Y + 441.601 818.2 449.801 818.6 Y + 450.801 821.2 451.201 822.8 454.601 823.4 c + 458.001 824 433.401 867 Y + 439.801 867.8 431.601 880.2 Y + 429.401 886.8 440.801 872.2 443.001 870.8 c + 445.201 869.4 446.201 867.2 444.601 867.4 c + 443.001 867.6 441.201 865.4 442.601 865.2 c + 444.001 865 457.001 850 460.401 839.8 c + 463.801 829.6 469.801 825.6 476.001 819.6 c + 482.201 813.6 481.401 789.4 Y + 481.001 780.6 487.001 770 Y + 489.001 766.2 484.801 748 Y + 482.801 745.8 484.201 745 Y + 485.201 743.8 492.001 730.6 Y + 490.201 730.8 493.801 727.2 Y + 499.001 721.2 492.601 724.2 Y + 486.601 725.8 493.601 716 Y + 494.801 714.2 485.801 718.8 Y + 476.601 719.4 488.201 712.2 Y + 496.801 705 485.401 709.4 Y + 480.801 711.2 484.001 704.4 Y + 487.201 702.8 504.401 695.8 Y + 504.801 691.999 501.801 686.999 Y + 502.201 682.999 500.001 679.599 Y + 498.801 671.399 498.201 670.599 Y + 494.001 670.399 486.601 656.599 Y + 484.801 653.999 474.601 641.999 Y + 472.601 634.999 454.601 642.199 Y + 448.001 638.799 450.001 642.199 Y + 449.601 644.399 454.401 650.399 Y + 461.401 652.999 458.801 663.799 Y + 462.801 665.199 451.601 667.999 451.801 669.199 c + 452.001 670.399 457.801 671.799 Y + 465.801 673.799 461.401 676.199 Y + 460.801 680.199 463.801 685.799 Y + 475.401 686.599 463.801 702.8 Y + 453.001 710.4 452.001 716.2 Y + 464.601 724.4 456.401 736.8 456.601 740.4 c + 456.801 744 458.001 765.6 Y + 456.001 771.8 453.001 785.4 Y + 455.201 790.6 462.601 803.2 Y + 465.401 807.4 474.201 812.2 472.001 815.2 c + 469.801 818.2 462.001 816.4 Y + 454.201 817.8 454.801 812.6 Y + 453.201 811.6 452.401 806.6 Y + 451.68 798.667 442.801 792.4 Y + 431.601 786.2 440.801 782.2 Y + 446.801 775.6 437.001 775.4 Y + 426.001 777.2 434.201 767 Y + 445.001 754.2 442.001 751.4 Y + 431.801 750.4 444.401 741.2 y + 443.601 743.2 443.801 741.4 v + 444.001 739.6 447.001 735.4 447.801 733.4 c + 448.601 731.4 444.601 731.2 Y + 445.201 721.6 429.801 725.8 y + 429.801 725.8 428.201 725.6 v + 426.601 725.4 415.401 726.2 409.601 728.4 c + 403.801 730.6 397.001 730.6 y + 393.001 728.8 385.4 729 v + 377.8 729.2 369.8 726.4 Y + 365.4 726.8 374 731.2 374.2 731 c + 374.4 730.8 380 736.4 372 735.8 c + 350.203 734.165 339.4 744.4 Y + 337.4 745.8 334.8 748.6 Y + 324.8 750.6 336.2 736.2 Y + 337.4 734.8 336 733.8 Y + 335.2 735.4 327.4 740.8 Y + 324.589 741.773 323.226 743.107 320.895 745.593 C + f + 0.2 0.55 0.85 0.5 k + 1 J 2 w + 297 757.2 m + 308.6 751.6 311.2 748.8 v + 313.8 746 327.8 734.6 y + 322.4 736.6 319.8 738.4 v + 317.2 740.2 306.4 748.4 y + 302.6 754.4 297 757.2 v + f + 0.4 0.2 0.8 0 k + 0 J 1 w + 238.991 788.397 m + 239.328 788.545 238.804 791.257 238.6 791.8 c + 237.578 794.526 228.6 796 y + 228.373 794.635 228.318 793.039 228.424 791.401 c + 233.292 785.882 238.991 788.397 v + f + 0.4 0.2 0.8 0.2 k + 238.991 788.597 m + 238.542 788.439 238.976 791.331 238.8 791.8 c + 237.778 794.526 228.6 796.1 y + 228.373 794.735 228.318 793.139 228.424 791.501 c + 232.692 786.382 238.991 788.597 v + f + 0 g + 234.6 788.454 m + 233.975 788.454 233.469 789.594 233.469 791 c + 233.469 792.405 233.975 793.545 234.6 793.545 c + 235.225 793.545 235.732 792.405 235.732 791 c + 235.732 789.594 235.225 788.454 234.6 788.454 c + f + 234.6 791 m + F + 189 690.399 m + 183.4 680.399 208.2 686.399 V + 222.2 687.599 224.6 689.999 V + 225.8 689.199 234.166 686.266 237 685.599 c + 243.8 683.999 252.2 694 y + 256.8 704.5 259.6 704.5 v + 262.4 704.5 259.2 702.9 y + 252.6 692.799 253 691.199 V + 247.8 671.199 231.8 670.399 V + 215.65 669.449 217 663.599 V + 225.8 665.999 228.2 663.599 V + 239 663.999 231 657.599 V + 224.2 645.999 l + 224.34 642.081 214.2 645.599 v + 204.4 648.999 194.1 661.899 y + 178.15 676.449 189 690.399 V + f + 0.1 0.4 0.4 0 k + 187.8 686.399 m + 185.8 676.799 222.6 687.199 V + 227 687.199 229.4 686.399 v + 231.8 685.599 243.8 682.799 245.8 683.999 C + 238.6 670.399 227 671.999 V + 213.8 670.399 214.2 665.599 V + 218.2 658.399 223 655.999 V + 225.8 653.599 225.4 650.399 v + 225 647.199 222.2 645.599 220.2 644.799 c + 218.2 643.999 215 647.199 213.4 647.199 c + 211.8 647.199 203.4 653.599 199 658.399 c + 194.6 663.199 186.2 675.199 186.6 677.999 c + 187 680.799 187.8 686.399 Y + f + 0.1 0.4 0.4 0.2 k + 191 668.949 m + 193.6 664.999 196.8 660.799 199 658.399 c + 203.4 653.599 211.8 647.199 213.4 647.199 c + 215 647.199 218.2 643.999 220.2 644.799 c + 222.2 645.599 225 647.199 225.4 650.399 c + 225.8 653.599 223 655.999 Y + 219.934 657.532 217.194 661.024 215.615 663.347 C + 215.8 660.799 210.6 661.599 v + 205.4 662.399 200.2 665.199 198.6 668.399 c + 197 671.599 194.6 673.999 196.2 670.399 c + 197.8 666.799 200.2 663.199 201.8 662.799 c + 203.4 662.399 203 661.199 200.6 661.599 c + 198.2 661.999 195.4 662.399 191 667.599 c + F + 0.1 0.55 0.85 0.3 k + 188.4 689.999 m + 190.2 703.6 191.4 707.6 V + 190.6 714.4 193 718.6 v + 195.4 722.8 197.4 729 200.4 734.4 c + 203.4 739.8 203.6 743.8 207.6 745.4 c + 211.6 747 217.6 755.6 220.4 756.6 c + 223.2 757.6 223 756.8 y + 229.8 771.6 243.4 767.6 V + 227.2 770.4 243 779.8 V + 238.2 778.7 241.5 785.7 v + 243.701 790.368 243.2 783.6 232.2 771.8 C + 227.2 763.2 222 760.2 v + 216.8 757.2 204.8 750.2 203.6 746.4 c + 202.4 742.6 199.2 736.8 197.2 735.2 c + 195.2 733.6 192.4 729.4 192 726 C + 190.8 722 189.4 720.8 v + 188 719.6 187.8 716.4 187.8 714.4 c + 187.8 712.4 185.8 709.6 186 707.2 C + 186.8 688.199 186.4 686.199 V + 188.4 689.999 L + f + 1 g + 179.8 685.399 m + 177.8 686.799 173.4 680.799 V + 180.7 647.799 180.7 646.399 V + 181.8 648.499 180.5 655.699 v + 179.2 662.899 178.3 675.599 y + 179.8 685.399 l + f + 0.1 0.55 0.85 0.3 k + 201.4 746 m + 183.8 742.8 184.2 713.6 V + 183.4 688.799 l + 182.2 714.4 181 716 v + 179.8 717.6 183.8 728.8 180.6 722.8 C + 166.6 708.8 174.6 687.599 V + 176.1 684.299 173.1 688.899 V + 168.5 701.5 169.6 707.9 V + 169.8 710.1 171.7 712.9 V + 180.3 724.6 183 726.9 V + 184.8 741.3 200.2 746.5 V + 205.9 748.8 201.4 746 V + f + 0 g + 340.8 812.2 m + 341.46 812.554 341.451 813.524 342.031 813.697 c + 343.18 814.041 343.344 815.108 343.862 815.892 c + 344.735 817.211 344.928 818.744 345.51 820.235 c + 345.782 820.935 345.809 821.89 345.496 822.55 c + 344.322 825.031 343.62 827.48 342.178 829.906 c + 341.91 830.356 341.648 831.15 341.447 831.748 c + 340.984 833.132 339.727 834.123 338.867 835.443 c + 338.579 835.884 339.104 836.809 338.388 836.893 c + 337.491 836.998 336.042 837.578 335.809 836.552 c + 335.221 833.965 336.232 831.442 337.2 829 C + 336.418 828.308 336.752 827.387 336.904 826.62 c + 337.614 823.014 336.416 819.662 335.655 816.188 c + 335.632 816.084 335.974 815.886 335.946 815.824 c + 334.724 813.138 333.272 810.693 331.453 808.312 c + 330.695 807.32 329.823 806.404 329.326 805.341 c + 328.958 804.554 328.55 803.588 328.8 802.6 C + 325.365 799.82 323.115 795.975 320.504 792.129 c + 320.042 791.449 320.333 790.24 320.884 789.971 c + 321.697 789.573 322.653 790.597 323.123 791.443 c + 323.512 792.141 323.865 792.791 324.356 793.434 c + 324.489 793.609 324.31 794.028 324.445 794.149 c + 327.078 796.496 328.747 799.432 331.2 801.8 C + 333.15 802.129 334.687 803.127 336.435 804.14 c + 336.743 804.319 337.267 804.07 337.557 804.265 c + 339.31 805.442 339.308 807.478 339.414 809.388 c + 339.464 810.272 339.66 811.589 340.8 812.2 c + f + 331.959 816.666 m + 332.083 816.743 331.928 817.166 332.037 817.382 c + 332.199 817.706 332.602 817.894 332.764 818.218 c + 332.873 818.434 332.71 818.814 332.846 818.956 c + 335.179 821.403 335.436 824.427 334.4 827.4 C + 335.424 828.02 335.485 829.282 335.06 830.129 c + 334.207 831.829 334.014 833.755 333.039 835.298 c + 332.237 836.567 330.659 837.811 329.288 836.508 c + 328.867 836.108 328.546 835.321 328.824 834.609 c + 328.888 834.446 329.173 834.3 329.146 834.218 c + 329.039 833.894 328.493 833.67 328.487 833.398 c + 328.457 831.902 327.503 830.391 328.133 829.062 c + 328.905 827.433 329.724 825.576 330.4 823.8 C + 329.166 821.684 330.199 819.235 328.446 817.358 c + 328.31 817.212 328.319 816.826 328.441 816.624 c + 328.733 816.138 329.139 815.732 329.625 815.44 c + 329.827 815.319 330.175 815.317 330.375 815.441 c + 330.953 815.803 331.351 816.29 331.959 816.666 c + f + 394.771 826.977 m + 396.16 825.185 396.45 822.39 394.401 821 C + 394.951 817.691 398.302 819.67 400.401 820.2 C + 400.292 820.588 400.519 820.932 400.802 820.937 c + 401.859 820.952 402.539 821.984 403.601 821.8 C + 404.035 823.357 405.673 824.059 406.317 825.439 c + 408.043 829.134 407.452 833.407 404.868 836.653 c + 404.666 836.907 404.883 837.424 404.759 837.786 c + 404.003 839.997 401.935 840.312 400.001 841 C + 398.824 844.875 398.163 848.906 396.401 852.6 C + 394.787 852.85 394.089 854.589 392.752 855.309 c + 391.419 856.028 390.851 854.449 390.892 853.403 c + 390.899 853.198 391.351 852.974 391.181 852.609 c + 391.105 852.445 390.845 852.334 390.845 852.2 c + 390.846 852.065 391.067 851.934 391.201 851.8 C + 390.283 850.98 388.86 850.503 388.565 849.358 c + 387.611 845.648 390.184 842.523 391.852 839.322 c + 392.443 838.187 391.707 836.916 390.947 835.708 c + 390.509 835.013 390.617 833.886 390.893 833.03 c + 391.645 830.699 393.236 828.96 394.771 826.977 c + f + 357.611 808.591 m + 356.124 806.74 352.712 804.171 355.629 802.243 c + 355.823 802.114 356.193 802.11 356.366 802.244 c + 358.387 803.809 360.39 804.712 362.826 805.294 c + 362.95 805.323 363.224 804.856 363.593 805.017 c + 365.206 805.72 367.216 805.662 368.4 807 C + 372.167 806.776 375.732 807.892 379.123 809.2 c + 380.284 809.648 381.554 810.207 382.755 810.709 c + 384.131 811.285 385.335 812.213 386.447 813.354 c + 386.58 813.49 386.934 813.4 387.201 813.4 C + 387.161 814.263 388.123 814.39 388.37 815.012 c + 388.462 815.244 388.312 815.64 388.445 815.742 c + 390.583 817.372 391.503 819.39 390.334 821.767 c + 390.049 822.345 389.8 822.963 389.234 823.439 c + 388.149 824.35 387.047 823.496 386 823.8 C + 385.841 823.172 385.112 823.344 384.726 823.146 c + 383.867 822.707 382.534 823.292 381.675 822.854 c + 380.313 822.159 379.072 821.99 377.65 821.613 c + 377.338 821.531 376.56 821.627 376.4 821 C + 376.266 821.134 376.118 821.368 376.012 821.346 c + 374.104 820.95 372.844 820.736 371.543 819.044 c + 371.44 818.911 370.998 819.09 370.839 818.955 c + 369.882 818.147 369.477 816.913 368.376 816.241 c + 368.175 816.118 367.823 816.286 367.629 816.157 c + 366.983 815.726 366.616 815.085 365.974 814.638 c + 365.645 814.409 365.245 814.734 365.277 814.99 c + 365.522 816.937 366.175 818.724 365.6 820.6 C + 367.677 823.12 370.194 825.069 372 827.8 C + 372.015 829.966 372.707 832.112 372.594 834.189 c + 372.584 834.382 372.296 835.115 372.17 835.462 c + 371.858 836.316 372.764 837.382 371.92 838.106 c + 370.516 839.309 369.224 838.433 368.4 837 C + 366.562 836.61 364.496 835.917 362.918 837.151 c + 361.911 837.938 361.333 838.844 360.534 839.9 c + 359.549 841.202 359.884 842.638 359.954 844.202 c + 359.96 844.33 359.645 844.466 359.645 844.6 c + 359.646 844.735 359.866 844.866 360 845 C + 359.294 845.626 359.019 846.684 358 847 C + 358.305 848.092 357.629 848.976 356.758 849.278 c + 354.763 849.969 353.086 848.057 351.194 847.984 c + 350.68 847.965 350.213 849.003 349.564 849.328 c + 349.132 849.544 348.428 849.577 348.066 849.311 c + 347.378 848.807 346.789 848.693 346.031 848.488 c + 344.414 848.052 343.136 846.958 341.656 846.103 c + 340.171 845.246 339.216 843.809 338.136 842.489 c + 337.195 841.337 337.059 838.923 338.479 838.423 c + 340.322 837.773 341.626 840.476 343.592 840.15 c + 343.904 840.099 344.11 839.788 344 839.4 C + 344.389 839.291 344.607 839.52 344.8 839.8 C + 345.658 838.781 346.822 838.444 347.76 837.571 c + 348.73 836.667 350.476 837.085 351.491 836.088 c + 353.02 834.586 352.461 831.905 354.4 830.6 C + 353.814 829.287 353.207 828.01 352.872 826.583 c + 352.59 825.377 353.584 824.18 354.795 824.271 c + 356.053 824.365 356.315 825.124 356.8 826.2 C + 357.067 825.933 357.536 825.636 357.495 825.42 c + 357.038 823.033 356.011 821.04 355.553 818.609 c + 355.494 818.292 355.189 818.09 354.8 818.2 C + 354.332 814.051 350.28 811.657 347.735 808.492 c + 347.332 807.99 347.328 806.741 347.737 806.338 c + 349.14 804.951 351.1 806.497 352.8 807 C + 353.013 808.206 353.872 809.148 355.204 809.092 c + 355.46 809.082 355.695 809.624 356.019 809.754 c + 356.367 809.892 356.869 809.668 357.155 809.866 c + 358.884 811.061 360.292 812.167 362.03 813.356 c + 362.222 813.487 362.566 813.328 362.782 813.436 c + 363.107 813.598 363.294 813.985 363.617 814.17 c + 363.965 814.37 364.207 814.08 364.4 813.8 C + 363.754 813.451 363.75 812.494 363.168 812.292 c + 362.393 812.024 361.832 811.511 361.158 811.064 c + 360.866 810.871 360.207 811.119 360.103 810.94 c + 359.505 809.912 358.321 809.474 357.611 808.591 c + f + 302.2 858 m + 292.962 860.872 281.8 835.2 V + 279.4 830 277 828 v + 274.6 826 263.4 822.4 261.4 818.4 C + 251 802.4 L + 265.8 818.4 269 820.8 V + 277 829.2 273.8 822.4 V + 259.8 811.6 261 802.4 V + 255.4 788 254.6 786 V + 270.6 818 273 819.2 v + 275.4 820.4 276.6 820.4 275.4 816.8 c + 274.2 813.2 273.8 796.8 271 794.8 C + 279 815.2 278.2 818.4 V + 281.4 822 283.8 816.8 V + 282.6 800.8 l + 287 788.8 l + 284.6 800 286.2 815.6 V + 284.2 826 288.2 820.4 v + 292.2 814.8 301.8 808.8 301.8 804 C + 296.6 821.6 287.4 826.4 V + 283.4 820.4 l + 282.2 822.4 l + 278.6 823.2 283 830 v + 287.4 836.8 287 837.6 y + 293.4 830.4 295 830.4 V + 308.2 838 309.4 813.6 V + 316.2 828 307 834.8 V + 292.2 836.8 293.4 842 V + 300.6 854.4 L + 304.2 859.6 302.6 856.8 y + F + 282.2 841.6 m + 269.4 841.6 266.2 836.4 V + 259 826.8 l + 276.2 836.8 280.2 838 v + 284.2 839.2 282.2 841.6 Y + f + 242.2 835.2 m + 240.2 834 239.8 831.2 v + 239.4 828.4 237 828 237.8 825.2 c + 238.6 822.4 240.6 820 240.6 824 c + 240.6 828 242.2 830 243 831.2 c + 243.8 832.4 245.4 836.8 242.2 835.2 c + f + 233.4 774 m + 225 778 221.8 781.6 v + 218.6 785.2 219.052 780.034 214.2 780.4 c + 208.353 780.841 209.4 796.8 y + 205.4 789.2 l + 204.2 774.8 212.2 777.2 v + 216.107 778.372 217.4 776.8 215.8 776 c + 214.2 775.2 221.4 774.8 218.6 773.2 c + 215.8 771.6 230.2 776.8 227.8 766.4 C + 233.4 774 L + f + 220.8 759.6 m + 205.4 755.2 201.8 764.8 V + 197 762.4 199.2 759.4 v + 201.4 756.4 202.6 756 y + 208 754.8 207.4 754 v + 206.8 753.2 204.4 749.8 y + 214.6 755.8 220.8 759.6 v + f + 1 g + 449.201 681.399 m + 448.774 679.265 447.103 678.464 445.201 677.799 C + 443.284 678.757 440.686 681.863 438.801 679.799 C + 438.327 680.279 437.548 680.339 437.204 681.001 c + 436.739 681.899 437.011 682.945 436.669 683.743 c + 436.124 685.015 435.415 686.381 435.601 687.799 C + 437.407 688.511 438.002 690.417 437.528 692.18 c + 437.459 692.437 437.03 692.634 437.23 692.983 c + 437.416 693.306 437.734 693.533 438.001 693.8 C + 437.866 693.665 437.721 693.432 437.61 693.452 c + 437 693.558 437.124 694.195 437.254 694.582 c + 437.839 696.328 439.853 696.592 441.201 695.4 C + 441.457 695.965 441.966 695.771 442.401 695.8 C + 442.351 696.379 442.759 696.906 442.957 697.326 c + 443.475 698.424 445.104 697.318 445.901 697.93 c + 446.977 698.755 448.04 699.454 449.118 698.851 c + 450.927 697.838 452.636 696.626 453.835 694.885 c + 454.41 694.051 454.65 692.77 454.592 691.812 c + 454.554 691.165 453.173 691.517 452.83 690.588 c + 452.185 688.84 454.016 688.321 454.772 686.983 c + 454.97 686.634 454.706 686.33 454.391 686.232 c + 453.98 686.104 453.196 686.293 453.334 685.84 c + 454.306 682.647 451.55 681.969 449.201 681.399 C + f + 439.6 661.799 m + 439.593 663.537 437.992 665.293 439.201 666.999 C + 439.336 666.865 439.467 666.644 439.601 666.644 c + 439.736 666.644 439.867 666.865 440.001 666.999 C + 441.496 664.783 445.148 663.855 445.006 661.009 c + 444.984 660.562 443.897 659.644 444.801 658.999 C + 442.988 657.651 442.933 655.281 442.001 653.399 C + 440.763 653.685 439.551 654.048 438.401 654.599 C + 438.753 656.085 438.636 657.769 439.456 659.089 c + 439.89 659.787 439.603 660.866 439.6 661.799 c + f + 0.8 g + 273.4 670.799 m + 256.542 660.663 270.6 675.999 v + 279.4 685.599 289.4 691.199 y + 299.8 695.6 303.4 696.8 v + 307 698 322.2 703.2 325.4 703.6 c + 328.6 704 338.2 708 345 704 c + 351.8 700 359.8 695.6 y + 343.4 704 339.8 701.6 v + 336.2 699.2 329 699.6 323 696.4 C + 308.2 691.999 305 689.999 v + 301.8 687.999 291.4 676.399 289.8 677.199 c + 288.2 677.999 290.2 678.399 291.4 681.199 c + 292.6 683.999 290.6 685.599 282.6 679.199 c + 274.6 672.799 273.4 670.799 Y + f + 0 g + 280.805 676.766 m + 282.215 689.806 290.693 688.141 V + 298.919 692.311 301.641 694.279 V + 309.78 695.981 311.09 696.598 v + 329.569 705.298 344.288 700.779 344.835 701.899 c + 345.381 703.018 365.006 695.901 368.615 691.815 c + 369.006 691.372 358.384 697.412 348.686 699.303 c + 340.413 700.917 318.811 699.056 307.905 693.52 c + 304.932 692.011 295.987 686.227 293.456 686.338 c + 290.925 686.45 280.805 676.766 Y + f + 0.8 g + 277 651.199 m + 261.8 653.599 278.6 655.199 V + 296.6 657.199 300.6 662.399 V + 314.2 671.599 317 671.999 v + 319.8 672.399 349.8 679.599 350.2 681.999 c + 350.6 684.399 356.2 684.399 357.8 683.599 c + 359.4 682.799 358.6 681.599 355.8 680.799 c + 353 679.999 321.8 663.599 315.4 662.399 c + 309 661.199 297.4 653.599 292.6 652.399 c + 287.8 651.199 277 651.199 Y + f + 0 g + 296.52 658.597 m + 287.938 659.426 296.539 660.245 V + 305.355 663.669 307.403 666.332 V + 314.367 671.043 315.8 671.247 v + 317.234 671.452 331.194 675.139 331.399 676.367 c + 331.604 677.596 365.67 690.177 370.09 686.987 c + 373.001 684.886 363.1 686.563 353.466 682.153 c + 352.111 681.533 318.258 666.946 314.981 666.332 c + 311.704 665.717 305.765 661.826 303.307 661.212 c + 300.85 660.597 296.52 658.597 Y + f + 288.6 656.399 m + 293.8 656.799 292.6 655.199 v + 291.4 653.599 289 654.399 y + 288.6 656.399 l + f + 281.4 654.799 m + 286.6 655.199 285.4 653.599 v + 284.2 651.999 281.8 652.799 y + 281.4 654.799 l + f + 271 653.199 m + 276.2 653.599 275 651.999 v + 273.8 650.399 271.4 651.199 y + 271 653.199 l + f + 263.4 652.399 m + 268.6 652.799 267.4 651.199 v + 266.2 649.599 263.8 650.399 y + 263.4 652.399 l + f + 301.8 691.999 m + 306.2 691.999 305 690.399 v + 303.8 688.799 300.6 689.199 y + 301.8 691.999 l + f + 291.8 686.399 m + 298.306 688.54 295.8 685.199 v + 294.6 683.599 292.2 684.399 y + 291.8 686.399 l + f + 280.6 681.599 m + 285.8 681.999 284.6 680.399 v + 283.4 678.799 281 679.599 y + 280.6 681.599 l + f + 273 675.599 m + 278.2 675.999 277 674.399 v + 275.8 672.799 273.4 673.599 y + 273 675.599 l + f + 266.2 670.799 m + 271.4 671.199 270.2 669.599 v + 269 667.999 266.6 668.799 y + 266.2 670.799 l + f + 305.282 664.402 m + 312.203 664.934 310.606 662.805 v + 309.009 660.675 305.814 661.74 y + 305.282 664.402 l + f + 315.682 669.202 m + 322.603 669.734 321.006 667.605 v + 319.409 665.475 316.214 666.54 y + 315.682 669.202 l + f + 326.482 673.602 m + 333.403 674.134 331.806 672.005 v + 330.209 669.875 327.014 670.94 y + 326.482 673.602 l + f + 336.882 678.402 m + 343.803 678.934 342.206 676.805 v + 340.609 674.675 337.414 675.74 y + 336.882 678.402 l + f + 309.282 696.402 m + 316.203 696.934 314.606 694.805 v + 313.009 692.675 309.014 692.94 y + 309.282 696.402 l + f + 319.282 699.602 m + 326.203 700.134 324.606 698.005 v + 323.009 695.875 318.614 696.14 y + 319.282 699.602 l + f + 296.6 659.599 m + 301.8 659.999 300.6 658.399 v + 299.4 656.799 297 657.599 y + 296.6 659.599 l + f + 0.1 0.55 0.85 0.3 k + 223.4 758.8 m + 219 750 218.6 746.8 V + 219.4 755.6 220.6 757.6 v + 221.8 759.6 223.4 758.8 y + f + 205 744.8 m + 201.8 730.4 202.2 727.6 V + 201 739.2 201.4 740.4 v + 201.8 741.6 205 744.8 y + f + 0.8 g + 225.8 819.4 m + 225.6 816.2 l + 223.4 816 l + 237.6 803.4 238.2 795.8 V + 239 804 225.8 819.4 V + f + 0 g + 229.784 818.135 m + 229.353 818.551 229.572 819.296 229.164 819.556 c + 228.355 820.072 230.462 820.129 230.234 820.845 c + 229.851 822.051 230.038 822.072 229.916 823.348 c + 229.859 823.946 230.447 825.486 230.832 825.926 c + 232.278 827.578 230.954 830.51 232.594 832.061 c + 232.898 832.35 233.274 832.902 233.559 833.32 c + 234.218 834.283 235.402 834.771 236.352 835.599 c + 236.67 835.875 236.469 836.702 237.038 836.61 c + 237.752 836.495 238.993 836.625 238.948 835.784 c + 238.835 833.664 237.506 831.944 236.226 830.276 C + 236.677 829.572 236.219 828.937 235.935 828.38 c + 234.6 825.76 234.789 822.919 234.615 820.079 c + 234.61 819.994 234.303 819.916 234.311 819.863 c + 234.664 817.528 235.248 815.329 236.127 813.1 c + 236.493 812.17 236.964 811.275 237.114 810.348 c + 237.225 809.662 237.328 808.829 236.92 808.124 C + 238.955 805.234 237.646 802.583 238.815 799.052 c + 239.022 798.427 240.714 796.513 240.251 796.674 c + 237.738 797.545 237.626 797.943 237.449 798.696 c + 237.303 799.319 236.973 800.696 236.736 801.298 c + 236.672 801.462 236.501 803.346 236.423 803.468 c + 234.91 805.85 236.268 805.674 234.898 808.032 C + 233.47 808.712 232.504 809.816 231.381 810.978 c + 231.183 811.182 232.326 811.906 232.145 812.119 c + 231.053 813.408 229.9 814.175 230.236 815.668 c + 230.391 816.358 230.528 817.415 229.784 818.135 c + f + 226.2 816.4 m + 226.6 809.6 229 808 v + 231.4 806.4 230.2 807.2 227 808.4 c + 223.8 809.6 225 810.4 y + 222.2 810 224.6 808 v + 227 806 230.6 803.6 229 803.6 c + 227.4 803.6 219.8 807.6 219.8 810.4 c + 219.8 813.2 218.8 817.3 y + 219.9 818.1 224.7 818 V + 226.1 817.3 226.2 816.4 V + f + 1 g + 1 J 0.1 w + 225.4 797.8 m + 216.88 800.591 198.4 797.2 V + 207.431 799.278 226.2 797 v + 236.5 795.75 225.4 797.8 Y + b + 227.498 797.871 m + 219.252 801.389 200.547 799.608 V + 209.725 800.897 228.226 797.005 v + 238.38 794.869 227.498 797.871 Y + b + 229.286 797.778 m + 221.324 801.899 202.539 801.514 V + 211.787 802.118 229.948 796.86 v + 239.914 793.975 229.286 797.778 Y + b + 230.556 797.555 m + 223.732 801.862 206.858 802.96 V + 215.197 802.79 231.078 796.681 v + 239.794 793.328 230.556 797.555 Y + b + 345.84 787.039 m + 344.91 786.395 345.124 787.576 v + 345.339 788.757 373.547 801.927 377.161 801.677 C + 346.913 788.471 345.84 787.039 V + b + 342.446 786.4 m + 341.57 785.685 341.691 786.879 v + 341.812 788.073 368.899 803.418 372.521 803.452 C + 343.404 787.911 342.446 786.4 V + b + 339.16 785.025 m + 338.332 784.253 338.374 785.453 v + 338.416 786.652 358.233 802.149 368.045 804.023 C + 350.015 795.896 339.16 785.025 V + b + 336.284 783.162 m + 335.539 782.468 335.577 783.547 v + 335.615 784.627 353.449 798.574 362.28 800.26 C + 346.054 792.946 336.284 783.162 V + b + 0.8 g + 0 J 1 w + 304.6 635.199 m + 289.4 637.599 306.2 639.199 V + 324.2 641.199 328.2 646.399 V + 341.8 655.599 344.6 655.999 v + 347.4 656.399 363.8 659.999 364.2 662.399 c + 364.6 664.799 370.6 667.199 372.2 666.399 c + 373.8 665.599 373.8 656.399 371 655.599 c + 368.2 654.799 349.4 647.599 343 646.399 c + 336.6 645.199 325 637.599 320.2 636.399 c + 315.4 635.199 304.6 635.199 Y + f + 0 g + 377.6 672.599 m + 374.6 670.999 373.4 668.399 V + 367 657.799 352.8 654.599 V + 329.8 645.599 322 643.599 V + 308.6 638.599 301.2 639.399 V + 294.2 639.199 300.4 637.599 V + 320.6 639.599 324 641.399 V + 339.6 646.599 342.6 649.199 v + 345.6 651.799 363.8 656.799 366 658.799 c + 368.2 660.799 378 669.199 377.6 672.599 C + f + 318.882 641.089 m + 324.111 641.315 322.958 639.766 v + 321.805 638.216 319.357 639.09 y + 318.882 641.089 l + f + 311.68 639.737 m + 316.908 639.963 315.756 638.414 v + 314.603 636.864 312.155 637.737 y + 311.68 639.737 l + f + 301.251 638.489 m + 306.48 638.716 305.327 637.166 v + 304.174 635.617 301.726 636.49 y + 301.251 638.489 l + f + 293.617 637.945 m + 298.846 638.171 297.693 636.622 v + 296.54 635.072 294.092 635.946 y + 293.617 637.945 l + f + 335.415 648.487 m + 342.375 648.788 340.84 646.726 v + 339.306 644.664 336.047 645.826 y + 335.415 648.487 l + f + 345.73 652.912 m + 351.689 656.213 351.155 651.151 v + 350.885 648.595 346.362 650.251 y + 345.73 652.912 l + f + 354.862 655.726 m + 362.021 659.427 360.287 653.965 v + 359.509 651.515 355.493 653.065 y + 354.862 655.726 l + f + 364.376 660.551 m + 368.735 665.452 369.801 658.79 v + 370.207 656.252 365.008 657.89 y + 364.376 660.551 l + f + 326.834 644.003 m + 332.062 644.23 330.91 642.68 v + 329.757 641.131 327.308 642.004 y + 326.834 644.003 l + f + 1 g + 1 J 0.1 w + 362.434 765.397 m + 361.708 764.732 361.707 765.803 v + 361.707 766.873 379.191 780.137 388.034 781.521 C + 371.935 774.792 362.434 765.397 V + b + 0 g + 0 J 1 w + 365.4 701.6 m + 387.401 679.199 396.601 675.599 V + 405.801 664.399 401.801 638.399 V + 398.601 630.799 395.401 651.599 V + 398.601 676.799 387.401 660.799 V + 379 670.699 385.4 670.399 V + 388.601 668.399 389.001 669.999 v + 389.401 671.599 381.4 685.199 364.2 699.6 c + 347 714 365.4 701.6 Y + f + 1 g + 1 J 0.1 w + 307 662.799 m + 306.8 664.599 308.6 663.799 v + 310.4 662.999 404.601 656.799 436.201 632.799 C + 391.001 655.999 307 662.799 V + b + 317.4 667.199 m + 317.2 668.999 319 668.199 v + 320.8 667.399 457.401 668.399 481.001 635.999 C + 459.001 661.199 317.4 667.199 V + b + 329 671.199 m + 328.8 672.999 330.6 672.199 v + 332.4 671.399 505.801 684.399 529.401 651.999 C + 519.801 677.599 329 671.199 V + b + 339 675.999 m + 338.8 677.799 340.6 676.999 v + 342.4 676.199 464.601 714.8 488.201 682.399 C + 474.801 707 339 675.999 V + b + 281 653.199 m + 280.8 654.999 282.6 654.199 v + 284.4 653.399 302.2 651.199 304.2 612.399 C + 297 654.399 281 653.199 V + b + 272.2 651.599 m + 272 653.399 273.8 652.599 v + 275.6 651.799 289.8 656.399 287 617.599 C + 288.2 652.799 272.2 651.599 V + b + 264.2 651.199 m + 264 652.999 265.8 652.199 v + 267.6 651.399 283 650.799 270.6 628.399 C + 280.2 652.399 264.2 651.199 V + b + 311.526 695.535 m + 311.082 693.536 312.631 694.753 v + 328.699 707.378 361.141 766.28 416.826 771.914 C + 378.518 784.024 311.526 695.535 V + b + 322.726 697.335 m + 321.363 698.528 323.231 699.153 v + 325.099 699.778 437.541 772.28 476.826 764.314 C + 449.719 771.824 322.726 697.335 V + b + 301.885 691.233 m + 301.376 689.634 303.087 690.61 v + 312.062 695.73 315.677 752.941 359.254 754.196 C + 326.843 768.91 301.885 691.233 V + b + 281.962 680.207 m + 280.885 678.921 282.838 679.175 v + 293.084 680.507 314.489 721.778 358.928 716.699 C + 326.962 731.045 281.962 680.207 V + b + 293.2 686.333 m + 292.389 684.864 294.258 685.489 v + 304.057 688.763 317.141 733.375 361.729 736.922 C + 327.603 744.865 293.2 686.333 V + b + 274.922 675.088 m + 274.049 674.046 275.631 674.252 v + 283.93 675.331 301.268 708.76 337.264 704.646 C + 311.371 716.266 274.922 675.088 V + b + 267.323 669.179 m + 266.318 668.134 267.909 668.252 v + 272.077 668.561 302.715 701.64 321.183 686.138 C + 309.168 704.861 267.323 669.179 V + b + 336.855 701.102 m + 335.654 702.457 337.586 702.842 v + 339.518 703.226 460.221 760.939 498.184 748.073 C + 472.243 758.947 336.855 701.102 V + b + 303.4 636.799 m + 303.2 638.599 305 637.799 v + 306.8 636.999 322.2 636.399 309.8 613.999 C + 319.4 637.999 303.4 636.799 V + b + 313.8 638.399 m + 313.6 640.199 315.4 639.399 v + 317.2 638.599 335 636.399 337 597.599 C + 329.8 639.599 313.8 638.399 V + b + 320.6 639.999 m + 320.4 641.799 322.2 640.999 v + 324 640.199 348.6 636.799 372.2 604.399 C + 336.6 641.199 320.6 639.999 V + b + 328.225 642.028 m + 327.788 643.786 329.678 643.232 v + 331.568 642.678 352.002 644.577 390.099 610.401 C + 343.924 645.344 328.225 642.028 V + b + 338.625 646.428 m + 338.188 648.186 340.078 647.632 v + 341.968 647.078 376.802 642.577 428.499 607.601 C + 354.324 649.744 338.625 646.428 V + b + 298.2 657.999 m + 298 659.799 299.8 658.999 v + 301.6 658.199 355 655.599 385.4 628.799 C + 350.499 653.574 298.2 657.999 V + b + 288.2 653.999 m + 288 655.799 289.8 654.999 v + 291.6 654.199 316.2 650.799 339.8 618.399 C + 304.2 655.199 288.2 653.999 V + b + 349.503 651.038 m + 348.938 652.759 350.864 652.345 v + 352.79 651.932 387.86 649.996 441.981 618.902 C + 364.317 653.296 349.503 651.038 V + b + 357.903 653.438 m + 357.338 655.159 359.264 654.745 v + 361.19 654.332 396.26 652.396 450.381 621.302 C + 373.317 656.096 357.903 653.438 V + b + 367.503 658.438 m + 366.938 660.159 368.864 659.745 v + 370.79 659.332 413.86 654.996 503.582 620.702 C + 382.917 661.096 367.503 658.438 V + b + 0 g + 0 J 1 w + 256.2 651.599 m + 261.4 651.999 260.2 650.399 v + 259 648.799 256.6 649.599 y + 256.2 651.599 l + f + 287 637.599 m + 292.2 637.999 291 636.399 v + 289.8 634.799 287.4 635.599 y + 287 637.599 l + f + 278.2 637.999 m + 283.4 638.399 282.2 636.799 v + 281 635.199 278.6 635.999 y + 278.2 637.999 l + f + 182.831 649.818 m + 187.876 648.495 186.218 647.376 v + 184.561 646.256 182.554 647.798 y + 182.831 649.818 l + f + 184.831 659.418 m + 189.876 658.095 188.218 656.976 v + 186.561 655.856 184.554 657.398 y + 184.831 659.418 l + f + 177.631 663.818 m + 182.676 662.495 181.018 661.376 v + 179.361 660.256 177.354 661.798 y + 177.631 663.818 l + f + 0.8 g + 1 J 0.1 w + 257.4 588.799 m + 255.8 588.799 251.8 586.799 V + 249.8 586.799 238.6 583.199 233 573.199 C + 245.4 582.799 257.4 588.799 V + f + 345.116 496.153 m + 345.257 495.895 345.312 495.475 345.604 495.458 c + 346.262 495.418 347.495 495.117 347.37 495.753 c + 346.522 500.059 345.648 504.996 341.515 506.803 c + 340.876 507.082 339.434 506.669 339.36 505.785 c + 339.233 504.261 339.116 502.912 339.425 501.446 c + 339.725 500.025 341.883 500.015 342.8 501.399 C + 343.736 499.727 344.168 497.884 345.116 496.153 c + f + 334.038 491.419 m + 334.786 490.006 334.659 488.147 336.074 487.584 c + 336.814 487.29 338.664 488.265 338.246 489.339 c + 337.444 491.4 337.056 493.639 335.667 495.45 c + 335.467 495.712 335.707 496.245 335.547 496.573 c + 334.953 497.793 333.808 498.528 332.4 498.199 C + 331.285 495.996 332.433 493.867 333.955 492.158 c + 334.091 492.006 333.925 491.63 334.038 491.419 c + f + 294.436 496.609 m + 294.328 496.986 294.29 497.449 294.455 497.77 c + 294.986 498.803 295.779 499.925 295.442 500.947 c + 295.094 502.003 293.978 501.821 293.328 501.252 c + 292.193 500.258 292.144 498.432 291.453 497.073 c + 291.257 496.687 291.308 496.114 290.867 495.723 c + 290.393 495.302 289.953 493.778 290.049 493.207 c + 290.102 492.894 289.919 482.986 290.141 483.249 c + 290.76 483.982 293.81 493.716 293.879 494.608 c + 293.936 495.339 294.668 495.804 294.436 496.609 c + f + 268.798 503.401 m + 271.432 505.9 274.222 508.861 273.78 512.573 c + 273.664 513.549 271.889 513.022 271.702 512.176 c + 270.9 508.551 268.861 505.89 266.293 503.498 c + 264.097 501.451 262.235 495.107 262 494.599 C + 265.697 499.855 267.954 502.601 268.798 503.401 c + f + 255.224 509.365 m + 255.747 509.735 255.445 510.226 255.662 510.558 c + 256.615 512.016 257.916 513.262 257.934 515 c + 257.937 515.277 257.559 515.586 257.224 515.362 c + 256.947 515.178 256.605 515.048 256.497 514.918 c + 254.467 512.469 253.067 509.798 251.624 506.986 c + 251.441 506.629 250.297 502.138 250.61 502.027 c + 250.849 501.942 252.569 506.123 252.779 506.237 c + 254.042 506.923 254.054 508.538 255.224 509.365 c + f + 271.957 489.821 m + 272.401 490.69 273.977 491.892 273.864 492.781 c + 273.746 493.709 274.214 495.152 273.302 494.464 c + 272.045 493.516 268.596 492.167 268.326 486.359 c + 268.3 485.788 271.274 488.481 271.957 489.821 c + f + 286.4 506.999 m + 286.8 507.667 287.508 507.194 287.967 507.457 c + 288.615 507.829 289.226 508.387 289.518 509.036 c + 290.488 511.185 292.257 513.005 292.4 515.399 C + 290.909 516.804 290.23 514.764 289.6 513.799 C + 288.277 515.446 287.278 513.572 285.978 513.053 c + 285.908 513.025 285.695 513.372 285.62 513.345 c + 284.443 512.905 283.763 511.824 282.765 511.043 c + 282.594 510.909 282.189 511.089 282.042 510.953 c + 281.39 510.35 280.417 510.025 280.137 509.343 c + 279.027 506.636 275.887 504.541 274 496.999 C + 274.381 496.09 278.512 503.641 278.999 504.339 c + 279.835 505.535 279.953 502.678 281.229 503.344 c + 281.28 503.371 281.466 503.133 281.6 502.999 C + 281.794 503.279 282.012 503.508 282.4 503.399 C + 282.4 503.799 282.266 504.355 282.467 504.514 c + 283.704 505.491 283.62 506.559 284.4 507.799 C + 284.858 507.01 285.919 507.729 286.4 506.999 C + f + 346.2 452.599 m + 353.6 472.999 349.2 484.199 V + 360.6 462.599 356 451.399 V + 355.6 461.799 351.6 466.799 V + 347.6 453.999 346.2 452.599 V + f + 331.4 455.199 m + 336.8 463.999 328.8 482.399 V + 328 461.999 321.2 450.999 V + 335.4 471.199 331.4 455.199 V + f + 321.4 457.199 m + 321.2 477.199 321.6 480.199 V + 317.8 463.599 307.6 453.999 V + 322 465.999 321.4 457.199 V + f + 311.8 489.199 m + 317.8 475.599 307.8 457.199 V + 314.2 469.399 309.4 476.399 V + 312 479.799 311.8 489.199 V + f + 292.6 457.599 m + 291.6 473.199 293.4 475.399 V + 293.6 481.799 293.2 482.799 V + 297.2 488.999 297.4 481.599 V + 298.8 473.799 301.6 469.199 V + 305.2 463.799 305 457.399 V + 295 487.599 292.6 457.599 V + f + 289 485.199 m + 282.4 474.399 280.6 455.399 V + 279.2 461.599 283 475.999 V + 287.2 491.399 289 485.199 V + f + 267.2 465.399 m + 272.2 470.799 273.6 475.799 V + 277.2 491.599 270.8 482.999 V + 271 474.999 262.8 467.599 V + 267.6 469.999 267.2 465.399 V + f + 261.4 470.399 m + 264.8 487.799 265.6 488.599 V + 267.4 491.999 264.6 488.799 V + 255.8 469.599 251.8 462.999 V + 259.8 472.199 261.4 470.399 V + f + 255.6 486.999 m + 267.2 509.399 245.4 483.599 V + 256.4 493.399 255.6 486.999 V + f + 240.2 501.599 m + 245 520.399 247.6 520.199 V + 255.8 529.199 249.2 518.599 V + 243.2 508.999 243.8 499.199 V + 243.2 508.799 240.2 501.599 V + f + 570.5 513 m + 558.5 523 556 526.5 V + 569.5 508 569.5 501 V + 572 508.5 570.5 513 V + f + 576 535 m + 555 550 551.5 557.5 V + 578 528 578 523.5 V + 578.5 532.5 576 535 V + f + 593 689 m + 581 697 579.5 695 V + 590 688.5 592.5 680 V + 591 689 593 689 V + f + 601.5 608.5 m + 584 620.5 l + 603 603.5 603.5 599.5 V + 601.5 608.5 L + f + 0 g + 1 w + 210.75 631 m + 232.75 626.25 l + S + 261 469 m + 260.5 472.5 251.5 462 v + S + 266.5 464 m + 268.5 470.5 262 466 v + S + 320.5 455.5 m + 322 466.5 310.5 453.5 v + S + + showpage + + %%Trailer diff -rc2N gs24/trace.c gs241/trace.c *** gs24/trace.c Sun Feb 16 13:27:34 1992 --- gs241/trace.c *************** *** 1,515 **** - /* Copyright (C) 1989, 1990 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. */ - - /* trace.c */ - /* Tracing package for Turbo C */ - #include - #include - #include - #include - #include - #include - #include "memory_.h" - typedef unsigned char byte; - #ifndef __TURBOC__ /* ****** HACK ****** */ - # define _ds - # define _ss - extern unsigned _stklen; - # define jb_bp(jbuf) (unsigned long)buf[0] - #else /* ****** HACK ****** */ - # define jb_bp(jbuf) buf[0].j_bp - #endif - - - /* - * NOTE: this package is extremely specialized. It works only - * with the Borland C and C++ compilers, with large code models, - * on 80x86 and 80x88 processors and compatibles with x>0. - * Use at your own risk. - */ - - /* - * To trace a procedure, call - * trace(proc, "procname", NULL, retsize); - * or - * trace_name("_PROCNAME", mapfile, NULL, retsize); - * where retsize is sizeof the return value type. - * To print arguments formatted (with vprintf), use - * trace(proc, "procname", "argformat", retsize); - * or - * trace_name("_PROCNAME", mapfile, "argformat", retsize); - * - * If trace_flush_flag is true, for crash-prone programs, - * the trace output is flushed after every call or return. - * - * Trace output goes to the file trace_output_file, or to stdout - * if trace_output_file is not initialized. - */ - - /* - * To map through a symbol (.MAP) file, open the file with - * mapfile = trace_open_map(filename, &reloc); - * which returns NULL if the map file isn't available. - * reloc is set to the relocation offset (i.e., the difference between - * actual procedure addresses and the values in the map file); - * if &reloc = NULL, nothing is stored. Then call - * sym = trace_next_symbol(&segaddr, mapfile); - * until it returns NULL. - * To look up a symbol in the file, call - * segaddr = trace_find_symbol(name, mapfile); - */ - - #ifdef TRACEDEBUG - - /* Main program for testing */ - main() - { int fib(int); - char *reloc; - FILE *trace_open_map(); - FILE *mapf = trace_open_map("trace.map", NULL); - char *pfib; - char *trace_find_symbol(); - pfib = trace_find_symbol("_FIB", mapf); - printf("fib at %lx\n", pfib); - trace_name("_FIB", mapf, "(%d)", sizeof(int)); - fib(5); - } - int - fib(n) - int n; - { if ( n <= 2 ) return 1; - return fib(n-1) + fib(n-2); - } - /* End of main program */ - - #endif - - /* ------ Symbol file mapping ------ */ - - #define max_sym 40 - static char sym[max_sym+1]; - - FILE * - trace_open_map(mapname, preloc) - char *mapname; - long *preloc; - { FILE *mapf = fopen(mapname, "rt"); - char *trace_find_symbol(char *, FILE *); - if ( mapf == NULL ) return NULL; /* can't open */ - if ( preloc != NULL ) - { extern main(); - char *main_addr = trace_find_symbol("_MAIN", mapf); - if ( main_addr == NULL ) - { fclose(mapf); /* can't find _main */ - return NULL; - } - *preloc = (long)main - (long)main_addr; - } - return mapf; - } - - char * - trace_next_symbol(paddr, mapf) - char **paddr; - FILE *mapf; - { /* A symbol definition line looks like this: */ - /* ssss:oooo namestring */ - /* with exactly 7 spaces between the address and the name. */ - while ( 1 ) - { char ch; - unsigned parm[2]; - static char term[2] = ": "; - int pi, i; - if ( (ch = getc(mapf)) != ' ' ) goto skip; - for ( pi = 0; pi < 2; pi++ ) - { unsigned p = 0; - for ( i = 0; i < 4; i++ ) - { ch = getc(mapf); - if ( !isxdigit(ch) ) goto skip; - p = (p << 4) + (isdigit(ch) ? ch - '0' : - (ch - 'A' + 10) & 0xf); - } - if ( (ch = getc(mapf)) != term[pi] ) goto skip; - parm[pi] = p; - } - for ( i = 1; i < 7; i++ ) - if ( (ch = getc(mapf)) != ' ' ) goto skip; - i = 0; - while ( (ch = getc(mapf)) != '\n' ) - { if ( i == max_sym ) goto skip; /* name too long */ - sym[i++] = ch; - } - sym[i] = 0; - /* Success. Adjust the segment and return. */ - *paddr = MK_FP(parm[0] + FP_SEG(abort), parm[1]); - return sym; - skip: /* Syntax didn't match, skip the rest of the line. */ - while ( ch != '\n' ) - { if ( ch == (char)EOF && feof(mapf) ) return NULL; - ch = getc(mapf); - } - } - } - - /* Look up a symbol in a file */ - char * - trace_find_symbol(name, mapf) - char *name; - FILE *mapf; - { char *s; - char *r; - rewind(mapf); - while ( (s = trace_next_symbol(&r, mapf)) != NULL ) - if ( !strcmp(s, name) ) return r; - return (char *)NULL; - } - - /* ------ Instruction and register set ------ */ - - /* Opcodes */ - #define op_ADD_IMM 0x81 - #define op_ADD_IMM8 0x83 - #define op_ADD_IMMX_X 0 - #define op_CALL_FAR 0x9a - #define op_CMP_MR 0x39 - #define op_CMP_RM 0x3b - #define op_ENTER 0xc8 - #define op_INC_REG 0x40 - #define op_JMP_FAR 0xea - #define op_JMP_FAR_IND 0xff - #define op_JMP_FAR_IND_X 0x28 - #define op_MOV_MR 0x8b - #define op_MOV_RM 0x89 - #define op_NOP 0x90 - #define op_POP_REG 0x58 - #define op_PUSH_IMM 0x68 - #define op_PUSH_REG 0x50 - #define op_RETF 0xcb - #define op_SUB_IMM 0x81 - #define op_SUB_IMM8 0x83 - #define op_SUB_IMMX_X 0x28 - /* Register numbers */ - #define r_AX 0 - #define r_CX 1 - #define r_DX 2 - #define r_BX 3 - #define r_SP 4 - #define r_BP 5 - #define r_SI 6 - #define r_DI 7 - - /* - * The standard entry sequence generated by Turbo C consists of: - * If there are no arguments and no local variables, nothing; - * if there are args but no local variables, PUSH BP, MOV BP,SP; - * if there are local variables, ENTER size,0, or - * PUSH BP, MOV BP,SP, SUB SP, - * Optionally, PUSH SI; - * if the PUSH SI is present, optionally PUSH DI. - * If the frame is larger than a certain size (0x80?), - * CMP BP,SP; JB .+8. - * CMP [_STKLEN],SP; JA . - */ - - /* ------ Stack parsing ------ */ - - typedef byte *i_ptr; - - /* Record for BP and return */ - typedef struct bp_ret_s { - unsigned _ss *bp; - i_ptr ret; - } bp_ret; - - /* Forward declarations */ - void fprint_block(int *, int, FILE *); - - /* ------ Dynamic tracing ------ */ - - /* Flush output flag */ - int trace_flush_flag = 0; - - /* The file to use for tracing output */ - FILE *trace_output_file = NULL; - - /* The code sequence that replaces the standard procedure entry: */ - typedef struct trace_entry_code_s { - byte JMP_FAR; - i_ptr entry; - } trace_entry_code; - static trace_entry_code trace_entry_template = { - op_JMP_FAR - }; - - /* The entry code in the trace record */ - typedef struct entry_code_s { - byte PUSH_BP; - byte MOV_BP_SP, mov_X; - byte PUSH_BP2; - byte PUSH_seg; unsigned short rec_seg; - byte PUSH_off; unsigned short rec_off; /*struct trace_rec_s near **/ - byte CALL; i_ptr print_args; - /* print_args moves the old return and BP above the args, */ - /* and returns a new fake BP as the value in AX. */ - byte MOV_BP_AX, mov_X2; - byte INC_SP, INC_SP2; /* pop 1 excess word */ - /* The largest possible finishing code is: */ - /* PUSH BP, MOV SP,BP, SUB SP,size, PUSH SI, PUSH DI, */ - /* CMP [_STKLEN],SP, JMP FAR real_entry */ - byte finish[18]; - } entry_code; - static entry_code entry_template = { - op_PUSH_REG+r_BP, - op_MOV_MR, 0xc0+(r_BP<<3)+r_SP, - op_PUSH_REG+r_BP, - op_PUSH_IMM, 0, - op_PUSH_IMM, 0, - op_CALL_FAR, 0L, - op_MOV_MR, 0xc0+(r_BP<<3)+r_AX, - op_INC_REG+r_SP, op_INC_REG+r_SP - }; - /* The exit code in the trace record */ - typedef struct exit_code_s { - byte PUSH_BP; - byte MOV_BP_SP, mov_X; - byte PUSH_BP2; - byte PUSH_DX; - byte PUSH_AX; - byte PUSH_seg; unsigned short rec_seg; - byte PUSH_off; unsigned short rec_off; /*struct trace_rec_s near **/ - byte CALL; i_ptr print_result; - /* print_result shuffles things back again */ - byte ADD_SP, add_X, c6w; - byte MOV_BP_SP2, mov_X2; - byte POP_BP; - byte RETF; - } exit_code; - static exit_code exit_template = { - op_PUSH_REG+r_BP, - op_MOV_MR, 0xc0+(r_BP<<3)+r_SP, - op_PUSH_REG+r_BP, - op_PUSH_REG+r_DX, - op_PUSH_REG+r_AX, - op_PUSH_IMM, 0, - op_PUSH_IMM, 0, - op_CALL_FAR, 0L, - op_ADD_IMM8, op_ADD_IMMX_X+0xc0+r_SP, 12, - op_MOV_MR, 0xc0+(r_BP<<3)+r_SP, - op_POP_REG+r_BP, - op_RETF - }; - - /* Trace information record */ - typedef struct trace_rec_s trace_rec; - struct trace_rec_s { - entry_code entry_code; - exit_code exit_code; - trace_rec *next; - char *name; - char *arg_format; - int retsize; - long count; - }; - - static trace_rec *trace_list = 0; - - /* Trace a named procedure */ - int - trace_name(name, mapf, arg_format, retsize) - char *name; - FILE *mapf; - char *arg_format; - int retsize; - { char *proc = trace_find_symbol(name, mapf); - if ( proc == (char *)NULL ) return -1; /* name not found */ - return trace((void (*)())proc, name, arg_format, retsize); - } - - /* Trace a procedure */ - int - trace(proc, name, arg_format, retsize) - void (*proc)(); - char *name; - char *arg_format; - int retsize; - { i_ptr pcode = (i_ptr)proc; - i_ptr pc = pcode; - i_ptr pt; - int len; - trace_entry_code *ptrace = (trace_entry_code *)pcode; - bp_ret *trace_print_arguments(); - long trace_print_result(); - trace_rec *rec = (trace_rec *)malloc(sizeof(trace_rec)); - if ( !rec ) return -1; - rec->entry_code = entry_template; - rec->exit_code = exit_template; - /* Compare the procedure's entry sequence against the */ - /* standard one. If they differ, we can't trace the procedure. */ - pt = (byte *)&rec->entry_code.finish; - if ( *pc == op_ENTER ) - pc += 4; - else if ( *pc == op_PUSH_REG+r_BP && pc[1] == op_MOV_MR && - pc[2] == 0xc0+(r_BP<<3)+r_SP ) - { pc += 3; - if ( *pc == op_SUB_IMM && pc[1] == op_SUB_IMMX_X+0xc0+r_SP ) - pc += 4; - else if ( *pc == op_SUB_IMM8 && pc[1] == op_SUB_IMMX_X+0xc0+r_SP ) - pc += 3; - } - if ( *pc == op_PUSH_REG+r_SI ) - { pc++; - if ( *pc == op_PUSH_REG+r_DI ) pc++; - } - if ( *pc == op_CMP_MR && pc[1] == (r_SP<<3)+6 && *(char _ds **)(pc + 2) == (char _ds *)&_stklen ) - pc += 4; - len = pc - pcode; - if ( len < sizeof(trace_entry_code) ) - { /* Not enough room for entry code */ - free((char *)rec); - return -1; - } - /* There is, unfortunately, no far version of memcpy. */ - movedata(FP_SEG(pcode), FP_OFF(pcode), FP_SEG(pt), FP_OFF(pt), len); - pt += len; - *pt++ = op_JMP_FAR; - *(byte **)pt = pc; - rec->next = trace_list; - rec->name = name; - rec->arg_format = arg_format; - rec->retsize = retsize; - rec->entry_code.rec_seg = FP_SEG(rec); - rec->entry_code.rec_off = FP_OFF(rec); - rec->entry_code.print_args = (i_ptr)trace_print_arguments; - rec->exit_code.rec_seg = FP_SEG(rec); - rec->exit_code.rec_off = FP_OFF(rec); - rec->exit_code.print_result = (i_ptr)trace_print_result; - rec->count = 0; - trace_list = rec; - /* Patch the procedure entry */ - *ptrace = trace_entry_template; - ptrace->entry = (i_ptr)&rec->entry_code; - return 0; - } - - /* Acquire the file to be used for tracing output. */ - static FILE * - outfile() - { return (trace_output_file == NULL ? stdout : trace_output_file); - } - - /* Flush the output file if appropriate. */ - static void - flushout() - { if ( trace_output_file == NULL || trace_output_file == stdout ) - fflush(stdout); - } - - /* The following routine gets called at the entry */ - /* to the traced procedure. It prints the arguments and returns. */ - bp_ret * - trace_print_arguments(rec, sp) - trace_rec *rec; - bp_ret _ss *sp; - { bp_ret saved_bp_ret = *sp; - byte *retcode = saved_bp_ret.ret; - byte *morecode = (byte *)&rec->exit_code.PUSH_BP; - char _ss *args = (char _ss *)(sp + 1); - int argsize = 0; - bp_ret _ss *above; - FILE *f = outfile(); - rec->count++; - /* Get the size of the arguments by looking at */ - /* the instructions after the return */ - if ( retcode[0] == op_ADD_IMM8 && retcode[1] == op_ADD_IMMX_X+0xc0+r_SP ) - argsize = retcode[2]; - else if ( retcode[0] == op_ADD_IMM && retcode[1] == op_ADD_IMMX_X+0xc0+r_SP ) - argsize = *(int *)(retcode + 2); - else if ( retcode[0] == op_INC_REG+r_SP && retcode[1] == op_INC_REG+r_SP ) - argsize = 2; - else if ( retcode[0] == op_POP_REG+r_CX ) - argsize = (retcode[1] == op_POP_REG+r_CX ? 4 : 2); - else if ( retcode[0] == op_MOV_MR && retcode[1] == 0xc0+(r_SP<<3)+r_BP ) - argsize = (char _ss *)saved_bp_ret.bp - args; - else - printf("Unknown calling sequence at %x:%x, abort\n", - FP_SEG(retcode), FP_OFF(retcode)), - exit(1); - fprintf(f, "%s called from %x:%x with ", - rec->name, FP_SEG(retcode), FP_OFF(retcode)); - if ( rec->arg_format == NULL ) - fprint_block((int *)args, argsize >> 1, f); - else - vfprintf(f, rec->arg_format, (va_list)args); - fputc('\n', f); - flushout(); - /* Push the arguments down, saving the return and BP above them. */ - /* Note that this smashes the arguments of trace_print_arguments. */ - memcpy((char *)(args - sizeof(bp_ret)), (char *)args, argsize); - args -= sizeof(bp_ret); - above = (bp_ret _ss *)(args + argsize); - *above = saved_bp_ret; - ((byte **)args)[-1] = morecode; - return above; - } - - /* Print and return the result */ - long - trace_print_result(rec, result, sp, bp) - trace_rec *rec; - long result; - int _ss *sp; - bp_ret _ss *bp; - { bp_ret temp_bp_ret; - FILE *f = outfile(); - fprintf(f, "%s returns", rec->name); - switch ( rec->retsize ) - { - case 0: break; - case 1: fprintf(f, " %x", (unsigned char)result); break; - case 2: fprintf(f, " %x", (unsigned short)result); break; - case 3: /* ??? */ - case 4: fprintf(f, " %lx", result); break; - default: - { /* We are returning a structure */ - fputs(" (struct)", f); - fprint_block((int *)result, rec->retsize >> 1, f); - } - } - fputc('\n', f); - flushout(); - /* Move the saved BP and return back down below the args. */ - /* We can smash the args at this point without concern. */ - /* However, since the source and destination may overlap, */ - /* and Turbo C isn't smart enough to handle this case, */ - /* we have to use an intermediate variable. */ - temp_bp_ret = *bp; - *(bp_ret *)(sp + 1) = temp_bp_ret; - return result; - } - - /* Procedure to print a block of words */ - static void - fprint_block(ptr, count, f) - int *ptr; - int count; - FILE *f; - { int i; - for ( i = 0; i < count; i++ ) - fprintf(f, "%5x", ptr[i]); - } --- 0 ---- diff -rc2N gs24/traceop.ps gs241/traceop.ps *** gs24/traceop.ps Sat Feb 8 03:03:04 1992 --- gs241/traceop.ps Thu Apr 9 19:45:24 1992 *************** *** 1,7 **** % Trace individual operators or procedures. ! % traceop prints vmem usage ! % prints arguments or runs proc before ! % ! % also prints results or runs proc after % If traceflush is true, flush the output after each printout. /traceflush true def --- 1,27 ---- + % Copyright (C) 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. + % Trace individual operators or procedures. ! % is or (dict defaults to userdict). ! % traceop prints vmem usage before; ! % prints arguments or runs proc before; ! % ! % also prints results or runs proc after. % If traceflush is true, flush the output after each printout. /traceflush true def *************** *** 24,35 **** /traceop { userdict begin ! dup type /nametype eq { { tracebefore } } if ! 1 index type /nametype eq { { traceafter } } if ! /.tpost exch def /.tpre exch def /.tname exch def ! .tname where not { .tname {} def userdict } if /.tdict exch def .tdict dup systemdict eq { pop userdict } if /.tddict exch def [ .tname /=only cvx ( ) /print cvx /.tpre load /traceprint cvx /traceend cvx ! .tname load dup xcheck { dup type dup /arraytype eq exch /packedarraytype eq or --- 44,58 ---- /traceop { userdict begin ! dup type dup /nametype eq exch /dicttype eq or { { tracebefore } } if ! 1 index type dup /nametype eq exch /dicttype eq or { { traceafter } } if ! /.tpost exch def /.tpre exch def ! dup type /dicttype ne ! { dup where not { userdict 1 index {} put userdict } if ! } if ! /.tdict exch def /.tname exch def .tdict dup systemdict eq { pop userdict } if /.tddict exch def [ .tname /=only cvx ( ) /print cvx /.tpre load /traceprint cvx /traceend cvx ! .tdict .tname get dup xcheck { dup type dup /arraytype eq exch /packedarraytype eq or diff -rc2N gs24/turboc.mak gs241/turboc.mak *** gs24/turboc.mak Fri Mar 20 11:11:48 1992 --- gs241/turboc.mak Sat Apr 18 15:39:58 1992 *************** *** 1,3 **** ! # Copyright (C) 1989, 1990, 1991 Aladdin Enterprises. All rights reserved. # Distributed by Free Software Foundation, Inc. # --- 1,3 ---- ! # Copyright (C) 1989, 1992 Aladdin Enterprises. All rights reserved. # Distributed by Free Software Foundation, Inc. # *************** *** 150,154 **** # we only include a limited set of device drivers. ! DEVICE_DEVS=vga.dev ega.dev epson.dev bj10e.dev deskjet.dev djet500.dev laserjet.dev ljet2p.dev ljet3.dev !include "gs.mak" !include "devs.mak" --- 150,154 ---- # we only include a limited set of device drivers. ! DEVICE_DEVS=vga.dev ega.dev epson.dev bj10e.dev !include "gs.mak" !include "devs.mak" *************** *** 189,198 **** gsecho -a $(LIBCTR) $(LIBDIR)\math$(MM) $(LIBDIR)\c$(MM) - # Tracing package - - # trace.c must be compiled without the -a switch! - trace.obj: trace.c - $(CC) $(CCFLAGS) -O -c trace.c - LIBDOS=$(LIB) obj.tr --- 189,192 ---- *************** *** 199,203 **** # Interpreter main program ! GS_ALL=gs.$(OBJ) $(INT) $(INTASM) gsmain.$(OBJ) trace.$(OBJ)\ $(LIBDOS) $(LIBCTR) obj.tr lib.tr --- 193,197 ---- # Interpreter main program ! GS_ALL=gs.$(OBJ) $(INT) $(INTASM) gsmain.$(OBJ)\ $(LIBDOS) $(LIBCTR) obj.tr lib.tr diff -rc2N gs24/uglyr.gsf gs241/uglyr.gsf *** gs24/uglyr.gsf Sun Mar 15 12:46:48 1992 --- gs241/uglyr.gsf Mon Apr 20 17:47:50 1992 *************** *** 2,7 **** % This is a font description converted from ugly10.bdf % by bdftops running on revision 240 of (a) Ghostscript. ! {} FontDirectory(Ugly) known ! {(Ugly) findfont dup /UniqueID known { dup /UniqueID get 4000000 eq exch /FontType get 1 eq and } { pop false } ifelse --- 2,7 ---- % This is a font description converted from ugly10.bdf % by bdftops running on revision 240 of (a) Ghostscript. ! {} FontDirectory /Ugly known ! {/Ugly findfont dup /UniqueID known { dup /UniqueID get 4000000 eq exch /FontType get 1 eq and } { pop false } ifelse *************** *** 11,15 **** /FontInfo 5 dict dup begin /UnderlineThickness 72 def ! /FullName(Ugly) def /UnderlinePosition -144 def /isFixedPitch true def --- 11,15 ---- /FontInfo 5 dict dup begin /UnderlineThickness 72 def ! /FullName /Ugly def /UnderlinePosition -144 def /isFixedPitch true def *************** *** 19,23 **** /FontMatrix[0.001 0 0 0.00131579 0 0] readonly def /UniqueID 4000000 def ! /FontName(Ugly) def /PaintType 0 def /FontBBox{0 -288 768 1056} readonly def --- 19,23 ---- /FontMatrix[0.001 0 0 0.00131579 0 0] readonly def /UniqueID 4000000 def ! /FontName /Ugly def /PaintType 0 def /FontBBox{0 -288 768 1056} readonly def diff -rc2N gs24/unix-ansi.mak gs241/unix-ansi.mak *** gs24/unix-ansi.mak Thu Mar 26 00:53:26 1992 --- gs241/unix-ansi.mak Tue Apr 21 15:24:48 1992 *************** *** 180,184 **** CCFLAGS=$(GENOPT) $(CFLAGS) ! .c.o: $(CCC) $*.c --- 180,184 ---- CCFLAGS=$(GENOPT) $(CFLAGS) ! .c.o: $(AK) $(CCC) $*.c *************** *** 213,216 **** --- 213,219 ---- # DEVICE_DEVS - the devices to include in the executable. # See devs.mak for details. + # DEVICE_DEVS2...DEVICE_DEVS5 - additional devices, if the definition of + # DEVICE_DEVS doesn't fit on one line. + # See devs.mak for details. # FEATURE_DEVS - the optional features to include in the # executable. Current features are: *************** *** 246,249 **** --- 249,254 ---- # AK - if source files must be converted from ANSI to K&R syntax, # this is ansi2knr$(XE); if not, it is null. + # 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. *************** *** 344,347 **** --- 349,353 ---- gxfont_h=gxfont.h $(gsfont_h) gximage_h=gximage.h + gxlum_h=gxlum.h gxmatrix_h=gxmatrix.h $(gsmatrix_h) gxop1_h=gxop1.h *************** *** 370,374 **** gxcolor.$(OBJ): gxcolor.c $(GXERR) \ ! $(gxfixed_h) $(gxmatrix_h) $(gxdevice_h) $(gzcolor_h) $(gzht_h) $(gzstate_h) gxcpath.$(OBJ): gxcpath.c $(GXERR) \ --- 376,380 ---- gxcolor.$(OBJ): gxcolor.c $(GXERR) \ ! $(gxfixed_h) $(gxmatrix_h) $(gxdevice_h) $(gxlum_h) $(gzcolor_h) $(gzht_h) $(gzstate_h) gxcpath.$(OBJ): gxcpath.c $(GXERR) \ *************** *** 376,380 **** gxdither.$(OBJ): gxdither.c $(GX) \ ! $(gxfixed_h) $(gxmatrix_h) $(gzstate_h) $(gzdevice_h) $(gzcolor_h) $(gzht_h) gxdraw.$(OBJ): gxdraw.c $(GX) \ --- 382,386 ---- gxdither.$(OBJ): gxdither.c $(GX) \ ! $(gxfixed_h) $(gxlum_h) $(gxmatrix_h) $(gzstate_h) $(gzdevice_h) $(gzcolor_h) $(gzht_h) gxdraw.$(OBJ): gxdraw.c $(GX) \ *************** *** 460,468 **** $(gs_h) $(gxdevice_h) $(gxdevmem_h) $(gdevmem_h) ###### Files dependent on the installed devices, features, and platform. ###### Generating gconfig.h also generates obj*.tr and lib.tr. ! gconfig.h gconfig.ps obj.tr lib.tr: devs.mak $(MAKEFILE) $(UNIQ) $(DEVICE_DEVS) $(FEATURE_DEVS) $(PLATFORM).dev $(SHP)gsconfig $(DEVICE_DEVS) + $(SHP)gsconfig + $(FEATURE_DEVS) $(PLATFORM).dev --- 466,483 ---- $(gs_h) $(gxdevice_h) $(gxdevmem_h) $(gdevmem_h) + gdevmem3.$(OBJ): gdevmem3.c $(AK) \ + $(gs_h) $(gxdevice_h) $(gxdevmem_h) $(gdevmem_h) + ###### Files dependent on the installed devices, features, and platform. ###### Generating gconfig.h also generates obj*.tr and lib.tr. ! gconfig.h obj.tr objw.tr lib.tr: devs.mak $(MAKEFILE) $(UNIQ) \ ! $(DEVICE_DEVS) $(DEVICE_DEVS2) $(DEVICE_DEVS3) $(DEVICE_DEVS4) $(DEVICE_DEVS5)\ ! $(FEATURE_DEVS) $(PLATFORM).dev $(SHP)gsconfig $(DEVICE_DEVS) + + $(SHP)gsconfig + $(DEVICE_DEVS2) + + $(SHP)gsconfig + $(DEVICE_DEVS3) + + $(SHP)gsconfig + $(DEVICE_DEVS4) + + $(SHP)gsconfig + $(DEVICE_DEVS5) + $(SHP)gsconfig + $(FEATURE_DEVS) $(PLATFORM).dev *************** *** 482,486 **** gxdither.$(OBJ) gxdraw.$(OBJ) gxfill.$(OBJ) \ gxht.$(OBJ) gxpath.$(OBJ) gxpath2.$(OBJ) gxstroke.$(OBJ) \ ! gdevmem1.$(OBJ) gdevmem2.$(OBJ) gconfig.$(OBJ) # ------------------------------ Interpreter ------------------------------ # --- 497,501 ---- gxdither.$(OBJ) gxdraw.$(OBJ) gxfill.$(OBJ) \ gxht.$(OBJ) gxpath.$(OBJ) gxpath2.$(OBJ) gxstroke.$(OBJ) \ ! gdevmem1.$(OBJ) gdevmem2.$(OBJ) gdevmem3.$(OBJ) gconfig.$(OBJ) # ------------------------------ Interpreter ------------------------------ # *************** *** 492,495 **** --- 507,511 ---- ccfont_h=ccfont.h dict_h=dict.h + dstack_h=dstack.h errors_h=errors.h estack_h=estack.h *************** *** 518,521 **** --- 534,538 ---- comp1_h=comp1.h $(ghost_h) $(oper_h) $(gserrors_h) $(gxfixed_h) $(gxop1_h) + gdevpccm_h=gdevpccm.h gdevpcl_h=gdevpcl.h gdevprn_h=gdevprn.h $(memory__h) $(string__h) $(gs_h) \ *************** *** 530,534 **** iccfont.$(OBJ): iccfont.c $(GH) \ ! $(ghost_h) $(alloc_h) $(ccfont_h) $(dict_h) $(errors_h) $(name_h) $(save_h) $(store_h) idebug.$(OBJ): idebug.c $(GH) \ --- 547,551 ---- iccfont.$(OBJ): iccfont.c $(GH) \ ! $(ghost_h) $(alloc_h) $(ccfont_h) $(dict_h) $(dstack_h) $(errors_h) $(name_h) $(save_h) $(store_h) idebug.$(OBJ): idebug.c $(GH) \ *************** *** 535,541 **** $(iutil_h) $(dict_h) $(name_h) $(ostack_h) $(opdef_h) $(packed_h) $(store_h) ! idict.$(OBJ): idict.c $(GH) $(alloc_h) $(errors_h) $(name_h) $(packed_h) $(save_h) $(store_h) $(iutil_h) $(dict_h) ! iinit.$(OBJ): iinit.c $(GH) gconfig.h $(alloc_h) $(dict_h) $(errors_h) $(name_h) $(oper_h) $(store_h) iname.$(OBJ): iname.c $(GH) $(alloc_h) $(errors_h) $(name_h) $(store_h) --- 552,558 ---- $(iutil_h) $(dict_h) $(name_h) $(ostack_h) $(opdef_h) $(packed_h) $(store_h) ! idict.$(OBJ): idict.c $(GH) $(alloc_h) $(errors_h) $(name_h) $(packed_h) $(save_h) $(store_h) $(iutil_h) $(dict_h) $(dstack_h) ! iinit.$(OBJ): iinit.c $(GH) gconfig.h $(alloc_h) $(dict_h) $(dstack_h) $(errors_h) $(name_h) $(oper_h) $(store_h) iname.$(OBJ): iname.c $(GH) $(alloc_h) $(errors_h) $(name_h) $(store_h) *************** *** 543,547 **** isave.$(OBJ): isave.c $(GH) $(alloc_h) $(astate_h) $(name_h) $(packed_h) $(save_h) $(store_h) ! iscan.$(OBJ): iscan.c $(GH) $(alloc_h) $(dict_h) $(errors_h) $(iutil_h) \ $(name_h) $(ostack_h) $(packed_h) $(store_h) $(stream_h) $(scanchar_h) --- 560,564 ---- isave.$(OBJ): isave.c $(GH) $(alloc_h) $(astate_h) $(name_h) $(packed_h) $(save_h) $(store_h) ! iscan.$(OBJ): iscan.c $(GH) $(alloc_h) $(dict_h) $(dstack_h) $(errors_h) $(iutil_h) \ $(name_h) $(ostack_h) $(packed_h) $(store_h) $(stream_h) $(scanchar_h) *************** *** 567,571 **** zcontrol.$(OBJ): zcontrol.c $(OP) $(estack_h) $(iutil_h) $(store_h) ! zdict.$(OBJ): zdict.c $(OP) $(dict_h) $(store_h) zfile.$(OBJ): zfile.c $(OP) $(gp_h) \ --- 584,588 ---- zcontrol.$(OBJ): zcontrol.c $(OP) $(estack_h) $(iutil_h) $(store_h) ! zdict.$(OBJ): zdict.c $(OP) $(dict_h) $(dstack_h) $(store_h) zfile.$(OBJ): zfile.c $(OP) $(gp_h) \ *************** *** 582,586 **** zmath.$(OBJ): zmath.c $(OP) $(store_h) ! zmisc.$(OBJ): zmisc.c $(OP) $(gp_h) $(alloc_h) $(dict_h) $(name_h) $(packed_h) $(store_h) \ $(gstype1_h) $(gxfixed_h) --- 599,604 ---- zmath.$(OBJ): zmath.c $(OP) $(store_h) ! zmisc.$(OBJ): zmisc.c $(OP) $(gp_h) \ ! $(alloc_h) $(dict_h) $(dstack_h) $(name_h) $(packed_h) $(store_h) \ $(gstype1_h) $(gxfixed_h) *************** *** 600,604 **** ztype.$(OBJ): ztype.c $(OP) $(dict_h) $(iutil_h) $(name_h) $(stream_h) $(store_h) ! zvmem.$(OBJ): zvmem.c $(OP) $(alloc_h) $(dict_h) $(estack_h) $(save_h) $(state_h) $(store_h) \ $(gsmatrix_h) $(gsstate_h) --- 618,622 ---- ztype.$(OBJ): ztype.c $(OP) $(dict_h) $(iutil_h) $(name_h) $(stream_h) $(store_h) ! zvmem.$(OBJ): zvmem.c $(OP) $(alloc_h) $(dict_h) $(dstack_h) $(estack_h) $(save_h) $(state_h) $(store_h) \ $(gsmatrix_h) $(gsstate_h) *************** *** 605,609 **** ###### Graphics operators ! zchar.$(OBJ): zchar.c $(OP) $(gxmatrix_h) $(gschar_h) $(gstype1_h) $(gxdevice_h) $(gxfixed_h) $(gxfont_h) $(gzpath_h) $(gzstate_h) $(alloc_h) $(dict_h) $(font_h) $(estack_h) $(state_h) $(store_h) zcolor.$(OBJ): zcolor.c $(OP) $(alloc_h) $(estack_h) $(gxfixed_h) $(gxmatrix_h) $(gzstate_h) $(gxdevice_h) $(gzcolor_h) $(iutil_h) $(state_h) $(store_h) --- 623,627 ---- ###### Graphics operators ! zchar.$(OBJ): zchar.c $(OP) $(gxmatrix_h) $(gschar_h) $(gstype1_h) $(gxdevice_h) $(gxfixed_h) $(gxfont_h) $(gzpath_h) $(gzstate_h) $(alloc_h) $(dict_h) $(dstack_h) $(font_h) $(estack_h) $(state_h) $(store_h) zcolor.$(OBJ): zcolor.c $(OP) $(alloc_h) $(estack_h) $(gxfixed_h) $(gxmatrix_h) $(gzstate_h) $(gxdevice_h) $(gzcolor_h) $(iutil_h) $(state_h) $(store_h) *************** *** 660,664 **** ibnum.$(OBJ): ibnum.c $(GH) $(errors_h) $(stream_h) $(bnum_h) $(btoken_h) ! ibscan.$(OBJ): ibscan.c $(GH) $(errors_h) $(alloc_h) $(dict_h) $(iutil_h) $(name_h) $(ostack_h) $(save_h) $(store_h) $(stream_h) $(bseq_h) $(btoken_h) $(bnum_h) zbseq.$(OBJ): zbseq.c $(OP) $(save_h) $(store_h) $(stream_h) $(file_h) $(name_h) $(bnum_h) $(btoken_h) $(bseq_h) --- 678,683 ---- ibnum.$(OBJ): ibnum.c $(GH) $(errors_h) $(stream_h) $(bnum_h) $(btoken_h) ! ibscan.$(OBJ): ibscan.c $(GH) $(errors_h) \ ! $(alloc_h) $(dict_h) $(dstack_h) $(iutil_h) $(name_h) $(ostack_h) $(save_h) $(store_h) $(stream_h) $(bseq_h) $(btoken_h) $(bnum_h) zbseq.$(OBJ): zbseq.c $(OP) $(save_h) $(store_h) $(stream_h) $(file_h) $(name_h) $(bnum_h) $(btoken_h) $(bseq_h) *************** *** 668,672 **** zupath.$(OBJ): zupath.c $(OP) \ ! $(dict_h) $(iutil_h) $(state_h) $(store_h) $(stream_h) $(bnum_h) \ $(gscoord_h) $(gsmatrix_h) $(gspaint_h) $(gspath_h) $(gsstate_h) \ $(gxfixed_h) $(gxdevice_h) $(gxpath_h) --- 687,691 ---- zupath.$(OBJ): zupath.c $(OP) \ ! $(dict_h) $(dstack_h) $(iutil_h) $(state_h) $(store_h) $(stream_h) $(bnum_h) \ $(gscoord_h) $(gsmatrix_h) $(gspaint_h) $(gspath_h) $(gsstate_h) \ $(gxfixed_h) $(gxdevice_h) $(gxpath_h) *************** *** 741,745 **** $(SHP)gssetmod ccfonts $(ccfonts_) iccfont.$(OBJ) $(SHP)gsaddmod ccfonts -oper font_Ugly font_Courier - $(SHP)gsaddmod ccfonts -ps gs_ccfnt ugly.$(OBJ): ugly.c $(CCFONT) --- 760,763 ---- *************** *** 747,750 **** --- 765,772 ---- cour.$(OBJ): cour.c $(CCFONT) + psyr.$(OBJ): psyr.c $(CCFONT) + + pzdr.$(OBJ): pzdr.c $(CCFONT) + # ----------------------------- Main program ------------------------------ # *************** *** 757,761 **** interp.$(OBJ): interp.c $(GH) \ ! $(errors_h) $(estack_h) $(name_h) $(dict_h) $(oper_h) $(ostack_h) $(packed_h) $(save_h) $(store_h) $(stream_h) $(CCINT) interp.c --- 779,783 ---- interp.$(OBJ): interp.c $(GH) \ ! $(errors_h) $(estack_h) $(name_h) $(dict_h) $(dstack_h) $(oper_h) $(ostack_h) $(packed_h) $(save_h) $(store_h) $(stream_h) $(CCINT) interp.c *************** *** 793,804 **** # vga VGA (640x480, 16-color) # MS-DOS SuperVGA: ! # ****** NOTE: these devices do not work with the Watcom (32-bit MS-DOS) ! # ****** compiler or executable. ! # + atiw ATI Wonder SuperVGA # * mdb10 EIZO MDB-10 (1024 x 768) ! # tseng SuperVGA using Tseng Labs ET3000/4000 chips # tseng16 Tseng Labs SuperVGA in 800x600, 16-color mode (256K memory) # + tvga16 Trident SuperVGA in 800x600, 16-color mode (256K memory) ! # vesa SuperVGA with VESA standard API # MS-DOS other: # bgi Borland Graphics Interface (CGA and Hercules) --- 815,826 ---- # vga VGA (640x480, 16-color) # MS-DOS SuperVGA: ! # + atiw ATI Wonder SuperVGA, 256-color modes # * mdb10 EIZO MDB-10 (1024 x 768) ! # tseng SuperVGA using Tseng Labs ET3000/4000 chips, 256-color modes # tseng16 Tseng Labs SuperVGA in 800x600, 16-color mode (256K memory) # + tvga16 Trident SuperVGA in 800x600, 16-color mode (256K memory) ! # ****** NOTE: the vesa device does not work with the Watcom (32-bit MS-DOS) ! # ****** compiler or executable. ! # vesa SuperVGA with VESA standard API driver # MS-DOS other: # bgi Borland Graphics Interface (CGA and Hercules) *************** *** 830,833 **** --- 852,866 ---- # File formats and others: # bit A "bit bucket" device for time benchmarking + # gifmono Monochrome GIF file format + # gif8 8-bit color GIF file format + # pcxmono Monochrome PCX file format + # pcx16 Older color PCX file format (EGA/VGA, 16-color) + # pcx256 Newer color PCX file format (256-color) + # pbm Portable Bitmap (plain format) + # pbmraw Portable Bitmap (raw format) + # pgm Portable Graymap (plain format) + # pgmraw Portable Graymap (raw format) + # ppm Portable Pixmap (plain format) + # ppmraw Portable Pixmap (raw format) # User-contributed drivers marked with * require hardware or software *************** *** 843,855 **** # in alphabetical order. ! # Each platform-specific makefile must contain a line of the form # DEVICE_DEVS=.dev ... .dev # where dev1 ... devn are the devices to be included in the build. ! # dev1 will be used as the default device. ! # On MS-DOS platforms, this line must appear before the lines ! # (!)include gs.mak ! # (!)include devs.mak ! # in the makefile; on Unix systems, the device definition line ! # may appear anywhere in the makefile. # ---------------------------- End of catalog ---------------------------- # --- 876,891 ---- # in alphabetical order. ! # Each platform-specific makefile contains a line of the form # DEVICE_DEVS=.dev ... .dev # where dev1 ... devn are the devices to be included in the build. ! # You may edit this line to select any desired set of devices. ! # dev1 will be used as the default device (unless overridden from ! # the command line with -sDEVICE=xxx, of course.) If you can't fit all the ! # devices on a single line, you may add lines defining ! # DEVICE_DEVS2=.dev ... .dev ! # DEVICE_DEVS3=.dev ... .dev ! # etc. up to DEVICE_DEVS5. ! # Don't use continuation lines, since this may break the MS-DOS command ! # processor. # ---------------------------- End of catalog ---------------------------- # *************** *** 870,874 **** gdevegaa.$(OBJ): gdevegaa.asm ! ETEST=ega.$(OBJ) trace.$(OBJ) $(ega_) ega.exe: $(ETEST) libc$(MM).tr tlink /m /l $(LIBDIR)\c0$(MM) @ega.tr @libc$(MM).tr --- 906,910 ---- gdevegaa.$(OBJ): gdevegaa.asm ! ETEST=ega.$(OBJ) $(ega_) ega.exe: $(ETEST) libc$(MM).tr tlink /m /l $(LIBDIR)\c0$(MM) @ega.tr @libc$(MM).tr *************** *** 1099,1103 **** ###### ------------------------ Sony devices ------------------------ ###### ### Note: these drivers were contributed by users: please contact ### ! ### Mike Smolenski (mike@srava.sra.co.jp) if you have questions. ### ### ------------------- Sony NeWS frame buffer device ------------------ ### --- 1135,1139 ---- ###### ------------------------ Sony devices ------------------------ ###### ### Note: these drivers were contributed by users: please contact ### ! ### Mike Smolenski (mike@intertech.com) if you have questions. ### ### ------------------- Sony NeWS frame buffer device ------------------ ### *************** *** 1118,1121 **** --- 1154,1159 ---- ###### --------------------- The SunView device --------------------- ###### + ### Note: this driver is maintained by a user: if you have questions, ### + ### please contact Andreas Stolcke (stolcke@icsi.berkeley.edu). ### sunview_=gdevsun.$(OBJ) *************** *** 1127,1132 **** ### ----------------- The TruFax facsimile device ---------------------- ### ! ### Note: this driver was contributed by users: ### ! ### please contact nao@maestro.bellcore.com if you have questions. ### ### Note that the driver requires a file encode_l.o supplied by the ### ### makers of the TruFax product. ### --- 1165,1170 ---- ### ----------------- The TruFax facsimile device ---------------------- ### ! ### Note: this driver was contributed by users: please contact ### ! ### Neil Ostroff (nao@maestro.bellcore.com) if you have questions. ### ### Note that the driver requires a file encode_l.o supplied by the ### ### makers of the TruFax product. ### *************** *** 1140,1151 **** ###### ----------------------- The X11 device ----------------------- ###### - # Note that this includes some extra libraries to support Ghostview. - # Xt and Xext are included because on SunOS, some routine in Xmu calls - # XtMalloc, and something in Xt calls something in Xext, and Sun's - # dynamic library scheme requires pulling in all 3 libraries. - # On other operating systems, only Xmu is needed. - # Aladdin Enterprises does not support Ghostview. For more information ! # about Ghostview, contact Tim Theisen (ghostview@cs.wisc.edu). x11_=gdevx.$(OBJ) gdevxini.$(OBJ) --- 1178,1183 ---- ###### ----------------------- The X11 device ----------------------- ###### # Aladdin Enterprises does not support Ghostview. For more information ! # about Ghostview, please contact Tim Theisen (ghostview@cs.wisc.edu). x11_=gdevx.$(OBJ) gdevxini.$(OBJ) *************** *** 1152,1156 **** x11.dev: $(x11_) $(SHP)gssetdev x11 $(x11_) ! $(SHP)gsaddmod x11 -lib Xmu Xt Xext X11 # See the main makefile for the definition of XINCLUDE. --- 1184,1188 ---- x11.dev: $(x11_) $(SHP)gssetdev x11 $(x11_) ! $(SHP)gsaddmod x11 -lib X11 # See the main makefile for the definition of XINCLUDE. *************** *** 1169,1172 **** --- 1201,1266 ---- gdevbit.$(OBJ): gdevbit.c $(PDEVH) + + ###### ----------------------- PC file formats ---------------------- ###### + + gdevpccm.$(OBJ): gdevpccm.c $(gs_h) $(gsmatrix_h) $(gxdevice_h) $(gdevpccm_h) + + ### ------------------------- GIF file formats ------------------------- ### + + GIF=gdevgif.$(OBJ) gdevpccm.$(OBJ) gdevprn.$(OBJ) + + gdevgif.$(OBJ): gdevgif.c $(PDEVH) $(gdevpccm_h) + + gifmono.dev: $(GIF) + $(SHP)gssetdev gifmono $(GIF) + + gif8.dev: $(GIF) + $(SHP)gssetdev gif8 $(GIF) + + ### ------------------------- PCX file formats ------------------------- ### + + PCX=gdevpcx.$(OBJ) gdevpccm.$(OBJ) gdevprn.$(OBJ) + + gdevpcx.$(OBJ): gdevpcx.c $(PDEVH) $(gdevpccm_h) + + pcxmono.dev: $(PCX) + $(SHP)gssetdev pcxmono $(PCX) + + pcx16.dev: $(PCX) + $(SHP)gssetdev pcx16 $(PCX) + + pcx256.dev: $(PCX) + $(SHP)gssetdev pcx256 $(PCX) + + ###### ------------------- Portable Bitmap devices ------------------ ###### + ### For more information, see the pbm(5), pgm(5), and ppm(5) man pages. ### + + PXM=gdevpbm.$(OBJ) gdevprn.$(OBJ) + + gdevpbm.$(OBJ): gdevpbm.c $(PDEVH) $(gxlum_h) + + ### Portable Bitmap (PBM, plain or raw format, magic numbers "P1" or "P4") + + pbm.dev: $(PXM) + $(SHP)gssetdev pbm $(PXM) + + pbmraw.dev: $(PXM) + $(SHP)gssetdev pbmraw $(PXM) + + ### Portable Graymap (PGM, plain or raw format, magic numbers "P2" or "P5") + + pgm.dev: $(PXM) + $(SHP)gssetdev pgm $(PXM) + + pgmraw.dev: $(PXM) + $(SHP)gssetdev pgmraw $(PXM) + + ### Portable Pixmap (PPM, plain or raw format, magic numbers "P3" or "P6") + + ppm.dev: $(PXM) + $(SHP)gssetdev ppm $(PXM) + + ppmraw.dev: $(PXM) + $(SHP)gssetdev ppmraw $(PXM) # Copyright (C) 1990, 1992 Aladdin Enterprises. All rights reserved. # Distributed by Free Software Foundation, Inc. *************** *** 1214,1231 **** ansi2knr$(XE): ! $(CC) -o ansi2knr$(XE) $(CFLAGS) ansi2knr.c $(EXTRALIBS) genarch$(XE): genarch.c ! $(CC) -o genarch$(XE) $(CFLAGS) genarch.c $(EXTRALIBS) # ----------------------------- Main program ------------------------------ # - # (Dummy) tracing package - - utrace.$(OBJ): utrace.c - # Main program ! ALLUNIX=gsmain.$(OBJ) utrace.$(OBJ) $(LIB) # Interpreter main program --- 1308,1323 ---- ansi2knr$(XE): ! $(CC) -o ansi2knr$(XE) $(CFLAGS) ansi2knr.c + # On the RS/6000 (at least), compiling genarch.c with gcc with -O + # produces a buggy executable. genarch$(XE): genarch.c ! $(CC) -o genarch$(XE) genarch.c # ----------------------------- Main program ------------------------------ # # Main program ! ALLUNIX=gsmain.$(OBJ) $(LIB) # Interpreter main program *************** *** 1255,1259 **** $(INSTALL_DATA) gs_init.ps $(libdir) $(INSTALL_DATA) gs_2asc.ps $(libdir) - $(INSTALL_DATA) gs_ccfnt.ps $(libdir) $(INSTALL_DATA) gs_dps1.ps $(libdir) $(INSTALL_DATA) gs_fonts.ps $(libdir) --- 1347,1350 ---- *************** *** 1261,1265 **** $(INSTALL_DATA) gs_statd.ps $(libdir) $(INSTALL_DATA) sym__enc.ps $(libdir) - $(INSTALL_DATA) gconfig.ps $(libdir) $(INSTALL_DATA) quit.ps $(libdir) $(INSTALL_DATA) Fontmap $(libdir) --- 1352,1355 ---- *************** *** 1275,1276 **** --- 1365,1367 ---- $(INSTALL_DATA) pstoppm.ps $(libdir) $(INSTALL_DATA) prfont.ps $(libdir) + $(INSTALL_DATA) showpbm.ps $(libdir) diff -rc2N gs24/unix-cc.mak gs241/unix-cc.mak *** gs24/unix-cc.mak Thu Mar 26 00:53:27 1992 --- gs241/unix-cc.mak Tue Apr 21 15:24:49 1992 *************** *** 55,59 **** # Add -DBSD4_2 for 4.2bsd systems. # Add -DSYSV for System V. ! # Add -DSYSV -D__SVR3 for ISC Unix 2.2. # Add -DSVR4 (not -DSYSV) for System V release 4. # XCFLAGS can be set from the command line. --- 55,60 ---- # Add -DBSD4_2 for 4.2bsd systems. # Add -DSYSV for System V. ! # Add -DSYSV -D__SVR3 for SCO ODT, ISC Unix 2.2 or before, ! # or any System III Unix, or System V release 3-or-older Unix. # Add -DSVR4 (not -DSYSV) for System V release 4. # XCFLAGS can be set from the command line. *************** *** 118,122 **** # Define the compilation rules and flags. ! CCC=./ccgs "$(CC) $(CCFLAGS)" _temp_.c # --------------------------- Generic makefile ---------------------------- # --- 119,123 ---- # Define the compilation rules and flags. ! CCC=./ccgs "$(CC) $(CCFLAGS)" # --------------------------- Generic makefile ---------------------------- # *************** *** 175,179 **** CCFLAGS=$(GENOPT) $(CFLAGS) ! .c.o: $(CCC) $*.c --- 176,180 ---- CCFLAGS=$(GENOPT) $(CFLAGS) ! .c.o: $(AK) $(CCC) $*.c *************** *** 208,211 **** --- 209,215 ---- # DEVICE_DEVS - the devices to include in the executable. # See devs.mak for details. + # DEVICE_DEVS2...DEVICE_DEVS5 - additional devices, if the definition of + # DEVICE_DEVS doesn't fit on one line. + # See devs.mak for details. # FEATURE_DEVS - the optional features to include in the # executable. Current features are: *************** *** 241,244 **** --- 245,250 ---- # AK - if source files must be converted from ANSI to K&R syntax, # this is ansi2knr$(XE); if not, it is null. + # 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. *************** *** 339,342 **** --- 345,349 ---- gxfont_h=gxfont.h $(gsfont_h) gximage_h=gximage.h + gxlum_h=gxlum.h gxmatrix_h=gxmatrix.h $(gsmatrix_h) gxop1_h=gxop1.h *************** *** 365,369 **** gxcolor.$(OBJ): gxcolor.c $(GXERR) \ ! $(gxfixed_h) $(gxmatrix_h) $(gxdevice_h) $(gzcolor_h) $(gzht_h) $(gzstate_h) gxcpath.$(OBJ): gxcpath.c $(GXERR) \ --- 372,376 ---- gxcolor.$(OBJ): gxcolor.c $(GXERR) \ ! $(gxfixed_h) $(gxmatrix_h) $(gxdevice_h) $(gxlum_h) $(gzcolor_h) $(gzht_h) $(gzstate_h) gxcpath.$(OBJ): gxcpath.c $(GXERR) \ *************** *** 371,375 **** gxdither.$(OBJ): gxdither.c $(GX) \ ! $(gxfixed_h) $(gxmatrix_h) $(gzstate_h) $(gzdevice_h) $(gzcolor_h) $(gzht_h) gxdraw.$(OBJ): gxdraw.c $(GX) \ --- 378,382 ---- gxdither.$(OBJ): gxdither.c $(GX) \ ! $(gxfixed_h) $(gxlum_h) $(gxmatrix_h) $(gzstate_h) $(gzdevice_h) $(gzcolor_h) $(gzht_h) gxdraw.$(OBJ): gxdraw.c $(GX) \ *************** *** 455,463 **** $(gs_h) $(gxdevice_h) $(gxdevmem_h) $(gdevmem_h) ###### Files dependent on the installed devices, features, and platform. ###### Generating gconfig.h also generates obj*.tr and lib.tr. ! gconfig.h gconfig.ps obj.tr lib.tr: devs.mak $(MAKEFILE) $(UNIQ) $(DEVICE_DEVS) $(FEATURE_DEVS) $(PLATFORM).dev $(SHP)gsconfig $(DEVICE_DEVS) + $(SHP)gsconfig + $(FEATURE_DEVS) $(PLATFORM).dev --- 462,479 ---- $(gs_h) $(gxdevice_h) $(gxdevmem_h) $(gdevmem_h) + gdevmem3.$(OBJ): gdevmem3.c $(AK) \ + $(gs_h) $(gxdevice_h) $(gxdevmem_h) $(gdevmem_h) + ###### Files dependent on the installed devices, features, and platform. ###### Generating gconfig.h also generates obj*.tr and lib.tr. ! gconfig.h obj.tr objw.tr lib.tr: devs.mak $(MAKEFILE) $(UNIQ) \ ! $(DEVICE_DEVS) $(DEVICE_DEVS2) $(DEVICE_DEVS3) $(DEVICE_DEVS4) $(DEVICE_DEVS5)\ ! $(FEATURE_DEVS) $(PLATFORM).dev $(SHP)gsconfig $(DEVICE_DEVS) + + $(SHP)gsconfig + $(DEVICE_DEVS2) + + $(SHP)gsconfig + $(DEVICE_DEVS3) + + $(SHP)gsconfig + $(DEVICE_DEVS4) + + $(SHP)gsconfig + $(DEVICE_DEVS5) + $(SHP)gsconfig + $(FEATURE_DEVS) $(PLATFORM).dev *************** *** 477,481 **** gxdither.$(OBJ) gxdraw.$(OBJ) gxfill.$(OBJ) \ gxht.$(OBJ) gxpath.$(OBJ) gxpath2.$(OBJ) gxstroke.$(OBJ) \ ! gdevmem1.$(OBJ) gdevmem2.$(OBJ) gconfig.$(OBJ) # ------------------------------ Interpreter ------------------------------ # --- 493,497 ---- gxdither.$(OBJ) gxdraw.$(OBJ) gxfill.$(OBJ) \ gxht.$(OBJ) gxpath.$(OBJ) gxpath2.$(OBJ) gxstroke.$(OBJ) \ ! gdevmem1.$(OBJ) gdevmem2.$(OBJ) gdevmem3.$(OBJ) gconfig.$(OBJ) # ------------------------------ Interpreter ------------------------------ # *************** *** 487,490 **** --- 503,507 ---- ccfont_h=ccfont.h dict_h=dict.h + dstack_h=dstack.h errors_h=errors.h estack_h=estack.h *************** *** 513,516 **** --- 530,534 ---- comp1_h=comp1.h $(ghost_h) $(oper_h) $(gserrors_h) $(gxfixed_h) $(gxop1_h) + gdevpccm_h=gdevpccm.h gdevpcl_h=gdevpcl.h gdevprn_h=gdevprn.h $(memory__h) $(string__h) $(gs_h) \ *************** *** 525,529 **** iccfont.$(OBJ): iccfont.c $(GH) \ ! $(ghost_h) $(alloc_h) $(ccfont_h) $(dict_h) $(errors_h) $(name_h) $(save_h) $(store_h) idebug.$(OBJ): idebug.c $(GH) \ --- 543,547 ---- iccfont.$(OBJ): iccfont.c $(GH) \ ! $(ghost_h) $(alloc_h) $(ccfont_h) $(dict_h) $(dstack_h) $(errors_h) $(name_h) $(save_h) $(store_h) idebug.$(OBJ): idebug.c $(GH) \ *************** *** 530,536 **** $(iutil_h) $(dict_h) $(name_h) $(ostack_h) $(opdef_h) $(packed_h) $(store_h) ! idict.$(OBJ): idict.c $(GH) $(alloc_h) $(errors_h) $(name_h) $(packed_h) $(save_h) $(store_h) $(iutil_h) $(dict_h) ! iinit.$(OBJ): iinit.c $(GH) gconfig.h $(alloc_h) $(dict_h) $(errors_h) $(name_h) $(oper_h) $(store_h) iname.$(OBJ): iname.c $(GH) $(alloc_h) $(errors_h) $(name_h) $(store_h) --- 548,554 ---- $(iutil_h) $(dict_h) $(name_h) $(ostack_h) $(opdef_h) $(packed_h) $(store_h) ! idict.$(OBJ): idict.c $(GH) $(alloc_h) $(errors_h) $(name_h) $(packed_h) $(save_h) $(store_h) $(iutil_h) $(dict_h) $(dstack_h) ! iinit.$(OBJ): iinit.c $(GH) gconfig.h $(alloc_h) $(dict_h) $(dstack_h) $(errors_h) $(name_h) $(oper_h) $(store_h) iname.$(OBJ): iname.c $(GH) $(alloc_h) $(errors_h) $(name_h) $(store_h) *************** *** 538,542 **** isave.$(OBJ): isave.c $(GH) $(alloc_h) $(astate_h) $(name_h) $(packed_h) $(save_h) $(store_h) ! iscan.$(OBJ): iscan.c $(GH) $(alloc_h) $(dict_h) $(errors_h) $(iutil_h) \ $(name_h) $(ostack_h) $(packed_h) $(store_h) $(stream_h) $(scanchar_h) --- 556,560 ---- isave.$(OBJ): isave.c $(GH) $(alloc_h) $(astate_h) $(name_h) $(packed_h) $(save_h) $(store_h) ! iscan.$(OBJ): iscan.c $(GH) $(alloc_h) $(dict_h) $(dstack_h) $(errors_h) $(iutil_h) \ $(name_h) $(ostack_h) $(packed_h) $(store_h) $(stream_h) $(scanchar_h) *************** *** 562,566 **** zcontrol.$(OBJ): zcontrol.c $(OP) $(estack_h) $(iutil_h) $(store_h) ! zdict.$(OBJ): zdict.c $(OP) $(dict_h) $(store_h) zfile.$(OBJ): zfile.c $(OP) $(gp_h) \ --- 580,584 ---- zcontrol.$(OBJ): zcontrol.c $(OP) $(estack_h) $(iutil_h) $(store_h) ! zdict.$(OBJ): zdict.c $(OP) $(dict_h) $(dstack_h) $(store_h) zfile.$(OBJ): zfile.c $(OP) $(gp_h) \ *************** *** 577,581 **** zmath.$(OBJ): zmath.c $(OP) $(store_h) ! zmisc.$(OBJ): zmisc.c $(OP) $(gp_h) $(alloc_h) $(dict_h) $(name_h) $(packed_h) $(store_h) \ $(gstype1_h) $(gxfixed_h) --- 595,600 ---- zmath.$(OBJ): zmath.c $(OP) $(store_h) ! zmisc.$(OBJ): zmisc.c $(OP) $(gp_h) \ ! $(alloc_h) $(dict_h) $(dstack_h) $(name_h) $(packed_h) $(store_h) \ $(gstype1_h) $(gxfixed_h) *************** *** 595,599 **** ztype.$(OBJ): ztype.c $(OP) $(dict_h) $(iutil_h) $(name_h) $(stream_h) $(store_h) ! zvmem.$(OBJ): zvmem.c $(OP) $(alloc_h) $(dict_h) $(estack_h) $(save_h) $(state_h) $(store_h) \ $(gsmatrix_h) $(gsstate_h) --- 614,618 ---- ztype.$(OBJ): ztype.c $(OP) $(dict_h) $(iutil_h) $(name_h) $(stream_h) $(store_h) ! zvmem.$(OBJ): zvmem.c $(OP) $(alloc_h) $(dict_h) $(dstack_h) $(estack_h) $(save_h) $(state_h) $(store_h) \ $(gsmatrix_h) $(gsstate_h) *************** *** 600,604 **** ###### Graphics operators ! zchar.$(OBJ): zchar.c $(OP) $(gxmatrix_h) $(gschar_h) $(gstype1_h) $(gxdevice_h) $(gxfixed_h) $(gxfont_h) $(gzpath_h) $(gzstate_h) $(alloc_h) $(dict_h) $(font_h) $(estack_h) $(state_h) $(store_h) zcolor.$(OBJ): zcolor.c $(OP) $(alloc_h) $(estack_h) $(gxfixed_h) $(gxmatrix_h) $(gzstate_h) $(gxdevice_h) $(gzcolor_h) $(iutil_h) $(state_h) $(store_h) --- 619,623 ---- ###### Graphics operators ! zchar.$(OBJ): zchar.c $(OP) $(gxmatrix_h) $(gschar_h) $(gstype1_h) $(gxdevice_h) $(gxfixed_h) $(gxfont_h) $(gzpath_h) $(gzstate_h) $(alloc_h) $(dict_h) $(dstack_h) $(font_h) $(estack_h) $(state_h) $(store_h) zcolor.$(OBJ): zcolor.c $(OP) $(alloc_h) $(estack_h) $(gxfixed_h) $(gxmatrix_h) $(gzstate_h) $(gxdevice_h) $(gzcolor_h) $(iutil_h) $(state_h) $(store_h) *************** *** 655,659 **** ibnum.$(OBJ): ibnum.c $(GH) $(errors_h) $(stream_h) $(bnum_h) $(btoken_h) ! ibscan.$(OBJ): ibscan.c $(GH) $(errors_h) $(alloc_h) $(dict_h) $(iutil_h) $(name_h) $(ostack_h) $(save_h) $(store_h) $(stream_h) $(bseq_h) $(btoken_h) $(bnum_h) zbseq.$(OBJ): zbseq.c $(OP) $(save_h) $(store_h) $(stream_h) $(file_h) $(name_h) $(bnum_h) $(btoken_h) $(bseq_h) --- 674,679 ---- ibnum.$(OBJ): ibnum.c $(GH) $(errors_h) $(stream_h) $(bnum_h) $(btoken_h) ! ibscan.$(OBJ): ibscan.c $(GH) $(errors_h) \ ! $(alloc_h) $(dict_h) $(dstack_h) $(iutil_h) $(name_h) $(ostack_h) $(save_h) $(store_h) $(stream_h) $(bseq_h) $(btoken_h) $(bnum_h) zbseq.$(OBJ): zbseq.c $(OP) $(save_h) $(store_h) $(stream_h) $(file_h) $(name_h) $(bnum_h) $(btoken_h) $(bseq_h) *************** *** 663,667 **** zupath.$(OBJ): zupath.c $(OP) \ ! $(dict_h) $(iutil_h) $(state_h) $(store_h) $(stream_h) $(bnum_h) \ $(gscoord_h) $(gsmatrix_h) $(gspaint_h) $(gspath_h) $(gsstate_h) \ $(gxfixed_h) $(gxdevice_h) $(gxpath_h) --- 683,687 ---- zupath.$(OBJ): zupath.c $(OP) \ ! $(dict_h) $(dstack_h) $(iutil_h) $(state_h) $(store_h) $(stream_h) $(bnum_h) \ $(gscoord_h) $(gsmatrix_h) $(gspaint_h) $(gspath_h) $(gsstate_h) \ $(gxfixed_h) $(gxdevice_h) $(gxpath_h) *************** *** 736,740 **** $(SHP)gssetmod ccfonts $(ccfonts_) iccfont.$(OBJ) $(SHP)gsaddmod ccfonts -oper font_Ugly font_Courier - $(SHP)gsaddmod ccfonts -ps gs_ccfnt ugly.$(OBJ): ugly.c $(CCFONT) --- 756,759 ---- *************** *** 742,745 **** --- 761,768 ---- cour.$(OBJ): cour.c $(CCFONT) + psyr.$(OBJ): psyr.c $(CCFONT) + + pzdr.$(OBJ): pzdr.c $(CCFONT) + # ----------------------------- Main program ------------------------------ # *************** *** 752,756 **** interp.$(OBJ): interp.c $(GH) \ ! $(errors_h) $(estack_h) $(name_h) $(dict_h) $(oper_h) $(ostack_h) $(packed_h) $(save_h) $(store_h) $(stream_h) $(CCINT) interp.c --- 775,779 ---- interp.$(OBJ): interp.c $(GH) \ ! $(errors_h) $(estack_h) $(name_h) $(dict_h) $(dstack_h) $(oper_h) $(ostack_h) $(packed_h) $(save_h) $(store_h) $(stream_h) $(CCINT) interp.c *************** *** 788,799 **** # vga VGA (640x480, 16-color) # MS-DOS SuperVGA: ! # ****** NOTE: these devices do not work with the Watcom (32-bit MS-DOS) ! # ****** compiler or executable. ! # + atiw ATI Wonder SuperVGA # * mdb10 EIZO MDB-10 (1024 x 768) ! # tseng SuperVGA using Tseng Labs ET3000/4000 chips # tseng16 Tseng Labs SuperVGA in 800x600, 16-color mode (256K memory) # + tvga16 Trident SuperVGA in 800x600, 16-color mode (256K memory) ! # vesa SuperVGA with VESA standard API # MS-DOS other: # bgi Borland Graphics Interface (CGA and Hercules) --- 811,822 ---- # vga VGA (640x480, 16-color) # MS-DOS SuperVGA: ! # + atiw ATI Wonder SuperVGA, 256-color modes # * mdb10 EIZO MDB-10 (1024 x 768) ! # tseng SuperVGA using Tseng Labs ET3000/4000 chips, 256-color modes # tseng16 Tseng Labs SuperVGA in 800x600, 16-color mode (256K memory) # + tvga16 Trident SuperVGA in 800x600, 16-color mode (256K memory) ! # ****** NOTE: the vesa device does not work with the Watcom (32-bit MS-DOS) ! # ****** compiler or executable. ! # vesa SuperVGA with VESA standard API driver # MS-DOS other: # bgi Borland Graphics Interface (CGA and Hercules) *************** *** 825,828 **** --- 848,862 ---- # File formats and others: # bit A "bit bucket" device for time benchmarking + # gifmono Monochrome GIF file format + # gif8 8-bit color GIF file format + # pcxmono Monochrome PCX file format + # pcx16 Older color PCX file format (EGA/VGA, 16-color) + # pcx256 Newer color PCX file format (256-color) + # pbm Portable Bitmap (plain format) + # pbmraw Portable Bitmap (raw format) + # pgm Portable Graymap (plain format) + # pgmraw Portable Graymap (raw format) + # ppm Portable Pixmap (plain format) + # ppmraw Portable Pixmap (raw format) # User-contributed drivers marked with * require hardware or software *************** *** 838,850 **** # in alphabetical order. ! # Each platform-specific makefile must contain a line of the form # DEVICE_DEVS=.dev ... .dev # where dev1 ... devn are the devices to be included in the build. ! # dev1 will be used as the default device. ! # On MS-DOS platforms, this line must appear before the lines ! # (!)include gs.mak ! # (!)include devs.mak ! # in the makefile; on Unix systems, the device definition line ! # may appear anywhere in the makefile. # ---------------------------- End of catalog ---------------------------- # --- 872,887 ---- # in alphabetical order. ! # Each platform-specific makefile contains a line of the form # DEVICE_DEVS=.dev ... .dev # where dev1 ... devn are the devices to be included in the build. ! # You may edit this line to select any desired set of devices. ! # dev1 will be used as the default device (unless overridden from ! # the command line with -sDEVICE=xxx, of course.) If you can't fit all the ! # devices on a single line, you may add lines defining ! # DEVICE_DEVS2=.dev ... .dev ! # DEVICE_DEVS3=.dev ... .dev ! # etc. up to DEVICE_DEVS5. ! # Don't use continuation lines, since this may break the MS-DOS command ! # processor. # ---------------------------- End of catalog ---------------------------- # *************** *** 865,869 **** gdevegaa.$(OBJ): gdevegaa.asm ! ETEST=ega.$(OBJ) trace.$(OBJ) $(ega_) ega.exe: $(ETEST) libc$(MM).tr tlink /m /l $(LIBDIR)\c0$(MM) @ega.tr @libc$(MM).tr --- 902,906 ---- gdevegaa.$(OBJ): gdevegaa.asm ! ETEST=ega.$(OBJ) $(ega_) ega.exe: $(ETEST) libc$(MM).tr tlink /m /l $(LIBDIR)\c0$(MM) @ega.tr @libc$(MM).tr *************** *** 1094,1098 **** ###### ------------------------ Sony devices ------------------------ ###### ### Note: these drivers were contributed by users: please contact ### ! ### Mike Smolenski (mike@srava.sra.co.jp) if you have questions. ### ### ------------------- Sony NeWS frame buffer device ------------------ ### --- 1131,1135 ---- ###### ------------------------ Sony devices ------------------------ ###### ### Note: these drivers were contributed by users: please contact ### ! ### Mike Smolenski (mike@intertech.com) if you have questions. ### ### ------------------- Sony NeWS frame buffer device ------------------ ### *************** *** 1113,1116 **** --- 1150,1155 ---- ###### --------------------- The SunView device --------------------- ###### + ### Note: this driver is maintained by a user: if you have questions, ### + ### please contact Andreas Stolcke (stolcke@icsi.berkeley.edu). ### sunview_=gdevsun.$(OBJ) *************** *** 1122,1127 **** ### ----------------- The TruFax facsimile device ---------------------- ### ! ### Note: this driver was contributed by users: ### ! ### please contact nao@maestro.bellcore.com if you have questions. ### ### Note that the driver requires a file encode_l.o supplied by the ### ### makers of the TruFax product. ### --- 1161,1166 ---- ### ----------------- The TruFax facsimile device ---------------------- ### ! ### Note: this driver was contributed by users: please contact ### ! ### Neil Ostroff (nao@maestro.bellcore.com) if you have questions. ### ### Note that the driver requires a file encode_l.o supplied by the ### ### makers of the TruFax product. ### *************** *** 1135,1146 **** ###### ----------------------- The X11 device ----------------------- ###### - # Note that this includes some extra libraries to support Ghostview. - # Xt and Xext are included because on SunOS, some routine in Xmu calls - # XtMalloc, and something in Xt calls something in Xext, and Sun's - # dynamic library scheme requires pulling in all 3 libraries. - # On other operating systems, only Xmu is needed. - # Aladdin Enterprises does not support Ghostview. For more information ! # about Ghostview, contact Tim Theisen (ghostview@cs.wisc.edu). x11_=gdevx.$(OBJ) gdevxini.$(OBJ) --- 1174,1179 ---- ###### ----------------------- The X11 device ----------------------- ###### # Aladdin Enterprises does not support Ghostview. For more information ! # about Ghostview, please contact Tim Theisen (ghostview@cs.wisc.edu). x11_=gdevx.$(OBJ) gdevxini.$(OBJ) *************** *** 1147,1151 **** x11.dev: $(x11_) $(SHP)gssetdev x11 $(x11_) ! $(SHP)gsaddmod x11 -lib Xmu Xt Xext X11 # See the main makefile for the definition of XINCLUDE. --- 1180,1184 ---- x11.dev: $(x11_) $(SHP)gssetdev x11 $(x11_) ! $(SHP)gsaddmod x11 -lib X11 # See the main makefile for the definition of XINCLUDE. *************** *** 1164,1167 **** --- 1197,1262 ---- gdevbit.$(OBJ): gdevbit.c $(PDEVH) + + ###### ----------------------- PC file formats ---------------------- ###### + + gdevpccm.$(OBJ): gdevpccm.c $(gs_h) $(gsmatrix_h) $(gxdevice_h) $(gdevpccm_h) + + ### ------------------------- GIF file formats ------------------------- ### + + GIF=gdevgif.$(OBJ) gdevpccm.$(OBJ) gdevprn.$(OBJ) + + gdevgif.$(OBJ): gdevgif.c $(PDEVH) $(gdevpccm_h) + + gifmono.dev: $(GIF) + $(SHP)gssetdev gifmono $(GIF) + + gif8.dev: $(GIF) + $(SHP)gssetdev gif8 $(GIF) + + ### ------------------------- PCX file formats ------------------------- ### + + PCX=gdevpcx.$(OBJ) gdevpccm.$(OBJ) gdevprn.$(OBJ) + + gdevpcx.$(OBJ): gdevpcx.c $(PDEVH) $(gdevpccm_h) + + pcxmono.dev: $(PCX) + $(SHP)gssetdev pcxmono $(PCX) + + pcx16.dev: $(PCX) + $(SHP)gssetdev pcx16 $(PCX) + + pcx256.dev: $(PCX) + $(SHP)gssetdev pcx256 $(PCX) + + ###### ------------------- Portable Bitmap devices ------------------ ###### + ### For more information, see the pbm(5), pgm(5), and ppm(5) man pages. ### + + PXM=gdevpbm.$(OBJ) gdevprn.$(OBJ) + + gdevpbm.$(OBJ): gdevpbm.c $(PDEVH) $(gxlum_h) + + ### Portable Bitmap (PBM, plain or raw format, magic numbers "P1" or "P4") + + pbm.dev: $(PXM) + $(SHP)gssetdev pbm $(PXM) + + pbmraw.dev: $(PXM) + $(SHP)gssetdev pbmraw $(PXM) + + ### Portable Graymap (PGM, plain or raw format, magic numbers "P2" or "P5") + + pgm.dev: $(PXM) + $(SHP)gssetdev pgm $(PXM) + + pgmraw.dev: $(PXM) + $(SHP)gssetdev pgmraw $(PXM) + + ### Portable Pixmap (PPM, plain or raw format, magic numbers "P3" or "P6") + + ppm.dev: $(PXM) + $(SHP)gssetdev ppm $(PXM) + + ppmraw.dev: $(PXM) + $(SHP)gssetdev ppmraw $(PXM) # Copyright (C) 1990, 1992 Aladdin Enterprises. All rights reserved. # Distributed by Free Software Foundation, Inc. *************** *** 1209,1226 **** ansi2knr$(XE): ! $(CC) -o ansi2knr$(XE) $(CFLAGS) ansi2knr.c $(EXTRALIBS) genarch$(XE): genarch.c ! $(CC) -o genarch$(XE) $(CFLAGS) genarch.c $(EXTRALIBS) # ----------------------------- Main program ------------------------------ # - # (Dummy) tracing package - - utrace.$(OBJ): utrace.c - # Main program ! ALLUNIX=gsmain.$(OBJ) utrace.$(OBJ) $(LIB) # Interpreter main program --- 1304,1319 ---- ansi2knr$(XE): ! $(CC) -o ansi2knr$(XE) $(CFLAGS) ansi2knr.c + # On the RS/6000 (at least), compiling genarch.c with gcc with -O + # produces a buggy executable. genarch$(XE): genarch.c ! $(CC) -o genarch$(XE) genarch.c # ----------------------------- Main program ------------------------------ # # Main program ! ALLUNIX=gsmain.$(OBJ) $(LIB) # Interpreter main program *************** *** 1250,1254 **** $(INSTALL_DATA) gs_init.ps $(libdir) $(INSTALL_DATA) gs_2asc.ps $(libdir) - $(INSTALL_DATA) gs_ccfnt.ps $(libdir) $(INSTALL_DATA) gs_dps1.ps $(libdir) $(INSTALL_DATA) gs_fonts.ps $(libdir) --- 1343,1346 ---- *************** *** 1256,1260 **** $(INSTALL_DATA) gs_statd.ps $(libdir) $(INSTALL_DATA) sym__enc.ps $(libdir) - $(INSTALL_DATA) gconfig.ps $(libdir) $(INSTALL_DATA) quit.ps $(libdir) $(INSTALL_DATA) Fontmap $(libdir) --- 1348,1351 ---- *************** *** 1270,1271 **** --- 1361,1363 ---- $(INSTALL_DATA) pstoppm.ps $(libdir) $(INSTALL_DATA) prfont.ps $(libdir) + $(INSTALL_DATA) showpbm.ps $(libdir) diff -rc2N gs24/unix-gcc.mak gs241/unix-gcc.mak *** gs24/unix-gcc.mak Thu Mar 26 00:53:27 1992 --- gs241/unix-gcc.mak Tue Apr 21 15:24:49 1992 *************** *** 1,3 **** ! # Copyright (C) 1989, 1990, 1991 Aladdin Enterprises. All rights reserved. # Distributed by Free Software Foundation, Inc. # --- 1,3 ---- ! # Copyright (C) 1989, 1992 Aladdin Enterprises. All rights reserved. # Distributed by Free Software Foundation, Inc. # *************** *** 19,22 **** --- 19,23 ---- # makefile for Ghostscript, Unix/gcc/X11 configuration. + # Note: this makefile assumes you are using gcc in ANSI mode. # ------------------------------- Options ------------------------------- # *************** *** 59,67 **** # Add -DBSD4_2 for 4.2bsd systems. # Add -DUSG (GNU convention) or -DSYSV for System V or DG/UX. ! # Add -DSYSV -D__SVR3 for SCO ODT. # Add -DSVR4 (not -DSYSV) for System V release 4. # XCFLAGS can be set from the command line. # We don't include -ansi, because this gets in the way of the platform- ! # specific stuff that typically needs. CFLAGS=-g -O $(XCFLAGS) --- 60,70 ---- # Add -DBSD4_2 for 4.2bsd systems. # Add -DUSG (GNU convention) or -DSYSV for System V or DG/UX. ! # Add -DSYSV -D__SVR3 for SCO ODT, ISC Unix 2.2 or before, ! # or any System III Unix, or System V release 3-or-older Unix. # Add -DSVR4 (not -DSYSV) for System V release 4. # XCFLAGS can be set from the command line. # We don't include -ansi, because this gets in the way of the platform- ! # specific stuff that typically needs; nevertheless, we expect ! # gcc to accept ANSI-style function prototypes and function definitions. CFLAGS=-g -O $(XCFLAGS) *************** *** 181,185 **** CCFLAGS=$(GENOPT) $(CFLAGS) ! .c.o: $(CCC) $*.c --- 184,188 ---- CCFLAGS=$(GENOPT) $(CFLAGS) ! .c.o: $(AK) $(CCC) $*.c *************** *** 214,217 **** --- 217,223 ---- # DEVICE_DEVS - the devices to include in the executable. # See devs.mak for details. + # DEVICE_DEVS2...DEVICE_DEVS5 - additional devices, if the definition of + # DEVICE_DEVS doesn't fit on one line. + # See devs.mak for details. # FEATURE_DEVS - the optional features to include in the # executable. Current features are: *************** *** 247,250 **** --- 253,258 ---- # AK - if source files must be converted from ANSI to K&R syntax, # this is ansi2knr$(XE); if not, it is null. + # 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. *************** *** 345,348 **** --- 353,357 ---- gxfont_h=gxfont.h $(gsfont_h) gximage_h=gximage.h + gxlum_h=gxlum.h gxmatrix_h=gxmatrix.h $(gsmatrix_h) gxop1_h=gxop1.h *************** *** 371,375 **** gxcolor.$(OBJ): gxcolor.c $(GXERR) \ ! $(gxfixed_h) $(gxmatrix_h) $(gxdevice_h) $(gzcolor_h) $(gzht_h) $(gzstate_h) gxcpath.$(OBJ): gxcpath.c $(GXERR) \ --- 380,384 ---- gxcolor.$(OBJ): gxcolor.c $(GXERR) \ ! $(gxfixed_h) $(gxmatrix_h) $(gxdevice_h) $(gxlum_h) $(gzcolor_h) $(gzht_h) $(gzstate_h) gxcpath.$(OBJ): gxcpath.c $(GXERR) \ *************** *** 377,381 **** gxdither.$(OBJ): gxdither.c $(GX) \ ! $(gxfixed_h) $(gxmatrix_h) $(gzstate_h) $(gzdevice_h) $(gzcolor_h) $(gzht_h) gxdraw.$(OBJ): gxdraw.c $(GX) \ --- 386,390 ---- gxdither.$(OBJ): gxdither.c $(GX) \ ! $(gxfixed_h) $(gxlum_h) $(gxmatrix_h) $(gzstate_h) $(gzdevice_h) $(gzcolor_h) $(gzht_h) gxdraw.$(OBJ): gxdraw.c $(GX) \ *************** *** 461,469 **** $(gs_h) $(gxdevice_h) $(gxdevmem_h) $(gdevmem_h) ###### Files dependent on the installed devices, features, and platform. ###### Generating gconfig.h also generates obj*.tr and lib.tr. ! gconfig.h gconfig.ps obj.tr lib.tr: devs.mak $(MAKEFILE) $(UNIQ) $(DEVICE_DEVS) $(FEATURE_DEVS) $(PLATFORM).dev $(SHP)gsconfig $(DEVICE_DEVS) + $(SHP)gsconfig + $(FEATURE_DEVS) $(PLATFORM).dev --- 470,487 ---- $(gs_h) $(gxdevice_h) $(gxdevmem_h) $(gdevmem_h) + gdevmem3.$(OBJ): gdevmem3.c $(AK) \ + $(gs_h) $(gxdevice_h) $(gxdevmem_h) $(gdevmem_h) + ###### Files dependent on the installed devices, features, and platform. ###### Generating gconfig.h also generates obj*.tr and lib.tr. ! gconfig.h obj.tr objw.tr lib.tr: devs.mak $(MAKEFILE) $(UNIQ) \ ! $(DEVICE_DEVS) $(DEVICE_DEVS2) $(DEVICE_DEVS3) $(DEVICE_DEVS4) $(DEVICE_DEVS5)\ ! $(FEATURE_DEVS) $(PLATFORM).dev $(SHP)gsconfig $(DEVICE_DEVS) + + $(SHP)gsconfig + $(DEVICE_DEVS2) + + $(SHP)gsconfig + $(DEVICE_DEVS3) + + $(SHP)gsconfig + $(DEVICE_DEVS4) + + $(SHP)gsconfig + $(DEVICE_DEVS5) + $(SHP)gsconfig + $(FEATURE_DEVS) $(PLATFORM).dev *************** *** 483,487 **** gxdither.$(OBJ) gxdraw.$(OBJ) gxfill.$(OBJ) \ gxht.$(OBJ) gxpath.$(OBJ) gxpath2.$(OBJ) gxstroke.$(OBJ) \ ! gdevmem1.$(OBJ) gdevmem2.$(OBJ) gconfig.$(OBJ) # ------------------------------ Interpreter ------------------------------ # --- 501,505 ---- gxdither.$(OBJ) gxdraw.$(OBJ) gxfill.$(OBJ) \ gxht.$(OBJ) gxpath.$(OBJ) gxpath2.$(OBJ) gxstroke.$(OBJ) \ ! gdevmem1.$(OBJ) gdevmem2.$(OBJ) gdevmem3.$(OBJ) gconfig.$(OBJ) # ------------------------------ Interpreter ------------------------------ # *************** *** 493,496 **** --- 511,515 ---- ccfont_h=ccfont.h dict_h=dict.h + dstack_h=dstack.h errors_h=errors.h estack_h=estack.h *************** *** 519,522 **** --- 538,542 ---- comp1_h=comp1.h $(ghost_h) $(oper_h) $(gserrors_h) $(gxfixed_h) $(gxop1_h) + gdevpccm_h=gdevpccm.h gdevpcl_h=gdevpcl.h gdevprn_h=gdevprn.h $(memory__h) $(string__h) $(gs_h) \ *************** *** 531,535 **** iccfont.$(OBJ): iccfont.c $(GH) \ ! $(ghost_h) $(alloc_h) $(ccfont_h) $(dict_h) $(errors_h) $(name_h) $(save_h) $(store_h) idebug.$(OBJ): idebug.c $(GH) \ --- 551,555 ---- iccfont.$(OBJ): iccfont.c $(GH) \ ! $(ghost_h) $(alloc_h) $(ccfont_h) $(dict_h) $(dstack_h) $(errors_h) $(name_h) $(save_h) $(store_h) idebug.$(OBJ): idebug.c $(GH) \ *************** *** 536,542 **** $(iutil_h) $(dict_h) $(name_h) $(ostack_h) $(opdef_h) $(packed_h) $(store_h) ! idict.$(OBJ): idict.c $(GH) $(alloc_h) $(errors_h) $(name_h) $(packed_h) $(save_h) $(store_h) $(iutil_h) $(dict_h) ! iinit.$(OBJ): iinit.c $(GH) gconfig.h $(alloc_h) $(dict_h) $(errors_h) $(name_h) $(oper_h) $(store_h) iname.$(OBJ): iname.c $(GH) $(alloc_h) $(errors_h) $(name_h) $(store_h) --- 556,562 ---- $(iutil_h) $(dict_h) $(name_h) $(ostack_h) $(opdef_h) $(packed_h) $(store_h) ! idict.$(OBJ): idict.c $(GH) $(alloc_h) $(errors_h) $(name_h) $(packed_h) $(save_h) $(store_h) $(iutil_h) $(dict_h) $(dstack_h) ! iinit.$(OBJ): iinit.c $(GH) gconfig.h $(alloc_h) $(dict_h) $(dstack_h) $(errors_h) $(name_h) $(oper_h) $(store_h) iname.$(OBJ): iname.c $(GH) $(alloc_h) $(errors_h) $(name_h) $(store_h) *************** *** 544,548 **** isave.$(OBJ): isave.c $(GH) $(alloc_h) $(astate_h) $(name_h) $(packed_h) $(save_h) $(store_h) ! iscan.$(OBJ): iscan.c $(GH) $(alloc_h) $(dict_h) $(errors_h) $(iutil_h) \ $(name_h) $(ostack_h) $(packed_h) $(store_h) $(stream_h) $(scanchar_h) --- 564,568 ---- isave.$(OBJ): isave.c $(GH) $(alloc_h) $(astate_h) $(name_h) $(packed_h) $(save_h) $(store_h) ! iscan.$(OBJ): iscan.c $(GH) $(alloc_h) $(dict_h) $(dstack_h) $(errors_h) $(iutil_h) \ $(name_h) $(ostack_h) $(packed_h) $(store_h) $(stream_h) $(scanchar_h) *************** *** 568,572 **** zcontrol.$(OBJ): zcontrol.c $(OP) $(estack_h) $(iutil_h) $(store_h) ! zdict.$(OBJ): zdict.c $(OP) $(dict_h) $(store_h) zfile.$(OBJ): zfile.c $(OP) $(gp_h) \ --- 588,592 ---- zcontrol.$(OBJ): zcontrol.c $(OP) $(estack_h) $(iutil_h) $(store_h) ! zdict.$(OBJ): zdict.c $(OP) $(dict_h) $(dstack_h) $(store_h) zfile.$(OBJ): zfile.c $(OP) $(gp_h) \ *************** *** 583,587 **** zmath.$(OBJ): zmath.c $(OP) $(store_h) ! zmisc.$(OBJ): zmisc.c $(OP) $(gp_h) $(alloc_h) $(dict_h) $(name_h) $(packed_h) $(store_h) \ $(gstype1_h) $(gxfixed_h) --- 603,608 ---- zmath.$(OBJ): zmath.c $(OP) $(store_h) ! zmisc.$(OBJ): zmisc.c $(OP) $(gp_h) \ ! $(alloc_h) $(dict_h) $(dstack_h) $(name_h) $(packed_h) $(store_h) \ $(gstype1_h) $(gxfixed_h) *************** *** 601,605 **** ztype.$(OBJ): ztype.c $(OP) $(dict_h) $(iutil_h) $(name_h) $(stream_h) $(store_h) ! zvmem.$(OBJ): zvmem.c $(OP) $(alloc_h) $(dict_h) $(estack_h) $(save_h) $(state_h) $(store_h) \ $(gsmatrix_h) $(gsstate_h) --- 622,626 ---- ztype.$(OBJ): ztype.c $(OP) $(dict_h) $(iutil_h) $(name_h) $(stream_h) $(store_h) ! zvmem.$(OBJ): zvmem.c $(OP) $(alloc_h) $(dict_h) $(dstack_h) $(estack_h) $(save_h) $(state_h) $(store_h) \ $(gsmatrix_h) $(gsstate_h) *************** *** 606,610 **** ###### Graphics operators ! zchar.$(OBJ): zchar.c $(OP) $(gxmatrix_h) $(gschar_h) $(gstype1_h) $(gxdevice_h) $(gxfixed_h) $(gxfont_h) $(gzpath_h) $(gzstate_h) $(alloc_h) $(dict_h) $(font_h) $(estack_h) $(state_h) $(store_h) zcolor.$(OBJ): zcolor.c $(OP) $(alloc_h) $(estack_h) $(gxfixed_h) $(gxmatrix_h) $(gzstate_h) $(gxdevice_h) $(gzcolor_h) $(iutil_h) $(state_h) $(store_h) --- 627,631 ---- ###### Graphics operators ! zchar.$(OBJ): zchar.c $(OP) $(gxmatrix_h) $(gschar_h) $(gstype1_h) $(gxdevice_h) $(gxfixed_h) $(gxfont_h) $(gzpath_h) $(gzstate_h) $(alloc_h) $(dict_h) $(dstack_h) $(font_h) $(estack_h) $(state_h) $(store_h) zcolor.$(OBJ): zcolor.c $(OP) $(alloc_h) $(estack_h) $(gxfixed_h) $(gxmatrix_h) $(gzstate_h) $(gxdevice_h) $(gzcolor_h) $(iutil_h) $(state_h) $(store_h) *************** *** 661,665 **** ibnum.$(OBJ): ibnum.c $(GH) $(errors_h) $(stream_h) $(bnum_h) $(btoken_h) ! ibscan.$(OBJ): ibscan.c $(GH) $(errors_h) $(alloc_h) $(dict_h) $(iutil_h) $(name_h) $(ostack_h) $(save_h) $(store_h) $(stream_h) $(bseq_h) $(btoken_h) $(bnum_h) zbseq.$(OBJ): zbseq.c $(OP) $(save_h) $(store_h) $(stream_h) $(file_h) $(name_h) $(bnum_h) $(btoken_h) $(bseq_h) --- 682,687 ---- ibnum.$(OBJ): ibnum.c $(GH) $(errors_h) $(stream_h) $(bnum_h) $(btoken_h) ! ibscan.$(OBJ): ibscan.c $(GH) $(errors_h) \ ! $(alloc_h) $(dict_h) $(dstack_h) $(iutil_h) $(name_h) $(ostack_h) $(save_h) $(store_h) $(stream_h) $(bseq_h) $(btoken_h) $(bnum_h) zbseq.$(OBJ): zbseq.c $(OP) $(save_h) $(store_h) $(stream_h) $(file_h) $(name_h) $(bnum_h) $(btoken_h) $(bseq_h) *************** *** 669,673 **** zupath.$(OBJ): zupath.c $(OP) \ ! $(dict_h) $(iutil_h) $(state_h) $(store_h) $(stream_h) $(bnum_h) \ $(gscoord_h) $(gsmatrix_h) $(gspaint_h) $(gspath_h) $(gsstate_h) \ $(gxfixed_h) $(gxdevice_h) $(gxpath_h) --- 691,695 ---- zupath.$(OBJ): zupath.c $(OP) \ ! $(dict_h) $(dstack_h) $(iutil_h) $(state_h) $(store_h) $(stream_h) $(bnum_h) \ $(gscoord_h) $(gsmatrix_h) $(gspaint_h) $(gspath_h) $(gsstate_h) \ $(gxfixed_h) $(gxdevice_h) $(gxpath_h) *************** *** 742,746 **** $(SHP)gssetmod ccfonts $(ccfonts_) iccfont.$(OBJ) $(SHP)gsaddmod ccfonts -oper font_Ugly font_Courier - $(SHP)gsaddmod ccfonts -ps gs_ccfnt ugly.$(OBJ): ugly.c $(CCFONT) --- 764,767 ---- *************** *** 748,751 **** --- 769,776 ---- cour.$(OBJ): cour.c $(CCFONT) + psyr.$(OBJ): psyr.c $(CCFONT) + + pzdr.$(OBJ): pzdr.c $(CCFONT) + # ----------------------------- Main program ------------------------------ # *************** *** 758,762 **** interp.$(OBJ): interp.c $(GH) \ ! $(errors_h) $(estack_h) $(name_h) $(dict_h) $(oper_h) $(ostack_h) $(packed_h) $(save_h) $(store_h) $(stream_h) $(CCINT) interp.c --- 783,787 ---- interp.$(OBJ): interp.c $(GH) \ ! $(errors_h) $(estack_h) $(name_h) $(dict_h) $(dstack_h) $(oper_h) $(ostack_h) $(packed_h) $(save_h) $(store_h) $(stream_h) $(CCINT) interp.c *************** *** 794,805 **** # vga VGA (640x480, 16-color) # MS-DOS SuperVGA: ! # ****** NOTE: these devices do not work with the Watcom (32-bit MS-DOS) ! # ****** compiler or executable. ! # + atiw ATI Wonder SuperVGA # * mdb10 EIZO MDB-10 (1024 x 768) ! # tseng SuperVGA using Tseng Labs ET3000/4000 chips # tseng16 Tseng Labs SuperVGA in 800x600, 16-color mode (256K memory) # + tvga16 Trident SuperVGA in 800x600, 16-color mode (256K memory) ! # vesa SuperVGA with VESA standard API # MS-DOS other: # bgi Borland Graphics Interface (CGA and Hercules) --- 819,830 ---- # vga VGA (640x480, 16-color) # MS-DOS SuperVGA: ! # + atiw ATI Wonder SuperVGA, 256-color modes # * mdb10 EIZO MDB-10 (1024 x 768) ! # tseng SuperVGA using Tseng Labs ET3000/4000 chips, 256-color modes # tseng16 Tseng Labs SuperVGA in 800x600, 16-color mode (256K memory) # + tvga16 Trident SuperVGA in 800x600, 16-color mode (256K memory) ! # ****** NOTE: the vesa device does not work with the Watcom (32-bit MS-DOS) ! # ****** compiler or executable. ! # vesa SuperVGA with VESA standard API driver # MS-DOS other: # bgi Borland Graphics Interface (CGA and Hercules) *************** *** 831,834 **** --- 856,870 ---- # File formats and others: # bit A "bit bucket" device for time benchmarking + # gifmono Monochrome GIF file format + # gif8 8-bit color GIF file format + # pcxmono Monochrome PCX file format + # pcx16 Older color PCX file format (EGA/VGA, 16-color) + # pcx256 Newer color PCX file format (256-color) + # pbm Portable Bitmap (plain format) + # pbmraw Portable Bitmap (raw format) + # pgm Portable Graymap (plain format) + # pgmraw Portable Graymap (raw format) + # ppm Portable Pixmap (plain format) + # ppmraw Portable Pixmap (raw format) # User-contributed drivers marked with * require hardware or software *************** *** 844,856 **** # in alphabetical order. ! # Each platform-specific makefile must contain a line of the form # DEVICE_DEVS=.dev ... .dev # where dev1 ... devn are the devices to be included in the build. ! # dev1 will be used as the default device. ! # On MS-DOS platforms, this line must appear before the lines ! # (!)include gs.mak ! # (!)include devs.mak ! # in the makefile; on Unix systems, the device definition line ! # may appear anywhere in the makefile. # ---------------------------- End of catalog ---------------------------- # --- 880,895 ---- # in alphabetical order. ! # Each platform-specific makefile contains a line of the form # DEVICE_DEVS=.dev ... .dev # where dev1 ... devn are the devices to be included in the build. ! # You may edit this line to select any desired set of devices. ! # dev1 will be used as the default device (unless overridden from ! # the command line with -sDEVICE=xxx, of course.) If you can't fit all the ! # devices on a single line, you may add lines defining ! # DEVICE_DEVS2=.dev ... .dev ! # DEVICE_DEVS3=.dev ... .dev ! # etc. up to DEVICE_DEVS5. ! # Don't use continuation lines, since this may break the MS-DOS command ! # processor. # ---------------------------- End of catalog ---------------------------- # *************** *** 871,875 **** gdevegaa.$(OBJ): gdevegaa.asm ! ETEST=ega.$(OBJ) trace.$(OBJ) $(ega_) ega.exe: $(ETEST) libc$(MM).tr tlink /m /l $(LIBDIR)\c0$(MM) @ega.tr @libc$(MM).tr --- 910,914 ---- gdevegaa.$(OBJ): gdevegaa.asm ! ETEST=ega.$(OBJ) $(ega_) ega.exe: $(ETEST) libc$(MM).tr tlink /m /l $(LIBDIR)\c0$(MM) @ega.tr @libc$(MM).tr *************** *** 1100,1104 **** ###### ------------------------ Sony devices ------------------------ ###### ### Note: these drivers were contributed by users: please contact ### ! ### Mike Smolenski (mike@srava.sra.co.jp) if you have questions. ### ### ------------------- Sony NeWS frame buffer device ------------------ ### --- 1139,1143 ---- ###### ------------------------ Sony devices ------------------------ ###### ### Note: these drivers were contributed by users: please contact ### ! ### Mike Smolenski (mike@intertech.com) if you have questions. ### ### ------------------- Sony NeWS frame buffer device ------------------ ### *************** *** 1119,1122 **** --- 1158,1163 ---- ###### --------------------- The SunView device --------------------- ###### + ### Note: this driver is maintained by a user: if you have questions, ### + ### please contact Andreas Stolcke (stolcke@icsi.berkeley.edu). ### sunview_=gdevsun.$(OBJ) *************** *** 1128,1133 **** ### ----------------- The TruFax facsimile device ---------------------- ### ! ### Note: this driver was contributed by users: ### ! ### please contact nao@maestro.bellcore.com if you have questions. ### ### Note that the driver requires a file encode_l.o supplied by the ### ### makers of the TruFax product. ### --- 1169,1174 ---- ### ----------------- The TruFax facsimile device ---------------------- ### ! ### Note: this driver was contributed by users: please contact ### ! ### Neil Ostroff (nao@maestro.bellcore.com) if you have questions. ### ### Note that the driver requires a file encode_l.o supplied by the ### ### makers of the TruFax product. ### *************** *** 1141,1152 **** ###### ----------------------- The X11 device ----------------------- ###### - # Note that this includes some extra libraries to support Ghostview. - # Xt and Xext are included because on SunOS, some routine in Xmu calls - # XtMalloc, and something in Xt calls something in Xext, and Sun's - # dynamic library scheme requires pulling in all 3 libraries. - # On other operating systems, only Xmu is needed. - # Aladdin Enterprises does not support Ghostview. For more information ! # about Ghostview, contact Tim Theisen (ghostview@cs.wisc.edu). x11_=gdevx.$(OBJ) gdevxini.$(OBJ) --- 1182,1187 ---- ###### ----------------------- The X11 device ----------------------- ###### # Aladdin Enterprises does not support Ghostview. For more information ! # about Ghostview, please contact Tim Theisen (ghostview@cs.wisc.edu). x11_=gdevx.$(OBJ) gdevxini.$(OBJ) *************** *** 1153,1157 **** x11.dev: $(x11_) $(SHP)gssetdev x11 $(x11_) ! $(SHP)gsaddmod x11 -lib Xmu Xt Xext X11 # See the main makefile for the definition of XINCLUDE. --- 1188,1192 ---- x11.dev: $(x11_) $(SHP)gssetdev x11 $(x11_) ! $(SHP)gsaddmod x11 -lib X11 # See the main makefile for the definition of XINCLUDE. *************** *** 1170,1173 **** --- 1205,1270 ---- gdevbit.$(OBJ): gdevbit.c $(PDEVH) + + ###### ----------------------- PC file formats ---------------------- ###### + + gdevpccm.$(OBJ): gdevpccm.c $(gs_h) $(gsmatrix_h) $(gxdevice_h) $(gdevpccm_h) + + ### ------------------------- GIF file formats ------------------------- ### + + GIF=gdevgif.$(OBJ) gdevpccm.$(OBJ) gdevprn.$(OBJ) + + gdevgif.$(OBJ): gdevgif.c $(PDEVH) $(gdevpccm_h) + + gifmono.dev: $(GIF) + $(SHP)gssetdev gifmono $(GIF) + + gif8.dev: $(GIF) + $(SHP)gssetdev gif8 $(GIF) + + ### ------------------------- PCX file formats ------------------------- ### + + PCX=gdevpcx.$(OBJ) gdevpccm.$(OBJ) gdevprn.$(OBJ) + + gdevpcx.$(OBJ): gdevpcx.c $(PDEVH) $(gdevpccm_h) + + pcxmono.dev: $(PCX) + $(SHP)gssetdev pcxmono $(PCX) + + pcx16.dev: $(PCX) + $(SHP)gssetdev pcx16 $(PCX) + + pcx256.dev: $(PCX) + $(SHP)gssetdev pcx256 $(PCX) + + ###### ------------------- Portable Bitmap devices ------------------ ###### + ### For more information, see the pbm(5), pgm(5), and ppm(5) man pages. ### + + PXM=gdevpbm.$(OBJ) gdevprn.$(OBJ) + + gdevpbm.$(OBJ): gdevpbm.c $(PDEVH) $(gxlum_h) + + ### Portable Bitmap (PBM, plain or raw format, magic numbers "P1" or "P4") + + pbm.dev: $(PXM) + $(SHP)gssetdev pbm $(PXM) + + pbmraw.dev: $(PXM) + $(SHP)gssetdev pbmraw $(PXM) + + ### Portable Graymap (PGM, plain or raw format, magic numbers "P2" or "P5") + + pgm.dev: $(PXM) + $(SHP)gssetdev pgm $(PXM) + + pgmraw.dev: $(PXM) + $(SHP)gssetdev pgmraw $(PXM) + + ### Portable Pixmap (PPM, plain or raw format, magic numbers "P3" or "P6") + + ppm.dev: $(PXM) + $(SHP)gssetdev ppm $(PXM) + + ppmraw.dev: $(PXM) + $(SHP)gssetdev ppmraw $(PXM) # Copyright (C) 1990, 1992 Aladdin Enterprises. All rights reserved. # Distributed by Free Software Foundation, Inc. *************** *** 1215,1232 **** ansi2knr$(XE): ! $(CC) -o ansi2knr$(XE) $(CFLAGS) ansi2knr.c $(EXTRALIBS) genarch$(XE): genarch.c ! $(CC) -o genarch$(XE) $(CFLAGS) genarch.c $(EXTRALIBS) # ----------------------------- Main program ------------------------------ # - # (Dummy) tracing package - - utrace.$(OBJ): utrace.c - # Main program ! ALLUNIX=gsmain.$(OBJ) utrace.$(OBJ) $(LIB) # Interpreter main program --- 1312,1327 ---- ansi2knr$(XE): ! $(CC) -o ansi2knr$(XE) $(CFLAGS) ansi2knr.c + # On the RS/6000 (at least), compiling genarch.c with gcc with -O + # produces a buggy executable. genarch$(XE): genarch.c ! $(CC) -o genarch$(XE) genarch.c # ----------------------------- Main program ------------------------------ # # Main program ! ALLUNIX=gsmain.$(OBJ) $(LIB) # Interpreter main program *************** *** 1256,1260 **** $(INSTALL_DATA) gs_init.ps $(libdir) $(INSTALL_DATA) gs_2asc.ps $(libdir) - $(INSTALL_DATA) gs_ccfnt.ps $(libdir) $(INSTALL_DATA) gs_dps1.ps $(libdir) $(INSTALL_DATA) gs_fonts.ps $(libdir) --- 1351,1354 ---- *************** *** 1262,1266 **** $(INSTALL_DATA) gs_statd.ps $(libdir) $(INSTALL_DATA) sym__enc.ps $(libdir) - $(INSTALL_DATA) gconfig.ps $(libdir) $(INSTALL_DATA) quit.ps $(libdir) $(INSTALL_DATA) Fontmap $(libdir) --- 1356,1359 ---- *************** *** 1276,1277 **** --- 1369,1371 ---- $(INSTALL_DATA) pstoppm.ps $(libdir) $(INSTALL_DATA) prfont.ps $(libdir) + $(INSTALL_DATA) showpbm.ps $(libdir) diff -rc2N gs24/unixhead.mak gs241/unixhead.mak *** gs24/unixhead.mak Sat Mar 7 09:53:32 1992 --- gs241/unixhead.mak Sat Mar 28 01:11:28 1992 *************** *** 50,54 **** CCFLAGS=$(GENOPT) $(CFLAGS) ! .c.o: $(CCC) $*.c --- 50,54 ---- CCFLAGS=$(GENOPT) $(CFLAGS) ! .c.o: $(AK) $(CCC) $*.c diff -rc2N gs24/unixtail.mak gs241/unixtail.mak *** gs24/unixtail.mak Tue Mar 24 05:27:12 1992 --- gs241/unixtail.mak Tue Apr 21 04:12:42 1992 *************** *** 44,61 **** ansi2knr$(XE): ! $(CC) -o ansi2knr$(XE) $(CFLAGS) ansi2knr.c $(EXTRALIBS) genarch$(XE): genarch.c ! $(CC) -o genarch$(XE) $(CFLAGS) genarch.c $(EXTRALIBS) # ----------------------------- Main program ------------------------------ # - # (Dummy) tracing package - - utrace.$(OBJ): utrace.c - # Main program ! ALLUNIX=gsmain.$(OBJ) utrace.$(OBJ) $(LIB) # Interpreter main program --- 44,59 ---- ansi2knr$(XE): ! $(CC) -o ansi2knr$(XE) $(CFLAGS) ansi2knr.c + # On the RS/6000 (at least), compiling genarch.c with gcc with -O + # produces a buggy executable. genarch$(XE): genarch.c ! $(CC) -o genarch$(XE) genarch.c # ----------------------------- Main program ------------------------------ # # Main program ! ALLUNIX=gsmain.$(OBJ) $(LIB) # Interpreter main program *************** *** 85,89 **** $(INSTALL_DATA) gs_init.ps $(libdir) $(INSTALL_DATA) gs_2asc.ps $(libdir) - $(INSTALL_DATA) gs_ccfnt.ps $(libdir) $(INSTALL_DATA) gs_dps1.ps $(libdir) $(INSTALL_DATA) gs_fonts.ps $(libdir) --- 83,86 ---- *************** *** 91,95 **** $(INSTALL_DATA) gs_statd.ps $(libdir) $(INSTALL_DATA) sym__enc.ps $(libdir) - $(INSTALL_DATA) gconfig.ps $(libdir) $(INSTALL_DATA) quit.ps $(libdir) $(INSTALL_DATA) Fontmap $(libdir) --- 88,91 ---- *************** *** 105,106 **** --- 101,103 ---- $(INSTALL_DATA) pstoppm.ps $(libdir) $(INSTALL_DATA) prfont.ps $(libdir) + $(INSTALL_DATA) showpbm.ps $(libdir) diff -rc2N gs24/use.doc gs241/use.doc *** gs24/use.doc Wed Mar 25 01:53:28 1992 --- gs241/use.doc Tue Apr 21 04:13:12 1992 *************** *** 32,37 **** The file name of the Ghostscript interpreter is gs.exe (MS-DOS and VMS) or gs (Unix). To run it, you also need some external initialization files: ! gconfig.ps ! gs_*.ps (gs_2asc.ps, gs_ccfnt.ps, gs_dps1.ps, gs_fonts.ps, gs_init.ps, gs_lev2.ps, gs_statd.ps) sym__enc.ps --- 32,36 ---- The file name of the Ghostscript interpreter is gs.exe (MS-DOS and VMS) or gs (Unix). To run it, you also need some external initialization files: ! gs_*.ps (gs_2asc.ps, gs_dps1.ps, gs_fonts.ps, gs_init.ps, gs_lev2.ps, gs_statd.ps) sym__enc.ps *************** *** 181,193 **** ------------ ! If you compiled Ghostscript with the Watcom compiler, you must insert the ! following line in your AUTOEXEC.BAT: ! ! set GS_RUN_EXE=dos4gw ! ! If you are running Ghostscript on a MS-DOS machine with a display that is ! not EGA/VGA compatible, you must build Ghostscript with the BGI driver as ! the default, and you will need the appropriate .BGI file from the Borland ! Turbo C library. (Ghostscript includes the EGA/VGA driver in the executable.) --- 180,188 ---- ------------ ! If you are running Ghostscript on a MS-DOS machine with a display ! that is not EGA/VGA compatible, you must use the Borland compiler. ! You must build Ghostscript with the BGI driver as the default, and ! you will need the appropriate .BGI file from the Borland Turbo C ! library. (Ghostscript includes the EGA/VGA driver in the executable.) *************** *** 352,359 **** ------------------ ! The -T and -Z switches only apply if the interpreter was built for a ! debugging configuration. ! -A Turn on allocator debugging. -e Turn on tracing of error returns from operators. --- 347,355 ---- ------------------ ! The -Z switch only applies if the interpreter was built for a ! debugging configuration (DEBUG=1 or -DDEBUG selected at compile ! time). ! -A Turn on allocator debugging (gs_malloc and gs_free). -e Turn on tracing of error returns from operators. *************** *** 366,380 **** decimal integer (not exceeding 63 on MS-DOS systems). - -Tname:rsize:format - (Only available on MS-DOS systems.) - Trace a procedure within Ghostscript. Any number of - procedures may be traced. rsize is the size of the value - returned by the procedure, in bytes; if omitted, the value - returned by the procedure is not printed. format is a - printf-style template for printing the arguments; if - omitted, the arguments are printed in hex. Note that - MS-DOS provides no way to quote spaces or commas within a - command line argument. - -Zxxx Turn on debugging printout. Each of the xxx characters selects an option: --- 362,365 ---- *************** *** 389,393 **** B = bitmap images, detail c = color/halftone mapper ! d = dictionary lookup f = fill algorithm (summary) F = fill algorithm (detail) --- 374,378 ---- B = bitmap images, detail c = color/halftone mapper ! d = dictionary put/undef f = fill algorithm (summary) F = fill algorithm (detail) *************** *** 400,403 **** --- 385,389 ---- L = command lists, everything m = makefont and font cache + n = name lookup (new names only) o = outliner (stroke) p = path tracer *************** *** 407,410 **** --- 393,397 ---- t = tiling algorithm u = undo saver (for save/restore) + U = undo saver, more detail v = rectangle fill V = device-level output diff -rc2N gs24/utrace.c gs241/utrace.c *** gs24/utrace.c Sun Feb 16 13:29:34 1992 --- gs241/utrace.c *************** *** 1,64 **** - /* Copyright (C) 1989, 1990 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. */ - - /* utrace.c */ - /* Dummy tracing package for Unix C */ - #include - #include - #include "std.h" - - /* This file contains stubs that replace trace.c for Unix and VMS. */ - - char * - strupr(char *str) - { return str; - } - - /* Open the map file */ - FILE * - trace_open_map(char *mapname, long *preloc) - { return NULL; - } - - /* Enumerate a symbol file */ - char * - trace_next_symbol(char **paddr, FILE *mapf) - { return NULL; - } - - - /* Look up a symbol in a file */ - char * - trace_find_symbol(char *name, FILE *mapf) - { return NULL; - } - - int trace_flush_flag; - - /* Trace a named procedure */ - int - trace_name(char *name, FILE *mapf, char *arg_format, int retsize) - { return -1; - } - - /* Trace a procedure */ - int - trace(void (*proc)(), char *name, char *arg_format, int retsize) - { return -1; - } --- 0 ---- diff -rc2N gs24/vms-cc.mak gs241/vms-cc.mak *** gs24/vms-cc.mak Wed Mar 25 14:09:16 1992 --- gs241/vms-cc.mak Tue Apr 21 04:16:44 1992 *************** *** 83,87 **** $ ! $ ! ! $ ! Create a minimal gconfig.h and gconfig.ps $ ! $ CREATE GCONFIG.H --- 83,87 ---- $ ! $ ! ! $ ! Create a minimal gconfig.h $ ! $ CREATE GCONFIG.H *************** *** 88,94 **** device_(gs_x11_device) $ ! - $ CREATE GCONFIG.PS - % - $ ! $ ! Create an empty object library $ ! --- 88,91 ---- *************** *** 101,104 **** --- 98,102 ---- GDEVMEM1 GDEVMEM2 + GDEVMEM3 GP_VMS GSCHAR *************** *** 247,251 **** $ CC'CDEF/NOLIST/OBJECT=GS.OBJ GS.CC $ LINK'LDEF/NOMAP/EXE=GS.EXE GS,GSMAIN,UTRACE,GDEVX,GDEVXINI,GCONFIG,- ! GS/LIB/INCLUDE=(GDEVMEM1,GDEVMEM2,GXCLIST,- ZARITH,ZARRAY,ZBSEQ,ZCHAR,ZCOLOR,ZCONTROL,ZDEVICE,ZDPS1,- ZDICT,ZFILE,ZFILEIO,ZFILTER,ZFILTER2,ZFONT,ZFONT0,ZFONT1,ZFONT2,- --- 245,249 ---- $ CC'CDEF/NOLIST/OBJECT=GS.OBJ GS.CC $ LINK'LDEF/NOMAP/EXE=GS.EXE GS,GSMAIN,UTRACE,GDEVX,GDEVXINI,GCONFIG,- ! GS/LIB/INCLUDE=(GDEVMEM1,GDEVMEM2,GDEVMEM3,GXCLIST,- ZARITH,ZARRAY,ZBSEQ,ZCHAR,ZCOLOR,ZCONTROL,ZDEVICE,ZDPS1,- ZDICT,ZFILE,ZFILEIO,ZFILTER,ZFILTER2,ZFONT,ZFONT0,ZFONT1,ZFONT2,- diff -rc2N gs24/vms-gcc.mak gs241/vms-gcc.mak *** gs24/vms-gcc.mak Wed Mar 25 14:09:38 1992 --- gs241/vms-gcc.mak Tue Apr 21 04:16:54 1992 *************** *** 78,82 **** $ ! $ ! ! $ ! Create a minimal gconfig.h and gconfig.ps $ ! $ CREATE GCONFIG.H --- 78,82 ---- $ ! $ ! ! $ ! Create a minimal gconfig.h $ ! $ CREATE GCONFIG.H *************** *** 83,90 **** device_(gs_x11_device) $ ! - $ CREATE GCONFIG.PS - % $ ! - $ ! $ ! Create an empty object library $ ! --- 83,87 ---- *************** *** 97,100 **** --- 94,98 ---- GDEVMEM1 GDEVMEM2 + GDEVMEM3 GP_VMS GSCHAR *************** *** 225,229 **** $ GCC'CDEF/NOLIST/OBJECT=GS.OBJ GS.C $ LINK'LDEF/NOMAP/EXE=GS.EXE GS,GSMAIN,UTRACE,GDEVX,GCONFIG,- ! GS/LIB/INCLUDE=(GDEVMEM1,GDEVMEM2,GXCLIST,- ZARITH,ZARRAY,ZBSEQ,ZCHAR,ZCOLOR,ZCONTROL,ZDEVICE,ZDPS1,- ZDICT,ZFILE,ZFILEIO,ZFILTER,ZFILTER2,ZFONT,ZFONT0,ZFONT1,ZFONT2,- --- 223,227 ---- $ GCC'CDEF/NOLIST/OBJECT=GS.OBJ GS.C $ LINK'LDEF/NOMAP/EXE=GS.EXE GS,GSMAIN,UTRACE,GDEVX,GCONFIG,- ! GS/LIB/INCLUDE=(GDEVMEM1,GDEVMEM2,GDEVMEM3,GXCLIST,- ZARITH,ZARRAY,ZBSEQ,ZCHAR,ZCOLOR,ZCONTROL,ZDEVICE,ZDPS1,- ZDICT,ZFILE,ZFILEIO,ZFILTER,ZFILTER2,ZFONT,ZFONT0,ZFONT1,ZFONT2,- diff -rc2N gs24/watc.mak gs241/watc.mak *** gs24/watc.mak Wed Mar 25 14:13:32 1992 --- gs241/watc.mak Mon Apr 20 19:40:08 1992 *************** *** 173,177 **** # It only has to handle stdin and stdout, no options. uniq$(XE): uniq.c ! $(CCL) $(CCFLAGS) -i=$(LIBDIR) uniq.c # Define the compilation flags. --- 173,178 ---- # 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. *************** *** 218,222 **** # Choose the device(s) to include. See devs.mak for details. ! DEVICE_DEVS=vga.dev ega.dev epson.dev bj10e.dev deskjet.dev laserjet.dev paintjet.dev !include gs.mak !include devs.mak --- 219,226 ---- # Choose the device(s) to include. See devs.mak for details. ! DEVICE_DEVS=vga.dev ega.dev tseng.dev epson.dev bj10e.dev paintjet.dev ! DEVICE_DEVS2=deskjet.dev djet500.dev laserjet.dev ljetplus.dev ljet2p.dev ljet3.dev ! DEVICE_DEVS3=pbm.dev pbmraw.dev pgm.dev pgmraw.dev ppm.dev ppmraw.dev ! DEVICE_DEVS4=gifmono.dev gif8.dev pcxmono.dev pcx16.dev pcx256.dev !include gs.mak !include devs.mak *************** *** 250,262 **** erase gdevepsn.obj ! # Tracing package (dummy) - utrace.obj: utrace.c - - LIBDOS=$(LIB) gp_iwatc.$(OBJ) gp_dosfb.$(OBJ) gp_msdos.$(OBJ) obj.tr lib.tr - # Interpreter main program ! GS_ALL=gs.$(OBJ) $(INT) $(INTASM) gsmain.$(OBJ) utrace.$(OBJ) $(LIBDOS) gs.exe: $(GS_ALL) --- 254,262 ---- erase gdevepsn.obj ! LIBDOS=$(LIB) 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) gs.exe: $(GS_ALL) diff -rc2N gs24/x_.h gs241/x_.h *** gs24/x_.h Wed Mar 4 03:01:04 1992 --- gs241/x_.h Tue Apr 7 16:46:56 1992 *************** *** 81,85 **** # define XSync xsync # define XVisualIDFromVisual xvisualidfromvisual - # define XmuLookupStandardColormap xmulookupstandardcolormap # endif /* ifdef __GNUC__ */ --- 81,84 ---- *************** *** 92,96 **** # if defined(XtSpecificationRelease) && (XtSpecificationRelease >= 4) # define HaveStdCMap 1 - # include # endif --- 91,94 ---- *************** *** 104,108 **** # if defined(XtSpecificationRelease) && (XtSpecificationRelease >= 4) # define HaveStdCMap 1 - # include # endif --- 102,105 ---- diff -rc2N gs24/zarith.c gs241/zarith.c *** gs24/zarith.c Wed Dec 4 16:37:22 1991 --- gs241/zarith.c Mon Apr 6 12:57:40 1992 *************** *** 62,66 **** ) { /* Overflow, convert to real */ ! make_real(opm1, (float)op[-1].value.intval - int2); } } --- 62,66 ---- ) { /* Overflow, convert to real */ ! make_real(opm1, (float)(op[-1].value.intval - int2) + int2); } } diff -rc2N gs24/zarray.c gs241/zarray.c *** gs24/zarray.c Mon May 20 05:54:42 1991 --- gs241/zarray.c Thu Apr 9 17:52:20 1992 *************** *** 32,36 **** /* Forward references */ ! private int make_array(P4(os_ptr, int, int, char *)); /* array */ --- 32,36 ---- /* Forward references */ ! private int make_array(P4(os_ptr, int, int, const char *)); /* array */ *************** *** 102,106 **** /* Don't fill it in. */ private int ! make_array(register os_ptr op, int type, int attrs, char *client_name) { ref *abody; uint size; --- 102,106 ---- /* Don't fill it in. */ private int ! make_array(register os_ptr op, int type, int attrs, const char *client_name) { ref *abody; uint size; diff -rc2N gs24/zchar.c gs241/zchar.c *** gs24/zchar.c Wed Dec 4 16:22:18 1991 --- gs241/zchar.c Sat Apr 18 09:39:22 1992 *************** *** 1,3 **** ! /* Copyright (C) 1989, 1990, 1991 Aladdin Enterprises. All rights reserved. Distributed by Free Software Foundation, Inc. --- 1,3 ---- ! /* Copyright (C) 1989, 1992 Aladdin Enterprises. All rights reserved. Distributed by Free Software Foundation, Inc. *************** *** 33,36 **** --- 33,37 ---- #include "alloc.h" #include "dict.h" + #include "dstack.h" /* for systemdict */ #include "font.h" #include "estack.h" *************** *** 63,68 **** private int finish_stringwidth(P1(os_ptr)); private int i_finish_stringwidth; ! private gs_show_enum *find_show(); ! private void free_show(); /* show */ --- 64,69 ---- private int finish_stringwidth(P1(os_ptr)); private int i_finish_stringwidth; ! private gs_show_enum *find_show(P0()); ! private void free_show(P0()); /* show */ diff -rc2N gs24/zcontext.c gs241/zcontext.c *** gs24/zcontext.c Tue Jan 7 15:40:04 1992 --- gs241/zcontext.c Sat Apr 18 18:57:22 1992 *************** *** 186,189 **** --- 186,190 ---- reload_stack(osbot, ossize, osp); reload_stack(esbot, essize, esp); + esfile = 0; reload_stack(dstack, dssize, dsp); #undef reload_stack diff -rc2N gs24/zcontrol.c gs241/zcontrol.c *** gs24/zcontrol.c Thu Feb 6 14:50:18 1992 --- gs241/zcontrol.c Mon Apr 20 19:00:44 1992 *************** *** 1,3 **** ! /* Copyright (C) 1989, 1990, 1991 Aladdin Enterprises. All rights reserved. Distributed by Free Software Foundation, Inc. --- 1,3 ---- ! /* Copyright (C) 1989, 1992 Aladdin Enterprises. All rights reserved. Distributed by Free Software Foundation, Inc. *************** *** 31,34 **** --- 31,38 ---- int i_zfor; + /* Check for updating the currentfile cache. */ + #define esfile_check(ep)\ + if ( r_has_type_attrs(ep, t_file, a_executable) ) esfile = 0 + /* Forward references */ private es_ptr find_stopped(P0()); *************** *** 41,44 **** --- 45,49 ---- ++esp; ref_assign(esp, op); + esfile_check(esp); pop(1); return o_push_estack; *************** *** 53,56 **** --- 58,62 ---- ++esp; ref_assign(esp, op); + esfile_check(esp); } pop(2); *************** *** 70,73 **** --- 76,80 ---- { ref_assign(esp, op); } + esfile_check(esp); pop(3); return o_push_estack; *************** *** 87,90 **** --- 94,98 ---- float params[3]; register es_ptr ep; + check_proc(*op); if ( r_has_type(op - 1, t_integer) && r_has_type(op - 2, t_integer) && *************** *** 184,187 **** --- 192,196 ---- zrepeat(register os_ptr op) { check_type(op[-1], t_integer); + check_proc(*op); if ( op[-1].value.intval < 0 ) return e_rangecheck; check_estack(5); *************** *** 215,219 **** int zloop(register os_ptr op) ! { check_op(1); check_estack(4); /* Push a mark and the procedure, and invoke */ --- 224,228 ---- int zloop(register os_ptr op) ! { check_proc(*op); check_estack(4); /* Push a mark and the procedure, and invoke */ *************** *** 238,241 **** --- 247,251 ---- zexit(register os_ptr op) { es_ptr ep = esp; + esfile = 0; /* be lazy, just clear the cache */ while ( ep >= esbot ) { if ( r_has_type(ep, t_null) ) /* control mark */ *************** *** 258,261 **** --- 268,272 ---- zstop(register os_ptr op) { es_ptr ep = find_stopped(); + esfile = 0; /* be lazy, just clear the cache */ if ( ep ) { esp = ep - 1; *************** *** 280,283 **** --- 291,295 ---- ++esp; make_false(esp); *++esp = *op; /* execute the operand */ + esfile_check(esp); pop(1); return o_push_estack; diff -rc2N gs24/zdevice.c gs241/zdevice.c *** gs24/zdevice.c Fri Feb 28 14:39:50 1992 --- gs241/zdevice.c Tue Apr 7 16:21:06 1992 *************** *** 75,79 **** int zdevicename(register os_ptr op) ! { char *dname; int code; check_type(*op, t_device); --- 75,79 ---- int zdevicename(register os_ptr op) ! { const char *dname; int code; check_type(*op, t_device); diff -rc2N gs24/zdict.c gs241/zdict.c *** gs24/zdict.c Sun Dec 29 10:09:32 1991 --- gs241/zdict.c Thu Apr 16 12:50:12 1992 *************** *** 1,3 **** ! /* Copyright (C) 1989, 1990, 1991 Aladdin Enterprises. All rights reserved. Distributed by Free Software Foundation, Inc. --- 1,3 ---- ! /* Copyright (C) 1989, 1992 Aladdin Enterprises. All rights reserved. Distributed by Free Software Foundation, Inc. *************** *** 24,27 **** --- 24,28 ---- #include "oper.h" #include "dict.h" + #include "dstack.h" #include "store.h" *************** *** 84,89 **** /* def */ int ! zdef(register os_ptr op) { int code; check_op(2); --- 85,92 ---- /* def */ + /* We make this into a separate procedure because */ + /* the interpreter will almost always call it directly. */ int ! zop_def(register os_ptr op) { int code; check_op(2); *************** *** 90,95 **** if ( r_has_type(op - 1, t_null) ) return e_typecheck; check_dict_write(*dsp); ! code = dict_put(dsp, op - 1, op); ! if ( !code ) pop(2); return code; } --- 93,102 ---- if ( r_has_type(op - 1, t_null) ) return e_typecheck; check_dict_write(*dsp); ! return dict_put(dsp, op - 1, op); ! } ! int ! zdef(os_ptr op) ! { int code = zop_def(op); ! if ( !code ) { pop(2); } return code; } *************** *** 192,196 **** check_dict_read(*op1); check_dict_write(*op); ! if ( dict_length(op) != 0 || dict_maxlength(op) < dict_length(op1) ) return e_rangecheck; dict_copy(op1, op); --- 199,203 ---- check_dict_read(*op1); check_dict_write(*op); ! if ( !dict_auto_expand && (dict_length(op) != 0 || dict_maxlength(op) < dict_length(op1)) ) return e_rangecheck; dict_copy(op1, op); diff -rc2N gs24/zfile.c gs241/zfile.c *** gs24/zfile.c Fri Mar 6 15:44:26 1992 --- gs241/zfile.c Mon Apr 20 19:04:06 1992 *************** *** 1,3 **** ! /* Copyright (C) 1989, 1990, 1991 Aladdin Enterprises. All rights reserved. Distributed by Free Software Foundation, Inc. --- 1,3 ---- ! /* Copyright (C) 1989, 1992 Aladdin Enterprises. All rights reserved. Distributed by Free Software Foundation, Inc. *************** *** 27,31 **** #include "oper.h" #include "alloc.h" ! #include "estack.h" /* for filenameforall */ #include "iutil.h" #include "save.h" /* for restore */ --- 27,31 ---- #include "oper.h" #include "alloc.h" ! #include "estack.h" /* for filenameforall, file_close */ #include "iutil.h" #include "save.h" /* for restore */ *************** *** 35,44 **** /* Forward references */ ! int lib_file_open(P6(byte *, uint, byte *, uint, uint *, ref *)); ! int file_open(P5(byte *, uint, char *, ref *, stream **)); int file_close(P2(ref *, stream *)); ! private int open_std_file(P3(os_ptr, char *, os_ptr)); /* In zfileio.c */ ! ref *zget_current_file(P0()); /* Imported from gs.c */ --- 35,44 ---- /* Forward references */ ! int lib_file_open(P6(const byte *, uint, byte *, uint, uint *, ref *)); ! int file_open(P5(const byte *, uint, const char *, ref *, stream **)); int file_close(P2(ref *, stream *)); ! private int open_std_file(P3(os_ptr, const char *, os_ptr)); /* In zfileio.c */ ! es_ptr zget_current_file(P0()); /* Imported from gs.c */ *************** *** 74,78 **** /* statementedit is equivalent to lineedit for now */ stream std_files[num_std_files]; ! private char *std_file_names[num_std_files] = { "%stdin", "%stdout", --- 74,78 ---- /* statementedit is equivalent to lineedit for now */ stream std_files[num_std_files]; ! private const char *std_file_names[num_std_files] = { "%stdin", "%stdout", *************** *** 164,174 **** return e_invalidaccess; /* can't close std file */ if ( (code = file_close(op, s)) >= 0 ) ! { /* If we just closed the file from which the interpreter */ ! /* is reading, zap it on the exec stack. */ ! ref *fp = zget_current_file(); ! if ( fp != 0 && fptr(fp) == fptr(op) ) ! /* A null would confuse the estack parser.... */ ! make_tasv(fp, t_array, a_executable+a_execute, 0, refs, (ref *)0); ! pop(1); } return code; --- 164,168 ---- return e_invalidaccess; /* can't close std file */ if ( (code = file_close(op, s)) >= 0 ) ! { pop(1); } return code; *************** *** 327,331 **** /* The startup code calls this to open the initialization file gs_init.ps. */ int ! lib_file_open(byte *fname, uint len, byte *cname, uint max_clen, uint *pclen, ref *pfile) { int code; --- 321,325 ---- /* The startup code calls this to open the initialization file gs_init.ps. */ int ! lib_file_open(const byte *fname, uint len, byte *cname, uint max_clen, uint *pclen, ref *pfile) { int code; *************** *** 338,342 **** return code; } ! if ( gp_file_name_is_absolute((char *)fname, len) ) return e_undefinedfilename; /* Go through the list of search paths */ --- 332,336 ---- return code; } ! if ( gp_file_name_is_absolute((const char *)fname, len) ) return e_undefinedfilename; /* Go through the list of search paths */ *************** *** 353,357 **** plen = npath - path; cstr = gp_file_name_concat_string(path, plen, ! (char *)fname, len); /* Concatenate the prefix, combiner, and file name. */ clen = plen + strlen(cstr) + len; --- 347,352 ---- plen = npath - path; cstr = gp_file_name_concat_string(path, plen, ! (const char *)fname, ! len); /* Concatenate the prefix, combiner, and file name. */ clen = plen + strlen(cstr) + len; *************** *** 379,383 **** /* The filter routines also use this. */ int ! file_open(byte *fname, uint len, char *file_access, ref *pfile, stream **ps) { byte *buffer; stream *s; --- 374,379 ---- /* The filter routines also use this. */ int ! file_open(const byte *fname, uint len, const char *file_access, ! ref *pfile, stream **ps) { byte *buffer; stream *s; *************** *** 475,478 **** --- 471,483 ---- } } + /* If we just closed the file from which the interpreter */ + /* is reading, zap it on the exec stack. */ + { es_ptr cfp = zget_current_file(); + if ( cfp != 0 && fptr(cfp) == fptr(fp) ) + { /* A null would confuse the estack parser.... */ + make_tasv(cfp, t_array, a_executable+a_execute, 0, refs, (ref *)0); + esfile = 0; /* clear currentfile cache */ + } + } return 0; } *************** *** 484,492 **** /* return e_undefinedfilename. */ private int ! open_std_file(os_ptr pfname, char *file_access, os_ptr pfile) { int i; for ( i = 0; i < num_std_files; i++ ) if ( !bytes_compare(pfname->value.bytes, r_size(pfname), ! (byte *)std_file_names[i], strlen(std_file_names[i])) ) --- 489,497 ---- /* return e_undefinedfilename. */ private int ! open_std_file(os_ptr pfname, const char *file_access, os_ptr pfile) { int i; for ( i = 0; i < num_std_files; i++ ) if ( !bytes_compare(pfname->value.bytes, r_size(pfname), ! (const byte *)std_file_names[i], strlen(std_file_names[i])) ) diff -rc2N gs24/zfileio.c gs241/zfileio.c *** gs24/zfileio.c Fri Feb 28 18:17:36 1992 --- gs241/zfileio.c Mon Apr 20 18:50:48 1992 *************** *** 1,3 **** ! /* Copyright (C) 1989, 1990, 1991 Aladdin Enterprises. All rights reserved. Distributed by Free Software Foundation, Inc. --- 1,3 ---- ! /* Copyright (C) 1989, 1992 Aladdin Enterprises. All rights reserved. Distributed by Free Software Foundation, Inc. *************** *** 34,38 **** /* Forward references */ int zreadline_from(P4(byte *, uint, uint *, stream *)); ! ref *zget_current_file(P0()); private int write_string(P2(os_ptr, stream *)); --- 34,38 ---- /* Forward references */ int zreadline_from(P4(byte *, uint, uint *, stream *)); ! es_ptr zget_current_file(P0()); private int write_string(P2(os_ptr, stream *)); *************** *** 45,49 **** int ch; check_read_file(s, op); - check_read(*op); ch = sgetc(s); if ( ch == EOFC ) --- 45,48 ---- *************** *** 63,67 **** ulong ch; check_write_file(s, op - 1); - check_write(op[-1]); check_type(*op, t_integer); ch = op->value.intval; --- 62,65 ---- *************** *** 76,87 **** zreadhexstring(register os_ptr op) { stream *s; - os_ptr op1 = op - 1; - int odd = -1; int code; uint nread; ! check_read_file(s, op1); ! check_read(*op1); ! check_type(*op, t_string); ! check_write(*op); code = sreadhex(s, op->value.bytes, r_size(op), &nread, &odd, 1); switch ( code ) --- 74,82 ---- zreadhexstring(register os_ptr op) { stream *s; int code; uint nread; ! int odd = -1; ! check_read_file(s, op - 1); ! check_write_type(*op, t_string); code = sreadhex(s, op->value.bytes, r_size(op), &nread, &odd, 1); switch ( code ) *************** *** 99,103 **** return e_ioerror; } ! *op1 = *op; make_bool(op, 1 - code); return 0; --- 94,98 ---- return e_ioerror; } ! ref_assign(op - 1, op); make_bool(op, 1 - code); return 0; *************** *** 110,117 **** register byte ch; register byte *p; ! register char _ds *hex_digits = "0123456789abcdef"; register uint len; check_write_file(s, op - 1); - check_write(op[-1]); check_read_type(*op, t_string); p = op->value.bytes; --- 105,111 ---- register byte ch; register byte *p; ! register const char _ds *hex_digits = "0123456789abcdef"; register uint len; check_write_file(s, op - 1); check_read_type(*op, t_string); p = op->value.bytes; *************** *** 132,136 **** uint len, rlen; check_read_file(s, op - 1); - check_read(op[-1]); check_write_type(*op, t_string); len = r_size(op); --- 126,129 ---- *************** *** 148,152 **** int code; check_write_file(s, op - 1); - check_write(op[-1]); code = write_string(op, s); if ( code >= 0 ) pop(2); --- 141,144 ---- *************** *** 161,165 **** int code; check_read_file(s, op - 1); - check_read(op[-1]); check_write_type(*op, t_string); code = zreadline_from(op->value.bytes, r_size(op), &count, s); --- 153,156 ---- *************** *** 213,217 **** int code; check_read_file(s, op); - check_read(*op); switch ( code = scan_token(s, 0, &token) ) { --- 204,207 ---- *************** *** 299,305 **** int zcurrentfile(register os_ptr op) ! { ref *fp; push(1); ! if ( (fp = zget_current_file()) == 0 ) { /* Return an invalid file object. */ /* This doesn't make a lot of sense to me, */ --- 289,298 ---- int zcurrentfile(register os_ptr op) ! { es_ptr fp; push(1); ! /* Check the cache first */ ! if ( esfile != 0 ) ! ref_assign(op, esfile); ! else if ( (fp = zget_current_file()) == 0 ) { /* Return an invalid file object. */ /* This doesn't make a lot of sense to me, */ *************** *** 308,313 **** } else ! *op = *fp; ! /* Make sure the returned value is literal. */ r_clear_attrs(op, a_executable); return 0; --- 301,309 ---- } else ! { ref_assign(op, fp); ! /* Load the cache */ ! esfile = fp; ! } ! /* Make the returned value literal. */ r_clear_attrs(op, a_executable); return 0; *************** *** 376,380 **** int code; check_write_file(s, op - 1); - check_write(op[-1]); check_type(*op, t_device); if ( !gs_device_is_memory(op->value.pdevice) ) return e_typecheck; --- 372,375 ---- *************** *** 421,433 **** /* Get the current file from which the interpreter is reading. */ ! ref * zget_current_file() ! { es_ptr ep = esp; while ( ep >= esbot ) ! { if ( r_has_type(ep, t_file) && r_has_attr(ep, a_executable) ) ! return (ref *)ep; ep--; } ! return (ref *)0; } --- 416,428 ---- /* Get the current file from which the interpreter is reading. */ ! es_ptr zget_current_file() ! { register es_ptr ep = esp; while ( ep >= esbot ) ! { if ( r_has_type_attrs(ep, t_file, a_executable) ) ! return ep; ep--; } ! return (es_ptr)0; } diff -rc2N gs24/zfont.c gs241/zfont.c *** gs24/zfont.c Wed Dec 4 01:55:14 1991 --- gs241/zfont.c Tue Apr 7 16:27:38 1992 *************** *** 1,3 **** ! /* Copyright (C) 1989, 1990, 1991 Aladdin Enterprises. All rights reserved. Distributed by Free Software Foundation, Inc. --- 1,3 ---- ! /* Copyright (C) 1989, 1992 Aladdin Enterprises. All rights reserved. Distributed by Free Software Foundation, Inc. *************** *** 67,71 **** private void zfont_init() ! { static names_def fnd[] = { /* Create the names of the global known objects. */ --- 67,71 ---- private void zfont_init() ! { static const names_def fnd[] = { /* Create the names of the global known objects. */ diff -rc2N gs24/zfont1.c gs241/zfont1.c *** gs24/zfont1.c Sun Mar 8 18:53:08 1992 --- gs241/zfont1.c Sun Mar 29 14:29:08 1992 *************** *** 136,140 **** int code; check_type(*op, t_dictionary); ! code = font_int_param(op, &name_PaintType, 0, 2, 0, &data1.PaintType); if ( code < 0 ) return 0; if ( dict_find(op, &name_CharStrings, &pcharstrings) <= 0 || --- 136,140 ---- int code; check_type(*op, t_dictionary); ! code = font_int_param(op, &name_PaintType, 0, 3, 0, &data1.PaintType); if ( code < 0 ) return 0; if ( dict_find(op, &name_CharStrings, &pcharstrings) <= 0 || diff -rc2N gs24/zfont2.c gs241/zfont2.c *** gs24/zfont2.c Fri Dec 6 17:56:48 1991 --- gs241/zfont2.c Tue Apr 7 16:27:14 1992 *************** *** 1,3 **** ! /* Copyright (C) 1989, 1990, 1991 Aladdin Enterprises. All rights reserved. Distributed by Free Software Foundation, Inc. --- 1,3 ---- ! /* Copyright (C) 1989, 1992 Aladdin Enterprises. All rights reserved. Distributed by Free Software Foundation, Inc. *************** *** 60,64 **** private void zfont2_init() ! { static names_def fnd2[] = { /* Create the names of the standard elements of */ --- 60,64 ---- private void zfont2_init() ! { static const names_def fnd2[] = { /* Create the names of the standard elements of */ diff -rc2N gs24/zgeneric.c gs241/zgeneric.c *** gs24/zgeneric.c Sun Feb 16 18:02:50 1992 --- gs241/zgeneric.c Mon Apr 20 19:21:14 1992 *************** *** 1,3 **** ! /* Copyright (C) 1989, 1990, 1991 Aladdin Enterprises. All rights reserved. Distributed by Free Software Foundation, Inc. --- 1,3 ---- ! /* Copyright (C) 1989, 1992 Aladdin Enterprises. All rights reserved. Distributed by Free Software Foundation, Inc. *************** *** 41,45 **** /* Forward references */ int array_get(P3(ref *, long, ref *)); ! private int copy_interval(P4(os_ptr, uint, os_ptr, char *)); /* copy */ --- 41,45 ---- /* Forward references */ int array_get(P3(ref *, long, ref *)); ! private int copy_interval(P4(os_ptr, uint, os_ptr, const char *)); /* copy */ *************** *** 159,163 **** check_type(*op1, t_integer); check_write(*op2); ! if ( op1->value.intval < 0 || op1->value.intval >= r_size(op2) ) return e_rangecheck; ref_assign_old(op2->value.refs + (uint)op1->value.intval, op, "put"); --- 159,163 ---- check_type(*op1, t_integer); check_write(*op2); ! if ( (ulong)(op1->value.intval) >= r_size(op2) ) return e_rangecheck; ref_assign_old(op2->value.refs + (uint)op1->value.intval, op, "put"); *************** *** 169,173 **** check_type(*op1, t_integer); check_write(*op2); ! if ( op1->value.intval < 0 || op1->value.intval >= r_size(op2) ) return e_rangecheck; check_type(*op, t_integer); --- 169,173 ---- check_type(*op1, t_integer); check_write(*op2); ! if ( (ulong)(op1->value.intval) >= r_size(op2) ) return e_rangecheck; check_type(*op, t_integer); *************** *** 280,283 **** --- 280,284 ---- break; } + check_proc(*op); /* Push a mark, the composite object, the iteration index, */ /* and the procedure, and invoke the continuation operator. */ *************** *** 419,423 **** /* its length; nothing else has been checked. */ private int ! copy_interval(os_ptr prto, uint index, os_ptr prfrom, char *cname) { int fromtype = r_type(prfrom); uint fromsize = r_size(prfrom); --- 420,424 ---- /* its length; nothing else has been checked. */ private int ! copy_interval(os_ptr prto, uint index, os_ptr prfrom, const char *cname) { int fromtype = r_type(prfrom); uint fromsize = r_size(prfrom); diff -rc2N gs24/zmath.c gs241/zmath.c *** gs24/zmath.c Sun May 12 17:14:46 1991 --- gs241/zmath.c Mon Apr 6 13:36:34 1992 *************** *** 1,3 **** ! /* Copyright (C) 1989, 1990, 1991 Aladdin Enterprises. All rights reserved. Distributed by Free Software Foundation, Inc. --- 1,3 ---- ! /* Copyright (C) 1989, 1992 Aladdin Enterprises. All rights reserved. Distributed by Free Software Foundation, Inc. *************** *** 33,37 **** /* We have to implement this ourselves because */ /* the Unix rand doesn't provide anything equivalent to rrand. */ ! private ulong rand_state; /* Initialize the random number generator. */ --- 33,37 ---- /* We have to implement this ourselves because */ /* the Unix rand doesn't provide anything equivalent to rrand. */ ! private long rand_state; /* Initialize the random number generator. */ *************** *** 159,174 **** int zrand(register os_ptr op) ! { ulong value; ! /* We implement the rand algorithm ourselves. */ ! /* This implementation is not very good. */ ! /* The Unix man page for rand suggests dropping the lowest bits, */ ! /* so that's effectively what we do here. */ ! #define rand_step()\ ! (rand_state = rand_state * 0x41c64e6dL + 0x3039) ! value = rand_step() << 21; ! value += rand_step() << 10; ! value += rand_step() >> 3; push(1); ! make_int(op, value & 0x7fffffffL); return 0; } --- 159,181 ---- int zrand(register os_ptr op) ! { /* ! * We use an algorithm from CACM 31 no. 10, pp. 1192-1201, ! * October 1988. According to a posting by Ed Taft on ! * comp.lang.postscript, Level 2 (Adobe) PostScript interpreters use ! * this algorithm too: ! * x[n+1] = (16807 * x[n]) mod (2^31 - 1) ! */ ! #define A 16807 ! #define M 0x7fffffff ! #define Q 127773 /* M / A */ ! #define R 2836 /* M % A */ ! rand_state = A * (rand_state % Q) - R * (rand_state / Q); ! while ( rand_state <= 0 ) rand_state += M; ! #undef A ! #undef M ! #undef Q ! #undef R push(1); ! make_int(op, rand_state); return 0; } diff -rc2N gs24/zmisc.c gs241/zmisc.c *** gs24/zmisc.c Sun Sep 29 17:50:14 1991 --- gs241/zmisc.c Thu Apr 16 12:53:22 1992 *************** *** 1,3 **** ! /* Copyright (C) 1989, 1990, 1991 Aladdin Enterprises. All rights reserved. Distributed by Free Software Foundation, Inc. --- 1,3 ---- ! /* Copyright (C) 1989, 1992 Aladdin Enterprises. All rights reserved. Distributed by Free Software Foundation, Inc. *************** *** 28,31 **** --- 28,32 ---- #include "alloc.h" #include "dict.h" + #include "dstack.h" /* for name lookup in bind */ #include "name.h" #include "packed.h" diff -rc2N gs24/zpacked.c gs241/zpacked.c *** gs24/zpacked.c Wed Mar 4 15:31:38 1992 --- gs241/zpacked.c Tue Apr 7 16:24:40 1992 *************** *** 1,3 **** ! /* Copyright (C) 1990, 1991 Aladdin Enterprises. All rights reserved. Distributed by Free Software Foundation, Inc. --- 1,3 ---- ! /* Copyright (C) 1990, 1992 Aladdin Enterprises. All rights reserved. Distributed by Free Software Foundation, Inc. *************** *** 77,81 **** /* ensuring that refs in mixed arrays are properly aligned. */ int ! make_packed_array(ref *elts, uint size, ref *paref, char *client_name) { /* Check whether we can make a packed array. */ ref *endp = elts + size; --- 77,81 ---- /* ensuring that refs in mixed arrays are properly aligned. */ int ! make_packed_array(ref *elts, uint size, ref *paref, const char *client_name) { /* Check whether we can make a packed array. */ ref *endp = elts + size; *************** *** 172,176 **** default: /* (shouldn't happen) */ case pt_full_ref: ! ref_assign(pref, (ref *)packed); } } --- 172,176 ---- default: /* (shouldn't happen) */ case pt_full_ref: ! ref_assign(pref, (const ref *)packed); } } diff -rc2N gs24/zpath2.c gs241/zpath2.c *** gs24/zpath2.c Wed Dec 4 16:12:06 1991 --- gs241/zpath2.c Mon Apr 20 18:44:48 1992 *************** *** 73,77 **** zpathforall(register os_ptr op) { gs_path_enum *penum; ! check_op(4); check_estack(8); if ( (penum = (gs_path_enum *)alloc(1, gs_path_enum_sizeof, "pathforall")) == 0 ) --- 73,80 ---- zpathforall(register os_ptr op) { gs_path_enum *penum; ! check_proc(op[-3]); ! check_proc(op[-2]); ! check_proc(op[-1]); ! check_proc(*op); check_estack(8); if ( (penum = (gs_path_enum *)alloc(1, gs_path_enum_sizeof, "pathforall")) == 0 ) diff -rc2N gs24/zprops.c gs241/zprops.c *** gs24/zprops.c Wed Feb 19 12:46:10 1992 --- gs241/zprops.c Tue Apr 7 16:24:00 1992 *************** *** 117,121 **** for ( op = op0, pi = plist, i = count; i != 0; pi++, i-- ) { ref value; ! char *nstr = pi->pname; int nlen = pi->name_size; if ( nstr == 0 ) continue; /* no name, skip */ --- 117,121 ---- for ( op = op0, pi = plist, i = count; i != 0; pi++, i-- ) { ref value; ! const char *nstr = pi->pname; int nlen = pi->name_size; if ( nstr == 0 ) continue; /* no name, skip */ *************** *** 122,126 **** if ( ostop - op < 2 ) return e_stackoverflow; if ( nlen < 0 ) nlen = strlen(nstr); ! code = name_ref((byte *)nstr, nlen, op, 0); if ( code < 0 ) return code; switch ( pi->type ) --- 122,126 ---- if ( ostop - op < 2 ) return e_stackoverflow; if ( nlen < 0 ) nlen = strlen(nstr); ! code = name_ref((const byte *)nstr, nlen, op, 0); if ( code < 0 ) return code; switch ( pi->type ) diff -rc2N gs24/ztype.c gs241/ztype.c *** gs24/ztype.c Tue Feb 25 04:36:08 1992 --- gs241/ztype.c Tue Apr 7 16:23:20 1992 *************** *** 53,57 **** private void ztype_init() ! { static char *tnames[] = { type_name_strings }; int i; for ( i = 0; i < t_next_index; i++ ) --- 53,57 ---- private void ztype_init() ! { static const char *tnames[] = { type_name_strings }; int i; for ( i = 0; i < t_next_index; i++ ) diff -rc2N gs24/zupath.c gs241/zupath.c *** gs24/zupath.c Sat Mar 21 02:01:00 1992 --- gs241/zupath.c Thu Apr 16 12:48:32 1992 *************** *** 24,27 **** --- 24,28 ---- #include "oper.h" #include "dict.h" + #include "dstack.h" #include "iutil.h" #include "state.h" diff -rc2N gs24/zvmem.c gs241/zvmem.c *** gs24/zvmem.c Sat Feb 15 05:54:06 1992 --- gs241/zvmem.c Sat Apr 18 11:31:54 1992 *************** *** 1,3 **** ! /* Copyright (C) 1989, 1991 Aladdin Enterprises. All rights reserved. Distributed by Free Software Foundation, Inc. --- 1,3 ---- ! /* Copyright (C) 1989, 1992 Aladdin Enterprises. All rights reserved. Distributed by Free Software Foundation, Inc. *************** *** 26,29 **** --- 26,30 ---- #include "estack.h" /* for checking in restore */ #include "dict.h" /* ditto */ + #include "dstack.h" #include "save.h" #include "state.h" *************** *** 54,62 **** int code; gs_state *prev, *prev2; ! if ( vmsave == 0 ) return e_VMerror; asave = alloc_save_state(); if ( asave == 0 ) { alloc_free((char *)vmsave, 1, sizeof(vm_save), "zsave"); ! return e_VMerror; } vmsave->asave = asave; --- 55,63 ---- int code; gs_state *prev, *prev2; ! if ( vmsave == 0 ) return_error(e_VMerror); asave = alloc_save_state(); if ( asave == 0 ) { alloc_free((char *)vmsave, 1, sizeof(vm_save), "zsave"); ! return_error(e_VMerror); } vmsave->asave = asave; *************** *** 91,95 **** vmsave = op->value.psave; if ( vmsave == 0 ) /* invalidated save */ ! return e_invalidrestore; asave = vmsave->asave; /* Check the contents of the stacks. */ --- 92,96 ---- vmsave = op->value.psave; if ( vmsave == 0 ) /* invalidated save */ ! return_error(e_invalidrestore); asave = vmsave->asave; /* Check the contents of the stacks. */ *************** *** 102,109 **** } if ( alloc_restore_state_check(asave) < 0 ) ! return e_invalidrestore; ! /* Invalidate any other copies of this save object on the stacks. */ restore_fix_stack(osbot, op, asave); restore_fix_stack(esbot, esp + 1, asave); /* Now it's safe to restore the state of memory. */ alloc_restore_state(asave); --- 103,113 ---- } if ( alloc_restore_state_check(asave) < 0 ) ! return_error(e_invalidrestore); ! /* Invalidate any other copies of this save object on the stacks, */ ! /* and reset l_new in all stack entries if the new restore level */ ! /* is zero. */ restore_fix_stack(osbot, op, asave); restore_fix_stack(esbot, esp + 1, asave); + restore_fix_stack(dstack, dsp + 1, asave); /* Now it's safe to restore the state of memory. */ alloc_restore_state(asave); *************** *** 134,138 **** /* Names are special because of how they are allocated. */ if ( alloc_name_is_since_save(stkp, asave) ) ! return e_invalidrestore; continue; case t_save: ptr = (char *)stkp->value.psave; break; --- 138,142 ---- /* Names are special because of how they are allocated. */ if ( alloc_name_is_since_save(stkp, asave) ) ! return_error(e_invalidrestore); continue; case t_save: ptr = (char *)stkp->value.psave; break; *************** *** 145,149 **** } if ( alloc_is_since_save(ptr, asave) ) ! return e_invalidrestore; } --- 149,153 ---- } if ( alloc_is_since_save(ptr, asave) ) ! return_error(e_invalidrestore); } *************** *** 151,155 **** } /* Fix up the contents of a stack by invalidating */ ! /* any save objects newer than the save being restored. */ private void restore_fix_stack(ref *bot, ref *top, alloc_save *asave) --- 155,162 ---- } /* Fix up the contents of a stack by invalidating */ ! /* any save objects newer than the save being restored, */ ! /* and, if the new save level is zero, clearing the l_new */ ! /* bit in all the entries (since we can't tolerate values with */ ! /* l_new set if the save level is zero). */ private void restore_fix_stack(ref *bot, ref *top, alloc_save *asave) *************** *** 162,165 **** --- 169,173 ---- ) stkp->value.psave = 0; + r_clear_attrs(stkp, l_new); /* always do it, no harm */ } }