Date: Wed, 09 Oct 2002 16:45:06 -0400 (EDT) From: John Baldwin <jhb@FreeBSD.org> To: Bruce Evans <bde@zeta.org.au> Cc: freebsd-arch@FreeBSD.ORG, Peter Wemm <peter@wemm.org>, Andrew Gallatin <gallatin@cs.duke.edu> Subject: Re: lp64 vs lp32 printf Message-ID: <XFMail.20021009164506.jhb@FreeBSD.org> In-Reply-To: <20021010062921.T6622-100000@gamplex.bde.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 09-Oct-2002 Bruce Evans wrote: > On Wed, 9 Oct 2002, John Baldwin wrote: > >> ... Hmm, I was incorrect >> (my grep re was busted) and %z is actually used in two places in ddb. >> We can either pick a letter to use or just use %x with explicit signs >> in those two cases: >> >> ddb/db_examine.c: db_printf("%-*lz", width, (long)value); >> ddb/db_examine.c: db_printf("%8lz", (long)addr); >> >> Hmm, the second case doesn't even use a sign so it can be %x anyways. > > This seems to be just a bug. The original db_printf() prints -1 as -1 > for %z format. From db_output.c rev.1.1: So should %z force sign on? --- subr_prf.c 28 Sep 2002 21:34:31 -0000 1.88 +++ subr_prf.c 9 Oct 2002 20:41:53 -0000 @@ -664,8 +664,8 @@ goto handle_nosign; case 'z': base = 16; - if (sign) - goto handle_sign; + sign = 1; + goto handle_sign; handle_nosign: sign = 0; if (jflag) -- John Baldwin <jhb@FreeBSD.org> <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.20021009164506.jhb>