ObjFW  Check-in [9fdfdec6f7]

Overview
Comment:encodings: Code deduplication
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 9fdfdec6f7b8da6bce677013cc386c2583244d5c7940e35da35c559e75016b1d
User & Date: js on 2017-02-12 18:33:28
Other Links: manifest | tags
Context
2017-02-12
20:05
More efficient UTF-8 -> ISO-8859-15 conversion check-in: 6bf2b02dc4 user: js tags: trunk
18:33
encodings: Code deduplication check-in: 9fdfdec6f7 user: js tags: trunk
16:55
More efficient UTF-8 -> ISO-8859-3 conversion check-in: 4a01b5b9f7 user: js tags: trunk
Changes

Modified ObjFW.xcodeproj/project.pbxproj from [bf8fdc72d9] to [f983ce6324].

973
974
975
976
977
978
979


980
981
982
983
984
985
986
		4BF3A2291E25EA48002EA46F /* windows_1251.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BF3A2281E25EA48002EA46F /* windows_1251.m */; };
		4BF3A22A1E25EA48002EA46F /* windows_1251.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BF3A2281E25EA48002EA46F /* windows_1251.m */; };
		4BF48CE118A95F83000E8D04 /* OFBigDataArray.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF48CDF18A95F83000E8D04 /* OFBigDataArray.h */; settings = {ATTRIBUTES = (Public, ); }; };
		4BF48CE218A95F83000E8D04 /* OFBigDataArray.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BF48CE018A95F83000E8D04 /* OFBigDataArray.m */; };
		4BF5CB901E2DC1D800CF7584 /* iso_8859_2.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BF5CB8F1E2DC1D800CF7584 /* iso_8859_2.m */; };
		4BF5CB911E2DC1D800CF7584 /* iso_8859_2.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BF5CB8F1E2DC1D800CF7584 /* iso_8859_2.m */; };
		4BF69CE61BD44F8B00DFFC1B /* platform.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF69CE51BD44F8B00DFFC1B /* platform.h */; settings = {ATTRIBUTES = (Public, ); }; };


		4BFF3714177E17C100192782 /* OFRemoveItemFailedException.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BFF3710177E17C100192782 /* OFRemoveItemFailedException.h */; settings = {ATTRIBUTES = (Public, ); }; };
		4BFF3715177E17C100192782 /* OFRemoveItemFailedException.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BFF3711177E17C100192782 /* OFRemoveItemFailedException.m */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
		4B23CA8E133811B20047A1D9 /* PBXContainerItemProxy */ = {
			isa = PBXContainerItemProxy;







>
>







973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
		4BF3A2291E25EA48002EA46F /* windows_1251.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BF3A2281E25EA48002EA46F /* windows_1251.m */; };
		4BF3A22A1E25EA48002EA46F /* windows_1251.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BF3A2281E25EA48002EA46F /* windows_1251.m */; };
		4BF48CE118A95F83000E8D04 /* OFBigDataArray.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF48CDF18A95F83000E8D04 /* OFBigDataArray.h */; settings = {ATTRIBUTES = (Public, ); }; };
		4BF48CE218A95F83000E8D04 /* OFBigDataArray.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BF48CE018A95F83000E8D04 /* OFBigDataArray.m */; };
		4BF5CB901E2DC1D800CF7584 /* iso_8859_2.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BF5CB8F1E2DC1D800CF7584 /* iso_8859_2.m */; };
		4BF5CB911E2DC1D800CF7584 /* iso_8859_2.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BF5CB8F1E2DC1D800CF7584 /* iso_8859_2.m */; };
		4BF69CE61BD44F8B00DFFC1B /* platform.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF69CE51BD44F8B00DFFC1B /* platform.h */; settings = {ATTRIBUTES = (Public, ); }; };
		4BFC37BD1E50E11C00EE1269 /* common.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BFC37BC1E50E11C00EE1269 /* common.h */; };
		4BFC37BE1E50E11C00EE1269 /* common.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BFC37BC1E50E11C00EE1269 /* common.h */; };
		4BFF3714177E17C100192782 /* OFRemoveItemFailedException.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BFF3710177E17C100192782 /* OFRemoveItemFailedException.h */; settings = {ATTRIBUTES = (Public, ); }; };
		4BFF3715177E17C100192782 /* OFRemoveItemFailedException.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BFF3711177E17C100192782 /* OFRemoveItemFailedException.m */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
		4B23CA8E133811B20047A1D9 /* PBXContainerItemProxy */ = {
			isa = PBXContainerItemProxy;
1603
1604
1605
1606
1607
1608
1609

1610
1611
1612
1613
1614
1615
1616
		4BF33B4313380CD40059CEF7 /* testfile.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = testfile.txt; path = tests/testfile.txt; sourceTree = "<group>"; };
		4BF3A2281E25EA48002EA46F /* windows_1251.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = windows_1251.m; path = src/encodings/windows_1251.m; sourceTree = "<group>"; };
		4BF48CDF18A95F83000E8D04 /* OFBigDataArray.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OFBigDataArray.h; path = src/OFBigDataArray.h; sourceTree = "<group>"; };
		4BF48CE018A95F83000E8D04 /* OFBigDataArray.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OFBigDataArray.m; path = src/OFBigDataArray.m; sourceTree = "<group>"; };
		4BF5CB8F1E2DC1D800CF7584 /* iso_8859_2.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = iso_8859_2.m; path = src/encodings/iso_8859_2.m; sourceTree = "<group>"; };
		4BF69CE51BD44F8B00DFFC1B /* platform.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = platform.h; path = src/platform.h; sourceTree = "<group>"; };
		4BFBDD1610A0724800051AFB /* unicode.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = unicode.m; path = src/unicode.m; sourceTree = "<group>"; };

		4BFF3710177E17C100192782 /* OFRemoveItemFailedException.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OFRemoveItemFailedException.h; path = src/exceptions/OFRemoveItemFailedException.h; sourceTree = "<group>"; };
		4BFF3711177E17C100192782 /* OFRemoveItemFailedException.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OFRemoveItemFailedException.m; path = src/exceptions/OFRemoveItemFailedException.m; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
		4B0E29761DA2A8A400323A76 /* Frameworks */ = {
			isa = PBXFrameworksBuildPhase;







>







1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
		4BF33B4313380CD40059CEF7 /* testfile.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = testfile.txt; path = tests/testfile.txt; sourceTree = "<group>"; };
		4BF3A2281E25EA48002EA46F /* windows_1251.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = windows_1251.m; path = src/encodings/windows_1251.m; sourceTree = "<group>"; };
		4BF48CDF18A95F83000E8D04 /* OFBigDataArray.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OFBigDataArray.h; path = src/OFBigDataArray.h; sourceTree = "<group>"; };
		4BF48CE018A95F83000E8D04 /* OFBigDataArray.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OFBigDataArray.m; path = src/OFBigDataArray.m; sourceTree = "<group>"; };
		4BF5CB8F1E2DC1D800CF7584 /* iso_8859_2.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = iso_8859_2.m; path = src/encodings/iso_8859_2.m; sourceTree = "<group>"; };
		4BF69CE51BD44F8B00DFFC1B /* platform.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = platform.h; path = src/platform.h; sourceTree = "<group>"; };
		4BFBDD1610A0724800051AFB /* unicode.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = unicode.m; path = src/unicode.m; sourceTree = "<group>"; };
		4BFC37BC1E50E11C00EE1269 /* common.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = common.h; path = src/encodings/common.h; sourceTree = "<group>"; };
		4BFF3710177E17C100192782 /* OFRemoveItemFailedException.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OFRemoveItemFailedException.h; path = src/exceptions/OFRemoveItemFailedException.h; sourceTree = "<group>"; };
		4BFF3711177E17C100192782 /* OFRemoveItemFailedException.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OFRemoveItemFailedException.m; path = src/exceptions/OFRemoveItemFailedException.m; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
		4B0E29761DA2A8A400323A76 /* Frameworks */ = {
			isa = PBXFrameworksBuildPhase;
1915
1916
1917
1918
1919
1920
1921

1922
1923
1924
1925
1926
1927
1928
		};
		4B610DC41E31A46600AB26BA /* Encodings */ = {
			isa = PBXGroup;
			children = (
				4BB52CC617B8EA7F00B7EBF5 /* codepage_437.m */,
				4B5EBFB51E25A8CF004FE6A2 /* codepage_850.m */,
				4B6736111E2B2F6F00681F2C /* codepage_858.m */,

				4BF5CB8F1E2DC1D800CF7584 /* iso_8859_2.m */,
				4B276E351E493D4900E20CE4 /* iso_8859_3.m */,
				4B6AF96F10A8D40E0003FB0A /* iso_8859_15.m */,
				4B276E361E493D4900E20CE4 /* koi8_r.m */,
				4B276E371E493D4900E20CE4 /* koi8_u.m */,
				4B5EBFB81E25A937004FE6A2 /* mac_roman.m */,
				4BF3A2281E25EA48002EA46F /* windows_1251.m */,







>







1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
		};
		4B610DC41E31A46600AB26BA /* Encodings */ = {
			isa = PBXGroup;
			children = (
				4BB52CC617B8EA7F00B7EBF5 /* codepage_437.m */,
				4B5EBFB51E25A8CF004FE6A2 /* codepage_850.m */,
				4B6736111E2B2F6F00681F2C /* codepage_858.m */,
				4BFC37BC1E50E11C00EE1269 /* common.h */,
				4BF5CB8F1E2DC1D800CF7584 /* iso_8859_2.m */,
				4B276E351E493D4900E20CE4 /* iso_8859_3.m */,
				4B6AF96F10A8D40E0003FB0A /* iso_8859_15.m */,
				4B276E361E493D4900E20CE4 /* koi8_r.m */,
				4B276E371E493D4900E20CE4 /* koi8_u.m */,
				4B5EBFB81E25A937004FE6A2 /* mac_roman.m */,
				4BF3A2281E25EA48002EA46F /* windows_1251.m */,
2535
2536
2537
2538
2539
2540
2541

2542
2543
2544
2545
2546
2547
2548
				4B2C22871DA292BE00735907 /* OFUnboundPrefixException.h in Headers */,
				4B2C22881DA292BE00735907 /* OFUndefinedKeyException.h in Headers */,
				4B2C22891DA292BE00735907 /* OFUnknownXMLEntityException.h in Headers */,
				4B2C228A1DA292BE00735907 /* OFUnlockFailedException.h in Headers */,
				4B2C228B1DA292BE00735907 /* OFUnsupportedProtocolException.h in Headers */,
				4B2C228C1DA292BE00735907 /* OFUnsupportedVersionException.h in Headers */,
				4B2C228D1DA292BE00735907 /* OFWriteFailedException.h in Headers */,

				4B2C228E1DA292BE00735907 /* OFArray_adjacent.h in Headers */,
				4B2C228F1DA292BE00735907 /* OFArray_adjacentSubarray.h in Headers */,
				4B2C21D91DA292BE00735907 /* OFArray_subarray.h in Headers */,
				4B2C22901DA292BE00735907 /* OFAutoreleasePool+Private.h in Headers */,
				4B2C22911DA292BE00735907 /* OFCountedSet_hashtable.h in Headers */,
				4B2C22921DA292BE00735907 /* OFDictionary_hashtable.h in Headers */,
				4B2C22931DA292BE00735907 /* OFINICategory+Private.h in Headers */,







>







2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
				4B2C22871DA292BE00735907 /* OFUnboundPrefixException.h in Headers */,
				4B2C22881DA292BE00735907 /* OFUndefinedKeyException.h in Headers */,
				4B2C22891DA292BE00735907 /* OFUnknownXMLEntityException.h in Headers */,
				4B2C228A1DA292BE00735907 /* OFUnlockFailedException.h in Headers */,
				4B2C228B1DA292BE00735907 /* OFUnsupportedProtocolException.h in Headers */,
				4B2C228C1DA292BE00735907 /* OFUnsupportedVersionException.h in Headers */,
				4B2C228D1DA292BE00735907 /* OFWriteFailedException.h in Headers */,
				4B2C22A91DA292BE00735907 /* config.h in Headers */,
				4B2C228E1DA292BE00735907 /* OFArray_adjacent.h in Headers */,
				4B2C228F1DA292BE00735907 /* OFArray_adjacentSubarray.h in Headers */,
				4B2C21D91DA292BE00735907 /* OFArray_subarray.h in Headers */,
				4B2C22901DA292BE00735907 /* OFAutoreleasePool+Private.h in Headers */,
				4B2C22911DA292BE00735907 /* OFCountedSet_hashtable.h in Headers */,
				4B2C22921DA292BE00735907 /* OFDictionary_hashtable.h in Headers */,
				4B2C22931DA292BE00735907 /* OFINICategory+Private.h in Headers */,
2563
2564
2565
2566
2567
2568
2569
2570
2571

2572
2573
2574
2575
2576
2577
2578
				4B2C22A21DA292BE00735907 /* OFString_UTF8.h in Headers */,
				4B2C22A31DA292BE00735907 /* OFString_UTF8+Private.h in Headers */,
				4B2C22A41DA292BE00735907 /* OFTarArchiveEntry+Private.h in Headers */,
				4B2C22A51DA292BE00735907 /* OFTCPSocket+SOCKS5.h in Headers */,
				4B2C22A61DA292BE00735907 /* OFThread+Private.h in Headers */,
				4B2C22A71DA292BE00735907 /* OFTimer+Private.h in Headers */,
				4B2C22A81DA292BE00735907 /* OFZIPArchiveEntry+Private.h in Headers */,
				4B2C22A91DA292BE00735907 /* config.h in Headers */,
				4B2C22AA1DA292BE00735907 /* socket_helpers.h in Headers */,

			);
			runOnlyForDeploymentPostprocessing = 0;
		};
		4B3D23731337FBC800DD29B8 /* Headers */ = {
			isa = PBXHeadersBuildPhase;
			buildActionMask = 2147483647;
			files = (







<

>







2568
2569
2570
2571
2572
2573
2574

2575
2576
2577
2578
2579
2580
2581
2582
2583
				4B2C22A21DA292BE00735907 /* OFString_UTF8.h in Headers */,
				4B2C22A31DA292BE00735907 /* OFString_UTF8+Private.h in Headers */,
				4B2C22A41DA292BE00735907 /* OFTarArchiveEntry+Private.h in Headers */,
				4B2C22A51DA292BE00735907 /* OFTCPSocket+SOCKS5.h in Headers */,
				4B2C22A61DA292BE00735907 /* OFThread+Private.h in Headers */,
				4B2C22A71DA292BE00735907 /* OFTimer+Private.h in Headers */,
				4B2C22A81DA292BE00735907 /* OFZIPArchiveEntry+Private.h in Headers */,

				4B2C22AA1DA292BE00735907 /* socket_helpers.h in Headers */,
				4BFC37BE1E50E11C00EE1269 /* common.h in Headers */,
			);
			runOnlyForDeploymentPostprocessing = 0;
		};
		4B3D23731337FBC800DD29B8 /* Headers */ = {
			isa = PBXHeadersBuildPhase;
			buildActionMask = 2147483647;
			files = (
2754
2755
2756
2757
2758
2759
2760

2761
2762
2763
2764
2765
2766
2767
				4BD77FDE176E4BC40031C497 /* OFUnboundPrefixException.h in Headers */,
				4B44836D1D0497DE005D12A7 /* OFUndefinedKeyException.h in Headers */,
				4B91FD12196B4F5900C5C25E /* OFUnknownXMLEntityException.h in Headers */,
				4B6743F5163C384A00EB1E59 /* OFUnlockFailedException.h in Headers */,
				4B17FFB1133A3664003E6DCD /* OFUnsupportedProtocolException.h in Headers */,
				4BA4846215CC9F1E00D75360 /* OFUnsupportedVersionException.h in Headers */,
				4B55A116133AC24600B58A93 /* OFWriteFailedException.h in Headers */,

				4B2B3E7D140D430500EC2F7C /* OFArray_adjacent.h in Headers */,
				4B9BB7BD141CDE2D000AD1CC /* OFArray_adjacentSubarray.h in Headers */,
				4B9BB7BF141CDE2D000AD1CC /* OFArray_subarray.h in Headers */,
				4B1473CB17E6391900B46BB8 /* OFAutoreleasePool+Private.h in Headers */,
				4BA85BCA140ECCE800E91D51 /* OFCountedSet_hashtable.h in Headers */,
				4B2B3E7F140D430500EC2F7C /* OFDictionary_hashtable.h in Headers */,
				4B06855518B2AD3800FC731A /* OFINICategory+Private.h in Headers */,







>







2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
				4BD77FDE176E4BC40031C497 /* OFUnboundPrefixException.h in Headers */,
				4B44836D1D0497DE005D12A7 /* OFUndefinedKeyException.h in Headers */,
				4B91FD12196B4F5900C5C25E /* OFUnknownXMLEntityException.h in Headers */,
				4B6743F5163C384A00EB1E59 /* OFUnlockFailedException.h in Headers */,
				4B17FFB1133A3664003E6DCD /* OFUnsupportedProtocolException.h in Headers */,
				4BA4846215CC9F1E00D75360 /* OFUnsupportedVersionException.h in Headers */,
				4B55A116133AC24600B58A93 /* OFWriteFailedException.h in Headers */,
				4BDF37B51338055600F9A81A /* config.h in Headers */,
				4B2B3E7D140D430500EC2F7C /* OFArray_adjacent.h in Headers */,
				4B9BB7BD141CDE2D000AD1CC /* OFArray_adjacentSubarray.h in Headers */,
				4B9BB7BF141CDE2D000AD1CC /* OFArray_subarray.h in Headers */,
				4B1473CB17E6391900B46BB8 /* OFAutoreleasePool+Private.h in Headers */,
				4BA85BCA140ECCE800E91D51 /* OFCountedSet_hashtable.h in Headers */,
				4B2B3E7F140D430500EC2F7C /* OFDictionary_hashtable.h in Headers */,
				4B06855518B2AD3800FC731A /* OFINICategory+Private.h in Headers */,
2782
2783
2784
2785
2786
2787
2788
2789
2790

2791
2792
2793
2794
2795
2796
2797
				4B552554147AA5DB0003BF47 /* OFString_UTF8.h in Headers */,
				4B6C8ADB17BD5C2E00B194F2 /* OFString_UTF8+Private.h in Headers */,
				4BC176361D04963000C32718 /* OFTarArchiveEntry+Private.h in Headers */,
				4BD653C5143B8489006182F0 /* OFTCPSocket+SOCKS5.h in Headers */,
				4B6C8ADC17BD5C2E00B194F2 /* OFThread+Private.h in Headers */,
				4B6C8ADD17BD5C2E00B194F2 /* OFTimer+Private.h in Headers */,
				4B6C8ADE17BD5C2E00B194F2 /* OFZIPArchiveEntry+Private.h in Headers */,
				4BDF37B51338055600F9A81A /* config.h in Headers */,
				4B7DD58218942FE200990FD6 /* socket_helpers.h in Headers */,

			);
			runOnlyForDeploymentPostprocessing = 0;
		};
		4B5D70711DA2F87A00B3B2D7 /* Headers */ = {
			isa = PBXHeadersBuildPhase;
			buildActionMask = 2147483647;
			files = (







<

>







2788
2789
2790
2791
2792
2793
2794

2795
2796
2797
2798
2799
2800
2801
2802
2803
				4B552554147AA5DB0003BF47 /* OFString_UTF8.h in Headers */,
				4B6C8ADB17BD5C2E00B194F2 /* OFString_UTF8+Private.h in Headers */,
				4BC176361D04963000C32718 /* OFTarArchiveEntry+Private.h in Headers */,
				4BD653C5143B8489006182F0 /* OFTCPSocket+SOCKS5.h in Headers */,
				4B6C8ADC17BD5C2E00B194F2 /* OFThread+Private.h in Headers */,
				4B6C8ADD17BD5C2E00B194F2 /* OFTimer+Private.h in Headers */,
				4B6C8ADE17BD5C2E00B194F2 /* OFZIPArchiveEntry+Private.h in Headers */,

				4B7DD58218942FE200990FD6 /* socket_helpers.h in Headers */,
				4BFC37BD1E50E11C00EE1269 /* common.h in Headers */,
			);
			runOnlyForDeploymentPostprocessing = 0;
		};
		4B5D70711DA2F87A00B3B2D7 /* Headers */ = {
			isa = PBXHeadersBuildPhase;
			buildActionMask = 2147483647;
			files = (

Added src/encodings/common.h version [98a0dea301].





























































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
/*
 * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017
 *   Jonathan Schleifer <js@heap.zone>
 *
 * 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.
 */

#define CASE_MISSING_IS_KEEP(nr)				\
	case nr:						\
		if OF_UNLIKELY ((c & 0xFF) < page##nr##Start) {	\
			output[i] = (unsigned char)c;		\
			continue;				\
		}						\
								\
		index = (c & 0xFF) - page##nr##Start;		\
								\
		if (index >= page##nr##Size) {			\
			output[i] = (unsigned char)c;		\
			continue;				\
		}						\
								\
		if (page##nr[index] == 0x00) {			\
			if (lossy) {				\
				output[i] = '?';		\
				continue;			\
			} else					\
				return false;			\
		}						\
								\
		output[i] = page##nr[index];			\
		break;
#define CASE_MISSING_IS_ERROR(nr)					\
	case nr:							\
		if OF_UNLIKELY ((c & 0xFF) < page##nr##Start) {		\
			if (lossy) {					\
				output[i] = '?';			\
				continue;				\
			} else						\
				return false;				\
		}							\
									\
		index = (c & 0xFF) - page##nr##Start;			\
									\
		if (index >= page##nr##Size || page##nr[index] == 0) {	\
			if (lossy) {					\
				output[i] = '?';			\
				continue;				\
			} else						\
				return false;				\
		}							\
									\
		output[i] = page##nr[index];				\
		break;

Modified src/encodings/iso_8859_2.m from [e1a92dbc8a] to [d558512e37].

13
14
15
16
17
18
19


20
21
22
23
24
25
26
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#include "config.h"

#import "OFString.h"



const of_char16_t of_iso_8859_2_table[] = {
	0x00A0, 0x0104, 0x02D8, 0x0141, 0x00A4, 0x013D, 0x015A, 0x00A7,
	0x00A8, 0x0160, 0x015E, 0x0164, 0x0179, 0x00AD, 0x017D, 0x017B,
	0x00B0, 0x0105, 0x02DB, 0x0142, 0x00B4, 0x013E, 0x015B, 0x02C7,
	0x00B8, 0x0161, 0x015F, 0x0165, 0x017A, 0x02DD, 0x017E, 0x017C,
	0x0154, 0x00C1, 0x00C2, 0x0102, 0x00C4, 0x0139, 0x0106, 0x00C7,







>
>







13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#include "config.h"

#import "OFString.h"

#import "common.h"

const of_char16_t of_iso_8859_2_table[] = {
	0x00A0, 0x0104, 0x02D8, 0x0141, 0x00A4, 0x013D, 0x015A, 0x00A7,
	0x00A8, 0x0160, 0x015E, 0x0164, 0x0179, 0x00AD, 0x017D, 0x017B,
	0x00B0, 0x0105, 0x02DB, 0x0142, 0x00B4, 0x013E, 0x015B, 0x02C7,
	0x00B8, 0x0161, 0x015F, 0x0165, 0x017A, 0x02DD, 0x017E, 0x017C,
	0x0154, 0x00C1, 0x00C2, 0x0102, 0x00C4, 0x0139, 0x0106, 0x00C7,
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
	0x00, 0xC1, 0xC2, 0x00, 0xC4, 0x00, 0x00, 0xC7,
	0x00, 0xC9, 0x00, 0xCB, 0x00, 0xCD, 0xCE, 0x00,
	0x00, 0x00, 0x00, 0xD3, 0xD4, 0x00, 0xD6, 0xD7,
	0x00, 0x00, 0xDA, 0x00, 0xDC, 0xDD, 0x00, 0xDF,
	0x00, 0xE1, 0xE2, 0x00, 0xE4, 0x00, 0x00, 0xE7,
	0x00, 0xE9, 0x00, 0xEB, 0x00, 0xED, 0xEE, 0x00,
	0x00, 0x00, 0x00, 0xF3, 0xF4, 0x00, 0xF6, 0xF7,
	0x00, 0x00, 0xFA, 0x00, 0xFC, 0xFD
};
static const uint8_t page0Start = 0xA0;
static const uint16_t page0Size = sizeof(page0) / sizeof(*page0);

static const char page1[] = {
	0xC3, 0xE3, 0xA1, 0xB1, 0xC6, 0xE6, 0x00, 0x00,
	0x00, 0x00, 0xC8, 0xE8, 0xCF, 0xEF, 0xD0, 0xF0,







|







45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
	0x00, 0xC1, 0xC2, 0x00, 0xC4, 0x00, 0x00, 0xC7,
	0x00, 0xC9, 0x00, 0xCB, 0x00, 0xCD, 0xCE, 0x00,
	0x00, 0x00, 0x00, 0xD3, 0xD4, 0x00, 0xD6, 0xD7,
	0x00, 0x00, 0xDA, 0x00, 0xDC, 0xDD, 0x00, 0xDF,
	0x00, 0xE1, 0xE2, 0x00, 0xE4, 0x00, 0x00, 0xE7,
	0x00, 0xE9, 0x00, 0xEB, 0x00, 0xED, 0xEE, 0x00,
	0x00, 0x00, 0x00, 0xF3, 0xF4, 0x00, 0xF6, 0xF7,
	0x00, 0x00, 0xFA, 0x00, 0xFC, 0xFD, 0x00, 0x00
};
static const uint8_t page0Start = 0xA0;
static const uint16_t page0Size = sizeof(page0) / sizeof(*page0);

static const char page1[] = {
	0xC3, 0xE3, 0xA1, 0xB1, 0xC6, 0xE6, 0x00, 0x00,
	0x00, 0x00, 0xC8, 0xE8, 0xCF, 0xEF, 0xD0, 0xF0,
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
151
152
153
					output[i] = '?';
					continue;
				} else
					return false;
			}

			switch (c >> 8) {
			case 0:
				if OF_UNLIKELY ((c & 0xFF) < page0Start) {
					output[i] = (unsigned char)c;
					continue;
				}

				index = (c & 0xFF) - page0Start;
				if (index >= page0Size || page0[index] == 0) {
					if (lossy) {
						output[i] = '?';
						continue;
					} else
						return false;
				}
				output[i] = page0[index];
				break;
			case 1:
				index = (c & 0xFF) - page1Start;
				if (index >= page1Size || page1[index] == 0) {
					if (lossy) {
						output[i] = '?';
						continue;
					} else
						return false;
				}
				output[i] = page1[index];
				break;
			case 2:
				index = (c & 0xFF) - page2Start;
				if (index >= page2Size || page2[index] == 0) {
					if (lossy) {
						output[i] = '?';
						continue;
					} else
						return false;
				}
				output[i] = page2[index];
				break;
			default:
				if (lossy) {
					output[i] = '?';
					continue;
				} else
					return false;
			}
		} else
			output[i] = (unsigned char)c;
	}

	return true;
}







|
|
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<













98
99
100
101
102
103
104
105
106



107
































108
109
110
111
112
113
114
115
116
117
118
119
120
					output[i] = '?';
					continue;
				} else
					return false;
			}

			switch (c >> 8) {
			CASE_MISSING_IS_KEEP(0)
			CASE_MISSING_IS_ERROR(1)



			CASE_MISSING_IS_ERROR(2)
































			default:
				if (lossy) {
					output[i] = '?';
					continue;
				} else
					return false;
			}
		} else
			output[i] = (unsigned char)c;
	}

	return true;
}

Modified src/encodings/iso_8859_3.m from [787209b806] to [50888e7412].

13
14
15
16
17
18
19


20
21
22
23
24
25
26
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#include "config.h"

#import "OFString.h"



const of_char16_t of_iso_8859_3_table[] = {
	0x00A0, 0x0126, 0x02D8, 0x00A3, 0x00A4, 0xFFFF, 0x0124, 0x00A7,
	0x00A8, 0x0130, 0x015E, 0x011E, 0x0134, 0x00AD, 0xFFFF, 0x017B,
	0x00B0, 0x0127, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x0125, 0x00B7,
	0x00B8, 0x0131, 0x015F, 0x011F, 0x0135, 0x00BD, 0xFFFF, 0x017C,
	0x00C0, 0x00C1, 0x00C2, 0xFFFF, 0x00C4, 0x010A, 0x0108, 0x00C7,







>
>







13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#include "config.h"

#import "OFString.h"

#import "common.h"

const of_char16_t of_iso_8859_3_table[] = {
	0x00A0, 0x0126, 0x02D8, 0x00A3, 0x00A4, 0xFFFF, 0x0124, 0x00A7,
	0x00A8, 0x0130, 0x015E, 0x011E, 0x0134, 0x00AD, 0xFFFF, 0x017B,
	0x00B0, 0x0127, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x0125, 0x00B7,
	0x00B8, 0x0131, 0x015F, 0x011F, 0x0135, 0x00BD, 0xFFFF, 0x017C,
	0x00C0, 0x00C1, 0x00C2, 0xFFFF, 0x00C4, 0x010A, 0x0108, 0x00C7,
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
					output[i] = '?';
					continue;
				} else
					return false;
			}

			switch (c >> 8) {
			case 0:
				if OF_UNLIKELY ((c & 0xFF) < page0Start) {
					output[i] = (unsigned char)c;
					continue;
				}

				index = (c & 0xFF) - page0Start;
				if (index >= page0Size || page0[index] == 0) {
					if (lossy) {
						output[i] = '?';
						continue;
					} else
						return false;
				}
				output[i] = page0[index];
				break;
			case 1:
				index = (c & 0xFF) - page1Start;
				if (index >= page1Size || page1[index] == 0) {
					if (lossy) {
						output[i] = '?';
						continue;
					} else
						return false;
				}
				output[i] = page1[index];
				break;
			case 2:
				index = (c & 0xFF) - page2Start;
				if (index >= page2Size || page2[index] == 0) {
					if (lossy) {
						output[i] = '?';
						continue;
					} else
						return false;
				}
				output[i] = page2[index];
				break;
			default:
				if (lossy) {
					output[i] = '?';
					continue;
				} else
					return false;
			}
		} else
			output[i] = (unsigned char)c;
	}

	return true;
}







|
|
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<













95
96
97
98
99
100
101
102
103



104
































105
106
107
108
109
110
111
112
113
114
115
116
117
					output[i] = '?';
					continue;
				} else
					return false;
			}

			switch (c >> 8) {
			CASE_MISSING_IS_KEEP(0)
			CASE_MISSING_IS_ERROR(1)



			CASE_MISSING_IS_ERROR(2)
































			default:
				if (lossy) {
					output[i] = '?';
					continue;
				} else
					return false;
			}
		} else
			output[i] = (unsigned char)c;
	}

	return true;
}