ExtStream.st
changeset 379 5b5a130ccd09
parent 372 63f6b3823c29
child 384 cc3d110ea879
--- a/ExtStream.st	Thu Aug 10 14:14:29 1995 +0200
+++ b/ExtStream.st	Thu Aug 10 14:32:31 1995 +0200
@@ -24,7 +24,7 @@
 COPYRIGHT (c) 1988 by Claus Gittinger
 	      All Rights Reserved
 
-$Header: /cvs/stx/stx/libbasic/Attic/ExtStream.st,v 1.44 1995-08-03 03:24:53 claus Exp $
+$Header: /cvs/stx/stx/libbasic/Attic/ExtStream.st,v 1.45 1995-08-10 12:27:43 claus Exp $
 '!
 
 !ExternalStream primitiveDefinitions!
@@ -86,7 +86,8 @@
 
 version
 "
-$Header: /cvs/stx/stx/libbasic/Attic/ExtStream.st,v 1.44 1995-08-03 03:24:53 claus Exp $
+$Header: /cvs/stx/stx/libbasic/Attic/ExtStream.st,v 1.45 1995-08-10 12:27:43 claus Exp $
+$Revision: 1.45 $
 "
 !
 
@@ -2093,6 +2094,7 @@
 
 	    for (;;) {
 		if (_buffered) {
+#ifdef OLD
 /*
 		    do {
 */
@@ -2100,6 +2102,12 @@
 /*
 		    } while ((ch < 0) && (errno == EINTR));
 */
+#else
+		    errno = 0;
+		    do {
+			ch = getc(f);
+		    } while ((ch < 0) && (errno == EINTR));
+#endif
 		    if (ch == EOF) {
 			if (ferror(f)) {
 			    if (errno == EINTR) {
@@ -3050,8 +3058,11 @@
 !
 
 nextAlphaNumericWord
-    "read the next word (i.e. up to non letter-or-digit).
-     return a string containing those characters."
+    "read the next word (i.e. up to non letter-or-digit) after first
+     skipping any whiteSpace.
+     Return a string containing those characters.
+     There is a limit of 1023 characters in the word - if longer,
+     it is truncated."
 
 %{  /* STACK: 2000 */
     FILE *f;
@@ -3086,7 +3097,9 @@
 	    }
 	    cnt++;
 
+#ifndef NON_ASCII
 	    if (ch >= ' ') break;
+#endif
 	    if ((ch != ' ') && (ch != '\t') && (ch != '\r')
 	     && (ch != '\n') && (ch != 0x0b)) break;
 	}
@@ -3312,12 +3325,12 @@
     }
 %}.
     retVal isNil ifTrue:[
-        "/
-        "/ arrive here with retVal==nil either on error or premature EOF
-        "/ or if running out of malloc-memory
-        "/
-        lastErrorNumber notNil ifTrue:[^ self readError].
-        outOfMemory == true ifTrue:[
+	"/
+	"/ arrive here with retVal==nil either on error or premature EOF
+	"/ or if running out of malloc-memory
+	"/
+	lastErrorNumber notNil ifTrue:[^ self readError].
+	outOfMemory == true ifTrue:[
 	    "
 	     memory allocation failed.
 	     When we arrive here, there was no (unix) memory available for the