diff options
| author | Thomas E. Dickey <dickey@invisible-island.net> | 1998-08-29 23:26:30 -0400 |
|---|---|---|
| committer | Thomas E. Dickey <dickey@invisible-island.net> | 1998-08-29 23:26:30 -0400 |
| commit | 51f21bae26e432283a7b5e2b6c558bffe8bbb034 (patch) | |
| tree | 08b61afd9adc7cd5635bed6d21d3bd4e3867ce75 /src | |
| parent | 3c7cb4bbcd56c17e1abba05f20d001a2484d9919 (diff) | |
| download | lynx-snapshots-51f21bae26e432283a7b5e2b6c558bffe8bbb034.tar.gz | |
snapshot of project "lynx", label v2-8-1dev_23
Diffstat (limited to 'src')
35 files changed, 655 insertions, 447 deletions
diff --git a/src/GridText.c b/src/GridText.c index b818730b..49f65f08 100644 --- a/src/GridText.c +++ b/src/GridText.c @@ -525,6 +525,17 @@ PUBLIC HText * HText_new ARGS1( underline_on = FALSE; /* reset */ bold_on = FALSE; +#ifdef DISP_PARTIAL + /* + * By this function we create HText object and set new Lines counter + * so we may start displaying the document while downloading. - LP + */ + if (display_partial) + NumOfLines_partial = 0; /* enable HTDisplayPartial() */ +#endif + + CTRACE(tfp, "GridText: start HText_new\n"); + return self; } @@ -779,7 +790,12 @@ PRIVATE int display_line ARGS2( case LY_BOLD_END_CHAR: stop_bold (); break; + #endif + case LY_SOFT_NEWLINE: + if (!dump_output_immediately) + addch('+'); + break; case LY_SOFT_HYPHEN: if (*data != '\0' || @@ -1082,7 +1098,7 @@ PRIVATE void display_page ARGS3( #else assert(line->next != NULL); #endif /* !VMS */ - } + } /* Loop */ if (LYlowest_eightbit[current_char_set] <= 255 && (current_char_set != charset_last_displayed) && @@ -1312,7 +1328,7 @@ PRIVATE void display_page ARGS3( * in it. - FM */ move((i + 2), 0); - } + } /* end while */ #endif /* FANCY CURSES || USE_SLANG */ /* @@ -1331,8 +1347,8 @@ PRIVATE void display_page ARGS3( } display_flag = TRUE; line = line->next; - } - } + } /* end of "Verify and display each line." loop */ + } /* end "Output the page." */ text->next_line = line; /* Line after screen */ text->stale = NO; /* Display is up-to-date */ @@ -1494,7 +1510,7 @@ PRIVATE void display_page ARGS3( CTRACE(tfp, "\ndisplay_page: MAXLINKS reached.\n"); break; } - } + } /* end of loop "Add the anchors to Lynx structures." */ /* * Free any un-reallocated links[] entries @@ -2252,6 +2268,11 @@ PUBLIC void HText_appendCharacter ARGS2( bold_on = OFF; ctrl_chars_on_this_line++; return; + } else if (ch == LY_SOFT_NEWLINE) { + line->data[line->size++] = LY_SOFT_NEWLINE; + line->data[line->size] = '\0'; + ctrl_chars_on_this_line++; + return; } else if (ch == LY_SOFT_HYPHEN) { int i; @@ -2405,11 +2426,12 @@ PUBLIC void HText_appendCharacter ARGS2( HTisDocumentSource()) { int gap = line->data[line->size - 1]; new_line(text); + line = text->last_line; + HText_appendCharacter (text, LY_SOFT_NEWLINE); HText_appendCharacter (text, gap); } } - if (ch == ' ') { /* * Can split here. - FM @@ -2537,6 +2559,9 @@ check_IgnoreExcess: */ text->permissible_split = text->last_line->size; } + if (ch == LY_SOFT_NEWLINE) { + ctrl_chars_on_this_line++; + } } } @@ -2925,12 +2950,7 @@ PUBLIC void HText_endAnchor ARGS2( } else if (prev && prev->size > 1) { k = (i + 1); j = (prev->size - 1); - while ((j >= 0) && - (prev->data[j] == LY_BOLD_START_CHAR || - prev->data[j] == LY_BOLD_END_CHAR || - prev->data[j] == LY_UNDERLINE_START_CHAR || - prev->data[j] == LY_UNDERLINE_END_CHAR || - prev->data[j] == LY_SOFT_HYPHEN)) + while ((j >= 0) && IsSpecialAttrChar(prev->data[j])) j--; i = (j + 1); while (j >= 0 && @@ -2990,12 +3010,7 @@ PUBLIC void HText_endAnchor ARGS2( } } else if (prev && prev->size > 2) { j = (prev->size - 1); - while ((j >= 0) && - (prev->data[j] == LY_BOLD_START_CHAR || - prev->data[j] == LY_BOLD_END_CHAR || - prev->data[j] == LY_UNDERLINE_START_CHAR || - prev->data[j] == LY_UNDERLINE_END_CHAR || - prev->data[j] == LY_SOFT_HYPHEN)) + while ((j >= 0) && IsSpecialAttrChar(prev->data[j])) j--; if (j < 0) j = 0; @@ -3243,7 +3258,7 @@ re_parse: if (anchor_ptr->extent < 0) { anchor_ptr->extent = 0; } - CTRACE(tfp, "anchor text: '%s' pos: %d\n", + CTRACE(tfp, "anchor text: '%s' col: %d\n", line_ptr->data, anchor_ptr->line_pos); /* * If the link begins with an end of line and we have more @@ -3257,8 +3272,7 @@ re_parse: goto re_parse; } cur_shift = 0; - CTRACE(tfp, "anchor text: '%s' pos: %d\n", - line_ptr->data, anchor_ptr->line_pos); + /* * Copy the link name into the data structure. */ @@ -3321,7 +3335,7 @@ re_parse: anchor_ptr->line_pos += line_ptr->offset; anchor_ptr->line_num = cur_line; - CTRACE(tfp, "GridText: adding link on line %d in HText_endAppend\n", + CTRACE(tfp, "GridText: add link on line %d in HText_endAppend\n", cur_line); /* @@ -3971,8 +3985,17 @@ PUBLIC void HText_pageDisplay ARGS2( int, line_num, char *, target) { + CTRACE(tfp, "GridText: HText_pageDisplay at line %d started\n", line_num); + display_page(HTMainText, line_num-1, target); + CTRACE(tfp, "GridText: HText_pageDisplay finished\n"); + +#ifdef DISP_PARTIAL + if (display_partial && debug_display_partial) + sleep(MessageSecs); +#endif + is_www_index = HTAnchor_isIndex(HTMainAnchor); } @@ -4615,6 +4638,7 @@ PUBLIC void print_wwwfile_to_fd ARGS2( int, is_reply) { register int i; + int first = TRUE; HTLine * line; #ifdef VMS extern BOOLEAN HadVMSInterrupt; @@ -4625,6 +4649,12 @@ PUBLIC void print_wwwfile_to_fd ARGS2( line = HTMainText->last_line->next; for (;; line = line->next) { + if (!first + && line->data[0] != LY_SOFT_NEWLINE + && line->data[0] != '\0') + fputc('\n',fp); + first = FALSE; + /* * Add news-style quotation if requested. - FM */ @@ -4670,11 +4700,6 @@ PUBLIC void print_wwwfile_to_fd ARGS2( } } - /* - * Add the return. - */ - fputc('\n',fp); - if (line == HTMainText->last_line) break; @@ -4683,6 +4708,7 @@ PUBLIC void print_wwwfile_to_fd ARGS2( break; #endif /* VMS */ } + fputc('\n',fp); } @@ -4697,6 +4723,7 @@ PUBLIC void print_crawl_to_fd ARGS3( char *, thetitle) { register int i; + int first = TRUE; HTLine * line; #ifdef VMS extern BOOLEAN HadVMSInterrupt; @@ -4712,6 +4739,11 @@ PUBLIC void print_crawl_to_fd ARGS3( } for (;; line = line->next) { + if (!first + && line->data[0] != LY_SOFT_NEWLINE + && line->data[0] != '\0') + fputc('\n',fp); + first = FALSE; /* * Add offset. */ @@ -4740,15 +4772,11 @@ PUBLIC void print_crawl_to_fd ARGS3( } } - /* - * Add the return. - */ - fputc('\n',fp); - if (line == HTMainText->last_line) { break; } } + fputc('\n',fp); /* * Add the References list if appropriate diff --git a/src/GridText.h b/src/GridText.h index daeabe6e..8465b99a 100644 --- a/src/GridText.h +++ b/src/GridText.h @@ -17,7 +17,8 @@ #ifndef LY_SOFT_HYPHEN #define LY_SOFT_HYPHEN ((char)7) #endif /* !LY_SOFT_HYPHEN */ -#define IsSpecialAttrChar(a) ((a > '\002') && (a < '\010')) +#define LY_SOFT_NEWLINE ((char)8) +#define IsSpecialAttrChar(a) ((a > '\002') && (a <= '\010')) extern int HTCurSelectGroupType; extern char * HTCurSelectGroupSize; diff --git a/src/HTAlert.c b/src/HTAlert.c index 7ef0d1ca..0482ca1e 100644 --- a/src/HTAlert.c +++ b/src/HTAlert.c @@ -27,14 +27,9 @@ PUBLIC void HTAlert ARGS1( CONST char *, Msg) { - if (TRACE) { - fprintf(tfp, "\nAlert!: %s", Msg); - fflush(tfp); - _user_message("Alert!: %s", Msg); - fprintf(tfp, "\n\n"); - fflush(tfp); - } else - _user_message("Alert!: %s", Msg); + CTRACE(tfp, "\nAlert!: %s\n\n", Msg); + CTRACE_FLUSH(tfp); + _user_message("Alert!: %s", Msg); sleep(AlertSecs); } @@ -223,8 +223,12 @@ PUBLIC void HTML_put_character ARGS2(HTStructured *, me, char, c) return; if (c != '\n' && c != '\t' && c != '\r') HTChunkPutc(&me->title, c); - else - HTChunkPutc(&me->title, ' '); + else if (HTCJK == CHINESE || HTCJK == JAPANESE || HTCJK == TAIPEI) + if (c == '\t') + HTChunkPutc(&me->title, ' '); + else return; + /* don't replace '\n' with ' ' if Chinese or Japanese - HN */ + else HTChunkPutc(&me->title, ' '); return; case HTML_STYLE: @@ -336,13 +340,19 @@ PUBLIC void HTML_put_character ARGS2(HTStructured *, me, char, c) UPDATE_STYLE; } if (c == '\n') { - if (me->in_word) { - if (HText_getLastChar(me->text) != ' ') { - me->inP = TRUE; - me->inLABEL = FALSE; - HText_appendCharacter(me->text, ' '); + if (HTCJK == CHINESE || HTCJK == JAPANESE || + HTCJK == TAIPEI) { + /* don't replace '\n' with ' ' if Chinese or Japanese - HN + */ + } else { + if (me->in_word) { + if (HText_getLastChar(me->text) != ' ') { + me->inP = TRUE; + me->inLABEL = FALSE; + HText_appendCharacter(me->text, ' '); + } + me->in_word = NO; } - me->in_word = NO; } } else if (c == ' ' || c == '\t') { @@ -365,15 +375,15 @@ PUBLIC void HTML_put_character ARGS2(HTStructured *, me, char, c) } /* end second switch */ if (c == '\n' || c == '\t') { - HText_setLastChar(me->text, ' '); /* set it to a generic seperater */ + HText_setLastChar(me->text, ' '); /* set it to a generic separator */ /* * \r's are ignored. In order to keep collapsing spaces * correctly we must default back to the previous - * seperater if there was one + * separator if there was one */ } else if (c == '\r' && HText_getLastChar(me->text) == ' ') { - HText_setLastChar(me->text, ' '); /* set it to a generic seperater */ + HText_setLastChar(me->text, ' '); /* set it to a generic separator */ } else { HText_setLastChar(me->text, c); } @@ -471,10 +481,17 @@ PUBLIC void HTML_put_string ARGS2(HTStructured *, me, CONST char *, s) UPDATE_STYLE; } if (c == '\n') { - if (me->in_word) { - if (HText_getLastChar(me->text) != ' ') - HText_appendCharacter(me->text, ' '); - me->in_word = NO; + if (HTCJK == CHINESE || HTCJK == JAPANESE || + HTCJK == TAIPEI) { + /* don't replace '\n' with ' ' + * if Chinese or Japanese - HN + */ + } else { + if (me->in_word) { + if (HText_getLastChar(me->text) != ' ') + HText_appendCharacter(me->text, ' '); + me->in_word = NO; + } } } else if (c == ' ' || c == '\t') { @@ -490,15 +507,15 @@ PUBLIC void HTML_put_string ARGS2(HTStructured *, me, CONST char *, s) /* set the Last Character */ if (c == '\n' || c == '\t') { - /* set it to a generic seperater */ + /* set it to a generic separator */ HText_setLastChar(me->text, ' '); } else if (c == '\r' && HText_getLastChar(me->text) == ' ') { /* * \r's are ignored. In order to keep collapsing * spaces correctly, we must default back to the - * previous seperator, if there was one. So we - * set LastChar to a generic seperater. + * previous separator, if there was one. So we + * set LastChar to a generic separator. */ HText_setLastChar(me->text, ' '); } else { @@ -1533,15 +1550,15 @@ PRIVATE void HTML_start_element ARGS6( case HTML_BR: UPDATE_STYLE; CHECK_ID(HTML_GEN_ID); - /* Add a \r (new line) if one of these three scenarios are true: - * 1. We are not collapsing BR's, or - * 2. (we are collapsing and) This line has text on it, or - * 3. (we are collapsing and) The previous line has text on it. - * Otherwise, don't do anything. -DH 980814 - */ - if ((LYCollapseBRs == FALSE) || - HText_LastLineSize(me->text, FALSE) || - HText_PreviousLineSize(me->text, FALSE)) { + /* Add a \r (new line) if these three conditions are true: + * 1. We are not collapsing BR's, and + * 2. This line has text on it, or + * 3. The previous line has text on it. + * Otherwise, don't do anything. -DH 980814, TD 980827 + */ + if ((LYCollapseBRs == FALSE) && + (HText_LastLineSize(me->text, FALSE) || + HText_PreviousLineSize(me->text, FALSE))) { HText_setLastChar(me->text, ' '); /* absorb white space */ HText_appendCharacter(me->text, '\r'); } diff --git a/src/LYCharUtils.c b/src/LYCharUtils.c index cb9337e0..fed8a24b 100644 --- a/src/LYCharUtils.c +++ b/src/LYCharUtils.c @@ -2801,8 +2801,8 @@ PUBLIC void LYHandleMETA ARGS4( } else if (!strcmp(p_in->MIMEname, "euc-cn") && !strcmp(p_out->MIMEname, "euc-cn")) { HTCJK = CHINESE; - } else if (!strcmp(p_in->MIMEname, "big-5") && - !strcmp(p_out->MIMEname, "big-5")) { + } else if (!strcmp(p_in->MIMEname, "big5") && + !strcmp(p_out->MIMEname, "big5")) { HTCJK = TAIPEI; } else if (!strcmp(p_in->MIMEname, "euc-kr") && !strcmp(p_out->MIMEname, "euc-kr")) { diff --git a/src/LYCookie.c b/src/LYCookie.c index cd458908..9f84e2f6 100644 --- a/src/LYCookie.c +++ b/src/LYCookie.c @@ -2274,10 +2274,9 @@ Delete_all_cookies_in_domain: sprintf(buf, "<HEAD>\n<TITLE>%s</title>\n</HEAD>\n<BODY>\n", COOKIE_JAR_TITLE); (*target->isa->put_block)(target, buf, strlen(buf)); - - sprintf(buf, "<H1>%s</H1>\n", REACHED_COOKIE_JAR_PAGE); - (*target->isa->put_block)(target, buf, strlen(buf)); - sprintf(buf, "<H2>%s Version %s</H2>\n", LYNX_NAME, LYNX_VERSION); + sprintf(buf, "<h1>%s (%s), help on <a href=\"%s%s\">%s</a></h1>\n", + LYNX_NAME, LYNX_VERSION, + helpfilepath, COOKIE_JAR_HELP, COOKIE_JAR_TITLE); (*target->isa->put_block)(target, buf, strlen(buf)); sprintf(buf, "<NOTE>%s\n", ACTIVATE_TO_GOBBLE); @@ -2298,8 +2297,8 @@ Delete_all_cookies_in_domain: /* * Show the domain link and 'allow' setting. - FM */ - sprintf(buf, "<DT><A HREF=\"LYNXCOOKIE://%s/\">Domain=%s</A>\n", - de->domain, de->domain); + sprintf(buf, "<DT>%s<DD><A HREF=\"LYNXCOOKIE://%s/\">Domain=%s</A>\n", + de->domain, de->domain, de->domain); (*target->isa->put_block)(target, buf, strlen(buf)); switch (de->bv) { case (ACCEPT_ALWAYS): @@ -2316,6 +2315,8 @@ Delete_all_cookies_in_domain: break; } (*target->isa->put_block)(target, buf, strlen(buf)); + sprintf(buf, "\n"); + (*target->isa->put_block)(target, buf, strlen(buf)); /* * Show the domain's cookies. - FM diff --git a/src/LYDownload.c b/src/LYDownload.c index a1394d77..73a82c6b 100644 --- a/src/LYDownload.c +++ b/src/LYDownload.c @@ -616,15 +616,18 @@ PUBLIC int LYdownload_options ARGS2( StrAllocCopy(*newfile, download_filename); LYforce_no_cache = TRUE; /* don't cache this doc */ + fprintf(fp0, "<head>\n<title>%s</title>\n</head>\n<body>\n", DOWNLOAD_OPTIONS_TITLE); - - fprintf(fp0,"<h1>Download Options (%s Version %s)</h1><pre>\n", - LYNX_NAME, LYNX_VERSION); - - - fprintf(fp0, " You have the following download choices.\n"); - fprintf(fp0, " Please select one:\n\n"); + fprintf(fp0, "<h1>%s (%s), help on <a href=\"%s%s\">%s</a></h1>\n", + LYNX_NAME, LYNX_VERSION, + helpfilepath, DOWNLOAD_OPTIONS_HELP, DOWNLOAD_OPTIONS_TITLE); + fprintf(fp0, "<pre>\n"); + fprintf(fp0, "\ + <em>You download the link:</em> %s\n\ + <em>Suggested file name:</em> %s%s\n", + data_file, (lynx_save_space ? lynx_save_space : ""), sug_filename); + fprintf(fp0, "\nStandard download options:\n"); if(!no_disk_save && !child_lynx) #ifdef DIRED_SUPPORT @@ -640,7 +643,9 @@ PUBLIC int LYdownload_options ARGS2( else {} #endif /* DIRED_SUPPORT */ else - fprintf(fp0," Save to disk disabled.\n"); + fprintf(fp0," <em>Save to disk disabled.</em>\n"); + + fprintf(fp0, "\nLocal additions:\n"); if (downloaders != NULL) { for (count = 0, cur_download = downloaders; cur_download != NULL; @@ -655,9 +660,14 @@ PUBLIC int LYdownload_options ARGS2( } } } else { - fprintf(fp0, "\n\ -No other download methods have been defined yet. You may define\n\ -an unlimited number of download methods using the lynx.cfg file.\n"); + fprintf(fp0, " \ +<NONE>\n\n \ +<!-- \ +You may define an unlimited number of download methods.\n \ +Please refer to the <a href=\"%s\">lynx.cfg</a> file, \ +sections 'DOWNLOAD' and 'INCLUDE'. \ +--> \n", + LYNX_CFG_FILE); } fprintf(fp0, "</pre>\n</body>\n"); LYCloseTempFP(fp0); diff --git a/src/LYDownload.h b/src/LYDownload.h index 8ea5b9fa..aeed2b19 100644 --- a/src/LYDownload.h +++ b/src/LYDownload.h @@ -9,7 +9,5 @@ extern void LYDownload PARAMS((char *line)); extern int LYdownload_options PARAMS((char **newfile, char *data_file)); -#define DOWNLOAD_OPTIONS_TITLE "Lynx Download Options" - #endif /* LYDOWNLOAD_H */ diff --git a/src/LYGlobalDefs.h b/src/LYGlobalDefs.h index 95f6f308..7b543738 100644 --- a/src/LYGlobalDefs.h +++ b/src/LYGlobalDefs.h @@ -15,6 +15,21 @@ #include <LYStructs.h> #endif /* LYSTRUCTS_H */ +#ifdef HAVE_CONFIG_H +#include <LYHelp.h> +#else +#define COOKIE_JAR_HELP "Lynx_users_guide.html#Cookies" +#define CURRENT_KEYMAP_HELP "keystrokes/keystroke_help.html" +#define DIRED_MENU_HELP "keystrokes/dired_help.html" +#define DOWNLOAD_OPTIONS_HELP "Lynx_users_guide.html#RemoteSource" +#define HISTORY_PAGE_HELP "keystrokes/history_help.html" +#define LIST_PAGE_HELP "keystrokes/follow_help.html" +#define OPTIONS_HELP "keystrokes/option_help.html" +#define PRINT_OPTIONS_HELP "keystrokes/print_help.html" +#define UPLOAD_OPTIONS_HELP "Lynx_users_guide.html#DirEd" +#define VISITED_LINKS_HELP "keystrokes/visited_help.html" +#endif /* LYHELP_H */ + #ifdef SOCKS extern BOOLEAN socks_flag; #endif /* SOCKS */ @@ -238,6 +253,7 @@ extern BOOLEAN no_url_redirection; /* Don't follow URL redirections */ extern BOOLEAN display_partial; /* Display document during download */ extern int Newline_partial; /* -//- "current" newline position */ extern int NumOfLines_partial; /* -//- "current" number of lines */ +extern BOOLEAN debug_display_partial; /* show with MessageSecs delay */ extern char *form_post_data; /* User data for post form */ extern char *form_get_data; /* User data for get form */ extern char *http_error_file; /* Place HTTP status code in this file */ diff --git a/src/LYHistory.c b/src/LYHistory.c index a3501a75..4d39d58a 100644 --- a/src/LYHistory.c +++ b/src/LYHistory.c @@ -406,8 +406,10 @@ PUBLIC int showhistory ARGS1( LYAddMETAcharsetToFD(fp0, -1); fprintf(fp0, "<title>%s</title>\n</head>\n<body>\n", HISTORY_PAGE_TITLE); - fprintf(fp0, "<h1>You have reached the History Page</h1>\n"); - fprintf(fp0, "<h2>%s Version %s</h2>\n<pre>", LYNX_NAME, LYNX_VERSION); + fprintf(fp0, "<h1>%s (%s), help on <a href=\"%s%s\">%s</a></h1>\n", + LYNX_NAME, LYNX_VERSION, + helpfilepath, HISTORY_PAGE_HELP, HISTORY_PAGE_TITLE); + fprintf(fp0, "<pre>\n"); fprintf(fp0, "<em>You selected:</em>\n"); for (x = nhist-1; x >= 0; x--) { /* @@ -438,7 +440,6 @@ PUBLIC int showhistory ARGS1( } fprintf(fp0, "<tab to=t%d>%s\n", x, Title); } - fprintf(fp0,"</pre>\n</body>\n"); LYCloseTempFP(fp0); @@ -556,8 +557,10 @@ PUBLIC int LYShowVisitedLinks ARGS1( LYAddMETAcharsetToFD(fp0, -1); fprintf(fp0, "<title>%s</title>\n</head>\n<body>\n", VISITED_LINKS_TITLE); - fprintf(fp0, "<h1>You have reached the Visited Links Page</h1>\n"); - fprintf(fp0, "<h2>%s Version %s</h2>\n<pre>", LYNX_NAME, LYNX_VERSION); + fprintf(fp0, "<h1>%s (%s), help on <a href=\"%s%s\">%s</a></h1>\n", + LYNX_NAME, LYNX_VERSION, + helpfilepath, VISITED_LINKS_HELP, VISITED_LINKS_TITLE); + fprintf(fp0, "<pre>\n"); fprintf(fp0, "<em>You visited (POSTs, bookmark, menu and list files excluded):</em>\n"); x = HTList_count(Visited_Links); @@ -593,7 +596,6 @@ PUBLIC int LYShowVisitedLinks ARGS1( fprintf(fp0, "<tab to=t%d>%s\n", x, ((Address != NULL) ? Address : "(no address)")); } - fprintf(fp0,"</pre>\n</body>\n"); LYCloseTempFP(fp0); diff --git a/src/LYHistory.h b/src/LYHistory.h index 3e5bf72b..254889d1 100644 --- a/src/LYHistory.h +++ b/src/LYHistory.h @@ -14,7 +14,4 @@ extern int showhistory PARAMS((char **newfile)); extern BOOLEAN historytarget PARAMS((document *newdoc)); extern int LYShowVisitedLinks PARAMS((char **newfile)); -#define HISTORY_PAGE_TITLE "Lynx History Page" -#define VISITED_LINKS_TITLE "Lynx Visited Links Page" - #endif /* LYHISTORY_H */ diff --git a/src/LYKeymap.c b/src/LYKeymap.c index f6ba51ca..e5614d8a 100644 --- a/src/LYKeymap.c +++ b/src/LYKeymap.c @@ -709,9 +709,11 @@ PRIVATE int LYLoadKeymap ARGS4 ( sprintf(buf, "<head>\n<title>%s</title>\n</head>\n<body>\n", CURRENT_KEYMAP_TITLE); (*target->isa->put_block)(target, buf, strlen(buf)); - - sprintf(buf, "<h1>%s (%s Version %s)</h1>\n<pre>", - CURRENT_KEYMAP_TITLE, LYNX_NAME, LYNX_VERSION); + sprintf(buf, "<h1>%s (%s), help on <a href=\"%s%s\">%s</a></h1>\n", + LYNX_NAME, LYNX_VERSION, + helpfilepath, CURRENT_KEYMAP_HELP, CURRENT_KEYMAP_TITLE); + (*target->isa->put_block)(target, buf, strlen(buf)); + sprintf(buf, "<pre>\n"); (*target->isa->put_block)(target, buf, strlen(buf)); for (i = 'a'+1; i <= 'z'+1; i++) { diff --git a/src/LYKeymap.h b/src/LYKeymap.h index 1c02cd61..e8ccad06 100644 --- a/src/LYKeymap.h +++ b/src/LYKeymap.h @@ -23,8 +23,6 @@ extern unsigned short keymap[]; /* main keymap matrix */ extern unsigned short key_override[]; #endif -#define CURRENT_KEYMAP_TITLE "Current Key Map" - #define LYK_1 1 #define LYK_2 2 #define LYK_3 3 diff --git a/src/LYList.c b/src/LYList.c index b49032cc..b7de7392 100644 --- a/src/LYList.c +++ b/src/LYList.c @@ -96,14 +96,13 @@ PUBLIC int showlist ARGS2( } fprintf(fp0, "<title>%s</title>\n</head>\n<body>\n", LIST_PAGE_TITLE); - fprintf(fp0, "<h1>You have reached the List Page</h1>\n"); - fprintf(fp0, "<h2>%s Version %s</h2>\n", LYNX_NAME, LYNX_VERSION); + fprintf(fp0, "<h1>%s (%s), help on <a href=\"%s%s\">%s</a></h1>\n", + LYNX_NAME, LYNX_VERSION, + helpfilepath, LIST_PAGE_HELP, LIST_PAGE_TITLE); StrAllocCopy(Address, HTLoadedDocumentURL()); LYEntify(&Address, FALSE); - fprintf(fp0, - " References in %s<p>\n", - ((Address != NULL && *Address != '\0') ? - Address : "this document:")); + fprintf(fp0, "References in %s<p>\n", + ((Address != NULL && *Address != '\0') ? Address : "this document:")); FREE(Address); if (refs > 0) { fprintf(fp0, "<%s compact>\n", ((keypad_mode == NUMBERS_AS_ARROWS) ? diff --git a/src/LYList.h b/src/LYList.h index f0071d49..4288107b 100644 --- a/src/LYList.h +++ b/src/LYList.h @@ -7,6 +7,4 @@ extern char * LYlist_temp_url NOPARAMS; extern int showlist PARAMS((document *newdoc, BOOLEAN titles)); extern void printlist PARAMS((FILE *fp, BOOLEAN titles)); -#define LIST_PAGE_TITLE "Lynx List Page" - #endif /* LYLIST_H */ diff --git a/src/LYLocal.c b/src/LYLocal.c index a744637a..57c821c9 100644 --- a/src/LYLocal.c +++ b/src/LYLocal.c @@ -1686,20 +1686,18 @@ PUBLIC int dired_options ARGS2( nothing_tagged = (HTList_isEmpty(tagged)); - fprintf(fp0, - "<head>\n<title>%s</title></head>\n<body>\n", DIRED_MENU_TITLE); - - fprintf(fp0, - "\n<h1>File Management Options (%s Version %s)</h1>", - LYNX_NAME, LYNX_VERSION); - - fprintf(fp0, "Current directory is %s<br>\n", dir); + fprintf(fp0, "<head>\n<title>%s</title></head>\n<body>\n", + DIRED_MENU_TITLE); + fprintf(fp0, "<h1>%s (%s), help on <a href=\"%s%s\">%s</a></h1>\n", + LYNX_NAME, LYNX_VERSION, + helpfilepath, DIRED_MENU_HELP, DIRED_MENU_TITLE); + fprintf(fp0, "<em>Current directory:</em> %s<br>\n", dir); if (nothing_tagged) { if (strlen(path)) { - fprintf(fp0, "Current selection is %s<p>\n", path); + fprintf(fp0, "<em>Current selection:</em> %s<p>\n", path); } else { - fprintf(fp0, "Nothing currently selected.<p>\n"); + fprintf(fp0, "<em>Current selection:</em> Nothing currently selected.<p>\n"); } } else { /* @@ -1712,7 +1710,7 @@ PUBLIC int dired_options ARGS2( char *cd = NULL; int i, m; #define NUM_TAGS_TO_WRITE 10 - fprintf(fp0, "Current selection is %d tagged item%s", + fprintf(fp0, "<em>Current selection:</em> %d tagged item%s", n, ((n == 1) ? ":" : "s:")); StrAllocCopy(cd, doc->address); HTUnEscapeSome(cd, "/"); @@ -1724,7 +1722,7 @@ PUBLIC int dired_options ARGS2( (*cd ? cd : "file://localhost")); HTUnEscape(cp1); LYEntify(&cp1, TRUE); /* _should_ do this everywhere... */ - fprintf(fp0, "%s <br>\n %s", + fprintf(fp0, "%s<br>\n %s", (i == 1 ? "" : " ,"), cp1); FREE(cp1); } diff --git a/src/LYLocal.h b/src/LYLocal.h index 48f9509a..029718d1 100644 --- a/src/LYLocal.h +++ b/src/LYLocal.h @@ -60,9 +60,6 @@ extern void showtags PARAMS((HTList *tag)); extern int local_dired PARAMS((document *doc)); extern int dired_options PARAMS ((document *doc, char ** newfile)); -#define DIRED_MENU_TITLE "File Management Options" -#define PERMIT_OPTIONS_TITLE "File Permission Options" - extern void add_menu_item PARAMS((char *str)); #endif /* DIRED_SUPPORT */ diff --git a/src/LYMainLoop.c b/src/LYMainLoop.c index 243bf25d..2f8d856b 100644 --- a/src/LYMainLoop.c +++ b/src/LYMainLoop.c @@ -89,7 +89,8 @@ PUBLIC char * LYRequestTitle = NULL; /* newdoc.title in calls to getfile() */ #ifdef DISP_PARTIAL PUBLIC int Newline_partial = 0; /* required for display_partial mode */ -PUBLIC int NumOfLines_partial = 0; /* required for display_partial mode */ +PUBLIC int NumOfLines_partial = -1; /* required for display_partial mode */ +PUBLIC BOOLEAN debug_display_partial; /* show with MessageSecs delay */ #endif PRIVATE document newdoc; @@ -204,6 +205,7 @@ int mainloop NOARGS BOOLEAN LYRawMode_flag = LYRawMode; #ifndef EXP_FORMS_OPTIONS BOOLEAN LYSelectPopups_flag = LYSelectPopups; + BOOLEAN verbose_img_flag = verbose_img; BOOLEAN keypad_mode_flag = keypad_mode; BOOLEAN show_dotfiles_flag = show_dotfiles; BOOLEAN user_mode_flag = user_mode; @@ -376,15 +378,7 @@ try_again: * elements to the curdoc structure elements * under case NORMAL. - FM */ -#ifndef EXP_FORMS_OPTIONS if (strncmp(newdoc.address, "LYNXDOWNLOAD:", 13)) -#else /* EXP_FORMS_OPTIONS */ - if (!strncmp(newdoc.address, "LYNXOPTIONS://MBM_MENU", 22)) - LYpush(&curdoc, ForcePush); - - if (strncmp(newdoc.address, "LYNXDOWNLOAD:", 13) && - strncmp(newdoc.address, "LYNXOPTIONS:", 12)) -#endif /* EXP_FORMS_OPTIONS */ { LYpush(&curdoc, ForcePush); } @@ -509,16 +503,20 @@ try_again: #ifdef DISP_PARTIAL display_partial = display_partial_flag; /* restore */ Newline_partial = newdoc.line; /* initialize */ - NumOfLines_partial = 0; /* initialize */ + NumOfLines_partial = -1; /* initialize to -1 */ + /* -1 restrict HTDisplayPartial() */ + /* until HText_new() start new HTMainText */ + /* and set the flag to 0 */ if (display_partial) { /* - * Disable display_partial if requested URL has #fragment. + * Disable display_partial if requested URL has #fragment. * Otherwise user got the new document from the first page * and be moved to #fragment later after download * completed, but only if user did not mess screen up by * scrolling before... So fall down to old behavior here. */ - if (!LYCursesON || (strchr(newdoc.address, '#'))) + if (!LYCursesON || + (strchr(newdoc.address, '#'))) display_partial = FALSE; } #endif /* DISP_PARTIAL */ @@ -1009,12 +1007,20 @@ try_again: */ Newline = newdoc.line; #ifdef DISP_PARTIAL - /* - * Override newdoc.line with a new value if user - * scrolled the document while downloading. - */ - if (display_partial && (Newline_partial != newdoc.line)) - Newline = Newline_partial; + if (display_partial) { + /* + * Override newdoc.line with a new value if user + * scrolled the document while downloading. + */ + if (Newline_partial != newdoc.line) + Newline = Newline_partial; + + /* + * End of incremental rendering stage here. + * Reset for debugging purpose only. + */ + display_partial = FALSE; + } #endif /* DISP_PARTIAL */ /* @@ -1959,9 +1965,9 @@ new_cmd: /* * users (like me 8-). - FM */ if (Newline <= 1) { - HTUserMsg(ALREADY_AT_BEGIN); + HTInfoMsg(ALREADY_AT_BEGIN); } else if (!more) { - HTUserMsg(ALREADY_AT_END); + HTInfoMsg(ALREADY_AT_END); } else { StrAllocCopy(temp, user_input_buffer); sprintf(user_input_buffer, @@ -2229,7 +2235,7 @@ new_cmd: /* curdoc.link = nlinks-1; /* put on last link */ } else if (old_c != real_c) { old_c = real_c; - HTUserMsg(ALREADY_AT_END); + HTInfoMsg(ALREADY_AT_END); } break; @@ -2241,7 +2247,7 @@ new_cmd: /* curdoc.link = 0; /* put on first link */ } else if (old_c != real_c) { old_c = real_c; - HTUserMsg(ALREADY_AT_BEGIN); + HTInfoMsg(ALREADY_AT_BEGIN); } break; @@ -2260,7 +2266,7 @@ new_cmd: /* } } else if (old_c != real_c) { old_c = real_c; - HTUserMsg(ALREADY_AT_BEGIN); + HTInfoMsg(ALREADY_AT_BEGIN); } break; @@ -2275,7 +2281,7 @@ new_cmd: /* } } else if (old_c != real_c) { old_c = real_c; - HTUserMsg(ALREADY_AT_END); + HTInfoMsg(ALREADY_AT_END); } break; @@ -2297,7 +2303,7 @@ new_cmd: /* } } else if (old_c != real_c) { old_c = real_c; - HTUserMsg(ALREADY_AT_BEGIN); + HTInfoMsg(ALREADY_AT_BEGIN); } break; @@ -2312,7 +2318,7 @@ new_cmd: /* } } else if (old_c != real_c) { old_c = real_c; - HTUserMsg(ALREADY_AT_END); + HTInfoMsg(ALREADY_AT_END); } break; @@ -2378,7 +2384,7 @@ new_cmd: /* } else if (old_c != real_c) { old_c = real_c; - HTUserMsg(ALREADY_AT_BEGIN); + HTInfoMsg(ALREADY_AT_BEGIN); } break; @@ -2420,7 +2426,7 @@ new_cmd: /* } else if (old_c != real_c) { old_c = real_c; - HTUserMsg(ALREADY_AT_END); + HTInfoMsg(ALREADY_AT_END); } break; @@ -2479,7 +2485,7 @@ new_cmd: /* } else if (old_c != real_c) { old_c = real_c; - HTUserMsg(ALREADY_AT_BEGIN); + HTInfoMsg(ALREADY_AT_BEGIN); } break; @@ -2522,7 +2528,7 @@ new_cmd: /* } else if (old_c != real_c) { old_c = real_c; - HTUserMsg(ALREADY_AT_END); + HTInfoMsg(ALREADY_AT_END); } break; @@ -3742,7 +3748,8 @@ check_goto_URL: c = dir_list_style; #endif /* DIRED_SUPPORT */ #ifndef EXP_FORMS_OPTIONS - LYoptions(); /* do the options stuff */ + + LYoptions(); /* do the old-style options stuff */ if (keypad_mode_flag != keypad_mode || (user_mode_flag != user_mode && @@ -3758,6 +3765,7 @@ check_goto_URL: CurrentCharSet_flag != current_char_set || CurrentAssumeCharSet_flag != UCLYhndl_for_unspec || CurrentAssumeLocalCharSet_flag != UCLYhndl_HTFile_for_unspec || + verbose_img_flag != verbose_img || LYRawMode_flag != LYRawMode || LYSelectPopups_flag != LYSelectPopups || ((strcmp(CurrentUserAgent, (LYUserAgent ? @@ -3829,6 +3837,7 @@ check_goto_URL: CurrentAssumeCharSet_flag = UCLYhndl_for_unspec; CurrentAssumeLocalCharSet_flag = UCLYhndl_HTFile_for_unspec; show_dotfiles_flag = show_dotfiles; + verbose_img_flag = verbose_img; LYRawMode_flag = LYRawMode; LYSelectPopups_flag = LYSelectPopups; StrAllocCopy(CurrentUserAgent, (LYUserAgent ? @@ -3858,15 +3867,15 @@ check_goto_URL: FREE(newdoc.bookmark); newdoc.isHEAD = FALSE; newdoc.safe = FALSE; - ForcePush = TRUE; if (check_realm) LYPermitURL = TRUE; refresh_screen = TRUE; /* redisplay */ /* * FIXME: this is a temporary solution until we find the - * correct place for this command to reload the document before - * 'options menu' only when necessary. + * correct place for this command to reload the document + * before the 'options menu' only when (few) important options + * were changed. */ HTuncache_current_document(); } @@ -4386,7 +4395,7 @@ check_goto_URL: FREE(newdoc.bookmark); newdoc.isHEAD = FALSE; newdoc.safe = FALSE; - ForcePush = TRUE; + ForcePush = TRUE; /* see LYpush() and print_options() */ if (check_realm) LYPermitURL = TRUE; refresh_screen = TRUE; /* redisplay */ @@ -5017,6 +5026,10 @@ check_add_bookmark_to_self: "lynxprog:", 9)) { HTUserMsg(NO_DOWNLOAD_SPECIAL); + } else if (!strncmp(links[curdoc.link].lname, + "mailto:", 7)) { + HTUserMsg(NO_DOWNLOAD_MAILTO_LINK); + } else { /* Not a forms, options or history link */ /* * Follow a normal link or anchor. Note that diff --git a/src/LYOptions.c b/src/LYOptions.c index abde33dc..cf1c3293 100644 --- a/src/LYOptions.c +++ b/src/LYOptions.c @@ -5,6 +5,7 @@ #include <LYUtils.h> #include <LYStrings.h> #include <LYGlobalDefs.h> +#include <LYHistory.h> #include <LYOptions.h> #include <LYSignal.h> #include <LYClean.h> @@ -321,6 +322,9 @@ draw_options: ((user_mode == INTERMEDIATE_MODE) ? "Intermediate" : "Advanced ")); + addstr(" verbose images (!) : "); + addstr( verbose_img ? "ON " : "OFF" ); + move(L_User_Agent, 5); addstr("user (A)gent : "); addstr((LYUserAgent && *LYUserAgent) ? LYUserAgent : "NONE"); @@ -1384,6 +1388,46 @@ draw_options: } break; + case '!': + /* + * Copy strings into choice array. + */ + choices[0] = NULL; + StrAllocCopy(choices[0], "OFF"); + choices[1] = NULL; + StrAllocCopy(choices[1], "ON "); + choices[2] = NULL; + if (!LYSelectPopups) { + verbose_img = boolean_choice(verbose_img, + L_VERBOSE_IMAGES, + C_VERBOSE_IMAGES, + choices); + } else { + verbose_img = popup_choice(verbose_img, + L_VERBOSE_IMAGES, + C_VERBOSE_IMAGES, + choices, + 2, FALSE); + } + FREE(choices[0]); + FREE(choices[1]); + response = ' '; + if (LYSelectPopups) { +#if !defined(VMS) || defined(USE_SLANG) + if (term_options) { + term_options = FALSE; + } else { + AddValueAccepted = TRUE; + } + goto draw_options; +#else + term_options = FALSE; + if (use_assume_charset != old_use_assume_charset) + goto draw_options; +#endif /* !VMS || USE_SLANG */ + } + break; + case 'a': /* Change user agent string. */ case 'A': if (!no_useragent) { @@ -3100,6 +3144,8 @@ static char * raw_mode_string = "raw_mode"; static char * show_color_string = "show_color"; +static char * verbose_images_string = "verbose_images"; + static char * vi_keys_string = "vi_keys"; static char * emacs_keys_string = "emacs_keys"; @@ -3110,19 +3156,21 @@ static char * select_popups_string = "select_popups"; static char * show_cursor_string = "show_cursor"; +static char * user_agent_string = "user_agent"; + static OptValues bool_values[] = { { FALSE, "OFF", "OFF" }, { TRUE, "ON", "ON" }, { 0, 0, 0 }}; -#ifdef DIRED_SUPPORT +#ifdef DIRED_SUPPORT static OptValues dired_values[] = { { 0, "Directories first", "dired_dir" }, { FILES_FIRST, "Files first", "dired_files" }, { MIXED_STYLE, "Mixed style", "dired_mixed" }, { 0, 0, 0 }}; static char * dired_sort_string = "dired_sort"; -#endif /* DIRED_SUPPORT */ +#endif /* DIRED_SUPPORT */ static OptValues ftp_sort_values[] = { { FILE_BY_NAME, "By Name", "ftp_by_name" }, @@ -3164,20 +3212,24 @@ static OptValues user_mode_values[] = { static char * user_mode_string = "user_mode"; #define PutLabel(fp, text) \ - fprintf(fp,"<label>%s:</label> ", text) + fprintf(fp,"%-35s: ", text) + +#define PutTextInput(fp, name, value, size, disable) \ + fprintf(fp,\ + "<input size=%d type=\"text\" name=\"%s\" value=\"%s\" %s>\n",\ + size, name, value, disable) #define PutOption(fp, flag, html, name) \ - fprintf(fp, "<option %s value=\"%s\">%s</option>\n", \ - SELECTED(flag), html, name) + fprintf(fp,"<option value=\"%s\" %s>%s\n", html, SELECTED(flag), name) #define BeginSelect(fp, text) \ fprintf(fp,"<select name=\"%s\">\n", text) #define MaybeSelect(fp, flag, text) \ - fprintf(fp,"<select %s name=\"%s\">\n", DISABLED(flag), text) + fprintf(fp,"<select name=\"%s\" %s>\n", text, DISABLED(flag)) #define EndSelect(fp)\ - fprintf(fp, "</select>\n") + fprintf(fp,"</select>\n") PRIVATE void PutOptValues ARGS3( FILE *, fp, @@ -3444,6 +3496,13 @@ PUBLIC int postoptions ARGS1( } /* + * verbose images mode + */ + if (!strcmp(data[i].tag, verbose_images_string)) { + verbose_img = GetOptValues(bool_values, data[i].value); + } + + /* * vi_keys */ if (!strcmp(data[i].tag, vi_keys_string)) { @@ -3510,6 +3569,15 @@ PUBLIC int postoptions ARGS1( } /* + * user_agent header + */ + if (!strcmp(data[i].tag, user_agent_string)) { + FREE(LYUserAgent); + /* ignore Copyright warning ? */ + StrAllocCopy(LYUserAgent, data[i].value); + } + + /* * save_options */ if (!strcmp(data[i].tag, save_options_string)) { @@ -3561,6 +3629,7 @@ PUBLIC int postoptions ARGS1( HTAlert(OPTIONS_NOT_SAVED); } } + LYpop(newdoc); /* return to previous doc, not to options menu! */ if (need_reload == TRUE) { /* FIXME: currently dummy */ } @@ -3583,7 +3652,8 @@ PUBLIC int gen_options ARGS1( static char tempfile[256]; char any_filename[256]; FILE *fp0; - char *leaf; + size_t cset_len = 0; + size_t text_len = COLS - 38; /* cf: PutLabel */ LYRemoveTemp(tempfile); fp0 = LYOpenTemp(tempfile, HTML_SUFFIX, "w"); @@ -3599,9 +3669,9 @@ PUBLIC int gen_options ARGS1( fprintf(fp0, "<html>\n<head>\n<title>%s</title>\n</head>\n<body>\n", OPTIONS_TITLE); - - fprintf(fp0,"<h1>Options Menu (%s Version %s)</h1>\n", - LYNX_NAME, LYNX_VERSION); + fprintf(fp0, "<h1>%s (%s), help on <a href=\"%s%s\">%s</a></h1>\n", + LYNX_NAME, LYNX_VERSION, + helpfilepath, OPTIONS_HELP, OPTIONS_TITLE); /* * I do C, not HTML. Feel free to pretty this up. @@ -3618,91 +3688,74 @@ PUBLIC int gen_options ARGS1( secure_string, secure_value); /* - * visible preformatted text begins here + * visible text begins here */ - fprintf(fp0,"<pre>\n\n"); /* * save/reset */ - fprintf(fp0,"<input type=\"submit\" value=\"Accept Changes\">"); - fprintf(fp0," <input type=\"reset\" value=\"Reset\">"); - fprintf(fp0," Use the back key to cancel changes."); - - strcpy(any_filename, helpfile); - if ((leaf = strrchr(any_filename, '/')) != 0) - leaf++; - else - leaf = any_filename; - strcpy(leaf, "keystrokes/option_help.html"); - - fprintf(fp0," <a href=\"%s\"> HELP available</a>\n\n", any_filename); + fprintf(fp0,"<p align=center>\n"); + fprintf(fp0,"<input type=\"submit\" value=\"Accept Changes\">\n"); + fprintf(fp0,"<input type=\"reset\" value=\"Reset Changes\">\n"); + fprintf(fp0,"Left Arrow cancels changes<br>\n"); /* - * editor + * save options */ - PutLabel(fp0, "Editor"); - fprintf(fp0,"<input %s type=\"text\" name=\"%s\" value=\"%s\">\n", - DISABLED(no_editor || system_editor), - editor_string, - NOTEMPTY(editor)); + if (!no_option_save) { + fprintf(fp0, "<p>Save options to disk: "); + fprintf(fp0,"<input type=\"checkbox\" name=\"%s\">\n", + save_options_string); + } /* - * display + * preformatted text follows */ - PutLabel(fp0, "Display"); - fprintf(fp0,"<input type=\"text\" name=\"%s\" value=\"%s\">\n", - display_string, - NOTEMPTY(display)); + fprintf(fp0,"<pre>\n"); + fprintf(fp0,"\n<em>Personal Preferences</em>\n"); /* - * multi-bookmarks mode + * user_mode + * + * This option is here because we come from LYMainLoop() with + * newdoc.links = 3, and land on 'save options', however if + * no_option_save is set we will land on 'Display' which is an input + * field and leaving back to previous document will be annoying. + * Thus 'user mode' is the most sensible option to put into the + * front lines. - SKY */ - if (!LYMBMBlocked) { - PutLabel(fp0, "Multi-bookmarks"); - BeginSelect(fp0, mbm_string); - PutOption(fp0, !LYMultiBookmarks, - mbm_off_string, - mbm_off_string); - PutOption(fp0, LYMultiBookmarks && !LYMBMAdvanced, - mbm_standard_string, - mbm_standard_string); - PutOption(fp0, LYMultiBookmarks && LYMBMAdvanced, - mbm_advanced_string, - mbm_advanced_string); - EndSelect(fp0); - } + PutLabel(fp0, "User Mode"); + BeginSelect(fp0, user_mode_string); + PutOptValues(fp0, user_mode, user_mode_values); + EndSelect(fp0); /* - * bookmarks files menu + * display */ - if (LYMultiBookmarks) { - - PutLabel(fp0, "Review/edit Bookmarks files"); - fprintf(fp0,"<a href=\"LYNXOPTIONS://MBM_MENU\">go mbm menu</a>\n"); - - } else { - PutLabel(fp0, "Bookmarks file"); - fprintf(fp0,"<input type=\"text\" name=\"%s\" value=\"%s\">\n", - single_bookmark_string, - NOTEMPTY(bookmark_page)); - } + PutLabel(fp0, "Display"); + PutTextInput(fp0, display_string, NOTEMPTY(display), text_len, ""); /* - * ftp sort + * editor */ - PutLabel(fp0, "Ftp sort criteria"); - BeginSelect(fp0, ftp_sort_string); - PutOptValues(fp0, HTfileSortMethod, ftp_sort_values); + PutLabel(fp0, "Editor"); + PutTextInput(fp0, editor_string, NOTEMPTY(editor), text_len, + DISABLED(no_editor || system_editor)); + /* + * emacs_keys + */ + PutLabel(fp0, "Emacs Keys"); + BeginSelect(fp0, emacs_keys_string); + PutOptValues(fp0, emacs_keys, bool_values); EndSelect(fp0); /* - * mail_address + * keypad_mode */ - PutLabel(fp0, "Personal mail address"); - fprintf(fp0,"<input type=\"text\" name=\"%s\" value=\"%s\">\n", - mail_address_string, - NOTEMPTY(personal_mail_address)); + PutLabel(fp0, "Keypad Mode"); + BeginSelect(fp0, keypad_mode_string); + PutOptValues(fp0, keypad_mode, keypad_mode_values); + EndSelect(fp0); /* * search_type @@ -3713,79 +3766,21 @@ PUBLIC int gen_options ARGS1( EndSelect(fp0); /* - * preferred_doc_lang - */ - PutLabel(fp0, "Preferred document language"); - fprintf(fp0,"<input type=\"text\" name=\"%s\" value=\"%s\">\n", - preferred_doc_lang_string, - NOTEMPTY(language)); - - /* - * preferred_doc_char - */ - PutLabel(fp0, "Preferred document character set"); - fprintf(fp0,"<input type=\"text\" name=\"%s\" value=\"%s\">\n", - preferred_doc_char_string, - NOTEMPTY(pref_charset)); - - /* - * display_char_set + * mail_address */ - PutLabel(fp0, "Display character set"); - BeginSelect(fp0, display_char_set_string); - for (i = 0; LYchar_set_names[i]; i++) { - char temp[10]; - sprintf(temp, "%d", i); - PutOption(fp0, i==current_char_set, temp, LYchar_set_names[i]); - } - EndSelect(fp0); + PutLabel(fp0, "Personal mail address"); + PutTextInput(fp0, mail_address_string, + NOTEMPTY(personal_mail_address), text_len, ""); /* - * raw_mode + * select_popups */ - if (LYHaveCJKCharacterSet) - /* - * Since CJK people hardly mixed with other world - * we split the header to make it more readable: - * "CJK mode" for CJK display charsets, and "Raw 8-bit" for others. - */ - PutLabel(fp0, "CJK mode"); - else - PutLabel(fp0, "Raw 8-bit"); - - BeginSelect(fp0, raw_mode_string); - PutOptValues(fp0, LYRawMode, bool_values); + PutLabel(fp0, "Popups for select fields"); + BeginSelect(fp0, select_popups_string); + PutOptValues(fp0, LYSelectPopups, bool_values); EndSelect(fp0); /* - * assume_char_set - */ - /* - * FIXME: If bogus value in lynx.cfg, then in old way, that is the - * string that was displayed. Now, user will never see that. Good - * or bad? I don't know. MRC - */ - /* if (user_mode==ADVANCED_MODE) */ { - int curval; - - curval = UCLYhndl_for_unspec; - if (curval == current_char_set && UCAssume_MIMEcharset) { - curval = UCGetLYhndl_byMIME(UCAssume_MIMEcharset); - } - if (curval < 0) { - curval = LYRawMode ? current_char_set : 0; - } - PutLabel(fp0, "Assumed document character set"); - BeginSelect(fp0, assume_char_set_string); - for (i = 0; i < LYNumCharsets; i++) { - PutOption(fp0, i==curval, - LYCharSet_UC[i].MIMEname, - LYCharSet_UC[i].MIMEname); - } - EndSelect(fp0); - } - - /* * show_color */ #if defined(USE_SLANG) || defined(COLOR_CURSES) @@ -3831,6 +3826,22 @@ PUBLIC int gen_options ARGS1( #endif /* USE_SLANG || COLOR_CURSES */ /* + * verbose images mode + */ + PutLabel(fp0, "Verbose images"); + BeginSelect(fp0, verbose_images_string); + PutOptValues(fp0, verbose_img, bool_values); + EndSelect(fp0); + + /* + * show_cursor + */ + PutLabel(fp0, "Show cursor"); + BeginSelect(fp0, show_cursor_string); + PutOptValues(fp0, LYShowCursor, bool_values); + EndSelect(fp0); + + /* * vi_keys */ PutLabel(fp0, "VI Keys"); @@ -3838,46 +3849,125 @@ PUBLIC int gen_options ARGS1( PutOptValues(fp0, vi_keys, bool_values); EndSelect(fp0); + fprintf(fp0,"\n<em>Bookmarks Options</em>\n"); + /* - * emacs_keys + * multi-bookmarks mode */ - PutLabel(fp0, "Emacs Keys"); - BeginSelect(fp0, emacs_keys_string); - PutOptValues(fp0, emacs_keys, bool_values); - EndSelect(fp0); + if (!LYMBMBlocked) { + PutLabel(fp0, "Multi-bookmarks"); + BeginSelect(fp0, mbm_string); + PutOption(fp0, !LYMultiBookmarks, + mbm_off_string, + mbm_off_string); + PutOption(fp0, LYMultiBookmarks && !LYMBMAdvanced, + mbm_standard_string, + mbm_standard_string); + PutOption(fp0, LYMultiBookmarks && LYMBMAdvanced, + mbm_advanced_string, + mbm_advanced_string); + EndSelect(fp0); + } /* - * show_dotfiles + * bookmarks files menu */ - if (!no_dotfiles) { - PutLabel(fp0, "Show dot files"); - BeginSelect(fp0, show_dotfiles_string); - PutOptValues(fp0, show_dotfiles, bool_values); + if (LYMultiBookmarks) { + + PutLabel(fp0, "Review/edit Bookmarks files"); + fprintf(fp0, + "<a href=\"LYNXOPTIONS://MBM_MENU\">Goto multi-bookmark menu</a>\n"); + + } else { + PutLabel(fp0, "Bookmarks file"); + PutTextInput(fp0, single_bookmark_string, + NOTEMPTY(bookmark_page), text_len, ""); + } + + fprintf(fp0,"\n<em>Character Set Options</em>\n"); + + /* + * assume_char_set + */ + /* + * FIXME: If bogus value in lynx.cfg, then in old way, that is the + * string that was displayed. Now, user will never see that. Good + * or bad? I don't know. MRC + */ + /* if (user_mode==ADVANCED_MODE) */ { + int curval; + + curval = UCLYhndl_for_unspec; + if (curval == current_char_set && UCAssume_MIMEcharset) { + curval = UCGetLYhndl_byMIME(UCAssume_MIMEcharset); + } + if (curval < 0) { + curval = LYRawMode ? current_char_set : 0; + } + PutLabel(fp0, "Assumed document character set"); + BeginSelect(fp0, assume_char_set_string); + for (i = 0; i < LYNumCharsets; i++) { + PutOption(fp0, i==curval, + LYCharSet_UC[i].MIMEname, + LYCharSet_UC[i].MIMEname); + } EndSelect(fp0); } /* - * select_popups + * display_char_set */ - PutLabel(fp0, "Popups for select fields"); - BeginSelect(fp0, select_popups_string); - PutOptValues(fp0, LYSelectPopups, bool_values); + PutLabel(fp0, "Display character set"); + BeginSelect(fp0, display_char_set_string); + for (i = 0; LYchar_set_names[i]; i++) { + char temp[10]; + size_t len = strlen(LYchar_set_names[i]); + if (len > cset_len) + cset_len = len; + sprintf(temp, "%d", i); + PutOption(fp0, i==current_char_set, temp, LYchar_set_names[i]); + } EndSelect(fp0); /* - * show_cursor + * preferred_doc_char */ - PutLabel(fp0, "Show cursor"); - BeginSelect(fp0, show_cursor_string); - PutOptValues(fp0, LYShowCursor, bool_values); + PutLabel(fp0, "Preferred document character set"); + PutTextInput(fp0, preferred_doc_char_string, + NOTEMPTY(pref_charset), cset_len+2, ""); + + /* + * preferred_doc_lang + */ + PutLabel(fp0, "Preferred document language"); + PutTextInput(fp0, preferred_doc_lang_string, + NOTEMPTY(language), cset_len+2, ""); + + /* + * raw_mode + */ + if (LYHaveCJKCharacterSet) + /* + * Since CJK people hardly mixed with other world + * we split the header to make it more readable: + * "CJK mode" for CJK display charsets, and "Raw 8-bit" for others. + */ + PutLabel(fp0, "CJK mode"); + else + PutLabel(fp0, "Raw 8-bit"); + + BeginSelect(fp0, raw_mode_string); + PutOptValues(fp0, LYRawMode, bool_values); EndSelect(fp0); + fprintf(fp0,"\n<em>File Management Options</em>\n"); + /* - * keypad_mode + * ftp sort */ - PutLabel(fp0, "Keypad Mode"); - BeginSelect(fp0, keypad_mode_string); - PutOptValues(fp0, keypad_mode, keypad_mode_values); + PutLabel(fp0, "Ftp sort criteria"); + BeginSelect(fp0, ftp_sort_string); + PutOptValues(fp0, HTfileSortMethod, ftp_sort_values); EndSelect(fp0); #ifdef DIRED_SUPPORT @@ -3891,38 +3981,43 @@ PUBLIC int gen_options ARGS1( #endif /* DIRED_SUPPORT */ /* - * user_mode + * show_dotfiles */ - PutLabel(fp0, "User Mode"); - BeginSelect(fp0, user_mode_string); - PutOptValues(fp0, user_mode, user_mode_values); - EndSelect(fp0); + if (!no_dotfiles) { + PutLabel(fp0, "Show dot files"); + BeginSelect(fp0, show_dotfiles_string); + PutOptValues(fp0, show_dotfiles, bool_values); + EndSelect(fp0); + } + + fprintf(fp0,"\n"); /* - * save options + * user_agent */ - if (!no_option_save) { - PutLabel(fp0, "Save options to disk"); - fprintf(fp0,"<input type=\"checkbox\" name=\"%s\">\n", - save_options_string); + if (!no_useragent) { + PutLabel(fp0, "User-Agent header"); + PutTextInput(fp0, user_agent_string, NOTEMPTY(LYUserAgent), text_len, ""); } + fprintf(fp0,"\n</pre>\n"); + /* * save/reset */ - fprintf(fp0,"\n"); - fprintf(fp0,"<input type=\"submit\" value=\"Accept Changes\">"); - fprintf(fp0," <input type=\"reset\" value=\"Reset\">"); - fprintf(fp0," Use the back key to cancel changes.\n"); + fprintf(fp0,"<p align=center>\n"); + fprintf(fp0,"<input type=\"submit\" value=\"Accept Changes\">\n "); + fprintf(fp0,"<input type=\"reset\" value=\"Reset Changes\">\n"); + fprintf(fp0,"Left Arrow cancels changes<br>\n"); /* * close HTML */ - fprintf(fp0,"</pre>\n"); + fprintf(fp0,"</form>\n"); fprintf(fp0,"</body>\n"); fprintf(fp0,"</html>\n"); - fclose(fp0); + LYCloseTempFP(fp0); return(0); } #endif /* EXP_FORMS_OPTIONS */ diff --git a/src/LYOptions.h b/src/LYOptions.h index fc7f528a..c11c6150 100644 --- a/src/LYOptions.h +++ b/src/LYOptions.h @@ -69,8 +69,10 @@ extern void LYoptions NOPARAMS; #define L_EXEC 18 #endif /* DIRED_SUPPORT */ -#endif /* EXP_FORMS_OPTIONS */ +#define L_VERBOSE_IMAGES L_USER_MODE +#define B_VERBOSE_IMAGES 50 +#define C_VERBOSE_IMAGES (B_VERBOSE_IMAGES + 21) -#define OPTIONS_TITLE "Lynx Options Configuration" +#endif /* EXP_FORMS_OPTIONS */ #endif /* LYOPTIONS_H */ diff --git a/src/LYPrint.c b/src/LYPrint.c index 1b5bcb5d..548a577f 100644 --- a/src/LYPrint.c +++ b/src/LYPrint.c @@ -688,7 +688,7 @@ PUBLIC int printfile ARGS1( * For PMDF, put the subject in the * header file and close it. - FM */ - fprintf(hfd, "Subject: %.70s\n\n", sug_filename); + fprintf(hfd, "Subject: %.70s\n\n", newdoc->title); LYCloseTempFP(hfd); /* * Now set up the command. - FM @@ -710,7 +710,7 @@ PUBLIC int printfile ARGS1( "%s %s/subject=\"%.70s\" %s %s", system_mail, system_mail_flags, - sug_filename, + newdoc->title, tempfile, user_response); } @@ -818,9 +818,11 @@ PUBLIC int printfile ARGS1( /* * Add the To, Subject, and X-URL headers. - FM + * Use newdoc->title as a subject instead of sug_filename: + * MORE readable and 8-bit letters shouldn't be a problem - LP */ fprintf(outfile_fp, "To: %s\nSubject: %s\n", - user_response, sug_filename); + user_response, newdoc->title); fprintf(outfile_fp, "X-URL: %s\n\n", newdoc->address); if (LYPrependBaseToSource && HTisDocumentSource()) { /* @@ -992,7 +994,7 @@ PUBLIC int printfile ARGS1( if (keypad_mode) printlist(outfile_fp, FALSE); - fclose(outfile_fp); + LYCloseTempFP(outfile_fp); /* find the right printer number */ { @@ -1264,28 +1266,30 @@ PUBLIC int print_options ARGS2( fprintf(fp0, "<html>\n<head>\n<title>%s</title>\n</head>\n<body>\n", PRINT_OPTIONS_TITLE); - - fprintf(fp0,"<h1>Printing Options (%s Version %s)</h1><pre>\n", - LYNX_NAME, LYNX_VERSION); + fprintf(fp0, "<h1>%s (%s), help on <a href=\"%s%s\">%s</a></h1>\n", + LYNX_NAME, LYNX_VERSION, + helpfilepath, PRINT_OPTIONS_HELP, PRINT_OPTIONS_TITLE); pages = (lines_in_file+65)/66; - sprintf(buffer, - " There are %d lines, or approximately %d page%s, to print.\n", - lines_in_file, pages, (pages > 1 ? "s" : "")); + fprintf(fp0, "<pre>\n"); + sprintf(buffer, " \ +<em>You print the document:</em> %s\n \ + <em>Number of lines:</em> %d\n \ + <em>Number of pages:</em> %d page%s (approximately)\n", + tempfile, lines_in_file, pages, (pages > 1 ? "s" : "")); fputs(buffer,fp0); if (no_print || no_disk_save || child_lynx || no_mail) - fprintf(fp0, " Some print functions have been disabled!!!\n"); + fprintf(fp0, " <em>Some print functions have been disabled!</em>\n"); - fprintf(fp0, " You have the following print choices.\n"); - fprintf(fp0, " Please select one:\n\n"); + fprintf(fp0, "\nStandard print options:\n"); if (child_lynx == FALSE && no_disk_save == FALSE && no_print == FALSE) fprintf(fp0, " <a href=\"LYNXPRINT://LOCAL_FILE/lines=%d\">Save to a local file</a>\n", lines_in_file); else - fprintf(fp0," Save to disk disabled.\n"); + fprintf(fp0," <em>Save to disk disabled.</em>\n"); if (child_lynx == FALSE && no_mail == FALSE && local_host_only == FALSE) fprintf(fp0, " <a href=\"LYNXPRINT://MAIL_FILE/lines=%d\">Mail the file</a>\n", @@ -1300,6 +1304,7 @@ PUBLIC int print_options ARGS2( lines_in_file); #endif + fprintf(fp0, "\nLocal additions:\n"); for (count = 0, cur_printer = printers; cur_printer != NULL; cur_printer = cur_printer->next, count++) if (no_print == FALSE || cur_printer->always_enabled) { diff --git a/src/LYPrint.h b/src/LYPrint.h index fec8200f..5229e368 100644 --- a/src/LYPrint.h +++ b/src/LYPrint.h @@ -9,7 +9,5 @@ extern int printfile PARAMS((document *newdoc)); extern int print_options PARAMS((char **newfile, int lines_in_file)); -#define PRINT_OPTIONS_TITLE "Lynx Printing Options" - #endif /* LYPRINT_H */ diff --git a/src/LYShowInfo.c b/src/LYShowInfo.c index 7afe1670..03f1cb02 100644 --- a/src/LYShowInfo.c +++ b/src/LYShowInfo.c @@ -75,13 +75,24 @@ PUBLIC int showinfo ARGS4( LYAddMETAcharsetToFD(fp0, -1); fprintf(fp0, "<title>%s</title>\n</head>\n<body>\n", SHOWINFO_TITLE); - fprintf(fp0,"<h1>You have reached the Information Page</h1>\n"); - fprintf(fp0,"<h2>%s Version %s</h2>\n", LYNX_NAME, LYNX_VERSION); + +#ifdef LYNX_COMPILE_OPTS + fprintf(fp0, "<h1>%s %s (<a href=\"%s\">%s</a>) - <a href=\"%s\">compile time settings</a>\n", + LYNX_NAME, LYNX_VERSION, + (LYNX_RELEASE ? LYNX_WWW_HOME : LYNX_WWW_DIST), + (LYNX_RELEASE ? "major release" : "development version"), + LYNX_COMPILE_OPTS); +#else + fprintf(fp0, "<h1>%s %s (<a href=\"%s\">%s</a>)\n", + LYNX_NAME, LYNX_VERSION, + (LYNX_RELEASE ? LYNX_WWW_HOME : LYNX_WWW_DIST), + (LYNX_RELEASE ? "major release" : "development version") ); +#endif #ifdef DIRED_SUPPORT if (lynx_edit_mode && nlinks > 0) { - fprintf(fp0, - "<h2>Directory that you are currently viewing</h2>\n<pre>"); + fprintf(fp0, "<pre>\n"); + fprintf(fp0, "\nDirectory that you are currently viewing\n\n"); cp = doc->address; if (!strncmp(cp, "file://localhost", 16)) @@ -157,7 +168,7 @@ PUBLIC int showinfo ARGS4( cp = ctime(&dir_info.st_atime); fprintf(fp0, " <em>Last accessed:</em> %s\n", cp); - fprintf(fp0, " <em>Access Permissions</em>\n"); + fprintf(fp0, " Access Permissions\n"); fprintf(fp0, " <em>Owner:</em> "); modes[0] = '\0'; modes[1] = '\0'; /* In case there are no permissions */ diff --git a/src/LYUpload.c b/src/LYUpload.c index fd3b4616..78609f2c 100644 --- a/src/LYUpload.c +++ b/src/LYUpload.c @@ -241,12 +241,12 @@ PUBLIC int LYUpload_options ARGS2( fprintf(fp0, "<head>\n<title>%s</title>\n</head>\n<body>\n", UPLOAD_OPTIONS_TITLE); - - fprintf(fp0, "<h1>Upload Options (%s Version %s)</h1><pre>\n", - LYNX_NAME, LYNX_VERSION); - - fputs(" You have the following upload choices.<br>\n", fp0); - fputs(" Please select one:<br>\n\n", fp0); + fprintf(fp0, "<h1>%s (%s), help on <a href=\"%s%s\">%s</a></h1>\n", + LYNX_NAME, LYNX_VERSION, + helpfilepath, UPLOAD_OPTIONS_HELP, UPLOAD_OPTIONS_TITLE); + fprintf(fp0, "<pre>\n"); + fprintf(fp0, " <em>Upload To:</em> %s\n", curloc); + fputs("\nUpload options:\n", fp0); if (uploaders != NULL) { for (count = 0, cur_upload = uploaders; @@ -259,10 +259,12 @@ PUBLIC int LYUpload_options ARGS2( fprintf(fp0, "</a>\n"); } } else { - fprintf(fp0, "\n \ -No other upload methods have been defined yet. You may define\n \ -an unlimited number of upload methods using the lynx.cfg file.\n"); - + fprintf(fp0, " \ +<NONE>\n\n \ +You may define an unlimited number of upload methods.\n \ +Please refer to the <a href=\"%s\">lynx.cfg</a> file, \ +sections 'UPLOAD' and 'INCLUDE'.\n", + LYNX_CFG_FILE); } fprintf(fp0, "</pre>\n</body>\n"); LYCloseTempFP(fp0); diff --git a/src/LYUpload.h b/src/LYUpload.h index 17542b06..563c063e 100644 --- a/src/LYUpload.h +++ b/src/LYUpload.h @@ -9,7 +9,5 @@ extern int LYUpload PARAMS((char *line)); extern int LYUpload_options PARAMS((char **newfile, char *directory)); -#define UPLOAD_OPTIONS_TITLE "Lynx Upload Options" - #endif /* LYUPLOAD_H */ diff --git a/src/LYUtils.c b/src/LYUtils.c index c4deaac9..532bd69d 100644 --- a/src/LYUtils.c +++ b/src/LYUtils.c @@ -2038,10 +2038,8 @@ PUBLIC int HTCheckForInterrupt NOARGS if (fake_zap > 0) { fake_zap--; - if (TRACE) { - fprintf(tfp, "\r *** Got simulated 'Z' ***\n"); - fflush(tfp); - } + CTRACE(tfp, "\r *** Got simulated 'Z' ***\n"); + CTRACE_FLUSH(tfp); CTRACE_SLEEP(AlertSecs); return((int)TRUE); } @@ -2158,10 +2156,8 @@ PUBLIC int HTCheckForInterrupt NOARGS if (fake_zap > 0) { fake_zap--; - if (TRACE) { - fprintf(tfp, "\r *** Got simulated 'Z' ***\n"); - fflush(tfp); - } + CTRACE(tfp, "\r *** Got simulated 'Z' ***\n"); + CTRACE_FLUSH(tfp); CTRACE_SLEEP(AlertSecs); return((int)TRUE); } @@ -5781,6 +5777,7 @@ PUBLIC void LYRemoveTemp ARGS1( #endif CTRACE(tfp, "...LYRemoveTemp done(%d)%s\n", code, (p->file != 0) ? ", closed" : ""); + CTRACE_FLUSH(tfp); if (p->file != 0) fclose(p->file); free(p->name); diff --git a/src/LYrcFile.c b/src/LYrcFile.c index 3f3e57ba..77f5dca1 100644 --- a/src/LYrcFile.c +++ b/src/LYrcFile.c @@ -515,6 +515,18 @@ PUBLIC void read_rc NOPARAMS local_exec_on_local_files=FALSE; #endif /* ALLOW_USERS_TO_CHANGE_EXEC_WITHIN_OPTIONS */ + } else if ((cp = LYstrstr(line_buffer, + "verbose_images")) != NULL && + cp-line_buffer < number_sign) { + + if ((cp2 = (char *)strchr(cp, '=')) != NULL) + cp = cp2 + 1; + cp = LYSkipBlanks(cp); + if (!strncasecomp(cp, "on", 2)) + verbose_img = 1; + else if (!strncasecomp(cp, "off", 3)) + verbose_img = 0; + } /* end of if */ } /* end of while */ @@ -917,6 +929,13 @@ PUBLIC int save_rc NOPARAMS (local_exec_on_local_files ? "on" : "off")); #endif /* defined(EXEC_LINKS) || defined(EXEC_SCRIPTS) */ + fprintf(fp, "\ +# If verbose_images is \"on\", lynx will print the name of the image\n\ +# source file in place of [INLINE], [LINK] or [IMAGE]\n\ +# See also VERBOSE_IMAGES in lynx.cfg\n"); + fprintf(fp, "verbose_images=%s\n\n", + verbose_img ? "on" : "off"); + /* * Close the RC file. */ diff --git a/src/chrtrans/README.format b/src/chrtrans/README.format index 5e8d029c..636afd32 100644 --- a/src/chrtrans/README.format +++ b/src/chrtrans/README.format @@ -82,6 +82,10 @@ c) character translation definitions: * where <range> ::= <fontpos>-<fontpos> * and <unicode> ::= U+<h><h><h><h> * and <h> ::= <hexadecimal digit> + * + [Note that <fontpos> _without_ targets assumed notdefined, + so tables from ftp.unicode.org need no patching.] + d) string replacement definitions: diff --git a/src/chrtrans/cp1250_uni.tbl b/src/chrtrans/cp1250_uni.tbl index a6852cfa..e7b19995 100644 --- a/src/chrtrans/cp1250_uni.tbl +++ b/src/chrtrans/cp1250_uni.tbl @@ -27,14 +27,14 @@ OWinLatin2 (cp1250) 0x20-0x7e idem # 0x80 U+20AC #EURO SIGN -#0x81 #UNDEFINED +0x81 #UNDEFINED 0x82 U+201A #SINGLE LOW-9 QUOTATION MARK -#0x83 #UNDEFINED +0x83 #UNDEFINED 0x84 U+201E #DOUBLE LOW-9 QUOTATION MARK 0x85 U+2026 #HORIZONTAL ELLIPSIS 0x86 U+2020 #DAGGER 0x87 U+2021 #DOUBLE DAGGER -#0x88 #UNDEFINED +0x88 #UNDEFINED 0x89 U+2030 #PER MILLE SIGN 0x8A U+0160 #LATIN CAPITAL LETTER S WITH CARON 0x8B U+2039 #SINGLE LEFT-POINTING ANGLE QUOTATION MARK @@ -42,7 +42,7 @@ OWinLatin2 (cp1250) 0x8D U+0164 #LATIN CAPITAL LETTER T WITH CARON 0x8E U+017D #LATIN CAPITAL LETTER Z WITH CARON 0x8F U+0179 #LATIN CAPITAL LETTER Z WITH ACUTE -#0x90 #UNDEFINED +0x90 #UNDEFINED 0x91 U+2018 #LEFT SINGLE QUOTATION MARK 0x92 U+2019 #RIGHT SINGLE QUOTATION MARK 0x93 U+201C #LEFT DOUBLE QUOTATION MARK @@ -50,7 +50,7 @@ OWinLatin2 (cp1250) 0x95 U+2022 #BULLET 0x96 U+2013 #EN DASH 0x97 U+2014 #EM DASH -#0x98 #UNDEFINED +0x98 #UNDEFINED 0x99 U+2122 #TRADE MARK SIGN 0x9A U+0161 #LATIN SMALL LETTER S WITH CARON 0x9B U+203A #SINGLE RIGHT-POINTING ANGLE QUOTATION MARK diff --git a/src/chrtrans/cp1253_uni.tbl b/src/chrtrans/cp1253_uni.tbl index dac37990..ed50b1ed 100644 --- a/src/chrtrans/cp1253_uni.tbl +++ b/src/chrtrans/cp1253_uni.tbl @@ -27,22 +27,22 @@ OWinGreek (cp1253) 0x20-0x7e idem # 0x80 U+20AC #EURO SIGN -#0x81 #UNDEFINED +0x81 #UNDEFINED 0x82 U+201A #SINGLE LOW-9 QUOTATION MARK 0x83 U+0192 #LATIN SMALL LETTER F WITH HOOK 0x84 U+201E #DOUBLE LOW-9 QUOTATION MARK 0x85 U+2026 #HORIZONTAL ELLIPSIS 0x86 U+2020 #DAGGER 0x87 U+2021 #DOUBLE DAGGER -#0x88 #UNDEFINED +0x88 #UNDEFINED 0x89 U+2030 #PER MILLE SIGN -#0x8A #UNDEFINED +0x8A #UNDEFINED 0x8B U+2039 #SINGLE LEFT-POINTING ANGLE QUOTATION MARK -#0x8C #UNDEFINED -#0x8D #UNDEFINED -#0x8E #UNDEFINED -#0x8F #UNDEFINED -#0x90 #UNDEFINED +0x8C #UNDEFINED +0x8D #UNDEFINED +0x8E #UNDEFINED +0x8F #UNDEFINED +0x90 #UNDEFINED 0x91 U+2018 #LEFT SINGLE QUOTATION MARK 0x92 U+2019 #RIGHT SINGLE QUOTATION MARK 0x93 U+201C #LEFT DOUBLE QUOTATION MARK @@ -50,14 +50,14 @@ OWinGreek (cp1253) 0x95 U+2022 #BULLET 0x96 U+2013 #EN DASH 0x97 U+2014 #EM DASH -#0x98 #UNDEFINED +0x98 #UNDEFINED 0x99 U+2122 #TRADE MARK SIGN -#0x9A #UNDEFINED +0x9A #UNDEFINED 0x9B U+203A #SINGLE RIGHT-POINTING ANGLE QUOTATION MARK -#0x9C #UNDEFINED -#0x9D #UNDEFINED -#0x9E #UNDEFINED -#0x9F #UNDEFINED +0x9C #UNDEFINED +0x9D #UNDEFINED +0x9E #UNDEFINED +0x9F #UNDEFINED 0xA0 U+00A0 #NO-BREAK SPACE 0xA1 U+0385 #GREEK DIALYTIKA TONOS 0xA2 U+0386 #GREEK CAPITAL LETTER ALPHA WITH TONOS @@ -68,7 +68,7 @@ OWinGreek (cp1253) 0xA7 U+00A7 #SECTION SIGN 0xA8 U+00A8 #DIAERESIS 0xA9 U+00A9 #COPYRIGHT SIGN -#0xAA #UNDEFINED +0xAA #UNDEFINED 0xAB U+00AB #LEFT-POINTING DOUBLE ANGLE QUOTATION MARK 0xAC U+00AC #NOT SIGN 0xAD U+00AD #SOFT HYPHEN @@ -108,7 +108,7 @@ OWinGreek (cp1253) 0xCF U+039F #GREEK CAPITAL LETTER OMICRON 0xD0 U+03A0 #GREEK CAPITAL LETTER PI 0xD1 U+03A1 #GREEK CAPITAL LETTER RHO -#0xD2 #UNDEFINED +0xD2 #UNDEFINED 0xD3 U+03A3 #GREEK CAPITAL LETTER SIGMA 0xD4 U+03A4 #GREEK CAPITAL LETTER TAU 0xD5 U+03A5 #GREEK CAPITAL LETTER UPSILON @@ -153,4 +153,4 @@ OWinGreek (cp1253) 0xFC U+03CC #GREEK SMALL LETTER OMICRON WITH TONOS 0xFD U+03CD #GREEK SMALL LETTER UPSILON WITH TONOS 0xFE U+03CE #GREEK SMALL LETTER OMEGA WITH TONOS -#0xFF #UNDEFINED +0xFF #UNDEFINED diff --git a/src/chrtrans/cp1255_uni.tbl b/src/chrtrans/cp1255_uni.tbl index a30d9a7d..67517353 100644 --- a/src/chrtrans/cp1255_uni.tbl +++ b/src/chrtrans/cp1255_uni.tbl @@ -27,7 +27,7 @@ OWinHebrew (cp1255) 0x20-0x7e idem # 0x80 U+20AC #EURO SIGN -#0x81 #UNDEFINED +0x81 #UNDEFINED 0x82 U+201A #SINGLE LOW-9 QUOTATION MARK 0x83 U+0192 #LATIN SMALL LETTER F WITH HOOK 0x84 U+201E #DOUBLE LOW-9 QUOTATION MARK @@ -36,13 +36,13 @@ OWinHebrew (cp1255) 0x87 U+2021 #DOUBLE DAGGER 0x88 U+02C6 #MODIFIER LETTER CIRCUMFLEX ACCENT 0x89 U+2030 #PER MILLE SIGN -#0x8A #UNDEFINED +0x8A #UNDEFINED 0x8B U+2039 #SINGLE LEFT-POINTING ANGLE QUOTATION MARK -#0x8C #UNDEFINED -#0x8D #UNDEFINED -#0x8E #UNDEFINED -#0x8F #UNDEFINED -#0x90 #UNDEFINED +0x8C #UNDEFINED +0x8D #UNDEFINED +0x8E #UNDEFINED +0x8F #UNDEFINED +0x90 #UNDEFINED 0x91 U+2018 #LEFT SINGLE QUOTATION MARK 0x92 U+2019 #RIGHT SINGLE QUOTATION MARK 0x93 U+201C #LEFT DOUBLE QUOTATION MARK @@ -52,12 +52,12 @@ OWinHebrew (cp1255) 0x97 U+2014 #EM DASH 0x98 U+02DC #SMALL TILDE 0x99 U+2122 #TRADE MARK SIGN -#0x9A #UNDEFINED +0x9A #UNDEFINED 0x9B U+203A #SINGLE RIGHT-POINTING ANGLE QUOTATION MARK -#0x9C #UNDEFINED -#0x9D #UNDEFINED -#0x9E #UNDEFINED -#0x9F #UNDEFINED +0x9C #UNDEFINED +0x9D #UNDEFINED +0x9E #UNDEFINED +0x9F #UNDEFINED 0xA0 U+00A0 #NO-BREAK SPACE 0xA1 U+00A1 #INVERTED EXCLAMATION MARK 0xA2 U+00A2 #CENT SIGN @@ -100,7 +100,7 @@ OWinHebrew (cp1255) 0xC7 U+05B7 #HEBREW POINT PATAH 0xC8 U+05B8 #HEBREW POINT QAMATS 0xC9 U+05B9 #HEBREW POINT HOLAM -#0xCA #UNDEFINED +0xCA #UNDEFINED 0xCB U+05BB #HEBREW POINT QUBUTS 0xCC U+05BC #HEBREW POINT DAGESH OR MAPIQ 0xCD U+05BD #HEBREW POINT METEG @@ -115,13 +115,13 @@ OWinHebrew (cp1255) 0xD6 U+05F2 #HEBREW LIGATURE YIDDISH DOUBLE YOD 0xD7 U+05F3 #HEBREW PUNCTUATION GERESH 0xD8 U+05F4 #HEBREW PUNCTUATION GERSHAYIM -#0xD9 #UNDEFINED -#0xDA #UNDEFINED -#0xDB #UNDEFINED -#0xDC #UNDEFINED -#0xDD #UNDEFINED -#0xDE #UNDEFINED -#0xDF #UNDEFINED +0xD9 #UNDEFINED +0xDA #UNDEFINED +0xDB #UNDEFINED +0xDC #UNDEFINED +0xDD #UNDEFINED +0xDE #UNDEFINED +0xDF #UNDEFINED 0xE0 U+05D0 #HEBREW LETTER ALEF 0xE1 U+05D1 #HEBREW LETTER BET 0xE2 U+05D2 #HEBREW LETTER GIMEL @@ -149,8 +149,8 @@ OWinHebrew (cp1255) 0xF8 U+05E8 #HEBREW LETTER RESH 0xF9 U+05E9 #HEBREW LETTER SHIN 0xFA U+05EA #HEBREW LETTER TAV -#0xFB #UNDEFINED -#0xFC #UNDEFINED +0xFB #UNDEFINED +0xFC #UNDEFINED 0xFD U+200E #LEFT-TO-RIGHT MARK 0xFE U+200F #RIGHT-TO-LEFT MARK -#0xFF #UNDEFINED +0xFF #UNDEFINED diff --git a/src/chrtrans/cp1256_uni.tbl b/src/chrtrans/cp1256_uni.tbl index 0e045aaa..844e450d 100644 --- a/src/chrtrans/cp1256_uni.tbl +++ b/src/chrtrans/cp1256_uni.tbl @@ -36,12 +36,12 @@ OWinArabic (cp1256) 0x87 U+2021 #DOUBLE DAGGER 0x88 U+02C6 #MODIFIER LETTER CIRCUMFLEX ACCENT 0x89 U+2030 #PER MILLE SIGN -#0x8A #UNDEFINED +0x8A #UNDEFINED 0x8B U+2039 #SINGLE LEFT-POINTING ANGLE QUOTATION MARK 0x8C U+0152 #LATIN CAPITAL LIGATURE OE 0x8D U+0686 #ARABIC LETTER TCHEH 0x8E U+0698 #ARABIC LETTER JEH -#0x8F #UNDEFINED +0x8F #UNDEFINED 0x90 U+06AF #ARABIC LETTER GAF 0x91 U+2018 #LEFT SINGLE QUOTATION MARK 0x92 U+2019 #RIGHT SINGLE QUOTATION MARK @@ -50,14 +50,14 @@ OWinArabic (cp1256) 0x95 U+2022 #BULLET 0x96 U+2013 #EN DASH 0x97 U+2014 #EM DASH -#0x98 #UNDEFINED +0x98 #UNDEFINED 0x99 U+2122 #TRADE MARK SIGN -#0x9A #UNDEFINED +0x9A #UNDEFINED 0x9B U+203A #SINGLE RIGHT-POINTING ANGLE QUOTATION MARK 0x9C U+0153 #LATIN SMALL LIGATURE OE 0x9D U+200C #ZERO WIDTH NON-JOINER 0x9E U+200D #ZERO WIDTH JOINER -#0x9F #UNDEFINED +0x9F #UNDEFINED 0xA0 U+00A0 #NO-BREAK SPACE 0xA1 U+060C #ARABIC COMMA 0xA2 U+00A2 #CENT SIGN @@ -68,7 +68,7 @@ OWinArabic (cp1256) 0xA7 U+00A7 #SECTION SIGN 0xA8 U+00A8 #DIAERESIS 0xA9 U+00A9 #COPYRIGHT SIGN -#0xAA #UNDEFINED +0xAA #UNDEFINED 0xAB U+00AB #LEFT-POINTING DOUBLE ANGLE QUOTATION MARK 0xAC U+00AC #NOT SIGN 0xAD U+00AD #SOFT HYPHEN @@ -90,7 +90,7 @@ OWinArabic (cp1256) 0xBD U+00BD #VULGAR FRACTION ONE HALF 0xBE U+00BE #VULGAR FRACTION THREE QUARTERS 0xBF U+061F #ARABIC QUESTION MARK -#0xC0 #UNDEFINED +0xC0 #UNDEFINED 0xC1 U+0621 #ARABIC LETTER HAMZA 0xC2 U+0622 #ARABIC LETTER ALEF WITH MADDA ABOVE 0xC3 U+0623 #ARABIC LETTER ALEF WITH HAMZA ABOVE @@ -153,4 +153,4 @@ OWinArabic (cp1256) 0xFC U+00FC #LATIN SMALL LETTER U WITH DIAERESIS 0xFD U+200E #LEFT-TO-RIGHT MARK 0xFE U+200F #RIGHT-TO-LEFT MARK -#0xFF #UNDEFINED +0xFF #UNDEFINED diff --git a/src/chrtrans/cp1257_uni.tbl b/src/chrtrans/cp1257_uni.tbl index 8e830cd5..5339fa7c 100644 --- a/src/chrtrans/cp1257_uni.tbl +++ b/src/chrtrans/cp1257_uni.tbl @@ -27,22 +27,22 @@ OWinBaltRim (cp1257) 0x20-0x7e idem # 0x80 U+20AC #EURO SIGN -#0x81 #UNDEFINED +0x81 #UNDEFINED 0x82 U+201A #SINGLE LOW-9 QUOTATION MARK -#0x83 #UNDEFINED +0x83 #UNDEFINED 0x84 U+201E #DOUBLE LOW-9 QUOTATION MARK 0x85 U+2026 #HORIZONTAL ELLIPSIS 0x86 U+2020 #DAGGER 0x87 U+2021 #DOUBLE DAGGER -#0x88 #UNDEFINED +0x88 #UNDEFINED 0x89 U+2030 #PER MILLE SIGN -#0x8A #UNDEFINED +0x8A #UNDEFINED 0x8B U+2039 #SINGLE LEFT-POINTING ANGLE QUOTATION MARK -#0x8C #UNDEFINED +0x8C #UNDEFINED 0x8D U+00A8 #DIAERESIS 0x8E U+02C7 #CARON 0x8F U+00B8 #CEDILLA -#0x90 #UNDEFINED +0x90 #UNDEFINED 0x91 U+2018 #LEFT SINGLE QUOTATION MARK 0x92 U+2019 #RIGHT SINGLE QUOTATION MARK 0x93 U+201C #LEFT DOUBLE QUOTATION MARK @@ -50,20 +50,20 @@ OWinBaltRim (cp1257) 0x95 U+2022 #BULLET 0x96 U+2013 #EN DASH 0x97 U+2014 #EM DASH -#0x98 #UNDEFINED +0x98 #UNDEFINED 0x99 U+2122 #TRADE MARK SIGN -#0x9A #UNDEFINED +0x9A #UNDEFINED 0x9B U+203A #SINGLE RIGHT-POINTING ANGLE QUOTATION MARK -#0x9C #UNDEFINED +0x9C #UNDEFINED 0x9D U+00AF #MACRON 0x9E U+02DB #OGONEK -#0x9F #UNDEFINED +0x9F #UNDEFINED 0xA0 U+00A0 #NO-BREAK SPACE -#0xA1 #UNDEFINED +0xA1 #UNDEFINED 0xA2 U+00A2 #CENT SIGN 0xA3 U+00A3 #POUND SIGN 0xA4 U+00A4 #CURRENCY SIGN -#0xA5 #UNDEFINED +0xA5 #UNDEFINED 0xA6 U+00A6 #BROKEN BAR 0xA7 U+00A7 #SECTION SIGN 0xA8 U+00D8 #LATIN CAPITAL LETTER O WITH STROKE diff --git a/src/makefile.dos b/src/makefile.dos index 4c87b064..283bcc27 100644 --- a/src/makefile.dos +++ b/src/makefile.dos @@ -12,7 +12,11 @@ LYStyle.o LYHash.o CFLAGS= $(MCFLAGS) -I. -I.. $(SLANGINC)
CC = gcc
-MCFLAGS = -O3 -DHAVE_GETBKGD -DDISP_PARTIAL -DUSE_ZLIB -DUSE_EXTERNALS -DCOLOR_CURSES -DNCURSES -DFANCY_CURSES -DACCESS_AUTH -DNO_CUSERID -DNOUSERS -DDOSPATH -DNO_TTYTYPE -DNO_UTMP -Ichrtrans -I../WWW/library/implementation -I../curses -I../djgpp/tcplib/include -I../djgpp/tcplib/include/tcp
+MCFLAGS = -O3 -DHAVE_GETBKGD -DDISP_PARTIAL -DUSE_ZLIB \
+ -DUSE_EXTERNALS -DCOLOR_CURSES -DNCURSES -DFANCY_CURSES \
+ -DACCESS_AUTH -DNO_CUSERID -DNOUSERS -DDOSPATH -DNO_TTYTYPE -DNO_UTMP \
+ -Ichrtrans -I../WWW/library/implementation \
+ -I../curses -I../djgpp/tcplib/include -I../djgpp/tcplib/include/tcp
WWWLIB = ../WWW/library/djgpp/libwww.a ../curses/pdcurses.a ../djgpp/tcplib/obj/libtcp.a
LIBS=-lz
diff --git a/src/makefile.in b/src/makefile.in index b7289f3c..3e6786d9 100644 --- a/src/makefile.in +++ b/src/makefile.in @@ -44,6 +44,9 @@ CC_OPTS = $(CPP_OPTS) $(CFLAGS) LINT = @LINT@ LINTOPTS = +COMPRESS_PROG =@COMPRESS_PROG@ +COMPRESS_EXT =@COMPRESS_EXT@ + CHARTRANS_OBJS=UCdomap.o UCAux.o UCAuto.o OBJS= LYClean.o LYShowInfo.o LYEdit.o LYStrings.o \ LYMail.o HTAlert.o GridText.o LYGetFile.o \ @@ -69,7 +72,7 @@ all: lynx$x @RULE_CC@ @ECHO_CC@$(CPP) -C $(CPP_OPTS) $*.c >$@ -lynx$x: message do_chartrans_stuff $(OBJS) $(WWWLIB) +lynx$x: message do_chartrans_stuff ../LYHelp.h $(OBJS) $(WWWLIB) @echo "Linking and creating Lynx executable" $(CC) $(CC_OPTS) $(LDFLAGS) -o $@ $(OBJS) $(WWWLIB) $(LIBS) @echo "Copying Lynx executable into top-level directory" |