Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
John McEleney
/
mailutils
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit
17628582
...
176285827a7f6c4dfedb2e71f3ff7549d013e4a8
authored
2007-12-02 10:29:21 +0000
by
Sergey Poznyakoff
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
(mu_cfg_print_tree): Remove
1 parent
fa44cbcb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
67 deletions
mailbox/cfg_parser.y
mailbox/cfg_parser.y
View file @
1762858
...
...
@@ -273,73 +273,6 @@ mu_cfg_parse (mu_cfg_tree_t **ptree,
static void
print_level (FILE *fp, int level)
{
while (level--)
{
fputc (' ', fp);
fputc (' ', fp);
}
}
struct tree_print
{
unsigned level;
FILE *fp;
};
int
print_node (const mu_cfg_node_t *node, void *data)
{
struct tree_print *tp = data;
print_level (tp->fp, tp->level);
switch (node->type)
{
case mu_cfg_node_undefined:
fprintf (tp->fp, _("<UNDEFINED>"));
break;
case mu_cfg_node_tag:
fprintf (tp->fp, "<%s", node->tag_name);
if (node->tag_label)
fprintf (tp->fp, " %s", node->tag_label);
fprintf (tp->fp, ">");
tp->level++;
break;
case mu_cfg_node_param:
fprintf (tp->fp, "%s", node->tag_name);
if (node->tag_label)
fprintf (tp->fp, " %s", node->tag_label);
break;
}
fprintf (tp->fp, "\n");
return MU_CFG_ITER_OK;
}
int
print_node_end (const mu_cfg_node_t *node, void *data)
{
struct tree_print *tp = data;
tp->level--;
print_level (tp->fp, tp->level);
fprintf (tp->fp, "</%s>\n", node->tag_name);
return MU_CFG_ITER_OK;
}
void
mu_cfg_print_tree (FILE *fp, mu_cfg_node_t *node)
{
struct tree_print t;
t.level = 0;
t.fp = fp;
mu_cfg_preorder (node, print_node, print_node_end, &t);
}
static int
_mu_cfg_preorder_recursive (mu_cfg_node_t *node,
mu_cfg_iter_func_t beg, mu_cfg_iter_func_t end,
...
...
Please
register
or
sign in
to post a comment