--- a/ExternalStream.st Tue Sep 13 14:44:17 2016 +0200
+++ b/ExternalStream.st Tue Sep 13 14:44:19 2016 +0200
@@ -5563,19 +5563,19 @@
char c;
if (__INST(hitEOF) == true) {
- RETURN (true);
+ RETURN (true);
}
pos = __INST(position);
lim = __INST(readLimit);
if (lim != nil) {
- off_t _pos, _readLimit;
-
- _pos = __signedLongIntVal(pos);
- _pos = _pos - __intVal( @global(PositionableStream:ZeroPosition)) + 1;
- _readLimit = __signedLongIntVal(lim);
- if (_pos > _readLimit) {
- RETURN (true);
- }
+ off_t _pos, _readLimit;
+
+ _pos = __signedLongIntVal(pos);
+ _pos = _pos - __intVal( @global(PositionableStream:ZeroPosition)) + 1;
+ _readLimit = __signedLongIntVal(lim);
+ if (_pos > _readLimit) {
+ RETURN (true);
+ }
}
__INST(lastErrorNumber) = nil;
@@ -5585,57 +5585,57 @@
|| (__INST(handleType) == @symbol(socketFilePointer))
|| (__INST(handleType) == @symbol(socketHandle))
|| (__INST(handleType) == @symbol(pipeFilePointer))) {
- if ((fp = __INST(handle)) != nil) {
- int _buffered = (__INST(buffered) == true);
- int ret;
- FILEPOINTER f = __FILEVal(fp);
-
- if (_buffered) {
- __READING__(f);
- } else {
- if (__INST(readAhead) != nil) {
- RETURN (false);
- }
- }
-
- /*
- * read ahead ...
- */
- do {
+ if ((fp = __INST(handle)) != nil) {
+ int _buffered = (__INST(buffered) == true);
+ int ret;
+ FILEPOINTER f = __FILEVal(fp);
+
+ if (_buffered) {
+ __READING__(f);
+ } else {
+ if (__INST(readAhead) != nil) {
+ RETURN (false);
+ }
+ }
+
+ /*
+ * read ahead ...
+ */
+ do {
#ifdef __win32__
# if 1
- __READBYTE__(ret, f, &c, _buffered, __INST(handleType));
+ __READBYTE__(ret, f, &c, _buffered, __INST(handleType));
# else
- __BEGIN_INTERRUPTABLE__
- __READBYTE__(ret, f, &c, _buffered, __INST(handleType));
- __END_INTERRUPTABLE__
+ __BEGIN_INTERRUPTABLE__
+ __READBYTE__(ret, f, &c, _buffered, __INST(handleType));
+ __END_INTERRUPTABLE__
# endif
#else /* not __win32__ */
- __BEGIN_INTERRUPTABLE__
- __READBYTE__(ret, f, &c, _buffered, __INST(handleType));
- __END_INTERRUPTABLE__
+ __BEGIN_INTERRUPTABLE__
+ __READBYTE__(ret, f, &c, _buffered, __INST(handleType));
+ __END_INTERRUPTABLE__
#endif
- } while ((ret < 0) && (__threadErrno == EINTR));
-
- if (ret > 0) {
- __UNGETC__(c&0xff, f, _buffered);
- RETURN (false);
- }
- if (ret == 0) {
- __INST(hitEOF) = true;
- RETURN (true);
- }
+ } while ((ret < 0) && (__threadErrno == EINTR));
+
+ if (ret > 0) {
+ __UNGETC__(c&0xff, f, _buffered);
+ RETURN (false);
+ }
+ if (ret == 0) {
+ __INST(hitEOF) = true;
+ RETURN (true);
+ }
#ifdef ECONNRESET
- // connection reset by peer is also an EOF
- if (__threadErrno == ECONNRESET) {
- __INST(hitEOF) = true;
- RETURN (true);
- }
+ // connection reset by peer is also an EOF
+ if (__threadErrno == ECONNRESET) {
+ __INST(hitEOF) = true;
+ RETURN (true);
+ }
#endif
- /* ret < 0 */
- __INST(lastErrorNumber) = __mkSmallInteger(__threadErrno);
- }
+ /* ret < 0 */
+ __INST(lastErrorNumber) = __mkSmallInteger(__threadErrno);
+ }
}
%}.
lastErrorNumber notNil ifTrue:[^ self readError].
@@ -5645,7 +5645,7 @@
"/ migration support
^ self
- atEndFile:handle
+ atEndFile:handle
"Modified: / 30.10.1998 / 20:16:06 / cg"
!