From: ceriel Date: Thu, 18 Nov 1993 15:35:03 +0000 (+0000) Subject: use 0xFFFF mask for printing shorts, and work around gcc 2.4.5 bug X-Git-Tag: release-5-5~202 X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=862f5da86db3b59d0660bb38387e8a0101b23e16;p=ack.git use 0xFFFF mask for printing shorts, and work around gcc 2.4.5 bug --- diff --git a/util/cgg/main.c b/util/cgg/main.c index 16d5b2561..449e79add 100644 --- a/util/cgg/main.c +++ b/util/cgg/main.c @@ -547,7 +547,11 @@ finishio() { while (*p) { register int c = (*p) & BMASK; if (! isascii(c) || iscntrl(c)) { - fprintf(cfile,"\\%c%c%c",((c>>6) &03)+'0', + /* The next line used to have (c>>6)&03, + but this triggered a bug in GCC 2.4.5 + on SPARC. + */ + fprintf(cfile,"\\%c%c%c",((*p>>6) &03)+'0', ((c>>3)&07)+'0',(c&07)+'0'); } else putc(c, cfile); @@ -559,7 +563,7 @@ finishio() { for(i=0;i