(main): Use new coding scheme and @"" strings properly.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@871 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
mccallum 1996-01-27 00:53:47 +00:00
parent cdba60bcb0
commit d3a426f865
2 changed files with 7 additions and 4 deletions

View file

@ -16,16 +16,16 @@ int main()
char *cp = NULL;
stream = [[StdioStream alloc]
initWithFilename:"./stdio-stream.txt"
initWithFilename: @"./stdio-stream.txt"
fmode:"w"];
[stream writeFormat:"testing %d %u %f %f 0x%x \"cow\"\n",
[stream writeFormat: @"testing %d %u %f %f 0x%x \"cow\"\n",
1234, 55, 3.14159, 1.23456789, 0xfeedface];
[stream release];
stream = [[StdioStream alloc]
initWithFilename:"./stdio-stream.txt"
initWithFilename: @"./stdio-stream.txt"
fmode:"r"];
count = [stream readFormat:"testing %d %u %f %lf 0x%x \"%a[^\"]\"\n",
count = [stream readFormat: @"testing %d %u %f %lf 0x%x \"%a[^\"]\"\n",
&i, &u, &f, &d, &ux, &cp];
uc = (unsigned char) ux;
[stream release];

View file

@ -47,6 +47,9 @@ int main()
/* Write them to a file */
/* Create an instances of the Coder class, specify that we
want human-readable "Text"-style, instead of "Binary"-style
coding. */
coder = [[Coder alloc] initForWritingToFile: @"./textcoding.txt"
withCStreamClass: [TextCStream class]];
[coder encodeObject:set withName:@"Test Set"];