📄 lyreadcfg.c
字号:
} else if (!strncasecomp(buffer, "MAKE_LINKS_FOR_ALL_IMAGES:", 26)) { clickable_images = is_true(buffer+26); } else if (!strncasecomp(buffer, "MAKE_PSEUDO_ALTS_FOR_INLINES:", 29)) { pseudo_inline_alts = is_true(buffer+29); } else if (!strncasecomp(buffer, "MESSAGESECS:", 12)) { strcpy(temp, buffer+12); for (i = 0; temp[i]; i++) { if (!isdigit(temp[i])) { temp[i] = '\0'; break; } } if (temp[0]) MessageSecs = atoi(temp); } else if (!strncasecomp(buffer, "MINIMAL_COMMENTS:", 17)) { minimal_comments = is_true(buffer+17); } else if (!strncasecomp(buffer, "MULTI_BOOKMARK_SUPPORT:", 23)) { LYMultiBookmarks = is_true(buffer+23); } break; case 'N': if (!strncasecomp(buffer, "NEWS_CHUNK_SIZE:", 16)) { HTNewsChunkSize = atoi(buffer+16); /* * If the new HTNewsChunkSize exceeds the maximum, * increase HTNewsMaxChunk to this size. - FM */ if (HTNewsChunkSize > HTNewsMaxChunk) { HTNewsMaxChunk = HTNewsChunkSize; } } else if (!strncasecomp(buffer, "NEWS_MAX_CHUNK:", 15)) { HTNewsMaxChunk = atoi(buffer+15); /* * If HTNewsChunkSize exceeds the new maximum, * reduce HTNewsChunkSize to this maximum. - FM */ if (HTNewsChunkSize > HTNewsMaxChunk) { HTNewsChunkSize = HTNewsMaxChunk; } } else if (!strncasecomp(buffer, "NEWS_POSTING:", 13)) { LYNewsPosting = is_true(buffer+13); no_newspost = (LYNewsPosting == FALSE); } else if (!strncasecomp(buffer, "news_proxy:", 11)) { if (getenv("news_proxy") == NULL) {#ifdef VMS strcpy(temp, "news_proxy"); Define_VMSLogical(temp, (char *)&buffer[11]);#else strcpy(temp, "news_proxy="); StrAllocCopy(news_proxy_putenv_cmd, temp); StrAllocCat(news_proxy_putenv_cmd, (char *)&buffer[11]); putenv(news_proxy_putenv_cmd);#endif /* VMS */ } } else if (!strncasecomp(buffer, "newspost_proxy:", 15)) { if (getenv("newspost_proxy") == NULL) {#ifdef VMS strcpy(temp, "newspost_proxy"); Define_VMSLogical(temp, (char *)&buffer[15]);#else strcpy(temp, "newspost_proxy="); StrAllocCopy(newspost_proxy_putenv_cmd, temp); StrAllocCat(newspost_proxy_putenv_cmd, (char *)&buffer[15]); putenv(newspost_proxy_putenv_cmd);#endif /* VMS */ } } else if (!strncasecomp(buffer, "newsreply_proxy:", 16)) { if (getenv("newsreply_proxy") == NULL) {#ifdef VMS strcpy(temp, "newsreply_proxy"); Define_VMSLogical(temp, (char *)&buffer[16]);#else strcpy(temp, "newsreply_proxy="); StrAllocCopy(newsreply_proxy_putenv_cmd, temp); StrAllocCat(newsreply_proxy_putenv_cmd, (char *)&buffer[16]); putenv(newsreply_proxy_putenv_cmd);#endif /* VMS */ } } else if (!strncasecomp(buffer, "nntp_proxy:", 11)) { if (getenv("nntp_proxy") == NULL) {#ifdef VMS strcpy(temp, "nntp_proxy"); Define_VMSLogical(temp, (char *)&buffer[11]);#else strcpy(temp, "nntp_proxy="); StrAllocCopy(nntp_proxy_putenv_cmd, temp); StrAllocCat(nntp_proxy_putenv_cmd, (char *)&buffer[11]); putenv(nntp_proxy_putenv_cmd);#endif /* VMS */ } } else if (!strncasecomp(buffer, "NNTPSERVER:", 11)) { if (getenv("NNTPSERVER") == NULL) {#ifdef VMS strcpy(temp, "NNTPSERVER"); Define_VMSLogical(temp, (char *)&buffer[11]);#else strcpy(temp, "NNTPSERVER="); StrAllocCopy(NNTPSERVER_putenv_cmd, temp); StrAllocCat(NNTPSERVER_putenv_cmd, (char *)&buffer[11]); putenv(NNTPSERVER_putenv_cmd);#endif /* VMS */ } } else if (!strncasecomp(buffer, "NO_DOT_FILES:", 13)) { no_dotfiles = is_true(buffer+13); } else if (!strncasecomp(buffer, "NO_FILE_REFERER:", 16)) { no_filereferer = is_true(buffer+16);#ifndef VMS } else if (!strncasecomp(buffer, "NO_FORCED_CORE_DUMP:", 20)) { LYNoCore = is_true(buffer+20);#endif /* !VMS */ } else if (!strncasecomp(buffer, "NO_FROM_HEADER:", 15)) { LYNoFromHeader = is_true(buffer+15); } else if (!strncasecomp(buffer, "NO_ISMAP_IF_USEMAP:", 19)) { LYNoISMAPifUSEMAP = is_true(buffer+19); } else if (!strncasecomp(buffer, "no_proxy:", 9)) { if (getenv("no_proxy") == NULL) {#ifdef VMS strcpy(temp, "no_proxy"); Define_VMSLogical(temp, (char *)&buffer[9]);#else strcpy(temp, "no_proxy="); StrAllocCopy(no_proxy_putenv_cmd, temp); StrAllocCat(no_proxy_putenv_cmd, (char *)&buffer[9]); putenv(no_proxy_putenv_cmd);#endif /* VMS */ } } else if (!strncasecomp(buffer, "NO_REFERER_HEADER:", 18)) { LYNoRefererHeader = is_true(buffer+18); } break; case 'P': if (!strncasecomp(buffer, "PERSONAL_MAILCAP:", 17)) { StrAllocCopy(personal_type_map, buffer+17); } else if (!strncasecomp(buffer, "PERSONAL_EXTENSION_MAP:", 23)) { StrAllocCopy(personal_extension_map, buffer+23); } else if (!strncasecomp(buffer, "PREFERRED_CHARSET:", 18)) { StrAllocCopy(pref_charset, buffer+18); } else if (!strncasecomp(buffer, "PREFERRED_LANGUAGE:", 19)) { StrAllocCopy(language, buffer+19); } else if (!strncasecomp(buffer, "PREPEND_BASE_TO_SOURCE:", 23)) { LYPrependBaseToSource = is_true(buffer+23); } else if (!strncasecomp(buffer, "PREPEND_CHARSET_TO_SOURCE:", 26)) { LYPrependCharsetToSource = is_true(buffer+26); } else if (!strncasecomp(buffer, "PRINTER:", 8)) { add_printer_to_list(&buffer[8], &printers); } break;#ifdef RAWDOSKEYHACK case 'R': if (!strncasecomp(buffer, "RAW_DOS_KEY_HACK:", 17)) { raw_dos_key_hack = is_true(buffer+17); } break;#endif /* RAWDOSKEYHACK */ case 'Q': if (!strncasecomp(buffer, "QUIT_DEFAULT_YES:", 17)) { LYQuitDefaultYes = is_true(buffer+17); } break; case 'S': if (!strncasecomp(buffer, "SAVE_SPACE:", 11)) { StrAllocCopy(lynx_save_space, buffer+11); } else if (!strncasecomp(buffer, "SCAN_FOR_BURIED_NEWS_REFS:", 26)) { scan_for_buried_news_references = is_true(buffer+26); } else if (!strncasecomp(buffer, "SEEK_FRAG_AREA_IN_CUR:", 22)) { LYSeekFragAREAinCur = is_true(buffer+22); } else if (!strncasecomp(buffer, "SEEK_FRAG_MAP_IN_CUR:", 21)) { LYSeekFragMAPinCur = is_true(buffer+21); } else if (!strncasecomp(buffer, "SET_COOKIES:", 12)) { LYSetCookies = is_true(buffer+12); } else if (!strncasecomp(buffer, "SHOW_CURSOR:", 12)) { LYShowCursor = is_true(buffer+12); } else if (!strncasecomp(buffer, "snews_proxy:", 12)) { if (getenv("snews_proxy") == NULL) {#ifdef VMS strcpy(temp, "snews_proxy"); Define_VMSLogical(temp, (char *)&buffer[12]);#else strcpy(temp, "snews_proxy="); StrAllocCopy(snews_proxy_putenv_cmd, temp); StrAllocCat(snews_proxy_putenv_cmd, (char *)&buffer[12]); putenv(snews_proxy_putenv_cmd);#endif /* VMS */ } } else if (!strncasecomp(buffer, "snewspost_proxy:", 16)) { if (getenv("snewspost_proxy") == NULL) {#ifdef VMS strcpy(temp, "snewspost_proxy"); Define_VMSLogical(temp, (char *)&buffer[16]);#else strcpy(temp, "snewspost_proxy="); StrAllocCopy(snewspost_proxy_putenv_cmd, temp); StrAllocCat(snewspost_proxy_putenv_cmd, (char *)&buffer[16]); putenv(snewspost_proxy_putenv_cmd);#endif /* VMS */ } } else if (!strncasecomp(buffer, "snewsreply_proxy:", 17)) { if (getenv("snewsreply_proxy") == NULL) {#ifdef VMS strcpy(temp, "snewsreply_proxy"); Define_VMSLogical(temp, (char *)&buffer[17]);#else strcpy(temp, "snewsreply_proxy="); StrAllocCopy(snewsreply_proxy_putenv_cmd, temp); StrAllocCat(snewsreply_proxy_putenv_cmd, (char *)&buffer[17]); putenv(snewsreply_proxy_putenv_cmd);#endif /* VMS */ } } else if (!strncasecomp(buffer, "SOFT_DQUOTES:", 13)) { soft_dquotes = is_true(buffer+13); } else if (!strncasecomp(buffer, "STARTFILE:", 10)) { StrAllocCopy(startfile, buffer+10); } else if (!strncasecomp(buffer, "STRIP_DOTDOT_URLS:", 18)) { LYStripDotDotURLs = is_true(buffer+18); } else if (!strncasecomp(buffer, "SUBSTITUTE_UNDERSCORES:", 23)) { use_underscore = is_true(buffer+23); } else if (!strncasecomp(buffer, "SUFFIX:", 7)) { char *extention; char *mime_type; if (strlen(buffer) > 9) { extention = buffer + 7; if ((mime_type = strchr(extention, ':')) != NULL) { *mime_type++ = '\0'; for (i = 0, j = 0; mime_type[i]; i++) { if (mime_type[i] != ' ') { mime_type[j++] = TOLOWER(mime_type[i]); } } mime_type[j] = '\0'; if (strstr(mime_type, "tex") != NULL || strstr(mime_type, "postscript") != NULL || strstr(mime_type, "sh") != NULL || strstr(mime_type, "troff") != NULL || strstr(mime_type, "rtf") != NULL) HTSetSuffix(extention, mime_type, "8bit", 1.0); else HTSetSuffix(extention, mime_type, "binary", 1.0); } } } else if (!strncasecomp(buffer, "SYSTEM_EDITOR:", 14)) { StrAllocCopy(editor, buffer+14); system_editor = TRUE; } else if (!strncasecomp(buffer, "SYSTEM_MAIL:", 12)) { StrAllocCopy(system_mail, buffer+12); } else if (!strncasecomp(buffer, "SYSTEM_MAIL_FLAGS:", 18)) { StrAllocCopy(system_mail_flags, buffer+18); } break; case 'T':#ifdef EXEC_LINKS if (!strncasecomp(buffer, "TRUSTED_EXEC:", 13)) { add_trusted(&buffer[13], EXEC_PATH); /* Add exec path */ }#endif /* EXEC_LINKS */#ifdef LYNXCGI_LINKS if (!strncasecomp(buffer, "TRUSTED_LYNXCGI:", 16)) { add_trusted(&buffer[16], CGI_PATH); /* Add CGI path */ }#endif /* LYNXCGI_LINKS */ break; case 'U': if (!strncasecomp(buffer, "URL_DOMAIN_PREFIXES:", 20)) { StrAllocCopy(URLDomainPrefixes, buffer+20); } else if (!strncasecomp(buffer, "URL_DOMAIN_SUFFIXES:", 20)) { StrAllocCopy(URLDomainSuffixes, buffer+20);#ifdef DIRED_SUPPORT } else if (!strncasecomp(buffer, "UPLOADER:", 9)) { add_item_to_list(&buffer[9], &uploaders);#endif /* DIRED_SUPPORT */#ifdef VMS } else if (!strncasecomp(buffer, "USE_FIXED_RECORDS:", 18)) { UseFixedRecords = is_true(buffer+18);#endif /* VMS */#if defined(NCURSES_MOUSE_VERSION) || defined(USE_SLANG_MOUSE) } else if(!strncasecomp(buffer, "USE_MOUSE:",10)) { LYUseMouse = is_true(buffer+10);#endif } else if (!strncasecomp(buffer, "USE_SELECT_POPUPS:", 18)) { LYSelectPopups = is_true(buffer+18); } break; case 'V': if (!strncasecomp(buffer, "VI_KEYS_ALWAYS_ON:", 18)) { vi_keys = is_true(buffer+18); } else if (!strncasecomp(buffer, "VIEWER:", 7)) { char *mime_type; char *viewer; char *environment; if (strlen(buffer) > 9) { mime_type = buffer + 7; if ((viewer = strchr(mime_type, ':')) != NULL) { *viewer++ = '\0'; for (i = 0, j = 0; mime_type[i]; i++) { if (mime_type[i] != ' ') { mime_type[j++] = TOLOWER(mime_type[i]); } } mime_type[j] = '\0'; environment = strrchr(viewer, ':'); if ((environment != NULL) && (strlen(viewer) > 1) && *(environment-1) != '\\') { *environment++ = '\0'; remove_backslashes(viewer); /* * If environment equals xwindows then only * assign the presentation if there is a display * variable. */ if (!strcasecomp(environment,"XWINDOWS")) { if ((cp = getenv(DISPLAY)) != NULL && *cp != '\0') HTSetPresentation(mime_type, viewer, 1.0, 3.0, 0.0, 0); } else if (!strcasecomp(environment,"NON_XWINDOWS")) { if ((cp = getenv(DISPLAY)) == NULL || *cp == '\0') HTSetPresentation(mime_type, viewer, 1.0, 3.0, 0.0, 0); } else { HTSetPresentation(mime_type, viewer, 1.0, 3.0, 0.0, 0); } } else { remove_backslashes(viewer); HTSetPresentation(mime_type, viewer, 1.0, 3.0, 0.0, 0); } } } } break; case 'W': if (!strncasecomp(buffer, "wais_proxy:", 11)) { if (getenv("wais_proxy") == NULL) {#ifdef VMS strcpy(temp, "wais_proxy"); Define_VMSLogical(temp, (char *)&buffer[11]);#else strcpy(temp, "wais_proxy="); StrAllocCopy(wais_proxy_putenv_cmd, temp); StrAllocCat(wais_proxy_putenv_cmd, (char *)&buffer[11]); putenv(wais_proxy_putenv_cmd);#endif /* VMS */ } } break; case 'X': if (!strncasecomp(buffer, "XLOADIMAGE_COMMAND:", 19)) { StrAllocCopy(XLoadImageCommand, (char *)&buffer[19]); } break; default: break; } /* end of Huge switch */ } /* end of while */ fclose(fp); /* * If any DOWNLOADER: commands have always_enabled set (:TRUE), * make override_no_download TRUE, so that other restriction * settings will not block presentation of a download menu * with those always_enabled options still available. - FM */ if (downloaders != NULL) { int count; lynx_html_item_type *cur_download; for (count = 0, cur_download = downloaders; cur_download != NULL; cur_download = cur_download->next, count++) { if (cur_download->always_enabled) { override_no_download = TRUE; break; } } }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -