Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-2]: src/usr.bin/find Revert changes. I accidently committed to ne...



details:   https://anonhg.NetBSD.org/src/rev/bdf72aa6e167
branches:  netbsd-2
changeset: 564089:bdf72aa6e167
user:      reed <reed%NetBSD.org@localhost>
date:      Tue Oct 11 23:47:05 2005 +0000

description:
Revert changes. I accidently committed to netbsd-2.

diffstat:

 usr.bin/find/extern.h   |   3 +--
 usr.bin/find/find.1     |  12 +-----------
 usr.bin/find/find.c     |  10 +++++-----
 usr.bin/find/find.h     |   6 ++----
 usr.bin/find/function.c |  42 ++----------------------------------------
 usr.bin/find/option.c   |   5 ++---
 6 files changed, 13 insertions(+), 65 deletions(-)

diffs (211 lines):

diff -r 885c39b425f2 -r bdf72aa6e167 usr.bin/find/extern.h
--- a/usr.bin/find/extern.h     Tue Oct 11 22:56:27 2005 +0000
+++ b/usr.bin/find/extern.h     Tue Oct 11 23:47:05 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: extern.h,v 1.20.4.1 2005/10/11 22:56:27 reed Exp $     */
+/*     $NetBSD: extern.h,v 1.20.4.2 2005/10/11 23:47:05 reed Exp $     */
 
 /*-
  * Copyright (c) 1991, 1993, 1994
@@ -58,7 +58,6 @@
 PLAN   *c_execdir __P((char ***, int));
 PLAN   *c_flags __P((char ***, int));
 PLAN   *c_follow __P((char ***, int));
-PLAN   *c_fprint __P((char ***, int));
 PLAN   *c_fstype __P((char ***, int));
 PLAN   *c_group __P((char ***, int));
 PLAN   *c_iname __P((char ***, int));
diff -r 885c39b425f2 -r bdf72aa6e167 usr.bin/find/find.1
--- a/usr.bin/find/find.1       Tue Oct 11 22:56:27 2005 +0000
+++ b/usr.bin/find/find.1       Tue Oct 11 23:47:05 2005 +0000
@@ -1,4 +1,4 @@
-.\"    $NetBSD: find.1,v 1.47.2.1.2.1 2005/10/11 22:56:27 reed Exp $
+.\"    $NetBSD: find.1,v 1.47.2.1.2.2 2005/10/11 23:47:05 reed Exp $
 .\"
 .\" Copyright (c) 1990, 1993
 .\"    The Regents of the University of California.  All rights reserved.
@@ -259,15 +259,6 @@
 for more information about file flags.)
 .It Ic -follow
 Follow symbolic links.
-.It Ic -fprint Ar filename
-This primary always evaluates to true.
-This creates
-.Ar filename
-or overwrites the file if it already exists.
-The file is created at startup.
-It writes the pathname of the current file to this file, followed
-by a newline character.
-The file will be empty if no files are matched.
 .It Ic -fstype Ar type
 True if the file is contained in a file system of type
 .Ar type .
@@ -444,7 +435,6 @@
 by a newline character.
 If none of
 .Ic -exec ,
-.Ic -fprint ,
 .Ic -ls ,
 .Ic -ok ,
 .Ic -print0 ,
diff -r 885c39b425f2 -r bdf72aa6e167 usr.bin/find/find.c
--- a/usr.bin/find/find.c       Tue Oct 11 22:56:27 2005 +0000
+++ b/usr.bin/find/find.c       Tue Oct 11 23:47:05 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: find.c,v 1.18.2.1.2.1 2005/10/11 22:56:27 reed Exp $   */
+/*     $NetBSD: find.c,v 1.18.2.1.2.2 2005/10/11 23:47:05 reed Exp $   */
 
 /*-
  * Copyright (c) 1991, 1993, 1994
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "from: @(#)find.c       8.5 (Berkeley) 8/5/94";
 #else
-__RCSID("$NetBSD: find.c,v 1.18.2.1.2.1 2005/10/11 22:56:27 reed Exp $");
+__RCSID("$NetBSD: find.c,v 1.18.2.1.2.2 2005/10/11 23:47:05 reed Exp $");
 #endif
 #endif /* not lint */
 
@@ -98,9 +98,9 @@
        }
 
        /*
-        * if the user didn't specify one of -print, -ok, -fprint, or -exec,
-        * then -print is assumed so we bracket the current expression with
-        * parens, if necessary, and add a -print node on the end.
+        * if the user didn't specify one of -print, -ok or -exec, then -print
+        * is assumed so we bracket the current expression with parens, if
+        * necessary, and add a -print node on the end.
         */
        if (!isoutput) {
                if (plan == NULL) {
diff -r 885c39b425f2 -r bdf72aa6e167 usr.bin/find/find.h
--- a/usr.bin/find/find.h       Tue Oct 11 22:56:27 2005 +0000
+++ b/usr.bin/find/find.h       Tue Oct 11 23:47:05 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: find.h,v 1.18.4.1 2005/10/11 22:56:27 reed Exp $       */
+/*     $NetBSD: find.h,v 1.18.4.2 2005/10/11 23:47:05 reed Exp $       */
 
 /*-
  * Copyright (c) 1990, 1993
@@ -41,7 +41,7 @@
        N_AND = 1,                              /* must start > 0 */
        N_AMIN, N_ANEWER, N_ATIME, N_CLOSEPAREN, N_CMIN, N_CNEWER, N_CTIME,
        N_DEPTH, N_EMPTY,
-       N_EXEC, N_EXECDIR, N_EXPR, N_FLAGS, N_FOLLOW, N_FPRINT, N_FSTYPE, N_GROUP,
+       N_EXEC, N_EXECDIR, N_EXPR, N_FLAGS, N_FOLLOW, N_FSTYPE, N_GROUP,
        N_INAME, N_INUM, N_IREGEX, N_LINKS, N_LS, N_MINDEPTH, N_MAXDEPTH,
        N_MMIN, N_MTIME, N_NAME, N_NEWER, N_NOGROUP, N_NOT, N_NOUSER, N_OK,
        N_OPENPAREN, N_OR, N_PATH, N_PERM, N_PRINT, N_PRINT0, N_PRINTX,
@@ -83,7 +83,6 @@
                int _max_data;                  /* tree depth */
                int _min_data;                  /* tree depth */
                regex_t _regexp_data;           /* compiled regexp */
-               FILE *_fprint_file;             /* file stream for -fprint */
        } p_un;
 } PLAN;
 #define        a_data          p_un._a_data
@@ -104,7 +103,6 @@
 #define        max_data        p_un._max_data
 #define        min_data        p_un._min_data
 #define        regexp_data     p_un._regexp_data
-#define        fprint_file     p_un._fprint_file
 
 typedef struct _option {
        char *name;                     /* option name */
diff -r 885c39b425f2 -r bdf72aa6e167 usr.bin/find/function.c
--- a/usr.bin/find/function.c   Tue Oct 11 22:56:27 2005 +0000
+++ b/usr.bin/find/function.c   Tue Oct 11 23:47:05 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: function.c,v 1.46.4.1 2005/10/11 22:56:27 reed Exp $   */
+/*     $NetBSD: function.c,v 1.46.4.2 2005/10/11 23:47:05 reed Exp $   */
 
 /*-
  * Copyright (c) 1990, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "from: @(#)function.c   8.10 (Berkeley) 5/4/95";
 #else
-__RCSID("$NetBSD: function.c,v 1.46.4.1 2005/10/11 22:56:27 reed Exp $");
+__RCSID("$NetBSD: function.c,v 1.46.4.2 2005/10/11 23:47:05 reed Exp $");
 #endif
 #endif /* not lint */
 
@@ -88,7 +88,6 @@
        int     f_exec __P((PLAN *, FTSENT *));
        int     f_execdir __P((PLAN *, FTSENT *));
        int     f_flags __P((PLAN *, FTSENT *));
-       int     f_fprint __P((PLAN *, FTSENT *));
        int     f_fstype __P((PLAN *, FTSENT *));
        int     f_group __P((PLAN *, FTSENT *));
        int     f_iname __P((PLAN *, FTSENT *));
@@ -709,43 +708,6 @@
        return (palloc(N_FOLLOW, f_always_true));
 }
  
-/* -fprint functions --
- *
- *     Causes the current pathame to be written to the defined output file.
- */
-int
-f_fprint(plan, entry)
-       PLAN *plan;
-       FTSENT *entry;
-{
-
-       if (-1 == fprintf(plan->fprint_file, "%s\n", entry->fts_path))
-               warn("fprintf");
-
-       return(1);
-
-       /* no descriptors are closed; they will be closed by
-          operating system when this find command exits.  */
-}
- 
-PLAN *
-c_fprint(argvp, isok)
-       char ***argvp;
-       int isok;
-{
-       PLAN *new;
-
-       isoutput = 1; /* do not assume -print */
-
-       new = palloc(N_FPRINT, f_fprint);
-
-       if (NULL == (new->fprint_file = fopen(**argvp, "w")))
-               err(1, "-fprint: %s: cannot create file", **argvp);
-
-       (*argvp)++;
-       return (new);
-}
-
 /*
  * -fstype functions --
  *
diff -r 885c39b425f2 -r bdf72aa6e167 usr.bin/find/option.c
--- a/usr.bin/find/option.c     Tue Oct 11 22:56:27 2005 +0000
+++ b/usr.bin/find/option.c     Tue Oct 11 23:47:05 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: option.c,v 1.20.4.1 2005/10/11 22:56:27 reed Exp $     */
+/*     $NetBSD: option.c,v 1.20.4.2 2005/10/11 23:47:05 reed Exp $     */
 
 /*-
  * Copyright (c) 1990, 1993, 1994
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "from: @(#)option.c     8.2 (Berkeley) 4/16/94";
 #else
-__RCSID("$NetBSD: option.c,v 1.20.4.1 2005/10/11 22:56:27 reed Exp $");
+__RCSID("$NetBSD: option.c,v 1.20.4.2 2005/10/11 23:47:05 reed Exp $");
 #endif
 #endif /* not lint */
 
@@ -74,7 +74,6 @@
        { "-execdir",   N_EXECDIR,      c_execdir,      1 },
        { "-flags",     N_FLAGS,        c_flags,        1 },
        { "-follow",    N_FOLLOW,       c_follow,       0 },
-       { "-fprint",    N_FPRINT,       c_fprint,       1 },
        { "-fstype",    N_FSTYPE,       c_fstype,       1 },
        { "-group",     N_GROUP,        c_group,        1 },
        { "-iname",     N_INAME,        c_iname,        1 },



Home | Main Index | Thread Index | Old Index