aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/head
diff options
context:
space:
mode:
authorDavid Malone <dwmalone@FreeBSD.org>2002-03-30 17:17:26 +0000
committerDavid Malone <dwmalone@FreeBSD.org>2002-03-30 17:17:26 +0000
commit4001504df5dd1a9a6a268091c1bc74ab9e8601d2 (patch)
tree0d6e2e712f45fedfd5f86903c6ae9d33f106b494 /usr.bin/head
parent8c7e7698527463cd6c24b4ab5aa86a44edb85572 (diff)
downloadsrc-4001504df5dd1a9a6a268091c1bc74ab9e8601d2.tar.gz
src-4001504df5dd1a9a6a268091c1bc74ab9e8601d2.zip
Notes
Diffstat (limited to 'usr.bin/head')
-rw-r--r--usr.bin/head/head.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/usr.bin/head/head.c b/usr.bin/head/head.c
index e773f432afc8..1daf11574999 100644
--- a/usr.bin/head/head.c
+++ b/usr.bin/head/head.c
@@ -60,17 +60,17 @@ static const char rcsid[] =
* Bill Joy UCB August 24, 1977
*/
-void head(FILE *, int);
-void head_bytes(FILE *, int);
-void obsolete(char *[]);
-void usage(void);
+static void head(FILE *, int);
+static void head_bytes(FILE *, size_t);
+static void obsolete(char *[]);
+static void usage(void);
int
main(argc, argv)
int argc;
char *argv[];
{
- register int ch;
+ int ch;
FILE *fp;
int first, linecnt = -1, bytecnt = -1, eval = 0;
char *ep;
@@ -125,13 +125,13 @@ main(argc, argv)
exit(eval);
}
-void
+static void
head(fp, cnt)
FILE *fp;
- register int cnt;
+ int cnt;
{
char *cp;
- int error, readlen;
+ size_t error, readlen;
while (cnt && (cp = fgetln(fp, &readlen)) != NULL) {
error = fwrite(cp, sizeof(char), readlen, stdout);
@@ -141,13 +141,13 @@ head(fp, cnt)
}
}
-void
+static void
head_bytes(fp, cnt)
FILE *fp;
- register int cnt;
+ size_t cnt;
{
char buf[4096];
- register int readlen;
+ size_t readlen;
while (cnt) {
if (cnt < sizeof(buf))
@@ -163,7 +163,7 @@ head_bytes(fp, cnt)
}
}
-void
+static void
obsolete(argv)
char *argv[];
{
@@ -182,7 +182,7 @@ obsolete(argv)
}
}
-void
+static void
usage()
{