🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sources.bugs
Article #218

Re: Perl 3.0 patchlevel 1 printf() bug?

#218
From: Larry Wall
Date: Thu, 09 Nov 1989 23:06
31 lines
1483 bytes
In article <JHPB.89Nov9073339@lancia.ATT.COM> jhpb@lancia.ATT.COM (Joseph H. Buehler) writes:
: I'm running perl 3.0 with patch #1, and the three password structure
: fields #undef'd in config.h

The results of a mere typo in a metaconfig unit.  This will be fixed in patch 2.

: The following perl script fails.
: 
: 	$char = 0x44;
: 	$threshold = 65535;
: 	$key = "a";
: 	$start{$key} = 512;
: 	printf("    '%c', $threshold, %d,\n", $char, 0+$start{$key});
: 
: Perl 2 patch 18 gives the output (angle brackets inserted by me to
: demark the string limits):
: 
: <    'D', 65535, 512,>
: 
: Perl 3 patch 1 produces:
: 
: <D', 65535, 512,>
: 
: Anyone know what's going on?

In binary-izing perl I short circuited the usual %c processing because
some machines can't do printf("%c", 0), and neglected to include the
format string up to the %.  Will be fixed in patch 2.

Larry Wall
lwall@jpl-devvax.jpl.nasa.gov
Technical Details
Message-ID: <6411@jpl-devvax.JPL.NASA.GOV>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!samsung!usc!henry.jpl.nasa.gov!elroy.jpl.nasa.gov!jpl-devvax!lwall
References: <JHPB.89Nov9073339@lancia.ATT.COM>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!samsung!usc!henry.jpl.nasa.gov!elroy.jpl.nasa.gov!jpl-devvax!lwall
From: lwall@jpl-devvax.JPL.NASA.GOV (Larry Wall)
Newsgroups: comp.sources.bugs,comp.sources.d
Subject: Re: Perl 3.0 patchlevel 1 printf() bug?
Message-ID: <6411@jpl-devvax.JPL.NASA.GOV>
Date: 9 Nov 89 23:06:42 GMT
References: <JHPB.89Nov9073339@lancia.ATT.COM>
Reply-To: lwall@jpl-devvax.JPL.NASA.GOV (Larry Wall)
Distribution: usa
Organization: Jet Propulsion Laboratory, Pasadena, CA
Lines: 31