aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/output.c8
-rw-r--r--src/parser.c9
2 files changed, 12 insertions, 5 deletions
diff --git a/src/output.c b/src/output.c
index 7eaf7ac..41634a4 100644
--- a/src/output.c
+++ b/src/output.c
@@ -401,10 +401,10 @@ tree_output()
if (all_functions) {
for (i = 0; i < num; i++) {
- if (symbols[i]->callee == NULL)
- continue;
- direct_tree(0, 0, symbols[i]);
- separator();
+ if (symbols[i]->source) {
+ direct_tree(0, 0, symbols[i]);
+ separator();
+ }
}
}
}
diff --git a/src/parser.c b/src/parser.c
index e2c5f62..2b173c2 100644
--- a/src/parser.c
+++ b/src/parser.c
@@ -406,6 +406,12 @@ undo_save_stack()
save_end = -1;
}
+int
+save_stack_is_empty()
+{
+ return save_end <= 0;
+}
+
char *
finish_save_stack(char *name)
{
@@ -1146,7 +1152,8 @@ declare(Ident *ident, int maybe_knr)
&& (!maybe_knr || get_knr_args(ident) == 0)
&& !(tok.type == LBRACE || tok.type == LBRACE0 || tok.type == TYPE
|| tok.type == PARM_WRAPPER))
- || (ident->parmcnt < 0 && ident->storage == ExplicitExternStorage)) {
+ || (ident->parmcnt < 0 && ident->storage == ExplicitExternStorage)
+ || save_stack_is_empty()) {
undo_save_stack();
/* add_external()?? */
return;

Return to:

Send suggestions and report system problems to the System administrator.