summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Youngman <jay@gnu.org>2015-12-27 20:32:28 +0000
committerJames Youngman <jay@gnu.org>2015-12-27 21:09:46 +0000
commitefd03fa50ed88260bfdc98aa194270d8cbc5821a (patch)
tree5ed038e8dd683633f8d6da399269949c4ca502f2
parentfc260795fd51b08c1f1edc25499ffc283b10a743 (diff)
downloadfindutils-efd03fa50ed88260bfdc98aa194270d8cbc5821a.tar.gz
Rename find/find.c to find/oldfind.c.
* 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). * find/testsuite/config/unix.exp: Look for ftsfind.o instead of find.o when checking that we're really looking at the build directory.
-rw-r--r--doc/find-maint.texi2
-rw-r--r--find/.gitignore2
-rw-r--r--find/Makefile.am2
-rw-r--r--find/defs.h10
-rw-r--r--find/ftsfind.c2
-rw-r--r--find/oldfind.c (renamed from find/find.c)0
-rw-r--r--find/testsuite/config/unix.exp2
-rw-r--r--po/POTFILES.in2
8 files changed, 11 insertions, 11 deletions
diff --git a/doc/find-maint.texi b/doc/find-maint.texi
index 5f6a5a74..a6c65b8f 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 109831c2..095f9c20 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 67cfdfe6..c9207e9f 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 caccd2bb..ba0b8559 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 4b5f6e6c..414327b3 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
index c32cbc59..c32cbc59 100644
--- a/find/find.c
+++ b/find/oldfind.c
diff --git a/find/testsuite/config/unix.exp b/find/testsuite/config/unix.exp
index d69363ae..dca3ea9d 100644
--- a/find/testsuite/config/unix.exp
+++ b/find/testsuite/config/unix.exp
@@ -33,7 +33,7 @@ if { ![info exists OLDFIND] || ![info exists FTSFIND] } {
verbose "Searching for oldfind"
set dir "$base_dir/.."
- set objfile "find.o"
+ set objfile "ftsfind.o"
if ![file exists "$dir/$objfile"] then {
error "dir is $dir, but I cannot see $objfile in that directory"
}
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 859caa4a..4783e7c7 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