mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-30 08:00:51 +00:00
97e8ab7f3a
It does make for cleaner could, though it would have been nice if NSData was null terminated :P
40 lines
889 B
Objective-C
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
|