Last change
on this file since 1473 was 1397, checked in by cs025, 24 years ago |
Initial revision
|
-
Property svn:keywords
set to
Author Date Id Revision
|
File size:
654 bytes
|
Rev | Line | |
---|
[1397] | 1 | #ifndef _CONFIG_H_
|
---|
| 2 | #define _CONFIG_H_
|
---|
| 3 | #include <stdio.h>
|
---|
| 4 | #include <string.h>
|
---|
| 5 |
|
---|
| 6 | #include <windows.h>
|
---|
| 7 |
|
---|
| 8 | typedef struct
|
---|
| 9 | { char label[32];
|
---|
| 10 | char data[64];
|
---|
| 11 | } config_item;
|
---|
| 12 |
|
---|
| 13 | typedef struct
|
---|
| 14 | { int count;
|
---|
| 15 | config_item item[1];
|
---|
| 16 | } config_str;
|
---|
| 17 |
|
---|
| 18 | class configureFile
|
---|
| 19 | {
|
---|
| 20 | private:
|
---|
| 21 | config_str * configstr;
|
---|
| 22 | bool valid;
|
---|
| 23 |
|
---|
| 24 | bool scan(char *buffer, unsigned int &pos);
|
---|
| 25 | public:
|
---|
| 26 | configureFile(char *name);
|
---|
| 27 | char *filename(char *base);
|
---|
| 28 | bool put(char *label, char *value);
|
---|
| 29 | bool concat(char *label, char *buffer, unsigned int &space);
|
---|
| 30 | void get(char *label, char **to);
|
---|
| 31 | bool store(char *);
|
---|
| 32 | bool isValid();
|
---|
| 33 | ~configureFile();
|
---|
| 34 | };
|
---|
| 35 | #endif
|
---|
Note:
See
TracBrowser
for help on using the repository browser.