1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-04 12:52:15 +00:00

Convert to ANSI style function definitions.

This commit is contained in:
Paul Richards 2004-11-03 15:23:11 +00:00
parent b483f84d55
commit 4bba8e595e
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=137157
5 changed files with 12 additions and 31 deletions

View File

@ -89,11 +89,7 @@ static void rlines(FILE *, off_t, struct stat *);
* NOREG cyclically read lines into a wrap-around array of buffers
*/
void
forward(fp, style, off, sbp)
FILE *fp;
enum STYLE style;
off_t off;
struct stat *sbp;
forward(FILE *fp, enum STYLE style, off_t off, struct stat *sbp)
{
int ch, n, kq = -1;
int action = USE_SLEEP;

View File

@ -73,9 +73,7 @@ oerr()
* absolute file offset `startoff'. May move map window.
*/
int
mapprint(mip, startoff, len)
struct mapinfo *mip;
off_t startoff, len;
mapprint(struct mapinfo *mip, off_t startoff, off_t len)
{
int n;
@ -101,9 +99,7 @@ mapprint(mip, startoff, len)
* aligned.
*/
int
maparound(mip, offset)
struct mapinfo *mip;
off_t offset;
maparound(struct mapinfo *mip, off_t offset)
{
if (mip->start != NULL && munmap(mip->start, mip->maplen) != 0)

View File

@ -66,9 +66,7 @@ static const char sccsid[] = "@(#)read.c 8.1 (Berkeley) 6/6/93";
* the end.
*/
int
bytes(fp, off)
FILE *fp;
off_t off;
bytes(FILE *fp, off_t off)
{
int ch, len, tlen;
char *ep, *p, *t;
@ -135,9 +133,7 @@ bytes(fp, off)
* the end.
*/
int
lines(fp, off)
FILE *fp;
off_t off;
lines(FILE *fp, off_t off)
{
struct {
int blen;

View File

@ -79,11 +79,7 @@ static void r_reg(FILE *, enum STYLE, off_t, struct stat *);
* NOREG cyclically read input into a linked list of buffers
*/
void
reverse(fp, style, off, sbp)
FILE *fp;
enum STYLE style;
off_t off;
struct stat *sbp;
reverse(FILE *fp, enum STYLE style, off_t off, struct stat *sbp)
{
if (style != REVERSE && off == 0)
return;
@ -112,11 +108,7 @@ reverse(fp, style, off, sbp)
* r_reg -- display a regular file in reverse order by line.
*/
static void
r_reg(fp, style, off, sbp)
FILE *fp;
enum STYLE style;
off_t off;
struct stat *sbp;
r_reg(FILE *fp, enum STYLE style, off_t off, struct stat *sbp)
{
struct mapinfo map;
off_t curoff, size, lineend;
@ -196,8 +188,7 @@ typedef struct bf {
* user warned).
*/
static void
r_buf(fp)
FILE *fp;
r_buf(FILE *fp)
{
BF *mark, *tl, *tr;
int ch, len, llen;

View File

@ -63,6 +63,8 @@ static const char sccsid[] = "@(#)tail.c 8.1 (Berkeley) 6/6/93";
int Fflag, fflag, rflag, rval;
const char *fname;
int no_files;
static void obsolete(char **);
static void usage(void);
@ -138,8 +140,7 @@ main(int argc, char *argv[])
argc -= optind;
argv += optind;
if (fflag && argc > 1)
errx(1, "-f option only appropriate for a single file");
no_files = argc;
/*
* If displaying in reverse, don't permit follow option, and convert
@ -168,6 +169,7 @@ main(int argc, char *argv[])
}
}
printf("No files: %d\n", no_files);
if (*argv)
for (first = 1; (fname = *argv++);) {
if ((fp = fopen(fname, "r")) == NULL ||