🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.ghostscript.bug
Article #652

Re: Bugs ...

#652
From: Anders Thulin
Date: Sat, 25 Mar 1989 11:15
169 lines
5722 bytes
Some more bugs and problems in GhostScript 1.2.  Patches are included
for those I understood, the remainder are left as exercises :-)

Suggested patches for these are at end:

* Invoking gs with an unknown option (-p) produces an 'Unknown switch
  -p' message and a core dump. The core dump seems unnecessary.
  gsmain(gsmain.c) calls abort() rather than exit(). 

* There is no statusdict. Hence some 'investigative' programs will
  fail. The one I was using was PSDoctor 1.0.0, recently distributed
  on Usenet. Adding some definitions in ghost.ps fixed the problem.
  Note: my ideas of printer names, etc. might not be yours.

* PSDoctor also showed a problem with 'usertime'. The call to clock()
  in gs_usertime(gsmisc.c) returns microseconds rather than
  milliseconds as wanted.

* Due to the redefinition of findfont in gfonts.ps it was impossible
  to create user defined fonts (see red book, p. 101-102). Changing the
  redefinition at bit fixed the problem. 

No patches for these:

* Halftone screens appear to be aligned with user coordinates rather
  than device coordinates. See the star example on page 51 in the red
  book.

* The lineofcircles example in the blue book (p. 69-70) never
  terminates.  Debug printouts of 'xpos', 'pagewidth', and 'xpos
  pagewidth le' show that although xpos is increased beyond pagewidth
  (i.e. 612), the expression 'xpos pagewidth le' doesn't become false
  when x > pagewidth.

My suggested patches to the 1.2 distribution:

*** gsmisc.c	Sat Mar 25 08:29:08 1989
--- gsmisc.new.c	Sat Mar 25 08:30:58 1989
***************
*** 70,75 ****
  #else				/* Unix */
  	long clock();
  	pdt[0] = 0;
! 	pdt[1] = clock();
  #endif
  }
--- 70,75 ----
  #else				/* Unix */
  	long clock();
  	pdt[0] = 0;
! 	pdt[1] = clock() / 1000; /* clock() returns microseconds */
  #endif
  }
*** gsmain.c	Sat Mar 25 08:39:39 1989
--- gsmain.new.c	Sat Mar 25 08:40:06 1989
***************
*** 110,116 ****
  			default:
  				if ( (*switch_proc)(*arg, arg + 1) < 0 )
  				   {	printf("Unknown switch %s", arg - 1);
! 					abort();
  				   }
  				break;
  			case 'Z':
--- 110,116 ----
  			default:
  				if ( (*switch_proc)(*arg, arg + 1) < 0 )
  				   {	printf("Unknown switch %s", arg - 1);
! 					exit(1);
  				   }
  				break;
  			case 'Z':
*** ghost.ps	Thu Mar 23 13:49:44 1989
--- ghost.new.ps	Sat Mar 25 09:37:32 1989
***************
*** 247,254 ****
  	/lslash /oslash /oe /germandbls /.notdef /.notdef /.notdef /.notdef
  } cvlit readonly def
  
! % Close up systemdict.
! end
  systemdict readonly pop
  
  % Establish a default upper limit in the character cache,
--- 247,291 ----
  	/lslash /oslash /oe /germandbls /.notdef /.notdef /.notdef /.notdef
  } cvlit readonly def
  
! % Create a dummy statusdict, faking lots of things:
! 
!   /statusdict 50 dict def
!   statusdict begin
!    /checkpassword {pop false} def
!    /defaulttimeouts {0 60 300} def
!    /dostartpage {false} def
!    /eescratch {pop 0} def
!    /idlefonts {mark} def
!    /jobname null def
!    /jobtimeout {0} def
!    /manualfeed false def
!    /manualfeedtimeout 60 def
!    /margins {0 0} def
!    /pagecount {4711} def
!    /pagestackorder {true} def
!    /pagetype {0} def
!    /prefeed false def
!    /printererror {pop pop} def
!    /printername {pop product} def % !! Incorrect !!
!    /product 31 string def
!      /product (GhostWriter) def
!    /revision 1 def		
!    /sccbatch {pop 9600 0} def
!    /sccinteractive {pop 9600 0} def
!    /setdefaulttimeouts {pop pop pop} def
!    /setdostartpage {pop} def
!    /seteescratch {pop pop} def
!    /setidlefonts { ] pop} def
!    /setjobtimeout {pop} def
!    /setmargins {pop pop} def
!    /setpagetype {pop} def
!    /setpassword {pop pop false} def
!    /setprintername {pop} def
!    /setsccbatch {pop pop pop} def
!    /setsccinteractive {pop pop pop} def
!    /waittimeout 300 def
!   end	  % statusdict
! end	% systemdict
  systemdict readonly pop
  
  % Establish a default upper limit in the character cache,
*** gfonts.ps	Fri Feb 24 08:18:46 1989
--- gfonts.new.ps	Sat Mar 25 10:08:38 1989
***************
*** 62,71 ****
  
  /TheFont exch definefont pop
  
! % Redefine findfont so it always finds the standard font
  
  /.findfont /findfont load def
! /findfont {pop /TheFont .findfont} def
  
  % Define the PostScript standard fonts as copies of the bit font.
  % This is a no-op for now, since we have redefined findfont.
--- 62,77 ----
  
  /TheFont exch definefont pop
  
! % Redefine findfont so it always returns the standard font
! % when it doesn't know the font requested
  
  /.findfont /findfont load def
! /findfont {	% key  findfont  font
!   dup FontDirectory exch known
!   {FontDirectory exch get}
!   {pop FontDirectory /TheFont get}
!   ifelse
! } def
  
  % Define the PostScript standard fonts as copies of the bit font.
  % This is a no-op for now, since we have redefined findfont.

- - - - - - end of patches - - - - - - 

-- 
Anders Thulin			INET : ath@prosys.se
ProgramSystem AB		UUCP : ...!{uunet,mcvax}!enea!prosys!ath
Teknikringen 2A			PHONE: +46 (0)13 21 40 40
S-583 30 Linkoping, Sweden	FAX  : +46 (0)13 21 36 35
Technical Details
Message-ID: <403@helios.prosys.se>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!lll-winken!uunet!mcvax!kth!draken!liuida!prosys!ath
References: <401@helios.prosys.se>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!lll-winken!uunet!mcvax!kth!draken!liuida!prosys!ath
From: ath@helios.prosys.se (Anders Thulin)
Newsgroups: gnu.ghostscript.bug
Subject: Re: Bugs ...
Message-ID: <403@helios.prosys.se>
Date: 25 Mar 89 11:15:18 GMT
References: <401@helios.prosys.se>
Reply-To: ath@prosys.se
Organization: Programsystem AB, Linkoping, SWEDEN
Lines: 169