Overview
Comment: | TableGenerator: Use new async OFHTTPClient API |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
adb82c292c80b0738e03ab9cc490a987 |
User & Date: | js on 2017-09-25 21:31:06 |
Other Links: | manifest | tags |
Context
2017-09-25
| ||
23:15 | ObjFW.xcodeproj: Use ./autogen.sh check-in: f8f4c733b8 user: js tags: trunk | |
21:31 | TableGenerator: Use new async OFHTTPClient API check-in: adb82c292c user: js tags: trunk | |
00:02 | OFHTTPClient: Add support for passing a context check-in: c35ba05bbc user: js tags: trunk | |
Changes
Modified generators/TableGenerator.h from [ed3760d524] to [21727ea245].
︙ | |||
11 12 13 14 15 16 17 18 19 20 | 11 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 46 47 48 49 50 51 | + - + + - - + + + | * Alternatively, it may be distributed under the terms of the GNU General * Public License, either version 2 or 3, which can be found in the file * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this * file. */ #import "OFObject.h" #import "OFHTTPClient.h" @class OFString; |
Modified generators/TableGenerator.m from [c7bfffe23c] to [1cc19838af].
︙ | |||
41 42 43 44 45 46 47 | 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 78 79 80 81 82 83 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 109 110 | + + + + - - - - - - + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + | OF_APPLICATION_DELEGATE(TableGenerator) @implementation TableGenerator - init { self = [super init]; @try { _HTTPClient = [[OFHTTPClient alloc] init]; [_HTTPClient setDelegate: self]; |
︙ | |||
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 186 187 188 189 | + + + + + + + - + - + - - - - - + - - - - - | _decompositionTable[codePoint] = [string copy]; _decompositionCompatTable[codePoint] = [string copy]; } objc_autoreleasePoolPop(pool2); } [self applyDecompositionRecursivelyForTable: _decompositionTable]; [self applyDecompositionRecursivelyForTable: _decompositionCompatTable]; [of_stdout writeLine: @" done"]; [of_stdout writeString: @"Downloading CaseFolding.txt…"]; request = [OFHTTPRequest requestWithURL: [OFURL URLWithString: CASE_FOLDING_URL]]; [_HTTPClient asyncPerformRequest: request |
︙ | |||
204 205 206 207 208 209 210 | 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 | - + | [[components objectAtIndex: 2] hexadecimalValue]; objc_autoreleasePoolPop(pool2); } [of_stdout writeLine: @" done"]; |
︙ | |||
256 257 258 259 260 261 262 263 264 265 266 267 268 269 | 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 | + + + + + + + + + + + + + + + + + + + | table[i] = [replacement copy]; done = false; } } } while (!done); } - (void)writeFiles { OFString *path; [of_stdout writeString: @"Writing files…"]; path = [OFString pathWithComponents: [OFArray arrayWithObjects: OF_PATH_PARENT_DIRECTORY, @"src", @"unicode.m", nil]]; [self writeTablesToFile: path]; path = [OFString pathWithComponents: [OFArray arrayWithObjects: OF_PATH_PARENT_DIRECTORY, @"src", @"unicode.h", nil]]; [self writeHeaderToFile: path]; [of_stdout writeLine: @" done"]; [OFApplication terminate]; } - (void)writeTablesToFile: (OFString *)path { void *pool = objc_autoreleasePoolPush(); OFFile *file = [OFFile fileWithPath: path mode: @"w"]; |
︙ |