Overview
Comment: | Rename a few methods returning BOOL. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
b6a39dd3d1ccef5ed8e8f3e5bf82bd1c |
User & Date: | js on 2010-10-24 13:15:01 |
Other Links: | manifest | tags |
Context
2010-10-24
| ||
13:30 | Always write abbreviations uppercase in method names. check-in: 1d19a5586b user: js tags: trunk | |
13:15 | Rename a few methods returning BOOL. check-in: b6a39dd3d1 user: js tags: trunk | |
12:54 | Add -[streamDidReceiveException:] to OFStreamObserverDelegate. check-in: b5da54000d user: js tags: trunk | |
Changes
Modified src/OFFile.m from [1cd28fbc32] to [9c2025e097].
︙ | |||
321 322 323 324 325 326 327 | 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 | - + | @try { src = [OFFile fileWithPath: from mode: @"rb"]; dest = [OFFile fileWithPath: to mode: @"wb"]; |
︙ | |||
453 454 455 456 457 458 459 | 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 | - + | self = [super init]; fd = fd_; return self; } |
︙ |
Modified src/OFHash.h from [90cfc63c8c] to [11414f28b0].
︙ | |||
12 13 14 15 16 17 18 | 12 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 | - + - + - + | #import "OFObject.h" /** * \brief A base class for classes providing hash functions. */ @interface OFHash: OFObject { |
Modified src/OFHash.m from [0764c2c77a] to [9d73a3e0b8].
︙ | |||
24 25 26 27 28 29 30 | 24 25 26 27 28 29 30 31 32 33 34 35 | - + - + | - (uint8_t*)digest { @throw [OFNotImplementedException newWithClass: isa selector: _cmd]; } |
Modified src/OFMD5Hash.m from [063d887ad6] to [e3c55f9a8d].
︙ | |||
133 134 135 136 137 138 139 | 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 | - + | ofSize: (size_t)size { uint32_t t; if (size == 0) return; |
︙ | |||
184 185 186 187 188 189 190 | 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 | - + | } - (uint8_t*)digest { uint8_t *p; size_t count; |
︙ | |||
222 223 224 225 226 227 228 | 222 223 224 225 226 227 228 229 230 231 232 233 | - + | /* Append length in bits and transform */ ((uint32_t*)in)[14] = bits[0]; ((uint32_t*)in)[15] = bits[1]; md5_transform(buf, (uint32_t*)in); OF_BSWAP32_V_IF_BE(buf, 4); |
Modified src/OFSHA1Hash.m from [20af66d343] to [0f9a7bf269].
︙ | |||
146 147 148 149 150 151 152 | 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 | - + - + - + | - (void)updateWithBuffer: (const char*)buf ofSize: (size_t)size { if (size == 0) return; |
Modified src/OFStream.h from [0915ec3638] to [d7703b509d].
︙ | |||
16 17 18 19 20 21 22 | 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 | - - - - + + + + - + - + | @class OFString; @class OFDataArray; /** * \brief A base class for different types of streams. * * IMPORTANT: If you want to subclass this, override _readNBytes:intoBuffer:, |
︙ | |||
196 197 198 199 200 201 202 | 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 | - + - + | */ - (OFString*)readTillDelimiter: (OFString*)delimiter withEncoding: (enum of_string_encoding)encoding; /** * \return A boolean whether writes are buffered */ |
︙ |
Modified src/OFStream.m from [55e134209d] to [712dcb6dbd].
︙ | |||
38 39 40 41 42 43 44 | 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 | - + - + - + | cache = NULL; wBuffer = NULL; return self; } |
︙ | |||
208 209 210 211 212 213 214 | 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 | - + | OFDataArray *a; char *buf; a = [OFDataArray dataArrayWithItemSize: 1]; buf = [self allocMemoryWithSize: of_pagesize]; @try { |
︙ | |||
268 269 270 271 272 273 274 | 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 | - + | } /* Read until we get a newline or \0 */ tmp = [self allocMemoryWithSize: of_pagesize]; @try { for (;;) { |
︙ | |||
427 428 429 430 431 432 433 | 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 | - + | } /* Read until we get the delimiter or \0 */ tmp = [self allocMemoryWithSize: of_pagesize]; @try { for (;;) { |
︙ | |||
511 512 513 514 515 516 517 | 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 | - + - + - + - + - + | [self freeMemory: tmp]; } /* Get rid of a warning, never reached anyway */ assert(0); } |
︙ |
Modified src/OFStreamSocket.m from [6a144d8c67] to [a907635fe9].
︙ | |||
47 48 49 50 51 52 53 | 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 | - + | #endif + socket { return [[[self alloc] init] autorelease]; } |
︙ |
Modified tests/OFMD5HashTests.m from [2445ed3eca] to [38087890ea].
︙ | |||
32 33 34 35 36 37 38 | 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | - - + | OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init]; OFMD5Hash *md5; OFFile *f = [OFFile fileWithPath: @"testfile.bin" mode: @"rb"]; TEST(@"+[md5Hash]", (md5 = [OFMD5Hash md5Hash])) |
︙ |
Modified tests/OFSHA1HashTests.m from [cd8e81d091] to [04c4da8f40].
︙ | |||
33 34 35 36 37 38 39 | 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | - + | OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init]; OFSHA1Hash *sha1; OFFile *f = [OFFile fileWithPath: @"testfile.bin" mode: @"rb"]; TEST(@"+[sha1Hash]", (sha1 = [OFSHA1Hash sha1Hash])) |
︙ |
Modified tests/OFStreamTests.m from [837d422c65] to [6e872e9aa9].
︙ | |||
24 25 26 27 28 29 30 | 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | - + | @interface StreamTester: OFStream { int state; } @end @implementation StreamTester |
︙ |