Commit graph

845 commits

Author SHA1 Message Date
Andrew McCallum
433dd8ef66 ([IndexedCollection -removeObject:]): Now removes *all* instances of
ANOBJECT, not just one.
([IndexedCollection -replaceObject:withObject:]): Now replaces *all*
instances of OLDOBJECT, not just one.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1303 72102866-910b-0410-8b05-ffd578937521
1996-03-30 19:04:35 +00:00
Andrew McCallum
5054040415 (ABS): New macro, defined if not already defined.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1302 72102866-910b-0410-8b05-ffd578937521
1996-03-30 16:01:43 +00:00
Andrew McCallum
3eb99042d6 Fix typos in method types.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1301 72102866-910b-0410-8b05-ffd578937521
1996-03-30 15:58:28 +00:00
Andrew McCallum
c721e0da0e (Array _grow_factor): Change type of ivar from unsigned to int.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1300 72102866-910b-0410-8b05-ffd578937521
1996-03-30 15:06:46 +00:00
Andrew McCallum
b9fabc2237 ([Array +defaultGrowFactor]): Return type changed to int.
([Array -growFactor]): Likewise.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1299 72102866-910b-0410-8b05-ffd578937521
1996-03-30 15:06:20 +00:00
Andrew McCallum
7867d0a082 Add new semantic to ivar _grow_factor: if it is less than 0, the array
grows by -_grow_factor, but never shrinks.
(incrementCount): Use the ABS() of _grow_factor.
(decrementCount): Only shrink the array if _grow_factor is > 0.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1298 72102866-910b-0410-8b05-ffd578937521
1996-03-30 15:05:15 +00:00
Andrew McCallum
ff190a3a03 Declare new method names, and comment.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1293 72102866-910b-0410-8b05-ffd578937521
1996-03-30 01:33:05 +00:00
Andrew McCallum
78380df445 Overhauled for memory management changes to fix leaks, various other
fixes.
(MFRAME_STRUCTURES_PASSED_BY_REFERENCE): Renamed from
CONNECTION_STRUCTURES_PASSED_BY_REFERENCE.
(mframe_dissect_call): Function renamed from dissect_method_call.
Remove some redundant if()-else clauses.  Clarify case in which
OUT_PARAMETERS is true.  Use switch statement instead of if-else's.
(mframe_do_call): Function renamed from make_method_call.  Get the
local selector type from the target's Method, not from the selector
type; this will more reliably give the correct type string.  Don't
bother to set OBJECT twice.  Remove some redundant if()-else clauses.
Use NSParameterAssert, not assert, so we can catch problems, (and not
crash the D.O. server).  Change the way memory management for decoded
arguments is handled to remove memory leaks; use new scheme for
DECODER functions that are responsonsible for making sure allocated
memory is eventually freed.  Use alloca() to allocate space for _C_PTR
values, struct's and arrays.  Overhaul the way floats and doubles are
extracted from the RETFRAME; use functions with __builtin_return,
instead of fishing around the RETFRAME.  Use switch statement intead
of if-else's.  Separate cases for char's and short's.  Change some
local variable names for clarity.
(mframe_build_return): Function renamed from dissect_method_return.
Remove some redundant if()-else clauses.  Use NSParameterAssert, not
assert.  Change the way memory management for decoded arguments is
handled to remove memory leaks; use new scheme for DECODER functions
that are responsonsible for making sure allocated memory is eventually
freed.  Use alloca() to allocate space for _C_PTR values, struct's and
arrays.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1292 72102866-910b-0410-8b05-ffd578937521
1996-03-30 01:29:07 +00:00
Andrew McCallum
89c6fa64ca ([BinaryCStream -encodeValueOfCType:at:withName:]): Encode the
exponent as a short, not an int.
([BinaryCStream -decodeValueOfCType:at:withName:]): Likewise, decoding.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1291 72102866-910b-0410-8b05-ffd578937521
1996-03-30 00:50:30 +00:00
Andrew McCallum
a4627672a3 ([Connection -forwardForProxy:selector:argFrame:]): Use new mframe
interface.  In the nested function DECODER, autorelease any char*'s
that we decode, as required by the new memory reference scheme.
([Connection -_service_forwardForProxy:]): Likewise, for both.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1290 72102866-910b-0410-8b05-ffd578937521
1996-03-29 17:55:15 +00:00
Andrew McCallum
5e439ccd99 ([BinaryCStream -encodeValueOfCType:at:withName:]): [_C_CHARPTR]:
Don't autorelease the malloc'ed pointer here; thus the behavior is
analogous to decoding an object: it gives you a reference, it is the
callers responsibility to free it.
([BinaryCStream -decodeValueOfCType:at:withName:]): [_C_DBL]: Fix
typo.  Use mantissa1, not mantissa2 twice.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1289 72102866-910b-0410-8b05-ffd578937521
1996-03-29 17:53:05 +00:00
Andrew McCallum
fca9bcfe2f ([ConstantCollection -_collectionReleaseContents]): Use alloca()
instead of malloc() and free().


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1288 72102866-910b-0410-8b05-ffd578937521
1996-03-29 17:51:07 +00:00
Andrew McCallum
06183fce8e Include <math.h>
(FLOAT_FACTOR): New macro.
(WRITE_SIGNED_TYPE): Take new first argument, the pointer for the
data.
(READ_SIGNED_TYPE): Likewise.
(WRITE_UNSIGNED_TYPE): Likewise.
(READ_UNSIGNED_TYPE): Likewise.
([BinaryCStream -encodeValueOfCType:at:withName:]): [_C_FLT]: Use new
scheme, based on frexp() to turn a float into a series of ints.
[_C_DBL]: Likewise.
([BinaryCStream -decodeValueOfCType:at:withName:]): [_C_FLT]: Likewise
to match.
[_C_DBL]: Likewise.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1286 72102866-910b-0410-8b05-ffd578937521
1996-03-29 15:51:13 +00:00
Andrew McCallum
c110e65ee5 (debug_run_loop): Changed from 1 to 0; turn off debugging messages.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1285 72102866-910b-0410-8b05-ffd578937521
1996-03-29 14:47:38 +00:00
Andrew McCallum
15f0c95e86 ([MallocAddress +autoreleaseMallocAddress:]): Fix typo in method name.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1284 72102866-910b-0410-8b05-ffd578937521
1996-03-29 04:01:33 +00:00
Andrew McCallum
07a8527760 Fix typo.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1283 72102866-910b-0410-8b05-ffd578937521
1996-03-29 03:59:34 +00:00
Andrew McCallum
976194d214 ([MallocAddress +initialize]): Use
NSNonRetainedObjectMapValueCallBacks, not NSObjectMapValueCallBacks,
because otherwise the object will never get dealloc'ed.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1282 72102866-910b-0410-8b05-ffd578937521
1996-03-27 02:14:47 +00:00
Andrew McCallum
ae95bc9c58 In all methods, use NSParameterAssert() instead of assert(), so that
it raises an NSException, and doesn't abort().
([Connection -forwardForProxy:selector:argFrame:]): Decode the flag
that indicates whether the return packet hold an exception or the
return values.  If it holds an exception, decode it and raise it.
([Connection -_service_forwardForProxy:]): Surround the processing of
the method request packet with NS_DURING...NS_ENDHANDLER.  If an
exception is raised, catch it, encode in in a specially flagged
packet, and send the packet back to the client.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1278 72102866-910b-0410-8b05-ffd578937521
1996-03-26 22:34:40 +00:00
Andrew McCallum
5f00258b41 ([BinaryCStream -decodeValueOfCType:at:withName:]): [_C_CHARPTR]:
Autorelease the malloc'ed char pointer.  Before memory was leaking.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1277 72102866-910b-0410-8b05-ffd578937521
1996-03-26 22:28:48 +00:00
Andrew McCallum
647f080875 Fix typos.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1276 72102866-910b-0410-8b05-ffd578937521
1996-03-26 20:59:42 +00:00
Andrew McCallum
9b7e65f4e0 Use NSException instead of sending -error: in all methods.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1275 72102866-910b-0410-8b05-ffd578937521
1996-03-26 20:52:26 +00:00
Andrew McCallum
7f329b4714 ([OrderedCollection -putObject:atIndex:]): Return type changed from id
to void.  Use NSException, not error:.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1274 72102866-910b-0410-8b05-ffd578937521
1996-03-26 20:52:17 +00:00
Andrew McCallum
5aae0eafb3 Use NSException instead of sending -error: in all methods.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1273 72102866-910b-0410-8b05-ffd578937521
1996-03-26 19:35:47 +00:00
Andrew McCallum
9536fdc257 ([BinaryCStream -encodeValueOfCType:at:withName:]): Use NSException
instead of sending -error:.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1272 72102866-910b-0410-8b05-ffd578937521
1996-03-26 19:23:09 +00:00
Andrew McCallum
095ebaaa4c (string_buf_ptr): Init local variable.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1271 72102866-910b-0410-8b05-ffd578937521
1996-03-26 00:29:07 +00:00
Andrew McCallum
f744067833 ([NSBundle +setSystemLanguages:]): Comment out unused variables.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1270 72102866-910b-0410-8b05-ffd578937521
1996-03-26 00:28:39 +00:00
Andrew McCallum
60bd74fd01 ([NSMutableData -resetBytesInRange:]): Cast to avoid warning.
([NSMutableData -initWithLength:]): Likewise.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1269 72102866-910b-0410-8b05-ffd578937521
1996-03-26 00:28:20 +00:00
Andrew McCallum
ea1e49af1b ([NSValueDecoder -initValue:withObjCType:]): Return self.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1268 72102866-910b-0410-8b05-ffd578937521
1996-03-26 00:27:44 +00:00
Andrew McCallum
ffa7dbcfe9 (objc_load_module): Comment out unused variables.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1267 72102866-910b-0410-8b05-ffd578937521
1996-03-26 00:27:31 +00:00
Andrew McCallum
c286e57a89 Include <sys/param.h> for MAXHOSTNAMELEN.
([UdpInPort -newPacketReceivedBeforeDate:]): Return nil.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1266 72102866-910b-0410-8b05-ffd578937521
1996-03-26 00:27:03 +00:00
Andrew McCallum
e9a9bc4532 (name_2_port_number): Function renamed from name_to_port_number, and
changed to better use IPPORT_USERRESERVED.
([UdpInPort +newForReceivingFromPortNumber:]): Overhauled and
commented.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1260 72102866-910b-0410-8b05-ffd578937521
1996-03-24 22:04:23 +00:00
Andrew McCallum
5cdc044b70 ([NSObject +initialize]): Use NSNonOwnedPointerOrNullMapKeyCallBacks,
not NSNonRetainedObjectsMapKeyCallBacks; keying on addresses, and
avoiding a call to -isEqual is better.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1258 72102866-910b-0410-8b05-ffd578937521
1996-03-22 13:39:01 +00:00
Andrew McCallum
11b30bb8be ([BinaryCStream -encodeValueOfCType:at:withName:name]): [_C_CHARPTR]:
Write the string with the host LENGTH, not the network LENGTH!


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1256 72102866-910b-0410-8b05-ffd578937521
1996-03-22 02:36:22 +00:00
Andrew McCallum
af9619a45c ([NSGSet -isEqual:]): Make this just compare the id's, not call [super
isEqual:].  I did this to prevent an infinite loop while running
checks/nsarchiver.m, but I have a feeling that the bug might be in
map.c, not here.  Look at this again!


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1254 72102866-910b-0410-8b05-ffd578937521
1996-03-22 02:35:07 +00:00
Andrew McCallum
2579e7ddca ([Set -nextObjectWithEnumState:]): Dereference ENUMSTATE; this change
mirrors the earlier change to [NSGSet -nextObject].


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1253 72102866-910b-0410-8b05-ffd578937521
1996-03-22 02:33:33 +00:00
Andrew McCallum
d4ab4732b7 ([ConstantKeyedCollection -_decodeContentsWithCoder:]): Reverse order
of objects and keys, to match _encodeContentsWithCoder:.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1252 72102866-910b-0410-8b05-ffd578937521
1996-03-22 01:46:30 +00:00
Andrew McCallum
0a7e7d34fd New file.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1251 72102866-910b-0410-8b05-ffd578937521
1996-03-22 01:26:22 +00:00
Andrew McCallum
6d47e07f58 File deleted.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1250 72102866-910b-0410-8b05-ffd578937521
1996-03-22 01:25:46 +00:00
Andrew McCallum
773646c583 (GNUSTEP_CFILES): Removed NSZone.c.
(GNUSTEP_MFILES): Added NSZone.m.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1249 72102866-910b-0410-8b05-ffd578937521
1996-03-22 01:25:23 +00:00
Andrew McCallum
3b6d04dfb8 (objects/stdobjects.h): Create it in the build directory, not
$(srcdir).  (Thanks to Albin Jones.)


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1248 72102866-910b-0410-8b05-ffd578937521
1996-03-22 01:17:04 +00:00
Andrew McCallum
d76efa4108 (CFLAGS): Added -Wno-implicit.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1247 72102866-910b-0410-8b05-ffd578937521
1996-03-22 01:13:51 +00:00
Andrew McCallum
eb6d83ed31 Change -basics and -callbacks to -bas and -cbs.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1246 72102866-910b-0410-8b05-ffd578937521
1996-03-22 01:11:38 +00:00
Andrew McCallum
c6ce2ed572 Added -bas.m and -cbs.m.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1245 72102866-910b-0410-8b05-ffd578937521
1996-03-22 01:10:35 +00:00
Andrew McCallum
d0ece8e982 File deleted.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1244 72102866-910b-0410-8b05-ffd578937521
1996-03-22 01:09:05 +00:00
Andrew McCallum
d6b8fb5fc0 *** empty log message ***
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1243 72102866-910b-0410-8b05-ffd578937521
1996-03-22 01:06:28 +00:00
Andrew McCallum
cae0ba6673 ([BinaryCStream -encodeValueOfCType:at:withName:name]): Fix typo.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1242 72102866-910b-0410-8b05-ffd578937521
1996-03-22 00:41:23 +00:00
Andrew McCallum
9e44cc662c New file.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1241 72102866-910b-0410-8b05-ffd578937521
1996-03-22 00:37:53 +00:00
Andrew McCallum
17de3bd4bc Second patch from Albin Jones
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1240 72102866-910b-0410-8b05-ffd578937521
1996-03-22 00:36:13 +00:00
Andrew McCallum
6c9e163ef5 Overhauled to use htonl() and friends. New format is incompatible
with the old.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1237 72102866-910b-0410-8b05-ffd578937521
1996-03-22 00:31:09 +00:00
Andrew McCallum
7650c0da16 (CC): Added -pipe.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1232 72102866-910b-0410-8b05-ffd578937521
1996-03-20 18:21:13 +00:00