From owner-freebsd-arch Thu Oct 10 5: 5:19 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 3102037B401; Thu, 10 Oct 2002 05:05:18 -0700 (PDT) Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0B9E143EAC; Thu, 10 Oct 2002 05:05:17 -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 WAA12533; Thu, 10 Oct 2002 22:05:14 +1000 Date: Thu, 10 Oct 2002 22:15:23 +1000 (EST) From: Bruce Evans X-X-Sender: bde@gamplex.bde.org To: John Baldwin Cc: freebsd-arch@FreeBSD.org, Peter Wemm , Andrew Gallatin Subject: Re: lp64 vs lp32 printf In-Reply-To: Message-ID: <20021010221405.G8817-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: > On 09-Oct-2002 Bruce Evans wrote: > > On Wed, 9 Oct 2002, John Baldwin wrote: > >> [ddb/db_examine.c's use of %z] > >> 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) > This seems to be correct. I have not checked any of this at runtime. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message