aboutsummaryrefslogtreecommitdiff
path: root/opttbl.c
diff options
context:
space:
mode:
authorXin LI <delphij@FreeBSD.org>2017-04-25 03:42:16 +0000
committerXin LI <delphij@FreeBSD.org>2017-04-25 03:42:16 +0000
commit9c83c2751d26fe2e059d6956f0398b56ed919a6a (patch)
treeb75ed451f9f8336fb4958dbae186b6bd98aa65c0 /opttbl.c
parent1cabeb1f0c93e44ebc8a1d3a78100a962ac3f047 (diff)
Vendor import of less 487.vendor/less/v487
Diffstat (limited to 'opttbl.c')
-rw-r--r--opttbl.c29
1 files changed, 17 insertions, 12 deletions
diff --git a/opttbl.c b/opttbl.c
index 096524f94d2b..03838374c958 100644
--- a/opttbl.c
+++ b/opttbl.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 1984-2015 Mark Nudelman
+ * Copyright (C) 1984-2016 Mark Nudelman
*
* You may distribute under the terms of either the GNU General Public
* License or the Less License, as specified in the README file.
@@ -176,10 +176,10 @@ static struct loption option[] =
},
#if MSDOS_COMPILER
{ 'D', &D__optname,
- STRING|REPAINT|NO_QUERY, 0, NULL, opt_D,
+ STRING|REPAINT, 0, NULL, opt_D,
{
"color desc: ",
- "Ddknsu0123456789.",
+ "Dadknsu0123456789.",
NULL
}
},
@@ -464,9 +464,9 @@ static struct loption option[] =
* Initialize each option to its default value.
*/
public void
-init_option(void)
+init_option()
{
- struct loption *o;
+ register struct loption *o;
char *p;
p = lgetenv("LESS_IS_MORE");
@@ -489,9 +489,10 @@ init_option(void)
* Find an option in the option table, given its option letter.
*/
public struct loption *
-findopt(int c)
+findopt(c)
+ int c;
{
- struct loption *o;
+ register struct loption *o;
for (o = option; o->oletter != '\0'; o++)
{
@@ -507,7 +508,8 @@ findopt(int c)
*
*/
static int
-is_optchar(char c)
+is_optchar(c)
+ char c;
{
if (ASCII_IS_UPPER(c))
return 1;
@@ -525,12 +527,15 @@ is_optchar(char c)
* p_oname if non-NULL is set to point to the full option name.
*/
public struct loption *
-findopt_name(char **p_optname, char **p_oname, int *p_err)
+findopt_name(p_optname, p_oname, p_err)
+ char **p_optname;
+ char **p_oname;
+ int *p_err;
{
char *optname = *p_optname;
- struct loption *o;
- struct optname *oname;
- int len;
+ register struct loption *o;
+ register struct optname *oname;
+ register int len;
int uppercase;
struct loption *maxo = NULL;
struct optname *maxoname = NULL;