quakeforge/tools/Forge/Bundles/MapEdit/Dict.h
Bill Currie 97e8ab7f3a A bunch more NSString and NSFileManager usage.
It does make for cleaner could, though it would have been nice if NSData
was null terminated :P
2010-12-26 22:33:04 +09:00

40 lines
889 B
Objective-C

#ifndef Dict_h
#define Dict_h
#include <AppKit/AppKit.h>
#include "Storage.h"
struct script_s;
@interface Dict: NSObject
{
struct plitem_s *plist;
}
- (id) initFromData: (NSData *)data;
- (int) getValueUnits: (const char *)key;
- (struct plitem_s *) getArrayFor: (const char *)name;
- (const char *) getStringFor: (const char *)name;
- (unsigned int) getValueFor: (const char *)name;
- (id) changeStringFor: (const char *)key to: (const char *)value;
- (id) writeBlockTo: (FILE *)fp;
- (id) writeFile: (const char *)path;
@end
int GetNextChar (FILE * fp);
void CopyUntilWhitespc (FILE * fp, char *buffer);
void CopyUntilQuote (FILE * fp, char *buffer);
int FindBrace (FILE * fp);
int FindQuote (FILE * fp);
int FindWhitespc (FILE * fp);
int FindNonwhitespc (FILE * fp);
char *FindWhitespcInBuffer (char *buffer);
char *FindNonwhitespcInBuffer (char *buffer);
#endif // Dict_h