doprnt -- "%X" for upper case hex
Karl Danz
karl at cygnet.CYGNETSYSTEMS
Sun Dec 9 12:21:13 AEST 1984
[]
Just for grins I tried applying Patrick Powell's mods to doprnt.s --
I think he runs 4.1BSD, because his `ed' script made a real mess of
our 4.2BSD doprnt.s. Fortunately I heeded his advise:
> COPY the ORGINAL doprnt.s before you do the ed, it gets trompped on.
In any event, the only problem we have ever had with doprnt was its
inability to handle the "%X" format specifier. An obscure feature to
be sure, but when a one line change gets me what I want, I'll do it
instead of always running my output through `tr' to get capital letters.
Actually, the 4.2BSD manual page for printf(3s) never really gets around
to mentioning that capitalizing "x", "e", and "g" conversion characters
has the effect of capitalizing all the letters in the resulting output.
But the code is clearly set up to do so, and in fact already did so in
the case of "e" and "g". Further supporting evidence came from the fact
that the System V manual page is very explicit about all of this.
(Yes Doug, I know that's almost always true when comparing 4.2 manual
pages to System V manual pages!)
---------------------------------------------------
RCS file: RCS/doprnt.s,v
retrieving revision 1.1
diff -r1.1 doprnt.s
206c206
< .word hex-L5 # X
---
> .word capital-L5 # X
---------------------------------------------------
Karl Danz
Cygnet Systems
...!hplabs!cygnet!karl
More information about the Comp.bugs.4bsd.ucb-fixes
mailing list