83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
|
* We can't use that as local domain.
*/
return nil;
} @catch (OFInvalidFormatException *e) {
/* Not an IP address -> we can use it if it contains a dot. */
size_t pos = [hostname rangeOfString: @"."].location;
if (pos == OF_NOT_FOUND)
return nil;
return [hostname substringFromIndex: pos + 1];
}
}
#endif
|
|
|
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
|
* We can't use that as local domain.
*/
return nil;
} @catch (OFInvalidFormatException *e) {
/* Not an IP address -> we can use it if it contains a dot. */
size_t pos = [hostname rangeOfString: @"."].location;
if (pos == OFNotFound)
return nil;
return [hostname substringFromIndex: pos + 1];
}
}
#endif
|
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
|
while ((line = [file readLine]) != nil) {
OFArray *components, *hosts;
size_t pos;
OFString *address;
pos = [line rangeOfString: @"#"].location;
if (pos != OF_NOT_FOUND)
line = [line substringToIndex: pos];
components = [line
componentsSeparatedByCharactersInSet: whitespaceCharacterSet
options: OF_STRING_SKIP_EMPTY];
if (components.count < 2)
|
|
|
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
|
while ((line = [file readLine]) != nil) {
OFArray *components, *hosts;
size_t pos;
OFString *address;
pos = [line rangeOfString: @"#"].location;
if (pos != OFNotFound)
line = [line substringToIndex: pos];
components = [line
componentsSeparatedByCharactersInSet: whitespaceCharacterSet
options: OF_STRING_SKIP_EMPTY];
if (components.count < 2)
|
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
|
while ((line = [file readLine]) != nil) {
void *pool2 = objc_autoreleasePoolPush();
size_t pos;
OFArray *components, *arguments;
OFString *option;
pos = [line indexOfCharacterFromSet: commentCharacters];
if (pos != OF_NOT_FOUND)
line = [line substringToIndex: pos];
components = [line
componentsSeparatedByCharactersInSet: whitespaceCharacterSet
options: OF_STRING_SKIP_EMPTY];
if (components.count < 2) {
|
|
|
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
|
while ((line = [file readLine]) != nil) {
void *pool2 = objc_autoreleasePoolPush();
size_t pos;
OFArray *components, *arguments;
OFString *option;
pos = [line indexOfCharacterFromSet: commentCharacters];
if (pos != OFNotFound)
line = [line substringToIndex: pos];
components = [line
componentsSeparatedByCharactersInSet: whitespaceCharacterSet
options: OF_STRING_SKIP_EMPTY];
if (components.count < 2) {
|