ObjFW  Check-in [541aab7a03]

Overview
Comment:-[pathComponents]: Include drive in 1st component
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 541aab7a039e4569285a03cca1629f30d50d524652d10395892a2a431c269309
User & Date: js on 2016-07-03 19:38:35
Other Links: manifest | tags
Context
2016-07-03
22:40
Add support for hardlinks and symlinks on Windows check-in: 768b31dede user: js tags: trunk
19:38
-[pathComponents]: Include drive in 1st component check-in: 541aab7a03 user: js tags: trunk
19:04
Update buildsys check-in: 6f47d47ae6 user: js tags: trunk
Changes

Modified src/OFString.m from [63687acf9a] to [e8667bc529].

1987
1988
1989
1990
1991
1992
1993











1994
1995
1996
1997
1998
1999
2000
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011







+
+
+
+
+
+
+
+
+
+
+







			    of_range(last, i - last)]];

			last = i + 1;
		}
	}

	[ret addObject: [self substringWithRange: of_range(last, i - last)]];

#ifdef OF_WINDOWS
	if ([ret count] >= 2 && [[ret objectAtIndex: 0] hasSuffix: @":"]) {
		OFString *first = [[ret objectAtIndex: 0]
		    stringByAppendingPathComponent: [ret objectAtIndex: 1]];

		[ret removeObjectAtIndex: 0];
		[ret replaceObjectAtIndex: 0
			       withObject: first];
	}
#endif

	[ret makeImmutable];

	objc_autoreleasePoolPop(pool);

	return ret;
}

Modified src/OFString_UTF8.m from [f214cc2fb6] to [32973681cc].

1108
1109
1110
1111
1112
1113
1114











1115
1116
1117
1118
1119
1120
1121
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132







+
+
+
+
+
+
+
+
+
+
+







						    length: i - last]];
			last = i + 1;
		}
	}

	[ret addObject: [OFString stringWithUTF8String: _s->cString + last
						length: i - last]];

#ifdef OF_WINDOWS
	if ([ret count] >= 2 && [[ret objectAtIndex: 0] hasSuffix: @":"]) {
		OFString *first = [[ret objectAtIndex: 0]
		    stringByAppendingPathComponent: [ret objectAtIndex: 1]];

		[ret removeObjectAtIndex: 0];
		[ret replaceObjectAtIndex: 0
			       withObject: first];
	}
#endif

	[ret makeImmutable];

	objc_autoreleasePoolPop(pool);

	return ret;
}