Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/rdist Remove #if __STDC__. De-__P() and ANSIfy.
details: https://anonhg.NetBSD.org/src/rev/7254c954e195
branches: trunk
changeset: 532745:7254c954e195
user: wiz <wiz%NetBSD.org@localhost>
date: Fri Jun 14 01:18:54 2002 +0000
description:
Remove #if __STDC__. De-__P() and ANSIfy.
diffstat:
usr.bin/rdist/defs.h | 48 +++++++-------
usr.bin/rdist/docmd.c | 73 +++++++---------------
usr.bin/rdist/expand.c | 62 +++++++-----------
usr.bin/rdist/gram.y | 41 ++++--------
usr.bin/rdist/lookup.c | 12 +--
usr.bin/rdist/main.c | 23 ++----
usr.bin/rdist/server.c | 156 +++++++++++-------------------------------------
7 files changed, 139 insertions(+), 276 deletions(-)
diffs (truncated from 1030 to 300 lines):
diff -r 8b5b7b22a233 -r 7254c954e195 usr.bin/rdist/defs.h
--- a/usr.bin/rdist/defs.h Fri Jun 14 01:12:15 2002 +0000
+++ b/usr.bin/rdist/defs.h Fri Jun 14 01:18:54 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: defs.h,v 1.13 2000/10/11 14:46:16 is Exp $ */
+/* $NetBSD: defs.h,v 1.14 2002/06/14 01:18:54 wiz Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -153,33 +153,33 @@
extern uid_t userid; /* user's user ID */
extern gid_t groupid; /* user's group ID */
-int any __P((int, char *));
-char *colon __P((char *));
-void cleanup __P((int));
-void define __P((char *));
-void docmds __P((char **, int, char **));
-void error __P((const char *, ...))
+int any(int, char *);
+char *colon(char *);
+void cleanup(int);
+void define(char *);
+void docmds(char **, int, char **);
+void error(const char *, ...)
__attribute__((__format__(__printf__, 1, 2))) ;
-int except __P((char *));
+int except(char *);
struct namelist *
- expand __P((struct namelist *, int));
-char *exptilde __P((char [], char *));
-void fatal __P((const char *, ...))
+ expand(struct namelist *, int);
+char *exptilde(char [], char *);
+void fatal(const char *, ...)
__attribute__((__format__(__printf__, 1, 2)));
-int inlist __P((struct namelist *, char *));
-void insert __P((char *,
- struct namelist *, struct namelist *, struct subcmd *));
-void install __P((char *, char *, int, int));
-void log __P((FILE *, const char *, ...))
+int inlist(struct namelist *, char *);
+void insert(char *,
+ struct namelist *, struct namelist *, struct subcmd *);
+void install(char *, char *, int, int);
+void log(FILE *, const char *, ...)
__attribute__((__format__(__printf__, 2, 3)));
struct namelist *
- lookup __P((char *, int, struct namelist *));
-void lostconn __P((int));
+ lookup(char *, int, struct namelist *);
+void lostconn(int);
struct namelist *
- makenl __P((char *));
+ makenl(char *);
struct subcmd *
- makesubcmd __P((int));
-void prnames __P((struct namelist *));
-void server __P((void));
-void yyerror __P((char *));
-int yyparse __P((void));
+ makesubcmd(int);
+void prnames(struct namelist *);
+void server(void);
+void yyerror(char *);
+int yyparse(void);
diff -r 8b5b7b22a233 -r 7254c954e195 usr.bin/rdist/docmd.c
--- a/usr.bin/rdist/docmd.c Fri Jun 14 01:12:15 2002 +0000
+++ b/usr.bin/rdist/docmd.c Fri Jun 14 01:18:54 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: docmd.c,v 1.20 2000/06/12 04:43:11 mrg Exp $ */
+/* $NetBSD: docmd.c,v 1.21 2002/06/14 01:18:54 wiz Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)docmd.c 8.1 (Berkeley) 6/9/93";
#else
-__RCSID("$NetBSD: docmd.c,v 1.20 2000/06/12 04:43:11 mrg Exp $");
+__RCSID("$NetBSD: docmd.c,v 1.21 2002/06/14 01:18:54 wiz Exp $");
#endif
#endif /* not lint */
@@ -59,25 +59,22 @@
static int remerr = -1; /* Remote stderr */
-static int makeconn __P((char *));
-static int okname __P((char *));
-static void closeconn __P((void));
-static void cmptime __P((char *));
-static void doarrow __P((char **,
- struct namelist *, char *, struct subcmd *));
-static void dodcolon __P((char **,
- struct namelist *, char *, struct subcmd *));
-static void notify __P((char *, char *, struct namelist *, time_t));
-static void rcmptime __P((struct stat *));
+static int makeconn(char *);
+static int okname(char *);
+static void closeconn(void);
+static void cmptime(char *);
+static void doarrow(char **,
+ struct namelist *, char *, struct subcmd *);
+static void dodcolon(char **,
+ struct namelist *, char *, struct subcmd *);
+static void notify(char *, char *, struct namelist *, time_t);
+static void rcmptime(struct stat *);
/*
* Do the commands in cmds (initialized by yyparse).
*/
void
-docmds(dhosts, argc, argv)
- char **dhosts;
- int argc;
- char **argv;
+docmds(char **dhosts, int argc, char **argv)
{
struct cmd *c;
struct namelist *f;
@@ -130,11 +127,7 @@
* Process commands for sending files to other machines.
*/
static void
-doarrow(filev, files, rhost, cmds)
- char **filev;
- struct namelist *files;
- char *rhost;
- struct subcmd *cmds;
+doarrow(char **filev, struct namelist *files, char *rhost, struct subcmd *cmds)
{
struct namelist *f;
struct subcmd *sc;
@@ -218,8 +211,7 @@
* Create a connection to the rdist server on the machine rhost.
*/
static int
-makeconn(rhost)
- char *rhost;
+makeconn(char *rhost)
{
char *ruser, *cp;
static char *cur_host = NULL;
@@ -306,7 +298,7 @@
* Signal end of previous connection.
*/
static void
-closeconn()
+closeconn(void)
{
if (debug)
printf("closeconn()\n");
@@ -323,8 +315,7 @@
}
void
-lostconn(signo)
- int signo;
+lostconn(int signo)
{
char buf[BUFSIZ];
int nr = -1;
@@ -353,8 +344,7 @@
}
static int
-okname(name)
- char *name;
+okname(char *name)
{
char *cp = name;
int c;
@@ -381,11 +371,7 @@
* Process commands for comparing files to time stamp files.
*/
static void
-dodcolon(filev, files, stamp, cmds)
- char **filev;
- struct namelist *files;
- char *stamp;
- struct subcmd *cmds;
+dodcolon(char **filev, struct namelist *files, char *stamp, struct subcmd *cmds)
{
struct subcmd *sc;
struct namelist *f;
@@ -444,8 +430,7 @@
* Compare the mtime of file to the list of time stamps.
*/
static void
-cmptime(name)
- char *name;
+cmptime(char *name)
{
struct stat stb;
@@ -493,8 +478,7 @@
}
static void
-rcmptime(st)
- struct stat *st;
+rcmptime(struct stat *st)
{
DIR *d;
struct dirent *dp;
@@ -537,10 +521,7 @@
* stamp file.
*/
static void
-notify(file, rhost, to, lmod)
- char *file, *rhost;
- struct namelist *to;
- time_t lmod;
+notify(char *file, char *rhost, struct namelist *to, time_t lmod)
{
int fd, len;
struct stat stb;
@@ -616,9 +597,7 @@
* Return true if name is in the list.
*/
int
-inlist(list, file)
- struct namelist *list;
- char *file;
+inlist(struct namelist *list, char *file)
{
struct namelist *nl;
@@ -632,8 +611,7 @@
* Return TRUE if file is in the exception list.
*/
int
-except(file)
- char *file;
+except(char *file)
{
struct subcmd *sc;
struct namelist *nl;
@@ -668,8 +646,7 @@
}
char *
-colon(cp)
- char *cp;
+colon(char *cp)
{
while (*cp) {
diff -r 8b5b7b22a233 -r 7254c954e195 usr.bin/rdist/expand.c
--- a/usr.bin/rdist/expand.c Fri Jun 14 01:12:15 2002 +0000
+++ b/usr.bin/rdist/expand.c Fri Jun 14 01:18:54 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: expand.c,v 1.13 1998/12/19 20:32:17 christos Exp $ */
+/* $NetBSD: expand.c,v 1.14 2002/06/14 01:18:54 wiz Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)expand.c 8.1 (Berkeley) 6/9/93";
#else
-__RCSID("$NetBSD: expand.c,v 1.13 1998/12/19 20:32:17 christos Exp $");
+__RCSID("$NetBSD: expand.c,v 1.14 2002/06/14 01:18:54 wiz Exp $");
#endif
#endif /* not lint */
@@ -72,16 +72,16 @@
#define sort() qsort((char *)sortbase, &eargv[eargc] - sortbase, \
sizeof(*sortbase), argcmp), sortbase = &eargv[eargc]
-static void Cat __P((char *, char *));
-static void addpath __P((int));
-static int amatch __P((char *, char *));
-static int argcmp __P((const void *, const void *));
-static int execbrc __P((char *, char *));
-static void expsh __P((char *));
-static void expstr __P((char *));
-static int match __P((char *, char *));
-static void matchdir __P((char *));
-static int smatch __P((char *, char *));
+static void Cat(char *, char *);
+static void addpath(int);
+static int amatch(char *, char *);
+static int argcmp(const void *, const void *);
+static int execbrc(char *, char *);
+static void expsh(char *);
+static void expstr(char *);
+static int match(char *, char *);
+static void matchdir(char *);
+static int smatch(char *, char *);
/*
* Take a list of names and expand any macros, etc.
@@ -93,9 +93,7 @@
* Major portions of this were snarfed from csh/sh.glob.c.
*/
struct namelist *
-expand(list, wh)
- struct namelist *list;
Home |
Main Index |
Thread Index |
Old Index