From 95c094acb230c4c2aa7a7251380ce70c7db39f52 Mon Sep 17 00:00:00 2001 From: dim Date: Sun, 8 Jan 2012 13:51:09 +0000 Subject: [PATCH] MFC r229196: Redo r228645, but instead of casting away const conversion warnings in contrib/less, add a few const qualifiers in the right places. Suggested by: das git-svn-id: svn://svn.freebsd.org/base/stable/9@229811 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f --- contrib/less/command.c | 4 ++-- contrib/less/prompt.c | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/contrib/less/command.c b/contrib/less/command.c index 41c386969..def3d3679 100644 --- a/contrib/less/command.c +++ b/contrib/less/command.c @@ -105,7 +105,7 @@ cmd_exec() start_mca(action, prompt, mlist, cmdflags) int action; char *prompt; - void *mlist; + void constant *mlist; int cmdflags; { mca = action; @@ -686,7 +686,7 @@ make_display() static void prompt() { - register char *p; + register char constant *p; if (ungot != NULL) { diff --git a/contrib/less/prompt.c b/contrib/less/prompt.c index daad00de2..53e66dc4c 100644 --- a/contrib/less/prompt.c +++ b/contrib/less/prompt.c @@ -394,9 +394,9 @@ protochar(c, where, iseditproto) * where to resume parsing the string. * We must keep track of nested IFs and skip them properly. */ - static char * + static char constant * skipcond(p) - register char *p; + register char constant *p; { register int iflevel; @@ -452,9 +452,9 @@ skipcond(p) /* * Decode a char that represents a position on the screen. */ - static char * + static char constant * wherechar(p, wp) - char *p; + char constant *p; int *wp; { switch (*p) @@ -478,10 +478,10 @@ wherechar(p, wp) */ public char * pr_expand(proto, maxwidth) - char *proto; + char constant *proto; int maxwidth; { - register char *p; + register char constant *p; register int c; int where; -- 2.45.2