[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: |
Mon, 5 Apr 1999 18:08:52 +0400 (MSD) |
5-Apr-99 07:20 address@hidden wrote:
>> >> Fantastic!
>> >> I had a primary lynx_cfg.ok which set PARTIAL_THRES:3,
>> >> included lynx.cfg with PARTIAL_THRES:1,
>> >> and .lynxrc with partial_thres=-1
>> >>
>> >> Only first is active while the second and third ignored. Why?
>>
>> > I'm not sure - suspect that the only way we'll know is to debug it.
>>
>> It's incredible, but LIST_FORMAT only works from a primary cfg file only
>> but INFOSECS work from both primary and included files on my system.
>> Looks like initialization/re-allocation problem for child read_cfg()...
>> Does someone can recreate my symptoms?
>>
>> I have no expirience with run-time debuging in this environment..
> I haven't had time yet to work on this - if it's still an issue in
> a couple of days when I'm working on dev.22, I'll investigate it.
> --
> Thomas E. Dickey
* Fix the problem of reading included lynx.cfg files by changing LYReadCFG.c
table signature (now it is more close to one in LYMain.c). The problem
was the ignoring of *some* values got from the included cfg file
(at least for DJGPP2.02/gcc2.8.1 build). Probably we calculate the
addresses of variables on a later stage now. - LP
diff -u old/lyreadcf.c ./lyreadcf.c
--- old/lyreadcf.c Wed Mar 31 00:43:12 1999
+++ ./lyreadcf.c Mon Apr 5 17:52:24 1999
@@ -460,18 +460,18 @@
ParseFunc fun_value; \
long def_value
#define PARSE_ADD(n,t,v) {n,t, &v, 0, 0, 0, 0, 0}
-#define PARSE_SET(n,t,v) {n,t, 0, &v, 0, 0, 0, 0}
-#define PARSE_INT(n,t,v) {n,t, 0, 0, &v, 0, 0, 0}
-#define PARSE_STR(n,t,v) {n,t, 0, 0, 0, &v, 0, 0}
+#define PARSE_SET(n,t,v) {n,t, 0, v, 0, 0, 0, 0}
+#define PARSE_INT(n,t,v) {n,t, 0, 0, v, 0, 0, 0}
+#define PARSE_STR(n,t,v) {n,t, 0, 0, 0, v, 0, 0}
#define PARSE_ENV(n,t,v) {n,t, 0, 0, 0, v, 0, 0}
#define PARSE_FUN(n,t,v) {n,t, 0, 0, 0, 0, v, 0}
#define PARSE_DEF(n,t,v) {n,t, 0, 0, 0, 0, 0, v}
#else
#define ParseData long value
#define PARSE_ADD(n,t,v) {n,t, (long)&(v)}
-#define PARSE_SET(n,t,v) {n,t, (long)&(v)}
-#define PARSE_INT(n,t,v) {n,t, (long)&(v)}
-#define PARSE_STR(n,t,v) {n,t, (long)&(v)}
+#define PARSE_SET(n,t,v) {n,t, (long) (v)}
+#define PARSE_INT(n,t,v) {n,t, (long) (v)}
+#define PARSE_STR(n,t,v) {n,t, (long) (v)}
#define PARSE_ENV(n,t,v) {n,t, (long) (v)}
#define PARSE_FUN(n,t,v) {n,t, (long) (v)}
#define PARSE_DEF(n,t,v) {n,t, (long) (v)}
@@ -844,111 +844,111 @@
/* This table should be sorted alphabetically */
static Config_Type Config_Table [] =
{
- PARSE_SET("accept_all_cookies", CONF_BOOL, LYAcceptAllCookies),
- PARSE_INT("alertsecs", CONF_INT, AlertSecs),
- PARSE_SET("always_resubmit_posts", CONF_BOOL, LYresubmit_posts),
+ PARSE_SET("accept_all_cookies", CONF_BOOL, &LYAcceptAllCookies),
+ PARSE_INT("alertsecs", CONF_INT, &AlertSecs),
+ PARSE_SET("always_resubmit_posts", CONF_BOOL, &LYresubmit_posts),
#ifdef EXEC_LINKS
PARSE_DEF("always_trusted_exec", CONF_ADD_TRUSTED, ALWAYS_EXEC_PATH),
#endif
PARSE_FUN("assume_charset", CONF_FUN, assume_charset_fun),
PARSE_FUN("assume_local_charset", CONF_FUN, assume_local_charset_fun),
PARSE_FUN("assume_unrec_charset", CONF_FUN, assume_unrec_charset_fun),
- PARSE_SET("block_multi_bookmarks", CONF_BOOL, LYMBMBlocked),
- PARSE_SET("bold_h1", CONF_BOOL, bold_H1),
- PARSE_SET("bold_headers", CONF_BOOL, bold_headers),
- PARSE_SET("bold_name_anchors", CONF_BOOL, bold_name_anchors),
- PARSE_SET("case_sensitive_always_on", CONF_BOOL, case_sensitive),
+ PARSE_SET("block_multi_bookmarks", CONF_BOOL, &LYMBMBlocked),
+ PARSE_SET("bold_h1", CONF_BOOL, &bold_H1),
+ PARSE_SET("bold_headers", CONF_BOOL, &bold_headers),
+ PARSE_SET("bold_name_anchors", CONF_BOOL, &bold_name_anchors),
+ PARSE_SET("case_sensitive_always_on", CONF_BOOL, &case_sensitive),
PARSE_FUN("character_set", CONF_FUN, character_set_fun),
- PARSE_SET("checkmail", CONF_BOOL, check_mail),
- PARSE_SET("collapse_br_tags", CONF_BOOL, LYCollapseBRs),
+ PARSE_SET("checkmail", CONF_BOOL, &check_mail),
+ PARSE_SET("collapse_br_tags", CONF_BOOL, &LYCollapseBRs),
#ifdef USE_COLOR_TABLE
PARSE_FUN("color", CONF_FUN, color_fun),
#endif
- PARSE_STR("cookie_accept_domains", CONF_STR, LYCookieSAcceptDomains),
+ PARSE_STR("cookie_accept_domains", CONF_STR, &LYCookieSAcceptDomains),
#ifdef EXP_PERSISTENT_COOKIES
- PARSE_STR("cookie_file", CONF_STR, LYCookieFile),
+ PARSE_STR("cookie_file", CONF_STR, &LYCookieFile),
#endif /* EXP_PERSISTENT_COOKIES */
- PARSE_STR("cookie_loose_invalid_domains", CONF_STR,
LYCookieSLooseCheckDomains),
- PARSE_STR("cookie_query_invalid_domains", CONF_STR,
LYCookieSQueryCheckDomains),
- PARSE_STR("cookie_reject_domains", CONF_STR, LYCookieSRejectDomains),
- PARSE_STR("cookie_strict_invalid_domains", CONF_STR,
LYCookieSStrictCheckDomains),
+ PARSE_STR("cookie_loose_invalid_domains", CONF_STR,
&LYCookieSLooseCheckDomains),
+ PARSE_STR("cookie_query_invalid_domains", CONF_STR,
&LYCookieSQueryCheckDomains),
+ PARSE_STR("cookie_reject_domains", CONF_STR, &LYCookieSRejectDomains),
+ PARSE_STR("cookie_strict_invalid_domains", CONF_STR,
&LYCookieSStrictCheckDomains),
PARSE_ENV("cso_proxy", CONF_ENV, 0 ),
#ifdef VMS
- PARSE_STR("CSWING_PATH", CONF_STR, LYCSwingPath),
+ PARSE_STR("CSWING_PATH", CONF_STR, &LYCSwingPath),
#endif
PARSE_FUN("default_bookmark_file", CONF_FUN, default_bookmark_file_fun),
PARSE_FUN("default_cache_size", CONF_FUN, default_cache_size_fun),
PARSE_FUN("default_editor", CONF_FUN, default_editor_fun),
- PARSE_STR("default_index_file", CONF_STR, indexfile),
+ PARSE_STR("default_index_file", CONF_STR, &indexfile),
PARSE_FUN("default_keypad_mode_is_numbers_as_arrows", CONF_FUN,
numbers_as_arrows_fun),
PARSE_FUN("default_user_mode", CONF_FUN, default_user_mode_fun),
#if defined(VMS) && defined(VAXC) && !defined(__DECC)
- PARSE_INT("default_virtual_memory_size", CONF_INT, HTVirtualMemorySize),
+ PARSE_INT("default_virtual_memory_size", CONF_INT, &HTVirtualMemorySize),
#endif
#ifdef DIRED_SUPPORT
PARSE_FUN("dired_menu", CONF_FUN, dired_menu_fun),
#endif
PARSE_ADD("downloader", CONF_ADD_ITEM, downloaders),
- PARSE_SET("emacs_keys_always_on", CONF_BOOL, emacs_keys),
- PARSE_SET("enable_scrollback", CONF_BOOL, enable_scrollback),
+ PARSE_SET("emacs_keys_always_on", CONF_BOOL, &emacs_keys),
+ PARSE_SET("enable_scrollback", CONF_BOOL, &enable_scrollback),
#ifdef USE_EXTERNALS
PARSE_ADD("external", CONF_ADD_ITEM, externals),
#endif
PARSE_ENV("finger_proxy", CONF_ENV, 0 ),
- PARSE_SET("force_8bit_toupper", CONF_BOOL, UCForce8bitTOUPPER),
- PARSE_SET("force_ssl_cookies_secure", CONF_BOOL, LYForceSSLCookiesSecure),
+ PARSE_SET("force_8bit_toupper", CONF_BOOL, &UCForce8bitTOUPPER),
+ PARSE_SET("force_ssl_cookies_secure", CONF_BOOL,
&LYForceSSLCookiesSecure),
#if !defined(NO_OPTION_FORMS) && !defined(NO_OPTION_MENU)
- PARSE_SET("forms_options", CONF_BOOL, LYUseFormsOptions),
+ PARSE_SET("forms_options", CONF_BOOL, &LYUseFormsOptions),
#endif
PARSE_ENV("ftp_proxy", CONF_ENV, 0 ),
- PARSE_STR("global_extension_map", CONF_STR, global_extension_map),
- PARSE_STR("global_mailcap", CONF_STR, global_type_map),
+ PARSE_STR("global_extension_map", CONF_STR, &global_extension_map),
+ PARSE_STR("global_mailcap", CONF_STR, &global_type_map),
PARSE_ENV("gopher_proxy", CONF_ENV, 0 ),
- PARSE_SET("gotobuffer", CONF_BOOL, goto_buffer),
- PARSE_STR("helpfile", CONF_STR, helpfile),
- PARSE_SET("historical_comments", CONF_BOOL, historical_comments),
+ PARSE_SET("gotobuffer", CONF_BOOL, &goto_buffer),
+ PARSE_STR("helpfile", CONF_STR, &helpfile),
+ PARSE_SET("historical_comments", CONF_BOOL, &historical_comments),
PARSE_ENV("http_proxy", CONF_ENV, 0 ),
PARSE_ENV("https_proxy", CONF_ENV, 0 ),
PARSE_FUN("include", CONF_INCLUDE, 0),
- PARSE_INT("infosecs", CONF_INT, InfoSecs),
- PARSE_STR("jump_prompt", CONF_STR, jumpprompt),
- PARSE_SET("jumpbuffer", CONF_BOOL, jump_buffer),
+ PARSE_INT("infosecs", CONF_INT, &InfoSecs),
+ PARSE_STR("jump_prompt", CONF_STR, &jumpprompt),
+ PARSE_SET("jumpbuffer", CONF_BOOL, &jump_buffer),
PARSE_FUN("jumpfile", CONF_FUN, jumpfile_fun),
#ifdef EXP_KEYBOARD_LAYOUT
PARSE_FUN("keyboard_layout", CONF_FUN, keyboard_layout_fun),
#endif
PARSE_FUN("keymap", CONF_FUN, keymap_fun),
#ifndef DISABLE_NEWS
- PARSE_SET("list_news_numbers", CONF_BOOL, LYListNewsNumbers),
- PARSE_SET("list_news_dates", CONF_BOOL, LYListNewsDates),
+ PARSE_SET("list_news_numbers", CONF_BOOL, &LYListNewsNumbers),
+ PARSE_SET("list_news_dates", CONF_BOOL, &LYListNewsDates),
#endif
#ifndef VMS
- PARSE_STR("list_format", CONF_STR, list_format),
+ PARSE_STR("list_format", CONF_STR, &list_format),
#endif
PARSE_FUN("localhost_alias", CONF_FUN, localhost_alias_fun),
- PARSE_STR("local_domain", CONF_STR, LYLocalDomain),
+ PARSE_STR("local_domain", CONF_STR, &LYLocalDomain),
#if defined(EXEC_LINKS) || defined(EXEC_SCRIPTS)
- PARSE_SET("local_execution_links_always_on", CONF_BOOL, local_exec),
- PARSE_SET("local_execution_links_on_but_not_remote", CONF_BOOL,
local_exec_on_local_files),
+ PARSE_SET("local_execution_links_always_on", CONF_BOOL, &local_exec),
+ PARSE_SET("local_execution_links_on_but_not_remote", CONF_BOOL,
&local_exec_on_local_files),
#endif
#ifdef LYNXCGI_LINKS
PARSE_FUN("lynxcgi_environment", CONF_FUN, lynxcgi_environment_fun),
#ifndef VMS
- PARSE_STR("lynxcgi_document_root", CONF_STR, LYCgiDocumentRoot),
+ PARSE_STR("lynxcgi_document_root", CONF_STR, &LYCgiDocumentRoot),
#endif
#endif
- PARSE_STR("lynx_host_name", CONF_STR, LYHostName),
+ PARSE_STR("lynx_host_name", CONF_STR, &LYHostName),
PARSE_FUN("lynx_sig_file", CONF_FUN, lynx_sig_file_fun),
- PARSE_SET("mail_system_error_logging", CONF_BOOL, error_logging),
+ PARSE_SET("mail_system_error_logging", CONF_BOOL, &error_logging),
#ifdef VMS
- PARSE_STR("mail_adrs", CONF_STR, mail_adrs),
+ PARSE_STR("mail_adrs", CONF_STR, &mail_adrs),
#endif
- PARSE_SET("make_links_for_all_images", CONF_BOOL, clickable_images),
- PARSE_SET("make_pseudo_alts_for_inlines", CONF_BOOL, pseudo_inline_alts),
- PARSE_INT("messagesecs", CONF_INT, MessageSecs),
- PARSE_SET("minimal_comments", CONF_BOOL, minimal_comments),
- PARSE_INT("multi_bookmark_support", CONF_BOOL, LYMultiBookmarks),
- PARSE_SET("ncr_in_bookmarks", CONF_BOOL, UCSaveBookmarksInUnicode),
+ PARSE_SET("make_links_for_all_images", CONF_BOOL, &clickable_images),
+ PARSE_SET("make_pseudo_alts_for_inlines", CONF_BOOL, &pseudo_inline_alts),
+ PARSE_INT("messagesecs", CONF_INT, &MessageSecs),
+ PARSE_SET("minimal_comments", CONF_BOOL, &minimal_comments),
+ PARSE_INT("multi_bookmark_support", CONF_BOOL, &LYMultiBookmarks),
+ PARSE_SET("ncr_in_bookmarks", CONF_BOOL, &UCSaveBookmarksInUnicode),
#ifndef DISABLE_NEWS
PARSE_FUN("news_chunk_size", CONF_FUN, news_chunk_size_fun),
PARSE_FUN("news_max_chunk", CONF_FUN, news_max_chunk_fun),
@@ -959,77 +959,77 @@
PARSE_ENV("nntp_proxy", CONF_ENV, 0),
PARSE_ENV("nntpserver", CONF_ENV2, 0), /* actually NNTPSERVER */
#endif
- PARSE_SET("no_dot_files", CONF_BOOL, no_dotfiles),
- PARSE_SET("no_file_referer", CONF_BOOL, no_filereferer),
+ PARSE_SET("no_dot_files", CONF_BOOL, &no_dotfiles),
+ PARSE_SET("no_file_referer", CONF_BOOL, &no_filereferer),
#ifndef VMS
- PARSE_SET("no_forced_core_dump", CONF_BOOL, LYNoCore),
+ PARSE_SET("no_forced_core_dump", CONF_BOOL, &LYNoCore),
#endif
- PARSE_SET("no_from_header", CONF_BOOL, LYNoFromHeader),
- PARSE_SET("no_ismap_if_usemap", CONF_BOOL, LYNoISMAPifUSEMAP),
+ PARSE_SET("no_from_header", CONF_BOOL, &LYNoFromHeader),
+ PARSE_SET("no_ismap_if_usemap", CONF_BOOL, &LYNoISMAPifUSEMAP),
PARSE_ENV("no_proxy", CONF_ENV, 0 ),
- PARSE_SET("no_referer_header", CONF_BOOL, LYNoRefererHeader),
+ PARSE_SET("no_referer_header", CONF_BOOL, &LYNoRefererHeader),
PARSE_FUN("outgoing_mail_charset", CONF_FUN, outgoing_mail_charset_fun),
#ifdef DISP_PARTIAL
- PARSE_SET("partial", CONF_BOOL, display_partial),
- PARSE_INT("partial_thres", CONF_INT, partial_threshold),
+ PARSE_SET("partial", CONF_BOOL, &display_partial),
+ PARSE_INT("partial_thres", CONF_INT, &partial_threshold),
#endif
#ifdef EXP_PERSISTENT_COOKIES
- PARSE_SET("persistent_cookies", CONF_BOOL, persistent_cookies),
+ PARSE_SET("persistent_cookies", CONF_BOOL, &persistent_cookies),
#endif /* EXP_PERSISTENT_COOKIES */
- PARSE_STR("personal_mailcap", CONF_STR, personal_type_map),
- PARSE_STR("personal_extension_map", CONF_STR, personal_extension_map),
- PARSE_STR("preferred_charset", CONF_STR, pref_charset),
- PARSE_STR("preferred_language", CONF_STR, language),
- PARSE_SET("prepend_base_to_source", CONF_BOOL, LYPrependBaseToSource),
- PARSE_SET("prepend_charset_to_source", CONF_BOOL,
LYPrependCharsetToSource),
+ PARSE_STR("personal_mailcap", CONF_STR, &personal_type_map),
+ PARSE_STR("personal_extension_map", CONF_STR, &personal_extension_map),
+ PARSE_STR("preferred_charset", CONF_STR, &pref_charset),
+ PARSE_STR("preferred_language", CONF_STR, &language),
+ PARSE_SET("prepend_base_to_source", CONF_BOOL, &LYPrependBaseToSource),
+ PARSE_SET("prepend_charset_to_source", CONF_BOOL,
&LYPrependCharsetToSource),
PARSE_FUN("printer", CONF_FUN, printer_fun),
- PARSE_SET("quit_default_yes", CONF_BOOL, LYQuitDefaultYes),
+ PARSE_SET("quit_default_yes", CONF_BOOL, &LYQuitDefaultYes),
#ifndef NO_RULES
PARSE_FUN("rule", CONF_FUN, HTSetConfiguration),
PARSE_FUN("rulesfile", CONF_FUN, cern_rulesfile_fun),
#endif /* NO_RULES */
- PARSE_STR("save_space", CONF_STR, lynx_save_space),
- PARSE_SET("scan_for_buried_news_refs", CONF_BOOL,
scan_for_buried_news_references),
- PARSE_SET("seek_frag_area_in_cur", CONF_BOOL, LYSeekFragAREAinCur),
- PARSE_SET("seek_frag_map_in_cur", CONF_BOOL, LYSeekFragMAPinCur),
- PARSE_SET("set_cookies", CONF_BOOL, LYSetCookies),
- PARSE_SET("show_cursor", CONF_BOOL, LYShowCursor),
- PARSE_SET("show_kb_rate", CONF_BOOL, LYshow_kb_rate),
+ PARSE_STR("save_space", CONF_STR, &lynx_save_space),
+ PARSE_SET("scan_for_buried_news_refs", CONF_BOOL,
&scan_for_buried_news_references),
+ PARSE_SET("seek_frag_area_in_cur", CONF_BOOL, &LYSeekFragAREAinCur),
+ PARSE_SET("seek_frag_map_in_cur", CONF_BOOL, &LYSeekFragMAPinCur),
+ PARSE_SET("set_cookies", CONF_BOOL, &LYSetCookies),
+ PARSE_SET("show_cursor", CONF_BOOL, &LYShowCursor),
+ PARSE_SET("show_kb_rate", CONF_BOOL, &LYshow_kb_rate),
PARSE_ENV("snews_proxy", CONF_ENV, 0 ),
PARSE_ENV("snewspost_proxy", CONF_ENV, 0 ),
PARSE_ENV("snewsreply_proxy", CONF_ENV, 0 ),
- PARSE_SET("soft_dquotes", CONF_BOOL, soft_dquotes),
- PARSE_STR("startfile", CONF_STR, startfile),
- PARSE_SET("strip_dotdot_urls", CONF_BOOL, LYStripDotDotURLs),
- PARSE_SET("substitute_underscores", CONF_BOOL, use_underscore),
+ PARSE_SET("soft_dquotes", CONF_BOOL, &soft_dquotes),
+ PARSE_STR("startfile", CONF_STR, &startfile),
+ PARSE_SET("strip_dotdot_urls", CONF_BOOL, &LYStripDotDotURLs),
+ PARSE_SET("substitute_underscores", CONF_BOOL, &use_underscore),
PARSE_FUN("suffix", CONF_FUN, suffix_fun),
PARSE_FUN("system_editor", CONF_FUN, system_editor_fun),
- PARSE_STR("system_mail", CONF_STR, system_mail),
- PARSE_STR("system_mail_flags", CONF_STR, system_mail_flags),
- PARSE_SET("tagsoup", CONF_BOOL, Old_DTD),
+ PARSE_STR("system_mail", CONF_STR, &system_mail),
+ PARSE_STR("system_mail_flags", CONF_STR, &system_mail_flags),
+ PARSE_SET("tagsoup", CONF_BOOL, &Old_DTD),
#ifdef EXEC_LINKS
PARSE_DEF("trusted_exec", CONF_ADD_TRUSTED, EXEC_PATH),
#endif
#ifdef LYNXCGI_LINKS
PARSE_DEF("trusted_lynxcgi", CONF_ADD_TRUSTED, CGI_PATH),
#endif
- PARSE_STR("url_domain_prefixes", CONF_STR, URLDomainPrefixes),
- PARSE_STR("url_domain_suffixes", CONF_STR, URLDomainSuffixes),
+ PARSE_STR("url_domain_prefixes", CONF_STR, &URLDomainPrefixes),
+ PARSE_STR("url_domain_suffixes", CONF_STR, &URLDomainSuffixes),
#ifdef DIRED_SUPPORT
PARSE_ADD("uploader", CONF_ADD_ITEM, uploaders),
#endif
#ifdef VMS
- PARSE_SET("use_fixed_records", CONF_BOOL, UseFixedRecords),
+ PARSE_SET("use_fixed_records", CONF_BOOL, &UseFixedRecords),
#endif
#if defined(NCURSES_MOUSE_VERSION) || defined(USE_SLANG_MOUSE)
- PARSE_SET("use_mouse", CONF_BOOL, LYUseMouse),
+ PARSE_SET("use_mouse", CONF_BOOL, &LYUseMouse),
#endif
- PARSE_SET("use_select_popups", CONF_BOOL, LYSelectPopups),
- PARSE_SET("verbose_images", CONF_BOOL, verbose_img),
- PARSE_SET("vi_keys_always_on", CONF_BOOL, vi_keys),
+ PARSE_SET("use_select_popups", CONF_BOOL, &LYSelectPopups),
+ PARSE_SET("verbose_images", CONF_BOOL, &verbose_img),
+ PARSE_SET("vi_keys_always_on", CONF_BOOL, &vi_keys),
PARSE_FUN("viewer", CONF_FUN, viewer_fun),
PARSE_ENV("wais_proxy", CONF_ENV, 0 ),
- PARSE_STR("xloadimage_command", CONF_STR, XLoadImageCommand),
+ PARSE_STR("xloadimage_command", CONF_STR, &XLoadImageCommand),
{0}
};