Differences From Artifact [cca222946b]:
- File src/OFString.m — part of check-in [6e19bd47ee] at 2013-11-23 01:27:40 on branch trunk — Add OF_UNRECOGNIZED_SELECTOR. (user: js, size: 55747) [annotate] [blame] [check-ins using]
To Artifact [95256ec388]:
- File
src/OFString.m
— part of check-in
[a0b63a8df4]
at
2013-12-01 02:08:43
on branch trunk
— Port to DOS/DJGPP.
The port was much easier than expected. The only changes that were
required were defining the missing lrint() and useconds_t, the rest was
optional (like using backslashes for paths, even though slashes work
fine). (user: js, size: 55950) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
1973 1974 1975 1976 1977 1978 1979 | if (length == 0) return ret; pool = objc_autoreleasePoolPush(); characters = [self characters]; | | | | 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 | if (length == 0) return ret; pool = objc_autoreleasePoolPush(); characters = [self characters]; #if !defined(_WIN32) && !defined(__DJGPP__) if (characters[length - 1] == OF_PATH_DELIMITER) #else if (characters[length - 1] == '/' || characters[length - 1] == '\\') #endif length--; for (i = 0; i < length; i++) { #if !defined(_WIN32) && !defined(__DJGPP__) if (characters[i] == OF_PATH_DELIMITER) { #else if (characters[i] == '/' || characters[i] == '\\') { #endif [ret addObject: [self substringWithRange: of_range(last, i - last)]]; |
︙ | ︙ | |||
2016 2017 2018 2019 2020 2021 2022 | if (length == 0) return @""; pool = objc_autoreleasePoolPush(); characters = [self characters]; | | | | 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 | if (length == 0) return @""; pool = objc_autoreleasePoolPush(); characters = [self characters]; #if !defined(_WIN32) && !defined(__DJGPP__) if (characters[length - 1] == OF_PATH_DELIMITER) #else if (characters[length - 1] == '/' || characters[length - 1] == '\\') #endif length--; for (i = length - 1; i >= 0; i--) { #if !defined(_WIN32) && !defined(__DJGPP__) if (characters[i] == OF_PATH_DELIMITER) { #else if (characters[i] == '/' || characters[i] == '\\') { #endif i++; break; } |
︙ | ︙ | |||
2079 2080 2081 2082 2083 2084 2085 | if (length == 0) return @""; pool = objc_autoreleasePoolPush(); characters = [self characters]; | | | | | 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 | if (length == 0) return @""; pool = objc_autoreleasePoolPush(); characters = [self characters]; #if !defined(_WIN32) && !defined(__DJGPP__) if (characters[length - 1] == OF_PATH_DELIMITER) #else if (characters[length - 1] == '/' || characters[length - 1] == '\\') #endif length--; if (length == 0) { objc_autoreleasePoolPop(pool); return [self substringWithRange: of_range(0, 1)]; } for (i = length - 1; i >= 1; i--) { #if !defined(_WIN32) && !defined(__DJGPP__) if (characters[i] == OF_PATH_DELIMITER) { #else if (characters[i] == '/' || characters[i] == '\\') { #endif objc_autoreleasePoolPop(pool); return [self substringWithRange: of_range(0, i)]; } } #if !defined(_WIN32) && !defined(__DJGPP__) if (characters[0] == OF_PATH_DELIMITER) { #else if (characters[0] == '/' || characters[0] == '\\') { #endif objc_autoreleasePoolPop(pool); return [self substringWithRange: of_range(0, 1)]; } |
︙ | ︙ |