diff options
author | Thomas E. Dickey <dickey@invisible-island.net> | 2009-05-25 01:12:45 -0400 |
---|---|---|
committer | Thomas E. Dickey <dickey@invisible-island.net> | 2009-05-25 01:12:45 -0400 |
commit | 187fb5330e6223a7c4945ab1f522e254d04b8f57 (patch) | |
tree | 230381c86a3cef009255e678ba87b70e440415c0 | |
parent | 097b356f6a8fa667d38dd10bb3bca016a7cc4f03 (diff) | |
download | lynx-snapshots-187fb5330e6223a7c4945ab1f522e254d04b8f57.tar.gz |
snapshot of project "lynx", label v2-8-7pre_2c
-rw-r--r-- | CHANGES | 6 | ||||
-rw-r--r-- | WWW/Library/Implementation/HTNews.c | 6 | ||||
-rw-r--r-- | src/LYPrint.c | 16 | ||||
-rw-r--r-- | src/LYUtils.c | 121 | ||||
-rw-r--r-- | test/cp-1252.html | 183 |
5 files changed, 266 insertions, 66 deletions
diff --git a/CHANGES b/CHANGES index 4d0c5d29..8696b53c 100644 --- a/CHANGES +++ b/CHANGES @@ -1,9 +1,13 @@ --- $LynxId: CHANGES,v 1.398 2009/05/22 00:29:53 tom Exp $ +-- $LynxId: CHANGES,v 1.400 2009/05/24 23:15:43 tom Exp $ =============================================================================== Changes since Lynx 2.8 release =============================================================================== 2009-05-?? (2.8.7pre.3) +* remove check for -dump option from HTHandleAuthInfo(), allowing Lynx to -dump + or -source NNTP urls (report by Dallas E. Legan II) -TD +* amend fix for Debian #388622 to allow the user to save names to the home + directory, e.g., ~/foo -TD * add an Options menu checkbox to tell if Lynx should send a user-agent string. Unless the useragent restriction is set, the default for this checkbox is off, so that Lynx will not send the string. The corresponding setting, diff --git a/WWW/Library/Implementation/HTNews.c b/WWW/Library/Implementation/HTNews.c index 07d723d8..0c5d4054 100644 --- a/WWW/Library/Implementation/HTNews.c +++ b/WWW/Library/Implementation/HTNews.c @@ -1,5 +1,5 @@ /* - * $LynxId: HTNews.c,v 1.59 2009/05/10 22:53:23 tom Exp $ + * $LynxId: HTNews.c,v 1.60 2009/05/24 23:11:26 tom Exp $ * * NEWS ACCESS HTNews.c * =========== @@ -389,9 +389,9 @@ static NNTPAuthResult HTHandleAuthInfo(char *host) int status, tries; /* - * Make sure we have an interactive user and a host. - FM + * Make sure we have a host. - FM */ - if (dump_output_immediately || !(host && *host)) + if (isEmpty(host)) return NNTPAUTH_ERROR; /* diff --git a/src/LYPrint.c b/src/LYPrint.c index bd881f79..f6dd409d 100644 --- a/src/LYPrint.c +++ b/src/LYPrint.c @@ -1,4 +1,6 @@ -/* $LynxId: LYPrint.c,v 1.84 2007/07/01 23:39:36 Andrew.Belov Exp $ */ +/* + * $LynxId: LYPrint.c,v 1.85 2009/05/24 22:28:27 tom Exp $ + */ #include <HTUtils.h> #include <HTAccess.h> #include <HTList.h> @@ -288,7 +290,8 @@ static BOOLEAN confirm_by_pages(const char *prompt, return TRUE; } -static void send_file_to_file(DocInfo *newdoc, char *content_base, +static void send_file_to_file(DocInfo *newdoc, + char *content_base, char *sug_filename) { BOOLEAN FirstRecall = TRUE; @@ -458,7 +461,8 @@ static void send_file_to_file(DocInfo *newdoc, char *content_base, return; } -static void send_file_to_mail(DocInfo *newdoc, char *content_base, +static void send_file_to_mail(DocInfo *newdoc, + char *content_base, char *content_location) { static BOOLEAN first_mail_preparsed = TRUE; @@ -783,7 +787,8 @@ static void send_file_to_mail(DocInfo *newdoc, char *content_base, return; } -static void send_file_to_printer(DocInfo *newdoc, char *content_base, +static void send_file_to_printer(DocInfo *newdoc, + char *content_base, char *sug_filename, int printer_number) { @@ -945,7 +950,8 @@ static void send_file_to_printer(DocInfo *newdoc, char *content_base, return; } -static void send_file_to_screen(DocInfo *newdoc, char *content_base, +static void send_file_to_screen(DocInfo *newdoc, + char *content_base, BOOLEAN Lpansi) { FILE *outfile_fp; diff --git a/src/LYUtils.c b/src/LYUtils.c index c9688d90..171c61ca 100644 --- a/src/LYUtils.c +++ b/src/LYUtils.c @@ -1,5 +1,5 @@ /* - * $LynxId: LYUtils.c,v 1.184 2009/04/09 20:33:31 tom Exp $ + * $LynxId: LYUtils.c,v 1.185 2009/05/24 22:17:03 tom Exp $ */ #include <HTUtils.h> #include <HTTCP.h> @@ -6602,8 +6602,9 @@ const char *wwwName(const char *pathname) BOOLEAN LYValidateFilename(char *result, char *given) { - char *cp; - const char *cp2; + BOOLEAN code = TRUE; + char *cp = NULL; + const char *cp2 = NULL; /* * Cancel if the user entered "/dev/null" on Unix, or an "nl:" path on VMS. @@ -6611,78 +6612,84 @@ BOOLEAN LYValidateFilename(char *result, */ if (LYIsNullDevice(given)) { /* just ignore it */ - return FALSE; - } + code = FALSE; #ifdef HAVE_POPEN - if (LYIsPipeCommand(given)) { + } else if (LYIsPipeCommand(given)) { if (no_shell) { HTUserMsg(SPAWNING_DISABLED); - return FALSE; + code = FALSE; + } else { + LYstrncpy(result, given, LY_MAXPATH); } - LYstrncpy(result, given, LY_MAXPATH); - return TRUE; - } #endif - if ((cp = FindLeadingTilde(given, TRUE)) != given - && (cp2 = wwwName(Home_Dir())) != 0 - && strlen(cp2) + strlen(given) < LY_MAXPATH) { - *(cp++) = '\0'; - strcpy(result, given); - LYTrimPathSep(result); - strcat(result, cp2); - strcat(result, cp); - strcpy(given, result); - } -#ifdef VMS - if (strchr(given, '/') != NULL) { - strcpy(result, HTVMS_name("", given)); - strcpy(given, result); - } - if (given[0] != '/' - && strchr(given, ':') == NULL - && strlen(given) < LY_MAXPATH - 13) { - strcpy(result, "sys$disk:"); - if (strchr(given, ']') == NULL) - strcat(result, "[]"); - strcat(result, given); } else { - strcpy(result, given); - } + if ((cp = FindLeadingTilde(given, TRUE)) != 0 + && (cp2 = wwwName(Home_Dir())) != 0 + && strlen(cp2) + strlen(given) < LY_MAXPATH) { + *(cp++) = '\0'; + strcpy(result, given); + LYTrimPathSep(result); + strcat(result, cp2); + strcat(result, cp); + strcpy(given, result); + } +#ifdef VMS + if (strchr(given, '/') != NULL) { + strcpy(result, HTVMS_name("", given)); + strcpy(given, result); + } + if (given[0] != '/' + && strchr(given, ':') == NULL + && strlen(given) < LY_MAXPATH - 13) { + strcpy(result, "sys$disk:"); + if (strchr(given, ']') == NULL) + strcat(result, "[]"); + strcat(result, given); + } else { + strcpy(result, given); + } #else #ifndef __EMX__ - if (!LYisAbsPath(given)) { + if (!LYisAbsPath(given)) { #if defined(__DJGPP__) || defined(_WINDOWS) - if (strchr(result, ':') != NULL) - cp = NULL; - else + if (strchr(result, ':') != NULL) + cp = NULL; + else #endif /* __DJGPP__ || _WINDOWS */ - { + { #ifdef SUPPORT_CHDIR - static char buf[LY_MAXPATH]; + static char buf[LY_MAXPATH]; - cp = Current_Dir(buf); + cp = Current_Dir(buf); #else - cp = original_dir; + cp = original_dir; #endif - } - } else + } + } else #endif /* __EMX__ */ - cp = NULL; + cp = NULL; - *result = 0; - if (cp) { - LYTrimPathSep(cp); - if (strlen(cp) >= LY_MAXPATH - 2) - return FALSE; - sprintf(result, "%s/", cp); - } - cp = HTSYS_name(given); - if (strlen(result) + strlen(cp) >= LY_MAXPATH - 1) - return FALSE; - strcat(result, cp); + *result = 0; + if (cp) { + LYTrimPathSep(cp); + if (strlen(cp) >= LY_MAXPATH - 2) { + code = FALSE; + } else { + sprintf(result, "%s/", cp); + } + } + if (code) { + cp = HTSYS_name(given); + if (strlen(result) + strlen(cp) >= LY_MAXPATH - 1) { + code = FALSE; + } else { + strcat(result, cp); + } + } #endif /* VMS */ - return TRUE; + } + return code; } /* diff --git a/test/cp-1252.html b/test/cp-1252.html new file mode 100644 index 00000000..1fd1b0d3 --- /dev/null +++ b/test/cp-1252.html @@ -0,0 +1,183 @@ +<!DOCTYPE html PUBLIC "-//IETF//DTD HTML 3.0//EN"> +<HTML> +<HEAD> +<TITLE>Character table for cp-1252</TITLE> +<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=cp-1252"> +<LINK REV="made" HREF="mailto:lynx-dev@nongnu.org"> +<LINK REV="owner" HREF="http://mail.gnu.org/mailman/listinfo/lynx-dev/"> +<LINK REL="sibling" HREF="iso8859-1.html" TITLE="iso-8859-1 test"> +<LINK REL="sibling" HREF="ALT88592.html" TITLE="iso-8859-2 ALT test"> +</HEAD> + +<BODY> + +<H1 ALIGN=center>cp-1252 table</H1> + +<PRE> +Description Code Entity name +=================================== ============ ============== +quotation mark &#34; --> " &quot; --> " +ampersand &#38; --> & &amp; --> & +less-than sign &#60; --> < &lt; --> < +greater-than sign &#62; --> > &gt; --> > + +Description Char Code Entity name +=================================== ==== ============ ============== +euro sign &128; --> € +undefined &129; -->  +single low-9 quotation mark &130; --> ‚ +latin small letter f with hook &131; --> ƒ +double low-9 quotation mark &132; --> „ +horizontal ellipsis &133; --> … +dagger &134; --> † +double dagger &135; --> ‡ +modifier letter circumflex accent &136; --> ˆ +per mille sign &137; --> ‰ +latin capital letter s with caron &138; --> Š +single left-pointing angle quote mark &139; --> ‹ +latin capital ligature oe &140; --> Œ +undefined &141; -->  +latin capital letter z with caron &142; --> Ž +undefined &143; -->  + +undefined &144; -->  +left single quotation mark &145; --> ‘ +right single quotation mark &146; --> ’ +left double quotation mark &147; --> “ +right double quotation mark &148; --> ” +bullet &149; --> • +en dash &150; --> – +em dash &151; --> — +small tilde &152; --> ˜ +trade mark sign &153; --> ™ +latin small letter s with caron &154; --> š +single right-pointing angle quote mark &155; --> › +latin small ligature oe &156; --> œ +undefined &157; -->  +latin small letter z with caron &158; --> ž +latin capital letter y with diaeresis &159; --> Ÿ + +non-breaking space &#160; -->   &nbsp; --> +inverted exclamation &#161; --> ¡ &iexcl; --> ¡ +cent sign &#162; --> ¢ &cent; --> ¢ +pound sterling &#163; --> £ &pound; --> £ +general currency sign &#164; --> ¤ &curren; --> ¤ +yen sign &#165; --> ¥ &yen; --> ¥ +broken vertical bar &#166; --> ¦ &brvbar; --> ¦ +section sign &#167; --> § &sect; --> § +umlaut (dieresis) &#168; --> ¨ &uml; --> ¨ +copyright &#169; --> © &copy; --> © +feminine ordinal &#170; --> ª &ordf; --> ª +left angle quote, guillemotleft &#171; --> « &laquo; --> « +not sign &#172; --> ¬ &not; --> ¬ +soft hyphen &#173; --> ­ &shy; --> ­ +registered trademark &#174; --> ® &reg; --> ® +macron accent &#175; --> ¯ &macr; --> ¯ + +degree sign &#176; --> ° &deg; --> ° +plus or minus &#177; --> ± &plusmn; --> ± +superscript two &#178; --> ² &sup2; --> ² +superscript three &#179; --> ³ &sup3; --> ³ +acute accent &#180; --> ´ &acute; --> ´ +micro sign &#181; --> µ &micro; --> µ +paragraph sign &#182; --> ¶ &para; --> ¶ +middle dot &#183; --> · &middot; --> · +cedilla &#184; --> ¸ &cedil; --> ¸ +superscript one &#185; --> ¹ &sup1; --> ¹ +masculine ordinal &#186; --> º &ordm; --> º +right angle quote, guillemotright &#187; --> » &raquo; --> » +vulgar fraction one-quarter &#188; --> ¼ &frac14; --> ¼ +vulgar fraction one-half &#189; --> ½ &frac12; --> ½ +vulgar fraction three-fourths &#190; --> ¾ &frac34; --> ¾ +inverted question mark &#191; --> ¿ &iquest; --> ¿ + +latin capital letter a with grave &#192; --> À &Agrave; --> À +latin capital letter a with acute &#193; --> Á &Aacute; --> Á +latin capital letter a with circumflex &#194; -->  &Acirc; -->  +latin capital letter a with tilde &#195; --> à &Atilde; --> à +latin capital letter a with diaeresis &#196; --> Ä &Auml; --> Ä +latin capital letter a with ring above &#197; --> Å &Aring; --> Å +latin capital letter ae &#198; --> Æ &AElig; --> Æ +latin capital letter c with cedilla &#199; --> Ç &Ccedil; --> Ç +latin capital letter e with grave &#200; --> È &Egrave; --> È +latin capital letter e with acute &#201; --> É &Eacute; --> É +latin capital letter e with circumflex &#202; --> Ê &Ecirc; --> Ê +latin capital letter e with diaeresis &#203; --> Ë &Euml; --> Ë +latin capital letter i with grave &#204; --> Ì &Igrave; --> Ì +latin capital letter i with acute &#205; --> Í &Iacute; --> Í +latin capital letter i with circumflex &#206; --> Î &Icirc; --> Î +latin capital letter i with diaeresis &#207; --> Ï &Iuml; --> Ï + +latin capital letter eth &#208; --> Ð &ETH; --> Ð +latin capital letter n with tilde &#209; --> Ñ &Ntilde; --> Ñ +latin capital letter o with grave &#210; --> Ò &Ograve; --> Ò +latin capital letter o with acute &#211; --> Ó &Oacute; --> Ó +latin capital letter o with circumflex &#212; --> Ô &Ocirc; --> Ô +latin capital letter o with tilde &#213; --> Õ &Otilde; --> Õ +latin capital letter o with diaeresis &#214; --> Ö &Ouml; --> Ö +multiplication sign &#215; --> × &times; --> × +latin capital letter o with stroke &#216; --> Ø &Oslash; --> Ø +latin capital letter u with grave &#217; --> Ù &Ugrave; --> Ù +latin capital letter u with acute &#218; --> Ú &Uacute; --> Ú +latin capital letter u with circumflex &#219; --> Û &Ucirc; --> Û +latin capital letter u with diaeresis &#220; --> Ü &Uuml; --> Ü +latin capital letter y with acute &#221; --> Ý &Yacute; --> Ý +latin capital letter thorn &#222; --> Þ &THORN; --> Þ +latin small letter sharp s &#223; --> ß &szlig; --> ß + +latin small letter a with grave &#224; --> à &agrave; --> à +latin small letter a with acute &#225; --> á &aacute; --> á +latin small letter a with circumflex &#226; --> â &acirc; --> â +latin small letter a with tilde &#227; --> ã &atilde; --> ã +latin small letter a with diaeresis &#228; --> ä &auml; --> ä +latin small letter a with ring above &#229; --> å &aring; --> å +latin small letter ae &#230; --> æ &aelig; --> æ +latin small letter c with cedilla &#231; --> ç &ccedil; --> ç +latin small letter e with grave &#232; --> è &egrave; --> è +latin small letter e with acute &#233; --> é &eacute; --> é +latin small letter e with circumflex &#234; --> ê &ecirc; --> ê +latin small letter e with diaeresis &#235; --> ë &euml; --> ë +latin small letter i with grave &#236; --> ì &igrave; --> ì +latin small letter i with acute &#237; --> í &iacute; --> í +latin small letter i with circumflex &#238; --> î &icirc; --> î +latin small letter i with diaeresis &#239; --> ï &iuml; --> ï + +latin small letter eth &#240; --> ð &eth; --> ð +latin small letter n with tilde &#241; --> ñ &ntilde; --> ñ +latin small letter o with grave &#242; --> ò &ncaron; --> ň +latin small letter o with acute &#243; --> ó &oacute; --> ó +latin small letter o with circumflex &#244; --> ô &ocirc; --> ô +latin small letter o with tilde &#245; --> õ &otilde; --> õ +latin small letter o with diaeresis &#246; --> ö &ouml; --> ö +division sign &#247; --> ÷ &divide; --> ÷ +latin small letter o with stroke &#248; --> ø &oslash; --> ø +latin small letter u with grave &#249; --> ù &ugrave; --> ù +latin small letter u with acute &#250; --> ú &uacute; --> ú +latin small letter u with circumflex &#251; --> û &ucirc; --> û +latin small letter u with diaeresis &#252; --> ü &uuml; --> ü +latin small letter y with acute &#253; --> ý &yacute; --> ý +latin small letter thorn &#254; --> þ &thorn; --> þ +latin small letter y with diaeresis {} {&#255;}-->{ÿ} {&yuml;} -->{ÿ} + +Some other characters of interest Char Code Entity name +=================================== ==== ============ ============== +capital AE diphthong (ligature) N/A &#198; --> Æ &AElig; --> Æ +small ae diphthong (ligature) N/A &#230; --> æ &aelig; --> æ +capital OE ligature N/A {&#338;}-->{Œ} {&OElig;} -->{Œ} +small oe ligature N/A {&#339;}-->{œ} {&oelig;} -->{œ} +copyright N/A &#169; --> © &copy; --> © +registered trademark N/A &#174; --> ® &reg; --> ® +trademark sign N/A &#8482;--> ™ &trade; --> ™ +em space N/A [&#8195;]->[ ] [&emsp;] -->[ ] +en space N/A [&#8194;]->[ ] [&ensp;] -->[ ] +1/3-em space N/A [&#8196;]->[ ] [&emsp13;] -->[ ] +1/4-em space N/A [&#8197;]->[ ] [&emsp14;] -->[ ] +thin space N/A [&#8201;]->[ ] [&thinsp;]-->[ ] +hair space N/A [&#8202;]->[ ] [&hairsp;]-->[ ] +em dash N/A [&#8212;]->[—] [&mdash;] -->[—] +en dash N/A [&#8211;]->[–] [&ndash;] -->[–] + +</PRE> + +</BODY> +</HTML> |