Added a check for non-ascii characters in the description files.
authorkeie <none@none>
Thu, 15 Nov 1984 14:24:35 +0000 (14:24 +0000)
committerkeie <none@none>
Thu, 15 Nov 1984 14:24:35 +0000 (14:24 +0000)
util/ack/rmach.c

index 59339af..14c946a 100644 (file)
@@ -367,11 +367,17 @@ char *readline() {
 }
 
 int getinchar() {
+       register int token ;
+
        if ( incore ) {
                if ( *inptr==0 ) return EOF ;
                return *inptr++ ;
        }
-       return getc(infile) ;
+       token= getc(infile) ;
+       if ( (token>=0177 || token <=0 ) && token !=EOF ) {
+               fuerror("Non-ascii character in description file %s",inname);
+       }
+       return token ;
 }
 
 int getline() {