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;
}
|
|