Overview
Comment: | Add -[terminateWithStatus:] to OFApplication. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
3edacb051165b1dacf96f7ab5fcb3791 |
User & Date: | js on 2010-04-09 00:17:55 |
Other Links: | manifest | tags |
Context
2010-04-09
| ||
00:21 | Add Unicode table generator stuff to .hgignore. check-in: 6de7d549e1 user: js tags: trunk | |
00:17 | Add -[terminateWithStatus:] to OFApplication. check-in: 3edacb0511 user: js tags: trunk | |
2010-04-08
| ||
23:48 | Add -[writeInt8:] and -[writeBigEndianInt{16,32,64}:] to OFStream. check-in: 978e88a43c user: js tags: trunk | |
Changes
Modified generators/TableGenerator.m from [baeef6024f] to [b3c2322eeb].
1 2 3 4 5 6 7 8 9 10 11 12 13 | /* * Copyright (c) 2008 - 2010 * 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. */ #include "config.h" | < | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | /* * Copyright (c) 2008 - 2010 * 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. */ #include "config.h" #include <string.h> #import "OFString.h" #import "OFArray.h" #import "OFFile.h" #import "OFAutoreleasePool.h" #import "OFApplication.h" |
︙ | ︙ | |||
60 61 62 63 64 65 66 | OFString **splitted_carray; of_unichar_t codep; splitted = [line componentsSeparatedByString: @";"]; if ([splitted count] != 15) { [of_stderr writeFormat: @"Invalid line: %s\n", [line cString]]; | | | 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 | OFString **splitted_carray; of_unichar_t codep; splitted = [line componentsSeparatedByString: @";"]; if ([splitted count] != 15) { [of_stderr writeFormat: @"Invalid line: %s\n", [line cString]]; [OFApplication terminateWithStatus: 1]; } splitted_carray = [splitted cArray]; codep = [splitted_carray[0] hexadecimalValueAsInteger]; upper[codep] = [splitted_carray[12] hexadecimalValueAsInteger]; lower[codep] = [splitted_carray[13] hexadecimalValueAsInteger]; |
︙ | ︙ | |||
94 95 96 97 98 99 100 | if ([line characterAtIndex: 0] == '#') continue; splitted = [line componentsSeparatedByString: @"; "]; if ([splitted count] != 4) { [of_stderr writeFormat: @"Invalid line: %s\n", [line cString]]; | | | 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 | if ([line characterAtIndex: 0] == '#') continue; splitted = [line componentsSeparatedByString: @"; "]; if ([splitted count] != 4) { [of_stderr writeFormat: @"Invalid line: %s\n", [line cString]]; [OFApplication terminateWithStatus: 1]; } splitted_carray = [splitted cArray]; if (![splitted_carray[1] isEqual: @"S"] && ![splitted_carray[1] isEqual: @"C"]) continue; |
︙ | ︙ |
Modified src/OFApplication.h from [24c74a3550] to [4689449381].
︙ | ︙ | |||
64 65 66 67 68 69 70 71 72 73 74 75 76 77 | + (OFArray*)arguments; /** * Terminates the application. */ + (void)terminate; /** * Sets argc and argv. * * You should not call this directly! Use of_application_main instead! * * \param argc The number of arguments * \param argv The argument values | > > > > > > > | 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 | + (OFArray*)arguments; /** * Terminates the application. */ + (void)terminate; /** * Terminates the application with the specified status. * * \param status The status with which the application will terminate */ + (void)terminateWithStatus: (int)status; /** * Sets argc and argv. * * You should not call this directly! Use of_application_main instead! * * \param argc The number of arguments * \param argv The argument values |
︙ | ︙ | |||
106 107 108 109 110 111 112 113 114 115 116 117 118 | */ - run; /** * Terminates the application. */ - (void)terminate; @end @interface OFObject (OFApplicationDelegate) <OFApplicationDelegate> @end extern int of_application_main(int, char*[], Class); | > > > > > > > | 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 | */ - run; /** * Terminates the application. */ - (void)terminate; /** * Terminates the application with the specified status. * * \param status The status with which the application will terminate */ - (void)terminateWithStatus: (int)status; @end @interface OFObject (OFApplicationDelegate) <OFApplicationDelegate> @end extern int of_application_main(int, char*[], Class); |
Modified src/OFApplication.m from [cda24b085c] to [0455fcfdbe].
︙ | ︙ | |||
69 70 71 72 73 74 75 76 77 78 79 80 81 82 | return [app arguments]; } + (void)terminate { exit(0); } - init { self = [super init]; atexit(atexit_handler); | > > > > > | 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 | return [app arguments]; } + (void)terminate { exit(0); } + (void)terminateWithStatus: (int)status { exit(status); } - init { self = [super init]; atexit(atexit_handler); |
︙ | ︙ | |||
134 135 136 137 138 139 140 141 142 143 144 145 146 147 | return self; } - (void)terminate { exit(0); } - (void)dealloc { [arguments release]; [delegate release]; [super dealloc]; | > > > > > | 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 | return self; } - (void)terminate { exit(0); } - (void)terminateWithStatus: (int)status { exit(status); } - (void)dealloc { [arguments release]; [delegate release]; [super dealloc]; |
︙ | ︙ |
Modified tests/TestsAppDelegate.m from [bed8806365] to [11d0cb7f34].
︙ | ︙ | |||
93 94 95 96 97 98 99 | [self XMLParserTests]; #ifdef OF_PLUGINS [self pluginTests]; #endif #ifdef OF_HAVE_PROPERTIES [self propertiesTests]; #endif | | > > > | 93 94 95 96 97 98 99 100 101 102 103 104 | [self XMLParserTests]; #ifdef OF_PLUGINS [self pluginTests]; #endif #ifdef OF_HAVE_PROPERTIES [self propertiesTests]; #endif if (fails > 0) [OFApplication terminateWithStatus: fails]; } @end |