some minor corrections
authorceriel <none@none>
Mon, 19 Jun 1989 09:56:16 +0000 (09:56 +0000)
committerceriel <none@none>
Mon, 19 Jun 1989 09:56:16 +0000 (09:56 +0000)
lang/cem/libcc/stdio/doprnt.c
lang/cem/libcc/stdio/getw.c
lang/m2/comp/MakeVersion
lang/m2/comp/type.c

index 55f0e2f..6b37dbf 100644 (file)
@@ -225,9 +225,8 @@ _doprnt(fmt,ap,stream)
                        break;
 #endif
                case 'r':
-                       ap = va_arg(ap, char *);
+                       ap = va_arg(ap, va_list);
                        fmt = va_arg(ap, char *);
-                       fmt=oldfmt;
                        continue;
                }
 #ifndef NOFLOAT
index 296c08f..40c879b 100644 (file)
@@ -11,6 +11,6 @@ int getw(iop)
        while (cnt--) {
                *p++ = getc(iop);
        }
-       if (foef(iop) || ferror(iop)) return EOF;
+       if (feof(iop) || ferror(iop)) return EOF;
        return w;
 }
index 6b9d7f5..2ca5509 100755 (executable)
@@ -5,4 +5,4 @@ sed "s/\.$VERSION/.$NEWVERSION/" < Version.c > tmp$$
 mv tmp$$ Version.c
 CM "$*"
 V=`cat Version.c`
-SV > ../versions/V`expr "$V" ':' '.*\([0-9][0-9]*\.[0-9][0-9]*\).*'`
+SV > Versions/V`expr "$V" ':' '.*\([0-9][0-9]*\.[0-9][0-9]*\).*'`
index 5842f69..64da373 100644 (file)
@@ -584,11 +584,12 @@ ArraySizes(tp)
        getbounds(index_type, &(tp->arr_low), &(tp->arr_high));
        diff = tp->arr_high - tp->arr_low;
 
-       if (! fit(diff, (int) int_size)) {
+       if (diff < 0 || ! fit(diff, (int) int_size)) {
                error("too many elements in array");
        }
 
        tp->tp_size = align((diff + 1) * tp->arr_elsize, tp->tp_align);
+       /* ??? check overflow ??? */
        if (! ufit(tp->tp_size, (int) pointer_size)) {
                error("array too large");
        }