[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
lynx-dev -help: a close look at UNSET_ARG value
From: |
Leonid Pauzner |
Subject: |
lynx-dev -help: a close look at UNSET_ARG value |
Date: |
Wed, 17 Feb 1999 16:05:51 +0300 (MSK) |
While looking at -help output I found out the info on the current values
of the certain boolean states, just quote few lines:
Options are:
-book use the bookmark page as the startfile (off)
-case enable case sensitive user searching (off)
-cookies toggles handling of Set-Cookie headers (on)
etc., but:
-noprint disable print functions (off)
-print enable print functions (DEFAULT) (off)
-rlogin disable rlogins (on)
-telnet disable telnets (on)
In my example the print options are valid but we see contraversal info.
Several others oprions are misguided also (say, telnet is valid).
In fact, we have TOGGLE_ARG, SET_ARG and UNSET_ARG choices which should behave
differently when determining the current state. I think the boolean value
should be corresponding to a complete help string, e.g. "disable telnets",
not a suffix only.
The following fix proposed:
diff -u old/lymain.c ./lymain.c
--- old/lymain.c Wed Feb 17 14:00:06 1999
+++ ./lymain.c Wed Feb 17 15:34:26 1999
@@ -3033,8 +3033,10 @@
switch (p->type & ARG_TYPE_MASK) {
case TOGGLE_ARG:
case SET_ARG:
- case UNSET_ARG:
sprintf(temp, "%s", *(q->set_value) ? "on" : "off");
+ break;
+ case UNSET_ARG:
+ sprintf(temp, "%s", *(q->set_value) ? "off" : "on");
break;
case INT_ARG:
sprintf(temp, "%d", *(q->int_value));
- lynx-dev -help: a close look at UNSET_ARG value,
Leonid Pauzner <=