diff options
| author | Charles.Forsyth <devnull@localhost> | 2008-06-29 20:58:08 +0000 |
|---|---|---|
| committer | Charles.Forsyth <devnull@localhost> | 2008-06-29 20:58:08 +0000 |
| commit | fb67f84de5f6afd71842d1609df0f26d4c16f798 (patch) | |
| tree | b94ab80d2cfb895eb5503ff9d7e62505f414d349 /utils/libmach | |
| parent | 4256b754997ba49aec62efd600003cb84f453c8a (diff) | |
20080629-2157
Diffstat (limited to 'utils/libmach')
| -rw-r--r-- | utils/libmach/sym.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/utils/libmach/sym.c b/utils/libmach/sym.c index d9ffe63f..476e5e3d 100644 --- a/utils/libmach/sym.c +++ b/utils/libmach/sym.c @@ -43,7 +43,7 @@ static int debug = 0; static Sym **autos; /* Base of auto variables */ static File *files; /* Base of file arena */ -static int fmaxp; /* largest file path index */ +static int fpmax; /* largest file path index */ static Sym **fnames; /* file names path component table */ static Sym **globals; /* globals by addr table */ static Hist *hist; /* base of history stack */ @@ -144,8 +144,8 @@ syminit(int fd, Fhdr *fp) p->type = 'm'; nauto++; } - else if(p->value > fmaxp) - fmaxp = p->value; /* highest path index */ + else if(p->value > fpmax) + fpmax = p->value; /* highest path index */ break; case 'a': case 'p': @@ -164,7 +164,7 @@ syminit(int fd, Fhdr *fp) } } if (debug) - fprint(2,"NG: %ld NT: %ld NF: %d\n", nglob, ntxt, fmaxp); + fprint(2,"NG: %ld NT: %ld NF: %d\n", nglob, ntxt, fpmax); if (fp->sppcsz) { /* pc-sp offset table */ spoff = (uchar *)malloc(fp->sppcsz); if(spoff == 0) { @@ -285,7 +285,7 @@ cleansyms(void) if(fnames) free(fnames); fnames = 0; - fmaxp = 0; + fpmax = 0; if(files) free(files); @@ -373,13 +373,13 @@ buildtbls(void) return 0; } } - fmaxp++; - fnames = malloc(fmaxp*sizeof(*fnames)); + fpmax++; + fnames = malloc(fpmax*sizeof(*fnames)); if (!fnames) { werrstr("can't malloc file name table"); return 0; } - memset(fnames, 0, fmaxp*sizeof(*fnames)); + memset(fnames, 0, fpmax*sizeof(*fnames)); files = malloc(nfiles*sizeof(*files)); if(!files) { werrstr("can't malloc file table"); @@ -858,7 +858,7 @@ pathcomp(char *s, int n) { int i; - for(i = 0; i <= fmaxp; i++) + for(i = 0; i <= fpmax; i++) if(fnames[i] && strncmp(s, fnames[i]->name, n) == 0 && fnames[i]->name[n] == 0) return i; return -1; |
