#include #include #include #include void WritePrivateProfileString(char *INIsection, char *INIkey, char *INIvalue, char *INIpath); void GetPrivateProfileString(char *INIsection, char *INIkey, char *INIdefault, char *INIbuffer, int INIbuflen, char *INIpath); #ifndef Boolean_T_defined #define Boolean_T_defined #undef ERROR #undef FALSE #undef TRUE typedef enum {ERROR = -1,FALSE, TRUE} Boolean_T; #endif #ifndef TAG_TYPE_defined #define TAG_TYPE_defined typedef enum { Error_Tag, Byte_Tag, Boolean_Tag, Word_Tag, DWord_Tag, OctWord_Tag, DOctWord_Tag, HexWord_Tag, DHexWord_Tag, Float_Tag, Double_Tag, String_Tag, Function_Tag } TAG_TYPE; #endif struct Config_Tag { char *code; /* Option switch */ TAG_TYPE type; /* Type of option */ void *buf; /* Storage location */ int size_buf; // size of buf }; #if HAVE_CONFIG_H # include #endif #include #include #if defined (STDC_HEADERS) || (!defined (isascii) && !defined (HAVE_ISASCII)) # define IN_CTYPE_DOMAIN(Char) 1 #else # define IN_CTYPE_DOMAIN(Char) isascii(Char) #endif #define ISLOWER(Char) (IN_CTYPE_DOMAIN (Char) && islower (Char)) #if _LIBC || STDC_HEADERS # define TOUPPER(Char) toupper (Char) #else # define TOUPPER(Char) (ISLOWER (Char) ? toupper (Char) : (Char)) #endif int memcasecmp (const void *vs1, const void *vs2, size_t n); int input_config(char *, struct Config_Tag *, char *); int update_config(char *, struct Config_Tag *, char *);