Differences From Artifact [4c38694599]:
- File
src/OFINICategory.m
— part of check-in
[6b77a5dd8b]
at
2017-05-21 21:28:57
on branch trunk
— Prefix private methods with of_ instead of OF_
This matches Apple's style. (user: js, size: 10850) [annotate] [blame] [check-ins using]
To Artifact [77ec98f4c0]:
- File src/OFINICategory.m — part of check-in [1248c00475] at 2017-07-24 20:29:17 on branch trunk — OFINIFile: Always use \r\n (user: js, size: 10871) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
493 494 495 496 497 498 499 | encoding: (of_string_encoding_t)encoding first: (bool)first { if ([_lines count] == 0) return false; if (first) | | | | | | 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 | encoding: (of_string_encoding_t)encoding first: (bool)first { if ([_lines count] == 0) return false; if (first) [stream writeFormat: @"[%@]\r\n", _name]; else [stream writeFormat: @"\r\n[%@]\r\n", _name]; for (id line in _lines) { if ([line isKindOfClass: [OFINICategory_Comment class]]) { OFINICategory_Comment *comment = line; [stream writeFormat: @"%@\r\n", comment->_comment]; } else if ([line isKindOfClass: [OFINICategory_Pair class]]) { OFINICategory_Pair *pair = line; OFString *key = escapeString(pair->_key); OFString *value = escapeString(pair->_value); OFString *line = [OFString stringWithFormat: @"%@=%@\r\n", key, value]; [stream writeString: line encoding: encoding]; } else @throw [OFInvalidArgumentException exception]; } return true; } @end |