OSSP CVS Repository

ossp - Difference in ossp-pkg/cfg/cfg.h versions 1.15 and 1.16
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [History

ossp-pkg/cfg/cfg.h 1.15 -> 1.16

--- cfg.h        2004/11/20 14:52:56     1.15
+++ cfg.h        2004/12/04 12:48:40     1.16
@@ -63,21 +63,27 @@
 } cfg_node_type_t;
 
 /* list of node attributes */
-typedef enum {
-    CFG_NODE_ATTR_PARENT,     /* RW: (cfg_node_t *)    pointer to parent node */
-    CFG_NODE_ATTR_LBROTH,     /* RW: (cfg_node_t *)    pointer to left brother node */
-    CFG_NODE_ATTR_RBROTH,     /* RW: (cfg_node_t *)    pointer to right brother node */
-    CFG_NODE_ATTR_CHILD1,     /* RW: (cfg_node_t *)    pointer to first child node */
-    CFG_NODE_ATTR_CHILDL,     /* RO: (cfg_node_t *)    pointer to last child */
-    CFG_NODE_ATTR_CHILDS,     /* RO: (int)             number of child nodes */
-    CFG_NODE_ATTR_NODES,      /* RO: (int)             number of total nodes (recursive) */
-    CFG_NODE_ATTR_DEPTH,      /* RO: (int)             number of nodes back to root node */
-    CFG_NODE_ATTR_SRCNAME,    /* RW: (char *)          pointer to the source name */
-    CFG_NODE_ATTR_SRCPOS,     /* RW: (int)             position offset into source */
-    CFG_NODE_ATTR_TYPE,       /* RW: (cfg_node_type_t) type of node */
-    CFG_NODE_ATTR_TOKEN,      /* RW: (char *)          pointer to the node token string */
-    CFG_NODE_ATTR_DATA        /* RW: (cfg_data_t *)    pointer to the node annotation data */
-} cfg_node_attr_t;
+typedef int cfg_node_attr_t;
+enum {
+    /* attribute selection */
+    CFG_NODE_ATTR_PARENT  = (1 <<  0), /* RW: (cfg_node_t *)    pointer to parent node */
+    CFG_NODE_ATTR_LBROTH  = (1 <<  1), /* RW: (cfg_node_t *)    pointer to left brother node */
+    CFG_NODE_ATTR_RBROTH  = (1 <<  2), /* RW: (cfg_node_t *)    pointer to right brother node */
+    CFG_NODE_ATTR_CHILD1  = (1 <<  3), /* RW: (cfg_node_t *)    pointer to first child node */
+    CFG_NODE_ATTR_CHILDL  = (1 <<  4), /* RO: (cfg_node_t *)    pointer to last child */
+    CFG_NODE_ATTR_CHILDS  = (1 <<  5), /* RO: (int)             number of child nodes */
+    CFG_NODE_ATTR_NODES   = (1 <<  6), /* RO: (int)             number of total nodes (recursive) */
+    CFG_NODE_ATTR_DEPTH   = (1 <<  7), /* RO: (int)             number of nodes back to root node */
+    CFG_NODE_ATTR_SRCNAME = (1 <<  8), /* RW: (char *)          pointer to the source name */
+    CFG_NODE_ATTR_SRCPOS  = (1 <<  9), /* RW: (int)             position offset into source */
+    CFG_NODE_ATTR_TYPE    = (1 << 10), /* RW: (cfg_node_type_t) type of node */
+    CFG_NODE_ATTR_TOKEN   = (1 << 11), /* RW: (char *)          pointer to the node token string */
+    CFG_NODE_ATTR_DATA    = (1 << 12), /* RW: (cfg_data_t *)    pointer to the node annotation data */
+    /* attribute passing semantics */
+    CFG_ATTR_LOAN         = (1 << 13), /* loan attribute on set/get: source still owns orginal data */
+    CFG_ATTR_GIFT         = (1 << 14), /* gift attribute on set/get: target then  owns orginal data */
+    CFG_ATTR_COPY         = (1 << 15)  /* copy attribute on set/get: target then  owns copied  data */
+};
 
 /* list of data types */
 typedef enum {

CVSTrac 2.0.1