Overview
Comment: | Create 0.2 branch and remove unfinished XML stuff from it. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | 0.2 |
Files: | files | file ages | folders |
SHA3-256: |
9a9211e9633d80041329acdfd55a4143 |
User & Date: | js on 2010-01-30 21:07:54 |
Other Links: | branch diff | manifest | tags |
Context
2010-02-01
| ||
18:11 | Merge latest changes from default branch into 0.2 branch. check-in: c9a2f95a9c user: js tags: 0.2 | |
2010-01-30
| ||
21:07 | Create 0.2 branch and remove unfinished XML stuff from it. check-in: 9a9211e963 user: js tags: 0.2 | |
20:54 | Remove TODO file as this is not a good way to keep track of things. check-in: b6132938c0 user: js tags: trunk | |
Changes
Modified src/OFXMLElement.h from [f359bb406c] to [adf0f56cb4].
1 2 3 4 5 6 7 8 9 10 11 | /* * Copyright (c) 2008 - 2009 * Jonathan Schleifer <js@webkeks.org> * * All rights reserved. * * This file is part of ObjFW. It may be distributed under the terms of the * Q Public License 1.0, which can be found in the file LICENSE included in * the packaging of this file. */ | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | /* * Copyright (c) 2008 - 2009 * Jonathan Schleifer <js@webkeks.org> * * All rights reserved. * * This file is part of ObjFW. It may be distributed under the terms of the * Q Public License 1.0, which can be found in the file LICENSE included in * the packaging of this file. */ #import "OFString.h" extern int _OFXMLElement_reference; /** * The OFString (OFXMLEscaping) category provides an easy way to escape strings * for use in an XML document. */ @interface OFString (OFXMLEscaping) /** * Escapes a string for use in an XML document. |
︙ | ︙ |
Modified src/OFXMLElement.m from [d1cba33f72] to [8ba8e77a76].
︙ | ︙ | |||
13 14 15 16 17 18 19 | #include <assert.h> #include <stdlib.h> #include <string.h> #import "OFXMLElement.h" #import "OFString.h" | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | #include <assert.h> #include <stdlib.h> #include <string.h> #import "OFXMLElement.h" #import "OFString.h" #import "OFExceptions.h" int _OFXMLElement_reference; @implementation OFString (OFXMLEscaping) - stringByXMLEscaping { char *str_c, *append, *tmp; size_t len, append_len; size_t i, j; OFString *ret; |
︙ | ︙ |
Modified src/OFXMLParser.h from [9941ba9dfc] to [58d6fa526d].
1 2 3 4 5 6 7 8 9 10 11 | /* * Copyright (c) 2008 - 2009 * Jonathan Schleifer <js@webkeks.org> * * All rights reserved. * * This file is part of ObjFW. It may be distributed under the terms of the * Q Public License 1.0, which can be found in the file LICENSE included in * the packaging of this file. */ | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 1 2 3 4 5 6 7 8 9 10 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 | /* * Copyright (c) 2008 - 2009 * Jonathan Schleifer <js@webkeks.org> * * All rights reserved. * * This file is part of ObjFW. It may be distributed under the terms of the * Q Public License 1.0, which can be found in the file LICENSE included in * the packaging of this file. */ #import "OFString.h" extern int _OFXMLParser_reference; /** * A protocol that needs to be implemented by delegates for * stringByXMLUnescapingWithHandler:. */ @protocol OFXMLUnescapingDelegate /** * This callback is called when an unknown entity was found while trying to * unescape XML. The callback is supposed to return a substitution for the * entity or nil if it is unknown to the callback as well, in which case an * exception will be thrown. * * \param entity The name of the entity that is unknown * \return A substitution for the entity or nil */ - (OFString*)foundUnknownEntityNamed: (OFString*)entity; @end /** * The OFString (OFXMLUnescaping) category provides methods to unescape XML in * strings. */ @interface OFString (OFXMLUnescaping) /** * Unescapes XML in the string. */ - stringByXMLUnescaping; /** * Unescapes XML in the string and uses the specified handler for unknown * entities. * * \param h An OFXMLUnescapingDelegate as a handler for unknown entities */ - stringByXMLUnescapingWithHandler: (OFObject <OFXMLUnescapingDelegate>*)h; @end |
Modified src/OFXMLParser.m from [08dd8b2077] to [8d3fcc8d6d].
︙ | ︙ | |||
11 12 13 14 15 16 17 | #include "config.h" #include <string.h> #import "OFXMLParser.h" #import "OFString.h" | < < < < < < < < < < < | 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | #include "config.h" #include <string.h> #import "OFXMLParser.h" #import "OFString.h" #import "OFAutoreleasePool.h" #import "OFExceptions.h" #import "OFMacros.h" int _OFXMLParser_reference; static OF_INLINE OFString* parse_numeric_entity(const char *entity, size_t length) { of_unichar_t c; size_t i; char buf[5]; |
︙ | ︙ | |||
76 77 78 79 80 81 82 | return nil; buf[i] = 0; return [OFString stringWithCString: buf length: i]; } | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 65 66 67 68 69 70 71 72 73 74 75 76 77 78 | return nil; buf[i] = 0; return [OFString stringWithCString: buf length: i]; } @implementation OFString (OFXMLUnescaping) - stringByXMLUnescaping { return [self stringByXMLUnescapingWithHandler: nil]; } - stringByXMLUnescapingWithHandler: (OFObject <OFXMLUnescapingDelegate>*)h |
︙ | ︙ | |||
585 586 587 588 589 590 591 592 | @throw [OFInvalidEncodingException newWithClass: isa]; [ret appendCStringWithoutUTF8Checking: string + last length: i - last]; return ret; } @end | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 154 155 156 157 158 159 160 161 | @throw [OFInvalidEncodingException newWithClass: isa]; [ret appendCStringWithoutUTF8Checking: string + last length: i - last]; return ret; } @end |
Modified tests/Makefile from [695657576d] to [b7dceb4ce1].
︙ | ︙ | |||
9 10 11 12 13 14 15 | OFHashes.m \ OFList.m \ OFObject.m \ ${OFPLUGIN_M} \ OFString.m \ OFTCPSocket.m \ ${OFTHREAD_M} \ | < < | 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | OFHashes.m \ OFList.m \ OFObject.m \ ${OFPLUGIN_M} \ OFString.m \ OFTCPSocket.m \ ${OFTHREAD_M} \ main.m \ ${PROPERTIES_M} IPHONE_USER = mobile IPHONE_TMP = /tmp/objfw-test .PHONY: run run-tests run-on-iphone |
︙ | ︙ |
Deleted tests/OFXMLElement.m version [f509f6be50].
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted tests/OFXMLParser.m version [bbebdfcead].
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Modified tests/main.m from [6d0cbb749a] to [10ffb688e4].
︙ | ︙ | |||
32 33 34 35 36 37 38 | extern void properties_tests(); #endif extern void string_tests(); extern void tcpsocket_tests(); #ifdef OF_THREADS extern void thread_tests(); #endif | < < | 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | extern void properties_tests(); #endif extern void string_tests(); extern void tcpsocket_tests(); #ifdef OF_THREADS extern void thread_tests(); #endif static int fails = 0; static void output(OFString *str, int color) { #ifdef STDOUT |
︙ | ︙ | |||
109 110 111 112 113 114 115 | array_tests(); dictionary_tests(); list_tests(); tcpsocket_tests(); #ifdef OF_THREADS thread_tests(); #endif | < < | 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 | array_tests(); dictionary_tests(); list_tests(); tcpsocket_tests(); #ifdef OF_THREADS thread_tests(); #endif #ifdef OF_PLUGINS plugin_tests(); #endif #ifdef OF_HAVE_PROPERTIES properties_tests(); #endif return fails; } |