Allow the full 8-bit byte range when reading program source.
This commit is contained in:
parent
5fd1634830
commit
b32be06881
|
@ -164,14 +164,10 @@ register int delim;
|
||||||
Malloc((unsigned) sizeof(struct string));
|
Malloc((unsigned) sizeof(struct string));
|
||||||
register char *p;
|
register char *p;
|
||||||
register int len = ISTRSIZE;
|
register int len = ISTRSIZE;
|
||||||
|
|
||||||
str->s_str = p = Malloc((unsigned int) ISTRSIZE);
|
str->s_str = p = Malloc((unsigned int) ISTRSIZE);
|
||||||
for( ; ; ) {
|
for( ; ; ) {
|
||||||
LoadChar(ch);
|
LoadChar(ch);
|
||||||
if( ch & 0200 ) {
|
|
||||||
fatal("non-ascii '\\%03o' read", ch & 0377);
|
|
||||||
/*NOTREACHED*/
|
|
||||||
}
|
|
||||||
if( class(ch) == STNL ) {
|
if( class(ch) == STNL ) {
|
||||||
lexerror("newline in string");
|
lexerror("newline in string");
|
||||||
LineNumber++;
|
LineNumber++;
|
||||||
|
@ -310,11 +306,6 @@ again:
|
||||||
LoadChar(ch);
|
LoadChar(ch);
|
||||||
if( !options['C'] ) /* -C : cases are different */
|
if( !options['C'] ) /* -C : cases are different */
|
||||||
TO_LOWER(ch);
|
TO_LOWER(ch);
|
||||||
|
|
||||||
if( (ch & 0200) && ch != EOI ) {
|
|
||||||
fatal("non-ascii '\\%03o' read", ch & 0377);
|
|
||||||
/*NOTREACHED*/
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
switch( class(ch) ) {
|
switch( class(ch) ) {
|
||||||
|
@ -420,7 +411,7 @@ again:
|
||||||
/* dtrg: removed to allow Pascal programs to access system routines
|
/* dtrg: removed to allow Pascal programs to access system routines
|
||||||
* (necessary to make them do anything useful). What's this for,
|
* (necessary to make them do anything useful). What's this for,
|
||||||
* anyway? */
|
* anyway? */
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
if( buf[0] == '_' ) lexerror("underscore starts identifier");
|
if( buf[0] == '_' ) lexerror("underscore starts identifier");
|
||||||
#endif
|
#endif
|
||||||
|
@ -492,7 +483,7 @@ again:
|
||||||
PushBack();
|
PushBack();
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
if( ch == 'e' || ch == 'E' ) {
|
if( ch == 'e' || ch == 'E' ) {
|
||||||
char *tp = np; /* save position in string */
|
char *tp = np; /* save position in string */
|
||||||
|
|
Loading…
Reference in a new issue