summaryrefslogtreecommitdiffstats
path: root/contrib/nvi/ex
diff options
context:
space:
mode:
authorbapt <bapt@FreeBSD.org>2015-04-10 17:50:28 +0000
committerbapt <bapt@FreeBSD.org>2015-04-10 17:50:28 +0000
commitc7f08411e0a7093fd65b33ad890811466257df99 (patch)
treebb238a04251527b96bb646b776058bba8293a640 /contrib/nvi/ex
parent62376cf1de8b943fb2849e0ee409f0b0d7293e07 (diff)
parentc42d98a117446dd83b8d13800dd2e3726cb0d2d0 (diff)
downloadFreeBSD-src-c7f08411e0a7093fd65b33ad890811466257df99.zip
FreeBSD-src-c7f08411e0a7093fd65b33ad890811466257df99.tar.gz
Update nvi to 2.1.3 which fixes the data corruption when locale conversion
failed
Diffstat (limited to 'contrib/nvi/ex')
-rw-r--r--contrib/nvi/ex/ex.c30
-rw-r--r--contrib/nvi/ex/ex.h4
-rw-r--r--contrib/nvi/ex/ex_abbrev.c4
-rw-r--r--contrib/nvi/ex/ex_append.c8
-rw-r--r--contrib/nvi/ex/ex_args.c12
-rw-r--r--contrib/nvi/ex/ex_argv.c32
-rw-r--r--contrib/nvi/ex/ex_at.c2
-rw-r--r--contrib/nvi/ex/ex_bang.c2
-rw-r--r--contrib/nvi/ex/ex_cd.c2
-rw-r--r--contrib/nvi/ex/ex_cscope.c44
-rw-r--r--contrib/nvi/ex/ex_delete.c2
-rw-r--r--contrib/nvi/ex/ex_display.c8
-rw-r--r--contrib/nvi/ex/ex_edit.c4
-rw-r--r--contrib/nvi/ex/ex_equal.c2
-rw-r--r--contrib/nvi/ex/ex_file.c2
-rw-r--r--contrib/nvi/ex/ex_filter.c6
-rw-r--r--contrib/nvi/ex/ex_global.c8
-rw-r--r--contrib/nvi/ex/ex_init.c14
-rw-r--r--contrib/nvi/ex/ex_join.c6
-rw-r--r--contrib/nvi/ex/ex_map.c4
-rw-r--r--contrib/nvi/ex/ex_mark.c2
-rw-r--r--contrib/nvi/ex/ex_mkexrc.c2
-rw-r--r--contrib/nvi/ex/ex_move.c4
-rw-r--r--contrib/nvi/ex/ex_open.c2
-rw-r--r--contrib/nvi/ex/ex_preserve.c4
-rw-r--r--contrib/nvi/ex/ex_print.c22
-rw-r--r--contrib/nvi/ex/ex_put.c2
-rw-r--r--contrib/nvi/ex/ex_quit.c2
-rw-r--r--contrib/nvi/ex/ex_read.c4
-rw-r--r--contrib/nvi/ex/ex_screen.c8
-rw-r--r--contrib/nvi/ex/ex_script.c20
-rw-r--r--contrib/nvi/ex/ex_set.c2
-rw-r--r--contrib/nvi/ex/ex_shell.c8
-rw-r--r--contrib/nvi/ex/ex_shift.c6
-rw-r--r--contrib/nvi/ex/ex_source.c2
-rw-r--r--contrib/nvi/ex/ex_stop.c2
-rw-r--r--contrib/nvi/ex/ex_subst.c26
-rw-r--r--contrib/nvi/ex/ex_tag.c60
-rw-r--r--contrib/nvi/ex/ex_txt.c6
-rw-r--r--contrib/nvi/ex/ex_undo.c2
-rw-r--r--contrib/nvi/ex/ex_usage.c6
-rw-r--r--contrib/nvi/ex/ex_util.c12
-rw-r--r--contrib/nvi/ex/ex_version.c2
-rw-r--r--contrib/nvi/ex/ex_visual.c2
-rw-r--r--contrib/nvi/ex/ex_write.c57
-rw-r--r--contrib/nvi/ex/ex_yank.c2
-rw-r--r--contrib/nvi/ex/ex_z.c6
-rw-r--r--contrib/nvi/ex/extern.h258
-rw-r--r--contrib/nvi/ex/version.h2
49 files changed, 348 insertions, 381 deletions
diff --git a/contrib/nvi/ex/ex.c b/contrib/nvi/ex/ex.c
index 609f961..00df2cc 100644
--- a/contrib/nvi/ex/ex.c
+++ b/contrib/nvi/ex/ex.c
@@ -31,20 +31,20 @@ static const char sccsid[] = "$Id: ex.c,v 10.80 2012/10/03 16:24:40 zy Exp $";
#include "../vi/vi.h"
#if defined(DEBUG) && defined(COMLOG)
-static void ex_comlog __P((SCR *, EXCMD *));
+static void ex_comlog(SCR *, EXCMD *);
#endif
static EXCMDLIST const *
- ex_comm_search __P((CHAR_T *, size_t));
-static int ex_discard __P((SCR *));
-static int ex_line __P((SCR *, EXCMD *, MARK *, int *, int *));
-static int ex_load __P((SCR *));
-static void ex_unknown __P((SCR *, CHAR_T *, size_t));
+ ex_comm_search(CHAR_T *, size_t);
+static int ex_discard(SCR *);
+static int ex_line(SCR *, EXCMD *, MARK *, int *, int *);
+static int ex_load(SCR *);
+static void ex_unknown(SCR *, CHAR_T *, size_t);
/*
* ex --
* Main ex loop.
*
- * PUBLIC: int ex __P((SCR **));
+ * PUBLIC: int ex(SCR **);
*/
int
ex(SCR **spp)
@@ -187,7 +187,7 @@ ex(SCR **spp)
*
* For extra credit, try them in a startup .exrc file.
*
- * PUBLIC: int ex_cmd __P((SCR *));
+ * PUBLIC: int ex_cmd(SCR *);
*/
int
ex_cmd(SCR *sp)
@@ -1616,7 +1616,7 @@ rsuccess: tmp = 0;
* ex_range --
* Get a line range for ex commands, or perform a vi ex address search.
*
- * PUBLIC: int ex_range __P((SCR *, EXCMD *, int *));
+ * PUBLIC: int ex_range(SCR *, EXCMD *, int *);
*/
int
ex_range(SCR *sp, EXCMD *ecp, int *errp)
@@ -1689,12 +1689,12 @@ ex_range(SCR *sp, EXCMD *ecp, int *errp)
++ecp->cp;
--ecp->clen;
break;
- case ',': /* Comma delimiter. */
+ case ',': /* Comma delimiter. */
/* Vi ex address searches didn't permit commas. */
if (F_ISSET(ecp, E_VISEARCH))
goto ret;
/* FALLTHROUGH */
- case ';': /* Semi-colon delimiter. */
+ case ';': /* Semi-colon delimiter. */
if (sp->ep == NULL) {
ex_badaddr(sp, NULL, A_EMPTY, NUM_OK);
*errp = 1;
@@ -1825,7 +1825,7 @@ ex_line(SCR *sp, EXCMD *ecp, MARK *mp, int *isaddrp, int *errp)
GS *gp;
long total, val;
int isneg;
- int (*sf) __P((SCR *, MARK *, MARK *, CHAR_T *, size_t, CHAR_T **, u_int));
+ int (*sf)(SCR *, MARK *, MARK *, CHAR_T *, size_t, CHAR_T **, u_int);
CHAR_T *endp;
gp = sp->gp;
@@ -2219,7 +2219,7 @@ alloc_err:
* [un]abbreviate command, so it can turn off abbreviations. See
* the usual ranting in the vi/v_txt_ev.c:txt_abbrev() routine.
*
- * PUBLIC: int ex_is_abbrev __P((CHAR_T *, size_t));
+ * PUBLIC: int ex_is_abbrev(CHAR_T *, size_t);
*/
int
ex_is_abbrev(CHAR_T *name, size_t len)
@@ -2236,7 +2236,7 @@ ex_is_abbrev(CHAR_T *name, size_t len)
* unmap command, so it can turn off input mapping. See the usual
* ranting in the vi/v_txt_ev.c:txt_unmap() routine.
*
- * PUBLIC: int ex_is_unmap __P((CHAR_T *, size_t));
+ * PUBLIC: int ex_is_unmap(CHAR_T *, size_t);
*/
int
ex_is_unmap(CHAR_T *name, size_t len)
@@ -2279,7 +2279,7 @@ ex_comm_search(CHAR_T *name, size_t len)
* Display a bad address message.
*
* PUBLIC: void ex_badaddr
- * PUBLIC: __P((SCR *, EXCMDLIST const *, enum badaddr, enum nresult));
+ * PUBLIC: (SCR *, EXCMDLIST const *, enum badaddr, enum nresult);
*/
void
ex_badaddr(SCR *sp, const EXCMDLIST *cp, enum badaddr ba, enum nresult nret)
diff --git a/contrib/nvi/ex/ex.h b/contrib/nvi/ex/ex.h
index f5ba4c2..4cb52cc 100644
--- a/contrib/nvi/ex/ex.h
+++ b/contrib/nvi/ex/ex.h
@@ -13,7 +13,7 @@
typedef struct _excmdlist { /* Ex command table structure. */
CHAR_T *name; /* Command name, underlying function. */
- int (*fn) __P((SCR *, EXCMD *));
+ int (*fn)(SCR *, EXCMD *);
#define E_ADDR1 0x00000001 /* One address. */
#define E_ADDR2 0x00000002 /* Two addresses. */
@@ -222,7 +222,7 @@ typedef enum {
/* Ex address error types. */
enum badaddr { A_COMBO, A_EMPTY, A_EOF, A_NOTSET, A_ZERO };
-/* Ex common tag error messages. */
+/* Ex common tag error messages. */
typedef enum {
TAG_BADLNO, /* Tag line doesn't exist. */
TAG_EMPTY, /* Tags stack is empty. */
diff --git a/contrib/nvi/ex/ex_abbrev.c b/contrib/nvi/ex/ex_abbrev.c
index 6624889..5fd5735 100644
--- a/contrib/nvi/ex/ex_abbrev.c
+++ b/contrib/nvi/ex/ex_abbrev.c
@@ -31,7 +31,7 @@ static const char sccsid[] = "$Id: ex_abbrev.c,v 10.10 2001/12/16 18:18:54 skimo
* ex_abbr -- :abbreviate [key replacement]
* Create an abbreviation or display abbreviations.
*
- * PUBLIC: int ex_abbr __P((SCR *, EXCMD *));
+ * PUBLIC: int ex_abbr(SCR *, EXCMD *);
*/
int
ex_abbr(SCR *sp, EXCMD *cmdp)
@@ -95,7 +95,7 @@ ex_abbr(SCR *sp, EXCMD *cmdp)
* ex_unabbr -- :unabbreviate key
* Delete an abbreviation.
*
- * PUBLIC: int ex_unabbr __P((SCR *, EXCMD *));
+ * PUBLIC: int ex_unabbr(SCR *, EXCMD *);
*/
int
ex_unabbr(SCR *sp, EXCMD *cmdp)
diff --git a/contrib/nvi/ex/ex_append.c b/contrib/nvi/ex/ex_append.c
index de224f8..d2d44e2 100644
--- a/contrib/nvi/ex/ex_append.c
+++ b/contrib/nvi/ex/ex_append.c
@@ -27,14 +27,14 @@ static const char sccsid[] = "$Id: ex_append.c,v 10.34 2001/06/25 15:19:14 skimo
enum which {APPEND, CHANGE, INSERT};
-static int ex_aci __P((SCR *, EXCMD *, enum which));
+static int ex_aci(SCR *, EXCMD *, enum which);
/*
* ex_append -- :[line] a[ppend][!]
* Append one or more lines of new text after the specified line,
* or the current line if no address is specified.
*
- * PUBLIC: int ex_append __P((SCR *, EXCMD *));
+ * PUBLIC: int ex_append(SCR *, EXCMD *);
*/
int
ex_append(SCR *sp, EXCMD *cmdp)
@@ -46,7 +46,7 @@ ex_append(SCR *sp, EXCMD *cmdp)
* ex_change -- :[line[,line]] c[hange][!] [count]
* Change one or more lines to the input text.
*
- * PUBLIC: int ex_change __P((SCR *, EXCMD *));
+ * PUBLIC: int ex_change(SCR *, EXCMD *);
*/
int
ex_change(SCR *sp, EXCMD *cmdp)
@@ -59,7 +59,7 @@ ex_change(SCR *sp, EXCMD *cmdp)
* Insert one or more lines of new text before the specified line,
* or the current line if no address is specified.
*
- * PUBLIC: int ex_insert __P((SCR *, EXCMD *));
+ * PUBLIC: int ex_insert(SCR *, EXCMD *);
*/
int
ex_insert(SCR *sp, EXCMD *cmdp)
diff --git a/contrib/nvi/ex/ex_args.c b/contrib/nvi/ex/ex_args.c
index 2105d2d..37dfa88 100644
--- a/contrib/nvi/ex/ex_args.c
+++ b/contrib/nvi/ex/ex_args.c
@@ -27,7 +27,7 @@ static const char sccsid[] = "$Id: ex_args.c,v 10.19 2011/12/16 16:18:10 zy Exp
#include "../common/common.h"
#include "../vi/vi.h"
-static int ex_N_next __P((SCR *, EXCMD *));
+static int ex_N_next(SCR *, EXCMD *);
/*
* ex_next -- :next [+cmd] [files]
@@ -39,7 +39,7 @@ static int ex_N_next __P((SCR *, EXCMD *));
* idea was that it ignored the force flag if the autowrite flag was
* set. This implementation handles them all identically.
*
- * PUBLIC: int ex_next __P((SCR *, EXCMD *));
+ * PUBLIC: int ex_next(SCR *, EXCMD *);
*/
int
ex_next(SCR *sp, EXCMD *cmdp)
@@ -171,7 +171,7 @@ ex_N_next(SCR *sp, EXCMD *cmdp)
* ex_prev -- :prev
* Edit the previous file.
*
- * PUBLIC: int ex_prev __P((SCR *, EXCMD *));
+ * PUBLIC: int ex_prev(SCR *, EXCMD *);
*/
int
ex_prev(SCR *sp, EXCMD *cmdp)
@@ -220,7 +220,7 @@ ex_prev(SCR *sp, EXCMD *cmdp)
* anyone noticing, but if they do, we'll have to put information into the SCR
* structure so we can keep track of it.
*
- * PUBLIC: int ex_rew __P((SCR *, EXCMD *));
+ * PUBLIC: int ex_rew(SCR *, EXCMD *);
*/
int
ex_rew(SCR *sp, EXCMD *cmdp)
@@ -258,7 +258,7 @@ ex_rew(SCR *sp, EXCMD *cmdp)
* ex_args -- :args
* Display the list of files.
*
- * PUBLIC: int ex_args __P((SCR *, EXCMD *));
+ * PUBLIC: int ex_args(SCR *, EXCMD *);
*/
int
ex_args(SCR *sp, EXCMD *cmdp)
@@ -299,7 +299,7 @@ ex_args(SCR *sp, EXCMD *cmdp)
* ex_buildargv --
* Build a new file argument list.
*
- * PUBLIC: char **ex_buildargv __P((SCR *, EXCMD *, char *));
+ * PUBLIC: char **ex_buildargv(SCR *, EXCMD *, char *);
*/
char **
ex_buildargv(SCR *sp, EXCMD *cmdp, char *name)
diff --git a/contrib/nvi/ex/ex_argv.c b/contrib/nvi/ex/ex_argv.c
index b3e3edf..2d121cb 100644
--- a/contrib/nvi/ex/ex_argv.c
+++ b/contrib/nvi/ex/ex_argv.c
@@ -30,18 +30,18 @@ static const char sccsid[] = "$Id: ex_argv.c,v 11.2 2012/10/09 23:00:29 zy Exp $
#include "../common/common.h"
-static int argv_alloc __P((SCR *, size_t));
-static int argv_comp __P((const void *, const void *));
-static int argv_fexp __P((SCR *, EXCMD *,
- CHAR_T *, size_t, CHAR_T *, size_t *, CHAR_T **, size_t *, int));
-static int argv_sexp __P((SCR *, CHAR_T **, size_t *, size_t *));
-static int argv_flt_user __P((SCR *, EXCMD *, CHAR_T *, size_t));
+static int argv_alloc(SCR *, size_t);
+static int argv_comp(const void *, const void *);
+static int argv_fexp(SCR *, EXCMD *,
+ CHAR_T *, size_t, CHAR_T *, size_t *, CHAR_T **, size_t *, int);
+static int argv_sexp(SCR *, CHAR_T **, size_t *, size_t *);
+static int argv_flt_user(SCR *, EXCMD *, CHAR_T *, size_t);
/*
* argv_init --
* Build a prototype arguments list.
*
- * PUBLIC: int argv_init __P((SCR *, EXCMD *));
+ * PUBLIC: int argv_init(SCR *, EXCMD *);
*/
int
argv_init(SCR *sp, EXCMD *excp)
@@ -61,7 +61,7 @@ argv_init(SCR *sp, EXCMD *excp)
* argv_exp0 --
* Append a string to the argument list.
*
- * PUBLIC: int argv_exp0 __P((SCR *, EXCMD *, CHAR_T *, size_t));
+ * PUBLIC: int argv_exp0(SCR *, EXCMD *, CHAR_T *, size_t);
*/
int
argv_exp0(SCR *sp, EXCMD *excp, CHAR_T *cmd, size_t cmdlen)
@@ -84,7 +84,7 @@ argv_exp0(SCR *sp, EXCMD *excp, CHAR_T *cmd, size_t cmdlen)
* Do file name expansion on a string, and append it to the
* argument list.
*
- * PUBLIC: int argv_exp1 __P((SCR *, EXCMD *, CHAR_T *, size_t, int));
+ * PUBLIC: int argv_exp1(SCR *, EXCMD *, CHAR_T *, size_t, int);
*/
int
argv_exp1(SCR *sp, EXCMD *excp, CHAR_T *cmd, size_t cmdlen, int is_bang)
@@ -123,7 +123,7 @@ ret: FREE_SPACEW(sp, bp, blen);
* Do file name and shell expansion on a string, and append it to
* the argument list.
*
- * PUBLIC: int argv_exp2 __P((SCR *, EXCMD *, CHAR_T *, size_t));
+ * PUBLIC: int argv_exp2(SCR *, EXCMD *, CHAR_T *, size_t);
*/
int
argv_exp2(SCR *sp, EXCMD *excp, CHAR_T *cmd, size_t cmdlen)
@@ -209,7 +209,7 @@ err: FREE_SPACEW(sp, bp, blen);
* Take a string and break it up into an argv, which is appended
* to the argument list.
*
- * PUBLIC: int argv_exp3 __P((SCR *, EXCMD *, CHAR_T *, size_t));
+ * PUBLIC: int argv_exp3(SCR *, EXCMD *, CHAR_T *, size_t);
*/
int
argv_exp3(SCR *sp, EXCMD *excp, CHAR_T *cmd, size_t cmdlen)
@@ -277,7 +277,7 @@ argv_exp3(SCR *sp, EXCMD *excp, CHAR_T *cmd, size_t cmdlen)
* Filter the ex commands with a prefix, and append the results to
* the argument list.
*
- * PUBLIC: int argv_flt_ex __P((SCR *, EXCMD *, CHAR_T *, size_t));
+ * PUBLIC: int argv_flt_ex(SCR *, EXCMD *, CHAR_T *, size_t);
*/
int
argv_flt_ex(SCR *sp, EXCMD *excp, CHAR_T *cmd, size_t cmdlen)
@@ -520,7 +520,7 @@ mem: msgq(sp, M_SYSERR, NULL);
* argv_free --
* Free up argument structures.
*
- * PUBLIC: int argv_free __P((SCR *));
+ * PUBLIC: int argv_free(SCR *);
*/
int
argv_free(SCR *sp)
@@ -550,7 +550,7 @@ argv_free(SCR *sp)
* Find all file names matching the prefix and append them to the
* argument list.
*
- * PUBLIC: int argv_flt_path __P((SCR *, EXCMD *, CHAR_T *, size_t));
+ * PUBLIC: int argv_flt_path(SCR *, EXCMD *, CHAR_T *, size_t);
*/
int
argv_flt_path(SCR *sp, EXCMD *excp, CHAR_T *path, size_t plen)
@@ -812,7 +812,7 @@ alloc_err: rval = SEXP_ERR;
* argv_esc --
* Escape a string into an ex and shell argument.
*
- * PUBLIC: CHAR_T *argv_esc __P((SCR *, EXCMD *, CHAR_T *, size_t));
+ * PUBLIC: CHAR_T *argv_esc(SCR *, EXCMD *, CHAR_T *, size_t);
*/
CHAR_T *
argv_esc(SCR *sp, EXCMD *excp, CHAR_T *str, size_t len)
@@ -875,7 +875,7 @@ alloc_err:
* argv_uesc --
* Unescape an escaped ex and shell argument.
*
- * PUBLIC: CHAR_T *argv_uesc __P((SCR *, EXCMD *, CHAR_T *, size_t));
+ * PUBLIC: CHAR_T *argv_uesc(SCR *, EXCMD *, CHAR_T *, size_t);
*/
CHAR_T *
argv_uesc(SCR *sp, EXCMD *excp, CHAR_T *str, size_t len)
diff --git a/contrib/nvi/ex/ex_at.c b/contrib/nvi/ex/ex_at.c
index 0c12e6c..875423f 100644
--- a/contrib/nvi/ex/ex_at.c
+++ b/contrib/nvi/ex/ex_at.c
@@ -32,7 +32,7 @@ static const char sccsid[] = "$Id: ex_at.c,v 10.16 2001/06/25 15:19:14 skimo Exp
*
* Execute the contents of the buffer.
*
- * PUBLIC: int ex_at __P((SCR *, EXCMD *));
+ * PUBLIC: int ex_at(SCR *, EXCMD *);
*/
int
ex_at(SCR *sp, EXCMD *cmdp)
diff --git a/contrib/nvi/ex/ex_bang.c b/contrib/nvi/ex/ex_bang.c
index 4b6f75e..9b7c376 100644
--- a/contrib/nvi/ex/ex_bang.c
+++ b/contrib/nvi/ex/ex_bang.c
@@ -44,7 +44,7 @@ static const char sccsid[] = "$Id: ex_bang.c,v 10.36 2001/06/25 15:19:14 skimo E
* ways of getting here display the right things. It took a long time to
* get it right (wrong?), so be careful.
*
- * PUBLIC: int ex_bang __P((SCR *, EXCMD *));
+ * PUBLIC: int ex_bang(SCR *, EXCMD *);
*/
int
ex_bang(SCR *sp, EXCMD *cmdp)
diff --git a/contrib/nvi/ex/ex_cd.c b/contrib/nvi/ex/ex_cd.c
index 30a596f..4b32166 100644
--- a/contrib/nvi/ex/ex_cd.c
+++ b/contrib/nvi/ex/ex_cd.c
@@ -31,7 +31,7 @@ static const char sccsid[] = "$Id: ex_cd.c,v 10.13 2012/04/12 06:28:27 zy Exp $"
* ex_cd -- :cd[!] [directory]
* Change directories.
*
- * PUBLIC: int ex_cd __P((SCR *, EXCMD *));
+ * PUBLIC: int ex_cd(SCR *, EXCMD *);
*/
int
ex_cd(SCR *sp, EXCMD *cmdp)
diff --git a/contrib/nvi/ex/ex_cscope.c b/contrib/nvi/ex/ex_cscope.c
index afc7fa9..0503fb3 100644
--- a/contrib/nvi/ex/ex_cscope.c
+++ b/contrib/nvi/ex/ex_cscope.c
@@ -61,15 +61,15 @@ find c|d|e|f|g|i|s|t buffer|pattern\n\
s: find all uses of name\n\
t: find assignments to name"
-static int cscope_add __P((SCR *, EXCMD *, CHAR_T *));
-static int cscope_find __P((SCR *, EXCMD*, CHAR_T *));
-static int cscope_help __P((SCR *, EXCMD *, CHAR_T *));
-static int cscope_kill __P((SCR *, EXCMD *, CHAR_T *));
-static int cscope_reset __P((SCR *, EXCMD *, CHAR_T *));
+static int cscope_add(SCR *, EXCMD *, CHAR_T *);
+static int cscope_find(SCR *, EXCMD*, CHAR_T *);
+static int cscope_help(SCR *, EXCMD *, CHAR_T *);
+static int cscope_kill(SCR *, EXCMD *, CHAR_T *);
+static int cscope_reset(SCR *, EXCMD *, CHAR_T *);
typedef struct _cc {
char *name;
- int (*function) __P((SCR *, EXCMD *, CHAR_T *));
+ int (*function)(SCR *, EXCMD *, CHAR_T *);
char *help_msg;
char *usage_msg;
} CC;
@@ -88,23 +88,23 @@ static CC const cscope_cmds[] = {
{ NULL }
};
-static TAGQ *create_cs_cmd __P((SCR *, char *, size_t *));
-static int csc_help __P((SCR *, char *));
-static void csc_file __P((SCR *,
- CSC *, char *, char **, size_t *, int *));
-static int get_paths __P((SCR *, CSC *));
-static CC const *lookup_ccmd __P((char *));
-static int parse __P((SCR *, CSC *, TAGQ *, int *));
-static int read_prompt __P((SCR *, CSC *));
-static int run_cscope __P((SCR *, CSC *, char *));
-static int start_cscopes __P((SCR *, EXCMD *));
-static int terminate __P((SCR *, CSC *, int));
+static TAGQ *create_cs_cmd(SCR *, char *, size_t *);
+static int csc_help(SCR *, char *);
+static void csc_file(SCR *,
+ CSC *, char *, char **, size_t *, int *);
+static int get_paths(SCR *, CSC *);
+static CC const *lookup_ccmd(char *);
+static int parse(SCR *, CSC *, TAGQ *, int *);
+static int read_prompt(SCR *, CSC *);
+static int run_cscope(SCR *, CSC *, char *);
+static int start_cscopes(SCR *, EXCMD *);
+static int terminate(SCR *, CSC *, int);
/*
* ex_cscope --
* Perform an ex cscope.
*
- * PUBLIC: int ex_cscope __P((SCR *, EXCMD *));
+ * PUBLIC: int ex_cscope(SCR *, EXCMD *);
*/
int
ex_cscope(SCR *sp, EXCMD *cmdp)
@@ -861,7 +861,7 @@ csc_help(SCR *sp, char *cmd)
return (1);
} else {
ex_printf(sp,
- "Command: %s (%s)\n", ccp->name, ccp->help_msg);
+ "Command: %s (%s)\n", ccp->name, ccp->help_msg);
ex_printf(sp, " Usage: %s\n", ccp->usage_msg);
return (0);
}
@@ -965,7 +965,7 @@ cscope_reset(SCR *sp, EXCMD *cmdp, CHAR_T *notusedp)
* cscope_end --
* End all cscope connections.
*
- * PUBLIC: int cscope_end __P((SCR *));
+ * PUBLIC: int cscope_end(SCR *);
*/
int
cscope_end(SCR *sp)
@@ -982,7 +982,7 @@ cscope_end(SCR *sp)
* cscope_display --
* Display current connections.
*
- * PUBLIC: int cscope_display __P((SCR *));
+ * PUBLIC: int cscope_display(SCR *);
*/
int
cscope_display(SCR *sp)
@@ -1006,7 +1006,7 @@ cscope_display(SCR *sp)
* cscope_search --
* Search a file for a cscope entry.
*
- * PUBLIC: int cscope_search __P((SCR *, TAGQ *, TAG *));
+ * PUBLIC: int cscope_search(SCR *, TAGQ *, TAG *);
*/
int
cscope_search(SCR *sp, TAGQ *tqp, TAG *tp)
diff --git a/contrib/nvi/ex/ex_delete.c b/contrib/nvi/ex/ex_delete.c
index 34bbee4..e599489 100644
--- a/contrib/nvi/ex/ex_delete.c
+++ b/contrib/nvi/ex/ex_delete.c
@@ -28,7 +28,7 @@ static const char sccsid[] = "$Id: ex_delete.c,v 10.11 2001/06/25 15:19:15 skimo
*
* Delete lines from the file.
*
- * PUBLIC: int ex_delete __P((SCR *, EXCMD *));
+ * PUBLIC: int ex_delete(SCR *, EXCMD *);
*/
int
ex_delete(SCR *sp, EXCMD *cmdp)
diff --git a/contrib/nvi/ex/ex_display.c b/contrib/nvi/ex/ex_display.c
index 6142a44..0ace60b 100644
--- a/contrib/nvi/ex/ex_display.c
+++ b/contrib/nvi/ex/ex_display.c
@@ -26,16 +26,16 @@ static const char sccsid[] = "$Id: ex_display.c,v 10.15 2001/06/25 15:19:15 skim
#include "../common/common.h"
#include "tag.h"
-static int is_prefix __P((ARGS *, CHAR_T *));
-static int bdisplay __P((SCR *));
-static void db __P((SCR *, CB *, const char *));
+static int is_prefix(ARGS *, CHAR_T *);
+static int bdisplay(SCR *);
+static void db(SCR *, CB *, const char *);
/*
* ex_display -- :display b[uffers] | c[onnections] | s[creens] | t[ags]
*
* Display cscope connections, buffers, tags or screens.
*
- * PUBLIC: int ex_display __P((SCR *, EXCMD *));
+ * PUBLIC: int ex_display(SCR *, EXCMD *);
*/
int
ex_display(SCR *sp, EXCMD *cmdp)
diff --git a/contrib/nvi/ex/ex_edit.c b/contrib/nvi/ex/ex_edit.c
index ce0f9a4..f9f77e8 100644
--- a/contrib/nvi/ex/ex_edit.c
+++ b/contrib/nvi/ex/ex_edit.c
@@ -27,7 +27,7 @@ static const char sccsid[] = "$Id: ex_edit.c,v 10.15 2011/12/22 23:26:50 zy Exp
#include "../common/common.h"
#include "../vi/vi.h"
-static int ex_N_edit __P((SCR *, EXCMD *, FREF *, int));
+static int ex_N_edit(SCR *, EXCMD *, FREF *, int);
/*
* ex_edit -- :e[dit][!] [+cmd] [file]
@@ -43,7 +43,7 @@ static int ex_N_edit __P((SCR *, EXCMD *, FREF *, int));
* a file name as well. This seems unreasonable, so we support it
* regardless.
*
- * PUBLIC: int ex_edit __P((SCR *, EXCMD *));
+ * PUBLIC: int ex_edit(SCR *, EXCMD *);
*/
int
ex_edit(SCR *sp, EXCMD *cmdp)
diff --git a/contrib/nvi/ex/ex_equal.c b/contrib/nvi/ex/ex_equal.c
index 7da5a20..a6745ce 100644
--- a/contrib/nvi/ex/ex_equal.c
+++ b/contrib/nvi/ex/ex_equal.c
@@ -26,7 +26,7 @@ static const char sccsid[] = "$Id: ex_equal.c,v 10.12 2001/06/25 15:19:15 skimo
/*
* ex_equal -- :address =
*
- * PUBLIC: int ex_equal __P((SCR *, EXCMD *));
+ * PUBLIC: int ex_equal(SCR *, EXCMD *);
*/
int
ex_equal(SCR *sp, EXCMD *cmdp)
diff --git a/contrib/nvi/ex/ex_file.c b/contrib/nvi/ex/ex_file.c
index 12714a3..fdef211 100644
--- a/contrib/nvi/ex/ex_file.c
+++ b/contrib/nvi/ex/ex_file.c
@@ -30,7 +30,7 @@ static const char sccsid[] = "$Id: ex_file.c,v 10.14 2001/06/25 15:19:16 skimo E
* ex_file -- :f[ile] [name]
* Change the file's name and display the status line.
*
- * PUBLIC: int ex_file __P((SCR *, EXCMD *));
+ * PUBLIC: int ex_file(SCR *, EXCMD *);
*/
int
ex_file(SCR *sp, EXCMD *cmdp)
diff --git a/contrib/nvi/ex/ex_filter.c b/contrib/nvi/ex/ex_filter.c
index 9af9a7c..cff55bf 100644
--- a/contrib/nvi/ex/ex_filter.c
+++ b/contrib/nvi/ex/ex_filter.c
@@ -27,7 +27,7 @@ static const char sccsid[] = "$Id: ex_filter.c,v 10.44 2003/11/05 17:11:54 skimo
#include "../common/common.h"
-static int filter_ldisplay __P((SCR *, FILE *));
+static int filter_ldisplay(SCR *, FILE *);
/*
* ex_filter --
@@ -35,8 +35,8 @@ static int filter_ldisplay __P((SCR *, FILE *));
* replace the original text with the stdout/stderr output of
* the utility.
*
- * PUBLIC: int ex_filter __P((SCR *,
- * PUBLIC: EXCMD *, MARK *, MARK *, MARK *, CHAR_T *, enum filtertype));
+ * PUBLIC: int ex_filter(SCR *,
+ * PUBLIC: EXCMD *, MARK *, MARK *, MARK *, CHAR_T *, enum filtertype);
*/
int
ex_filter(SCR *sp, EXCMD *cmdp, MARK *fm, MARK *tm, MARK *rp, CHAR_T *cmd, enum filtertype ftype)
diff --git a/contrib/nvi/ex/ex_global.c b/contrib/nvi/ex/ex_global.c
index 5dbbb07..4482ccd 100644
--- a/contrib/nvi/ex/ex_global.c
+++ b/contrib/nvi/ex/ex_global.c
@@ -30,13 +30,13 @@ static const char sccsid[] = "$Id: ex_global.c,v 10.32 2011/12/26 23:37:01 zy Ex
enum which {GLOBAL, V};
-static int ex_g_setup __P((SCR *, EXCMD *, enum which));
+static int ex_g_setup(SCR *, EXCMD *, enum which);
/*
* ex_global -- [line [,line]] g[lobal][!] /pattern/ [commands]
* Exec on lines matching a pattern.
*
- * PUBLIC: int ex_global __P((SCR *, EXCMD *));
+ * PUBLIC: int ex_global(SCR *, EXCMD *);
*/
int
ex_global(SCR *sp, EXCMD *cmdp)
@@ -49,7 +49,7 @@ ex_global(SCR *sp, EXCMD *cmdp)
* ex_v -- [line [,line]] v /pattern/ [commands]
* Exec on lines not matching a pattern.
*
- * PUBLIC: int ex_v __P((SCR *, EXCMD *));
+ * PUBLIC: int ex_v(SCR *, EXCMD *);
*/
int
ex_v(SCR *sp, EXCMD *cmdp)
@@ -248,7 +248,7 @@ usage: ex_emsg(sp, cmdp->cmd->usage, EXM_USAGE);
* ex_g_insdel --
* Update the ranges based on an insertion or deletion.
*
- * PUBLIC: int ex_g_insdel __P((SCR *, lnop_t, recno_t));
+ * PUBLIC: int ex_g_insdel(SCR *, lnop_t, recno_t);
*/
int
ex_g_insdel(SCR *sp, lnop_t op, recno_t lno)
diff --git a/contrib/nvi/ex/ex_init.c b/contrib/nvi/ex/ex_init.c
index 5b93e5b..ad54591 100644
--- a/contrib/nvi/ex/ex_init.c
+++ b/contrib/nvi/ex/ex_init.c
@@ -30,15 +30,15 @@ static const char sccsid[] = "$Id: ex_init.c,v 10.33 2012/04/11 19:12:34 zy Exp
#include "pathnames.h"
enum rc { NOEXIST, NOPERM, RCOK };
-static enum rc exrc_isok __P((SCR *, struct stat *, char *, int, int));
+static enum rc exrc_isok(SCR *, struct stat *, char *, int, int);
-static int ex_run_file __P((SCR *, char *));
+static int ex_run_file(SCR *, char *);
/*
* ex_screen_copy --
* Copy ex screen.
*
- * PUBLIC: int ex_screen_copy __P((SCR *, SCR *));
+ * PUBLIC: int ex_screen_copy(SCR *, SCR *);
*/
int
ex_screen_copy(SCR *orig, SCR *sp)
@@ -74,7 +74,7 @@ ex_screen_copy(SCR *orig, SCR *sp)
* ex_screen_end --
* End a vi screen.
*
- * PUBLIC: int ex_screen_end __P((SCR *));
+ * PUBLIC: int ex_screen_end(SCR *);
*/
int
ex_screen_end(SCR *sp)
@@ -120,7 +120,7 @@ ex_screen_end(SCR *sp)
* ex_optchange --
* Handle change of options for ex.
*
- * PUBLIC: int ex_optchange __P((SCR *, int, char *, u_long *));
+ * PUBLIC: int ex_optchange(SCR *, int, char *, u_long *);
*/
int
ex_optchange(SCR *sp, int offset, char *str, u_long *valp)
@@ -137,7 +137,7 @@ ex_optchange(SCR *sp, int offset, char *str, u_long *valp)
* Read the EXINIT environment variable and the startup exrc files,
* and execute their commands.
*
- * PUBLIC: int ex_exrc __P((SCR *));
+ * PUBLIC: int ex_exrc(SCR *);
*/
int
ex_exrc(SCR *sp)
@@ -281,7 +281,7 @@ ex_run_file(SCR *sp, char *name)
* ex_run_str --
* Set up a string of ex commands to run.
*
- * PUBLIC: int ex_run_str __P((SCR *, char *, CHAR_T *, size_t, int, int));
+ * PUBLIC: int ex_run_str(SCR *, char *, CHAR_T *, size_t, int, int);
*/
int
ex_run_str(SCR *sp, char *name, CHAR_T *str, size_t len, int ex_flags, int nocopy)
diff --git a/contrib/nvi/ex/ex_join.c b/contrib/nvi/ex/ex_join.c
index 822ed79..2917b2e 100644
--- a/contrib/nvi/ex/ex_join.c
+++ b/contrib/nvi/ex/ex_join.c
@@ -30,7 +30,7 @@ static const char sccsid[] = "$Id: ex_join.c,v 10.17 2004/03/16 14:14:04 skimo E
* ex_join -- :[line [,line]] j[oin][!] [count] [flags]
* Join lines.
*
- * PUBLIC: int ex_join __P((SCR *, EXCMD *));
+ * PUBLIC: int ex_join(SCR *, EXCMD *);
*/
int
ex_join(SCR *sp, EXCMD *cmdp)
@@ -62,7 +62,7 @@ ex_join(SCR *sp, EXCMD *cmdp)
++cmdp->addr2.lno;
clen = tlen = 0;
- for (first = 1,
+ for (first = 1,
from = cmdp->addr1.lno, to = cmdp->addr2.lno; from <= to; ++from) {
/*
* Get next line. Historic versions of vi allowed "10J" while
@@ -154,7 +154,7 @@ ex_join(SCR *sp, EXCMD *cmdp)
sp->lno = cmdp->addr1.lno;
/* Delete the joined lines. */
- for (from = cmdp->addr1.lno, to = cmdp->addr2.lno; to > from; --to)
+ for (from = cmdp->addr1.lno, to = cmdp->addr2.lno; to > from; --to)
if (db_delete(sp, to))
goto err;
diff --git a/contrib/nvi/ex/ex_map.c b/contrib/nvi/ex/ex_map.c
index 60dbfe0..932d633 100644
--- a/contrib/nvi/ex/ex_map.c
+++ b/contrib/nvi/ex/ex_map.c
@@ -40,7 +40,7 @@ static const char sccsid[] = "$Id: ex_map.c,v 10.11 2001/06/25 15:19:17 skimo Ex
* put the map in a .exrc file, things would often work much better.
* No clue why.
*
- * PUBLIC: int ex_map __P((SCR *, EXCMD *));
+ * PUBLIC: int ex_map(SCR *, EXCMD *);
*/
int
ex_map(SCR *sp, EXCMD *cmdp)
@@ -103,7 +103,7 @@ nofunc: if (stype == SEQ_COMMAND && input[1] == '\0')
* ex_unmap -- (:unmap[!] key)
* Unmap a key.
*
- * PUBLIC: int ex_unmap __P((SCR *, EXCMD *));
+ * PUBLIC: int ex_unmap(SCR *, EXCMD *);
*/
int
ex_unmap(SCR *sp, EXCMD *cmdp)
diff --git a/contrib/nvi/ex/ex_mark.c b/contrib/nvi/ex/ex_mark.c
index 8c8ec34..e259837 100644
--- a/contrib/nvi/ex/ex_mark.c
+++ b/contrib/nvi/ex/ex_mark.c
@@ -29,7 +29,7 @@ static const char sccsid[] = "$Id: ex_mark.c,v 10.9 2001/06/25 15:19:17 skimo Ex
* Mark lines.
*
*
- * PUBLIC: int ex_mark __P((SCR *, EXCMD *));
+ * PUBLIC: int ex_mark(SCR *, EXCMD *);
*/
int
ex_mark(SCR *sp, EXCMD *cmdp)
diff --git a/contrib/nvi/ex/ex_mkexrc.c b/contrib/nvi/ex/ex_mkexrc.c
index 8753014..82678b1 100644
--- a/contrib/nvi/ex/ex_mkexrc.c
+++ b/contrib/nvi/ex/ex_mkexrc.c
@@ -34,7 +34,7 @@ static const char sccsid[] = "$Id: ex_mkexrc.c,v 10.13 2001/06/25 15:19:17 skimo
*
* Create (or overwrite) a .exrc file with the current info.
*
- * PUBLIC: int ex_mkexrc __P((SCR *, EXCMD *));
+ * PUBLIC: int ex_mkexrc(SCR *, EXCMD *);
*/
int
ex_mkexrc(SCR *sp, EXCMD *cmdp)
diff --git a/contrib/nvi/ex/ex_move.c b/contrib/nvi/ex/ex_move.c
index c2499fd..a7f6b5f 100644
--- a/contrib/nvi/ex/ex_move.c
+++ b/contrib/nvi/ex/ex_move.c
@@ -29,7 +29,7 @@ static const char sccsid[] = "$Id: ex_move.c,v 10.16 2012/02/11 15:52:33 zy Exp
* ex_copy -- :[line [,line]] co[py] line [flags]
* Copy selected lines.
*
- * PUBLIC: int ex_copy __P((SCR *, EXCMD *));
+ * PUBLIC: int ex_copy(SCR *, EXCMD *);
*/
int
ex_copy(SCR *sp, EXCMD *cmdp)
@@ -81,7 +81,7 @@ err: text_lfree(cb.textq);
* ex_move -- :[line [,line]] mo[ve] line
* Move selected lines.
*
- * PUBLIC: int ex_move __P((SCR *, EXCMD *));
+ * PUBLIC: int ex_move(SCR *, EXCMD *);
*/
int
ex_move(SCR *sp, EXCMD *cmdp)
diff --git a/contrib/nvi/ex/ex_open.c b/contrib/nvi/ex/ex_open.c
index 97414b9..ca54eca 100644
--- a/contrib/nvi/ex/ex_open.c
+++ b/contrib/nvi/ex/ex_open.c
@@ -28,7 +28,7 @@ static const char sccsid[] = "$Id: ex_open.c,v 10.8 2001/06/25 15:19:17 skimo Ex
*
* Switch to single line "open" mode.
*
- * PUBLIC: int ex_open __P((SCR *, EXCMD *));
+ * PUBLIC: int ex_open(SCR *, EXCMD *);
*/
int
ex_open(SCR *sp, EXCMD *cmdp)
diff --git a/contrib/nvi/ex/ex_preserve.c b/contrib/nvi/ex/ex_preserve.c
index bda4bb4..e0dc286 100644
--- a/contrib/nvi/ex/ex_preserve.c
+++ b/contrib/nvi/ex/ex_preserve.c
@@ -29,7 +29,7 @@ static const char sccsid[] = "$Id: ex_preserve.c,v 10.15 2001/06/25 15:19:18 ski
* ex_preserve -- :pre[serve]
* Push the file to recovery.
*
- * PUBLIC: int ex_preserve __P((SCR *, EXCMD *));
+ * PUBLIC: int ex_preserve(SCR *, EXCMD *);
*/
int
ex_preserve(SCR *sp, EXCMD *cmdp)
@@ -63,7 +63,7 @@ ex_preserve(SCR *sp, EXCMD *cmdp)
* ex_recover -- :rec[over][!] file
* Recover the file.
*
- * PUBLIC: int ex_recover __P((SCR *, EXCMD *));
+ * PUBLIC: int ex_recover(SCR *, EXCMD *);
*/
int
ex_recover(SCR *sp, EXCMD *cmdp)
diff --git a/contrib/nvi/ex/ex_print.c b/contrib/nvi/ex/ex_print.c
index 5903e97..7cdde7a 100644
--- a/contrib/nvi/ex/ex_print.c
+++ b/contrib/nvi/ex/ex_print.c
@@ -26,15 +26,15 @@ static const char sccsid[] = "$Id: ex_print.c,v 10.26 2013/11/02 02:11:07 zy Exp
#include "../common/common.h"
-static int ex_prchars __P((SCR *, const CHAR_T *, size_t *, size_t,
- u_int, int));
+static int ex_prchars(SCR *,
+ const CHAR_T *, size_t *, size_t, u_int, int);
/*
* ex_list -- :[line [,line]] l[ist] [count] [flags]
*
* Display the addressed lines such that the output is unambiguous.
*
- * PUBLIC: int ex_list __P((SCR *, EXCMD *));
+ * PUBLIC: int ex_list(SCR *, EXCMD *);
*/
int
ex_list(SCR *sp, EXCMD *cmdp)
@@ -52,7 +52,7 @@ ex_list(SCR *sp, EXCMD *cmdp)
*
* Display the addressed lines with a leading line number.
*
- * PUBLIC: int ex_number __P((SCR *, EXCMD *));
+ * PUBLIC: int ex_number(SCR *, EXCMD *);
*/
int
ex_number(SCR *sp, EXCMD *cmdp)
@@ -70,7 +70,7 @@ ex_number(SCR *sp, EXCMD *cmdp)
*
* Display the addressed lines.
*
- * PUBLIC: int ex_pr __P((SCR *, EXCMD *));
+ * PUBLIC: int ex_pr(SCR *, EXCMD *);
*/
int
ex_pr(SCR *sp, EXCMD *cmdp)
@@ -86,7 +86,7 @@ ex_pr(SCR *sp, EXCMD *cmdp)
* ex_print --
* Print the selected lines.
*
- * PUBLIC: int ex_print __P((SCR *, EXCMD *, MARK *, MARK *, u_int32_t));
+ * PUBLIC: int ex_print(SCR *, EXCMD *, MARK *, MARK *, u_int32_t);
*/
int
ex_print(SCR *sp, EXCMD *cmdp, MARK *fp, MARK *tp, u_int32_t flags)
@@ -141,7 +141,7 @@ ex_print(SCR *sp, EXCMD *cmdp, MARK *fp, MARK *tp, u_int32_t flags)
* ex_ldisplay --
* Display a line without any preceding number.
*
- * PUBLIC: int ex_ldisplay __P((SCR *, const CHAR_T *, size_t, size_t, u_int));
+ * PUBLIC: int ex_ldisplay(SCR *, const CHAR_T *, size_t, size_t, u_int);
*/
int
ex_ldisplay(SCR *sp, const CHAR_T *p, size_t len, size_t col, u_int flags)
@@ -162,7 +162,7 @@ ex_ldisplay(SCR *sp, const CHAR_T *p, size_t len, size_t col, u_int flags)
* ex_scprint --
* Display a line for the substitute with confirmation routine.
*
- * PUBLIC: int ex_scprint __P((SCR *, MARK *, MARK *));
+ * PUBLIC: int ex_scprint(SCR *, MARK *, MARK *);
*/
int
ex_scprint(SCR *sp, MARK *fp, MARK *tp)
@@ -258,7 +258,7 @@ intr: *colp = col;
* ex_printf --
* Ex's version of printf.
*
- * PUBLIC: int ex_printf __P((SCR *, const char *, ...));
+ * PUBLIC: int ex_printf(SCR *, const char *, ...);
*/
int
ex_printf(
@@ -288,7 +288,7 @@ ex_printf(
* ex_puts --
* Ex's version of puts.
*
- * PUBLIC: int ex_puts __P((SCR *, const char *));
+ * PUBLIC: int ex_puts(SCR *, const char *);
*/
int
ex_puts(SCR *sp, const char *str)
@@ -314,7 +314,7 @@ ex_puts(SCR *sp, const char *str)
* ex_fflush --
* Ex's version of fflush.
*
- * PUBLIC: int ex_fflush __P((SCR *sp));
+ * PUBLIC: int ex_fflush(SCR *sp);
*/
int
ex_fflush(SCR *sp)
diff --git a/contrib/nvi/ex/ex_put.c b/contrib/nvi/ex/ex_put.c
index 7a3996b..384b500 100644
--- a/contrib/nvi/ex/ex_put.c
+++ b/contrib/nvi/ex/ex_put.c
@@ -29,7 +29,7 @@ static const char sccsid[] = "$Id: ex_put.c,v 10.8 2001/06/25 15:19:18 skimo Exp
* ex_put -- [line] pu[t] [buffer]
* Append a cut buffer into the file.
*
- * PUBLIC: int ex_put __P((SCR *, EXCMD *));
+ * PUBLIC: int ex_put(SCR *, EXCMD *);
*/
int
ex_put(SCR *sp, EXCMD *cmdp)
diff --git a/contrib/nvi/ex/ex_quit.c b/contrib/nvi/ex/ex_quit.c
index 2cfaeb1..faf31d7 100644
--- a/contrib/nvi/ex/ex_quit.c
+++ b/contrib/nvi/ex/ex_quit.c
@@ -27,7 +27,7 @@ static const char sccsid[] = "$Id: ex_quit.c,v 10.8 2001/06/25 15:19:18 skimo Ex
* ex_quit -- :quit[!]
* Quit.
*
- * PUBLIC: int ex_quit __P((SCR *, EXCMD *));
+ * PUBLIC: int ex_quit(SCR *, EXCMD *);
*/
int
ex_quit(SCR *sp, EXCMD *cmdp)
diff --git a/contrib/nvi/ex/ex_read.c b/contrib/nvi/ex/ex_read.c
index 187f090..00276a2 100644
--- a/contrib/nvi/ex/ex_read.c
+++ b/contrib/nvi/ex/ex_read.c
@@ -36,7 +36,7 @@ static const char sccsid[] = "$Id: ex_read.c,v 10.44 2001/06/25 15:19:19 skimo E
* !!!
* Historical vi wouldn't undo a filter read, for no apparent reason.
*
- * PUBLIC: int ex_read __P((SCR *, EXCMD *));
+ * PUBLIC: int ex_read(SCR *, EXCMD *);
*/
int
ex_read(SCR *sp, EXCMD *cmdp)
@@ -291,7 +291,7 @@ ex_read(SCR *sp, EXCMD *cmdp)
* ex_readfp --
* Read lines into the file.
*
- * PUBLIC: int ex_readfp __P((SCR *, char *, FILE *, MARK *, recno_t *, int));
+ * PUBLIC: int ex_readfp(SCR *, char *, FILE *, MARK *, recno_t *, int);
*/
int
ex_readfp(SCR *sp, char *name, FILE *fp, MARK *fm, recno_t *nlinesp, int silent)
diff --git a/contrib/nvi/ex/ex_screen.c b/contrib/nvi/ex/ex_screen.c
index 9cb108f9..7bec2bc 100644
--- a/contrib/nvi/ex/ex_screen.c
+++ b/contrib/nvi/ex/ex_screen.c
@@ -30,7 +30,7 @@ static const char sccsid[] = "$Id: ex_screen.c,v 10.12 2001/06/25 15:19:19 skimo
* ex_bg -- :bg
* Hide the screen.
*
- * PUBLIC: int ex_bg __P((SCR *, EXCMD *));
+ * PUBLIC: int ex_bg(SCR *, EXCMD *);
*/
int
ex_bg(SCR *sp, EXCMD *cmdp)
@@ -42,7 +42,7 @@ ex_bg(SCR *sp, EXCMD *cmdp)
* ex_fg -- :fg [file]
* Show the screen.
*
- * PUBLIC: int ex_fg __P((SCR *, EXCMD *));
+ * PUBLIC: int ex_fg(SCR *, EXCMD *);
*/
int
ex_fg(SCR *sp, EXCMD *cmdp)
@@ -66,7 +66,7 @@ ex_fg(SCR *sp, EXCMD *cmdp)
* ex_resize -- :resize [+-]rows
* Change the screen size.
*
- * PUBLIC: int ex_resize __P((SCR *, EXCMD *));
+ * PUBLIC: int ex_resize(SCR *, EXCMD *);
*/
int
ex_resize(SCR *sp, EXCMD *cmdp)
@@ -95,7 +95,7 @@ ex_resize(SCR *sp, EXCMD *cmdp)
* ex_sdisplay --
* Display the list of screens.
*
- * PUBLIC: int ex_sdisplay __P((SCR *));
+ * PUBLIC: int ex_sdisplay(SCR *);
*/
int
ex_sdisplay(SCR *sp)
diff --git a/contrib/nvi/ex/ex_script.c b/contrib/nvi/ex/ex_script.c
index 5ba0acf..2dc4465 100644
--- a/contrib/nvi/ex/ex_script.c
+++ b/contrib/nvi/ex/ex_script.c
@@ -45,18 +45,18 @@ static const char sccsid[] = "$Id: ex_script.c,v 10.44 2012/10/05 10:17:47 zy Ex
#include "script.h"
#include "pathnames.h"
-static void sscr_check __P((SCR *));
-static int sscr_getprompt __P((SCR *));
-static int sscr_init __P((SCR *));
-static int sscr_insert __P((SCR *));
-static int sscr_matchprompt __P((SCR *, char *, size_t, size_t *));
-static int sscr_setprompt __P((SCR *, char *, size_t));
+static void sscr_check(SCR *);
+static int sscr_getprompt(SCR *);
+static int sscr_init(SCR *);
+static int sscr_insert(SCR *);
+static int sscr_matchprompt(SCR *, char *, size_t, size_t *);
+static int sscr_setprompt(SCR *, char *, size_t);
/*
* ex_script -- : sc[ript][!] [file]
* Switch to script mode.
*
- * PUBLIC: int ex_script __P((SCR *, EXCMD *));
+ * PUBLIC: int ex_script(SCR *, EXCMD *);
*/
int
ex_script(SCR *sp, EXCMD *cmdp)
@@ -292,7 +292,7 @@ prompterr: sscr_end(sp);
* sscr_exec --
* Take a line and hand it off to the shell.
*
- * PUBLIC: int sscr_exec __P((SCR *, recno_t));
+ * PUBLIC: int sscr_exec(SCR *, recno_t);
*/
int
sscr_exec(SCR *sp, recno_t lno)
@@ -368,7 +368,7 @@ err1: rval = 1;
* sscr_input --
* Read any waiting shell input.
*
- * PUBLIC: int sscr_input __P((SCR *));
+ * PUBLIC: int sscr_input(SCR *);
*/
int
sscr_input(SCR *sp)
@@ -577,7 +577,7 @@ sscr_matchprompt(SCR *sp, char *lp, size_t line_len, size_t *lenp)
* sscr_end --
* End the pipe to a shell.
*
- * PUBLIC: int sscr_end __P((SCR *));
+ * PUBLIC: int sscr_end(SCR *);
*/
int
sscr_end(SCR *sp)
diff --git a/contrib/nvi/ex/ex_set.c b/contrib/nvi/ex/ex_set.c
index 5134bab..2acc3a8 100644
--- a/contrib/nvi/ex/ex_set.c
+++ b/contrib/nvi/ex/ex_set.c
@@ -27,7 +27,7 @@ static const char sccsid[] = "$Id: ex_set.c,v 10.8 2001/06/25 15:19:19 skimo Exp
* ex_set -- :set
* Ex set option.
*
- * PUBLIC: int ex_set __P((SCR *, EXCMD *));
+ * PUBLIC: int ex_set(SCR *, EXCMD *);
*/
int
ex_set(SCR *sp, EXCMD *cmdp)
diff --git a/contrib/nvi/ex/ex_shell.c b/contrib/nvi/ex/ex_shell.c
index d127305..43be5cb 100644
--- a/contrib/nvi/ex/ex_shell.c
+++ b/contrib/nvi/ex/ex_shell.c
@@ -29,14 +29,14 @@ static const char sccsid[] = "$Id: ex_shell.c,v 10.44 2012/07/06 06:51:26 zy Exp
#include "../common/common.h"
-static const char *sigmsg __P((int));
+static const char *sigmsg(int);
/*
* ex_shell -- :sh[ell]
* Invoke the program named in the SHELL environment variable
* with the argument -i.
*
- * PUBLIC: int ex_shell __P((SCR *, EXCMD *));
+ * PUBLIC: int ex_shell(SCR *, EXCMD *);
*/
int
ex_shell(SCR *sp, EXCMD *cmdp)
@@ -82,7 +82,7 @@ ex_shell(SCR *sp, EXCMD *cmdp)
* ex_exec_proc --
* Run a separate process.
*
- * PUBLIC: int ex_exec_proc __P((SCR *, EXCMD *, char *, const char *, int));
+ * PUBLIC: int ex_exec_proc(SCR *, EXCMD *, char *, const char *, int);
*/
int
ex_exec_proc(SCR *sp, EXCMD *cmdp, char *cmd, const char *msg, int need_newline)
@@ -147,7 +147,7 @@ ex_exec_proc(SCR *sp, EXCMD *cmdp, char *cmd, const char *msg, int need_newline)
* rules get you. I'm using a long based on the belief that nobody is
* going to make it unsigned and it's unlikely to be a quad.
*
- * PUBLIC: int proc_wait __P((SCR *, long, const char *, int, int));
+ * PUBLIC: int proc_wait(SCR *, long, const char *, int, int);
*/
int
proc_wait(SCR *sp, long int pid, const char *cmd, int silent, int okpipe)
diff --git a/contrib/nvi/ex/ex_shift.c b/contrib/nvi/ex/ex_shift.c
index cc6e1aa..fec800c 100644
--- a/contrib/nvi/ex/ex_shift.c
+++ b/contrib/nvi/ex/ex_shift.c
@@ -26,13 +26,13 @@ static const char sccsid[] = "$Id: ex_shift.c,v 10.17 2001/06/25 15:19:20 skimo
#include "../common/common.h"
enum which {LEFT, RIGHT};
-static int shift __P((SCR *, EXCMD *, enum which));
+static int shift(SCR *, EXCMD *, enum which);
/*
* ex_shiftl -- :<[<...]
*
*
- * PUBLIC: int ex_shiftl __P((SCR *, EXCMD *));
+ * PUBLIC: int ex_shiftl(SCR *, EXCMD *);
*/
int
ex_shiftl(SCR *sp, EXCMD *cmdp)
@@ -43,7 +43,7 @@ ex_shiftl(SCR *sp, EXCMD *cmdp)
/*
* ex_shiftr -- :>[>...]
*
- * PUBLIC: int ex_shiftr __P((SCR *, EXCMD *));
+ * PUBLIC: int ex_shiftr(SCR *, EXCMD *);
*/
int
ex_shiftr(SCR *sp, EXCMD *cmdp)
diff --git a/contrib/nvi/ex/ex_source.c b/contrib/nvi/ex/ex_source.c
index 63375d2..6ac698d 100644
--- a/contrib/nvi/ex/ex_source.c
+++ b/contrib/nvi/ex/ex_source.c
@@ -32,7 +32,7 @@ static const char sccsid[] = "$Id: ex_source.c,v 10.17 2011/12/19 16:17:06 zy Ex
* ex_source -- :source file
* Execute ex commands from a file.
*
- * PUBLIC: int ex_source __P((SCR *, EXCMD *));
+ * PUBLIC: int ex_source(SCR *, EXCMD *);
*/
int
ex_source(SCR *sp, EXCMD *cmdp)
diff --git a/contrib/nvi/ex/ex_stop.c b/contrib/nvi/ex/ex_stop.c
index 7916789..4bc1bb2 100644
--- a/contrib/nvi/ex/ex_stop.c
+++ b/contrib/nvi/ex/ex_stop.c
@@ -31,7 +31,7 @@ static const char sccsid[] = "$Id: ex_stop.c,v 10.11 2001/06/25 15:19:20 skimo E
* :suspend[!]
* Suspend execution.
*
- * PUBLIC: int ex_stop __P((SCR *, EXCMD *));
+ * PUBLIC: int ex_stop(SCR *, EXCMD *);
*/
int
ex_stop(SCR *sp, EXCMD *cmdp)
diff --git a/contrib/nvi/ex/ex_subst.c b/contrib/nvi/ex/ex_subst.c
index 9339843..db79376 100644
--- a/contrib/nvi/ex/ex_subst.c
+++ b/contrib/nvi/ex/ex_subst.c
@@ -32,12 +32,12 @@ static const char sccsid[] = "$Id: ex_subst.c,v 10.53 2011/12/21 20:40:35 zy Exp
#define SUB_FIRST 0x01 /* The 'r' flag isn't reasonable. */
#define SUB_MUSTSETR 0x02 /* The 'r' flag is required. */
-static int re_conv __P((SCR *, CHAR_T **, size_t *, int *));
-static int re_cscope_conv __P((SCR *, CHAR_T **, size_t *, int *));
-static int re_sub __P((SCR *,
- CHAR_T *, CHAR_T **, size_t *, size_t *, regmatch_t [10]));
-static int re_tag_conv __P((SCR *, CHAR_T **, size_t *, int *));
-static int s __P((SCR *, EXCMD *, CHAR_T *, regex_t *, u_int));
+static int re_conv(SCR *, CHAR_T **, size_t *, int *);
+static int re_cscope_conv(SCR *, CHAR_T **, size_t *, int *);
+static int re_sub(SCR *,
+ CHAR_T *, CHAR_T **, size_t *, size_t *, regmatch_t [10]);
+static int re_tag_conv(SCR *, CHAR_T **, size_t *, int *);
+static int s(SCR *, EXCMD *, CHAR_T *, regex_t *, u_int);
/*
* ex_s --
@@ -45,7 +45,7 @@ static int s __P((SCR *, EXCMD *, CHAR_T *, regex_t *, u_int));
*
* Substitute on lines matching a pattern.
*
- * PUBLIC: int ex_s __P((SCR *, EXCMD *));
+ * PUBLIC: int ex_s(SCR *, EXCMD *);
*/
int
ex_s(SCR *sp, EXCMD *cmdp)
@@ -250,7 +250,7 @@ tilde: ++p;
*
* Substitute using the last substitute RE and replacement pattern.
*
- * PUBLIC: int ex_subagain __P((SCR *, EXCMD *));
+ * PUBLIC: int ex_subagain(SCR *, EXCMD *);
*/
int
ex_subagain(SCR *sp, EXCMD *cmdp)
@@ -273,7 +273,7 @@ ex_subagain(SCR *sp, EXCMD *cmdp)
*
* Substitute using the last RE and last substitute replacement pattern.
*
- * PUBLIC: int ex_subtilde __P((SCR *, EXCMD *));
+ * PUBLIC: int ex_subtilde(SCR *, EXCMD *);
*/
int
ex_subtilde(SCR *sp, EXCMD *cmdp)
@@ -879,8 +879,8 @@ err: rval = 1;
* re_compile --
* Compile the RE.
*
- * PUBLIC: int re_compile __P((SCR *,
- * PUBLIC: CHAR_T *, size_t, CHAR_T **, size_t *, regex_t *, u_int));
+ * PUBLIC: int re_compile(SCR *,
+ * PUBLIC: CHAR_T *, size_t, CHAR_T **, size_t *, regex_t *, u_int);
*/
int
re_compile(SCR *sp, CHAR_T *ptrn, size_t plen, CHAR_T **ptrnp, size_t *lenp, regex_t *rep, u_int flags)
@@ -1280,7 +1280,7 @@ re_cscope_conv(SCR *sp, CHAR_T **ptrnp, size_t *plenp, int *replacedp)
* re_error --
* Report a regular expression error.
*
- * PUBLIC: void re_error __P((SCR *, int, regex_t *));
+ * PUBLIC: void re_error(SCR *, int, regex_t *);
*/
void
re_error(SCR *sp, int errcode, regex_t *preg)
@@ -1396,7 +1396,7 @@ re_sub(
case '5': case '6': case '7': case '8': case '9':
no = *rp++ - '0';
subzero: if (match[no].rm_so == -1 ||
- match[no].rm_eo == -1)
+ match[no].rm_eo == -1)
break;
mlen = match[no].rm_eo - match[no].rm_so;
for (t = ip + match[no].rm_so; mlen--; ++t)
diff --git a/contrib/nvi/ex/ex_tag.c b/contrib/nvi/ex/ex_tag.c
index 4ef03fb..172e5e2 100644
--- a/contrib/nvi/ex/ex_tag.c
+++ b/contrib/nvi/ex/ex_tag.c
@@ -36,24 +36,24 @@ static const char sccsid[] = "$Id: ex_tag.c,v 10.54 2012/04/12 07:17:30 zy Exp $
#include "../vi/vi.h"
#include "tag.h"
-static char *binary_search __P((char *, char *, char *));
-static int compare __P((char *, char *, char *));
-static void ctag_file __P((SCR *, TAGF *, char *, char **, size_t *));
-static int ctag_search __P((SCR *, CHAR_T *, size_t, char *));
-static int ctag_sfile __P((SCR *, TAGF *, TAGQ *, char *));
-static TAGQ *ctag_slist __P((SCR *, CHAR_T *));
-static char *linear_search __P((char *, char *, char *, long));
-static int tag_copy __P((SCR *, TAG *, TAG **));
-static int tag_pop __P((SCR *, TAGQ *, int));
-static int tagf_copy __P((SCR *, TAGF *, TAGF **));
-static int tagf_free __P((SCR *, TAGF *));
-static int tagq_copy __P((SCR *, TAGQ *, TAGQ **));
+static char *binary_search(char *, char *, char *);
+static int compare(char *, char *, char *);
+static void ctag_file(SCR *, TAGF *, char *, char **, size_t *);
+static int ctag_search(SCR *, CHAR_T *, size_t, char *);
+static int ctag_sfile(SCR *, TAGF *, TAGQ *, char *);
+static TAGQ *ctag_slist(SCR *, CHAR_T *);
+static char *linear_search(char *, char *, char *, long);
+static int tag_copy(SCR *, TAG *, TAG **);
+static int tag_pop(SCR *, TAGQ *, int);
+static int tagf_copy(SCR *, TAGF *, TAGF **);
+static int tagf_free(SCR *, TAGF *);
+static int tagq_copy(SCR *, TAGQ *, TAGQ **);
/*
* ex_tag_first --
* The tag code can be entered from main, e.g., "vi -t tag".
*
- * PUBLIC: int ex_tag_first __P((SCR *, CHAR_T *));
+ * PUBLIC: int ex_tag_first(SCR *, CHAR_T *);
*/
int
ex_tag_first(SCR *sp, CHAR_T *tagarg)
@@ -86,7 +86,7 @@ ex_tag_first(SCR *sp, CHAR_T *tagarg)
*
* Enter a new TAGQ context based on a ctag string.
*
- * PUBLIC: int ex_tag_push __P((SCR *, EXCMD *));
+ * PUBLIC: int ex_tag_push(SCR *, EXCMD *);
*/
int
ex_tag_push(SCR *sp, EXCMD *cmdp)
@@ -137,7 +137,7 @@ ex_tag_push(SCR *sp, EXCMD *cmdp)
* ex_tag_next --
* Switch context to the next TAG.
*
- * PUBLIC: int ex_tag_next __P((SCR *, EXCMD *));
+ * PUBLIC: int ex_tag_next(SCR *, EXCMD *);
*/
int
ex_tag_next(SCR *sp, EXCMD *cmdp)
@@ -177,7 +177,7 @@ ex_tag_next(SCR *sp, EXCMD *cmdp)
* ex_tag_prev --
* Switch context to the next TAG.
*
- * PUBLIC: int ex_tag_prev __P((SCR *, EXCMD *));
+ * PUBLIC: int ex_tag_prev(SCR *, EXCMD *);
*/
int
ex_tag_prev(SCR *sp, EXCMD *cmdp)
@@ -217,7 +217,7 @@ ex_tag_prev(SCR *sp, EXCMD *cmdp)
* ex_tag_nswitch --
* Switch context to the specified TAG.
*
- * PUBLIC: int ex_tag_nswitch __P((SCR *, TAG *, int));
+ * PUBLIC: int ex_tag_nswitch(SCR *, TAG *, int);
*/
int
ex_tag_nswitch(SCR *sp, TAG *tp, int force)
@@ -251,7 +251,7 @@ ex_tag_nswitch(SCR *sp, TAG *tp, int force)
* ex_tag_Nswitch --
* Switch context to the specified TAG in a new screen.
*
- * PUBLIC: int ex_tag_Nswitch __P((SCR *, TAG *, int));
+ * PUBLIC: int ex_tag_Nswitch(SCR *, TAG *, int);
*/
int
ex_tag_Nswitch(SCR *sp, TAG *tp, int force)
@@ -305,7 +305,7 @@ ex_tag_Nswitch(SCR *sp, TAG *tp, int force)
*
* Pop to a previous TAGQ context.
*
- * PUBLIC: int ex_tag_pop __P((SCR *, EXCMD *));
+ * PUBLIC: int ex_tag_pop(SCR *, EXCMD *);
*/
int
ex_tag_pop(SCR *sp, EXCMD *cmdp)
@@ -384,7 +384,7 @@ filearg: arglen = strlen(arg);
* ex_tag_top -- :tagt[op][!]
* Clear the tag stack.
*
- * PUBLIC: int ex_tag_top __P((SCR *, EXCMD *));
+ * PUBLIC: int ex_tag_top(SCR *, EXCMD *);
*/
int
ex_tag_top(SCR *sp, EXCMD *cmdp)
@@ -459,7 +459,7 @@ tag_pop(SCR *sp, TAGQ *dtqp, int force)
* ex_tag_display --
* Display the list of tags.
*
- * PUBLIC: int ex_tag_display __P((SCR *));
+ * PUBLIC: int ex_tag_display(SCR *);
*/
int
ex_tag_display(SCR *sp)
@@ -536,7 +536,7 @@ ex_tag_display(SCR *sp)
* ex_tag_copy --
* Copy a screen's tag structures.
*
- * PUBLIC: int ex_tag_copy __P((SCR *, SCR *));
+ * PUBLIC: int ex_tag_copy(SCR *, SCR *);
*/
int
ex_tag_copy(SCR *orig, SCR *sp)
@@ -677,7 +677,7 @@ tagf_free(SCR *sp, TAGF *tfp)
* tagq_free --
* Free a TAGQ structure (and associated TAG structures).
*
- * PUBLIC: int tagq_free __P((SCR *, TAGQ *));
+ * PUBLIC: int tagq_free(SCR *, TAGQ *);
*/
int
tagq_free(SCR *sp, TAGQ *tqp)
@@ -702,7 +702,7 @@ tagq_free(SCR *sp, TAGQ *tqp)
}
/*
- * PUBLIC: int tagq_push __P((SCR*, TAGQ*, int, int ));
+ * PUBLIC: int tagq_push(SCR*, TAGQ*, int, int );
*/
int
tagq_push(SCR *sp, TAGQ *tqp, int new_screen, int force)
@@ -814,7 +814,7 @@ alloc_err:
* tag_msg
* A few common messages.
*
- * PUBLIC: void tag_msg __P((SCR *, tagmsg_t, char *));
+ * PUBLIC: void tag_msg(SCR *, tagmsg_t, char *);
*/
void
tag_msg(SCR *sp, tagmsg_t msg, char *tag)
@@ -839,7 +839,7 @@ tag_msg(SCR *sp, tagmsg_t msg, char *tag)
* ex_tagf_alloc --
* Create a new list of ctag files.
*
- * PUBLIC: int ex_tagf_alloc __P((SCR *, char *));
+ * PUBLIC: int ex_tagf_alloc(SCR *, char *);
*/
int
ex_tagf_alloc(SCR *sp, char *str)
@@ -881,7 +881,7 @@ ex_tagf_alloc(SCR *sp, char *str)
* ex_tag_free --
* Free the ex tag information.
*
- * PUBLIC: int ex_tag_free __P((SCR *));
+ * PUBLIC: int ex_tag_free(SCR *);
*/
int
ex_tag_free(SCR *sp)
@@ -1241,9 +1241,9 @@ ctag_file(SCR *sp, TAGF *tfp, char *name, char **dirp, size_t *dlenp)
while (p < back && *p++ != '\n') continue;
static char *
-binary_search(register char *string, register char *front, register char *back)
+binary_search(char *string, char *front, char *back)
{
- register char *p;
+ char *p;
p = front + (back - front) / 2;
SKIP_PAST_NEWLINE(p, back);
@@ -1304,7 +1304,7 @@ linear_search(char *string, char *front, char *back, long tl)
* However, historic programs did use spaces, and, I got complaints.
*/
static int
-compare(register char *s1, register char *s2, register char *back)
+compare(char *s1, char *s2, char *back)
{
for (; *s1 && s2 < back && (*s2 != '\t' && *s2 != ' '); ++s1, ++s2)
if (*s1 != *s2)
diff --git a/contrib/nvi/ex/ex_txt.c b/contrib/nvi/ex/ex_txt.c
index 21d9f44..4e62a7e 100644
--- a/contrib/nvi/ex/ex_txt.c
+++ b/contrib/nvi/ex/ex_txt.c
@@ -44,14 +44,14 @@ static const char sccsid[] = "$Id: ex_txt.c,v 10.23 2001/06/25 15:19:21 skimo Ex
* characters remaining when failure occurred.
*/
-static int txt_dent __P((SCR *, TEXT *));
-static void txt_prompt __P((SCR *, TEXT *, ARG_CHAR_T, u_int32_t));
+static int txt_dent(SCR *, TEXT *);
+static void txt_prompt(SCR *, TEXT *, ARG_CHAR_T, u_int32_t);
/*
* ex_txt --
* Get lines from the terminal for ex.
*
- * PUBLIC: int ex_txt __P((SCR *, TEXTH *, ARG_CHAR_T, u_int32_t));
+ * PUBLIC: int ex_txt(SCR *, TEXTH *, ARG_CHAR_T, u_int32_t);
*/
int
ex_txt(SCR *sp, TEXTH *tiqh, ARG_CHAR_T prompt, u_int32_t flags)
diff --git a/contrib/nvi/ex/ex_undo.c b/contrib/nvi/ex/ex_undo.c
index 9e4cd79..32f35fd 100644
--- a/contrib/nvi/ex/ex_undo.c
+++ b/contrib/nvi/ex/ex_undo.c
@@ -28,7 +28,7 @@ static const char sccsid[] = "$Id: ex_undo.c,v 10.7 2001/06/25 15:19:21 skimo Ex
* ex_undo -- u
* Undo the last change.
*
- * PUBLIC: int ex_undo __P((SCR *, EXCMD *));
+ * PUBLIC: int ex_undo(SCR *, EXCMD *);
*/
int
ex_undo(SCR *sp, EXCMD *cmdp)
diff --git a/contrib/nvi/ex/ex_usage.c b/contrib/nvi/ex/ex_usage.c
index 9a20ce1..b28d8a5 100644
--- a/contrib/nvi/ex/ex_usage.c
+++ b/contrib/nvi/ex/ex_usage.c
@@ -31,7 +31,7 @@ static const char sccsid[] = "$Id: ex_usage.c,v 10.16 2011/12/21 19:26:48 zy Exp
* ex_help -- :help
* Display help message.
*
- * PUBLIC: int ex_help __P((SCR *, EXCMD *));
+ * PUBLIC: int ex_help(SCR *, EXCMD *);
*/
int
ex_help(SCR *sp, EXCMD *cmdp)
@@ -52,7 +52,7 @@ ex_help(SCR *sp, EXCMD *cmdp)
* ex_usage -- :exusage [cmd]
* Display ex usage strings.
*
- * PUBLIC: int ex_usage __P((SCR *, EXCMD *));
+ * PUBLIC: int ex_usage(SCR *, EXCMD *);
*/
int
ex_usage(SCR *sp, EXCMD *cmdp)
@@ -133,7 +133,7 @@ ex_usage(SCR *sp, EXCMD *cmdp)
* ex_viusage -- :viusage [key]
* Display vi usage strings.
*
- * PUBLIC: int ex_viusage __P((SCR *, EXCMD *));
+ * PUBLIC: int ex_viusage(SCR *, EXCMD *);
*/
int
ex_viusage(SCR *sp, EXCMD *cmdp)
diff --git a/contrib/nvi/ex/ex_util.c b/contrib/nvi/ex/ex_util.c
index 2e56a06..6071fe2 100644
--- a/contrib/nvi/ex/ex_util.c
+++ b/contrib/nvi/ex/ex_util.c
@@ -31,7 +31,7 @@ static const char sccsid[] = "$Id: ex_util.c,v 10.32 2001/06/25 15:19:21 skimo E
* ex_cinit --
* Create an EX command structure.
*
- * PUBLIC: void ex_cinit __P((SCR *, EXCMD *, int, int, recno_t, recno_t, int));
+ * PUBLIC: void ex_cinit(SCR *, EXCMD *, int, int, recno_t, recno_t, int);
*/
void
ex_cinit(SCR *sp, EXCMD *cmdp, int cmd_id, int naddr, recno_t lno1, recno_t lno2, int force)
@@ -51,7 +51,7 @@ ex_cinit(SCR *sp, EXCMD *cmdp, int cmd_id, int naddr, recno_t lno1, recno_t lno2
* ex_getline --
* Return a line from the file.
*
- * PUBLIC: int ex_getline __P((SCR *, FILE *, size_t *));
+ * PUBLIC: int ex_getline(SCR *, FILE *, size_t *);
*/
int
ex_getline(SCR *sp, FILE *fp, size_t *lenp)
@@ -91,7 +91,7 @@ ex_getline(SCR *sp, FILE *fp, size_t *lenp)
* ex_ncheck --
* Check for more files to edit.
*
- * PUBLIC: int ex_ncheck __P((SCR *, int));
+ * PUBLIC: int ex_ncheck(SCR *, int);
*/
int
ex_ncheck(SCR *sp, int force)
@@ -120,7 +120,7 @@ ex_ncheck(SCR *sp, int force)
* ex_init --
* Init the screen for ex.
*
- * PUBLIC: int ex_init __P((SCR *));
+ * PUBLIC: int ex_init(SCR *);
*/
int
ex_init(SCR *sp)
@@ -145,7 +145,7 @@ ex_init(SCR *sp)
* ex_emsg --
* Display a few common ex and vi error messages.
*
- * PUBLIC: void ex_wemsg __P((SCR *, CHAR_T *, exm_t));
+ * PUBLIC: void ex_wemsg(SCR *, CHAR_T *, exm_t);
*/
void
ex_wemsg(SCR* sp, CHAR_T *p, exm_t which)
@@ -162,7 +162,7 @@ ex_wemsg(SCR* sp, CHAR_T *p, exm_t which)
* ex_emsg --
* Display a few common ex and vi error messages.
*
- * PUBLIC: void ex_emsg __P((SCR *, char *, exm_t));
+ * PUBLIC: void ex_emsg(SCR *, char *, exm_t);
*/
void
ex_emsg(SCR *sp, char *p, exm_t which)
diff --git a/contrib/nvi/ex/ex_version.c b/contrib/nvi/ex/ex_version.c
index 4f0a17d..dc18aa1 100644
--- a/contrib/nvi/ex/ex_version.c
+++ b/contrib/nvi/ex/ex_version.c
@@ -28,7 +28,7 @@ static const char sccsid[] = "$Id: ex_version.c,v 10.32 2001/06/25 15:19:22 skim
* ex_version -- :version
* Display the program version.
*
- * PUBLIC: int ex_version __P((SCR *, EXCMD *));
+ * PUBLIC: int ex_version(SCR *, EXCMD *);
*/
int
ex_version(SCR *sp, EXCMD *cmdp)
diff --git a/contrib/nvi/ex/ex_visual.c b/contrib/nvi/ex/ex_visual.c
index f913c71..bfad97c 100644
--- a/contrib/nvi/ex/ex_visual.c
+++ b/contrib/nvi/ex/ex_visual.c
@@ -31,7 +31,7 @@ static const char sccsid[] = "$Id: ex_visual.c,v 10.16 2001/08/29 11:04:13 skimo
* ex_visual -- :[line] vi[sual] [^-.+] [window_size] [flags]
* Switch to visual mode.
*
- * PUBLIC: int ex_visual __P((SCR *, EXCMD *));
+ * PUBLIC: int ex_visual(SCR *, EXCMD *);
*/
int
ex_visual(SCR *sp, EXCMD *cmdp)
diff --git a/contrib/nvi/ex/ex_write.c b/contrib/nvi/ex/ex_write.c
index 1f94a63..18a578c 100644
--- a/contrib/nvi/ex/ex_write.c
+++ b/contrib/nvi/ex/ex_write.c
@@ -10,7 +10,7 @@
#include "config.h"
#ifndef lint
-static const char sccsid[] = "$Id: ex_write.c,v 10.41 2011/12/02 01:07:06 zy Exp $";
+static const char sccsid[] = "$Id: ex_write.c,v 10.43 2015/04/03 15:18:45 zy Exp $";
#endif /* not lint */
#include <sys/types.h>
@@ -25,19 +25,18 @@ static const char sccsid[] = "$Id: ex_write.c,v 10.41 2011/12/02 01:07:06 zy Exp
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <strings.h>
#include <unistd.h>
#include "../common/common.h"
enum which {WN, WQ, WRITE, XIT};
-static int exwr __P((SCR *, EXCMD *, enum which));
+static int exwr(SCR *, EXCMD *, enum which);
/*
* ex_wn -- :wn[!] [>>] [file]
* Write to a file and switch to the next one.
*
- * PUBLIC: int ex_wn __P((SCR *, EXCMD *));
+ * PUBLIC: int ex_wn(SCR *, EXCMD *);
*/
int
ex_wn(SCR *sp, EXCMD *cmdp)
@@ -57,7 +56,7 @@ ex_wn(SCR *sp, EXCMD *cmdp)
* ex_wq -- :wq[!] [>>] [file]
* Write to a file and quit.
*
- * PUBLIC: int ex_wq __P((SCR *, EXCMD *));
+ * PUBLIC: int ex_wq(SCR *, EXCMD *);
*/
int
ex_wq(SCR *sp, EXCMD *cmdp)
@@ -83,7 +82,7 @@ ex_wq(SCR *sp, EXCMD *cmdp)
* :write [!] [cmd]
* Write to a file.
*
- * PUBLIC: int ex_write __P((SCR *, EXCMD *));
+ * PUBLIC: int ex_write(SCR *, EXCMD *);
*/
int
ex_write(SCR *sp, EXCMD *cmdp)
@@ -96,7 +95,7 @@ ex_write(SCR *sp, EXCMD *cmdp)
* ex_xit -- :x[it]! [file]
* Write out any modifications and quit.
*
- * PUBLIC: int ex_xit __P((SCR *, EXCMD *));
+ * PUBLIC: int ex_xit(SCR *, EXCMD *);
*/
int
ex_xit(SCR *sp, EXCMD *cmdp)
@@ -279,8 +278,8 @@ exwr(SCR *sp, EXCMD *cmdp, enum which cmd)
* ex_writefp --
* Write a range of lines to a FILE *.
*
- * PUBLIC: int ex_writefp __P((SCR *,
- * PUBLIC: char *, FILE *, MARK *, MARK *, u_long *, u_long *, int));
+ * PUBLIC: int ex_writefp(SCR *,
+ * PUBLIC: char *, FILE *, MARK *, MARK *, u_long *, u_long *, int);
*/
int
ex_writefp(SCR *sp, char *name, FILE *fp, MARK *fm, MARK *tm, u_long *nlno, u_long *nch, int silent)
@@ -291,11 +290,7 @@ ex_writefp(SCR *sp, char *name, FILE *fp, MARK *fm, MARK *tm, u_long *nlno, u_lo
recno_t fline, tline, lcnt;
size_t len;
int rval;
- char *msg;
- CHAR_T *p;
- char *f;
- size_t flen;
- int isutf16;
+ char *msg, *p;
gp = sp->gp;
fline = fm->lno;
@@ -324,17 +319,7 @@ ex_writefp(SCR *sp, char *name, FILE *fp, MARK *fm, MARK *tm, u_long *nlno, u_lo
ccnt = 0;
lcnt = 0;
msg = "253|Writing...";
-
- if (O_ISSET(sp, O_FILEENCODING)) {
- isutf16 = !strncasecmp(O_STR(sp, O_FILEENCODING), "utf-16", 6);
- isutf16 += !strncasecmp(O_STR(sp, O_FILEENCODING), "utf-16le", 8);
- } else isutf16 = 0;
-
- if (tline != 0) {
- if (isutf16 == 1 && fwrite("\xfe\xff", 1, 2, fp) != 2)
- goto err;
- if (isutf16 == 2 && fwrite("\xff\xfe", 1, 2, fp) != 2)
- goto err;
+ if (tline != 0)
for (; fline <= tline; ++fline, ++lcnt) {
/* Caller has to provide any interrupt message. */
if ((lcnt + 1) % INTERRUPT_CHECK == 0) {
@@ -346,31 +331,17 @@ ex_writefp(SCR *sp, char *name, FILE *fp, MARK *fm, MARK *tm, u_long *nlno, u_lo
msg = NULL;
}
}
- if (db_get(sp, fline, DBG_FATAL, &p, &len))
+ if (db_rget(sp, fline, &p, &len))
goto err;
- INT2FILE(sp, p, len, f, flen);
- if (fwrite(f, 1, flen, fp) != flen)
+ if (fwrite(p, 1, len, fp) != len)
goto err;
ccnt += len;
- /* UTF-16 w/o BOM is big-endian */
- switch (isutf16) {
- case 1: /* UTF-16BE */
- if (fwrite("\0\x0a", 1, 2, fp) != 2)
- goto done;
- break;
- case 2: /* UTF-16LE */
- if (fwrite("\x0a\0", 1, 2, fp) != 2)
- goto done;
+ if (putc('\n', fp) != '\n')
break;
- default:
- if (putc('\n', fp) != '\n')
- goto done;
- }
++ccnt;
}
- }
-done: if (fflush(fp))
+ if (fflush(fp))
goto err;
/*
* XXX
diff --git a/contrib/nvi/ex/ex_yank.c b/contrib/nvi/ex/ex_yank.c
index 262c78f..5d1be5a 100644
--- a/contrib/nvi/ex/ex_yank.c
+++ b/contrib/nvi/ex/ex_yank.c
@@ -27,7 +27,7 @@ static const char sccsid[] = "$Id: ex_yank.c,v 10.8 2001/06/25 15:19:22 skimo Ex
* ex_yank -- :[line [,line]] ya[nk] [buffer] [count]
* Yank the lines into a buffer.
*
- * PUBLIC: int ex_yank __P((SCR *, EXCMD *));
+ * PUBLIC: int ex_yank(SCR *, EXCMD *);
*/
int
ex_yank(SCR *sp, EXCMD *cmdp)
diff --git a/contrib/nvi/ex/ex_z.c b/contrib/nvi/ex/ex_z.c
index 18a7859..fff80d8 100644
--- a/contrib/nvi/ex/ex_z.c
+++ b/contrib/nvi/ex/ex_z.c
@@ -29,7 +29,7 @@ static const char sccsid[] = "$Id: ex_z.c,v 10.12 2001/06/25 15:19:22 skimo Exp
* ex_z -- :[line] z [^-.+=] [count] [flags]
* Adjust window.
*
- * PUBLIC: int ex_z __P((SCR *, EXCMD *));
+ * PUBLIC: int ex_z(SCR *, EXCMD *);
*/
int
ex_z(SCR *sp, EXCMD *cmdp)
@@ -54,11 +54,7 @@ ex_z(SCR *sp, EXCMD *cmdp)
if (FL_ISSET(cmdp->iflags, E_C_COUNT))
cnt = cmdp->count;
else
-#ifdef HISTORICAL_PRACTICE
- cnt = O_VAL(sp, O_SCROLL) * 2;
-#else
cnt = O_VAL(sp, O_WINDOW) - 1;
-#endif
equals = 0;
eofcheck = 0;
diff --git a/contrib/nvi/ex/extern.h b/contrib/nvi/ex/extern.h
index f54548b..ed1e1b7 100644
--- a/contrib/nvi/ex/extern.h
+++ b/contrib/nvi/ex/extern.h
@@ -1,130 +1,130 @@
-int ex __P((SCR **));
-int ex_cmd __P((SCR *));
-int ex_range __P((SCR *, EXCMD *, int *));
-int ex_is_abbrev __P((CHAR_T *, size_t));
-int ex_is_unmap __P((CHAR_T *, size_t));
+int ex(SCR **);
+int ex_cmd(SCR *);
+int ex_range(SCR *, EXCMD *, int *);
+int ex_is_abbrev(CHAR_T *, size_t);
+int ex_is_unmap(CHAR_T *, size_t);
void ex_badaddr
- __P((SCR *, EXCMDLIST const *, enum badaddr, enum nresult));
-int ex_abbr __P((SCR *, EXCMD *));
-int ex_unabbr __P((SCR *, EXCMD *));
-int ex_append __P((SCR *, EXCMD *));
-int ex_change __P((SCR *, EXCMD *));
-int ex_insert __P((SCR *, EXCMD *));
-int ex_next __P((SCR *, EXCMD *));
-int ex_prev __P((SCR *, EXCMD *));
-int ex_rew __P((SCR *, EXCMD *));
-int ex_args __P((SCR *, EXCMD *));
-char **ex_buildargv __P((SCR *, EXCMD *, char *));
-int argv_init __P((SCR *, EXCMD *));
-int argv_exp0 __P((SCR *, EXCMD *, CHAR_T *, size_t));
-int argv_exp1 __P((SCR *, EXCMD *, CHAR_T *, size_t, int));
-int argv_exp2 __P((SCR *, EXCMD *, CHAR_T *, size_t));
-int argv_exp3 __P((SCR *, EXCMD *, CHAR_T *, size_t));
-int argv_flt_ex __P((SCR *, EXCMD *, CHAR_T *, size_t));
-int argv_free __P((SCR *));
-int argv_flt_path __P((SCR *, EXCMD *, CHAR_T *, size_t));
-CHAR_T *argv_esc __P((SCR *, EXCMD *, CHAR_T *, size_t));
-CHAR_T *argv_uesc __P((SCR *, EXCMD *, CHAR_T *, size_t));
-int ex_at __P((SCR *, EXCMD *));
-int ex_bang __P((SCR *, EXCMD *));
-int ex_cd __P((SCR *, EXCMD *));
-int ex_cscope __P((SCR *, EXCMD *));
-int cscope_end __P((SCR *));
-int cscope_display __P((SCR *));
-int cscope_search __P((SCR *, TAGQ *, TAG *));
-int ex_delete __P((SCR *, EXCMD *));
-int ex_display __P((SCR *, EXCMD *));
-int ex_edit __P((SCR *, EXCMD *));
-int ex_equal __P((SCR *, EXCMD *));
-int ex_file __P((SCR *, EXCMD *));
-int ex_filter __P((SCR *,
- EXCMD *, MARK *, MARK *, MARK *, CHAR_T *, enum filtertype));
-int ex_global __P((SCR *, EXCMD *));
-int ex_v __P((SCR *, EXCMD *));
-int ex_g_insdel __P((SCR *, lnop_t, recno_t));
-int ex_screen_copy __P((SCR *, SCR *));
-int ex_screen_end __P((SCR *));
-int ex_optchange __P((SCR *, int, char *, u_long *));
-int ex_exrc __P((SCR *));
-int ex_run_str __P((SCR *, char *, CHAR_T *, size_t, int, int));
-int ex_join __P((SCR *, EXCMD *));
-int ex_map __P((SCR *, EXCMD *));
-int ex_unmap __P((SCR *, EXCMD *));
-int ex_mark __P((SCR *, EXCMD *));
-int ex_mkexrc __P((SCR *, EXCMD *));
-int ex_copy __P((SCR *, EXCMD *));
-int ex_move __P((SCR *, EXCMD *));
-int ex_open __P((SCR *, EXCMD *));
-int ex_preserve __P((SCR *, EXCMD *));
-int ex_recover __P((SCR *, EXCMD *));
-int ex_list __P((SCR *, EXCMD *));
-int ex_number __P((SCR *, EXCMD *));
-int ex_pr __P((SCR *, EXCMD *));
-int ex_print __P((SCR *, EXCMD *, MARK *, MARK *, u_int32_t));
-int ex_ldisplay __P((SCR *, const CHAR_T *, size_t, size_t, u_int));
-int ex_scprint __P((SCR *, MARK *, MARK *));
-int ex_printf __P((SCR *, const char *, ...));
-int ex_puts __P((SCR *, const char *));
-int ex_fflush __P((SCR *sp));
-int ex_put __P((SCR *, EXCMD *));
-int ex_quit __P((SCR *, EXCMD *));
-int ex_read __P((SCR *, EXCMD *));
-int ex_readfp __P((SCR *, char *, FILE *, MARK *, recno_t *, int));
-int ex_bg __P((SCR *, EXCMD *));
-int ex_fg __P((SCR *, EXCMD *));
-int ex_resize __P((SCR *, EXCMD *));
-int ex_sdisplay __P((SCR *));
-int ex_script __P((SCR *, EXCMD *));
-int sscr_exec __P((SCR *, recno_t));
-int sscr_input __P((SCR *));
-int sscr_end __P((SCR *));
-int ex_set __P((SCR *, EXCMD *));
-int ex_shell __P((SCR *, EXCMD *));
-int ex_exec_proc __P((SCR *, EXCMD *, char *, const char *, int));
-int proc_wait __P((SCR *, long, const char *, int, int));
-int ex_shiftl __P((SCR *, EXCMD *));
-int ex_shiftr __P((SCR *, EXCMD *));
-int ex_source __P((SCR *, EXCMD *));
-int ex_stop __P((SCR *, EXCMD *));
-int ex_s __P((SCR *, EXCMD *));
-int ex_subagain __P((SCR *, EXCMD *));
-int ex_subtilde __P((SCR *, EXCMD *));
-int re_compile __P((SCR *,
- CHAR_T *, size_t, CHAR_T **, size_t *, regex_t *, u_int));
-void re_error __P((SCR *, int, regex_t *));
-int ex_tag_first __P((SCR *, CHAR_T *));
-int ex_tag_push __P((SCR *, EXCMD *));
-int ex_tag_next __P((SCR *, EXCMD *));
-int ex_tag_prev __P((SCR *, EXCMD *));
-int ex_tag_nswitch __P((SCR *, TAG *, int));
-int ex_tag_Nswitch __P((SCR *, TAG *, int));
-int ex_tag_pop __P((SCR *, EXCMD *));
-int ex_tag_top __P((SCR *, EXCMD *));
-int ex_tag_display __P((SCR *));
-int ex_tag_copy __P((SCR *, SCR *));
-int tagq_free __P((SCR *, TAGQ *));
-int tagq_push __P((SCR*, TAGQ*, int, int ));
-void tag_msg __P((SCR *, tagmsg_t, char *));
-int ex_tagf_alloc __P((SCR *, char *));
-int ex_tag_free __P((SCR *));
-int ex_txt __P((SCR *, TEXTH *, ARG_CHAR_T, u_int32_t));
-int ex_undo __P((SCR *, EXCMD *));
-int ex_help __P((SCR *, EXCMD *));
-int ex_usage __P((SCR *, EXCMD *));
-int ex_viusage __P((SCR *, EXCMD *));
-void ex_cinit __P((SCR *, EXCMD *, int, int, recno_t, recno_t, int));
-int ex_getline __P((SCR *, FILE *, size_t *));
-int ex_ncheck __P((SCR *, int));
-int ex_init __P((SCR *));
-void ex_wemsg __P((SCR *, CHAR_T *, exm_t));
-void ex_emsg __P((SCR *, char *, exm_t));
-int ex_version __P((SCR *, EXCMD *));
-int ex_visual __P((SCR *, EXCMD *));
-int ex_wn __P((SCR *, EXCMD *));
-int ex_wq __P((SCR *, EXCMD *));
-int ex_write __P((SCR *, EXCMD *));
-int ex_xit __P((SCR *, EXCMD *));
-int ex_writefp __P((SCR *,
- char *, FILE *, MARK *, MARK *, u_long *, u_long *, int));
-int ex_yank __P((SCR *, EXCMD *));
-int ex_z __P((SCR *, EXCMD *));
+ (SCR *, EXCMDLIST const *, enum badaddr, enum nresult);
+int ex_abbr(SCR *, EXCMD *);
+int ex_unabbr(SCR *, EXCMD *);
+int ex_append(SCR *, EXCMD *);
+int ex_change(SCR *, EXCMD *);
+int ex_insert(SCR *, EXCMD *);
+int ex_next(SCR *, EXCMD *);
+int ex_prev(SCR *, EXCMD *);
+int ex_rew(SCR *, EXCMD *);
+int ex_args(SCR *, EXCMD *);
+char **ex_buildargv(SCR *, EXCMD *, char *);
+int argv_init(SCR *, EXCMD *);
+int argv_exp0(SCR *, EXCMD *, CHAR_T *, size_t);
+int argv_exp1(SCR *, EXCMD *, CHAR_T *, size_t, int);
+int argv_exp2(SCR *, EXCMD *, CHAR_T *, size_t);
+int argv_exp3(SCR *, EXCMD *, CHAR_T *, size_t);
+int argv_flt_ex(SCR *, EXCMD *, CHAR_T *, size_t);
+int argv_free(SCR *);
+int argv_flt_path(SCR *, EXCMD *, CHAR_T *, size_t);
+CHAR_T *argv_esc(SCR *, EXCMD *, CHAR_T *, size_t);
+CHAR_T *argv_uesc(SCR *, EXCMD *, CHAR_T *, size_t);
+int ex_at(SCR *, EXCMD *);
+int ex_bang(SCR *, EXCMD *);
+int ex_cd(SCR *, EXCMD *);
+int ex_cscope(SCR *, EXCMD *);
+int cscope_end(SCR *);
+int cscope_display(SCR *);
+int cscope_search(SCR *, TAGQ *, TAG *);
+int ex_delete(SCR *, EXCMD *);
+int ex_display(SCR *, EXCMD *);
+int ex_edit(SCR *, EXCMD *);
+int ex_equal(SCR *, EXCMD *);
+int ex_file(SCR *, EXCMD *);
+int ex_filter(SCR *,
+ EXCMD *, MARK *, MARK *, MARK *, CHAR_T *, enum filtertype);
+int ex_global(SCR *, EXCMD *);
+int ex_v(SCR *, EXCMD *);
+int ex_g_insdel(SCR *, lnop_t, recno_t);
+int ex_screen_copy(SCR *, SCR *);
+int ex_screen_end(SCR *);
+int ex_optchange(SCR *, int, char *, u_long *);
+int ex_exrc(SCR *);
+int ex_run_str(SCR *, char *, CHAR_T *, size_t, int, int);
+int ex_join(SCR *, EXCMD *);
+int ex_map(SCR *, EXCMD *);
+int ex_unmap(SCR *, EXCMD *);
+int ex_mark(SCR *, EXCMD *);
+int ex_mkexrc(SCR *, EXCMD *);
+int ex_copy(SCR *, EXCMD *);
+int ex_move(SCR *, EXCMD *);
+int ex_open(SCR *, EXCMD *);
+int ex_preserve(SCR *, EXCMD *);
+int ex_recover(SCR *, EXCMD *);
+int ex_list(SCR *, EXCMD *);
+int ex_number(SCR *, EXCMD *);
+int ex_pr(SCR *, EXCMD *);
+int ex_print(SCR *, EXCMD *, MARK *, MARK *, u_int32_t);
+int ex_ldisplay(SCR *, const CHAR_T *, size_t, size_t, u_int);
+int ex_scprint(SCR *, MARK *, MARK *);
+int ex_printf(SCR *, const char *, ...);
+int ex_puts(SCR *, const char *);
+int ex_fflush(SCR *sp);
+int ex_put(SCR *, EXCMD *);
+int ex_quit(SCR *, EXCMD *);
+int ex_read(SCR *, EXCMD *);
+int ex_readfp(SCR *, char *, FILE *, MARK *, recno_t *, int);
+int ex_bg(SCR *, EXCMD *);
+int ex_fg(SCR *, EXCMD *);
+int ex_resize(SCR *, EXCMD *);
+int ex_sdisplay(SCR *);
+int ex_script(SCR *, EXCMD *);
+int sscr_exec(SCR *, recno_t);
+int sscr_input(SCR *);
+int sscr_end(SCR *);
+int ex_set(SCR *, EXCMD *);
+int ex_shell(SCR *, EXCMD *);
+int ex_exec_proc(SCR *, EXCMD *, char *, const char *, int);
+int proc_wait(SCR *, long, const char *, int, int);
+int ex_shiftl(SCR *, EXCMD *);
+int ex_shiftr(SCR *, EXCMD *);
+int ex_source(SCR *, EXCMD *);
+int ex_stop(SCR *, EXCMD *);
+int ex_s(SCR *, EXCMD *);
+int ex_subagain(SCR *, EXCMD *);
+int ex_subtilde(SCR *, EXCMD *);
+int re_compile(SCR *,
+ CHAR_T *, size_t, CHAR_T **, size_t *, regex_t *, u_int);
+void re_error(SCR *, int, regex_t *);
+int ex_tag_first(SCR *, CHAR_T *);
+int ex_tag_push(SCR *, EXCMD *);
+int ex_tag_next(SCR *, EXCMD *);
+int ex_tag_prev(SCR *, EXCMD *);
+int ex_tag_nswitch(SCR *, TAG *, int);
+int ex_tag_Nswitch(SCR *, TAG *, int);
+int ex_tag_pop(SCR *, EXCMD *);
+int ex_tag_top(SCR *, EXCMD *);
+int ex_tag_display(SCR *);
+int ex_tag_copy(SCR *, SCR *);
+int tagq_free(SCR *, TAGQ *);
+int tagq_push(SCR*, TAGQ*, int, int );
+void tag_msg(SCR *, tagmsg_t, char *);
+int ex_tagf_alloc(SCR *, char *);
+int ex_tag_free(SCR *);
+int ex_txt(SCR *, TEXTH *, ARG_CHAR_T, u_int32_t);
+int ex_undo(SCR *, EXCMD *);
+int ex_help(SCR *, EXCMD *);
+int ex_usage(SCR *, EXCMD *);
+int ex_viusage(SCR *, EXCMD *);
+void ex_cinit(SCR *, EXCMD *, int, int, recno_t, recno_t, int);
+int ex_getline(SCR *, FILE *, size_t *);
+int ex_ncheck(SCR *, int);
+int ex_init(SCR *);
+void ex_wemsg(SCR *, CHAR_T *, exm_t);
+void ex_emsg(SCR *, char *, exm_t);
+int ex_version(SCR *, EXCMD *);
+int ex_visual(SCR *, EXCMD *);
+int ex_wn(SCR *, EXCMD *);
+int ex_wq(SCR *, EXCMD *);
+int ex_write(SCR *, EXCMD *);
+int ex_xit(SCR *, EXCMD *);
+int ex_writefp(SCR *,
+ char *, FILE *, MARK *, MARK *, u_long *, u_long *, int);
+int ex_yank(SCR *, EXCMD *);
+int ex_z(SCR *, EXCMD *);
diff --git a/contrib/nvi/ex/version.h b/contrib/nvi/ex/version.h
index ef0af0f..e079bc6 100644
--- a/contrib/nvi/ex/version.h
+++ b/contrib/nvi/ex/version.h
@@ -1 +1 @@
-#define VI_VERSION "2.1.2 (2012-11-02)"
+#define VI_VERSION "2.1.3 (2015-04-08)"
OpenPOWER on IntegriCloud