(no message)
[unix-history] / usr / src / usr.bin / nm / nm.c
index faf5e6e..0732694 100644 (file)
@@ -1,15 +1,16 @@
-static char sccsid[] = "@(#)nm.c 3.1 %G%";
+#ifndef lint
+static char sccsid[] = "@(#)nm.c 4.4 %G%";
+#endif
 /*
  * nm - print name list; VAX string table version
  */
 #include <sys/types.h>
 /*
  * nm - print name list; VAX string table version
  */
 #include <sys/types.h>
-#include <newar.h>
+#include <ar.h>
 #include <stdio.h>
 #include <ctype.h>
 #include <stdio.h>
 #include <ctype.h>
-#include <newa.out.h>
+#include <a.out.h>
 #include <stab.h>
 #include <stab.h>
-#include <pagsiz.h>
-#include <stat.h>
+#include <sys/stat.h>
 
 #define        SELECT  archive ? archdr.ar_name : *xargv
 
 
 #define        SELECT  archive ? archdr.ar_name : *xargv
 
@@ -132,7 +133,7 @@ namelist()
                        continue;
                }
                if (N_STROFF(mag_un.mag_exp) + sizeof (off_t) >
                        continue;
                }
                if (N_STROFF(mag_un.mag_exp) + sizeof (off_t) >
-                   stb.st_size)
+                   (archive ? off : stb.st_size))
                        error(1, "old format .o (no string table) or truncated file");
                i = 0;
                if (strp)
                        error(1, "old format .o (no string table) or truncated file");
                i = 0;
                if (strp)
@@ -325,6 +326,7 @@ struct      stabnames {
        N_ECOMM, "ECOMM",
        N_ECOML, "ECOML",
        N_LENG, "LENG",
        N_ECOMM, "ECOMM",
        N_ECOML, "ECOML",
        N_LENG, "LENG",
+       N_PC, "PC",
        0, 0
 };
 
        0, 0
 };