change a global into a local, misc style fixes

This commit is contained in:
Alfred Perlstein 2001-11-02 09:21:11 +00:00
parent a2d7281c5a
commit c16b5e4f8a
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=85859

View File

@ -65,8 +65,6 @@ void head_bytes __P((FILE *, int));
void obsolete __P((char *[]));
void usage __P((void));
int eval;
int
main(argc, argv)
int argc;
@ -74,7 +72,7 @@ main(argc, argv)
{
register int ch;
FILE *fp;
int first, linecnt = -1, bytecnt = -1;
int first, linecnt = -1, bytecnt = -1, eval = 0;
char *ep;
obsolete(argv);
@ -119,8 +117,7 @@ main(argc, argv)
head_bytes(fp, bytecnt);
(void)fclose(fp);
}
}
else if (bytecnt == -1)
} else if (bytecnt == -1)
head(stdin, linecnt);
else
head_bytes(stdin, bytecnt);
@ -145,8 +142,8 @@ head(fp, cnt)
void
head_bytes(fp, cnt)
FILE *fp;
register int cnt;
FILE *fp;
register int cnt;
{
char buf[4096];
register int readlen;
@ -187,6 +184,7 @@ obsolete(argv)
void
usage()
{
(void)fprintf(stderr, "usage: head [-n lines] [-c bytes] [file ...]\n");
exit(1);
}