Initial move to common config code directory
[tpg/opendispense2.git] / src / server / common.h
index 8a80497..1bdca84 100644 (file)
 #define        DEFAULT_ITEM_FILE       "/etc/opendispense/items.cfg"
 
 // === HELPER MACROS ===
-#define _EXPSTR(x)     #x
-#define EXPSTR(x)      _EXPSTR(x)
 
-#define UNUSED(var)    unused__##var __attribute__((__unused__))
-
-#define ASSERT(cnd) do{if(!(cnd)){fprintf(stderr, "ASSERT failed at "__FILE__":"EXPSTR(__LINE__)" - "EXPSTR(cnd)"\n");exit(-1);}}while(0)
+#define UNUSED(var)    unused__##var __attribute__((__unused__))
 
 // === STRUCTURES ===
 typedef struct sItem   tItem;
@@ -103,12 +99,4 @@ extern void Log_Info(const char *Format, ...);
 #define Debug_Notice(msg, v...)        fprintf(stderr, "%08llun: "msg"\n", (unsigned long long)time(NULL) ,##v)
 #define Debug_Debug(msg, v...) fprintf(stderr, "%08llud: "msg"\n", (unsigned long long)time(NULL) ,##v)
 
-// --- Config Database ---
-extern void    Config_ParseFile(const char *Filename);
-extern void    Config_AddValue(const char *Key, const char *Value);
-extern int     Config_GetValueCount(const char *KeyName);
-extern const char      *Config_GetValue(const char *KeyName, int Index);
-extern int     Config_GetValue_Bool(const char *KeyName, int Index);
-extern int     Config_GetValue_Int(const char *KeyName, int Index);
-
 #endif

UCC git Repository :: git.ucc.asn.au