From 3102e646feb737a3f6f669e84303024e2a44b298 Mon Sep 17 00:00:00 2001 From: Mark Nudelman Date: Sat, 25 Dec 2021 09:13:49 -0800 Subject: [PATCH] Fix some instances of non-K&R function definitions. --- cmdbuf.c | 10 ++++++++-- command.c | 4 ++-- line.c | 2 +- tags.c | 4 +++- 4 files changed, 14 insertions(+), 6 deletions(-) diff --git a/cmdbuf.c b/cmdbuf.c index 1eb97c71..16ba9d43 100644 --- a/cmdbuf.c +++ b/cmdbuf.c @@ -1548,7 +1548,10 @@ read_cmdhist(action, uparam, skip_search, skip_shell) } static void -addhist_init(void *uparam, struct mlist *ml, char *string) +addhist_init(uparam, ml, string) + void *uparam; + struct mlist *ml; + char constant *string; { if (ml != NULL) cmd_addhist(ml, string, 0); @@ -1630,7 +1633,10 @@ struct save_ctx * created during this session. */ static void -copy_hist(void *uparam, struct mlist *ml, char *string) +copy_hist(uparam, ml, string) + void *uparam; + struct mlist *ml; + char constant *string; { struct save_ctx *ctx = (struct save_ctx *) uparam; diff --git a/command.c b/command.c index 487c7de7..a5644f5a 100644 --- a/command.c +++ b/command.c @@ -950,8 +950,8 @@ getccu(VOID_PARAM) */ static LWCHAR getcc_repl(orig, repl, gr_getc, gr_ungetc) - char const* orig; - char const* repl; + char constant* orig; + char constant* repl; LWCHAR (*gr_getc)(VOID_PARAM); void (*gr_ungetc)(LWCHAR); { diff --git a/line.c b/line.c index df4a2eaf..a8936f17 100644 --- a/line.c +++ b/line.c @@ -1538,7 +1538,7 @@ back_raw_line(curr_pos, linep, line_lenp) */ static int pappstr(str) - char *str; + constant char *str; { while (*str != '\0') { diff --git a/tags.c b/tags.c index 1244c35b..e2d25567 100644 --- a/tags.c +++ b/tags.c @@ -396,7 +396,9 @@ edit_tagfile(VOID_PARAM) } static int -curtag_match(char const *line, POSITION linepos) +curtag_match(line, linepos) + char constant *line; + POSITION linepos; { /* * Test the line to see if we have a match.