From f11bae100c6f5388deb1d43dd82e1b07ea79eae6 Mon Sep 17 00:00:00 2001
From: James Youngman <jay@gnu.org>
Date: Sun, 27 Dec 2015 20:32:28 +0000
Subject: [PATCH 2/3] Rename find/find.c to find/oldfind.c.
To: findutils-patches@gnu.org

* find/Makefile.am (oldfind_SOURCES): rename find.c to oldfind.c.
* find/.gitignore: Likewise.
* po/POTFILES.in: rename find/find.c to find/oldfind.c
* find/defs.h: Change references to find.c to oldfind.c.
* doc/find-maint.texi (Factor Out Repeated Code): Likewise.
* find/ftsfind.c: Point out that this file is derived from
oldfind.c (instead of leaving a reference to the old name of the
renamed file).
---
 doc/find-maint.texi        |  2 +-
 find/.gitignore            |  2 +-
 find/Makefile.am           |  2 +-
 find/defs.h                | 10 +++++-----
 find/ftsfind.c             |  2 +-
 find/{find.c => oldfind.c} |  0
 po/POTFILES.in             |  2 +-
 7 files changed, 10 insertions(+), 10 deletions(-)
 rename find/{find.c => oldfind.c} (100%)

diff --git a/doc/find-maint.texi b/doc/find-maint.texi
index 5f6a5a7..a6c65b8 100644
--- a/doc/find-maint.texi
+++ b/doc/find-maint.texi
@@ -366,7 +366,7 @@ context of the now duplicated code.
 A good example of the use of refactoring in findutils is the
 @code{collect_arg} function in @file{find/parser.c}.  A less clear-cut
 but larger example is the factoring out of code which would otherwise
-have been duplicated between @file{find/find.c} and
+have been duplicated between @file{find/oldfind.c} and
 @code{find/ftsfind.c}.
 
 The findutils test suite is comprehensive enough that refactoring code
diff --git a/find/.gitignore b/find/.gitignore
index 109831c..095f9c2 100644
--- a/find/.gitignore
+++ b/find/.gitignore
@@ -5,7 +5,7 @@ find
 oldfind
 *~
 finddata.o
-find.o
+oldfind.o
 fstype.o
 ftsfind.o
 parser.o
diff --git a/find/Makefile.am b/find/Makefile.am
index 67cfdfe..c9207e9 100644
--- a/find/Makefile.am
+++ b/find/Makefile.am
@@ -11,7 +11,7 @@ libfindtools_a_SOURCES = finddata.c fstype.c parser.c pred.c exec.c tree.c util.
 bin_PROGRAMS     = find
 noinst_PROGRAMS = oldfind
 find_SOURCES     = ftsfind.c
-oldfind_SOURCES  = find.c
+oldfind_SOURCES  = oldfind.c
 man_MANS         = find.1
 
 EXTRA_DIST = defs.h sharefile.h print.h $(man_MANS)
diff --git a/find/defs.h b/find/defs.h
index caccd2b..ba0b855 100644
--- a/find/defs.h
+++ b/find/defs.h
@@ -146,7 +146,7 @@ struct perm_val
   mode_t val[2];
 };
 
-/* dir_id is used to support loop detection in find.c
+/* dir_id is used to support loop detection in oldfind.c
  */
 struct dir_id
 {
@@ -334,14 +334,14 @@ struct predicate
   const struct parser_table* parser_entry;
 };
 
-/* find.c, ftsfind.c */
+/* oldfind.c, ftsfind.c */
 bool is_fts_enabled(int *ftsoptions);
 
 /* find library function declarations.  */
 
 /* find global function declarations.  */
 
-/* find.c */
+/* oldfind.c */
 /* SymlinkOption represents the choice of
  * -P, -L or -P (default) on the command line.
  */
@@ -351,7 +351,7 @@ enum SymlinkOption
     SYMLINK_ALWAYS_DEREF,	/* Option -L */
     SYMLINK_DEREF_ARGSONLY	/* Option -H */
   };
-extern enum SymlinkOption symlink_handling; /* defined in find.c. */
+extern enum SymlinkOption symlink_handling; /* defined in oldfind.c. */
 
 void set_follow_state (enum SymlinkOption opt);
 void cleanup(void);
@@ -515,7 +515,7 @@ bool apply_predicate(const char *pathname, struct stat *stat_buf, struct predica
 #define pred_is(node, fn) ( ((node)->pred_func) == (fn) )
 
 
-/* find.c. */
+/* oldfind.c. */
 int get_info (const char *pathname, struct stat *p, struct predicate *pred_ptr);
 bool following_links (void);
 bool digest_mode (mode_t *mode, const char *pathname, const char *name, struct stat *pstat, bool leaf);
diff --git a/find/ftsfind.c b/find/ftsfind.c
index 4b5f6e6..414327b 100644
--- a/find/ftsfind.c
+++ b/find/ftsfind.c
@@ -16,7 +16,7 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
-/* This file was written by James Youngman, based on find.c.
+/* This file was written by James Youngman, based on oldfind.c.
 
    GNU find was written by Eric Decker <cire@soe.ucsc.edu>,
    with enhancements by David MacKenzie <djm@gnu.org>,
diff --git a/find/find.c b/find/oldfind.c
similarity index 100%
rename from find/find.c
rename to find/oldfind.c
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 859caa4..4783e7c 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -7,7 +7,7 @@
 
 #Package source files
 find/exec.c
-find/find.c
+find/oldfind.c
 find/finddata.c
 find/fstype.c
 find/ftsfind.c
-- 
2.1.4

