version 1.10, 2001/02/18 21:45:09 |
version 1.11, 2001/05/31 16:28:51 |
|
|
#define IS_EXTERNAL(x) ((x) & N_EXT) |
#define IS_EXTERNAL(x) ((x) & N_EXT) |
#define SYMBOL_TYPE(x) ((x) & (N_TYPE | N_STAB)) |
#define SYMBOL_TYPE(x) ((x) & (N_TYPE | N_STAB)) |
|
|
void *emalloc(), *erealloc(); |
void *emalloc __P((size_t)); |
|
void pipe2cppfilt __P((void)); |
|
void usage __P((void)); |
|
|
void pipe2cppfilt(); |
|
|
|
/* |
/* |
* main() |
* main() |
* parse command line, execute process_file() for each file |
* parse command line, execute process_file() for each file |
|
|
int len = atoi(&ar_head.ar_name[3]); |
int len = atoi(&ar_head.ar_name[3]); |
if (len > namelen) { |
if (len > namelen) { |
p -= (long)name; |
p -= (long)name; |
name = (char *)erealloc(name, baselen+len); |
if ((name = realloc(name, baselen+len)) == NULL) |
|
err(1, NULL); |
namelen = len; |
namelen = len; |
p += (long)name; |
p += (long)name; |
} |
} |
|
|
if (p = malloc(size)) |
if (p = malloc(size)) |
return(p); |
return(p); |
err(1, NULL); |
err(1, NULL); |
exit(1); |
|
} |
} |
|
|
void * |
|
erealloc(p, size) |
|
void *p; |
|
size_t size; |
|
{ |
|
/* NOSTRICT */ |
|
if (p = realloc(p, size)) |
|
return(p); |
|
err(1, NULL); |
|
exit(1); |
|
} |
|
|
|
#define CPPFILT "/usr/bin/c++filt" |
#define CPPFILT "/usr/bin/c++filt" |
|
|
void |
void |
|
|
} |
} |
} |
} |
|
|
|
void |
usage() |
usage() |
{ |
{ |
(void)fprintf(stderr, "usage: nm [-aCgnopruw] [file ...]\n"); |
(void)fprintf(stderr, "usage: nm [-aCgnopruw] [file ...]\n"); |