summaryrefslogtreecommitdiff
path: root/usr.bin/mg
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/mg')
-rw-r--r--usr.bin/mg/match.c11
-rw-r--r--usr.bin/mg/paragraph.c20
-rw-r--r--usr.bin/mg/random.c41
-rw-r--r--usr.bin/mg/re_search.c50
-rw-r--r--usr.bin/mg/region.c27
-rw-r--r--usr.bin/mg/search.c56
-rw-r--r--usr.bin/mg/spawn.c5
-rw-r--r--usr.bin/mg/ttykbd.c6
-rw-r--r--usr.bin/mg/undo.c4
-rw-r--r--usr.bin/mg/version.c5
-rw-r--r--usr.bin/mg/window.c31
-rw-r--r--usr.bin/mg/word.c25
12 files changed, 103 insertions, 178 deletions
diff --git a/usr.bin/mg/match.c b/usr.bin/mg/match.c
index 8900ab10386..94ec8792191 100644
--- a/usr.bin/mg/match.c
+++ b/usr.bin/mg/match.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: match.c,v 1.8 2002/02/16 21:27:49 millert Exp $ */
+/* $OpenBSD: match.c,v 1.9 2003/05/20 03:08:55 cloder Exp $ */
/*
* Limited parenthesis matching routines
@@ -49,8 +49,7 @@ static struct balance {
* character, if any. Bound to "blink-matching-paren-command".
*/
int
-showmatch(f, n)
- int f, n;
+showmatch(int f, int n)
{
int i, s;
@@ -75,7 +74,7 @@ showmatch(f, n)
*/
static int
-balance()
+balance(void)
{
LINE *clp;
int cbo;
@@ -146,9 +145,7 @@ balance()
*/
static void
-displaymatch(clp, cbo)
- LINE *clp;
- int cbo;
+displaymatch(LINE *clp, int cbo)
{
LINE *tlp;
int tbo;
diff --git a/usr.bin/mg/paragraph.c b/usr.bin/mg/paragraph.c
index 0e592f876f9..f45b63f7baf 100644
--- a/usr.bin/mg/paragraph.c
+++ b/usr.bin/mg/paragraph.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: paragraph.c,v 1.7 2002/02/14 14:24:21 deraadt Exp $ */
+/* $OpenBSD: paragraph.c,v 1.8 2003/05/20 03:08:55 cloder Exp $ */
/*
* Code for dealing with paragraphs and filling. Adapted from MicroEMACS 3.6
@@ -18,8 +18,7 @@ static int fillcol = 70;
*/
/* ARGSUSED */
int
-gotobop(f, n)
- int f, n;
+gotobop(int f, int n)
{
/* the other way... */
if (n < 0)
@@ -72,8 +71,7 @@ gotobop(f, n)
*/
/* ARGSUSED */
int
-gotoeop(f, n)
- int f, n;
+gotoeop(int f, int n)
{
/* the other way... */
if (n < 0)
@@ -116,8 +114,7 @@ gotoeop(f, n)
*/
/* ARGSUSED */
int
-fillpara(f, n)
- int f, n;
+fillpara(int f, int n)
{
int c; /* current char durring scan */
int wordlen; /* length of current word */
@@ -238,8 +235,7 @@ fillpara(f, n)
*/
/* ARGSUSED */
int
-killpara(f, n)
- int f, n;
+killpara(int f, int n)
{
int status; /* returned status of functions */
@@ -275,8 +271,7 @@ killpara(f, n)
*/
/* ARGSUSED */
int
-fillword(f, n)
- int f, n;
+fillword(int f, int n)
{
char c;
int col, i, nce;
@@ -327,8 +322,7 @@ fillword(f, n)
* Set fill column to n for justify.
*/
int
-setfillcol(f, n)
- int f, n;
+setfillcol(int f, int n)
{
fillcol = ((f & FFARG) ? n : getcolpos());
ewprintf("Fill column set to %d", fillcol);
diff --git a/usr.bin/mg/random.c b/usr.bin/mg/random.c
index cb9afd814fa..2867dc51621 100644
--- a/usr.bin/mg/random.c
+++ b/usr.bin/mg/random.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: random.c,v 1.9 2003/05/16 19:28:59 vincent Exp $ */
+/* $OpenBSD: random.c,v 1.10 2003/05/20 03:08:55 cloder Exp $ */
/*
* Assorted commands.
@@ -20,8 +20,7 @@
*/
/* ARGSUSED */
int
-showcpos(f, n)
- int f, n;
+showcpos(int f, int n)
{
LINE *clp;
long nchar;
@@ -112,8 +111,7 @@ getcolpos(void)
*/
/* ARGSUSED */
int
-twiddle(f, n)
- int f, n;
+twiddle(int f, int n)
{
LINE *dotp;
int doto, cr;
@@ -143,8 +141,7 @@ twiddle(f, n)
*/
/* ARGSUSED */
int
-openline(f, n)
- int f, n;
+openline(int f, int n)
{
int i;
int s;
@@ -176,8 +173,7 @@ openline(f, n)
*/
/* ARGSUSED */
int
-newline(f, n)
- int f, n;
+newline(int f, int n)
{
LINE *lp;
int s;
@@ -211,8 +207,7 @@ newline(f, n)
*/
/* ARGSUSED */
int
-deblank(f, n)
- int f, n;
+deblank(int f, int n)
{
LINE *lp1, *lp2;
RSIZE nld;
@@ -235,8 +230,7 @@ deblank(f, n)
* Delete any whitespace around dot, then insert a space.
*/
int
-justone(f, n)
- int f, n;
+justone(int f, int n)
{
(void)delwhite(f, n);
return linsert(1, ' ');
@@ -247,8 +241,7 @@ justone(f, n)
*/
/* ARGSUSED */
int
-delwhite(f, n)
- int f, n;
+delwhite(int f, int n)
{
int col, c, s;
@@ -282,8 +275,7 @@ delwhite(f, n)
*/
/* ARGSUSED */
int
-indent(f, n)
- int f, n;
+indent(int f, int n)
{
int nicol;
int c;
@@ -321,8 +313,7 @@ indent(f, n)
*/
/* ARGSUSED */
int
-forwdel(f, n)
- int f, n;
+forwdel(int f, int n)
{
if (n < 0)
return backdel(f | FFRAND, -n);
@@ -344,8 +335,7 @@ forwdel(f, n)
*/
/* ARGSUSED */
int
-backdel(f, n)
- int f, n;
+backdel(int f, int n)
{
int s;
@@ -375,8 +365,7 @@ backdel(f, n)
*/
/* ARGSUSED */
int
-killline(f, n)
- int f, n;
+killline(int f, int n)
{
LINE *nextp;
RSIZE chunk;
@@ -439,8 +428,7 @@ killline(f, n)
*/
/* ARGSUSED */
int
-yank(f, n)
- int f, n;
+yank(int f, int n)
{
LINE *lp;
int c, i, nline;
@@ -484,8 +472,7 @@ yank(f, n)
#ifdef NOTAB
/* ARGSUSED */
int
-space_to_tabstop(f, n)
- int f, n;
+space_to_tabstop(int f, int n)
{
if (n < 0)
return FALSE;
diff --git a/usr.bin/mg/re_search.c b/usr.bin/mg/re_search.c
index 855a5a85954..f97270f232c 100644
--- a/usr.bin/mg/re_search.c
+++ b/usr.bin/mg/re_search.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: re_search.c,v 1.11 2002/02/16 21:27:49 millert Exp $ */
+/* $OpenBSD: re_search.c,v 1.12 2003/05/20 03:08:55 cloder Exp $ */
/*
* regular expression search commands for Mg
@@ -47,8 +47,7 @@ static int countmatches(int);
*/
/* ARGSUSED */
int
-re_forwsearch(f, n)
- int f, n;
+re_forwsearch(int f, int n)
{
int s;
@@ -71,8 +70,7 @@ re_forwsearch(f, n)
*/
/* ARGSUSED */
int
-re_backsearch(f, n)
- int f, n;
+re_backsearch(int f, int n)
{
int s;
@@ -96,8 +94,7 @@ re_backsearch(f, n)
*/
/* ARGSUSED */
int
-re_searchagain(f, n)
- int f, n;
+re_searchagain(int f, int n)
{
if (re_srch_lastdir == SRCH_NOPR) {
ewprintf("No last search");
@@ -129,8 +126,7 @@ static regmatch_t re_match[RE_NMATCH];
*/
/* ARGSUSED */
int
-re_queryrepl(f, n)
- int f, n;
+re_queryrepl(int f, int n)
{
int s;
int rcnt = 0; /* replacements made so far */
@@ -213,12 +209,12 @@ stopsearch:
/*
* Routine re_doreplace calls lreplace to make replacements needed by
* re_query replace. Its reason for existence is to deal with \1, \2. etc.
+ * plen: length to remove
+ * st: replacement string
+ * f: case hack disable
*/
static int
-re_doreplace(plen, st, f)
- RSIZE plen; /* length to remove */
- char *st; /* replacement string */
- int f; /* case hack disable */
+re_doreplace(RSIZE plen, char *st, int f)
{
int j, k, s, more, num, state;
LINE *clp;
@@ -308,7 +304,7 @@ re_doreplace(plen, st, f)
* string isn't found, FALSE is returned.
*/
static int
-re_forwsrch()
+re_forwsrch(void)
{
int tbo, error;
LINE *clp;
@@ -355,7 +351,7 @@ re_forwsrch()
* found, FALSE is returned.
*/
static int
-re_backsrch()
+re_backsrch(void)
{
LINE *clp;
int tbo;
@@ -416,8 +412,7 @@ re_backsrch()
* some do-it-yourself control expansion.
*/
static int
-re_readpattern(prompt)
- char *prompt;
+re_readpattern(char *prompt)
{
int s, flags, error;
char tpat[NPAT];
@@ -457,8 +452,7 @@ re_readpattern(prompt)
* with argument cause case to matter.
*/
int
-setcasefold(f, n)
- int f, n;
+setcasefold(int f, int n)
{
if (f & FFARG) {
casefoldsearch = FALSE;
@@ -481,8 +475,7 @@ setcasefold(f, n)
* Delete all lines after dot that contain a string matching regex
*/
int
-delmatchlines(f, n)
- int f, n;
+delmatchlines(int f, int n)
{
int s;
@@ -498,8 +491,7 @@ delmatchlines(f, n)
* Delete all lines after dot that don't contain a string matching regex
*/
int
-delnonmatchlines(f, n)
- int f, n;
+delnonmatchlines(int f, int n)
{
int s;
@@ -515,8 +507,7 @@ delnonmatchlines(f, n)
* This function does the work of deleting matching lines
*/
static int
-killmatches(cond)
- int cond;
+killmatches(int cond)
{
int s, error;
int count = 0;
@@ -559,8 +550,7 @@ killmatches(cond)
* Count lines matching regex
*/
int
-cntmatchlines(f, n)
- int f, n;
+cntmatchlines(int f, int n)
{
int s;
@@ -574,8 +564,7 @@ cntmatchlines(f, n)
* Count lines that fail to match regex
*/
int
-cntnonmatchlines(f, n)
- int f, n;
+cntnonmatchlines(int f, int n)
{
int s;
@@ -591,8 +580,7 @@ cntnonmatchlines(f, n)
* This function does the work of counting matching lines.
*/
int
-countmatches(cond)
- int cond;
+countmatches(int cond)
{
int error;
int count = 0;
diff --git a/usr.bin/mg/region.c b/usr.bin/mg/region.c
index a217469d915..d91b16e5139 100644
--- a/usr.bin/mg/region.c
+++ b/usr.bin/mg/region.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: region.c,v 1.11 2002/08/22 23:28:19 deraadt Exp $ */
+/* $OpenBSD: region.c,v 1.12 2003/05/20 03:08:55 cloder Exp $ */
/*
* Region based commands.
@@ -18,8 +18,7 @@ static int setsize(REGION *, RSIZE);
*/
/* ARGSUSED */
int
-killregion(f, n)
- int f, n;
+killregion(int f, int n)
{
int s;
REGION region;
@@ -41,8 +40,7 @@ killregion(f, n)
*/
/* ARGSUSED */
int
-copyregion(f, n)
- int f, n;
+copyregion(int f, int n)
{
LINE *linep;
REGION region;
@@ -86,8 +84,7 @@ copyregion(f, n)
*/
/* ARGSUSED */
int
-lowerregion(f, n)
- int f, n;
+lowerregion(int f, int n)
{
LINE *linep;
REGION region;
@@ -128,8 +125,7 @@ lowerregion(f, n)
*/
/* ARGSUSED */
int
-upperregion(f, n)
- int f, n;
+upperregion(int f, int n)
{
LINE *linep;
REGION region;
@@ -173,8 +169,7 @@ upperregion(f, n)
* because I might add a "if regions is big, ask before clobberring" flag.
*/
static int
-getregion(rp)
- REGION *rp;
+getregion(REGION *rp)
{
LINE *flp, *blp;
long fsize, bsize;
@@ -230,9 +225,7 @@ getregion(rp)
* Set size, and check for overflow.
*/
static int
-setsize(rp, size)
- REGION *rp;
- RSIZE size;
+setsize(REGION *rp, RSIZE size)
{
rp->r_size = size;
if (rp->r_size != size) {
@@ -261,8 +254,7 @@ static char prefix_string[PREFIXLENGTH] = {'>', '\0'};
*/
/* ARGSUSED */
int
-prefixregion(f, n)
- int f, n;
+prefixregion(int f, int n)
{
LINE *first, *last;
REGION region;
@@ -305,8 +297,7 @@ prefixregion(f, n)
*/
/* ARGSUSED */
int
-setprefix(f, n)
- int f, n;
+setprefix(int f, int n)
{
char buf[PREFIXLENGTH];
int s;
diff --git a/usr.bin/mg/search.c b/usr.bin/mg/search.c
index 28b3057667a..e366408ea30 100644
--- a/usr.bin/mg/search.c
+++ b/usr.bin/mg/search.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: search.c,v 1.9 2002/02/16 21:27:49 millert Exp $ */
+/* $OpenBSD: search.c,v 1.10 2003/05/20 03:08:55 cloder Exp $ */
/*
* Search commands.
@@ -52,8 +52,7 @@ int srch_lastdir = SRCH_NOPR; /* Last search flags. */
*/
/* ARGSUSED */
int
-forwsearch(f, n)
- int f, n;
+forwsearch(int f, int n)
{
int s;
@@ -75,8 +74,7 @@ forwsearch(f, n)
*/
/* ARGSUSED */
int
-backsearch(f, n)
- int f, n;
+backsearch(int f, int n)
{
int s;
@@ -97,8 +95,7 @@ backsearch(f, n)
*/
/* ARGSUSED */
int
-searchagain(f, n)
- int f, n;
+searchagain(int f, int n)
{
if (srch_lastdir == SRCH_FORW) {
if (forwsrch() == FALSE) {
@@ -124,8 +121,7 @@ searchagain(f, n)
*/
/* ARGSUSED */
int
-forwisearch(f, n)
- int f, n;
+forwisearch(int f, int n)
{
return isearch(SRCH_FORW);
}
@@ -136,8 +132,7 @@ forwisearch(f, n)
*/
/* ARGSUSED */
int
-backisearch(f, n)
- int f, n;
+backisearch(int f, int n)
{
return isearch(SRCH_BACK);
}
@@ -154,8 +149,7 @@ backisearch(f, n)
* else accumulate into search string
*/
static int
-isearch(dir)
- int dir;
+isearch(int dir)
{
LINE *clp;
@@ -315,8 +309,7 @@ isearch(dir)
}
static void
-is_cpush(cmd)
- int cmd;
+is_cpush(int cmd)
{
if (++cip >= NSRCH)
cip = 0;
@@ -324,7 +317,7 @@ is_cpush(cmd)
}
static void
-is_lpush()
+is_lpush(void)
{
int ctp;
@@ -337,7 +330,7 @@ is_lpush()
}
static void
-is_pop()
+is_pop(void)
{
if (cmds[cip].s_code != SRCH_NOPR) {
curwp->w_doto = cmds[cip].s_doto;
@@ -350,15 +343,14 @@ is_pop()
}
static int
-is_peek()
+is_peek(void)
{
return cmds[cip].s_code;
}
/* this used to always return TRUE (the return value was checked) */
static void
-is_undo(pptr, dir)
- int *pptr, *dir;
+is_undo(int *pptr, int *dir)
{
int redo = FALSE;
@@ -390,8 +382,7 @@ is_undo(pptr, dir)
}
static int
-is_find(dir)
- int dir;
+is_find(int dir)
{
int plen, odoto;
LINE *odotp;
@@ -431,8 +422,7 @@ is_find(dir)
* status, so I just made the checking vanish.
*/
static void
-is_prompt(dir, flag, success)
- int dir, flag, success;
+is_prompt(int dir, int flag, int success)
{
if (dir == SRCH_FORW) {
if (success != FALSE)
@@ -453,9 +443,7 @@ is_prompt(dir, flag, success)
* a string. The "flag" determines whether pat should be printed.
*/
static void
-is_dspl(prompt, flag)
- char *prompt;
- int flag;
+is_dspl(char *prompt, int flag)
{
if (flag != FALSE)
ewprintf("%s: ", prompt);
@@ -469,8 +457,7 @@ is_dspl(prompt, flag)
*/
/* ARGSUSED */
int
-queryrepl(f, n)
- int f, n;
+queryrepl(int f, int n)
{
int s;
int rcnt = 0; /* replacements made so far */
@@ -552,7 +539,7 @@ stopsearch:
* FALSE is returned.
*/
int
-forwsrch()
+forwsrch(void)
{
LINE *clp, *tlp;
int cbo, tbo, c;
@@ -601,7 +588,7 @@ fail: ;
* string isn't found, FALSE is returned.
*/
int
-backsrch()
+backsrch(void)
{
LINE *clp, *tlp;
int cbo, tbo, c;
@@ -654,8 +641,7 @@ fail: ;
* folded out. The "pc" is from the pattern.
*/
static int
-eq(bc, pc)
- int bc, pc;
+eq(int bc, int pc)
{
bc = CHARMASK(bc);
pc = CHARMASK(pc);
@@ -676,8 +662,7 @@ eq(bc, pc)
* expansion.
*/
int
-readpattern(prompt)
- char *prompt;
+readpattern(char *prompt)
{
int s;
char tpat[NPAT];
@@ -695,3 +680,4 @@ readpattern(prompt)
s = TRUE;
return s;
}
+
diff --git a/usr.bin/mg/spawn.c b/usr.bin/mg/spawn.c
index 082a66fb50b..58970ea4da6 100644
--- a/usr.bin/mg/spawn.c
+++ b/usr.bin/mg/spawn.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: spawn.c,v 1.7 2001/05/24 03:05:26 mickey Exp $ */
+/* $OpenBSD: spawn.c,v 1.8 2003/05/20 03:08:55 cloder Exp $ */
/*
* Spawn. Actually just suspends Mg.
@@ -18,8 +18,7 @@
*/
/* ARGSUSED */
int
-spawncli(f, n)
- int f, n;
+spawncli(int f, int n)
{
sigset_t oset;
diff --git a/usr.bin/mg/ttykbd.c b/usr.bin/mg/ttykbd.c
index 2e07d1b01db..bc84339b89c 100644
--- a/usr.bin/mg/ttykbd.c
+++ b/usr.bin/mg/ttykbd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ttykbd.c,v 1.10 2002/02/21 04:16:23 deraadt Exp $ */
+/* $OpenBSD: ttykbd.c,v 1.11 2003/05/20 03:08:55 cloder Exp $ */
/*
* Name: MG 2a
@@ -29,7 +29,7 @@ char *keystrings[] = {NULL};
* file is, depending on what startupfile() does on your system.
*/
void
-ttykeymapinit()
+ttykeymapinit(void)
{
char *cp;
@@ -70,7 +70,7 @@ ttykeymapinit()
* Clean up the keyboard -- called by tttidy()
*/
void
-ttykeymaptidy()
+ttykeymaptidy(void)
{
if (keypad_local)
/* turn off keypad */
diff --git a/usr.bin/mg/undo.c b/usr.bin/mg/undo.c
index c63f3805b3e..2f9485e81db 100644
--- a/usr.bin/mg/undo.c
+++ b/usr.bin/mg/undo.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: undo.c,v 1.15 2003/04/13 19:16:49 avsm Exp $ */
+/* $OpenBSD: undo.c,v 1.16 2003/05/20 03:08:55 cloder Exp $ */
/*
* Copyright (c) 2002 Vincent Labrecque
* All rights reserved.
@@ -169,7 +169,7 @@ drop_oldest_undo_record(void)
}
static __inline__ int
-last_was_boundary()
+last_was_boundary(void)
{
struct undo_rec *rec;
diff --git a/usr.bin/mg/version.c b/usr.bin/mg/version.c
index d718c253f33..6d795c7015d 100644
--- a/usr.bin/mg/version.c
+++ b/usr.bin/mg/version.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: version.c,v 1.5 2001/05/23 22:24:26 mickey Exp $ */
+/* $OpenBSD: version.c,v 1.6 2003/05/20 03:08:55 cloder Exp $ */
/*
* This file contains the string that get written
@@ -15,8 +15,7 @@ const char version[] = "Mg 2a";
*/
/* ARGSUSED */
int
-showversion(f, n)
- int f, n;
+showversion(int f, int n)
{
ewprintf(version);
return TRUE;
diff --git a/usr.bin/mg/window.c b/usr.bin/mg/window.c
index d3f9aabf7cc..3240ece1405 100644
--- a/usr.bin/mg/window.c
+++ b/usr.bin/mg/window.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: window.c,v 1.10 2002/02/20 23:57:52 deraadt Exp $ */
+/* $OpenBSD: window.c,v 1.11 2003/05/20 03:08:55 cloder Exp $ */
/*
* Window handling.
@@ -16,8 +16,7 @@
*/
/* ARGSUSED */
int
-reposition(f, n)
- int f, n;
+reposition(int f, int n)
{
#ifndef GOSREC
curwp->w_force = (f & FFARG) ? (n >= 0 ? n + 1 : n) : 0;
@@ -42,8 +41,7 @@ reposition(f, n)
*/
/* ARGSUSED */
int
-refresh(f, n)
- int f, n;
+refresh(int f, int n)
{
MGWIN *wp;
int oldnrow;
@@ -79,8 +77,7 @@ refresh(f, n)
*/
/* ARGSUSED */
int
-nextwind(f, n)
- int f, n;
+nextwind(int f, int n)
{
MGWIN *wp;
@@ -99,8 +96,7 @@ nextwind(f, n)
*/
/* ARGSUSED */
int
-prevwind(f, n)
- int f, n;
+prevwind(int f, int n)
{
MGWIN *wp1, *wp2;
@@ -124,8 +120,7 @@ prevwind(f, n)
*/
/* ARGSUSED */
int
-onlywind(f, n)
- int f, n;
+onlywind(int f, int n)
{
MGWIN *wp;
LINE *lp;
@@ -175,8 +170,7 @@ onlywind(f, n)
*/
/* ARGSUSED */
int
-splitwind(f, n)
- int f, n;
+splitwind(int f, int n)
{
MGWIN *wp, *wp1, *wp2;
LINE *lp;
@@ -261,8 +255,7 @@ splitwind(f, n)
*/
/* ARGSUSED */
int
-enlargewind(f, n)
- int f, n;
+enlargewind(int f, int n)
{
MGWIN *adjwp;
LINE *lp;
@@ -311,8 +304,7 @@ enlargewind(f, n)
* window descriptions. Ask the redisplay to do all the hard work.
*/
int
-shrinkwind(f, n)
- int f, n;
+shrinkwind(int f, int n)
{
MGWIN *adjwp;
LINE *lp;
@@ -366,8 +358,7 @@ shrinkwind(f, n)
*/
/* ARGSUSED */
int
-delwind(f, n)
- int f, n;
+delwind(int f, int n)
{
MGWIN *wp, *nwp;
@@ -404,7 +395,7 @@ delwind(f, n)
* might be better. Return a pointer, or NULL on error.
*/
MGWIN *
-wpopup()
+wpopup(void)
{
MGWIN *wp;
diff --git a/usr.bin/mg/word.c b/usr.bin/mg/word.c
index e92c667ade4..f230dfcbd42 100644
--- a/usr.bin/mg/word.c
+++ b/usr.bin/mg/word.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: word.c,v 1.7 2002/05/29 12:44:59 vincent Exp $ */
+/* $OpenBSD: word.c,v 1.8 2003/05/20 03:08:55 cloder Exp $ */
/*
* Word mode commands.
@@ -14,8 +14,7 @@
*/
/* ARGSUSED */
int
-backword(f, n)
- int f, n;
+backword(int f, int n)
{
if (n < 0)
return forwword(f | FFRAND, -n);
@@ -40,8 +39,7 @@ backword(f, n)
*/
/* ARGSUSED */
int
-forwword(f, n)
- int f, n;
+forwword(int f, int n)
{
if (n < 0)
return backword(f | FFRAND, -n);
@@ -64,8 +62,7 @@ forwword(f, n)
*/
/* ARGSUSED */
int
-upperword(f, n)
- int f, n;
+upperword(int f, int n)
{
int c;
@@ -101,8 +98,7 @@ upperword(f, n)
*/
/* ARGSUSED */
int
-lowerword(f, n)
- int f, n;
+lowerword(int f, int n)
{
int c;
@@ -139,8 +135,7 @@ lowerword(f, n)
*/
/* ARGSUSED */
int
-capword(f, n)
- int f, n;
+capword(int f, int n)
{
int c;
@@ -185,8 +180,7 @@ capword(f, n)
*/
/* ARGSUSED */
int
-delfword(f, n)
- int f, n;
+delfword(int f, int n)
{
RSIZE size;
LINE *dotp;
@@ -239,8 +233,7 @@ out:
*/
/* ARGSUSED */
int
-delbword(f, n)
- int f, n;
+delbword(int f, int n)
{
RSIZE size;
@@ -290,7 +283,7 @@ out:
* part of a word. The word character list is hard coded. Should be setable.
*/
int
-inword()
+inword(void)
{
/* can't use lgetc in ISWORD due to bug in OSK cpp */
return curwp->w_doto != llength(curwp->w_dotp) &&