/*
* Print file status.
*/
-void FS()
+void FS(void)
{
fstatus(file_name[0] ? "" : "[buffer]", -1L);
}
* Visit (edit) another file. If the file has been modified, ask the user if
* he wants to save it.
*/
-void VI()
+void VI(void)
{
char new_file[LINE_LEN]; /* Buffer to hold new file name */
/*
* Write file in core to disc.
*/
-int WT()
+int WT(void)
{
register LINE *line;
register long count = 0L; /* Nr of chars written */
}
/* Call WT and discard value returned. */
-void XWT()
+void XWT(void)
{
(void) WT();
}
/*
* Call an interactive shell.
*/
-void SH()
+void SH(void)
{
register int w;
int pid, status;
* it returns the count'th line before `line'. When the next (previous)
* line is the tail (header) indicating EOF (tof) it stops.
*/
-LINE *proceed(line, count)
-register LINE *line;
-register int count;
+LINE *proceed(register LINE *line, register int count)
{
if (count < 0)
while (count++ < 0 && line != header)
* If revfl is TRUE, turn on reverse video on both strings. Set stat_visible
* only if bottom_line is visible.
*/
-int bottom_line(revfl, s1, s2, inbuf, statfl)
-FLAG revfl;
-char *s1, *s2;
-char *inbuf;
-FLAG statfl;
+int bottom_line(FLAG revfl, char *s1, char *s2, char *inbuf, FLAG statfl)
{
int ret = FINE;
char buf[LINE_LEN];
*p++ = ' ';
if (s1 != NULL)
- while (*p = *s1++)
+ while ((*p = *s1++))
p++;
if (s2 != NULL)
- while (*p = *s2++)
+ while ((*p = *s2++))
p++;
*p++ = ' ';
*p++ = 0;
* Count_chars() count the number of chars that the line would occupy on the
* screen. Counting starts at the real x-coordinate of the line.
*/
-int count_chars(line)
-LINE *line;
+int count_chars(LINE *line)
{
register int cnt = get_shift(line->shift_count) * -SHIFT_SIZE;
register char *textp = line->text;
* If we're moving to the same x coordinate, try to move the the x-coordinate
* used on the other previous call.
*/
-void move(new_x, new_address, new_y)
-register int new_x;
-int new_y;
-char *new_address;
+void move(register int new_x, char *new_address, int new_y)
{
register LINE *line = cur_line; /* For building new cur_line */
int shift = 0; /* How many shifts to make */
* Find_x() returns the x coordinate belonging to address.
* (Tabs are expanded).
*/
-int find_x(line, address)
-LINE *line;
-char *address;
+int find_x(LINE *line, char *address)
{
register char *textp = line->text;
register int nx = get_shift(line->shift_count) * -SHIFT_SIZE;
* Find_address() returns the pointer in the line with offset x_coord.
* (Tabs are expanded).
*/
-char *find_address(line, x_coord, old_x)
-LINE *line;
-int x_coord;
-int *old_x;
+char *find_address(LINE *line, int x_coord, int *old_x)
{
register char *textp = line->text;
register int tx = get_shift(line->shift_count) * -SHIFT_SIZE;
* Length_of() returns the number of characters int the string `string'
* excluding the '\0'.
*/
-int length_of(string)
-register char *string;
+int length_of(register char *string)
{
register int count = 0;
* Copy_string() copies the string `from' into the string `to'. `To' must be
* long enough to hold `from'.
*/
-void copy_string(to, from)
-register char *to;
-register char *from;
+void copy_string(register char *to, register char *from)
{
- while (*to++ = *from++)
+ while ((*to++ = *from++))
;
}
* which must be the first line of the screen, and an y-coordinate,
* which will be the current y-coordinate (if it isn't larger than last_y)
*/
-void reset(head_line, screen_y)
-LINE *head_line;
-int screen_y;
+void reset(LINE *head_line, int screen_y)
{
register LINE *line;
/*
* Set cursor at coordinates x, y.
*/
-void set_cursor(nx, ny)
-int nx, ny;
+void set_cursor(int nx, int ny)
{
#ifdef UNIX
extern char *tgoto();
/*
* Routine to open terminal when mined is used in a pipeline.
*/
-void open_device()
+void open_device(void)
{
if ((input_fd = open("/dev/tty", 0)) < 0)
panic("Cannot open /dev/tty for read");
* Getchar() reads one character from the terminal. The character must be
* masked with 0377 to avoid sign extension.
*/
-int getchar()
+int getchar(void)
{
#ifdef UNIX
return (_getchar() & 0377);
* rest of the screen with blank_line's.
* When count is negative, a backwards print from `line' will be done.
*/
-void display(x_coord, y_coord, line, count)
-int x_coord, y_coord;
-register LINE *line;
-register int count;
+void display(int x_coord, int y_coord, register LINE *line, register int count)
{
set_cursor(x_coord, y_coord);
/*
* Write_char does a buffered output.
*/
-int write_char(fd, c)
-int fd;
-char c;
+int write_char(int fd, int c)
{
screen [out_count++] = c;
if (out_count == SCREEN_SIZE) /* Flush on SCREEN_SIZE chars */
/*
* Writeline writes the given string on the given filedescriptor.
*/
-int writeline(fd, text)
-register int fd;
-register char *text;
+int writeline(register int fd, register char *text)
{
while(*text)
if (write_char(fd, *text++) == ERRORS)
* then (screen) line will be cleared when the end of the line has been
* reached.
*/
-void put_line(line, offset, clear_line)
-LINE *line; /* Line to print */
-int offset; /* Offset to start */
-FLAG clear_line; /* Clear to eoln if TRUE */
+void put_line(LINE *line, int offset, FLAG clear_line)
{
register char *textp = line->text;
register int count = get_shift(line->shift_count) * -SHIFT_SIZE;
/*
* Flush the I/O buffer on filedescriptor fd.
*/
-int flush_buffer(fd)
-int fd;
+int flush_buffer(int fd)
{
if (out_count <= 0) /* There is nothing to flush */
return FINE;
/*
* Bad_write() is called when a write failed. Notify the user.
*/
-void bad_write(fd)
-int fd;
+void bad_write(int fd)
{
if (fd == STD_OUT) /* Cannot write to terminal? */
exit(1);
/*
* Catch the SIGQUIT signal (^\) send to mined. It turns on the quitflag.
*/
-void catch(sig)
-int sig;
+void catch(int sig)
{
/* Reset the signal */
signal(SIGQUIT, catch);
/*
* Abort_mined() will leave mined. Confirmation is asked first.
*/
-void abort_mined()
+void abort_mined(void)
{
quit = FALSE;
* Set and reset tty into CBREAK or old mode according to argument `state'. It
* also sets all signal characters (except for ^\) to UNDEF. ^\ is caught.
*/
-void raw_mode(state)
-FLAG state;
+void raw_mode(FLAG state)
{
static struct termios old_tty;
static struct termios new_tty;
* It writes the message to the terminal, resets the tty and exits.
* Ask the user if he wants to save his file.
*/
-void panic(message)
-register char *message;
+void panic(register char *message)
{
extern char yank_file[];
#endif /* UNIX */
}
-char *alloc(bytes)
-int bytes;
+char *alloc(int bytes)
{
char *p;
return(p);
}
-void free_space(p)
-char *p;
+void free_space(char *p)
{
free(p);
}
* Initialize is called when a another file is edited. It free's the allocated
* space and sets modified back to FALSE and fixes the header/tail pointer.
*/
-void initialize()
+void initialize(void)
{
register LINE *line, *next_line;
/*
* Basename() finds the absolute name of the file out of a given path_name.
*/
-char *basename(path)
-char *path;
+char *basename(char *path)
{
register char *ptr = path;
register char *last = NULL;
* couldn't be opened, just some initializations are done, and a line consisting
* of a `\n' is installed.
*/
-void load_file(file)
-char *file;
+void load_file(char *file)
{
register LINE *line = header;
register int len;
* Get_line reads one line from filedescriptor fd. If EOF is reached on fd,
* get_line() returns ERRORS, else it returns the length of the string.
*/
-int get_line(fd, buffer)
-int fd;
-register char *buffer;
+int get_line(int fd, register char *buffer)
{
static char *last = NULL;
static char *current = NULL;
* Install_line installs the buffer into a LINE structure It returns a pointer
* to the allocated structure.
*/
-LINE *install_line(buffer, length)
-char *buffer;
-int length;
+LINE *install_line(char *buffer, int length)
{
register LINE *new_line = (LINE *) alloc(sizeof(LINE));
return new_line;
}
-int main(argc, argv)
-int argc;
-char *argv[];
+int main(int argc, char *argv[])
{
/* mined is the Minix editor. */
/*
* Redraw the screen
*/
-void RD()
+void RD(void)
{
/* Clear screen */
#ifdef UNIX
/*
* Ignore this keystroke.
*/
-void I()
+void I(void)
{
}
/*
* Leave editor. If the file has changed, ask if the user wants to save it.
*/
-void XT()
+void XT(void)
{
if (modified == TRUE && ask_save() == ERRORS)
return;
exit(0);
}
-void (*escfunc(c))()
-int c;
+void (*escfunc(int c))(void)
{
if (c == '[') {
/* Start of ASCII escape sequence. */
* command count times. If a ^\ is given during repeating, stop looping and
* return to main loop.
*/
-void ESC()
+void ESC(void)
{
register int count = 0;
register void (*func)();
/*
* Ask the user if he wants to save his file or not.
*/
-int ask_save()
+int ask_save(void)
{
register int c;
/*
* Line_number() finds the line number we're on.
*/
-int line_number()
+int line_number(void)
{
register LINE *line = header->next;
register int count = 1;
* Display a line telling how many chars and lines the file contains. Also tell
* whether the file is readonly and/or modified.
*/
-void file_status(message, count, file, lines, writefl, changed)
-char *message;
-register long count; /* Contains number of characters in file */
-char *file;
-int lines;
-FLAG writefl, changed;
+void file_status(char *message, register long count, char *file, int lines,
+ FLAG writefl, FLAG changed)
{
register LINE *line;
char msg[LINE_LEN + 40];/* Buffer to hold line */
void build_string(char *buf, char *fmt, ...)
{
#else
-void build_string(buf, fmt, va_alist)
-char *buf, *fmt;
-va_dcl
+void build_string(char *buf, char *fmt, va_dcl va_alist)
{
#endif
va_list argptr;
default :
scanp = "";
}
- while (*buf++ = *scanp++)
+ while ((*buf++ = *scanp++))
;
buf--;
}
* Output an (unsigned) long in a 10 digit field without leading zeros.
* It returns a pointer to the first digit in the buffer.
*/
-char *num_out(number)
-long number;
+char *num_out(long number)
{
static char num_buf[11]; /* Buffer to build number */
register long digit; /* Next digit of number */
* returned. ERRORS is returned on a bad number. The resulting number is put
* into the integer the arguments points to.
*/
-int get_number(message, result)
-char *message;
-int *result;
+int get_number(char *message, int *result)
{
register int index;
register int count = 0;
* Input() reads a string from the terminal. When the KILL character is typed,
* it returns ERRORS.
*/
-int input(inbuf, clearfl)
-char *inbuf;
-FLAG clearfl;
+int input(char *inbuf, FLAG clearfl)
{
register char *ptr;
register char c; /* Character read */
* Get_file() reads a filename from the terminal. Filenames longer than
* FILE_LENGHT chars are truncated.
*/
-int get_file(message, file)
-char *message, *file;
+int get_file(char *message, char *file)
{
char *ptr;
int ret;
#ifdef UNIX
#undef putchar
-int _getchar()
+int _getchar(void)
{
char c;
return c & 0377;
}
-void _flush()
+void _flush(void)
{
(void) fflush(stdout);
}
-void _putchar(c)
-char c;
+void _putchar(char c)
{
(void) write_char(STD_OUT, c);
}
-void get_term()
+void get_term(void)
{
static char termbuf[50];
extern char *tgetstr(), *getenv();
/*
* Move one line up.
*/
-void UP()
+void UP(void)
{
if (y == 0) { /* Top line of screen. Scroll one line */
(void) reverse_scroll();
/*
* Move one line down.
*/
-void DN()
+void DN(void)
{
if (y == last_y) { /* Last line of screen. Scroll one line */
if (bot_line->next == tail && bot_line->text[0] != '\n') {
/*
* Move left one position.
*/
-void LF()
+void LF(void)
{
if (x == 0 && get_shift(cur_line->shift_count) == 0) {/* Begin of line */
if (cur_line->prev != header) {
/*
* Move right one position.
*/
-void RT()
+void RT(void)
{
if (*cur_text == '\n') {
if (cur_line->next != tail) { /* Last char of file */
/*
* Move to coordinates [0, 0] on screen.
*/
-void HIGH()
+void HIGH(void)
{
move_to(0, 0);
}
/*
* Move to coordinates [0, YMAX] on screen.
*/
-void LOW()
+void LOW(void)
{
move_to(0, last_y);
}
/*
* Move to begin of line.
*/
-void BL()
+void BL(void)
{
move_to(LINE_START, y);
}
/*
* Move to end of line.
*/
-void EL()
+void EL(void)
{
move_to(LINE_END, y);
}
/*
* GOTO() prompts for a linenumber and moves to that line.
*/
-void GOTO()
+void GOTO(void)
{
int number;
LINE *line;
* top_line of display.) Try to leave the cursor on the same line. If this is
* not possible, leave cursor on the line halfway the page.
*/
-void PD()
+void PD(void)
{
register int i;
* Try to leave the cursor on the same line. If this is not possible, leave
* cursor on the line halfway the page.
*/
-void PU()
+void PU(void)
{
register int i;
/*
* Go to top of file, scrolling if possible, else redrawing screen.
*/
-void HO()
+void HO(void)
{
if (proceed(top_line, -screenmax) == header)
PU(); /* It fits. Let PU do it */
/*
* Go to last line of file, scrolling if possible, else redrawing screen
*/
-void EF()
+void EF(void)
{
if (tail->prev->text[0] != '\n')
dummy_line();
/*
* Scroll one line up. Leave the cursor on the same line (if possible).
*/
-void SU()
+void SU(void)
{
if (top_line->prev == header) /* Top of file. Can't scroll */
return;
/*
* Scroll one line down. Leave the cursor on the same line (if possible).
*/
-void SD()
+void SD(void)
{
if (forward_scroll() != ERRORS)
move_to(x, (y == 0) ? 0 : y - 1);
* Perform a forward scroll. It returns ERRORS if we're at the last line of the
* file.
*/
-int forward_scroll()
+int forward_scroll(void)
{
if (bot_line->next == tail) /* Last line of file. No dice */
return ERRORS;
* Perform a backwards scroll. It returns ERRORS if we're at the first line
* of the file.
*/
-int reverse_scroll()
+int reverse_scroll(void)
{
if (top_line->prev == header)
return ERRORS; /* Top of file. Can't scroll */
* MP() moves to the start of the previous word. A word is defined as a
* number of non-blank characters separated by tabs spaces or linefeeds.
*/
-void MP()
+void MP(void)
{
move_previous_word(NO_DELETE);
}
-void move_previous_word(remove)
-FLAG remove;
+void move_previous_word(FLAG remove)
{
register char *begin_line;
register char *textp;
* non-blank characters separated by tabs spaces or linefeeds. Always keep in
* mind that the pointer shouldn't pass the '\n'.
*/
-void MN()
+void MN(void)
{
move_next_word(NO_DELETE);
}
-void move_next_word(remove)
-FLAG remove;
+void move_next_word(FLAG remove)
{
register char *textp = cur_text;
* If this character is the only character of the line, the current line will
* be deleted.
*/
-void DCC()
+void DCC(void)
{
if (*cur_text == '\n')
delete(cur_line,cur_text, cur_line->next,cur_line->next->text);
* at the beginning of the line, the last character if the previous line is
* deleted.
*/
-void DPC()
+void DPC(void)
{
if (x == 0 && cur_line->prev == header)
return; /* Top of file */
* DLN deletes all characters until the end of the line. If the current
* character is a '\n', then delete that char.
*/
-void DLN()
+void DLN(void)
{
if (*cur_text == '\n')
DCC();
/*
* DNW() deletes the next word (as described in MN())
*/
-void DNW()
+void DNW(void)
{
if (*cur_text == '\n')
DCC();
/*
* DPW() deletes the next word (as described in MP())
*/
-void DPW()
+void DPW(void)
{
if (cur_text == cur_line->text)
DPC();
/*
* Insert character `character' at current location.
*/
-void S(character)
-register char character;
+void S(int character)
{
static char buffer[2];
* CTL inserts a control-char at the current location. A message that this
* function is called is displayed at the status line.
*/
-void CTL()
+void CTL(void)
{
register char ctrl;
* LIB insert a line at the current position and moves back to the end of
* the previous line.
*/
-void LIB()
+void LIB(void)
{
S('\n'); /* Insert the line */
UP(); /* Move one line up */
* Line_insert() inserts a new line with text pointed to by `string'.
* It returns the address of the new line.
*/
-LINE *line_insert(line, string, len)
-register LINE *line;
-char *string;
-int len;
+LINE *line_insert(register LINE *line, char *string, int len)
{
register LINE *new_line;
/*
* Insert() insert the string `string' at the given line and location.
*/
-int insert(line, location, string)
-register LINE *line;
-char *location, *string;
+int insert(register LINE *line, char *location, char *string)
{
register char *bufp = text_buffer; /* Buffer for building line */
register char *textp = line->text;
* Line_delete() deletes the argument line out of the line list. The pointer to
* the next line is returned.
*/
-LINE *line_delete(line)
-register LINE *line;
+LINE *line_delete(register LINE *line)
{
register LINE *next_line = line->next;
* startposition and endposition and fixes the screen accordingly. It
* returns the number of lines deleted.
*/
-void delete(start_line, start_textp, end_line, end_textp)
-register LINE *start_line;
-LINE *end_line;
-char *start_textp, *end_textp;
+void delete(register LINE *start_line, char *start_textp, LINE *end_line,
+ char *end_textp)
{
register char *textp = start_line->text;
register char *bufp = text_buffer; /* Storage for new line->text */
/*
* PT() inserts the buffer at the current location.
*/
-void PT()
+void PT(void)
{
register int fd; /* File descriptor for buffer */
* IF() prompt for a filename and inserts the file at the current location
* in the file.
*/
-void IF()
+void IF(void)
{
register int fd; /* File descriptor of file */
char name[LINE_LEN]; /* Buffer for file name */
* File_insert() inserts a an opened file (as given by filedescriptor fd)
* at the current location.
*/
-void file_insert(fd, old_pos)
-int fd;
-FLAG old_pos;
+void file_insert(int fd, FLAG old_pos)
{
char line_buffer[MAX_CHARS]; /* Buffer for next line */
register LINE *line = cur_line;
* WB() writes the buffer (yank_file) into another file, which
* is prompted for.
*/
-void WB()
+void WB(void)
{
register int new_fd; /* Filedescriptor to copy file */
int yank_fd; /* Filedescriptor to buffer */
/*
* MA sets mark_line (mark_text) to the current line (text pointer).
*/
-void MA()
+void MA(void)
{
mark_line = cur_line;
mark_text = cur_text;
* YA() puts the text between the marked position and the current
* in the buffer.
*/
-void YA()
+void YA(void)
{
set_up(NO_DELETE);
}
/*
* DT() is essentially the same as YA(), but in DT() the text is deleted.
*/
-void DT()
+void DT(void)
{
set_up(DELETE);
}
* if the marked position is still valid. If it is, yank is called with the
* arguments in the right order.
*/
-void set_up(remove)
-FLAG remove; /* DELETE if text should be deleted */
+void set_up(FLAG remove)
{
switch (checkmark()) {
case NOT_VALID :
* NOT_VALID is returned when mark_line and/or mark_text are no longer valid.
* Legal() checks if mark_text is valid on the mark_line.
*/
-FLAG checkmark()
+FLAG checkmark(void)
{
register LINE *line;
FLAG cur_seen = FALSE;
/*
* Legal() checks if mark_text is still a valid pointer.
*/
-int legal()
+int legal(void)
{
register char *textp = mark_line->text;
* The caller must check that the arguments to yank() are valid. (E.g. in
* the right order)
*/
-void yank(start_line, start_textp, end_line, end_textp, remove)
-LINE *start_line, *end_line;
-char *start_textp, *end_textp;
-FLAG remove; /* DELETE if text should be deleted */
+void yank(LINE *start_line, char *start_textp, LINE *end_line, char *end_textp,
+ FLAG remove)
{
register LINE *line = start_line;
register char *textp = start_textp;
#define MAXTRAILS 26
-int scratch_file(mode)
-FLAG mode; /* Can be READ or WRITE permission */
+int scratch_file(FLAG mode)
{
static int trials = 0; /* Keep track of trails */
register char *y_ptr, *n_ptr;
/*
* SF searches forward for an expression.
*/
-void SF()
+void SF(void)
{
search("Search forward:", FORWARD);
}
/*
* SF searches backwards for an expression.
*/
-void SR()
+void SR(void)
{
search("Search reverse:", REVERSE);
}
* The save flag indicates whether the expression should be appended at the
* message pointer.
*/
-REGEX *get_expression(message)
-char *message;
+REGEX *get_expression(char *message)
{
static REGEX program; /* Program of expression */
char exp_buf[LINE_LEN]; /* Buffer for new expr. */
* GR() a replaces all matches from the current position until the end
* of the file.
*/
-void GR()
+void GR(void)
{
change("Global replace:", VALID);
}
/*
* LR() replaces all matches on the current line.
*/
-void LR()
+void LR(void)
{
change("Line replace:", NOT_VALID);
}
* for expressions at the current line and continues until the end of the file
* if the FLAG file is VALID.
*/
-void change(message, file)
-char *message; /* Message to prompt for expression */
-FLAG file;
+void change(char *message, FLAG file)
{
char mess_buf[LINE_LEN]; /* Buffer to hold message */
char replacement[LINE_LEN]; /* Buffer to hold subst. pattern */
* as indicated by the program. Every '&' in the replacement is replaced by
* the original match. A \ in the replacement escapes the next character.
*/
-char *substitute(line, program, replacement)
-LINE *line;
-REGEX *program;
-char *replacement; /* Contains replacement pattern */
+char *substitute(LINE *line, REGEX *program, char *replacement)
{
register char *textp = text_buffer;
register char *subp = replacement;
* Find_x() and find_y() display the right page on the screen, and return
* the right coordinates for x and y. These coordinates are passed to move_to()
*/
-void search(message, method)
-char *message;
-FLAG method;
+void search(char *message, FLAG method)
{
register REGEX *program;
register LINE *match_line;
* returns the new y coordinate, else it displays the correct page with the
* matched line in the middle and returns the new y value;
*/
-int find_y(match_line)
-LINE *match_line;
+int find_y(LINE *match_line)
{
register LINE *line;
register int count = 0;
* allocates space for the expression, and copies the expression buffer into
* this field.
*/
-void finished(program, last_exp)
-register REGEX *program;
-int *last_exp;
+void finished(register REGEX *program, int *last_exp)
{
register int length = (last_exp - exp_buffer) * sizeof(int);
* the union. If all went well the expression is saved and the expression
* pointer is set to the saved (and compiled) expression.
*/
-void compile(pattern, program)
-register char *pattern; /* Pointer to pattern */
-REGEX *program;
+void compile(register char *pattern, REGEX *program)
{
register int *expression = exp_buffer;
int *prev_char; /* Pointer to previous compiled atom */
* Match() will look through the whole file until a match is found.
* NULL is returned if no match could be found.
*/
-LINE *match(program, string, method)
-REGEX *program;
-char *string;
-register FLAG method;
+LINE *match(REGEX *program, char *string, register FLAG method)
{
register LINE *line = cur_line;
char old_char; /* For saving chars */
* indicates FORWARD or REVERSE search. It scans through the whole string
* until a match is found, or the end of the string is reached.
*/
-int line_check(program, string, method)
-register REGEX *program;
-char *string;
-FLAG method;
+int line_check(register REGEX *program, char *string, FLAG method)
{
register char *textp = string;
* (and expression). Check() return MATCH for a match, NO_MATCH is the string
* couldn't be matched or REG_ERROR for an illegal opcode in expression.
*/
-int check_string(program, string, expression)
-REGEX *program;
-register char *string;
-int *expression;
+int check_string(REGEX *program, register char *string, int *expression)
{
register int opcode; /* Holds opcode of next expr. atom */
char c; /* Char that must be matched */
*string != '\0' && *string != '\n') {
c = *expression & LOW_BYTE; /* Extract match char */
opcode = *expression & HIGH_BYTE; /* Extract opcode */
- if (star_fl = (opcode & STAR)) { /* Check star occurrence */
+ if ((star_fl = (opcode & STAR))) { /* Check star occurrence */
opcode &= ~STAR; /* Strip opcode */
mark = string; /* Mark current position */
}
* It searches backwards until the (in check_string()) marked position
* is reached, or a match is found.
*/
-int star(program, end_position, string, expression)
-REGEX *program;
-register char *end_position;
-register char *string;
-int *expression;
+int star(REGEX *program, register char *end_position, register char *string,
+ int *expression)
{
do {
string--;
* it returns MATCH. if it isn't it returns NO_MATCH. These returns values
* are reversed when the NEGATE field in the opcode is present.
*/
-int in_list(list, c, list_length, opcode)
-register int *list;
-char c;
-register int list_length;
-int opcode;
+int in_list(int *list, int c, register int list_length, int opcode)
{
if (c == '\0' || c == '\n') /* End of string, never matches */
return NO_MATCH;
* useful in combination with the EF and DN command in combination with the
* Yank command set.
*/
-void dummy_line()
+void dummy_line(void)
{
(void) line_insert(tail->prev, "\n", 1);
tail->prev->shift_count = DUMMY;