home *** CD-ROM | disk | FTP | other *** search
- #include <libc.h>
- #import <Foundation/Foundation.h>
- #include "Variable.h"
-
- void main(int argc, char** argv)
- {
- NSArray* variables;
- NSString* fileContents;
- NSAutoreleasePool* pool = [NSAutoreleasePool new];
-
- if (argc < 2) {
- printf ("usage: %s filename\n", argv[0]);
- exit(1);
- }
-
- fileContents = [NSString stringWithContentsOfFile:
- [NSString stringWithCString:argv[1]]];
- if (!fileContents) {
- NSLog (@"file %s does not exist!", argv[1]);
- exit (1);
- }
-
- variables = [Variable variablesFromDescription:fileContents];
- NSLog (@"variables =\n%@", variables);
- [pool release];
- }
-
-