diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2005-03-19 21:15:33 +0000 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2005-03-19 21:15:33 +0000 |
commit | 1ec31cd5bda832c52483c9a3a513383d577fde50 (patch) | |
tree | 67b30d418dff2f0d8c2e392fbbf18109fbc44957 | |
parent | 167179bec5c9d017aa837c3bde3a934141ad417b (diff) | |
download | cflow-1ec31cd5bda832c52483c9a3a513383d577fde50.tar.gz cflow-1ec31cd5bda832c52483c9a3a513383d577fde50.tar.bz2 |
(print_symbol,gnu_output_handler): Return int
-rw-r--r-- | src/gnu.c | 26 |
1 files changed, 14 insertions, 12 deletions
@@ -52,26 +52,27 @@ print_function_name(Symbol *sym, int has_subtree) } -static void +static int print_symbol(FILE *outfile, int line, struct output_symbol *s) { - if (s->direct) { + int has_subtree = s->direct ? + s->sym->v.func.callee != NULL : + s->sym->v.func.caller != NULL; + print_level(s->level, s->last); - print_function_name(s->sym, s->sym->v.func.callee != NULL); + print_function_name(s->sym, has_subtree); if (brief_listing) { - if (s->sym->expand_line) + if (s->sym->expand_line) { fprintf(outfile, " [see %d]", s->sym->expand_line); - else if (s->sym->v.func.callee) + return 1; + } else if (s->sym->v.func.callee) s->sym->expand_line = line; } - } else { - print_level(s->level, s->last); - print_function_name(s->sym, s->sym->v.func.caller != NULL); - } + return 0; } -void +int gnu_output_handler(cflow_output_command cmd, FILE *outfile, int line, void *data, void *handler_data) @@ -85,9 +86,10 @@ gnu_output_handler(cflow_output_command cmd, fprintf(outfile, "\n"); break; case cflow_output_text: - fprintf(outfile, "%s\n", data); + fprintf(outfile, "%s\n", (char*) data); break; case cflow_output_symbol: - print_symbol(outfile, line, data); + return print_symbol(outfile, line, data); } + return 0; } |