1 /*
2  * $LynxId: LYrcFile.h,v 1.58 2021/07/05 20:23:51 tom Exp $
3  */
4 #ifndef LYRCFILE_H
5 #define LYRCFILE_H
6 
7 #ifndef LYSTRUCTS_H
8 #include <LYStructs.h>
9 #endif /* LYSTRUCTS_H */
10 
11 /* configuration-variable names to share with LYReadCFG.c and LYOptions.c */
12 #define RC_ACCEPT_ALL_COOKIES           "accept_all_cookies"
13 #define RC_ALERTSECS                    "alertsecs"
14 #define RC_ALT_BLAT_MAIL                "alt_blat_mail"
15 #define RC_ALWAYS_RESUBMIT_POSTS        "always_resubmit_posts"
16 #define RC_ALWAYS_TRUSTED_EXEC          "always_trusted_exec"
17 #define RC_ANONFTP_PASSWORD             "anonftp_password"
18 #define RC_ASSUMED_COLOR                "assumed_color"
19 #define RC_ASSUMED_DOC_CHARSET_CHOICE   "assumed_doc_charset_choice"
20 #define RC_ASSUME_CHARSET               "assume_charset"
21 #define RC_ASSUME_LOCAL_CHARSET         "assume_local_charset"
22 #define RC_ASSUME_UNREC_CHARSET         "assume_unrec_charset"
23 #define RC_AUTO_SESSION                 "auto_session"
24 #define RC_AUTO_UNCACHE_DIRLISTS        "auto_uncache_dirlists"
25 #define RC_BAD_HTML                     "bad_html"
26 #define RC_BIBP_BIBHOST                 "bibp_bibhost"
27 #define RC_BIBP_GLOBALSERVER            "bibp_globalserver"
28 #define RC_BLAT_MAIL                    "blat_mail"
29 #define RC_BLOCK_MULTI_BOOKMARKS        "block_multi_bookmarks"
30 #define RC_BOLD_H1                      "bold_h1"
31 #define RC_BOLD_HEADERS                 "bold_headers"
32 #define RC_BOLD_NAME_ANCHORS            "bold_name_anchors"
33 #define RC_BOOKMARK_FILE                "bookmark_file"
34 #define RC_BROKEN_FTP_EPSV              "broken_ftp_epsv"
35 #define RC_BROKEN_FTP_RETR              "broken_ftp_retr"
36 #define RC_BZIP2_PATH                   "bzip2_path"
37 #define RC_CASE_SENSITIVE_ALWAYS_ON     "case_sensitive_always_on"
38 #define RC_CASE_SENSITIVE_SEARCHING     "case_sensitive_searching"
39 #define RC_CHARACTER_SET                "character_set"
40 #define RC_CHARSETS_DIRECTORY           "charsets_directory"
41 #define RC_CHARSET_SWITCH_RULES         "charset_switch_rules"
42 #define RC_CHECKMAIL                    "checkmail"
43 #define RC_CHMOD_PATH                   "chmod_path"
44 #define RC_COLLAPSE_BR_TAGS             "collapse_br_tags"
45 #define RC_COLOR                        "color"
46 #define RC_COLOR_STYLE                  "color_style"
47 #define RC_COMPRESS_PATH                "compress_path"
48 #define RC_CONNECT_TIMEOUT              "connect_timeout"
49 #define RC_CONV_JISX0201KANA            "conv_jisx0201kana"
50 #define RC_COOKIE_ACCEPT_DOMAINS        "cookie_accept_domains"
51 #define RC_COOKIE_FILE                  "cookie_file"
52 #define RC_COOKIE_LOOSE_INVALID_DOMAINS "cookie_loose_invalid_domains"
53 #define RC_COOKIE_QUERY_INVALID_DOMAINS "cookie_query_invalid_domains"
54 #define RC_COOKIE_REJECT_DOMAINS        "cookie_reject_domains"
55 #define RC_COOKIE_SAVE_FILE             "cookie_save_file"
56 #define RC_COOKIE_STRICT_INVALID_DOMAIN "cookie_strict_invalid_domains"
57 #define RC_COOKIE_VERSION               "cookie_version"
58 #define RC_COPY_PATH                    "copy_path"
59 #define RC_CSO_PROXY                    "cso_proxy"
60 #define RC_CSWING_PATH                  "cswing_path"
61 #define RC_DEFAULT_BOOKMARK_FILE        "default_bookmark_file"
62 #define RC_DEFAULT_CACHE_SIZE           "default_cache_size"
63 #define RC_DEFAULT_COLORS               "default_colors"
64 #define RC_DEFAULT_EDITOR               "default_editor"
65 #define RC_DEFAULT_INDEX_FILE           "default_index_file"
66 #define RC_DEFAULT_KEYPAD_MODE          "default_keypad_mode"
67 #define RC_DEFAULT_KEYPAD_MODE_NUMARO   "default_keypad_mode_is_numbers_as_arrows"
68 #define RC_DEFAULT_USER_MODE            "default_user_mode"
69 #define RC_DEFAULT_VIRTUAL_MEMORY_SIZE  "default_virtual_memory_size"
70 #define RC_DELAYSECS                    "delaysecs"
71 #define RC_DIRED_MENU                   "dired_menu"
72 #define RC_DIR_LIST_ORDER               "dir_list_order"
73 #define RC_DIR_LIST_STYLE               "dir_list_style"
74 #define RC_DISPLAY                      "display"
75 #define RC_DISPLAY_CHARSET_CHOICE       "display_charset_choice"
76 #define RC_DONT_WRAP_PRE                "dont_wrap_pre"
77 #define RC_DOWNLOADER                   "downloader"
78 #define RC_EMACS_KEYS                   "emacs_keys"
79 #define RC_EMACS_KEYS_ALWAYS_ON         "emacs_keys_always_on"
80 #define RC_ENABLE_LYNXRC                "enable_lynxrc"
81 #define RC_ENABLE_SCROLLBACK            "enable_scrollback"
82 #define RC_EXTERNAL                     "external"
83 #define RC_EXTERNAL_MENU                "external_menu"
84 #define RC_FILE_EDITOR                  "file_editor"
85 #define RC_FILE_SORTING_METHOD          "file_sorting_method"
86 #define RC_FINGER_PROXY                 "finger_proxy"
87 #define RC_FOCUS_WINDOW                 "focus_window"
88 #define RC_FORCE_8BIT_TOUPPER           "force_8bit_toupper"
89 #define RC_FORCE_COOKIE_PROMPT          "force_cookie_prompt"
90 #define RC_FORCE_EMPTY_HREFLESS_A       "force_empty_hrefless_a"
91 #define RC_FORCE_HTML                   "force_html"
92 #define RC_FORCE_SSL_COOKIES_SECURE     "force_ssl_cookies_secure"
93 #define RC_FORCE_SSL_PROMPT             "force_ssl_prompt"
94 #define RC_FORMS_OPTIONS                "forms_options"
95 #define RC_FTP_FORMAT                   "ftp_format"
96 #define RC_FTP_PASSIVE                  "ftp_passive"
97 #define RC_FTP_PROXY                    "ftp_proxy"
98 #define RC_GLOBAL_EXTENSION_MAP         "global_extension_map"
99 #define RC_GLOBAL_MAILCAP               "global_mailcap"
100 #define RC_GOPHER_PROXY                 "gopher_proxy"
101 #define RC_GOTOBUFFER                   "gotobuffer"
102 #define RC_GUESS_SCHEME                 "guess_scheme"
103 #define RC_GZIP_PATH                    "gzip_path"
104 #define RC_HELPFILE                     "helpfile"
105 #define RC_HIDDENLINKS                  "hiddenlinks"
106 #define RC_HIDDEN_LINK_MARKER           "hidden_link_marker"
107 #define RC_HISTORICAL_COMMENTS          "historical_comments"
108 #define RC_HTML5_CHARSETS               "html5_charsets"
109 #define RC_HTMLSRC_ATTRNAME_XFORM       "htmlsrc_attrname_xform"
110 #define RC_HTMLSRC_TAGNAME_XFORM        "htmlsrc_tagname_xform"
111 #define RC_HTTPS_PROXY                  "https_proxy"
112 #define RC_HTTP_PROTOCOL                "http_protocol"
113 #define RC_HTTP_PROXY                   "http_proxy"
114 #define RC_IDNA_MODE                    "idna_mode"
115 #define RC_INCLUDE                      "include"
116 #define RC_INFLATE_PATH                 "inflate_path"
117 #define RC_INFOSECS                     "infosecs"
118 #define RC_INSTALL_PATH                 "install_path"
119 #define RC_JUMPBUFFER                   "jumpbuffer"
120 #define RC_JUMPFILE                     "jumpfile"
121 #define RC_JUMP_PROMPT                  "jump_prompt"
122 #define RC_JUSTIFY                      "justify"
123 #define RC_JUSTIFY_MAX_VOID_PERCENT     "justify_max_void_percent"
124 #define RC_KBLAYOUT                     "kblayout"
125 #define RC_KEYBOARD_LAYOUT              "keyboard_layout"
126 #define RC_KEYMAP                       "keymap"
127 #define RC_KEYPAD_MODE                  "keypad_mode"
128 #define RC_LEFTARROW_IN_TEXTFLD_PROMPT  "leftarrow_in_textfield_prompt"
129 #define RC_LINEEDIT_MODE                "lineedit_mode"
130 #define RC_LISTONLY                     "listonly"
131 #define RC_LIST_DECODED                 "list_decoded"
132 #define RC_LIST_FORMAT                  "list_format"
133 #define RC_LIST_INLINE                  "list_inline"
134 #define RC_LIST_NEWS_DATES              "list_news_dates"
135 #define RC_LIST_NEWS_NUMBERS            "list_news_numbers"
136 #define RC_LOCALE_CHARSET               "locale_charset"
137 #define RC_LOCALHOST                    "localhost"
138 #define RC_LOCALHOST_ALIAS              "localhost_alias"
139 #define RC_LOCAL_DOMAIN                 "local_domain"
140 #define RC_LOCAL_EXECUTION_LINKS_ALWAYS "local_execution_links_always_on"
141 #define RC_LOCAL_EXECUTION_LINKS_LOCAL  "local_execution_links_on_but_not_remote"
142 #define RC_LYNXCGI_DOCUMENT_ROOT        "lynxcgi_document_root"
143 #define RC_LYNXCGI_ENVIRONMENT          "lynxcgi_environment"
144 #define RC_LYNX_HOST_NAME               "lynx_host_name"
145 #define RC_LYNX_SIG_FILE                "lynx_sig_file"
146 #define RC_MAIL_ADRS                    "mail_adrs"
147 #define RC_MAIL_SYSTEM_ERROR_LOGGING    "mail_system_error_logging"
148 #define RC_MAKE_LINKS_FOR_ALL_IMAGES    "make_links_for_all_images"
149 #define RC_MAKE_PSEUDO_ALTS_FOR_INLINES "make_pseudo_alts_for_inlines"
150 #define RC_MAX_COOKIES_BUFFER           "max_cookies_buffer"
151 #define RC_MAX_COOKIES_DOMAIN           "max_cookies_domain"
152 #define RC_MAX_COOKIES_GLOBAL           "max_cookies_global"
153 #define RC_MAX_URI_SIZE                 "max_uri_size"
154 #define RC_MESSAGESECS                  "messagesecs"
155 #define RC_MESSAGE_LANGUAGE             "message_language"
156 #define RC_MINIMAL_COMMENTS             "minimal_comments"
157 #define RC_MKDIR_PATH                   "mkdir_path"
158 #define RC_MULTI_BOOKMARK               "multi_bookmark"
159 #define RC_MULTI_BOOKMARK_SUPPORT       "multi_bookmark_support"
160 #define RC_MV_PATH                      "mv_path"
161 #define RC_NCR_IN_BOOKMARKS             "ncr_in_bookmarks"
162 #define RC_NESTED_TABLES                "nested_tables"
163 #define RC_NEWSPOST_PROXY               "newspost_proxy"
164 #define RC_NEWSREPLY_PROXY              "newsreply_proxy"
165 #define RC_NEWS_CHUNK_SIZE              "news_chunk_size"
166 #define RC_NEWS_MAX_CHUNK               "news_max_chunk"
167 #define RC_NEWS_POSTING                 "news_posting"
168 #define RC_NEWS_PROXY                   "news_proxy"
169 #define RC_NNTPSERVER                   "nntpserver"
170 #define RC_NNTP_PROXY                   "nntp_proxy"
171 #define RC_NONRESTARTING_SIGWINCH       "nonrestarting_sigwinch"
172 #define RC_NO_DOT_FILES                 "no_dot_files"
173 #define RC_NO_FILE_REFERER              "no_file_referer"
174 #define RC_NO_FORCED_CORE_DUMP          "no_forced_core_dump"
175 #define RC_NO_FROM_HEADER               "no_from_header"
176 #define RC_NO_ISMAP_IF_USEMAP           "no_ismap_if_usemap"
177 #define RC_NO_MARGINS                   "no_margins"
178 #define RC_NO_PAUSE                     "no_pause"
179 #define RC_NO_PROXY                     "no_proxy"
180 #define RC_NO_REFERER_HEADER            "no_referer_header"
181 #define RC_NO_TABLE_CENTER              "no_table_center"
182 #define RC_NO_TITLE                     "no_title"
183 #define RC_NUMBER_FIELDS_ON_LEFT        "number_fields_on_left"
184 #define RC_NUMBER_LINKS_ON_LEFT         "number_links_on_left"
185 #define RC_OUTGOING_MAIL_CHARSET        "outgoing_mail_charset"
186 #define RC_PARTIAL                      "partial"
187 #define RC_PARTIAL_THRES                "partial_thres"
188 #define RC_PERSISTENT_COOKIES           "persistent_cookies"
189 #define RC_PERSONAL_EXTENSION_MAP       "personal_extension_map"
190 #define RC_PERSONAL_MAILCAP             "personal_mailcap"
191 #define RC_PERSONAL_MAIL_ADDRESS        "personal_mail_address"
192 #define RC_PERSONAL_MAIL_NAME           "personal_mail_name"
193 #define RC_POSITIONABLE_EDITOR          "positionable_editor"
194 #define RC_PREFERRED_CHARSET            "preferred_charset"
195 #define RC_PREFERRED_CONTENT_TYPE       "preferred_content_type"
196 #define RC_PREFERRED_ENCODING           "preferred_encoding"
197 #define RC_PREFERRED_LANGUAGE           "preferred_language"
198 #define RC_PREFERRED_MEDIA_TYPES        "preferred_media_types"
199 #define RC_PREPEND_BASE_TO_SOURCE       "prepend_base_to_source"
200 #define RC_PREPEND_CHARSET_TO_SOURCE    "prepend_charset_to_source"
201 #define RC_PRETTYSRC                    "prettysrc"
202 #define RC_PRETTYSRC_SPEC               "prettysrc_spec"
203 #define RC_PRETTYSRC_VIEW_NO_ANCHOR_NUM "prettysrc_view_no_anchor_numbering"
204 #define RC_PRINTER                      "printer"
205 #define RC_QUIT_DEFAULT_YES             "quit_default_yes"
206 #define RC_RAW_MODE                     "raw_mode"
207 #define RC_READ_TIMEOUT                 "read_timeout"
208 #define RC_REDIRECTION_LIMIT            "redirection_limit"
209 #define RC_REFERER_WITH_QUERY           "referer_with_query"
210 #define RC_REPLAYSECS                   "replaysecs"
211 #define RC_REUSE_TEMPFILES              "reuse_tempfiles"
212 #define RC_RLOGIN_PATH                  "rlogin_path"
213 #define RC_RMDIR_PATH                   "rmdir_path"
214 #define RC_RM_PATH                      "rm_path"
215 #define RC_RULE                         "rule"
216 #define RC_RULESFILE                    "rulesfile"
217 #define RC_RUN_ALL_EXECUTION_LINKS      "run_all_execution_links"
218 #define RC_RUN_EXECUTION_LINKS_LOCAL    "run_execution_links_on_local_files"
219 #define RC_SAVE_SPACE                   "save_space"
220 #define RC_SCAN_FOR_BURIED_NEWS_REFS    "scan_for_buried_news_refs"
221 #define RC_SCREEN_SIZE                  "screen_size"
222 #define RC_SCROLLBAR                    "scrollbar"
223 #define RC_SCROLLBAR_ARROW              "scrollbar_arrow"
224 #define RC_SEEK_FRAG_AREA_IN_CUR        "seek_frag_area_in_cur"
225 #define RC_SEEK_FRAG_MAP_IN_CUR         "seek_frag_map_in_cur"
226 #define RC_SELECT_POPUPS                "select_popups"
227 #define RC_SEND_USERAGENT               "send_useragent"
228 #define RC_SESSION_FILE                 "session_file"
229 #define RC_SESSION_LIMIT                "session_limit"
230 #define RC_SET_COOKIES                  "set_cookies"
231 #define RC_SHORT_URL                    "short_url"
232 #define RC_SHOW_COLOR                   "show_color"
233 #define RC_SHOW_CURSOR                  "show_cursor"
234 #define RC_SHOW_DOTFILES                "show_dotfiles"
235 #define RC_SHOW_KB_NAME                 "show_kb_name"
236 #define RC_SHOW_KB_RATE                 "show_kb_rate"
237 #define RC_SNEWSPOST_PROXY              "snewspost_proxy"
238 #define RC_SNEWSREPLY_PROXY             "snewsreply_proxy"
239 #define RC_SNEWS_PROXY                  "snews_proxy"
240 #define RC_SOFT_DQUOTES                 "soft_dquotes"
241 #define RC_SOURCE_CACHE                 "source_cache"
242 #define RC_SOURCE_CACHE_FOR_ABORTED     "source_cache_for_aborted"
243 #define RC_SSL_CERT_FILE                "ssl_cert_file"
244 #define RC_SSL_CLIENT_CERT_FILE         "ssl_client_cert_file"
245 #define RC_SSL_CLIENT_KEY_FILE          "ssl_client_key_file"
246 #define RC_STARTFILE                    "startfile"
247 #define RC_STATUS_BUFFER_SIZE           "status_buffer_size"
248 #define RC_STRIP_DOTDOT_URLS            "strip_dotdot_urls"
249 #define RC_SUBSTITUTE_UNDERSCORES       "substitute_underscores"
250 #define RC_SUB_BOOKMARKS                "sub_bookmarks"
251 #define RC_SUFFIX                       "suffix"
252 #define RC_SUFFIX_ORDER                 "suffix_order"
253 #define RC_SYSLOG_REQUESTED_URLS        "syslog_requested_urls"
254 #define RC_SYSLOG_TEXT                  "syslog_text"
255 #define RC_SYSTEM_EDITOR                "system_editor"
256 #define RC_SYSTEM_MAIL                  "system_mail"
257 #define RC_SYSTEM_MAIL_FLAGS            "system_mail_flags"
258 #define RC_TAGSOUP                      "tagsoup"
259 #define RC_TAR_PATH                     "tar_path"
260 #define RC_TELNET_PATH                  "telnet_path"
261 #define RC_TEXTFIELDS_NEED_ACTIVATION   "textfields_need_activation"
262 #define RC_TIMEOUT                      "timeout"
263 #define RC_TN3270_PATH                  "tn3270_path"
264 #define RC_TOUCH_PATH                   "touch_path"
265 #define RC_TRACK_INTERNAL_LINKS         "track_internal_links"
266 #define RC_TRIM_BLANK_LINES             "trim_blank_lines"
267 #define RC_TRIM_INPUT_FIELDS            "trim_input_fields"
268 #define RC_TRUSTED_EXEC                 "trusted_exec"
269 #define RC_TRUSTED_LYNXCGI              "trusted_lynxcgi"
270 #define RC_UNCOMPRESS_PATH              "uncompress_path"
271 #define RC_UNDERLINE_LINKS              "underline_links"
272 #define RC_UNIQUE_URLS                  "unique_urls"
273 #define RC_UNZIP_PATH                   "unzip_path"
274 #define RC_UPDATE_TERM_TITLE            "update_term_title"
275 #define RC_UPLOADER                     "uploader"
276 #define RC_URL_DOMAIN_PREFIXES          "url_domain_prefixes"
277 #define RC_URL_DOMAIN_SUFFIXES          "url_domain_suffixes"
278 #define RC_USERAGENT                    "useragent"
279 #define RC_USER_MODE                    "user_mode"
280 #define RC_USE_FIXED_RECORDS            "use_fixed_records"
281 #define RC_USE_MOUSE                    "use_mouse"
282 #define RC_USE_SELECT_POPUPS            "use_select_popups"
283 #define RC_UUDECODE_PATH                "uudecode_path"
284 #define RC_VERBOSE_IMAGES               "verbose_images"
285 #define RC_VIEWER                       "viewer"
286 #define RC_VISITED_LINKS                "visited_links"
287 #define RC_VI_KEYS                      "vi_keys"
288 #define RC_VI_KEYS_ALWAYS_ON            "vi_keys_always_on"
289 #define RC_WAIS_PROXY                   "wais_proxy"
290 #define RC_WAIT_VIEWER_TERMINATION      "wait_viewer_termination"
291 #define RC_WITH_BACKSPACES              "with_backspaces"
292 #define RC_XHTML_PARSING                "xhtml_parsing"
293 #define RC_XLOADIMAGE_COMMAND           "xloadimage_command"
294 #define RC_ZCAT_PATH                    "zcat_path"
295 #define RC_ZIP_PATH                     "zip_path"
296 
297 extern Config_Enum tbl_cookie_version[];
298 extern Config_Enum tbl_force_prompt[];
299 extern Config_Enum tbl_keypad_mode[];
300 extern Config_Enum tbl_multi_bookmarks[];
301 extern Config_Enum tbl_preferred_content[];
302 extern Config_Enum tbl_preferred_encoding[];
303 extern Config_Enum tbl_preferred_media[];
304 extern Config_Enum tbl_transfer_rate[];
305 extern Config_Enum tbl_user_mode[];
306 
307 extern BOOL LYgetEnum(Config_Enum * table, const char *name, int *result);
308 extern BOOL LYsetRcValue(const char *name, const char *param);
309 extern BOOL will_save_rc(const char *name);
310 extern const char *LYputEnum(Config_Enum * table, int value);
311 extern int enable_lynxrc(char *value);
312 extern int get_http_protocol(char *value);
313 extern int get_tagsoup(char *value);
314 extern int save_rc(FILE *);
315 extern void read_rc(FILE *);
316 
317 #endif /* LYRCFILE_H */
318