[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
lynx-dev (patch) was: a note on different lynx.cfg/commandline args synt
From: |
Leonid Pauzner |
Subject: |
lynx-dev (patch) was: a note on different lynx.cfg/commandline args syntax |
Date: |
Sun, 4 Apr 1999 15:49:45 +0400 (MSD) |
4-Apr-99 14:43 I wrote:
> I found out that -partial_thres=xx command line argument is not working:
> it force lynx/dev21 to resolve www.xx.com as a host...!
> (apparently all partial_thres lynx.cfg staff is not working for me either:
> when I save .lynxrc from the options menu it always set partial_thres=-1
> even when there was no .lynxrc file before. Something with PARSE_INT() ?)
> Also the arguments tables in LYMain.c and LYReadCFG.c
> have the different signature that may be a misguiding when adding new options:
I fix the -partial_thres=xx command-line argument parsing
with the following patch:
diff -u old/lymain.c ./lymain.c
--- old/lymain.c Wed Mar 31 16:02:38 1999
+++ ./lymain.c Sun Apr 4 15:37:18 1999
@@ -1842,13 +1842,13 @@
#ifdef PARSE_DEBUG
#define ParseData BOOLEAN *set_value; int *int_value; char **str_value;
ParseFunc fun_value
#define PARSE_SET(n,t,v,h) {n,t, v, 0, 0, 0, h}
-#define PARSE_INT(n,t,v,h) {n,t, 0, &v, 0, 0, h}
+#define PARSE_INT(n,t,v,h) {n,t, 0, v, 0, 0, h}
#define PARSE_STR(n,t,v,h) {n,t, 0, 0, v, 0, h}
#define PARSE_FUN(n,t,v,h) {n,t, 0, 0, 0, v, h}
#else
#define ParseData long value
#define PARSE_SET(n,t,v,h) {n,t, (long) (v), h}
-#define PARSE_INT(n,t,v,h) {n,t, (long)&(v), h}
+#define PARSE_INT(n,t,v,h) {n,t, (long) (v), h}
#define PARSE_STR(n,t,v,h) {n,t, (long) (v), h}
#define PARSE_FUN(n,t,v,h) {n,t, (long) (v), h}
#endif
@@ -2748,7 +2748,7 @@
"toggles inclusion of ISMAP links when client-side\nMAPs are present"
),
PARSE_INT(
- "link", NEED_INT_ARG, ccount,
+ "link", NEED_INT_ARG, &ccount,
"=NUMBER\nstarting count for lnk#.dat files produced by -crawl"
),
PARSE_SET(
@@ -2839,7 +2839,7 @@
"toggles display partial pages while downloading"
),
PARSE_INT(
- "partial_thres", IGNORE_ARG|INT_ARG, partial_threshold,
+ "partial_thres", NEED_INT_ARG, &partial_threshold,
"[=NUMBER]\nnumber of lines to render before repainting display\n\
with partial-display logic"
),