lynx-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: lynx-dev [PATCH 2.8.3.dev6] patch that allows user to define what


From: Vlad Harchev
Subject: Re: lynx-dev [PATCH 2.8.3.dev6] patch that allows user to define what charsets will appear in "assumed doc chset" and "display chset" popups
Date: Sat, 14 Aug 1999 17:34:07 +0500 (SAMST)

On Sat, 14 Aug 1999, Vlad Harchev wrote:

> On Sun, 15 Aug 1999, Leonid Pauzner wrote:
> 
> > 12-Aug-99 06:01 Vlad Harchev wrote:
> > Do you say several ASSUMED_..._CHOICE lines possible? Why not a list?
> > Would this be resetted with reload_read_cfg() ?
> 
>  Yes, several ASSUMED_ ... _CHOICE are allowed. This approach simplifies
> parsing (so now I rely on parsing by LYReadCFG.c) and allows choices to be
> added in the INCLUDEd files.
>  This won't work with reload_.. (I mean all new changes to lynx.cfg will be
> lost) - but this is easy to fix. Currently new changes will be ignored (the
> info will be gathered, but final routine won't be called).
>  I will fix it in the end of August (Now I have only hyphenation on my TODO
> list).
>[...] 

 Here is a patch that makes this lynx.cfg-reloading-safe, and fixes some
things.

 Best regards,
  -Vlad

diff -ru old/lynx.cfg fixed/lynx.cfg
--- old/lynx.cfg        Thu Aug 12 05:46:03 1999
+++ fixed/lynx.cfg      Sat Aug 14 12:31:24 1999
@@ -345,7 +345,7 @@
 # DISPLAY_CHSET_CHOICE and ASSUMED_DOC_CHSET_CHOICE settings correspondingly.
 # Each of these settings can be used several times to define the set of 
possible
 # choices for corresponding field. The syntax for the values is
-# string | prefix* | <ALL>
+# string | prefix* | *
 #   Where
 #  * 'string' is either the MIME name of charset or it's full name (listed 
 # either in the left or in the right column of table of recognized charsets),
@@ -360,14 +360,14 @@
 # ASSUMED_DOC_CHSET_CHOICE:koi8-r
 # ASSUMED_DOC_CHSET_CHOICE:iso-8859-5
 #  or lines with full names of charsets.
-# * litteral string '<ALL>' (without quotes) will enable all charset choices in
+# * litteral string '*' (without quotes) will enable all charset choices in
 #   corresponding field. This is useful for overriding site defaults in private
 #   pieces of lynx.cfg included via INCLUDE directive.
-# Default values for both settings are <ALL>, but any occurance of settings 
with
+# Default values for both settings are *, but any occurance of settings with
 # values that denote any charsets will make only listed choices available for
 # corresponding field.
-#ASSUMED_DOC_CHSET_CHOICE:<ALL>
-#DISPLAY_CHSET_CHOICE:<ALL>
+#ASSUMED_DOC_CHSET_CHOICE:*
+#DISPLAY_CHSET_CHOICE:*
 
 # ASSUME_LOCAL_CHARSET is like ASSUME_CHARSET but only applies to local
 # files.  If no setting is given here or by an -assume_local_charset
diff -ru old/src/LYCharSets.c fixed/src/LYCharSets.c
--- old/src/LYCharSets.c        Thu Aug 12 04:54:15 1999
+++ fixed/src/LYCharSets.c      Sat Aug 14 17:22:47 1999
@@ -951,6 +951,8 @@
            chset_selectability_info[i].displayed_assumed_doc_chset_idx=n;
        };
     };
+    displayed_display_chset_names[cur_display_chset_choice]=NULL;
+    displayed_assumed_doc_chset_names[cur_assumed_chset_choice]=NULL;
 #endif
 };
 #endif
diff -ru old/src/LYMain.c fixed/src/LYMain.c
--- old/src/LYMain.c    Thu Aug 12 06:49:09 1999
+++ fixed/src/LYMain.c  Sat Aug 14 12:34:42 1999
@@ -2105,6 +2105,10 @@
        StrAllocCopy(LYCookieFile_flag, LYCookieFile);
 #endif
 
+#ifndef ALL_CHSETS_IN_O_SCREEN
+        custom_assumed_doc_chset = custom_display_chset = FALSE;       
+        
memset((char*)chset_selectability_info,0,sizeof(chset_selectability_info_t)*MAXCHARSETS);
       
+#endif
        free_lynx_cfg(); /* free downloaders, printers, not always environments 
*/
        /*
         *  Process the configuration file.
@@ -2116,6 +2120,9 @@
         */
        read_rc();
 
+#ifndef ALL_CHSETS_IN_O_SCREEN
+       init_selectable_chsets_lists();
+#endif
 
        /* We are not interested in startfile here */
        /* but other things may be lost: */
diff -ru old/src/LYReadCFG.c fixed/src/LYReadCFG.c
--- old/src/LYReadCFG.c Thu Aug 12 05:11:27 1999
+++ fixed/src/LYReadCFG.c       Sat Aug 14 12:30:44 1999
@@ -974,7 +974,7 @@
        CTRACE(tfp," - EMPTY STRING\n");
        return 1;
     };
-    if (!strcasecmp(p,"<ALL>")) {
+    if (*p=='*' && len==1) {
        if (display_chset)
            for (custom_display_chset=TRUE,i=0;i<LYNumCharsets;++i)
                chset_selectability_info[i].hide_in_display_chsets = FALSE;


reply via email to

[Prev in Thread] Current Thread [Next in Thread]