# HG changeset patch # User claus # Date 792844171 -3600 # Node ID bd6753bf0401b624a0906a701c8911c83f10b302 # Parent bf0731bbbd0176fca84c6b6f3b340c6b12eb8cd6 *** empty log message *** diff -r bf0731bbbd01 -r bd6753bf0401 ExtFunc.st --- a/ExtFunc.st Wed Feb 15 11:21:53 1995 +0100 +++ b/ExtFunc.st Wed Feb 15 11:29:31 1995 +0100 @@ -21,7 +21,7 @@ COPYRIGHT (c) 1994 by Claus Gittinger All Rights Reserved -$Header: /cvs/stx/stx/libbasic2/Attic/ExtFunc.st,v 1.4 1994-10-10 00:53:55 claus Exp $ +$Header: /cvs/stx/stx/libbasic2/Attic/ExtFunc.st,v 1.5 1995-02-15 10:29:21 claus Exp $ '! !ExternalFunction class methodsFor:'documentation'! @@ -42,7 +42,7 @@ version " -$Header: /cvs/stx/stx/libbasic2/Attic/ExtFunc.st,v 1.4 1994-10-10 00:53:55 claus Exp $ +$Header: /cvs/stx/stx/libbasic2/Attic/ExtFunc.st,v 1.5 1995-02-15 10:29:21 claus Exp $ " ! @@ -98,7 +98,7 @@ extern CUSTOMFUNCTION customFunctions[]; int (* func)(); - if (_isSmallInteger(nr) && __isArray(argArray)) { + if (__isSmallInteger(nr) && __isArray(argArray)) { int nargs = _arraySize(argArray); int functionNr; diff -r bf0731bbbd01 -r bd6753bf0401 Make.proto --- a/Make.proto Wed Feb 15 11:21:53 1995 +0100 +++ b/Make.proto Wed Feb 15 11:29:31 1995 +0100 @@ -33,7 +33,7 @@ TwoByteStr.$(O) \ Polygon.$(O) \ VarArray.$(O) \ - Text.$(O) \ + StrColl.$(O) \ FileText.$(O) \ VarString.$(O) \ ChangeSet.$(O) \ @@ -101,7 +101,7 @@ BCCReader.$(O): BCCReader.st $(I)/CCReader.H $(OBJECT) Project.$(O): Project.st $(OBJECT) -WMethod.$(O): WMethod.st $(I)/Method.H $(OBJECT) +WMethod.$(O): WMethod.st $(I)/Method.H $(I)/CompCode.H $(I)/ExecFunc.H $(OBJECT) COLL=$(I)/Coll.H $(OBJECT) SET=$(I)/Set.H $(COLL) diff -r bf0731bbbd01 -r bd6753bf0401 Socket.st --- a/Socket.st Wed Feb 15 11:21:53 1995 +0100 +++ b/Socket.st Wed Feb 15 11:29:31 1995 +0100 @@ -22,7 +22,7 @@ COPYRIGHT (c) 1992 by Claus Gittinger All Rights Reserved -$Header: /cvs/stx/stx/libbasic2/Socket.st,v 1.16 1995-02-05 23:38:37 claus Exp $ +$Header: /cvs/stx/stx/libbasic2/Socket.st,v 1.17 1995-02-15 10:29:23 claus Exp $ '! !Socket class methodsFor:'documentation'! @@ -43,7 +43,7 @@ version " -$Header: /cvs/stx/stx/libbasic2/Socket.st,v 1.16 1995-02-05 23:38:37 claus Exp $ +$Header: /cvs/stx/stx/libbasic2/Socket.st,v 1.17 1995-02-15 10:29:23 claus Exp $ " ! @@ -261,10 +261,7 @@ struct sockaddr_in sa ; struct hostent *hp ; - if (_isSmallInteger(b1) - && _isSmallInteger(b2) - && _isSmallInteger(b3) - && _isSmallInteger(b4)) { + if (__bothSmallInteger(b1, b2) && __bothSmallInteger(b3, b4)) { bzero(&sa, sizeof(sa)) ; sa.sin_addr.s_addr = _intVal(b1) & 0xFF; sa.sin_addr.s_addr = (sa.sin_addr.s_addr << 8) | (_intVal(b2) & 0xFF); @@ -305,7 +302,7 @@ %{ struct servent *servent = NULL; - if (_isSmallInteger(aNameOrNumber)) { + if (__isSmallInteger(aNameOrNumber)) { servent = getservbyport(htons(_intVal(aNameOrNumber)), "tcp") ; if (servent != NULL) { RETURN ( aNameOrNumber ); @@ -334,7 +331,7 @@ %{ struct servent *servent = NULL; - if (_isSmallInteger(aNameOrNumber)) { + if (__isSmallInteger(aNameOrNumber)) { servent = getservbyport(htons(_intVal(aNameOrNumber)), "tcp") ; if (servent == NULL) { servent = getservbyport(htons(_intVal(aNameOrNumber)), "udp") ; @@ -989,7 +986,7 @@ * INET addresses - port must be a smallinteger */ insock.sin_family = AF_INET; - if (! _isSmallInteger(portNumber)) { + if (! __isSmallInteger(portNumber)) { fprintf(stderr, "invalid port\n"); RETURN (false); } @@ -1087,7 +1084,7 @@ ok = 0; #ifdef AF_INET if (_INST(domain) == @symbol(inet)) { - if (! _isSmallInteger(aPortNr)) { + if (! __isSmallInteger(aPortNr)) { fprintf(stderr, "invalid port\n"); RETURN (false); } @@ -1174,7 +1171,7 @@ int sock; int ret; - if (! _isSmallInteger(aNumber)) { + if (! __isSmallInteger(aNumber)) { fprintf(stderr, "invalid arg\n"); RETURN (false); } @@ -1362,7 +1359,7 @@ millis := (seconds * 1000) rounded. %{ #if defined(SO_SNDTIMEO) && defined(SOL_SOCKET) && defined(HZ) - if (_isSmallInteger(millis)) { + if (__isSmallInteger(millis)) { OBJ fp = _INST(filePointer); int sock; int opt; @@ -1389,7 +1386,7 @@ millis := (seconds * 1000) rounded. %{ #if defined(SO_RCVTIMEO) && defined(SOL_SOCKET) && defined(HZ) - if (_isSmallInteger(millis)) { + if (__isSmallInteger(millis)) { OBJ fp = _INST(filePointer); int sock; int opt; diff -r bf0731bbbd01 -r bd6753bf0401 SoundStr.st --- a/SoundStr.st Wed Feb 15 11:21:53 1995 +0100 +++ b/SoundStr.st Wed Feb 15 11:29:31 1995 +0100 @@ -21,7 +21,7 @@ COPYRIGHT (c) 1993 by Claus Gittinger All Rights Reserved -$Header: /cvs/stx/stx/libbasic2/Attic/SoundStr.st,v 1.12 1995-02-05 23:38:40 claus Exp $ +$Header: /cvs/stx/stx/libbasic2/Attic/SoundStr.st,v 1.13 1995-02-15 10:29:26 claus Exp $ '! !SoundStream class methodsFor:'documentation'! @@ -42,7 +42,7 @@ version " -$Header: /cvs/stx/stx/libbasic2/Attic/SoundStr.st,v 1.12 1995-02-05 23:38:40 claus Exp $ +$Header: /cvs/stx/stx/libbasic2/Attic/SoundStr.st,v 1.13 1995-02-15 10:29:26 claus Exp $ " ! @@ -561,7 +561,7 @@ else ALsetwidth(config, AL_SAMPLE_8); - if (_isSmallInteger(_INST(sampleRate))) + if (__isSmallInteger(_INST(sampleRate))) params[3] = params[5] = _intVal(_INST(sampleRate)); ALsetparams(AL_DEFAULT_DEVICE, params, 6); @@ -651,7 +651,7 @@ if (_INST(filePointer) != nil) { if (_INST(mode) != _readonly) { - if (_isSmallInteger(count) && _isSmallInteger(start)) { + if (__bothSmallInteger(count, start)) { cnt = _intVal(count); offs = _intVal(start) - 1; p = MKAUDIO(_INST(filePointer)); @@ -698,7 +698,7 @@ if (_INST(filePointer) != nil) { if (_INST(mode) != _writeonly) { - if (_isSmallInteger(count) && _isSmallInteger(start)) { + if (__bothSmallInteger(count, start)) { cnt = _intVal(count); offs = _intVal(start) - 1; p = MKAUDIO(_INST(filePointer)); diff -r bf0731bbbd01 -r bd6753bf0401 SoundStream.st --- a/SoundStream.st Wed Feb 15 11:21:53 1995 +0100 +++ b/SoundStream.st Wed Feb 15 11:29:31 1995 +0100 @@ -21,7 +21,7 @@ COPYRIGHT (c) 1993 by Claus Gittinger All Rights Reserved -$Header: /cvs/stx/stx/libbasic2/SoundStream.st,v 1.12 1995-02-05 23:38:40 claus Exp $ +$Header: /cvs/stx/stx/libbasic2/SoundStream.st,v 1.13 1995-02-15 10:29:26 claus Exp $ '! !SoundStream class methodsFor:'documentation'! @@ -42,7 +42,7 @@ version " -$Header: /cvs/stx/stx/libbasic2/SoundStream.st,v 1.12 1995-02-05 23:38:40 claus Exp $ +$Header: /cvs/stx/stx/libbasic2/SoundStream.st,v 1.13 1995-02-15 10:29:26 claus Exp $ " ! @@ -561,7 +561,7 @@ else ALsetwidth(config, AL_SAMPLE_8); - if (_isSmallInteger(_INST(sampleRate))) + if (__isSmallInteger(_INST(sampleRate))) params[3] = params[5] = _intVal(_INST(sampleRate)); ALsetparams(AL_DEFAULT_DEVICE, params, 6); @@ -651,7 +651,7 @@ if (_INST(filePointer) != nil) { if (_INST(mode) != _readonly) { - if (_isSmallInteger(count) && _isSmallInteger(start)) { + if (__bothSmallInteger(count, start)) { cnt = _intVal(count); offs = _intVal(start) - 1; p = MKAUDIO(_INST(filePointer)); @@ -698,7 +698,7 @@ if (_INST(filePointer) != nil) { if (_INST(mode) != _writeonly) { - if (_isSmallInteger(count) && _isSmallInteger(start)) { + if (__bothSmallInteger(count, start)) { cnt = _intVal(count); offs = _intVal(start) - 1; p = MKAUDIO(_INST(filePointer)); diff -r bf0731bbbd01 -r bd6753bf0401 VarArray.st --- a/VarArray.st Wed Feb 15 11:21:53 1995 +0100 +++ b/VarArray.st Wed Feb 15 11:29:31 1995 +0100 @@ -21,7 +21,7 @@ COPYRIGHT (c) 1989 by Claus Gittinger All Rights Reserved -$Header: /cvs/stx/stx/libbasic2/Attic/VarArray.st,v 1.8 1994-10-10 00:52:54 claus Exp $ +$Header: /cvs/stx/stx/libbasic2/Attic/VarArray.st,v 1.9 1995-02-15 10:29:29 claus Exp $ '! !VariableArray class methodsFor:'documentation'! @@ -42,7 +42,7 @@ version " -$Header: /cvs/stx/stx/libbasic2/Attic/VarArray.st,v 1.8 1994-10-10 00:52:54 claus Exp $ +$Header: /cvs/stx/stx/libbasic2/Attic/VarArray.st,v 1.9 1995-02-15 10:29:29 claus Exp $ " ! @@ -51,7 +51,7 @@ VariableArrays can grow and shrink - in contrast to Arrays which are fixed in size. WARNING: Do not use this class for new applications - its a historic - leftover from times when no OrderedCollection existed. + leftover from times when no OrderedCollection existed. Use OrderedCollection, which offers more functionality, and is even a bit faster in some operations. @@ -238,6 +238,8 @@ |newArray| + (newSize == tally) ifTrue:[^ self]. + (newSize > tally) ifTrue:[ (newSize > contentsArray size) ifTrue:[ newArray := Array new:(newSize * 2). diff -r bf0731bbbd01 -r bd6753bf0401 VariableArray.st --- a/VariableArray.st Wed Feb 15 11:21:53 1995 +0100 +++ b/VariableArray.st Wed Feb 15 11:29:31 1995 +0100 @@ -21,7 +21,7 @@ COPYRIGHT (c) 1989 by Claus Gittinger All Rights Reserved -$Header: /cvs/stx/stx/libbasic2/VariableArray.st,v 1.8 1994-10-10 00:52:54 claus Exp $ +$Header: /cvs/stx/stx/libbasic2/VariableArray.st,v 1.9 1995-02-15 10:29:29 claus Exp $ '! !VariableArray class methodsFor:'documentation'! @@ -42,7 +42,7 @@ version " -$Header: /cvs/stx/stx/libbasic2/VariableArray.st,v 1.8 1994-10-10 00:52:54 claus Exp $ +$Header: /cvs/stx/stx/libbasic2/VariableArray.st,v 1.9 1995-02-15 10:29:29 claus Exp $ " ! @@ -51,7 +51,7 @@ VariableArrays can grow and shrink - in contrast to Arrays which are fixed in size. WARNING: Do not use this class for new applications - its a historic - leftover from times when no OrderedCollection existed. + leftover from times when no OrderedCollection existed. Use OrderedCollection, which offers more functionality, and is even a bit faster in some operations. @@ -238,6 +238,8 @@ |newArray| + (newSize == tally) ifTrue:[^ self]. + (newSize > tally) ifTrue:[ (newSize > contentsArray size) ifTrue:[ newArray := Array new:(newSize * 2).