added "-type s" for sockets; fix pathname buffer size (from ralph)
authorKirk McKusick <mckusick@ucbvax.Berkeley.EDU>
Thu, 28 Jun 1984 01:45:47 +0000 (17:45 -0800)
committerKirk McKusick <mckusick@ucbvax.Berkeley.EDU>
Thu, 28 Jun 1984 01:45:47 +0000 (17:45 -0800)
SCCS-vsn: usr.bin/find/find.c 4.7.1.1

usr/src/usr.bin/find/find.c

index c3de45f..f65458f 100644 (file)
@@ -1,4 +1,4 @@
-static char *sccsid = "@(#)find.c      4.9 (Berkeley) %G%";
+static char *sccsid = "@(#)find.c      4.7.1.1 (Berkeley) %G%";
 
 #include <stdio.h>
 #include <sys/param.h>
 
 #include <stdio.h>
 #include <sys/param.h>
@@ -8,7 +8,7 @@ static char *sccsid = "@(#)find.c       4.9 (Berkeley) %G%";
 #define EQ(x, y)       (strcmp(x, y)==0)
 
 int    Randlast;
 #define EQ(x, y)       (strcmp(x, y)==0)
 
 int    Randlast;
-char   Pathname[200];
+char   Pathname[MAXPATHLEN+1];
 
 struct anode {
        int (*F)();
 
 struct anode {
        int (*F)();
@@ -240,6 +240,7 @@ struct anode *e3() { /* parse parens and predicates */
                    s=='c' ? S_IFCHR :
                    s=='f' ? S_IFREG :
                    s=='l' ? S_IFLNK :
                    s=='c' ? S_IFCHR :
                    s=='f' ? S_IFREG :
                    s=='l' ? S_IFLNK :
+                   s=='s' ? S_IFSOCK :
                    0;
                return(mk(type, (struct anode *)i, (struct anode *)0));
        }
                    0;
                return(mk(type, (struct anode *)i, (struct anode *)0));
        }