Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/find Cosmetic changes.
details: https://anonhg.NetBSD.org/src/rev/a66ef3c32070
branches: trunk
changeset: 483732:a66ef3c32070
user: enami <enami%NetBSD.org@localhost>
date: Thu Mar 16 18:44:29 2000 +0000
description:
Cosmetic changes.
diffstat:
usr.bin/find/find.c | 7 ++++---
usr.bin/find/function.c | 32 +++++++++++++++++++++++++++-----
usr.bin/find/main.c | 5 +++--
usr.bin/find/option.c | 5 +++--
4 files changed, 37 insertions(+), 12 deletions(-)
diffs (288 lines):
diff -r ac79fc469c40 -r a66ef3c32070 usr.bin/find/find.c
--- a/usr.bin/find/find.c Thu Mar 16 18:32:23 2000 +0000
+++ b/usr.bin/find/find.c Thu Mar 16 18:44:29 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: find.c,v 1.13 2000/03/10 14:50:36 kleink Exp $ */
+/* $NetBSD: find.c,v 1.14 2000/03/16 18:44:29 enami Exp $ */
/*-
* Copyright (c) 1991, 1993, 1994
@@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "from: @(#)find.c 8.5 (Berkeley) 8/5/94";
#else
-__RCSID("$NetBSD: find.c,v 1.13 2000/03/10 14:50:36 kleink Exp $");
+__RCSID("$NetBSD: find.c,v 1.14 2000/03/16 18:44:29 enami Exp $");
#endif
#endif /* not lint */
@@ -152,7 +152,8 @@
ftscompare(e1, e2)
const FTSENT **e1, **e2;
{
- return strcoll((*e1)->fts_name, (*e2)->fts_name);
+
+ return (strcoll((*e1)->fts_name, (*e2)->fts_name));
}
FTS *tree; /* pointer to top of FTS hierarchy */
diff -r ac79fc469c40 -r a66ef3c32070 usr.bin/find/function.c
--- a/usr.bin/find/function.c Thu Mar 16 18:32:23 2000 +0000
+++ b/usr.bin/find/function.c Thu Mar 16 18:44:29 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: function.c,v 1.32 1999/11/09 15:06:34 drochner Exp $ */
+/* $NetBSD: function.c,v 1.33 2000/03/16 18:44:29 enami Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "from: @(#)function.c 8.10 (Berkeley) 5/4/95";
#else
-__RCSID("$NetBSD: function.c,v 1.32 1999/11/09 15:06:34 drochner Exp $");
+__RCSID("$NetBSD: function.c,v 1.33 2000/03/16 18:44:29 enami Exp $");
#endif
#endif /* not lint */
@@ -311,6 +311,7 @@
PLAN *plan;
FTSENT *entry;
{
+
return (1);
}
@@ -605,6 +606,7 @@
PLAN *plan;
FTSENT *entry;
{
+
return (entry->fts_statp->st_gid == plan->g_data);
}
@@ -644,6 +646,7 @@
PLAN *plan;
FTSENT *entry;
{
+
COMPARE(entry->fts_statp->st_ino, plan->i_data);
}
@@ -673,6 +676,7 @@
PLAN *plan;
FTSENT *entry;
{
+
COMPARE(entry->fts_statp->st_nlink, plan->l_data);
}
@@ -702,6 +706,7 @@
PLAN *plan;
FTSENT *entry;
{
+
printlong(entry->fts_path, entry->fts_accpath, entry->fts_statp);
return (1);
}
@@ -711,6 +716,7 @@
char ***argvp;
int isok;
{
+
ftsoptions &= ~FTS_NOSTAT;
isoutput = 1;
@@ -795,6 +801,7 @@
PLAN *plan;
FTSENT *entry;
{
+
return (!fnmatch(plan->c_data, entry->fts_name, 0));
}
@@ -824,6 +831,7 @@
PLAN *plan;
FTSENT *entry;
{
+
return (entry->fts_statp->st_mtime > plan->t_data);
}
@@ -907,6 +915,7 @@
PLAN *plan;
FTSENT *entry;
{
+
return (!fnmatch(plan->c_data, entry->fts_path, 0));
}
@@ -984,6 +993,7 @@
PLAN *plan;
FTSENT *entry;
{
+
(void)printf("%s\n", entry->fts_path);
return (1);
}
@@ -993,6 +1003,7 @@
PLAN *plan;
FTSENT *entry;
{
+
(void)fputs(entry->fts_path, stdout);
(void)fputc('\0', stdout);
return (1);
@@ -1014,7 +1025,7 @@
}
fputc('\n', stdout);
- return 1;
+ return (1);
}
PLAN *
@@ -1022,6 +1033,7 @@
char ***argvp;
int isok;
{
+
isoutput = 1;
return (palloc(N_PRINT, f_print));
@@ -1032,6 +1044,7 @@
char ***argvp;
int isok;
{
+
isoutput = 1;
return (palloc(N_PRINT0, f_print0));
@@ -1042,9 +1055,10 @@
char ***argvp;
int isok;
{
+
isoutput = 1;
- return palloc(N_PRINTX, f_printx);
+ return (palloc(N_PRINTX, f_printx));
}
/*
@@ -1069,6 +1083,7 @@
char ***argvp;
int isok;
{
+
return (palloc(N_PRUNE, f_prune));
}
@@ -1190,6 +1205,7 @@
PLAN *plan;
FTSENT *entry;
{
+
return ((entry->fts_statp->st_mode & S_IFMT) == plan->m_data);
}
@@ -1262,6 +1278,7 @@
PLAN *plan;
FTSENT *entry;
{
+
return (entry->fts_statp->st_uid == plan->u_data);
}
@@ -1336,6 +1353,7 @@
char ***argvp;
int isok;
{
+
return (palloc(N_OPENPAREN, (int (*) __P((PLAN *, FTSENT *)))-1));
}
@@ -1344,6 +1362,7 @@
char ***argvp;
int isok;
{
+
return (palloc(N_CLOSEPAREN, (int (*) __P((PLAN *, FTSENT *)))-1));
}
@@ -1371,6 +1390,7 @@
char ***argvp;
int isok;
{
+
return (palloc(N_NOT, f_not));
}
@@ -1405,6 +1425,7 @@
char ***argvp;
int isok;
{
+
return (palloc(N_OR, f_or));
}
@@ -1413,7 +1434,8 @@
char ***argvp;
int isok;
{
- return NULL;
+
+ return (NULL);
}
static PLAN *
diff -r ac79fc469c40 -r a66ef3c32070 usr.bin/find/main.c
--- a/usr.bin/find/main.c Thu Mar 16 18:32:23 2000 +0000
+++ b/usr.bin/find/main.c Thu Mar 16 18:44:29 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.14 2000/03/13 08:21:36 itohy Exp $ */
+/* $NetBSD: main.c,v 1.15 2000/03/16 18:44:30 enami Exp $ */
/*-
* Copyright (c) 1990, 1993, 1994
@@ -43,7 +43,7 @@
#else
__COPYRIGHT("@(#) Copyright (c) 1990, 1993, 1994\n\
The Regents of the University of California. All rights reserved.\n");
-__RCSID("$NetBSD: main.c,v 1.14 2000/03/13 08:21:36 itohy Exp $");
+__RCSID("$NetBSD: main.c,v 1.15 2000/03/16 18:44:30 enami Exp $");
#endif
#endif /* not lint */
@@ -158,6 +158,7 @@
static void
usage()
{
+
(void)fprintf(stderr,
"usage: find [-H | -L | -P] [-Xdhsx] [-f file] [file ...] [expression]\n");
exit(1);
diff -r ac79fc469c40 -r a66ef3c32070 usr.bin/find/option.c
--- a/usr.bin/find/option.c Thu Mar 16 18:32:23 2000 +0000
+++ b/usr.bin/find/option.c Thu Mar 16 18:44:29 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: option.c,v 1.13 1999/07/20 01:28:42 cgd Exp $ */
+/* $NetBSD: option.c,v 1.14 2000/03/16 18:44:30 enami Exp $ */
/*-
* Copyright (c) 1990, 1993, 1994
@@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "from: @(#)option.c 8.2 (Berkeley) 4/16/94";
#else
-__RCSID("$NetBSD: option.c,v 1.13 1999/07/20 01:28:42 cgd Exp $");
+__RCSID("$NetBSD: option.c,v 1.14 2000/03/16 18:44:30 enami Exp $");
#endif
#endif /* not lint */
@@ -147,5 +147,6 @@
typecompare(a, b)
const void *a, *b;
{
+
return (strcmp(((OPTION *)a)->name, ((OPTION *)b)->name));
}
Home |
Main Index |
Thread Index |
Old Index