mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
(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:
parent
cdba60bcb0
commit
d3a426f865
2 changed files with 7 additions and 4 deletions
|
@ -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];
|
||||
|
|
|
@ -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"];
|
||||
|
|
Loading…
Reference in a new issue