/* Check whether the file named by fs is an ASCII file which the user may
* access. If it is, return the opened file. Otherwise return NULL. */
-static FILE *checkf(struct more_control *ctl, register char *fs, int *clearfirst)
+static FILE *checkf(struct more_control *ctl, char *fs, int *clearfirst)
{
struct stat stbuf;
- register FILE *f;
+ FILE *f;
int c;
if (stat(fs, &stbuf) == -1) {
}
/* Get a logical line */
-static int get_line(struct more_control *ctl, register FILE *f, int *length)
+static int get_line(struct more_control *ctl, FILE *f, int *length)
{
int c;
char *p;
}
/* Erase the rest of the prompt, assuming we are starting at column col. */
-static void erasep(struct more_control *ctl, register int col)
+static void erasep(struct more_control *ctl, int col)
{
if (ctl->promptlen == 0)
}
/* Print a buffer of n characters */
-static void prbuf(struct more_control *ctl, register char *s, register int n)
+static void prbuf(struct more_control *ctl, char *s, int n)
{
- register char c; /* next output character */
- register int state; /* next output char's UL state */
+ char c; /* next output character */
+ int state; /* next output char's UL state */
while (--n >= 0)
if (!ctl->ul_opt)
* which terminates the number. */
static int number(struct more_control *ctl, char *cmd)
{
- register int i;
+ int i;
char ch;
i = 0;
/* Skip nskip files in the file list (from the command line). Nskip may
* be negative. */
-static void skipf(struct more_control *ctl, register int nskip)
+static void skipf(struct more_control *ctl, int nskip)
{
if (nskip == 0)
return;
fputs(BS, stderr);
}
-static void ttyin(struct more_control *ctl, char buf[], register int nmax, char pchar)
+static void ttyin(struct more_control *ctl, char buf[], int nmax, char pchar)
{
char *sp;
int c;
}
/* Skip n lines in the file f */
-static void skiplns(struct more_control *ctl, register int n, register FILE *f)
+static void skiplns(struct more_control *ctl, int n, FILE *f)
{
- register int c;
+ int c;
while (n > 0) {
while ((c = more_getc(ctl, f)) != '\n')
}
}
-static void rdline(struct more_control *ctl, register FILE *f)
+static void rdline(struct more_control *ctl, FILE *f)
{
- register int c;
- register char *p;
+ int c;
+ char *p;
prepare_line_buffer(ctl);
/* Search for nth occurrence of regular expression contained in buf in
* the file */
-static void search(struct more_control *ctl, char buf[], FILE *file, register int n)
+static void search(struct more_control *ctl, char buf[], FILE *file, int n)
{
long startline = ctl->file_pos;
- register long line1 = startline;
- register long line2 = startline;
- register long line3;
- register int lncount;
+ long line1 = startline;
+ long line2 = startline;
+ long line3;
+ int lncount;
int saveln, rc;
regex_t re;
* argument followed by the command character. Return the number of
* lines to display in the next screenful. If there is nothing more to
* display in the current file, zero is returned. */
-static int command(struct more_control *ctl, char *filename, register FILE *f)
+static int command(struct more_control *ctl, char *filename, FILE *f)
{
- register int nlines;
- register int retval = 0;
- register int c;
+ int nlines;
+ int retval = 0;
+ int c;
char colonch;
int done;
char comchar, cmdbuf[INIT_BUF];
case 'b':
case ctrl('B'):
{
- register int initline;
+ int initline;
if (ctl->no_intty) {
fputc(RINGBELL, stderr);
}
/* Print out the contents of the file f, one screenful at a time. */
-static void screen(struct more_control *ctl, register FILE *f, register int num_lines)
+static void screen(struct more_control *ctl, FILE *f, int num_lines)
{
- register int c;
- register int nchars;
+ int c;
+ int nchars;
int length; /* length of current line */
static int prev_len = 1; /* length of previous line */
}
#endif /* SIGWINCH */
-static void copy_file(register FILE *f)
+static void copy_file(FILE *f)
{
char buf[BUFSIZ];
size_t sz;