seg@smsdpg.uu.net (Scott Garfinkle) (05/23/89)
Two small patches: Patch a) affects machines where sizeof(void *) > sizeof(int) when DEBUG is defined. Patch b) affects machines where int's are shorter than longs. Causes incorrect results when "print" (not "printf") is called on ints where |x| > 32767. Patch #1 was distributed only to comp.sys.ibm.pc, as it only added a function (popen) to PC Gawk. It is not necessary to have that patch to apply this one. Scott E. Garfinkle SMS Data Products Group, Inc. uunet!smsdpg!seg (seg@smsdpg.uu.net) *** awk6.c- Mon May 22 19:12:27 1989 --- awk6.c Mon May 22 10:18:04 1989 *************** *** 127,133 **** pt() { ! int x; (void) scanf("%x", &x); printf("0x%x\n", x); --- 127,133 ---- pt() { ! long x; (void) scanf("%x", &x); printf("0x%x\n", x); *** awk9.c- Mon May 22 19:12:44 1989 --- awk9.c Mon May 22 10:18:27 1989 *************** *** 69,75 **** { char buf[128]; char *fmt; ! int num; char *sp = buf; #ifdef DEBUG --- 69,75 ---- { char buf[128]; char *fmt; ! long num; char *sp = buf; #ifdef DEBUG Newsgroups: comp.sys.ibm.pc.d,comp.sources.bugs Subject: Patch #2 for Gnu Awk 2.10 Expires: References: Sender: Reply-To: seg@smsdpg.UUCP (Scott Garfinkle) Followup-To: comp.sys.ibm.pc.d Distribution: world Organization: SMS Data Products Group, Inc. Keywords: Two small patches: Patch a) affects machines where sizeof(void *) > sizeof(int) when DEBUG is defined. Patch b) affects machines where int's are shorter than longs. Causes incorrect results when "print" (not "printf") is called on ints where |x| > 32767. Patch #1 was distributed only to comp.sys.ibm.pc, as it only added a function (popen) to PC Gawk. It is not necessary to have that patch to apply this one. Scott E. Garfinkle SMS Data Products Group, Inc. uunet!smsdpg!seg (seg@smsdpg.uu.net) *** awk6.c- Mon May 22 19:12:27 1989 --- awk6.c Mon May 22 10:18:04 1989 *************** *** 127,133 **** pt() { ! int x; (void) scanf("%x", &x); printf("0x%x\n", x); --- 127,133 ---- pt() { ! long x; (void) scanf("%x", &x); printf("0x%x\n", x); *** awk9.c- Mon May 22 19:12:44 1989 --- awk9.c Mon May 22 10:18:27 1989 *************** *** 69,75 **** { char buf[128]; char *fmt; ! int num; char *sp = buf; #ifdef DEBUG --- 69,75 ---- { char buf[128]; char *fmt; ! long num; char *sp = buf; #ifdef DEBUG