From owner-freebsd-current Thu Mar 11 2: 6:18 1999 Delivered-To: freebsd-current@freebsd.org Received: from herring.nlsystems.com (nlsys.demon.co.uk [158.152.125.33]) by hub.freebsd.org (Postfix) with ESMTP id 332EF15243 for ; Thu, 11 Mar 1999 02:04:27 -0800 (PST) (envelope-from dfr@nlsystems.com) Received: from localhost (dfr@localhost) by herring.nlsystems.com (8.9.3/8.8.8) with ESMTP id KAA30247 for ; Thu, 11 Mar 1999 10:05:10 GMT (envelope-from dfr@nlsystems.com) Date: Thu, 11 Mar 1999 10:05:10 +0000 (GMT) From: Doug Rabson To: current@freebsd.org Subject: Proposed change to printf Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I want to make this change to printf so that it treats format codes like '%llx' as 64bit formats (i.e. the same as '%qx'). This convention is the same as that used by glibc. I needed this change to make an i386->alpha cross debugger which worked properly but I think that it is a good idea to be compatible with glibc in this respect. Index: vfprintf.c =================================================================== RCS file: /home/ncvs/src/lib/libc/stdio/vfprintf.c,v retrieving revision 1.20 diff -u -r1.20 vfprintf.c --- vfprintf.c 1998/09/16 04:17:44 1.20 +++ vfprintf.c 1999/02/20 10:20:08 @@ -545,7 +545,10 @@ flags |= SHORTINT; goto rflag; case 'l': - flags |= LONGINT; + if (flags & LONGINT) + flags |= QUADINT; + else + flags |= LONGINT; goto rflag; case 'q': flags |= QUADINT; @@ -1016,7 +1019,10 @@ flags |= SHORTINT; goto rflag; case 'l': - flags |= LONGINT; + if (flags & LONGINT) + flags |= QUADINT; + else + flags |= LONGINT; goto rflag; case 'q': flags |= QUADINT; -- Doug Rabson Mail: dfr@nlsystems.com Nonlinear Systems Ltd. Phone: +44 181 442 9037 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message