Check-in Number:
|
1549 | |
Date: |
2002-Jan-14 16:00:37 (local)
2002-Jan-14 15:00:37 (UTC) |
User: | thl |
Branch: | |
Comment: |
first cut for map library |
Tickets: |
|
Inspections: |
|
Files: |
|
ossp-pkg/lmtp2nntp/lmtp2nntp_map.c -> 1.1
*** /dev/null Sat Nov 23 01:06:47 2024
--- - Sat Nov 23 01:06:48 2024
***************
*** 0 ****
--- 1,21 ----
+
+ #include "lmtp2nntp_map.h"
+
+ enum {
+ VAR_INLINE = 1<<0,
+ };
+
+ typedef struct {
+ char *name;
+ var_type_t type;
+ union {
+ void *p;
+ char c;
+ short s;
+ int i;
+ long l;
+ float f;
+ double d;
+ } data;
+ } var_object_t;
+
|
|
ossp-pkg/lmtp2nntp/lmtp2nntp_map.h -> 1.1
*** /dev/null Sat Nov 23 01:06:47 2024
--- - Sat Nov 23 01:06:48 2024
***************
*** 0 ****
--- 1,17 ----
+
+ enum {
+ VAR_TYPE_PTR = 1<<1,
+ VAR_TYPE_CHAR = 1<<2,
+ VAR_TYPE_SHORT = 1<<3,
+ VAR_TYPE_INT = 1<<4,
+ VAR_TYPE_LONG = 1<<5,
+ VAR_TYPE_FLOAT = 1<<6,
+ VAR_TYPE_DOUBLE = 1<<7
+ };
+
+ var_rc_t var_create (var_t *var);
+ var_rc_t var_destroy (var_t *var);
+ var_rc_t var_reg (var_t *var, const char *name, int type, void *storage);
+ var_rc_t var_set (var_t *var, const char *name, ...);
+ var_rc_t var_get (var_t *var, const char *name, ...);
+
|
|