summaryrefslogtreecommitdiffhomepage
path: root/ir/libcore
diff options
context:
space:
mode:
authorChristoph Mallon <mallon@cs.uni-saarland.de>2015-07-13 19:46:59 +0200
committerChristoph Mallon <mallon@cs.uni-saarland.de>2015-07-13 20:31:41 +0200
commit1d47cb16a60eba4c5e2338bf32b64ebe13eb1c90 (patch)
treedffadc3ca6a05c30b40cee2ee26a474a1e3682b2 /ir/libcore
parent0572654541159d8e65bb43d672b4b93b1b5dc041 (diff)
Remove the unused function lc_opt_print_tree().
Diffstat (limited to 'ir/libcore')
-rw-r--r--ir/libcore/lc_opts.c40
-rw-r--r--ir/libcore/lc_opts.h2
2 files changed, 0 insertions, 42 deletions
diff --git a/ir/libcore/lc_opts.c b/ir/libcore/lc_opts.c
index 64a993c..b907ad6 100644
--- a/ir/libcore/lc_opts.c
+++ b/ir/libcore/lc_opts.c
@@ -521,46 +521,6 @@ void lc_opt_print_help_for_entry(lc_opt_entry_t *ent, char separator, FILE *f)
lc_opt_print_help_rec(ent, separator, ent, f);
}
-static void indent(FILE *f, int n)
-{
- for (int i = 0; i < n; ++i)
- fputc(' ', f);
-}
-
-static void lc_opt_print_tree_lc_opt_indent(lc_opt_entry_t *ent, FILE *f, int level)
-{
- char buf[256];
- lc_opt_special_t *s = lc_get_opt_special(ent);
-
- indent(f, level);
- fprintf(f, "%c%s(\"%s\"):%s = %s\n", s->is_set ? '+' : '-', ent->name,
- ent->desc, lc_opt_get_type_name(ent),
- lc_opt_value_to_string(buf, sizeof(buf), ent));
-}
-
-static void lc_opt_print_tree_grp_indent(lc_opt_entry_t *ent, FILE *f, int level)
-{
- if (!ent->is_grp)
- return;
-
- lc_grp_special_t *s = lc_get_grp_special(ent);
- indent(f, level);
- fprintf(f, "/%s\n", ent->name);
-
- list_for_each_entry(lc_opt_entry_t, e, &s->grps, list) {
- lc_opt_print_tree_grp_indent(e, f, level + 2);
- }
-
- list_for_each_entry(lc_opt_entry_t, e, &s->opts, list) {
- lc_opt_print_tree_lc_opt_indent(e, f, level + 2);
- }
-}
-
-void lc_opt_print_tree(lc_opt_entry_t *ent, FILE *f)
-{
- lc_opt_print_tree_grp_indent(ent, f, 0);
-}
-
int lc_opt_from_single_arg(const lc_opt_entry_t *root, const char *arg)
{
const lc_opt_entry_t *grp = root;
diff --git a/ir/libcore/lc_opts.h b/ir/libcore/lc_opts.h
index d5545bf..abd5ee6 100644
--- a/ir/libcore/lc_opts.h
+++ b/ir/libcore/lc_opts.h
@@ -202,8 +202,6 @@ void lc_opt_print_help(lc_opt_entry_t *ent, FILE *f);
*/
void lc_opt_print_help_for_entry(lc_opt_entry_t *ent, char separator, FILE *f);
-void lc_opt_print_tree(lc_opt_entry_t *ent, FILE *f);
-
bool lc_opt_add_table(lc_opt_entry_t *grp, const lc_opt_table_entry_t *table);
/**