# HG changeset patch # User Claus Gittinger # Date 815343058 -3600 # Node ID b57530aa1b0a293ec6a912116c8a86da5c2ab76a # Parent a5ce0ee55d332b42fd02d6c6fa7c4cc234fccba0 use new FILE* wrapper macros (based on externalAddress) diff -r a5ce0ee55d33 -r b57530aa1b0a DirStr.st --- a/DirStr.st Thu Nov 02 20:57:11 1995 +0100 +++ b/DirStr.st Thu Nov 02 21:10:58 1995 +0100 @@ -21,7 +21,7 @@ COPYRIGHT (c) 1989 by Claus Gittinger All Rights Reserved -$Header: /cvs/stx/stx/libbasic/Attic/DirStr.st,v 1.23 1995-09-17 17:56:01 claus Exp $ +$Header: /cvs/stx/stx/libbasic/Attic/DirStr.st,v 1.24 1995-11-02 20:10:18 cg Exp $ '! !DirectoryStream class methodsFor:'documentation'! @@ -42,7 +42,7 @@ version " -$Header: /cvs/stx/stx/libbasic/Attic/DirStr.st,v 1.23 1995-09-17 17:56:01 claus Exp $ +$Header: /cvs/stx/stx/libbasic/Attic/DirStr.st,v 1.24 1995-11-02 20:10:18 cg Exp $ " ! @@ -379,7 +379,7 @@ if ((dp = _INST(dirPointer)) != nil) { _INST(dirPointer) = nil; - closedir( (DIR *)(MKFD(dp)) ); + closedir( (DIR *)(__FILEVal(dp)) ); } #endif %} @@ -414,7 +414,7 @@ OBJ dirP; if ((dirP = _INST(dirPointer)) != nil) { - d = (DIR *)MKFD(dirP); + d = (DIR *)__FILEVal(dirP); __BEGIN_INTERRUPTABLE__ errno = 0; @@ -467,7 +467,7 @@ if (d == NULL) { _INST(lastErrorNumber) = _MKSMALLINT(errno); } else { - _INST(dirPointer) = MKOBJ(d); + _INST(dirPointer) = __MKOBJ(d); ok = true; } } diff -r a5ce0ee55d33 -r b57530aa1b0a DirectoryStream.st --- a/DirectoryStream.st Thu Nov 02 20:57:11 1995 +0100 +++ b/DirectoryStream.st Thu Nov 02 21:10:58 1995 +0100 @@ -21,7 +21,7 @@ COPYRIGHT (c) 1989 by Claus Gittinger All Rights Reserved -$Header: /cvs/stx/stx/libbasic/DirectoryStream.st,v 1.23 1995-09-17 17:56:01 claus Exp $ +$Header: /cvs/stx/stx/libbasic/DirectoryStream.st,v 1.24 1995-11-02 20:10:18 cg Exp $ '! !DirectoryStream class methodsFor:'documentation'! @@ -42,7 +42,7 @@ version " -$Header: /cvs/stx/stx/libbasic/DirectoryStream.st,v 1.23 1995-09-17 17:56:01 claus Exp $ +$Header: /cvs/stx/stx/libbasic/DirectoryStream.st,v 1.24 1995-11-02 20:10:18 cg Exp $ " ! @@ -379,7 +379,7 @@ if ((dp = _INST(dirPointer)) != nil) { _INST(dirPointer) = nil; - closedir( (DIR *)(MKFD(dp)) ); + closedir( (DIR *)(__FILEVal(dp)) ); } #endif %} @@ -414,7 +414,7 @@ OBJ dirP; if ((dirP = _INST(dirPointer)) != nil) { - d = (DIR *)MKFD(dirP); + d = (DIR *)__FILEVal(dirP); __BEGIN_INTERRUPTABLE__ errno = 0; @@ -467,7 +467,7 @@ if (d == NULL) { _INST(lastErrorNumber) = _MKSMALLINT(errno); } else { - _INST(dirPointer) = MKOBJ(d); + _INST(dirPointer) = __MKOBJ(d); ok = true; } } diff -r a5ce0ee55d33 -r b57530aa1b0a ExtStream.st --- a/ExtStream.st Thu Nov 02 20:57:11 1995 +0100 +++ b/ExtStream.st Thu Nov 02 21:10:58 1995 +0100 @@ -24,7 +24,7 @@ COPYRIGHT (c) 1988 by Claus Gittinger All Rights Reserved -$Header: /cvs/stx/stx/libbasic/Attic/ExtStream.st,v 1.60 1995-11-02 15:15:43 cg Exp $ +$Header: /cvs/stx/stx/libbasic/Attic/ExtStream.st,v 1.61 1995-11-02 20:10:35 cg Exp $ '! !ExternalStream primitiveDefinitions! @@ -151,7 +151,7 @@ version " -$Header: /cvs/stx/stx/libbasic/Attic/ExtStream.st,v 1.60 1995-11-02 15:15:43 cg Exp $ +$Header: /cvs/stx/stx/libbasic/Attic/ExtStream.st,v 1.61 1995-11-02 20:10:35 cg Exp $ " ! @@ -434,7 +434,7 @@ if ((fp = _INST(filePointer)) != nil) { _INST(filePointer) = nil; __BEGIN_INTERRUPTABLE__ - fclose(MKFD(fp)); + fclose(__FILEVal(fp)); __END_INTERRUPTABLE__ } %} @@ -663,7 +663,7 @@ OBJ fp; if ((fp = _INST(filePointer)) != nil) { - f = MKFD(fp); + f = __FILEVal(fp); RETURN ( __MKSMALLINT(fileno(f)) ); } %} @@ -858,7 +858,7 @@ if ((fp = _INST(filePointer)) != nil) { if (__isSmallInteger(ioctlNumber)) { ioNum = __intVal(ioctlNumber); - f = MKFD(fp); + f = __FILEVal(fp); __BEGIN_INTERRUPTABLE__ do { @@ -899,7 +899,7 @@ if ((fp = _INST(filePointer)) != nil) { if (__isSmallInteger(ioctlNumber) && (__isSmallInteger(arg) || __isBytes(arg))) { - f = MKFD(fp); + f = __FILEVal(fp); ioNum = __intVal(ioctlNumber); __BEGIN_INTERRUPTABLE__ @@ -945,7 +945,7 @@ _INST(lastErrorNumber) = nil; if (((fp = _INST(filePointer)) != nil) && (_INST(mode) != @symbol(writeonly))) { - f = MKFD(fp); + f = __FILEVal(fp); __BEGIN_INTERRUPTABLE__ do { @@ -1042,7 +1042,7 @@ if (((fp = _INST(filePointer)) != nil) && (_INST(mode) != @symbol(writeonly))) { if (__bothSmallInteger(count, start)) { - f = MKFD(fp); + f = __FILEVal(fp); oClass = __Class(anObject); switch (__intVal(__ClassInstPtr(oClass)->c_flags) & ARRAYMASK) { @@ -1124,7 +1124,7 @@ int first, second, err; short value; - f = MKFD(fp); + f = __FILEVal(fp); __BEGIN_INTERRUPTABLE__ __READING__(f) @@ -1183,7 +1183,7 @@ int first, second; unsigned value; - f = MKFD(fp); + f = __FILEVal(fp); __BEGIN_INTERRUPTABLE__ __READING__(f) @@ -1243,7 +1243,7 @@ int first, second, third, fourth; int value; - f = MKFD(fp); + f = __FILEVal(fp); __BEGIN_INTERRUPTABLE__ __READING__(f) @@ -1321,7 +1321,7 @@ int first, second, third, fourth; unsigned int value; - f = MKFD(fp); + f = __FILEVal(fp); __BEGIN_INTERRUPTABLE__ __READING__(f) @@ -1421,7 +1421,7 @@ && (_INST(mode) != @symbol(readonly))) { if (__isSmallInteger(aByteValue)) { c = __intVal(aByteValue); - f = MKFD(fp); + f = __FILEVal(fp); __BEGIN_INTERRUPTABLE__ /* *#ifdef OLD @@ -1518,7 +1518,7 @@ } cnt = __intVal(count); offs = __intVal(start) - 1; - f = MKFD(fp); + f = __FILEVal(fp); nInstVars = __intVal(__ClassInstPtr(oClass)->c_ninstvars); nInstBytes = OHDR_SIZE + __OBJS2BYTES__(nInstVars); @@ -1592,7 +1592,7 @@ bytes[0] = num & 0xFF; } - f = MKFD(fp); + f = __FILEVal(fp); __BEGIN_INTERRUPTABLE__ #ifdef OLD if (_INST(buffered) == false) { @@ -1656,7 +1656,7 @@ bytes[0] = num & 0xFF; } - f = MKFD(fp); + f = __FILEVal(fp); __BEGIN_INTERRUPTABLE__ #ifdef OLD if (_INST(buffered) == false) { @@ -1721,7 +1721,7 @@ if (_INST(buffered) == true) #endif { - f = MKFD(fp); + f = __FILEVal(fp); __BEGIN_INTERRUPTABLE__ __READING__(f) @@ -1768,7 +1768,7 @@ _INST(lastErrorNumber) = nil; if (((fp = _INST(filePointer)) != nil) && (_INST(mode) != @symbol(writeonly))) { - f = MKFD(fp); + f = __FILEVal(fp); __BEGIN_INTERRUPTABLE__ __READING__(f) @@ -1854,7 +1854,7 @@ if (_INST(mode) != @symbol(readonly)) { if (_INST(buffered) == true) { __BEGIN_INTERRUPTABLE__ - fflush( MKFD(fp) ); + fflush( __FILEVal(fp) ); __END_INTERRUPTABLE__ } } @@ -1863,7 +1863,8 @@ ! nextPut:aCharacter - "write the argument, aCharacter - return nil if failed, self if ok" + "write the argument, aCharacter - return nil if failed, self if ok. + Only single-byte characters are currently supported" %{ /* NOCONTEXT */ @@ -1877,9 +1878,9 @@ && (_INST(mode) != @symbol(readonly))) { if (_INST(binary) != true) { if (__isCharacter(aCharacter)) { - c = __intVal(__CharacterInstPtr(aCharacter)->c_asciivalue); + c = __intVal(__characterVal(aCharacter)) & 0xFF; doWrite: - f = MKFD(fp); + f = __FILEVal(fp); __BEGIN_INTERRUPTABLE__ @@ -1957,7 +1958,7 @@ } } if (cp != NULL) { - f = MKFD(fp); + f = __FILEVal(fp); __BEGIN_INTERRUPTABLE__ #ifdef NONONO @@ -2078,7 +2079,7 @@ } } if (cp != NULL) { - f = MKFD(fp); + f = __FILEVal(fp); index1 = __intVal(start); index2 = __intVal(stop); if ((index1 < 1) || (index2 > len) || (index2 < index1)) { @@ -2141,7 +2142,7 @@ if (((fp = _INST(filePointer)) != nil) && (_INST(mode) != @symbol(readonly))) { if (_INST(binary) != true) { - f = MKFD(fp); + f = __FILEVal(fp); __BEGIN_INTERRUPTABLE__ @@ -2195,7 +2196,7 @@ if (((fp = _INST(filePointer)) != nil) && (_INST(mode) != @symbol(writeonly))) { if (_INST(binary) != true) { - f = MKFD(fp); + f = __FILEVal(fp); __BEGIN_INTERRUPTABLE__ buffer[0] = 0; @@ -2329,7 +2330,7 @@ && (_INST(mode) != @symbol(readonly))) { if (_INST(binary) != true) { if (__isString(aString)) { - f = MKFD(fp); + f = __FILEVal(fp); s = (char *) _stringVal(aString); len = _stringSize(aString); @@ -2427,8 +2428,8 @@ matchString = (char *) _stringVal(aStringOrNil); matchLen = _stringSize(aStringOrNil); } - dst = MKFD(_INST(filePointer)); - src = MKFD(srcFilePointer); + dst = __FILEVal(_INST(filePointer)); + src = __FILEVal(srcFilePointer); __BEGIN_INTERRUPTABLE__ errno = 0; @@ -2504,7 +2505,7 @@ matchString = (char *) _stringVal(aString); l = _stringSize(aString); - f = MKFD(_INST(filePointer)); + f = __FILEVal(_INST(filePointer)); __READING__(f) for (;;) { @@ -2591,7 +2592,7 @@ } _INST(lastErrorNumber) = nil; if ((fp = _INST(filePointer)) != nil) { - f = MKFD(fp); + f = __FILEVal(fp); #ifdef OLD RETURN ( feof(f) ? _true : false ); #else @@ -2781,7 +2782,9 @@ peekFor:anObject "return true and move past next element, if next == something. Otherwise, stay and return false. False is also returned - when EOF is encountered." + when EOF is encountered. + The argument must be an integer if in binary, a character if in + text mode; only single byte characters are currently supported." %{ /* NOCONTEXT */ @@ -2807,7 +2810,7 @@ } } - f = MKFD(fp); + f = __FILEVal(fp); if (feof(f)) { _INST(hitEOF) = true; @@ -2862,7 +2865,8 @@ nextMatchFor:anObject "skip all objects up-to and including anObject, return anObject on success, nil if end-of-file is reached before. The next read operation will return - the element after anObject." + the element after anObject. + Only single byte characters are currently supported." %{ /* NOCONTEXT */ @@ -2885,7 +2889,7 @@ if (peekValue >= 0) { _INST(position) = nil; - f = MKFD(fp); + f = __FILEVal(fp); __BEGIN_INTERRUPTABLE__ __READING__(f) @@ -2931,7 +2935,7 @@ if (((fp = _INST(filePointer)) != nil) && (_INST(mode) != @symbol(writeonly))) { if (_INST(binary) != true) { - f = MKFD(fp); + f = __FILEVal(fp); __READING__(f) @@ -3029,7 +3033,8 @@ "skip all characters up-to and including aCharacter. Return the receiver if skip was successfull, otherwise (i.e. if not found) return nil. The next read operation will return the character after aCharacter. - The argument, aCharacter must be character, or integer wehn in binary mode." + The argument, aCharacter must be character, or integer when in binary mode. + Only single byte characters are currently supported." %{ /* NOCONTEXT */ @@ -3052,7 +3057,7 @@ /* Q: should we just say: "not found" ? */ if ((cSearch < 0) || (cSearch > 255)) goto badArgument; - f = MKFD(fp); + f = __FILEVal(fp); __READING__(f) __BEGIN_INTERRUPTABLE__ @@ -3117,7 +3122,7 @@ if (((fp = _INST(filePointer)) != nil) && (_INST(mode) != @symbol(writeonly))) { if (_INST(binary) != true) { - f = MKFD(fp); + f = __FILEVal(fp); if (feof(f)) { _INST(hitEOF) = true; @@ -3186,7 +3191,7 @@ if (((fp = _INST(filePointer)) != nil) && (_INST(mode) != @symbol(writeonly))) { if (_INST(binary) != true) { - f = MKFD(fp); + f = __FILEVal(fp); __READING__(f) __BEGIN_INTERRUPTABLE__ @@ -3249,7 +3254,7 @@ if (((fp = _INST(filePointer)) != nil) && (_INST(mode) != @symbol(writeonly))) { - f = MKFD(fp); + f = __FILEVal(fp); __BEGIN_INTERRUPTABLE__ __READING__(f) @@ -3369,7 +3374,7 @@ } _INST(lastErrorNumber) = nil; - f = MKFD(_INST(filePointer)); + f = __FILEVal(_INST(filePointer)); __READING__(f) diff -r a5ce0ee55d33 -r b57530aa1b0a ExternalStream.st --- a/ExternalStream.st Thu Nov 02 20:57:11 1995 +0100 +++ b/ExternalStream.st Thu Nov 02 21:10:58 1995 +0100 @@ -24,7 +24,7 @@ COPYRIGHT (c) 1988 by Claus Gittinger All Rights Reserved -$Header: /cvs/stx/stx/libbasic/ExternalStream.st,v 1.60 1995-11-02 15:15:43 cg Exp $ +$Header: /cvs/stx/stx/libbasic/ExternalStream.st,v 1.61 1995-11-02 20:10:35 cg Exp $ '! !ExternalStream primitiveDefinitions! @@ -151,7 +151,7 @@ version " -$Header: /cvs/stx/stx/libbasic/ExternalStream.st,v 1.60 1995-11-02 15:15:43 cg Exp $ +$Header: /cvs/stx/stx/libbasic/ExternalStream.st,v 1.61 1995-11-02 20:10:35 cg Exp $ " ! @@ -434,7 +434,7 @@ if ((fp = _INST(filePointer)) != nil) { _INST(filePointer) = nil; __BEGIN_INTERRUPTABLE__ - fclose(MKFD(fp)); + fclose(__FILEVal(fp)); __END_INTERRUPTABLE__ } %} @@ -663,7 +663,7 @@ OBJ fp; if ((fp = _INST(filePointer)) != nil) { - f = MKFD(fp); + f = __FILEVal(fp); RETURN ( __MKSMALLINT(fileno(f)) ); } %} @@ -858,7 +858,7 @@ if ((fp = _INST(filePointer)) != nil) { if (__isSmallInteger(ioctlNumber)) { ioNum = __intVal(ioctlNumber); - f = MKFD(fp); + f = __FILEVal(fp); __BEGIN_INTERRUPTABLE__ do { @@ -899,7 +899,7 @@ if ((fp = _INST(filePointer)) != nil) { if (__isSmallInteger(ioctlNumber) && (__isSmallInteger(arg) || __isBytes(arg))) { - f = MKFD(fp); + f = __FILEVal(fp); ioNum = __intVal(ioctlNumber); __BEGIN_INTERRUPTABLE__ @@ -945,7 +945,7 @@ _INST(lastErrorNumber) = nil; if (((fp = _INST(filePointer)) != nil) && (_INST(mode) != @symbol(writeonly))) { - f = MKFD(fp); + f = __FILEVal(fp); __BEGIN_INTERRUPTABLE__ do { @@ -1042,7 +1042,7 @@ if (((fp = _INST(filePointer)) != nil) && (_INST(mode) != @symbol(writeonly))) { if (__bothSmallInteger(count, start)) { - f = MKFD(fp); + f = __FILEVal(fp); oClass = __Class(anObject); switch (__intVal(__ClassInstPtr(oClass)->c_flags) & ARRAYMASK) { @@ -1124,7 +1124,7 @@ int first, second, err; short value; - f = MKFD(fp); + f = __FILEVal(fp); __BEGIN_INTERRUPTABLE__ __READING__(f) @@ -1183,7 +1183,7 @@ int first, second; unsigned value; - f = MKFD(fp); + f = __FILEVal(fp); __BEGIN_INTERRUPTABLE__ __READING__(f) @@ -1243,7 +1243,7 @@ int first, second, third, fourth; int value; - f = MKFD(fp); + f = __FILEVal(fp); __BEGIN_INTERRUPTABLE__ __READING__(f) @@ -1321,7 +1321,7 @@ int first, second, third, fourth; unsigned int value; - f = MKFD(fp); + f = __FILEVal(fp); __BEGIN_INTERRUPTABLE__ __READING__(f) @@ -1421,7 +1421,7 @@ && (_INST(mode) != @symbol(readonly))) { if (__isSmallInteger(aByteValue)) { c = __intVal(aByteValue); - f = MKFD(fp); + f = __FILEVal(fp); __BEGIN_INTERRUPTABLE__ /* *#ifdef OLD @@ -1518,7 +1518,7 @@ } cnt = __intVal(count); offs = __intVal(start) - 1; - f = MKFD(fp); + f = __FILEVal(fp); nInstVars = __intVal(__ClassInstPtr(oClass)->c_ninstvars); nInstBytes = OHDR_SIZE + __OBJS2BYTES__(nInstVars); @@ -1592,7 +1592,7 @@ bytes[0] = num & 0xFF; } - f = MKFD(fp); + f = __FILEVal(fp); __BEGIN_INTERRUPTABLE__ #ifdef OLD if (_INST(buffered) == false) { @@ -1656,7 +1656,7 @@ bytes[0] = num & 0xFF; } - f = MKFD(fp); + f = __FILEVal(fp); __BEGIN_INTERRUPTABLE__ #ifdef OLD if (_INST(buffered) == false) { @@ -1721,7 +1721,7 @@ if (_INST(buffered) == true) #endif { - f = MKFD(fp); + f = __FILEVal(fp); __BEGIN_INTERRUPTABLE__ __READING__(f) @@ -1768,7 +1768,7 @@ _INST(lastErrorNumber) = nil; if (((fp = _INST(filePointer)) != nil) && (_INST(mode) != @symbol(writeonly))) { - f = MKFD(fp); + f = __FILEVal(fp); __BEGIN_INTERRUPTABLE__ __READING__(f) @@ -1854,7 +1854,7 @@ if (_INST(mode) != @symbol(readonly)) { if (_INST(buffered) == true) { __BEGIN_INTERRUPTABLE__ - fflush( MKFD(fp) ); + fflush( __FILEVal(fp) ); __END_INTERRUPTABLE__ } } @@ -1863,7 +1863,8 @@ ! nextPut:aCharacter - "write the argument, aCharacter - return nil if failed, self if ok" + "write the argument, aCharacter - return nil if failed, self if ok. + Only single-byte characters are currently supported" %{ /* NOCONTEXT */ @@ -1877,9 +1878,9 @@ && (_INST(mode) != @symbol(readonly))) { if (_INST(binary) != true) { if (__isCharacter(aCharacter)) { - c = __intVal(__CharacterInstPtr(aCharacter)->c_asciivalue); + c = __intVal(__characterVal(aCharacter)) & 0xFF; doWrite: - f = MKFD(fp); + f = __FILEVal(fp); __BEGIN_INTERRUPTABLE__ @@ -1957,7 +1958,7 @@ } } if (cp != NULL) { - f = MKFD(fp); + f = __FILEVal(fp); __BEGIN_INTERRUPTABLE__ #ifdef NONONO @@ -2078,7 +2079,7 @@ } } if (cp != NULL) { - f = MKFD(fp); + f = __FILEVal(fp); index1 = __intVal(start); index2 = __intVal(stop); if ((index1 < 1) || (index2 > len) || (index2 < index1)) { @@ -2141,7 +2142,7 @@ if (((fp = _INST(filePointer)) != nil) && (_INST(mode) != @symbol(readonly))) { if (_INST(binary) != true) { - f = MKFD(fp); + f = __FILEVal(fp); __BEGIN_INTERRUPTABLE__ @@ -2195,7 +2196,7 @@ if (((fp = _INST(filePointer)) != nil) && (_INST(mode) != @symbol(writeonly))) { if (_INST(binary) != true) { - f = MKFD(fp); + f = __FILEVal(fp); __BEGIN_INTERRUPTABLE__ buffer[0] = 0; @@ -2329,7 +2330,7 @@ && (_INST(mode) != @symbol(readonly))) { if (_INST(binary) != true) { if (__isString(aString)) { - f = MKFD(fp); + f = __FILEVal(fp); s = (char *) _stringVal(aString); len = _stringSize(aString); @@ -2427,8 +2428,8 @@ matchString = (char *) _stringVal(aStringOrNil); matchLen = _stringSize(aStringOrNil); } - dst = MKFD(_INST(filePointer)); - src = MKFD(srcFilePointer); + dst = __FILEVal(_INST(filePointer)); + src = __FILEVal(srcFilePointer); __BEGIN_INTERRUPTABLE__ errno = 0; @@ -2504,7 +2505,7 @@ matchString = (char *) _stringVal(aString); l = _stringSize(aString); - f = MKFD(_INST(filePointer)); + f = __FILEVal(_INST(filePointer)); __READING__(f) for (;;) { @@ -2591,7 +2592,7 @@ } _INST(lastErrorNumber) = nil; if ((fp = _INST(filePointer)) != nil) { - f = MKFD(fp); + f = __FILEVal(fp); #ifdef OLD RETURN ( feof(f) ? _true : false ); #else @@ -2781,7 +2782,9 @@ peekFor:anObject "return true and move past next element, if next == something. Otherwise, stay and return false. False is also returned - when EOF is encountered." + when EOF is encountered. + The argument must be an integer if in binary, a character if in + text mode; only single byte characters are currently supported." %{ /* NOCONTEXT */ @@ -2807,7 +2810,7 @@ } } - f = MKFD(fp); + f = __FILEVal(fp); if (feof(f)) { _INST(hitEOF) = true; @@ -2862,7 +2865,8 @@ nextMatchFor:anObject "skip all objects up-to and including anObject, return anObject on success, nil if end-of-file is reached before. The next read operation will return - the element after anObject." + the element after anObject. + Only single byte characters are currently supported." %{ /* NOCONTEXT */ @@ -2885,7 +2889,7 @@ if (peekValue >= 0) { _INST(position) = nil; - f = MKFD(fp); + f = __FILEVal(fp); __BEGIN_INTERRUPTABLE__ __READING__(f) @@ -2931,7 +2935,7 @@ if (((fp = _INST(filePointer)) != nil) && (_INST(mode) != @symbol(writeonly))) { if (_INST(binary) != true) { - f = MKFD(fp); + f = __FILEVal(fp); __READING__(f) @@ -3029,7 +3033,8 @@ "skip all characters up-to and including aCharacter. Return the receiver if skip was successfull, otherwise (i.e. if not found) return nil. The next read operation will return the character after aCharacter. - The argument, aCharacter must be character, or integer wehn in binary mode." + The argument, aCharacter must be character, or integer when in binary mode. + Only single byte characters are currently supported." %{ /* NOCONTEXT */ @@ -3052,7 +3057,7 @@ /* Q: should we just say: "not found" ? */ if ((cSearch < 0) || (cSearch > 255)) goto badArgument; - f = MKFD(fp); + f = __FILEVal(fp); __READING__(f) __BEGIN_INTERRUPTABLE__ @@ -3117,7 +3122,7 @@ if (((fp = _INST(filePointer)) != nil) && (_INST(mode) != @symbol(writeonly))) { if (_INST(binary) != true) { - f = MKFD(fp); + f = __FILEVal(fp); if (feof(f)) { _INST(hitEOF) = true; @@ -3186,7 +3191,7 @@ if (((fp = _INST(filePointer)) != nil) && (_INST(mode) != @symbol(writeonly))) { if (_INST(binary) != true) { - f = MKFD(fp); + f = __FILEVal(fp); __READING__(f) __BEGIN_INTERRUPTABLE__ @@ -3249,7 +3254,7 @@ if (((fp = _INST(filePointer)) != nil) && (_INST(mode) != @symbol(writeonly))) { - f = MKFD(fp); + f = __FILEVal(fp); __BEGIN_INTERRUPTABLE__ __READING__(f) @@ -3369,7 +3374,7 @@ } _INST(lastErrorNumber) = nil; - f = MKFD(_INST(filePointer)); + f = __FILEVal(_INST(filePointer)); __READING__(f) diff -r a5ce0ee55d33 -r b57530aa1b0a FileStr.st --- a/FileStr.st Thu Nov 02 20:57:11 1995 +0100 +++ b/FileStr.st Thu Nov 02 21:10:58 1995 +0100 @@ -21,7 +21,7 @@ COPYRIGHT (c) 1989 by Claus Gittinger All Rights Reserved -$Header: /cvs/stx/stx/libbasic/Attic/FileStr.st,v 1.24 1995-09-16 17:13:21 claus Exp $ +$Header: /cvs/stx/stx/libbasic/Attic/FileStr.st,v 1.25 1995-11-02 20:10:52 cg Exp $ '! !FileStream class methodsFor:'documentation'! @@ -42,7 +42,7 @@ version " -$Header: /cvs/stx/stx/libbasic/Attic/FileStr.st,v 1.24 1995-09-16 17:13:21 claus Exp $ +$Header: /cvs/stx/stx/libbasic/Attic/FileStr.st,v 1.25 1995-11-02 20:10:52 cg Exp $ " ! @@ -400,7 +400,7 @@ _INST(lastErrorNumber) = _MKSMALLINT(errno); _INST(position) = nil; } else { - _INST(filePointer) = MKOBJ((int)f); + _INST(filePointer) = __MKOBJ((int)f); _INST(position) = _MKSMALLINT(1); retVal = self; } @@ -509,7 +509,7 @@ int size; if (_INST(filePointer) != nil) { - f = (FILE *)MKFD(_INST(filePointer)); + f = __FILEVal(_INST(filePointer)); if ((size = filesize(fileno(f))) >= 0) { RETURN ( _MKSMALLINT(size) ); } @@ -521,7 +521,7 @@ int fd; if (_INST(filePointer) != nil) { - f = (FILE *)MKFD(_INST(filePointer)); + f = __FILEVal(_INST(filePointer)); fd = fileno(f); do { ret = fstat(fd, &buf); @@ -557,7 +557,7 @@ long currentPosition; if (_INST(filePointer) != nil) { - f = (FILE *)MKFD(_INST(filePointer)); + f = __FILEVal(_INST(filePointer)); do { if (_INST(buffered) == true) { currentPosition = (long) ftell(f); @@ -590,7 +590,7 @@ if ((fp = _INST(filePointer)) != nil) { if (__isSmallInteger(newPos)) { - f = (FILE *)MKFD(fp); + f = __FILEVal(fp); /* * notice: Smalltalk index starts at 1 */ @@ -626,7 +626,7 @@ int ret; if (_INST(filePointer) != nil) { - f = (FILE *)MKFD(_INST(filePointer)); + f = __FILEVal(_INST(filePointer)); _INST(position) = nil; do { if (_INST(buffered) == true) { diff -r a5ce0ee55d33 -r b57530aa1b0a FileStream.st --- a/FileStream.st Thu Nov 02 20:57:11 1995 +0100 +++ b/FileStream.st Thu Nov 02 21:10:58 1995 +0100 @@ -21,7 +21,7 @@ COPYRIGHT (c) 1989 by Claus Gittinger All Rights Reserved -$Header: /cvs/stx/stx/libbasic/FileStream.st,v 1.24 1995-09-16 17:13:21 claus Exp $ +$Header: /cvs/stx/stx/libbasic/FileStream.st,v 1.25 1995-11-02 20:10:52 cg Exp $ '! !FileStream class methodsFor:'documentation'! @@ -42,7 +42,7 @@ version " -$Header: /cvs/stx/stx/libbasic/FileStream.st,v 1.24 1995-09-16 17:13:21 claus Exp $ +$Header: /cvs/stx/stx/libbasic/FileStream.st,v 1.25 1995-11-02 20:10:52 cg Exp $ " ! @@ -400,7 +400,7 @@ _INST(lastErrorNumber) = _MKSMALLINT(errno); _INST(position) = nil; } else { - _INST(filePointer) = MKOBJ((int)f); + _INST(filePointer) = __MKOBJ((int)f); _INST(position) = _MKSMALLINT(1); retVal = self; } @@ -509,7 +509,7 @@ int size; if (_INST(filePointer) != nil) { - f = (FILE *)MKFD(_INST(filePointer)); + f = __FILEVal(_INST(filePointer)); if ((size = filesize(fileno(f))) >= 0) { RETURN ( _MKSMALLINT(size) ); } @@ -521,7 +521,7 @@ int fd; if (_INST(filePointer) != nil) { - f = (FILE *)MKFD(_INST(filePointer)); + f = __FILEVal(_INST(filePointer)); fd = fileno(f); do { ret = fstat(fd, &buf); @@ -557,7 +557,7 @@ long currentPosition; if (_INST(filePointer) != nil) { - f = (FILE *)MKFD(_INST(filePointer)); + f = __FILEVal(_INST(filePointer)); do { if (_INST(buffered) == true) { currentPosition = (long) ftell(f); @@ -590,7 +590,7 @@ if ((fp = _INST(filePointer)) != nil) { if (__isSmallInteger(newPos)) { - f = (FILE *)MKFD(fp); + f = __FILEVal(fp); /* * notice: Smalltalk index starts at 1 */ @@ -626,7 +626,7 @@ int ret; if (_INST(filePointer) != nil) { - f = (FILE *)MKFD(_INST(filePointer)); + f = __FILEVal(_INST(filePointer)); _INST(position) = nil; do { if (_INST(buffered) == true) { diff -r a5ce0ee55d33 -r b57530aa1b0a NPExtStr.st --- a/NPExtStr.st Thu Nov 02 20:57:11 1995 +0100 +++ b/NPExtStr.st Thu Nov 02 21:10:58 1995 +0100 @@ -21,7 +21,7 @@ COPYRIGHT (c) 1989 by Claus Gittinger All Rights Reserved -$Header: /cvs/stx/stx/libbasic/Attic/NPExtStr.st,v 1.17 1995-09-16 17:13:41 claus Exp $ +$Header: /cvs/stx/stx/libbasic/Attic/NPExtStr.st,v 1.18 1995-11-02 20:10:55 cg Exp $ '! !NonPositionableExternalStream class methodsFor:'documentation'! @@ -42,7 +42,7 @@ version " -$Header: /cvs/stx/stx/libbasic/Attic/NPExtStr.st,v 1.17 1995-09-16 17:13:41 claus Exp $ +$Header: /cvs/stx/stx/libbasic/Attic/NPExtStr.st,v 1.18 1995-11-02 20:10:55 cg Exp $ " ! @@ -184,7 +184,7 @@ mode := #readonly. buffered := true. %{ - _INST(filePointer) = MKOBJ(stdin); + _INST(filePointer) = __MKOBJ(stdin); %} ! @@ -194,7 +194,7 @@ mode := #readwrite. buffered := false. %{ - _INST(filePointer) = MKOBJ(stdout); + _INST(filePointer) = __MKOBJ(stdout); %} ! @@ -204,7 +204,7 @@ mode := #readwrite. buffered := false. %{ - _INST(filePointer) = MKOBJ(stderr); + _INST(filePointer) = __MKOBJ(stderr); %} ! diff -r a5ce0ee55d33 -r b57530aa1b0a NonPositionableExternalStream.st --- a/NonPositionableExternalStream.st Thu Nov 02 20:57:11 1995 +0100 +++ b/NonPositionableExternalStream.st Thu Nov 02 21:10:58 1995 +0100 @@ -21,7 +21,7 @@ COPYRIGHT (c) 1989 by Claus Gittinger All Rights Reserved -$Header: /cvs/stx/stx/libbasic/NonPositionableExternalStream.st,v 1.17 1995-09-16 17:13:41 claus Exp $ +$Header: /cvs/stx/stx/libbasic/NonPositionableExternalStream.st,v 1.18 1995-11-02 20:10:55 cg Exp $ '! !NonPositionableExternalStream class methodsFor:'documentation'! @@ -42,7 +42,7 @@ version " -$Header: /cvs/stx/stx/libbasic/NonPositionableExternalStream.st,v 1.17 1995-09-16 17:13:41 claus Exp $ +$Header: /cvs/stx/stx/libbasic/NonPositionableExternalStream.st,v 1.18 1995-11-02 20:10:55 cg Exp $ " ! @@ -184,7 +184,7 @@ mode := #readonly. buffered := true. %{ - _INST(filePointer) = MKOBJ(stdin); + _INST(filePointer) = __MKOBJ(stdin); %} ! @@ -194,7 +194,7 @@ mode := #readwrite. buffered := false. %{ - _INST(filePointer) = MKOBJ(stdout); + _INST(filePointer) = __MKOBJ(stdout); %} ! @@ -204,7 +204,7 @@ mode := #readwrite. buffered := false. %{ - _INST(filePointer) = MKOBJ(stderr); + _INST(filePointer) = __MKOBJ(stderr); %} ! diff -r a5ce0ee55d33 -r b57530aa1b0a PipeStr.st --- a/PipeStr.st Thu Nov 02 20:57:11 1995 +0100 +++ b/PipeStr.st Thu Nov 02 21:10:58 1995 +0100 @@ -21,7 +21,7 @@ COPYRIGHT (c) 1989 by Claus Gittinger All Rights Reserved -$Header: /cvs/stx/stx/libbasic/Attic/PipeStr.st,v 1.34 1995-09-16 17:13:53 claus Exp $ +$Header: /cvs/stx/stx/libbasic/Attic/PipeStr.st,v 1.35 1995-11-02 20:10:58 cg Exp $ '! !PipeStream class methodsFor:'documentation'! @@ -42,7 +42,7 @@ version " -$Header: /cvs/stx/stx/libbasic/Attic/PipeStr.st,v 1.34 1995-09-16 17:13:53 claus Exp $ +$Header: /cvs/stx/stx/libbasic/Attic/PipeStr.st,v 1.35 1995-11-02 20:10:58 cg Exp $ " ! @@ -271,7 +271,7 @@ * allow interrupt even when blocking here ... */ __BEGIN_INTERRUPTABLE__ - pclose(MKFD(fp)); + pclose(__FILEVal(fp)); __END_INTERRUPTABLE__ } #endif @@ -292,7 +292,7 @@ if ((fp = _INST(filePointer)) != nil) { _INST(filePointer) = nil; __BEGIN_INTERRUPTABLE__ - f = MKFD(fp); + f = __FILEVal(fp); close(fileno(f)); __END_INTERRUPTABLE__ } @@ -314,7 +314,7 @@ RETURN (_true); } if ((t = _INST(filePointer)) != nil) { - f = MKFD(t); + f = __FILEVal(t); if (feof(f)) { _INST(hitEOF) = true; RETURN (true); @@ -368,7 +368,7 @@ _INST(lastErrorNumber) = _MKSMALLINT(errno); } else { clearerr(f); - _INST(filePointer) = MKOBJ(f); + _INST(filePointer) = __MKOBJ(f); retVal = self; } } diff -r a5ce0ee55d33 -r b57530aa1b0a PipeStream.st --- a/PipeStream.st Thu Nov 02 20:57:11 1995 +0100 +++ b/PipeStream.st Thu Nov 02 21:10:58 1995 +0100 @@ -21,7 +21,7 @@ COPYRIGHT (c) 1989 by Claus Gittinger All Rights Reserved -$Header: /cvs/stx/stx/libbasic/PipeStream.st,v 1.34 1995-09-16 17:13:53 claus Exp $ +$Header: /cvs/stx/stx/libbasic/PipeStream.st,v 1.35 1995-11-02 20:10:58 cg Exp $ '! !PipeStream class methodsFor:'documentation'! @@ -42,7 +42,7 @@ version " -$Header: /cvs/stx/stx/libbasic/PipeStream.st,v 1.34 1995-09-16 17:13:53 claus Exp $ +$Header: /cvs/stx/stx/libbasic/PipeStream.st,v 1.35 1995-11-02 20:10:58 cg Exp $ " ! @@ -271,7 +271,7 @@ * allow interrupt even when blocking here ... */ __BEGIN_INTERRUPTABLE__ - pclose(MKFD(fp)); + pclose(__FILEVal(fp)); __END_INTERRUPTABLE__ } #endif @@ -292,7 +292,7 @@ if ((fp = _INST(filePointer)) != nil) { _INST(filePointer) = nil; __BEGIN_INTERRUPTABLE__ - f = MKFD(fp); + f = __FILEVal(fp); close(fileno(f)); __END_INTERRUPTABLE__ } @@ -314,7 +314,7 @@ RETURN (_true); } if ((t = _INST(filePointer)) != nil) { - f = MKFD(t); + f = __FILEVal(t); if (feof(f)) { _INST(hitEOF) = true; RETURN (true); @@ -368,7 +368,7 @@ _INST(lastErrorNumber) = _MKSMALLINT(errno); } else { clearerr(f); - _INST(filePointer) = MKOBJ(f); + _INST(filePointer) = __MKOBJ(f); retVal = self; } }