Hi Adam, Adam M. Costello wrote:
> The printf %x conversion is supposed to treat its argument as an > unsigned int (see printf(3)). But look at what mawk does: > > $ mawk 'END { printf("%x %x\n", 2e9, 3e9) }' < /dev/null > 77359400 7fffffff > > Compare that to gawk: > > $ gawk 'END { printf("%x %x\n", 2e9, 3e9) }' < /dev/null > 77359400 b2d05e00 > > The range of an unsigned int on 32-bit platforms goes up to ffffffff, > not 7fffffff. Yep. Thomas Dickey wrote a fix for this and included it (among other things) in his mawk 1.3.3-20090711 release. Relevant changes: http://git.debian.org/?p=collab-maint/mawk.git;a=blobdiff;f=print.c;h=4afe0a15f;hb=8044617;hpb=6e68fb445 http://git.debian.org/?p=collab-maint/mawk.git;a=blobdiff;f=cast.c;h=7052abe8;hb=8044617f;hpb=6e68fb44 Version 1.3.3-20090820 follows up on that. The changelog says: correct lower-limit for d_to_U() function, which broke conversion of zero in "%x" format, added in fix for Debian #303825 (report by Masami Hiramatsu). and the patch: http://git.debian.org/?p=collab-maint/mawk.git;a=commitdiff;h=0dedcdb#patch5 I have not tested a minimal consolidated diff, though. Hope that helps, Jonathan -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org