CtdlGetConfigInt() and CtdlGetConfigLong() converted from macros to functions because...
[citadel.git] / citadel / config.c
index ed7a06914918d3afbdda4699a508e955e3af2103..f41533c5b13b858f27bf70d4f929c38211a76319 100644 (file)
@@ -437,6 +437,26 @@ char *CtdlGetConfigStr(char *key)
 }
 
 
+/*
+ * Fetch a system config value - integer
+ */
+int CtdlGetConfigInt(char *key)
+{
+       char *s = CtdlGetConfigStr(key);
+       if (s) return atoi(s);
+       return 0;
+}
+
+
+/*
+ * Fetch a system config value - long integer
+ */
+long CtdlGetConfigLong(char *key)
+{
+       char *s = CtdlGetConfigStr(key);
+       if (s) return atol(s);
+       return 0;
+}