Date: Fri, 14 Jun 1996 02:39:51 +0400 (MSD) From: "Alexander V. Lukyanov" Message-Id: <199606132239.CAA04854@video.yars.free.net> To: djgpp-workers AT delorie DOT com Subject: doscan diff Here is the diff between my copy of doscan and DJ's one. *** doscan_dj.c Fri Jun 14 02:37:14 1996 --- src/libc/ansi/stdio/doscan.c Sat May 18 18:40:01 1996 *************** *** 73,82 **** } if (len == 0) len = 30000; ! if (ch=='l') { size = LONG; ch = *fmt++; ! } else if (ch=='h') { size = SHORT; ch = *fmt++; } else if (ch=='L') { --- 73,90 ---- } if (len == 0) len = 30000; ! ! if (ch=='l') ! { size = LONG; ch = *fmt++; ! if (ch=='l') ! { ! size = LONGDOUBLE; /* for long long 'll' format */ ! ch = *fmt++; ! } ! } ! else if (ch=='h') { size = SHORT; ch = *fmt++; } else if (ch=='L') { *************** *** 89,94 **** --- 97,105 ---- gcc gives warning: ANSI C forbids braced groups within expressions */ ch += 'a' - 'A'; + if (size==LONG) + size = LONGDOUBLE; + else size = LONG; } if (ch == '\0') *************** *** 103,109 **** else if (size==SHORT) **(short**)ptr = nchars; else if (size==LONGDOUBLE) ! **(long**)ptr = nchars; else **(int**)ptr = nchars; break; --- 114,120 ---- else if (size==SHORT) **(short**)ptr = nchars; else if (size==LONGDOUBLE) ! **(long long**)ptr = nchars; else **(int**)ptr = nchars; break; *************** *** 159,165 **** char numbuf[64]; register c, base; int expseen, scale, negflg, c1, ndigit; ! long lcval; int cpos; if (type=='c' || type=='s' || type=='[') --- 170,176 ---- char numbuf[64]; register c, base; int expseen, scale, negflg, c1, ndigit; ! long long lcval; int cpos; if (type=='c' || type=='s' || type=='[') *************** *** 276,284 **** break; case (INT<<4) | LONG: - case (INT<<4) | LONGDOUBLE: **(long **)ptr = lcval; break; } return(1); } --- 287,298 ---- break; case (INT<<4) | LONG: **(long **)ptr = lcval; break; + + case (INT<<4) | LONGDOUBLE: + **(long long **)ptr = lcval; + break; } return(1); } *************** *** 332,338 **** *ptr++ = '\0'; return(1); } ! return(ptr==0); } static const char * --- 346,352 ---- *ptr++ = '\0'; return(1); } ! return(0); } static const char *