diff options
author | dwmalone <dwmalone@FreeBSD.org> | 2002-09-04 23:29:10 +0000 |
---|---|---|
committer | dwmalone <dwmalone@FreeBSD.org> | 2002-09-04 23:29:10 +0000 |
commit | b4339b74aded4c38ebcfe3a2a9b37b900abb8874 (patch) | |
tree | fb230419005f211ecea1e667385bde9886dbf0d8 /usr.bin/fold/fold.c | |
parent | 228b93ce829543fee06561687a63c17a7e821dfd (diff) | |
download | FreeBSD-src-b4339b74aded4c38ebcfe3a2a9b37b900abb8874.zip FreeBSD-src-b4339b74aded4c38ebcfe3a2a9b37b900abb8874.tar.gz |
ANSIify function definitions.
Add some constness to avoid some warnings.
Remove use register keyword.
Deal with missing/unneeded extern/prototypes.
Some minor type changes/casts to avoid warnings.
Reviewed by: md5
Diffstat (limited to 'usr.bin/fold/fold.c')
-rw-r--r-- | usr.bin/fold/fold.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/usr.bin/fold/fold.c b/usr.bin/fold/fold.c index 49dbb0e..fc5cb16 100644 --- a/usr.bin/fold/fold.c +++ b/usr.bin/fold/fold.c @@ -68,11 +68,9 @@ int bflag; /* Count bytes, not columns */ int sflag; /* Split on word boundaries */ int -main(argc, argv) - int argc; - char **argv; +main(int argc, char **argv) { - register int ch; + int ch; int rval, width; char *p; @@ -123,7 +121,7 @@ main(argc, argv) } static void -usage() +usage(void) { (void)fprintf(stderr, "usage: fold [-bs] [-w width] [file ...]\n"); exit(1); @@ -141,8 +139,7 @@ usage() * returns embedded in the input stream. */ void -fold(width) - register int width; +fold(int width) { static char *buf; static int buf_max; @@ -196,8 +193,7 @@ fold(width) * Update the current column position for a character. */ static int -newpos(col, ch) - int col, ch; +newpos(int col, int ch) { if (bflag) |