create {hp300,i386,tahoe,vax}/include/ansi.h
[unix-history] / usr / src / old / whereis / whereis.c
index a88fb8b..5b36287 100644 (file)
@@ -1,18 +1,29 @@
 /*
 /*
- * Copyright (c) 1980 Regents of the University of California.
- * All rights reserved.  The Berkeley software License Agreement
- * specifies the terms and conditions for redistribution.
+ * Copyright (c) 1980, 1990 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms are permitted
+ * provided that the above copyright notice and this paragraph are
+ * duplicated in all such forms and that any documentation,
+ * advertising materials, and other materials related to such
+ * distribution and use acknowledge that the software was developed
+ * by the University of California, Berkeley.  The name of the
+ * University may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  */
 
 #ifndef lint
 char copyright[] =
  */
 
 #ifndef lint
 char copyright[] =
-"@(#) Copyright (c) 1980 Regents of the University of California.\n\
+"@(#) Copyright (c) 1980, 1990 The Regents of the University of California.\n\
  All rights reserved.\n";
  All rights reserved.\n";
-#endif not lint
+#endif /* not lint */
 
 #ifndef lint
 
 #ifndef lint
-static char sccsid[] = "@(#)whereis.c  5.1 (Berkeley) %G%";
-#endif not lint
+static char sccsid[] = "@(#)whereis.c  5.4 (Berkeley) %G%";
+#endif /* not lint */
 
 #include <sys/param.h>
 #include <sys/dir.h>
 
 #include <sys/param.h>
 #include <sys/dir.h>
@@ -20,6 +31,22 @@ static char sccsid[] = "@(#)whereis.c        5.1 (Berkeley) %G%";
 #include <ctype.h>
 
 static char *bindirs[] = {
 #include <ctype.h>
 
 static char *bindirs[] = {
+       "/bin",
+       "/sbin",
+       "/usr/ucb",
+       "/usr/bin",
+       "/usr/sbin",
+       "/usr/old",
+       "/usr/contrib",
+       "/usr/games",
+       "/usr/local",
+       "/usr/libexec",
+       "/usr/include",
+       "/usr/hosts",
+       "/usr/share", /*?*/
+       "/etc",
+#ifdef notdef
+       /* before reorg */
        "/etc",
        "/bin",
        "/usr/bin",
        "/etc",
        "/bin",
        "/usr/bin",
@@ -32,8 +59,10 @@ static char *bindirs[] = {
        "/usr/old",
        "/usr/hosts",
        "/usr/include",
        "/usr/old",
        "/usr/hosts",
        "/usr/include",
+#endif
        0
 };
        0
 };
+/* This needs to be redone - man pages live with sources */
 static char *mandirs[] = {
        "/usr/man/man1",
        "/usr/man/man2",
 static char *mandirs[] = {
        "/usr/man/man1",
        "/usr/man/man2",
@@ -49,6 +78,29 @@ static char *mandirs[] = {
        0
 };
 static char *srcdirs[]  = {
        0
 };
 static char *srcdirs[]  = {
+       "/usr/src/bin",
+       "/usr/src/sbin",
+       "/usr/src/etc",
+       "/usr/src/pgrm",
+       "/usr/src/usr.bin",
+       "/usr/src/usr.sbin",
+       "/usr/src/usr.ucb",
+       "/usr/src/usr.new",
+       "/usr/src/usr.lib",
+       "/usr/src/libexec",
+       "/usr/src/libdata",
+       "/usr/src/share",
+       "/usr/src/contrib",
+       "/usr/src/athena",
+       "/usr/src/devel",
+       "/usr/src/games",
+       "/usr/src/local",
+       "/usr/src/man",
+       "/usr/src/root",
+       "/usr/src/old",
+       "/usr/src/include",
+       /* still need libs */
+#ifdef notdef /* before reorg */
        "/usr/src/bin",
        "/usr/src/usr.bin",
        "/usr/src/etc",
        "/usr/src/bin",
        "/usr/src/usr.bin",
        "/usr/src/etc",
@@ -69,6 +121,7 @@ static char *srcdirs[]  = {
        "/usr/src/ucb/pascal",
        "/usr/src/ucb/pascal/utilities",
        "/usr/src/undoc",
        "/usr/src/ucb/pascal",
        "/usr/src/ucb/pascal/utilities",
        "/usr/src/undoc",
+#endif
        0
 };
 
        0
 };
 
@@ -143,6 +196,7 @@ usage:
                } else
                        lookup(*argv++);
        while (--argc > 0);
                } else
                        lookup(*argv++);
        while (--argc > 0);
+       exit(0);
 }
 
 getlist(argcp, argvp, flagp, cntp)
 }
 
 getlist(argcp, argvp, flagp, cntp)