From bd36ee9fec432f2c3bfa9a1f541d6f6e26f50739 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Wed, 23 Jul 2014 10:17:47 -0400 Subject: lib9: format %#04x, 0 as 0x0000 not 000000. This matches Go's fmt.Printf instead of ANSI C's dumb rules. It makes the -S output from C liblink match Go's liblink. LGTM=minux R=minux CC=golang-codereviews https://codereview.appspot.com/112600043 --- src/lib9/fmt/dofmt.c | 6 ------ 1 file changed, 6 deletions(-) (limited to 'src/lib9') diff --git a/src/lib9/fmt/dofmt.c b/src/lib9/fmt/dofmt.c index 94a91a2aa..3b9dc3612 100644 --- a/src/lib9/fmt/dofmt.c +++ b/src/lib9/fmt/dofmt.c @@ -491,12 +491,6 @@ __ifmt(Fmt *f) if(fl & FmtApost) __needsep(&ndig, &grouping); } - - /* - * Zero values don't get 0x. - */ - if(f->r == 'x' || f->r == 'X') - fl &= ~(ulong)FmtSharp; } for(w = f->prec; n < w && p > buf+3; n++){ if((fl & FmtApost) && __needsep(&ndig, &grouping)){ -- cgit v1.2.1