diff --git a/Testing/coder.m b/Testing/coder.m index 709188b2b..3153e4181 100644 --- a/Testing/coder.m +++ b/Testing/coder.m @@ -1,4 +1,6 @@ /* A demonstration of writing and reading GNU Objective C objects to a file. */ +// Fri Oct 23 03:01:09 MET DST 1998 dave@turbocat.de +// cStringNoCopy -> cString #include #include @@ -70,14 +72,14 @@ int main(int argc, char *argv[]) /* Read in the Array */ [archiver decodeObjectAt: &array withName: &name]; if (name) - printf ("got object named %s\n", [name cStringNoCopy]); + printf ("got object named %s\n", [name cString]); else printf ("got object named (unnamed)\n"); /* Read in the Dictionary */ [archiver decodeObjectAt: &dictionary withName: &name]; if (name) - printf ("got object named %s\n", [name cStringNoCopy]); + printf ("got object named %s\n", [name cString]); else printf ("got object named (unnamed)\n"); diff --git a/Testing/nsarchiver.m b/Testing/nsarchiver.m index 9f3b06e0e..bcf1b7ab1 100644 --- a/Testing/nsarchiver.m +++ b/Testing/nsarchiver.m @@ -1,4 +1,6 @@ /* A demonstration of writing and reading with NSArchiver */ +// Fri Oct 23 03:02:04 MET DST 1998 dave@turbocat.de +// cStringNoCopy -> cString #if 1 @@ -30,7 +32,7 @@ int main() { id o, e = [set objectEnumerator]; while ((o = [e nextObject])) - printf("%s\n", [o cStringNoCopy]); + printf("%s\n", [o cString]); } apl = [[NSAutoreleasePool alloc] init]; @@ -68,7 +70,7 @@ printf("%u\n", [arc retainCount]); { id o, e = [set objectEnumerator]; while ((o = [e nextObject])) - printf("%s\n", [o cStringNoCopy]); + printf("%s\n", [o cString]); } /* Do the autorelease. */ diff --git a/Testing/nshost.m b/Testing/nshost.m index 437ac273f..a8c501b95 100644 --- a/Testing/nshost.m +++ b/Testing/nshost.m @@ -1,3 +1,6 @@ +// Fri Oct 23 03:02:52 MET DST 1998 dave@turbocat.de +// cStringNoCopy -> cString + #include #include #include @@ -12,10 +15,10 @@ displayHost(NSHost* h) printf("\n"); a = [h names]; for (i = 0; i < [a count]; i++) - printf("%s\n", [[a objectAtIndex:i] cStringNoCopy]); + printf("%s\n", [[a objectAtIndex:i] cString]); a = [h addresses]; for (i = 0; i < [a count]; i++) - printf("%s\n", [[a objectAtIndex:i] cStringNoCopy]); + printf("%s\n", [[a objectAtIndex:i] cString]); } int diff --git a/Testing/string.m b/Testing/string.m index 63f998a4d..300e806bd 100644 --- a/Testing/string.m +++ b/Testing/string.m @@ -1,5 +1,8 @@ #include +// Fri Oct 23 02:58:47 MET DST 1998 dave@turbocat.de +// cStringNoCopy -> cString + /* For demo of Strings as Collections of char's. */ #include #include @@ -7,7 +10,7 @@ void print_string(NSString* s) { - printf("The string [%s], length %d\n", [s cStringNoCopy], [s length]); + printf("The string [%s], length %d\n", [s cString], [s length]); } #include