configure.ac: don't add -L /usr/local
[rofl0r-gnuboy.git] / rc.h
blob904779e95c63d166efd0559b54367ed3333512eb
4 #ifndef __RC_H__
5 #define __RC_H__
9 typedef enum rctype
11 rcv_end,
12 rcv_int,
13 rcv_string,
14 rcv_vector,
15 rcv_bool
16 } rcvtype_t;
19 typedef struct rcvar_s
21 char *name;
22 int type;
23 int len;
24 void *mem;
25 } rcvar_t;
27 #define RCV_END { 0, rcv_end, 0, 0 }
28 #define RCV_INT(n,v) { (n), rcv_int, 1, (v) }
29 #define RCV_STRING(n,v) { (n), rcv_string, 0, (v) }
30 #define RCV_VECTOR(n,v,l) { (n), rcv_vector, (l), (v) }
31 #define RCV_BOOL(n,v) { (n), rcv_bool, 1, (v) }
33 typedef struct rccmd_s
35 char *name;
36 int (*func)(int, char **);
37 } rccmd_t;
39 #define RCC(n,f) { (n), (f) }
40 #define RCC_END { 0, 0 }
42 void rc_export(rcvar_t *v);
43 void rc_exportvars(rcvar_t *vars);
45 int rc_findvar(char *name);
47 int rc_setvar_n(int i, int c, char **v);
48 int rc_setvar(char *name, int c, char **v);
50 int rc_getint_n(int i);
51 int *rc_getvec_n(int i);
52 char *rc_getstr_n(int i);
54 int rc_getint(char *name);
55 int *rc_getvec(char *name);
56 char *rc_getstr(char *name);
58 int rc_command(char *line);
59 int rc_sourcefile(char *filename);
61 #endif