From d640876b5715372b73e619edba1fffe955065983 Mon Sep 17 00:00:00 2001 From: sam Date: Wed, 17 Sep 2003 02:26:57 +0000 Subject: [PATCH] * Typos and coding style. git-svn-id: svn://svn.zoy.org/elk/trunk@160 55e467fa-43c5-0310-a8a2-de718669efc6 --- src/loadlib.c | 2 +- src/stab-vanilla.c | 25 ++++++++++++++----------- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/src/loadlib.c b/src/loadlib.c index fed863b..583b4c6 100644 --- a/src/loadlib.c +++ b/src/loadlib.c @@ -1,4 +1,4 @@ -/* load-dl.c +/* loadlib.c * * $Id$ * diff --git a/src/stab-vanilla.c b/src/stab-vanilla.c index ec8d346..be0bbc0 100644 --- a/src/stab-vanilla.c +++ b/src/stab-vanilla.c @@ -51,24 +51,26 @@ SYMTAB *Snarf_Symbols (FILE *f) { tab->strings = 0; nextp = &tab->first; - while (start != end || !feof(f)) { + while (start != end || !feof (f)) { if (i == end) { /* If we filled our buffer without finding a string, we set * start = end so that the buffer is completely emptied */ - if(start == 0 && end != 0) + if (start == 0 && end != 0) start = end; /* Fill our buffer some more */ - memmove(buffer, buffer + start, end - start); + memmove (buffer, buffer + start, end - start); end -= start; start = 0; - i = fread(buffer + end, 1, BUFSIZ - end, f); - if(i == 0) break; + i = fread (buffer + end, 1, BUFSIZ - end, f); + if (i == 0) + break; end += i; } for (i = start; i < end; i++) - if(buffer[i] >= 0x20 && buffer[i] < 0x80) break; + if (buffer[i] >= 0x20 && buffer[i] < 0x80) + break; if (i == end) continue; @@ -76,19 +78,20 @@ SYMTAB *Snarf_Symbols (FILE *f) { start = i; for (i = start + 1; i < end; i++) - if(buffer[i] == 0) break; + if (buffer[i] == 0) + break; if (i == end) continue; /* If this string contains INIT_PREFIX or FINIT_PREFIX, it's * potentially a valid symbol. */ - if (strstr(buffer + start, INIT_PREFIX) - || strstr(buffer + start, FINIT_PREFIX)) { + if (strstr (buffer + start, INIT_PREFIX) + || strstr (buffer + start, FINIT_PREFIX)) { sp = tab->first; - while(sp) { - if(!strcmp(sp->name, buffer + start)) { + while (sp) { + if (!strcmp (sp->name, buffer + start)) { /* We have already seen this symbol; abort */ goto next_string; }