Fixed style bugs and English in previous commit.

This commit is contained in:
Bruce Evans 1998-11-29 11:11:07 +00:00
parent 154708b405
commit ad04e6130e
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=41398

View File

@ -50,7 +50,20 @@ static char sccsid[] = "@(#)find.c 8.5 (Berkeley) 8/5/94";
#include "find.h"
static int find_compare(const FTSENT **s1, const FTSENT **s2);
static int find_compare __P((const FTSENT **s1, const FTSENT **s2));
/*
* find_compare --
* tell fts_open() how to order the traversal of the hierarchy.
* This variant gives lexicographical order in each directory.
*/
static int
find_compare(s1, s2)
const FTSENT **s1, **s2;
{
return (strcoll((*s1)->fts_name, (*s2)->fts_name));
}
/*
* find_formplan --
@ -143,18 +156,6 @@ find_formplan(argv)
FTS *tree; /* pointer to top of FTS hierarchy */
/*
* find_compare --
* A function which be used in fts_open() to order the
* traversal of the hierarchy.
* This function give you a lexicographical sorted output.
*/
static int find_compare(s1, s2)
const FTSENT **s1, **s2;
{
return strcoll( (*s1)->fts_name, (*s2)->fts_name );
}
/*
* find_execute --
* take a search plan and an array of search paths and executes the plan
@ -169,8 +170,8 @@ find_execute(plan, paths)
PLAN *p;
int rval;
if ((tree = fts_open(paths, ftsoptions,
(issort ? find_compare : NULL) )) == NULL)
tree = fts_open(paths, ftsoptions, (issort ? find_compare : NULL));
if (tree == NULL)
err(1, "ftsopen");
for (rval = 0; (entry = fts_read(tree)) != NULL;) {