From owner-freebsd-arch Wed Oct 9 13:30:47 2002 Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1C52737B401; Wed, 9 Oct 2002 13:30:46 -0700 (PDT) Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id C673A43E3B; Wed, 9 Oct 2002 13:30:44 -0700 (PDT) (envelope-from bde@zeta.org.au) Received: from bde.zeta.org.au (bde.zeta.org.au [203.2.228.102]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id GAA23457; Thu, 10 Oct 2002 06:30:34 +1000 Date: Thu, 10 Oct 2002 06:40:41 +1000 (EST) From: Bruce Evans X-X-Sender: bde@gamplex.bde.org To: John Baldwin Cc: Andrew Gallatin , Peter Wemm , Subject: Re: lp64 vs lp32 printf In-Reply-To: Message-ID: <20021010062921.T6622-100000@gamplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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: %%% case 'z': ul = lflag ? va_arg(ap, u_long) : va_arg(ap, u_int); if ((long)ul < 0) { neg = 1; ul = -(long)ul; } base = 16; goto number; %%% I "restored" this wrong in subr_prf.c 1.47. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message