This is test.m in view mode; [Download] [Up]
#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];
}
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.