Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 09 Nov 1998 12:43:14 -0800
From:      Mike Smith <mike@smith.net.au>
To:        zhihuizhang <bf20761@binghamton.edu>
Cc:        hackers <freebsd-hackers@FreeBSD.ORG>
Subject:   Re: radix argument of kvprintf() 
Message-ID:  <199811092043.MAA00772@dingo.cdrom.com>
In-Reply-To: Your message of "Mon, 09 Nov 1998 12:12:29 EST." <Pine.SOL.L3.93.981109114147.10687A-100000@bingsun2> 

next in thread | previous in thread | raw e-mail | index | archive | help
> 
> I try to figure out the meaning of the argument radix in the routine
> kvprintf() in file subr_prf.c.  I find that radix can be values from
> 2 through 36 and is only used when you have a %n in the format.
> 
> The specifier %n is supposed to save the number of characters we have
> printed so far.  But the source code of kvprintf() does not show this.
> Instead, it specifies we want to print the next argument with base value
> of radix. This is inconsistent with what is said about printf(3).
> 
> Can anyone explain this for me?  Thanks a lot.

I think that the %n behaviour is an error; it may have been meant to be 
implemented but never was.  The correct format specifier for the radix 
is %r.

-- 
\\  Sometimes you're ahead,       \\  Mike Smith
\\  sometimes you're behind.      \\  mike@smith.net.au
\\  The race is long, and in the  \\  msmith@freebsd.org
\\  end it's only with yourself.  \\  msmith@cdrom.com



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199811092043.MAA00772>