diff options
author | Dag-Erling Smørgrav <des@FreeBSD.org> | 2002-02-06 13:30:31 +0000 |
---|---|---|
committer | Dag-Erling Smørgrav <des@FreeBSD.org> | 2002-02-06 13:30:31 +0000 |
commit | ed4d1c46a27632aa553e7c24c969262bfc2d5c97 (patch) | |
tree | d44f2702502c982570c85130c91c845a83ea8052 /libexec/ypxfr | |
parent | 8bf216d4a39b268cd561eb5e3a90ba41ef5e733f (diff) | |
download | src-ed4d1c46a27632aa553e7c24c969262bfc2d5c97.tar.gz src-ed4d1c46a27632aa553e7c24c969262bfc2d5c97.zip |
Apply the following mechanical transformations in preparation for
ansification and constification:
s{\s+__P\((\(.*?\))\)}{$1}g;
s{\(\s+}{\(}g;
s{\s+\)}{\)}g;
s{\s+,}{,}g;
s{(\s+)(for|if|switch|while)\(}{$1$2 \(}g;
s{return ([^\(].*?);}{return ($1);}g;
s{([\w\)])([!=+/\*-]?=)([\w\(+-])}{$1 $2 $3}g;
s{\s+$}{\n};g
Also add $FreeBSD$ where needed.
MFC after: 1 week
Notes
Notes:
svn path=/head/; revision=90297
Diffstat (limited to 'libexec/ypxfr')
-rw-r--r-- | libexec/ypxfr/yp_dbwrite.c | 4 | ||||
-rw-r--r-- | libexec/ypxfr/ypxfr_extern.h | 26 | ||||
-rw-r--r-- | libexec/ypxfr/ypxfr_getmap.c | 2 | ||||
-rw-r--r-- | libexec/ypxfr/ypxfr_main.c | 6 | ||||
-rw-r--r-- | libexec/ypxfr/ypxfr_misc.c | 4 | ||||
-rw-r--r-- | libexec/ypxfr/ypxfrd_getmap.c | 4 |
6 files changed, 23 insertions, 23 deletions
diff --git a/libexec/ypxfr/yp_dbwrite.c b/libexec/ypxfr/yp_dbwrite.c index bd45c431da3f..4715d7fa3204 100644 --- a/libexec/ypxfr/yp_dbwrite.c +++ b/libexec/ypxfr/yp_dbwrite.c @@ -75,7 +75,7 @@ DB *yp_open_db_rw(domain, map, flags) dbp = dbopen(buf,flags ? flags : FLAGS,PERM_SECURE,DB_HASH,&openinfo); if (dbp == NULL) { - switch(errno) { + switch (errno) { case ENOENT: yp_errno = YP_NOMAP; break; @@ -101,7 +101,7 @@ int yp_put_record(dbp,key,data,allow_overwrite) if ((rval = (dbp->put)(dbp,key,data, allow_overwrite ? 0 : R_NOOVERWRITE))) { - switch(rval) { + switch (rval) { case 1: return(YP_FALSE); break; diff --git a/libexec/ypxfr/ypxfr_extern.h b/libexec/ypxfr/ypxfr_extern.h index 045f49632781..f5feedfec05f 100644 --- a/libexec/ypxfr/ypxfr_extern.h +++ b/libexec/ypxfr/ypxfr_extern.h @@ -47,16 +47,16 @@ extern BTREEINFO openinfo_b; extern char *yp_dir; extern int debug; extern enum ypstat yp_errno; -extern void yp_error __P(( const char *, ... )); -extern int _yp_check __P(( char ** )); -extern char *ypxfrerr_string __P(( ypxfrstat )); -extern DB *yp_open_db_rw __P(( const char *, const char *, const int)); -extern void yp_init_dbs __P(( void )); -extern int yp_put_record __P(( DB *, DBT *, DBT * , int )); -extern int yp_get_record __P(( const char *, const char *, const DBT *, DBT *, int )); -extern int ypxfr_get_map __P(( char *, char *, char *, int (*)() )); -extern char *ypxfr_get_master __P(( char *, char *, char *, const int )); -extern unsigned long ypxfr_get_order __P(( char *, char *, char *, const int )); -extern int ypxfr_match __P(( char *, char *, char *, char *, unsigned long )); -extern char *ypxfxerr_string __P(( ypxfrstat )); -extern int ypxfrd_get_map __P(( char *, char *, char *, char *)); +extern void yp_error(const char *, ...); +extern int _yp_check(char **); +extern char *ypxfrerr_string(ypxfrstat); +extern DB *yp_open_db_rw(const char *, const char *, const int); +extern void yp_init_dbs(void); +extern int yp_put_record(DB *, DBT *, DBT *, int); +extern int yp_get_record(const char *, const char *, const DBT *, DBT *, int); +extern int ypxfr_get_map(char *, char *, char *, int (*)()); +extern char *ypxfr_get_master(char *, char *, char *, const int); +extern unsigned long ypxfr_get_order(char *, char *, char *, const int); +extern int ypxfr_match(char *, char *, char *, char *, unsigned long); +extern char *ypxfxerr_string(ypxfrstat); +extern int ypxfrd_get_map(char *, char *, char *, char *); diff --git a/libexec/ypxfr/ypxfr_getmap.c b/libexec/ypxfr/ypxfr_getmap.c index 31a0e586fd9c..b7ec9f2a2d41 100644 --- a/libexec/ypxfr/ypxfr_getmap.c +++ b/libexec/ypxfr/ypxfr_getmap.c @@ -43,7 +43,7 @@ static const char rcsid[] = #include <rpcsvc/yp.h> #include "ypxfr_extern.h" -extern bool_t xdr_ypresp_all_seq __P(( XDR *, unsigned long * )); +extern bool_t xdr_ypresp_all_seq(XDR *, unsigned long *); int (*ypresp_allfn)(); void *ypresp_data; diff --git a/libexec/ypxfr/ypxfr_main.c b/libexec/ypxfr/ypxfr_main.c index a4ad1a0d56c6..24d9d4a8529f 100644 --- a/libexec/ypxfr/ypxfr_main.c +++ b/libexec/ypxfr/ypxfr_main.c @@ -195,7 +195,7 @@ main(argc,argv) while ((ch = getopt(argc, argv, "fcd:h:s:p:C:")) != -1) { int my_optind; - switch(ch) { + switch (ch) { case 'f': ypxfr_force++; ypxfr_args++; @@ -381,13 +381,13 @@ the local domain name isn't set"); key.data = "YP_LAST_MODIFIED"; key.size = sizeof("YP_LAST_MODIFIED") - 1; - + /* The order number is immaterial when the 'force' flag is set. */ if (!ypxfr_force) { int ignore = 0; if (yp_get_record(ypxfr_dest_domain,ypxfr_mapname,&key,&data,1) != YP_TRUE) { - switch(yp_errno) { + switch (yp_errno) { case YP_NOKEY: ypxfr_exit(YPXFR_FORCE,NULL); break; diff --git a/libexec/ypxfr/ypxfr_misc.c b/libexec/ypxfr/ypxfr_misc.c index 5371ce097565..0682def089ae 100644 --- a/libexec/ypxfr/ypxfr_misc.c +++ b/libexec/ypxfr/ypxfr_misc.c @@ -49,7 +49,7 @@ struct dom_binding {}; char *ypxfrerr_string(code) ypxfrstat code; { - switch(code) { + switch (code) { case YPXFR_SUCC: return ("Map successfully transferred"); break; @@ -194,7 +194,7 @@ failed")); return((char *)&mastername); } } - + unsigned long ypxfr_get_order(domain, map, source, yplib) char *domain; char *map; diff --git a/libexec/ypxfr/ypxfrd_getmap.c b/libexec/ypxfr/ypxfrd_getmap.c index 72555a339c29..5d57c846eace 100644 --- a/libexec/ypxfr/ypxfrd_getmap.c +++ b/libexec/ypxfr/ypxfrd_getmap.c @@ -53,7 +53,7 @@ int fp = 0; static bool_t xdr_my_xfr(register XDR *xdrs, xfr *objp) { - while(1) { + while (1) { if (!xdr_xfr(xdrs, objp)) return(FALSE); if (objp->ok == TRUE) { @@ -65,7 +65,7 @@ static bool_t xdr_my_xfr(register XDR *xdrs, xfr *objp) } xdr_free(xdr_xfr, (char *)objp); if (objp->ok == FALSE) { - switch(objp->xfr_u.xfrstat) { + switch (objp->xfr_u.xfrstat) { case(XFR_DONE): return(TRUE); break; |