diff options
author | des <des@FreeBSD.org> | 2002-02-06 13:30:31 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 2002-02-06 13:30:31 +0000 |
commit | 0f2cb9b020b907000a28323fc57a82fdb7d6626d (patch) | |
tree | d44f2702502c982570c85130c91c845a83ea8052 /usr.sbin/yp_mkdb/yp_mkdb.c | |
parent | 0e1bb965cc26648289a6a22baf0ad5ef4891edb4 (diff) | |
download | FreeBSD-src-0f2cb9b020b907000a28323fc57a82fdb7d6626d.zip FreeBSD-src-0f2cb9b020b907000a28323fc57a82fdb7d6626d.tar.gz |
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
Diffstat (limited to 'usr.sbin/yp_mkdb/yp_mkdb.c')
-rw-r--r-- | usr.sbin/yp_mkdb/yp_mkdb.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.sbin/yp_mkdb/yp_mkdb.c b/usr.sbin/yp_mkdb/yp_mkdb.c index a5fed00..6f0d71b 100644 --- a/usr.sbin/yp_mkdb/yp_mkdb.c +++ b/usr.sbin/yp_mkdb/yp_mkdb.c @@ -88,7 +88,7 @@ static void unwind(map) err(1, "open_db(%s) failed", map); key.data = NULL; - while(yp_next_record(dbp, &key, &data, 1, 1) == YP_TRUE) + while (yp_next_record(dbp, &key, &data, 1, 1) == YP_TRUE) printf("%.*s %.*s\n", key.size,key.data,data.size,data.data); (void)(dbp->close)(dbp); @@ -119,7 +119,7 @@ int main (argc, argv) char hname[MAXHOSTNAMELEN + 2]; while ((ch = getopt(argc, argv, "uhcbsfd:i:o:m:")) != -1) { - switch(ch) { + switch (ch) { case 'f': filter_plusminus++; break; @@ -250,7 +250,7 @@ int main (argc, argv) yp_put_record(dbp, &key, &data, 0); } - while(fgets((char *)&buf, sizeof(buf), ifp)) { + while (fgets((char *)&buf, sizeof(buf), ifp)) { char *sep = NULL; int rval; @@ -259,7 +259,7 @@ int main (argc, argv) *sep = '\0'; /* handle backslash line continuations */ - while(buf[strlen(buf) - 1] == '\\') { + while (buf[strlen(buf) - 1] == '\\') { fgets((char *)&buf[strlen(buf) - 1], sizeof(buf) - strlen(buf), ifp); if ((sep = strchr(buf, '\n'))) @@ -312,7 +312,7 @@ int main (argc, argv) data.size = strlen(datbuf); if ((rval = yp_put_record(dbp, &key, &data, 0)) != YP_TRUE) { - switch(rval) { + switch (rval) { case YP_FALSE: warnx("duplicate key '%s' - skipping", keybuf); break; |