libs-base/Testing/nxst.m
Richard Frith-Macdonald db7b22a4fb Tidy up use of white space so we have it after if/for/while and not after (
or before ) or padding at end of line.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@20773 72102866-910b-0410-8b05-ffd578937521
2005-02-22 11:22:44 +00:00

31 lines
680 B
Objective-C

/* Test NXStringTable class. */
#include <objc/NXStringTable.h>
#include <stdio.h>
int
main(int argc, char *argv[])
{
id table;
int i, times;
if (argc < 2) {
fprintf(stderr, "Usage: table_test filename repeat\n");
fprintf(stderr, " filename is a stringtable format file.\n");
fprintf(stderr, " repeat is a number of times to loop\n");
exit(1);
}
if (argc == 3)
times = atoi(argv[2]);
else
times = 1;
table = [[NXStringTable alloc] init];
for (i=0; i < times; i++) {
[table readFromFile:argv[1]];
printf("-----------------------------------------\n");
[table writeToStream:stdout];
}
return 0;
}