Comment: | Merge latest changes from default branch to 0.1 branch. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | 0.1 | 0.1-release |
Files: | files | file ages | folders |
SHA3-256: |
80820d91b3d1c6a6b2751ff4ba91ad90 |
User & Date: | js on 2009-12-24 09:19:02 |
Other Links: | branch diff | manifest | tags |
2010-01-04
| ||
14:29 | Backport a few fixes from default branch to 0.1. check-in: 98f171212d user: js tags: 0.1 | |
2009-12-24
| ||
09:19 | Merge latest changes from default branch to 0.1 branch. check-in: 80820d91b3 user: js tags: 0.1, 0.1-release | |
09:17 | Change type of object in OFThread to id. check-in: 77092d1160 user: js tags: trunk | |
2009-12-23
| ||
15:47 | Remove TODO from 0.1 branch as it is only useful in the default branch. check-in: bf9e659a92 user: js tags: 0.1 | |
Modified configure.ac from [2c8879021c] to [0b6d5ca915].
︙ | ︙ | |||
47 48 49 50 51 52 53 | AC_SUBST(TESTPLUGIN, "plugin") AC_DEFINE(OF_PLUGINS, 1, [Whether we have plugin support]) AC_SUBST(OFPLUGINS_DEF, "-DOF_PLUGINS") fi AC_C_BIGENDIAN([ AC_DEFINE(OF_BIG_ENDIAN, 1, [Whether we are big endian]) | | < | 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 | AC_SUBST(TESTPLUGIN, "plugin") AC_DEFINE(OF_PLUGINS, 1, [Whether we have plugin support]) AC_SUBST(OFPLUGINS_DEF, "-DOF_PLUGINS") fi AC_C_BIGENDIAN([ AC_DEFINE(OF_BIG_ENDIAN, 1, [Whether we are big endian]) AC_SUBST(ENDIANESS_DEF, "-DOF_BIG_ENDIAN")]) AC_MSG_CHECKING(for SIZE_MAX) AC_EGREP_CPP(yes, [ #include <stdint.h> #include <limits.h> #ifdef SIZE_MAX |
︙ | ︙ |
Modified extra.mk.in from [ec09dbebb7] to [d89a7b2c42].
1 2 3 4 5 | ASPRINTF_M = @ASPRINTF_M@ OBJC_SYNC_M = @OBJC_SYNC_M@ OFPLUGIN_M = @OFPLUGIN_M@ OFTHREAD_M = @OFTHREAD_M@ TESTPLUGIN = @TESTPLUGIN@ | < | 1 2 3 4 5 6 7 8 | ASPRINTF_M = @ASPRINTF_M@ OBJC_SYNC_M = @OBJC_SYNC_M@ OFPLUGIN_M = @OFPLUGIN_M@ OFTHREAD_M = @OFTHREAD_M@ TESTPLUGIN = @TESTPLUGIN@ TESTS = @TESTS@ TEST_LAUNCHER = @TEST_LAUNCHER@ THREADING_H = @THREADING_H@ |
Modified generators/TableGenerator.h from [28782a1119] to [9eafd13ad5].
︙ | ︙ | |||
12 13 14 15 16 17 18 19 20 21 22 23 24 25 | #import "OFString.h" @interface TableGenerator: OFObject { of_unichar_t upper[0x110000]; of_unichar_t lower[0x110000]; of_unichar_t casefolding[0x110000]; size_t upper_size; size_t lower_size; size_t casefolding_size; } - (void)readUnicodeDataFile: (OFString*)path; - (void)readCaseFoldingFile: (OFString*)path; | > > > | 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | #import "OFString.h" @interface TableGenerator: OFObject { of_unichar_t upper[0x110000]; of_unichar_t lower[0x110000]; of_unichar_t casefolding[0x110000]; BOOL upper_table_used[0x1100]; BOOL lower_table_used[0x1100]; BOOL casefolding_table_used[0x1100]; size_t upper_size; size_t lower_size; size_t casefolding_size; } - (void)readUnicodeDataFile: (OFString*)path; - (void)readCaseFoldingFile: (OFString*)path; |
︙ | ︙ |
Modified generators/TableGenerator.m from [4e245e9c8a] to [d15067685c].
︙ | ︙ | |||
101 102 103 104 105 106 107 | } - (void)writeTablesToFile: (OFString*)file { OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init], *pool2; of_unichar_t i, j; | < < < < < < < < < < < | 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 | } - (void)writeTablesToFile: (OFString*)file { OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init], *pool2; of_unichar_t i, j; OFFile *f = [OFFile fileWithPath: file mode: @"wb"]; [f writeString: COPYRIGHT @"#include \"config.h\"\n" @"\n" @"#import \"OFString.h\"\n\n" @"static const of_unichar_t nop_page[0x100] = {};\n\n"]; pool2 = [[OFAutoreleasePool alloc] init]; |
︙ | ︙ | |||
301 302 303 304 305 306 307 | [f writeString: @",\n\t"]; else if (i + 1 < casefolding_size) [f writeString: @", "]; } [f writeString: @"\n};\n"]; | < < < < | 290 291 292 293 294 295 296 297 298 299 300 301 302 303 | [f writeString: @",\n\t"]; else if (i + 1 < casefolding_size) [f writeString: @", "]; } [f writeString: @"\n};\n"]; [pool release]; } - (void)writeHeaderToFile: (OFString*)file { OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init]; OFFile *f = [OFFile fileWithPath: file |
︙ | ︙ |
Modified src/OFArray.h from [0ec06e8b4f] to [29ba7d9e73].
︙ | ︙ | |||
13 14 15 16 17 18 19 | #import "OFObject.h" #import "OFDataArray.h" @class OFString; /** | | > > > > > > | 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 | #import "OFObject.h" #import "OFDataArray.h" @class OFString; /** * The OFArray class is a class for storing objects in an array. */ @interface OFArray: OFObject <OFCopying, OFMutableCopying> { OFDataArray *array; } /** * \return A new autoreleased OFArray */ + array; /** * Creates a new OFArray with the specified object. * * \param obj An object * \return A new autoreleased OFArray */ + arrayWithObject: (OFObject*)obj; /** * Creates a new OFArray with the specified objects, terminated by nil. * * \param first The first object in the array * \return A new autoreleased OFArray */ + arrayWithObjects: (OFObject*)first, ...; /** * Creates a new OFArray with the objects from the specified C array. * * \param objs A C array of objects. * \return A new autoreleased OFArray */ + arrayWithCArray: (OFObject**)objs; /** * Initializes an OFArray with the specified object. |
︙ | ︙ | |||
78 79 80 81 82 83 84 | * * \param objs A C array of objects * \return An initialized OFArray */ - initWithCArray: (OFObject**)objs; /** | | | | 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 | * * \param objs A C array of objects * \return An initialized OFArray */ - initWithCArray: (OFObject**)objs; /** * \return The number of objects in the array */ - (size_t)count; /** * \return The objects of the array as a C array */ - (id*)cArray; /** * Returns a specific object of the array. * * \param index The number of the object to return * \return The specified object of the OFArray */ - (id)objectAtIndex: (size_t)index; /** |
︙ | ︙ | |||
115 116 117 118 119 120 121 | * \param obj The object whose index is returned * \return The index of the first object that has the same aaddress as * the specified object */ - (size_t)indexOfObjectIdenticalTo: (OFObject*)obj; /** | | | | 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 | * \param obj The object whose index is returned * \return The index of the first object that has the same aaddress as * the specified object */ - (size_t)indexOfObjectIdenticalTo: (OFObject*)obj; /** * \return The first object of the array or nil */ - (id)firstObject; /** * \return The last object of the array or nil */ - (id)lastObject; /** * Creates a string by joining all objects of the array. * * \param separator The string with which the objects should be joined |
︙ | ︙ |
Modified src/OFAutoreleasePool.h from [2aeb457e29] to [68fc70c495].
︙ | ︙ | |||
10 11 12 13 14 15 16 | */ #import "OFObject.h" #import "OFArray.h" #import "OFList.h" /** | | | > | 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | */ #import "OFObject.h" #import "OFArray.h" #import "OFList.h" /** * The OFAutoreleasePool class is a class that keeps track of objects that will * be released when the autorelease pool is released. * * Every thread has its own stack of autorelease pools. */ @interface OFAutoreleasePool: OFObject { OFArray *objects; OFAutoreleasePool *next, *prev; } |
︙ | ︙ |
Modified src/OFConstString.h from [250582e910] to [1fa39e7915].
︙ | ︙ | |||
12 13 14 15 16 17 18 | #import "OFString.h" #ifdef OF_APPLE_RUNTIME extern void *_OFConstStringClassReference; #endif /** | | | 12 13 14 15 16 17 18 19 20 21 22 | #import "OFString.h" #ifdef OF_APPLE_RUNTIME extern void *_OFConstStringClassReference; #endif /** * A class for storing constant strings using the @"" literal. */ @interface OFConstString: OFString {} @end |
Modified src/OFConstString.m from [884dfeb01d] to [d9b21f0f8e].
︙ | ︙ | |||
147 148 149 150 151 152 153 | { } - (void)dealloc { @throw [OFNotImplementedException newWithClass: isa selector: _cmd]; | | | 147 148 149 150 151 152 153 154 155 156 | { } - (void)dealloc { @throw [OFNotImplementedException newWithClass: isa selector: _cmd]; [super dealloc]; /* Get rid of a stupid warning */ } @end |
Modified src/OFDataArray.h from [fc048ad743] to [f2ebd3c096].
︙ | ︙ | |||
8 9 10 11 12 13 14 | * Q Public License 1.0, which can be found in the file LICENSE included in * the packaging of this file. */ #import "OFObject.h" /** | | < | 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | * Q Public License 1.0, which can be found in the file LICENSE included in * the packaging of this file. */ #import "OFObject.h" /** * The OFDataArray class is a class for storing arbitrary data in an array. * * If you plan to store large hunks of data, you should consider using * OFBigDataArray, which allocates the memory in pages rather than in bytes. */ @interface OFDataArray: OFObject <OFCopying> { char *data; |
︙ | ︙ | |||
140 141 142 143 144 145 146 | * \param index The index at which the items are removed */ - removeNItems: (size_t)nitems atIndex: (size_t)index; @end /** | | | | 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 | * \param index The index at which the items are removed */ - removeNItems: (size_t)nitems atIndex: (size_t)index; @end /** * The OFBigDataArray class is a class for storing arbitrary data in an array * and is designed to store large hunks of data. Therefore, it allocates * memory in pages rather than a chunk of memory for each item. */ @interface OFBigDataArray: OFDataArray <OFCopying> { size_t size; } @end |
Modified src/OFDictionary.h from [8b63f44b4d] to [f8764df1df].
︙ | ︙ | |||
18 19 20 21 22 23 24 | { OFObject <OFCopying> *key; OFObject *object; uint32_t hash; }; /** | | | 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | { OFObject <OFCopying> *key; OFObject *object; uint32_t hash; }; /** * The OFDictionary class is a class for using hash tables. */ @interface OFDictionary: OFObject <OFCopying, OFMutableCopying> { struct of_dictionary_bucket *data; size_t size; size_t count; } |
︙ | ︙ |
Modified src/OFDictionary.m from [09f88deaa1] to [67a9356465].
︙ | ︙ | |||
131 132 133 134 135 136 137 | [self dealloc]; @throw e; } @try { [dict->data[i].object retain]; } @catch (OFException *e) { | < > | 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 | [self dealloc]; @throw e; } @try { [dict->data[i].object retain]; } @catch (OFException *e) { [key release]; [self dealloc]; @throw e; } data[i].key = key; data[i].object = dict->data[i].object; data[i].hash = dict->data[i].hash; } |
︙ | ︙ | |||
159 160 161 162 163 164 165 | [self dealloc]; @throw e; } @try { [obj retain]; } @catch (OFException *e) { | < > | 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 | [self dealloc]; @throw e; } @try { [obj retain]; } @catch (OFException *e) { [key release]; [self dealloc]; @throw e; } data[0].key = key; data[0].object = obj; data[0].hash = [key hash]; |
︙ | ︙ | |||
242 243 244 245 246 247 248 | [self dealloc]; @throw e; } @try { [objs_carray[i] retain]; } @catch (OFException *e) { | < > | 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 | [self dealloc]; @throw e; } @try { [objs_carray[i] retain]; } @catch (OFException *e) { [key release]; [self dealloc]; @throw e; } data[j].key = key; data[j].object = objs_carray[i]; data[j].hash = hash; |
︙ | ︙ | |||
269 270 271 272 273 274 275 | [self dealloc]; @throw e; } @try { [data[j].object release]; } @catch (OFException *e) { | < > | 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 | [self dealloc]; @throw e; } @try { [data[j].object release]; } @catch (OFException *e) { [objs_carray[i] release]; [self dealloc]; @throw e; } data[j].object = objs_carray[i]; } return self; |
︙ | ︙ | |||
353 354 355 356 357 358 359 | [self dealloc]; @throw e; } @try { [obj retain]; } @catch (OFException *e) { | < > | 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 | [self dealloc]; @throw e; } @try { [obj retain]; } @catch (OFException *e) { [key release]; [self dealloc]; @throw e; } data[j].key = key; data[j].object = obj; data[j].hash = hash; |
︙ | ︙ | |||
408 409 410 411 412 413 414 | [self dealloc]; @throw e; } @try { [obj retain]; } @catch (OFException *e) { | < > | 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 | [self dealloc]; @throw e; } @try { [obj retain]; } @catch (OFException *e) { [key release]; [self dealloc]; @throw e; } data[j].key = key; data[j].object = obj; data[j].hash = hash; |
︙ | ︙ | |||
435 436 437 438 439 440 441 | [self dealloc]; @throw e; } @try { [data[j].object release]; } @catch (OFException *e) { | < > | 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 | [self dealloc]; @throw e; } @try { [data[j].object release]; } @catch (OFException *e) { [obj release]; [self dealloc]; @throw e; } data[j].object = obj; } return self; |
︙ | ︙ |
Modified src/OFExceptions.h from [1cdedb1af1] to [b3fc0e5ad0].
︙ | ︙ | |||
308 309 310 311 312 313 314 | /** * \return The requested size of the data that couldn't be read / written */ - (size_t)requestedSize; @end /** | | | 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 | /** * \return The requested size of the data that couldn't be read / written */ - (size_t)requestedSize; @end /** * An OFException indicating a read on the file failed. */ @interface OFReadFailedException: OFReadOrWriteFailedException {} @end /** * An OFException indicating a write to the file failed. */ |
︙ | ︙ |
Modified src/OFFile.h from [87163d3271] to [dc94d8b7a4].
︙ | ︙ | |||
127 128 129 130 131 132 133 | */ - initWithFilePointer: (FILE*)fp; @end @interface OFFileSingleton: OFFile @end | | | | | 127 128 129 130 131 132 133 134 135 136 137 138 139 | */ - initWithFilePointer: (FILE*)fp; @end @interface OFFileSingleton: OFFile @end /// An OFFile object for stdin extern OFFile *of_stdin; /// An OFFile object for stdout extern OFFile *of_stdout; /// An OFFile object for stderr extern OFFile *of_stderr; |
Modified src/OFFile.m from [ea32f092c7] to [456747264b].
︙ | ︙ | |||
88 89 90 91 92 93 94 95 96 97 98 99 100 101 | { #ifndef _WIN32 if (chown([path cString], owner, group)) @throw [OFChangeFileOwnerFailedException newWithClass: self path: path owner: owner group: group]; #endif } + (void)rename: (OFString*)from to: (OFString*)to { #ifndef _WIN32 | > > > | 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 | { #ifndef _WIN32 if (chown([path cString], owner, group)) @throw [OFChangeFileOwnerFailedException newWithClass: self path: path owner: owner group: group]; #else @throw [OFNotImplementedException newWithClass: self selector: _cmd]; #endif } + (void)rename: (OFString*)from to: (OFString*)to { #ifndef _WIN32 |
︙ | ︙ |
Modified src/OFHashes.h from [3d0d4ea8c8] to [709542c883].
︙ | ︙ | |||
30 31 32 33 34 35 36 | } /** * \return A new autoreleased MD5 Hash */ + md5Hash; | < < | 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | } /** * \return A new autoreleased MD5 Hash */ + md5Hash; /** * Adds a buffer to the hash to be calculated. * * \param buf The buffer which should be included into calculation. * \param size The size of the buffer */ - updateWithBuffer: (const char*)buf |
︙ | ︙ | |||
66 67 68 69 70 71 72 | } /** * \return A new autoreleased SHA1 Hash */ + sha1Hash; | < < | 64 65 66 67 68 69 70 71 72 73 74 75 76 77 | } /** * \return A new autoreleased SHA1 Hash */ + sha1Hash; /** * Adds a buffer to the hash to be calculated. * * \param buf The buffer which should be included into calculation. * \param size The size of the buffer */ - updateWithBuffer: (const char*)buf |
︙ | ︙ |
Modified src/OFMutableArray.h from [f34526b684] to [13789c154b].
︙ | ︙ | |||
8 9 10 11 12 13 14 | * Q Public License 1.0, which can be found in the file LICENSE included in * the packaging of this file. */ #import "OFArray.h" /** | | | | 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | * Q Public License 1.0, which can be found in the file LICENSE included in * the packaging of this file. */ #import "OFArray.h" /** * The OFMutableArray class is a class for storing, adding and removing objects * in an array. */ @interface OFMutableArray: OFArray {} /** * Adds an object to the OFArray. * * \param obj An object to add */ |
︙ | ︙ |
Modified src/OFMutableDictionary.h from [f4d21099de] to [a6dee4def6].
︙ | ︙ | |||
8 9 10 11 12 13 14 | * Q Public License 1.0, which can be found in the file LICENSE included in * the packaging of this file. */ #import "OFDictionary.h" /** | | | 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | * Q Public License 1.0, which can be found in the file LICENSE included in * the packaging of this file. */ #import "OFDictionary.h" /** * The OFMutableDictionary class is a class for using mutable hash tables. */ @interface OFMutableDictionary: OFDictionary {} /** * Sets a key to an object. A key can be any object. * * \param key The key to set * \param obj The object to set the key to |
︙ | ︙ |
Modified src/OFThread.h from [d9ac27e5a8] to [469fa957dd].
︙ | ︙ | |||
55 56 57 58 59 60 61 | * The OFThread class provides portable threads. * * To use it, you should create a new class derived from it and reimplement * main. */ @interface OFThread: OFObject { | | | 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 | * The OFThread class provides portable threads. * * To use it, you should create a new class derived from it and reimplement * main. */ @interface OFThread: OFObject { id object; of_thread_t thread; BOOL running; @public id retval; } |
︙ | ︙ |
Modified tests/Makefile from [106c08e34d] to [3171b4bd98].
︙ | ︙ | |||
14 15 16 17 18 19 20 | OFTCPSocket.m \ ${OFTHREAD_M} \ main.m IPHONE_USER = mobile IPHONE_TMP = /tmp/objfw-test | | | 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | OFTCPSocket.m \ ${OFTHREAD_M} \ main.m IPHONE_USER = mobile IPHONE_TMP = /tmp/objfw-test .PHONY: run run-tests run-on-iphone run: all if [ -z "${DONT_RUN_TESTS}" ]; then ${MAKE} ${MFLAGS} run-tests; fi run-tests: rm -f libobjfw.so.0 libobjfw.so.0.1 libobjfw.dll libobjfw.dylib if test -f ../src/libobjfw.so; then \ ln -s ../src/libobjfw.so libobjfw.so.0; \ |
︙ | ︙ |
Modified tests/objc_sync/Makefile from [b3c9a544b3] to [8a0c1d85a0].
︙ | ︙ | |||
20 21 22 23 24 25 26 | rm -f libobjfw.so.0 libobjfw.so.0.1 libobjfw.dll libobjfw.dylib; \ exit $$EXIT include ../../buildsys.mk CPPFLAGS += -I../../src -I../.. LIBS := -L../../src -lobjfw ${LIBS} | > | 20 21 22 23 24 25 26 27 | rm -f libobjfw.so.0 libobjfw.so.0.1 libobjfw.dll libobjfw.dylib; \ exit $$EXIT include ../../buildsys.mk CPPFLAGS += -I../../src -I../.. LIBS := -L../../src -lobjfw ${LIBS} LD = ${OBJC} |