[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: lynx-dev patches for cleanup of parse_arg
From: |
Bela Lubkin |
Subject: |
Re: lynx-dev patches for cleanup of parse_arg |
Date: |
Wed, 6 May 1998 05:02:40 -0700 |
John E. Davis wrote:
> I spent several hours tonight cleaning up the parse_arg function
> in LYMain.c. New features will require more command line options, and
> parse_arg is becoming too unwieldy to easily allow expansion. So, I
> rewrote it to use a table. A sample table entry is:
...
> I believe that the parsing of arguments is now cleaner and more
> localized, minimizing the risk of bugs, as may be seen by the
> following code fragment that parses the table:
Thank you, John!
The new code (as incorporated in 2.8.1dev.9) is indeed much easier to
work with.
Here's a modification that I and other people have asked for, but until
now, was too painful to implement. This patch makes it possible to
explicitly set the value of a toggle from the command line.
Toggles are confusing and potentially troublesome. They have an initial
value that is set at compile time. This may be toggled by lynx.cfg or
.lynxrc. The user can then toggle it again with a command line
argument. What the user couldn't do, until now, was explicitly set a
value without knowing what lynx.cfg etc. had already done.
Now, running:
lynx -toggle=1
explicitly turns on the toggle;
lynx -toggle=0
explicitly turns it off.
For example, without changing any files (lynx.cfg or .lynxrc), you can
ensure that you will always have "show_cursor" turned on, by running:
lynx -show_cursor=1
>Bela<
=============================================================================
begin 600 toggle-patch.gz
M'XL(`+Y.4#4"`[U478^:0!1]9G_%U28N$'#QL^+&36SK^E#<&C_2F*8A(UYE
address@hidden>&1#LMMO$/JSS`C/WW'/ON6=`UW5P%B-"6=6KAIQNE"F)840.
M`'6HM;L-NUL3+[;=N3)-LX`J'W&address@hidden;O-3K?1RE#ZTR7W4.\TVD:]TZQ#
M>@3'5>:XVU..4$V2Q%WR,(G(,D!8TP`CB$-(CQ!6`N/%HCF,REFR9F3/<7\R
M';C3P4R]*N6DD1\FKK?G4<C+AC)_$%&W/QD:BE)Q%O,(W^%ZZH=O]]PX-1*'
MFXVLZ=,591L(UQ#["!D)4);address@hidden)"address@hidden>R!GR?S<C1W42+7;F147//@R'
MSN#BJI^SOF&U;:-AO6[EUBMCPB.<,QHRT'?0`_7W`TVMJ%OS[AL)]JAIMP+_
M"address@hidden>^P2OI%HB:-K4"4)(U_QD_492CW01=B5
M>TT"9-N/CZ!:T.N!C.`N<K>2'?(\`_(,`RIY`4W3X$?J[4G5T=N74R6X'N:.
M<R%QSUO8:0FQ=O'URC)10F//3RGCPQ:A`N*VN;/%>.".^M/WDDN@/"+*GFYC
M5\I+;XV4L3/O(HS=="I2AZ458;GT)P!-S*&D_G&6CC++6'(D7_(AI66/WWWW
M:%BFP<X->S$-(DD`E#0JC9,V%#/.0N>K2^$8B`8DW77M6K+I9]'-)O/!7P36
M?Q#<]YUISG"address@hidden<address@hidden:address@hidden;\
(*6;?YX`&``"C
`
end
- Re: lynx-dev patches for cleanup of parse_arg,
Bela Lubkin <=