lib/mbselib.h

changeset 7
d74b26b2f217
child 8
e584bc0177df
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lib/mbselib.h	Wed Apr 23 14:25:09 2014 +0200
@@ -0,0 +1,43 @@
+#ifndef	_MBSELIB_H
+#define	_MBSELIB_H
+
+#include "../config.h"
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <ctype.h>
+#include <sys/types.h>
+
+#define TRUE 1
+#define FALSE 0
+
+/* rdconfig.c */
+#define S(x) (x)?(x):"(null)"
+
+typedef struct _key_list {
+    char	*key;
+    int		(*prc)(char **);
+    char	**dest;
+} key_list;
+
+
+typedef struct _sys_config {
+    char	*name;			/* Configuration name		*/
+    char	*mosq_server;		/* mosquitto server hostname	*/
+    int		mosq_port;		/* mosquitto server port	*/
+} sys_config;
+
+
+void killconfig(void);
+int  rdconfig(char *);
+int  wrconfig(char *);
+
+
+/* xutil.c */
+char *xmalloc(size_t);
+char *xstrcpy(char *);
+char *xstrcat(char *, char *);
+
+#endif
+

mercurial