Cosmetic changes.

This commit is contained in:
enami 2000-03-16 18:44:29 +00:00
parent 139fcd8227
commit 7b4bdbc144
4 changed files with 37 additions and 12 deletions

View File

@ -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 * Copyright (c) 1991, 1993, 1994
@ -41,7 +41,7 @@
#if 0 #if 0
static char sccsid[] = "from: @(#)find.c 8.5 (Berkeley) 8/5/94"; static char sccsid[] = "from: @(#)find.c 8.5 (Berkeley) 8/5/94";
#else #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
#endif /* not lint */ #endif /* not lint */
@ -152,7 +152,8 @@ static int
ftscompare(e1, e2) ftscompare(e1, e2)
const FTSENT **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 */ FTS *tree; /* pointer to top of FTS hierarchy */

View File

@ -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 * Copyright (c) 1990, 1993
@ -41,7 +41,7 @@
#if 0 #if 0
static char sccsid[] = "from: @(#)function.c 8.10 (Berkeley) 5/4/95"; static char sccsid[] = "from: @(#)function.c 8.10 (Berkeley) 5/4/95";
#else #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
#endif /* not lint */ #endif /* not lint */
@ -311,6 +311,7 @@ f_always_true(plan, entry)
PLAN *plan; PLAN *plan;
FTSENT *entry; FTSENT *entry;
{ {
return (1); return (1);
} }
@ -605,6 +606,7 @@ f_group(plan, entry)
PLAN *plan; PLAN *plan;
FTSENT *entry; FTSENT *entry;
{ {
return (entry->fts_statp->st_gid == plan->g_data); return (entry->fts_statp->st_gid == plan->g_data);
} }
@ -644,6 +646,7 @@ f_inum(plan, entry)
PLAN *plan; PLAN *plan;
FTSENT *entry; FTSENT *entry;
{ {
COMPARE(entry->fts_statp->st_ino, plan->i_data); COMPARE(entry->fts_statp->st_ino, plan->i_data);
} }
@ -673,6 +676,7 @@ f_links(plan, entry)
PLAN *plan; PLAN *plan;
FTSENT *entry; FTSENT *entry;
{ {
COMPARE(entry->fts_statp->st_nlink, plan->l_data); COMPARE(entry->fts_statp->st_nlink, plan->l_data);
} }
@ -702,6 +706,7 @@ f_ls(plan, entry)
PLAN *plan; PLAN *plan;
FTSENT *entry; FTSENT *entry;
{ {
printlong(entry->fts_path, entry->fts_accpath, entry->fts_statp); printlong(entry->fts_path, entry->fts_accpath, entry->fts_statp);
return (1); return (1);
} }
@ -711,6 +716,7 @@ c_ls(argvp, isok)
char ***argvp; char ***argvp;
int isok; int isok;
{ {
ftsoptions &= ~FTS_NOSTAT; ftsoptions &= ~FTS_NOSTAT;
isoutput = 1; isoutput = 1;
@ -795,6 +801,7 @@ f_name(plan, entry)
PLAN *plan; PLAN *plan;
FTSENT *entry; FTSENT *entry;
{ {
return (!fnmatch(plan->c_data, entry->fts_name, 0)); return (!fnmatch(plan->c_data, entry->fts_name, 0));
} }
@ -824,6 +831,7 @@ f_newer(plan, entry)
PLAN *plan; PLAN *plan;
FTSENT *entry; FTSENT *entry;
{ {
return (entry->fts_statp->st_mtime > plan->t_data); return (entry->fts_statp->st_mtime > plan->t_data);
} }
@ -907,6 +915,7 @@ f_path(plan, entry)
PLAN *plan; PLAN *plan;
FTSENT *entry; FTSENT *entry;
{ {
return (!fnmatch(plan->c_data, entry->fts_path, 0)); return (!fnmatch(plan->c_data, entry->fts_path, 0));
} }
@ -984,6 +993,7 @@ f_print(plan, entry)
PLAN *plan; PLAN *plan;
FTSENT *entry; FTSENT *entry;
{ {
(void)printf("%s\n", entry->fts_path); (void)printf("%s\n", entry->fts_path);
return (1); return (1);
} }
@ -993,6 +1003,7 @@ f_print0(plan, entry)
PLAN *plan; PLAN *plan;
FTSENT *entry; FTSENT *entry;
{ {
(void)fputs(entry->fts_path, stdout); (void)fputs(entry->fts_path, stdout);
(void)fputc('\0', stdout); (void)fputc('\0', stdout);
return (1); return (1);
@ -1014,7 +1025,7 @@ f_printx(plan, entry)
} }
fputc('\n', stdout); fputc('\n', stdout);
return 1; return (1);
} }
PLAN * PLAN *
@ -1022,6 +1033,7 @@ c_print(argvp, isok)
char ***argvp; char ***argvp;
int isok; int isok;
{ {
isoutput = 1; isoutput = 1;
return (palloc(N_PRINT, f_print)); return (palloc(N_PRINT, f_print));
@ -1032,6 +1044,7 @@ c_print0(argvp, isok)
char ***argvp; char ***argvp;
int isok; int isok;
{ {
isoutput = 1; isoutput = 1;
return (palloc(N_PRINT0, f_print0)); return (palloc(N_PRINT0, f_print0));
@ -1042,9 +1055,10 @@ c_printx(argvp, isok)
char ***argvp; char ***argvp;
int isok; int isok;
{ {
isoutput = 1; isoutput = 1;
return palloc(N_PRINTX, f_printx); return (palloc(N_PRINTX, f_printx));
} }
/* /*
@ -1069,6 +1083,7 @@ c_prune(argvp, isok)
char ***argvp; char ***argvp;
int isok; int isok;
{ {
return (palloc(N_PRUNE, f_prune)); return (palloc(N_PRUNE, f_prune));
} }
@ -1190,6 +1205,7 @@ f_type(plan, entry)
PLAN *plan; PLAN *plan;
FTSENT *entry; FTSENT *entry;
{ {
return ((entry->fts_statp->st_mode & S_IFMT) == plan->m_data); return ((entry->fts_statp->st_mode & S_IFMT) == plan->m_data);
} }
@ -1262,6 +1278,7 @@ f_user(plan, entry)
PLAN *plan; PLAN *plan;
FTSENT *entry; FTSENT *entry;
{ {
return (entry->fts_statp->st_uid == plan->u_data); return (entry->fts_statp->st_uid == plan->u_data);
} }
@ -1336,6 +1353,7 @@ c_openparen(argvp, isok)
char ***argvp; char ***argvp;
int isok; int isok;
{ {
return (palloc(N_OPENPAREN, (int (*) __P((PLAN *, FTSENT *)))-1)); return (palloc(N_OPENPAREN, (int (*) __P((PLAN *, FTSENT *)))-1));
} }
@ -1344,6 +1362,7 @@ c_closeparen(argvp, isok)
char ***argvp; char ***argvp;
int isok; int isok;
{ {
return (palloc(N_CLOSEPAREN, (int (*) __P((PLAN *, FTSENT *)))-1)); return (palloc(N_CLOSEPAREN, (int (*) __P((PLAN *, FTSENT *)))-1));
} }
@ -1371,6 +1390,7 @@ c_not(argvp, isok)
char ***argvp; char ***argvp;
int isok; int isok;
{ {
return (palloc(N_NOT, f_not)); return (palloc(N_NOT, f_not));
} }
@ -1405,6 +1425,7 @@ c_or(argvp, isok)
char ***argvp; char ***argvp;
int isok; int isok;
{ {
return (palloc(N_OR, f_or)); return (palloc(N_OR, f_or));
} }
@ -1413,7 +1434,8 @@ c_null(argvp, isok)
char ***argvp; char ***argvp;
int isok; int isok;
{ {
return NULL;
return (NULL);
} }
static PLAN * static PLAN *

View File

@ -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 * Copyright (c) 1990, 1993, 1994
@ -43,7 +43,7 @@ static char sccsid[] = "@(#)main.c 8.4 (Berkeley) 5/4/95";
#else #else
__COPYRIGHT("@(#) Copyright (c) 1990, 1993, 1994\n\ __COPYRIGHT("@(#) Copyright (c) 1990, 1993, 1994\n\
The Regents of the University of California. All rights reserved.\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
#endif /* not lint */ #endif /* not lint */
@ -158,6 +158,7 @@ main(argc, argv)
static void static void
usage() usage()
{ {
(void)fprintf(stderr, (void)fprintf(stderr,
"usage: find [-H | -L | -P] [-Xdhsx] [-f file] [file ...] [expression]\n"); "usage: find [-H | -L | -P] [-Xdhsx] [-f file] [file ...] [expression]\n");
exit(1); exit(1);

View File

@ -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 * Copyright (c) 1990, 1993, 1994
@ -41,7 +41,7 @@
#if 0 #if 0
static char sccsid[] = "from: @(#)option.c 8.2 (Berkeley) 4/16/94"; static char sccsid[] = "from: @(#)option.c 8.2 (Berkeley) 4/16/94";
#else #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
#endif /* not lint */ #endif /* not lint */
@ -147,5 +147,6 @@ int
typecompare(a, b) typecompare(a, b)
const void *a, *b; const void *a, *b;
{ {
return (strcmp(((OPTION *)a)->name, ((OPTION *)b)->name)); return (strcmp(((OPTION *)a)->name, ((OPTION *)b)->name));
} }