Differences From 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]
To Artifact [0e48ad1696]:
- File src/OFString.m — part of check-in [00dbb47969] at 2013-12-01 11:50:57 on branch trunk — Clean up the path delimiter mess. (user: js, size: 55129) [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 | if (length == 0) return ret; pool = objc_autoreleasePoolPush(); characters = [self characters]; if (OF_IS_PATH_DELIMITER(characters[length - 1])) length--; for (i = 0; i < length; i++) { if (OF_IS_PATH_DELIMITER(characters[i])) { [ret addObject: [self substringWithRange: of_range(last, i - last)]]; last = i + 1; } } |
︙ | ︙ | |||
2016 2017 2018 2019 2020 2021 2022 | if (length == 0) return @""; pool = objc_autoreleasePoolPush(); characters = [self characters]; | < | < < < < | < < < | 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 | if (length == 0) return @""; pool = objc_autoreleasePoolPush(); characters = [self characters]; if (OF_IS_PATH_DELIMITER(characters[length - 1])) length--; for (i = length - 1; i >= 0; i--) { if (OF_IS_PATH_DELIMITER(characters[i])) { i++; break; } } objc_autoreleasePoolPop(pool); |
︙ | ︙ | |||
2079 2080 2081 2082 2083 2084 2085 | if (length == 0) return @""; pool = objc_autoreleasePoolPush(); characters = [self characters]; | < | < < < < | < < < < | < < < | 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 | if (length == 0) return @""; pool = objc_autoreleasePoolPush(); characters = [self characters]; if (OF_IS_PATH_DELIMITER(characters[length - 1])) length--; if (length == 0) { objc_autoreleasePoolPop(pool); return [self substringWithRange: of_range(0, 1)]; } for (i = length - 1; i >= 1; i--) { if (OF_IS_PATH_DELIMITER(characters[i])) { objc_autoreleasePoolPop(pool); return [self substringWithRange: of_range(0, i)]; } } if (OF_IS_PATH_DELIMITER(characters[0])) { objc_autoreleasePoolPop(pool); return [self substringWithRange: of_range(0, 1)]; } objc_autoreleasePoolPop(pool); return OF_PATH_CURRENT_DIRECTORY; |
︙ | ︙ |