Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site amdcad.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!amdcad!rajiv From: rajiv@amdcad.UUCP (Rajiv Mody) Newsgroups: net.sources,net.bugs.4bsd Subject: Re: doprnt -- "%X" for upper case hex Message-ID: <378@amdcad.UUCP> Date: Tue, 11-Dec-84 23:09:54 EST Article-I.D.: amdcad.378 Posted: Tue Dec 11 23:09:54 1984 Date-Received: Thu, 13-Dec-84 00:38:00 EST References: <1381@wateng.UUCP> <508@cygnet.CYGNETSYSTEMS> Organization: AMDCAD, Sunnyvale, CA Lines: 36 Xref: watmath net.sources:2154 net.bugs.4bsd:1278 > [] > 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