OSSP CVS Repository

ossp - Check-in [2246]
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Patchset]  [Tagging/Branching

Check-in Number: 2246
Date: 2002-Jul-05 19:21:40 (local)
2002-Jul-05 17:21:40 (UTC)
User:rse
Branch:
Comment: remove top-level implicit indentation and sequence braces
Tickets:
Inspections:
Files:
ossp-pkg/cfg/cfg_syn.c      1.6 -> 1.7     11 inserted, 1 deleted

ossp-pkg/cfg/cfg_syn.c 1.6 -> 1.7

--- cfg_syn.c    2002/07/05 17:15:14     1.6
+++ cfg_syn.c    2002/07/05 17:21:40     1.7
@@ -270,11 +270,21 @@
         return CFG_ERR_ARG;
     if ((rc = cfg_buf_create(&buf)) != CFG_OK)
         return rc;
+
     ctx.buf    = buf;
     ctx.indent = 0;
-    export_node(&ctx, node);
+
+    /* first SEQ node is special, so expand it manually instead
+       of just calling once export_node(&ctx, node); */
+    cfg_node_goto(node, CFG_NODE_GOTO_CHILD1, &node);
+    while (node != NULL) {
+        export_node(&ctx, node);
+        cfg_node_goto(node, CFG_NODE_GOTO_RBROTH, &node);
+    }
+
     cfg_buf_content(buf, output, NULL, NULL);
     cfg_buf_destroy(buf);
+
     return CFG_OK;
 }
 

CVSTrac 2.0.1