# HG changeset patch # User Michael Spacefalcon # Date 1398903798 0 # Node ID 6fe08feee018c77b5d1b6e29ce04fe2f07fb6894 # Parent df01a4f4c2726213ff596e3564667ba6c0a89d1b tiobjd disasm -g: line break after function locals diff -r df01a4f4c272 -r 6fe08feee018 leo-obj/tool/disasm.c --- a/leo-obj/tool/disasm.c Tue Apr 29 07:51:28 2014 +0000 +++ b/leo-obj/tool/disasm.c Thu May 01 00:23:18 2014 +0000 @@ -98,7 +98,8 @@ if (sym->class == C_FCN && !strcmp(sym->name, ".bf")) { printf("; Begin function\n"); if (disasm_richsym) - richsym_function_locals(sym); + if (richsym_function_locals(sym)) + putchar('\n'); return; } switch (sym->class) { diff -r df01a4f4c272 -r 6fe08feee018 leo-obj/tool/richsym.c --- a/leo-obj/tool/richsym.c Tue Apr 29 07:51:28 2014 +0000 +++ b/leo-obj/tool/richsym.c Thu May 01 00:23:18 2014 +0000 @@ -426,11 +426,10 @@ return(0); } -void richsym_function_locals(headsym) struct internal_syment *headsym; { - unsigned n; + unsigned n, count = 0; struct internal_syment *sym; char classbuf[8]; @@ -441,6 +440,7 @@ switch (sym->class) { case C_REG: case C_REGPARM: + count++; if (localsym_sanity_check(sym) < 0) continue; if (sym->value > 0xF) { @@ -457,6 +457,7 @@ continue; case C_ARG: case C_AUTO: + count++; if (localsym_sanity_check(sym) < 0) continue; printf("; %s at 0x%x: ", @@ -465,13 +466,15 @@ richsym_print_in_c("", sym, 0); continue; case C_FCN: - return; + return(count); default: + count++; printf( "; presumed local symbol #%u: unexpected class %s\n", sym->number, storage_class_to_string(sym->class, classbuf)); - return; + return(count); } } + return(count); }