Overview
Comment: | Add OFOptionsParser. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
4521cb6dbce490415477d58627c07fc2 |
User & Date: | js on 2013-11-09 19:22:22 |
Other Links: | manifest | tags |
Context
2013-11-10
| ||
00:35 | objfw-unzip -> ofzip check-in: ab0be1f3f9 user: js tags: trunk | |
2013-11-09
| ||
19:22 | Add OFOptionsParser. check-in: 4521cb6dbc user: js tags: trunk | |
2013-11-06
| ||
22:40 | objfw-unzip: Link with ${LDFLAGS_RPATH}. check-in: 04e7ac480f user: js tags: trunk | |
Changes
Modified ObjFW.xcodeproj/project.pbxproj from [0527e94856] to [c07910b75b].
︙ | ︙ | |||
351 352 353 354 355 356 357 358 359 360 361 362 363 364 | 4BA85BCC140ECCE800E91D51 /* OFMutableSet_hashtable.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BA85BC6140ECCE800E91D51 /* OFMutableSet_hashtable.h */; }; 4BA85BCD140ECCE800E91D51 /* OFMutableSet_hashtable.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BA85BC7140ECCE800E91D51 /* OFMutableSet_hashtable.m */; }; 4BA85BCE140ECCE800E91D51 /* OFSet_hashtable.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BA85BC8140ECCE800E91D51 /* OFSet_hashtable.h */; }; 4BA85BCF140ECCE800E91D51 /* OFSet_hashtable.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BA85BC9140ECCE800E91D51 /* OFSet_hashtable.m */; }; 4BA9CFA415E129D30076DC74 /* autorelease.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BA9CFA315E129D30076DC74 /* autorelease.h */; settings = {ATTRIBUTES = (Public, ); }; }; 4BAA60C814D09699006F068D /* OFJSONTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BAA60C714D09699006F068D /* OFJSONTests.m */; }; 4BAE7354139C508E00F682ED /* serialization.xml in CopyFiles */ = {isa = PBXBuildFile; fileRef = 4BAE7353139C507F00F682ED /* serialization.xml */; }; 4BB25E88139C388A00F574EA /* OFObject+Serialization.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BB25E82139C388A00F574EA /* OFObject+Serialization.h */; settings = {ATTRIBUTES = (Public, ); }; }; 4BB25E89139C388A00F574EA /* OFObject+Serialization.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BB25E83139C388A00F574EA /* OFObject+Serialization.m */; }; 4BB25E8A139C388A00F574EA /* OFString+Serialization.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BB25E84139C388A00F574EA /* OFString+Serialization.h */; settings = {ATTRIBUTES = (Public, ); }; }; 4BB25E8B139C388A00F574EA /* OFString+Serialization.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BB25E85139C388A00F574EA /* OFString+Serialization.m */; }; 4BB25E8C139C388A00F574EA /* OFXMLElement+Serialization.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BB25E86139C388A00F574EA /* OFXMLElement+Serialization.h */; settings = {ATTRIBUTES = (Public, ); }; }; 4BB25E8D139C388A00F574EA /* OFXMLElement+Serialization.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BB25E87139C388A00F574EA /* OFXMLElement+Serialization.m */; }; 4BB4B54416775FF4002A2DCE /* OFHTTPClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BB4B53F16775FF4002A2DCE /* OFHTTPClient.h */; settings = {ATTRIBUTES = (Public, ); }; }; | > > | 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 | 4BA85BCC140ECCE800E91D51 /* OFMutableSet_hashtable.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BA85BC6140ECCE800E91D51 /* OFMutableSet_hashtable.h */; }; 4BA85BCD140ECCE800E91D51 /* OFMutableSet_hashtable.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BA85BC7140ECCE800E91D51 /* OFMutableSet_hashtable.m */; }; 4BA85BCE140ECCE800E91D51 /* OFSet_hashtable.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BA85BC8140ECCE800E91D51 /* OFSet_hashtable.h */; }; 4BA85BCF140ECCE800E91D51 /* OFSet_hashtable.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BA85BC9140ECCE800E91D51 /* OFSet_hashtable.m */; }; 4BA9CFA415E129D30076DC74 /* autorelease.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BA9CFA315E129D30076DC74 /* autorelease.h */; settings = {ATTRIBUTES = (Public, ); }; }; 4BAA60C814D09699006F068D /* OFJSONTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BAA60C714D09699006F068D /* OFJSONTests.m */; }; 4BAE7354139C508E00F682ED /* serialization.xml in CopyFiles */ = {isa = PBXBuildFile; fileRef = 4BAE7353139C507F00F682ED /* serialization.xml */; }; 4BAFC168182EAA7800BE5E57 /* OFOptionsParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BAFC166182EAA7800BE5E57 /* OFOptionsParser.h */; settings = {ATTRIBUTES = (Public, ); }; }; 4BAFC169182EAA7800BE5E57 /* OFOptionsParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BAFC167182EAA7800BE5E57 /* OFOptionsParser.m */; }; 4BB25E88139C388A00F574EA /* OFObject+Serialization.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BB25E82139C388A00F574EA /* OFObject+Serialization.h */; settings = {ATTRIBUTES = (Public, ); }; }; 4BB25E89139C388A00F574EA /* OFObject+Serialization.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BB25E83139C388A00F574EA /* OFObject+Serialization.m */; }; 4BB25E8A139C388A00F574EA /* OFString+Serialization.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BB25E84139C388A00F574EA /* OFString+Serialization.h */; settings = {ATTRIBUTES = (Public, ); }; }; 4BB25E8B139C388A00F574EA /* OFString+Serialization.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BB25E85139C388A00F574EA /* OFString+Serialization.m */; }; 4BB25E8C139C388A00F574EA /* OFXMLElement+Serialization.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BB25E86139C388A00F574EA /* OFXMLElement+Serialization.h */; settings = {ATTRIBUTES = (Public, ); }; }; 4BB25E8D139C388A00F574EA /* OFXMLElement+Serialization.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BB25E87139C388A00F574EA /* OFXMLElement+Serialization.m */; }; 4BB4B54416775FF4002A2DCE /* OFHTTPClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BB4B53F16775FF4002A2DCE /* OFHTTPClient.h */; settings = {ATTRIBUTES = (Public, ); }; }; |
︙ | ︙ | |||
796 797 798 799 800 801 802 803 804 805 806 807 808 809 | 4BAA60C714D09699006F068D /* OFJSONTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OFJSONTests.m; path = tests/OFJSONTests.m; sourceTree = "<group>"; }; 4BAE7353139C507F00F682ED /* serialization.xml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; name = serialization.xml; path = tests/serialization.xml; sourceTree = "<group>"; }; 4BAF5F46123460C900F4E111 /* OFCollection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OFCollection.h; path = src/OFCollection.h; sourceTree = "<group>"; }; 4BAF5F47123460C900F4E111 /* OFStreamObserver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OFStreamObserver.h; path = src/OFStreamObserver.h; sourceTree = "<group>"; }; 4BAF5F48123460C900F4E111 /* OFStreamObserver.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OFStreamObserver.m; path = src/OFStreamObserver.m; sourceTree = "<group>"; }; 4BAF5F49123460C900F4E111 /* OFStreamSocket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OFStreamSocket.h; path = src/OFStreamSocket.h; sourceTree = "<group>"; }; 4BAF5F4A123460C900F4E111 /* OFStreamSocket.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OFStreamSocket.m; path = src/OFStreamSocket.m; sourceTree = "<group>"; }; 4BB25E82139C388A00F574EA /* OFObject+Serialization.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "OFObject+Serialization.h"; path = "src/OFObject+Serialization.h"; sourceTree = "<group>"; }; 4BB25E83139C388A00F574EA /* OFObject+Serialization.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "OFObject+Serialization.m"; path = "src/OFObject+Serialization.m"; sourceTree = "<group>"; }; 4BB25E84139C388A00F574EA /* OFString+Serialization.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "OFString+Serialization.h"; path = "src/OFString+Serialization.h"; sourceTree = "<group>"; }; 4BB25E85139C388A00F574EA /* OFString+Serialization.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "OFString+Serialization.m"; path = "src/OFString+Serialization.m"; sourceTree = "<group>"; }; 4BB25E86139C388A00F574EA /* OFXMLElement+Serialization.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "OFXMLElement+Serialization.h"; path = "src/OFXMLElement+Serialization.h"; sourceTree = "<group>"; }; 4BB25E87139C388A00F574EA /* OFXMLElement+Serialization.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "OFXMLElement+Serialization.m"; path = "src/OFXMLElement+Serialization.m"; sourceTree = "<group>"; }; 4BB4B53F16775FF4002A2DCE /* OFHTTPClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OFHTTPClient.h; path = src/OFHTTPClient.h; sourceTree = "<group>"; }; | > > | 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 | 4BAA60C714D09699006F068D /* OFJSONTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OFJSONTests.m; path = tests/OFJSONTests.m; sourceTree = "<group>"; }; 4BAE7353139C507F00F682ED /* serialization.xml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; name = serialization.xml; path = tests/serialization.xml; sourceTree = "<group>"; }; 4BAF5F46123460C900F4E111 /* OFCollection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OFCollection.h; path = src/OFCollection.h; sourceTree = "<group>"; }; 4BAF5F47123460C900F4E111 /* OFStreamObserver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OFStreamObserver.h; path = src/OFStreamObserver.h; sourceTree = "<group>"; }; 4BAF5F48123460C900F4E111 /* OFStreamObserver.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OFStreamObserver.m; path = src/OFStreamObserver.m; sourceTree = "<group>"; }; 4BAF5F49123460C900F4E111 /* OFStreamSocket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OFStreamSocket.h; path = src/OFStreamSocket.h; sourceTree = "<group>"; }; 4BAF5F4A123460C900F4E111 /* OFStreamSocket.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OFStreamSocket.m; path = src/OFStreamSocket.m; sourceTree = "<group>"; }; 4BAFC166182EAA7800BE5E57 /* OFOptionsParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OFOptionsParser.h; path = src/OFOptionsParser.h; sourceTree = "<group>"; }; 4BAFC167182EAA7800BE5E57 /* OFOptionsParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OFOptionsParser.m; path = src/OFOptionsParser.m; sourceTree = "<group>"; }; 4BB25E82139C388A00F574EA /* OFObject+Serialization.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "OFObject+Serialization.h"; path = "src/OFObject+Serialization.h"; sourceTree = "<group>"; }; 4BB25E83139C388A00F574EA /* OFObject+Serialization.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "OFObject+Serialization.m"; path = "src/OFObject+Serialization.m"; sourceTree = "<group>"; }; 4BB25E84139C388A00F574EA /* OFString+Serialization.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "OFString+Serialization.h"; path = "src/OFString+Serialization.h"; sourceTree = "<group>"; }; 4BB25E85139C388A00F574EA /* OFString+Serialization.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "OFString+Serialization.m"; path = "src/OFString+Serialization.m"; sourceTree = "<group>"; }; 4BB25E86139C388A00F574EA /* OFXMLElement+Serialization.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "OFXMLElement+Serialization.h"; path = "src/OFXMLElement+Serialization.h"; sourceTree = "<group>"; }; 4BB25E87139C388A00F574EA /* OFXMLElement+Serialization.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "OFXMLElement+Serialization.m"; path = "src/OFXMLElement+Serialization.m"; sourceTree = "<group>"; }; 4BB4B53F16775FF4002A2DCE /* OFHTTPClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OFHTTPClient.h; path = src/OFHTTPClient.h; sourceTree = "<group>"; }; |
︙ | ︙ | |||
1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 | 4B511B7B139C0A34003764A5 /* OFNull.m */, 4B6799751099E7C50041064A /* OFNumber.h */, 4B6799761099E7C50041064A /* OFNumber.m */, 4B6799771099E7C50041064A /* OFObject.h */, 4B6799781099E7C50041064A /* OFObject.m */, 4BB25E82139C388A00F574EA /* OFObject+Serialization.h */, 4BB25E83139C388A00F574EA /* OFObject+Serialization.m */, 4B6799791099E7C50041064A /* OFPlugin.h */, 4B67997A1099E7C50041064A /* OFPlugin.m */, 4BB524BF143D1E4E0085FBCC /* OFProcess.h */, 4BB524C0143D1E4E0085FBCC /* OFProcess.m */, 4B6743FC163C395900EB1E59 /* OFRecursiveMutex.h */, 4B6743FD163C395900EB1E59 /* OFRecursiveMutex.m */, 4B325ED91605F3A0007836CA /* OFRunLoop.h */, | > > | 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 | 4B511B7B139C0A34003764A5 /* OFNull.m */, 4B6799751099E7C50041064A /* OFNumber.h */, 4B6799761099E7C50041064A /* OFNumber.m */, 4B6799771099E7C50041064A /* OFObject.h */, 4B6799781099E7C50041064A /* OFObject.m */, 4BB25E82139C388A00F574EA /* OFObject+Serialization.h */, 4BB25E83139C388A00F574EA /* OFObject+Serialization.m */, 4BAFC166182EAA7800BE5E57 /* OFOptionsParser.h */, 4BAFC167182EAA7800BE5E57 /* OFOptionsParser.m */, 4B6799791099E7C50041064A /* OFPlugin.h */, 4B67997A1099E7C50041064A /* OFPlugin.m */, 4BB524BF143D1E4E0085FBCC /* OFProcess.h */, 4BB524C0143D1E4E0085FBCC /* OFProcess.m */, 4B6743FC163C395900EB1E59 /* OFRecursiveMutex.h */, 4B6743FD163C395900EB1E59 /* OFRecursiveMutex.m */, 4B325ED91605F3A0007836CA /* OFRunLoop.h */, |
︙ | ︙ | |||
1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 | 4B39844713D3AFB400E6F825 /* OFMutableSet.h in Headers */, 4B3D23CF1337FCB000DD29B8 /* OFMutableString.h in Headers */, 4B674403163C395900EB1E59 /* OFMutex.h in Headers */, 4B511B7C139C0A34003764A5 /* OFNull.h in Headers */, 4B3D23D01337FCB000DD29B8 /* OFNumber.h in Headers */, 4B3D23D11337FCB000DD29B8 /* OFObject.h in Headers */, 4BB25E88139C388A00F574EA /* OFObject+Serialization.h in Headers */, 4B3D23D21337FCB000DD29B8 /* OFPlugin.h in Headers */, 4BB524C1143D1E4E0085FBCC /* OFProcess.h in Headers */, 4B674405163C395900EB1E59 /* OFRecursiveMutex.h in Headers */, 4B325EDD1605F3A0007836CA /* OFRunLoop.h in Headers */, 4B3D23D31337FCB000DD29B8 /* OFSeekableStream.h in Headers */, 4B989C2F13771A3700109A30 /* OFSerialization.h in Headers */, 4B39844213D3A24600E6F825 /* OFSet.h in Headers */, | > | 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 | 4B39844713D3AFB400E6F825 /* OFMutableSet.h in Headers */, 4B3D23CF1337FCB000DD29B8 /* OFMutableString.h in Headers */, 4B674403163C395900EB1E59 /* OFMutex.h in Headers */, 4B511B7C139C0A34003764A5 /* OFNull.h in Headers */, 4B3D23D01337FCB000DD29B8 /* OFNumber.h in Headers */, 4B3D23D11337FCB000DD29B8 /* OFObject.h in Headers */, 4BB25E88139C388A00F574EA /* OFObject+Serialization.h in Headers */, 4BAFC168182EAA7800BE5E57 /* OFOptionsParser.h in Headers */, 4B3D23D21337FCB000DD29B8 /* OFPlugin.h in Headers */, 4BB524C1143D1E4E0085FBCC /* OFProcess.h in Headers */, 4B674405163C395900EB1E59 /* OFRecursiveMutex.h in Headers */, 4B325EDD1605F3A0007836CA /* OFRunLoop.h in Headers */, 4B3D23D31337FCB000DD29B8 /* OFSeekableStream.h in Headers */, 4B989C2F13771A3700109A30 /* OFSerialization.h in Headers */, 4B39844213D3A24600E6F825 /* OFSet.h in Headers */, |
︙ | ︙ | |||
1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 | 4B3D239D1337FC0D00DD29B8 /* OFMutableString.m in Sources */, 4B552553147AA5DB0003BF47 /* OFMutableString_UTF8.m in Sources */, 4B674404163C395900EB1E59 /* OFMutex.m in Sources */, 4B511B7D139C0A34003764A5 /* OFNull.m in Sources */, 4B3D239E1337FC0D00DD29B8 /* OFNumber.m in Sources */, 4B3D239F1337FC0D00DD29B8 /* OFObject.m in Sources */, 4BB25E89139C388A00F574EA /* OFObject+Serialization.m in Sources */, 4B3D23A01337FC0D00DD29B8 /* OFPlugin.m in Sources */, 4BB524C2143D1E4E0085FBCC /* OFProcess.m in Sources */, 4B674406163C395900EB1E59 /* OFRecursiveMutex.m in Sources */, 4B325EDE1605F3A0007836CA /* OFRunLoop.m in Sources */, 4B3D23A11337FC0D00DD29B8 /* OFSeekableStream.m in Sources */, 4B39844313D3A24600E6F825 /* OFSet.m in Sources */, 4BA85BCF140ECCE800E91D51 /* OFSet_hashtable.m in Sources */, | > | 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 | 4B3D239D1337FC0D00DD29B8 /* OFMutableString.m in Sources */, 4B552553147AA5DB0003BF47 /* OFMutableString_UTF8.m in Sources */, 4B674404163C395900EB1E59 /* OFMutex.m in Sources */, 4B511B7D139C0A34003764A5 /* OFNull.m in Sources */, 4B3D239E1337FC0D00DD29B8 /* OFNumber.m in Sources */, 4B3D239F1337FC0D00DD29B8 /* OFObject.m in Sources */, 4BB25E89139C388A00F574EA /* OFObject+Serialization.m in Sources */, 4BAFC169182EAA7800BE5E57 /* OFOptionsParser.m in Sources */, 4B3D23A01337FC0D00DD29B8 /* OFPlugin.m in Sources */, 4BB524C2143D1E4E0085FBCC /* OFProcess.m in Sources */, 4B674406163C395900EB1E59 /* OFRecursiveMutex.m in Sources */, 4B325EDE1605F3A0007836CA /* OFRunLoop.m in Sources */, 4B3D23A11337FC0D00DD29B8 /* OFSeekableStream.m in Sources */, 4B39844313D3A24600E6F825 /* OFSet.m in Sources */, 4BA85BCF140ECCE800E91D51 /* OFSet_hashtable.m in Sources */, |
︙ | ︙ |
Modified src/Makefile from [d4440caf30] to [f50db72e20].
︙ | ︙ | |||
32 33 34 35 36 37 38 39 40 41 42 43 44 45 | OFMutableDictionary.m \ OFMutableSet.m \ OFMutableString.m \ OFNull.m \ OFNumber.m \ OFObject.m \ OFObject+Serialization.m \ ${OFPROCESS_M} \ OFRunLoop.m \ OFSeekableStream.m \ OFSet.m \ OFSHA1Hash.m \ OFSortedList.m \ OFStdIOStream.m \ | > | 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | OFMutableDictionary.m \ OFMutableSet.m \ OFMutableString.m \ OFNull.m \ OFNumber.m \ OFObject.m \ OFObject+Serialization.m \ OFOptionsParser.m \ ${OFPROCESS_M} \ OFRunLoop.m \ OFSeekableStream.m \ OFSet.m \ OFSHA1Hash.m \ OFSortedList.m \ OFStdIOStream.m \ |
︙ | ︙ |
Added src/OFOptionsParser.h version [b77c4ed1b4].
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 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 | /* * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013 * 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.QPL included in * the packaging of this file. * * 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 "OFConstantString.h" /*! * @brief A class for parsing the program options specified on the command line. */ @interface OFOptionsParser: OFObject { of_unichar_t *_options; OFArray *_arguments; size_t _index, _subIndex; of_unichar_t _lastOption; OFString *_argument; bool _done; } /*! * @brief Creates a new OFOptionsParser which accepts the specified options. * * @param options A string listing the acceptable options.@n * Options that require an argument are immediately followed by * ':'. * * @return A new, autoreleased OFOptionsParser */ + (instancetype)parserWithOptions: (OFString*)options; /*! * @brief Initializes an already allocated OFOptionsParser so that it accepts * the specified options. * * @param options A string listing the acceptable options.@n * Options that require an argument are immediately followed by * ':'. * * @return An initialized OFOptionsParser */ - initWithOptions: (OFString*)options; /*! * @brief Returns the next option. * * If an unknown option is specified, '?' is returned.@n * If the argument for the option is missing, ':' is returned.@n * If all options have been parsed, '\0' is returned. * * @return The next option */ - (of_unichar_t)nextOption; /*! * @brief Returns the last parsed option. * * If @ref nextOption returned '?' or ':', this returns the option which was * unknown or for which the argument was missing. * * @return The last parsed option */ - (of_unichar_t)lastOption; /*! * @brief Returns the argument for the last parsed option, or nil if the last * parsed option takes no argument. * * @return The argument for the last parsed option */ - (OFString*)argument; /*! * @brief Returns the arguments following the last option. * * @return The arguments following the last option */ - (OFArray*)remainingArguments; @end |
Added src/OFOptionsParser.m version [aa4007b981].
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 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 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 | /* * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013 * 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.QPL included in * the packaging of this file. * * 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. */ #include "config.h" #include <stdlib.h> #import "OFOptionsParser.h" #import "OFApplication.h" #import "OFArray.h" #import "autorelease.h" #import "macros.h" @implementation OFOptionsParser + (instancetype)parserWithOptions: (OFString*)options { return [[[self alloc] initWithOptions: options] autorelease]; } - init { @try { [self doesNotRecognizeSelector: _cmd]; } @catch (id e) { [self release]; @throw e; } abort(); } - initWithOptions: (OFString*)options { self = [super init]; @try { _options = [self allocMemoryWithSize: sizeof(of_unichar_t) count: [options length] + 1]; [options getCharacters: _options inRange: of_range(0, [options length])]; _options[[options length]] = 0; _arguments = [[OFApplication arguments] retain]; } @catch (id e) { [self release]; @throw e; } return self; } - (void)dealloc { [_arguments release]; [_argument release]; [super dealloc]; } - (of_unichar_t)nextOption { of_unichar_t *options; OFString *argument; if (_done || _index >= [_arguments count]) return '\0'; argument = [_arguments objectAtIndex: _index]; if (_subIndex == 0) { if ([argument length] < 2 || [argument characterAtIndex: 0] != '-') { _done = true; return '\0'; } if ([argument isEqual: @"--"]) { _done = true; _index++; return '\0'; } _subIndex = 1; } _lastOption = [argument characterAtIndex: _subIndex++]; if (_subIndex >= [argument length]) { _index++; _subIndex = 0; } for (options = _options; *options != 0; options++) { if (_lastOption == *options) { if (options[1] != ':') { [_argument release]; _argument = nil; return _lastOption; } if (_index >= [_arguments count]) return ':'; argument = [_arguments objectAtIndex: _index]; argument = [argument substringWithRange: of_range(_subIndex, [argument length] - _subIndex)]; [_argument release]; _argument = [argument copy]; _index++; _subIndex = 0; return _lastOption; } } return '?'; } - (of_unichar_t)lastOption { return _lastOption; } - (OFString*)argument { return [[_argument copy] autorelease]; } - (OFArray*)remainingArguments { return [_arguments objectsInRange: of_range(_index, [_arguments count] - _index)]; } @end |
Modified src/ObjFW.h from [ee41bf203d] to [c15234d226].
︙ | ︙ | |||
79 80 81 82 83 84 85 86 87 88 89 90 91 92 | #import "OFXMLProcessingInstructions.h" #import "OFXMLParser.h" #import "OFXMLElementBuilder.h" #import "OFMessagePackExtension.h" #import "OFApplication.h" #import "OFSystemInfo.h" #import "OFTimer.h" #import "OFRunLoop.h" #import "OFAllocFailedException.h" #import "OFException.h" #ifdef OF_HAVE_SOCKETS | > | 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 | #import "OFXMLProcessingInstructions.h" #import "OFXMLParser.h" #import "OFXMLElementBuilder.h" #import "OFMessagePackExtension.h" #import "OFApplication.h" #import "OFOptionsParser.h" #import "OFSystemInfo.h" #import "OFTimer.h" #import "OFRunLoop.h" #import "OFAllocFailedException.h" #import "OFException.h" #ifdef OF_HAVE_SOCKETS |
︙ | ︙ |