=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/nm/nm.c,v retrieving revision 1.24 retrieving revision 1.25 diff -u -r1.24 -r1.25 --- src/usr.bin/nm/nm.c 2004/04/29 13:34:37 1.24 +++ src/usr.bin/nm/nm.c 2004/05/04 23:09:07 1.25 @@ -1,4 +1,4 @@ -/* $OpenBSD: nm.c,v 1.24 2004/04/29 13:34:37 miod Exp $ */ +/* $OpenBSD: nm.c,v 1.25 2004/05/04 23:09:07 deraadt Exp $ */ /* $NetBSD: nm.c,v 1.7 1996/01/14 23:04:03 pk Exp $ */ /* @@ -42,7 +42,7 @@ #if 0 static const char sccsid[] = "@(#)nm.c 8.1 (Berkeley) 6/6/93"; #endif -static const char rcsid[] = "$OpenBSD: nm.c,v 1.24 2004/04/29 13:34:37 miod Exp $"; +static const char rcsid[] = "$OpenBSD: nm.c,v 1.25 2004/05/04 23:09:07 deraadt Exp $"; #include #include @@ -115,7 +115,7 @@ int process_file(int, const char *); int show_archive(int, const char *, FILE *); int show_file(int, int, const char *, FILE *fp, off_t, union hdr *); -void print_symbol(const char *, struct nlist *, int); +void print_symbol(const char *, struct nlist *, int); int elf_symload(const char *, FILE *, off_t, Elf_Ehdr *, Elf_Shdr *); #define OPTSTRING_NM "aABCegnoprsuvVw" @@ -249,7 +249,7 @@ int retval; size_t bytes; char magic[SARMAG]; - + if (!(fp = fopen(fname, "r"))) { warn("cannot read %s", fname); return(1); @@ -257,7 +257,7 @@ if (!issize && count > 1) (void)printf("\n%s:\n", fname); - + /* * first check whether this is an object file - read a object * header, and skip back to the beginning @@ -322,7 +322,7 @@ */ if ((arh->ar_name[0] == '#') && (arh->ar_name[1] == '1') && - (arh->ar_name[2] == '/') && + (arh->ar_name[2] == '/') && (isdigit(arh->ar_name[3]))) { int len = atoi(&arh->ar_name[3]); @@ -607,7 +607,7 @@ rval |= show_file(2, non_object_warning, name, fp, foff, &exec_head); /* * skip to next archive object - it starts at the next - * even byte boundary + * even byte boundary */ #define even(x) (((x) + 1) & ~1) skip: if (fseeko(fp, last_ar_off + even(mmbrlen), SEEK_SET)) { @@ -959,14 +959,14 @@ free(snames); return (1); } - + return (0); } char * symname(struct nlist *sym) { - if (demangle && sym->n_un.n_name[0] == '_') + if (demangle && sym->n_un.n_name[0] == '_') return sym->n_un.n_name + 1; else return sym->n_un.n_name; @@ -988,9 +988,9 @@ */ if (!print_only_undefined_symbols) { /* print symbol's value */ - if (SYMBOL_TYPE(sym->n_type) == N_UNDF || - (show_extensions && SYMBOL_TYPE(sym->n_type) == N_INDR && - sym->n_value == 0)) + if (SYMBOL_TYPE(sym->n_type) == N_UNDF || + (show_extensions && SYMBOL_TYPE(sym->n_type) == N_INDR && + sym->n_value == 0)) (void)printf(" "); else (void)printf("%08lx", sym->n_value);