mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-11 15:51:36 +00:00
55 lines
1.1 KiB
Objective-C
55 lines
1.1 KiB
Objective-C
#ifndef Dict_h
|
|
#define Dict_h
|
|
|
|
#include <AppKit/AppKit.h>
|
|
|
|
#include "Storage.h"
|
|
|
|
typedef struct {
|
|
char *key;
|
|
char *value;
|
|
} dict_t;
|
|
|
|
@interface Dict:Storage
|
|
{
|
|
}
|
|
|
|
-initFromFile:(FILE *) fp;
|
|
|
|
-(id) parseMultipleFrom:(char *) value;
|
|
-(int) getValueUnits:(char *) key;
|
|
-delString:(char *)string fromValue:(char *) key;
|
|
|
|
-addString:(char *)string toValue:(char *) key;
|
|
|
|
-(char *) convertListToString:(id) list;
|
|
-(char *) getStringFor:(char *) name;
|
|
-removeKeyword:(char *) key;
|
|
-(unsigned int) getValueFor:(char *) name;
|
|
-changeStringFor:(char *)key to:(char *) value;
|
|
|
|
-(dict_t *) findKeyword:(char *) key;
|
|
|
|
-writeBlockTo:(FILE *) fp;
|
|
-writeFile:(char *) path;
|
|
|
|
// INTERNAL
|
|
-init;
|
|
-(id) parseBraceBlock:(FILE *) fp;
|
|
-setupMultiple:(char *) value;
|
|
-(char *) getNextParameter;
|
|
|
|
@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
|