Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/3/84; site cygnet.CYGNETSYSTEMS Path: utzoo!watmath!clyde!bonnie!akgua!sdcsvax!sdcrdcf!hplabs!cygnet!karl From: karl@cygnet.CYGNETSYSTEMS (Karl Danz) Newsgroups: net.sources,net.bugs.4bsd Subject: doprnt -- "%X" for upper case hex Message-ID: <508@cygnet.CYGNETSYSTEMS> Date: Sat, 8-Dec-84 21:21:13 EST Article-I.D.: cygnet.508 Posted: Sat Dec 8 21:21:13 1984 Date-Received: Mon, 10-Dec-84 02:44:17 EST References: <1381@wateng.UUCP> Organization: Cygnet Systems -- Sunnyvale, CA Lines: 35 Xref: watmath net.sources:2142 net.bugs.4bsd:1271 [] 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