Subject: Re: number base printing conventions
To: Erik E. Fair <>
From: Jonathan Stone <jonathan@DSG.Stanford.EDU>
List: tech-kern
Date: 07/28/1997 13:54:47
Erik E. Fair (Time Keeper) <> writes:

>NetBSD is not consistent about printing numbers.

>The short version is I'd like to see each place where we see %x or %p be
>replaced by 0x%x or 0x%p (or some other convention like appending

Two things:  

  i)  Doesn't the kernel printf() already prepend 0x to %p formats?
      I'd sooner fix %p there, if at all possible.

  ii) 'h'?  Eeek! Doesn't printing a leading 0x for an appended 'h'
      conflict with both ANSI and (if memory serves) an antique
      x86 usage for `short'?   

      Or did you mean "%0xh"?  Yuck. Your own GDB cut-and-paste
      point argues strongly against that.      Which do you really  mean?
      Plus, postfix radix notations are harder for humans to read than prefix.

  iii) If we want a printf() format char for 0x prefixing,
        what's wrong with  "#%x" ? or even "0x%x"?