[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
lynx-dev Mixed bag of patches for 2.8.1dev.13
From: |
Klaus Weide |
Subject: |
lynx-dev Mixed bag of patches for 2.8.1dev.13 |
Date: |
Thu, 14 Jan 1999 18:11:32 -0600 (CST) |
* Minor changes to SortaSGML DTD for PARAM, THEAD.
* Make "Alert" statusline prefix localizable.
* Extend fixtext.sh to also change continued lines.
* Changed LYCheckForProxyURL to act more like it appears to
have been indended, and clarify comment. Minor change in
is_url.
* Prevent removal of hidden link number from bookmark document
in a very obscure case of a bookmarked ISMAP link.
* HText_SubmitForm: make sure query is always allocated, even
if the set of form fields to be sent turned out to be empty.
* Some comments corrected in HTML.c, LYCharSets.c.
* Tweak in curses_w_style for display without color.
* Remove minor memory leaks in LYDownload.c, LYMain.c.
* Changed error handling in LYTraversal.c to make sure terminal
gets restored to sane mode before showing error message and
exiting.
* Increased VALUE_SIZE for buffer in HTMIME.c from 1024 to 5120.
Someone needed increase for long Set-Cookie headers.
*** lynx2-8-2.old/WWW/Library/Implementation/HTMLDTD.c Sun Jan 3 05:36:23 1999
--- lynx2-8-2/WWW/Library/Implementation/HTMLDTD.c Sun Jan 3 08:00:58 1999
***************
*** 1250,1256 ****
/* { "P" , p_attr, HTML_P_ATTRIBUTES, SGML_EMPTY }, */
#define T_P 0x0100, 0x0B04F,0x8FFFF,0x36680,0xB6FA7,0x80117,0x00001
/* { "PARAM" , param_attr, HTML_PARAM_ATTRIBUTES, SGML_EMPTY }, */
! #define T_PARAM 0x1000, 0x00000,0x00000,0x03000,0x17FFF,0x81777,0x00001
/* { "PLAINTEXT", gen_attr, HTML_GEN_ATTRIBUTES, SGML_LITTERAL }, */
#define T_PLAINTEXT 0x10000,0xFFFFF,0xFFFFF,0x90000,0x90000,0x3FFFF,0x00001
/* { "PRE" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED }, */
--- 1250,1256 ----
/* { "P" , p_attr, HTML_P_ATTRIBUTES, SGML_EMPTY }, */
#define T_P 0x0100, 0x0B04F,0x8FFFF,0x36680,0xB6FA7,0x80117,0x00001
/* { "PARAM" , param_attr, HTML_PARAM_ATTRIBUTES, SGML_EMPTY }, */
! #define T_PARAM 0x1000, 0x00000,0x00000,0x33500,0x37FFF,0x81560,0x00001
/* { "PLAINTEXT", gen_attr, HTML_GEN_ATTRIBUTES, SGML_LITTERAL }, */
#define T_PLAINTEXT 0x10000,0xFFFFF,0xFFFFF,0x90000,0x90000,0x3FFFF,0x00001
/* { "PRE" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED }, */
***************
*** 1299,1305 ****
/* { "TH" , td_attr, HTML_TD_ATTRIBUTES, SGML_EMPTY }, */
#define T_TH 0x0400, 0x0FBCF,0x0FFFF,0x00020,0xB7FB7,0x8CF5F,0x00001
/* { "THEAD" , tr_attr, HTML_TR_ATTRIBUTES, SGML_EMPTY }, */
! #define T_THEAD 0x0020, 0x00020,0x8FFFF,0x00880,0xB7FB7,0x8CF5F,0x00001
/* { "TITLE", gen_attr, HTML_GEN_ATTRIBUTES, SGML_RCDATA },
*/
#define T_TITLE 0x40000,0x00000,0x00000,0x50000,0x50000,0x0031F,0x00004
/* { "TR" , tr_attr, HTML_TR_ATTRIBUTES, SGML_EMPTY }, */
--- 1299,1305 ----
/* { "TH" , td_attr, HTML_TD_ATTRIBUTES, SGML_EMPTY }, */
#define T_TH 0x0400, 0x0FBCF,0x0FFFF,0x00020,0xB7FB7,0x8CF5F,0x00001
/* { "THEAD" , tr_attr, HTML_TR_ATTRIBUTES, SGML_EMPTY }, */
! #define T_THEAD 0x0020, 0x00020,0x8FFFF,0x00800,0xB7FB7,0x8CF5F,0x00001
/* { "TITLE", gen_attr, HTML_GEN_ATTRIBUTES, SGML_RCDATA },
*/
#define T_TITLE 0x40000,0x00000,0x00000,0x50000,0x50000,0x0031F,0x00004
/* { "TR" , tr_attr, HTML_TR_ATTRIBUTES, SGML_EMPTY }, */
*** lynx2-8-2.old/src/LYUtils.c Sun Jan 3 05:36:34 1999
--- lynx2-8-2/src/LYUtils.c Thu Jan 14 08:55:42 1999
***************
*** 1922,1928 ****
#else
/* draw the status bar in the STATUS style */
{
! int a=(strncmp(buffer, "Alert", 5) || !hashStyles[s_alert].name
? s_status : s_alert);
LynxChangeStyle (a, ABS_ON, 1);
addstr(buffer);
wbkgdset(stdscr,
--- 1922,1929 ----
#else
/* draw the status bar in the STATUS style */
{
! int a=(strncmp(buffer, ALERT_FORMAT, ALERT_PREFIX_LEN) ||
! !hashStyles[s_alert].name ? s_status : s_alert);
LynxChangeStyle (a, ABS_ON, 1);
addstr(buffer);
wbkgdset(stdscr,
***************
*** 2372,2379 ****
** returns PROXY_URL_TYPE. - FM
**
** If a colon is present but the string segment which
! ** precedes it is not being proxied, and we can rule
! ** out that what follows the colon is not a port field,
** it returns UNKNOWN_URL_TYPE. Otherwise, it returns
** 0 (not a URL). - FM
*/
--- 2373,2380 ----
** returns PROXY_URL_TYPE. - FM
**
** If a colon is present but the string segment which
! ** precedes it is not being proxied, and we can be sure
! ** that what follows the colon is not a port field,
** it returns UNKNOWN_URL_TYPE. Otherwise, it returns
** 0 (not a URL). - FM
*/
***************
*** 2407,2419 ****
return(PROXY_URL_TYPE);
}
FREE(cp2);
cp1++;
! if (isdigit((unsigned char)*cp1)) {
while (*cp1 && isdigit((unsigned char)*cp1))
cp1++;
if (*cp1 && !LYIsHtmlSep(*cp1))
return(UNKNOWN_URL_TYPE);
! }
}
return(0);
--- 2408,2428 ----
return(PROXY_URL_TYPE);
}
FREE(cp2);
+ #if defined (DOSPATH)
+ if (cp[1] == ':')
+ return(0); /* could be drive letter? - kw */
+ #endif
cp1++;
! if (!*cp) {
! return(0);
! } else if (isdigit((unsigned char)*cp1)) {
while (*cp1 && isdigit((unsigned char)*cp1))
cp1++;
if (*cp1 && !LYIsHtmlSep(*cp1))
return(UNKNOWN_URL_TYPE);
! } else {
! return(UNKNOWN_URL_TYPE);
! }
}
return(0);
***************
*** 2478,2486 ****
* Can't be a URL if it starts with a slash.
* So return immediately for this common case,
* also to avoid false positives if there was
! * a colon later in the string. - KW
*/
! if (LYIsHtmlSep(*cp))
return(0);
if (compare_type(cp, "news:", 5)) {
--- 2487,2496 ----
* Can't be a URL if it starts with a slash.
* So return immediately for this common case,
* also to avoid false positives if there was
! * a colon later in the string. Also can't be
! * a URL if it starts with a colon. - KW
*/
! if (*cp == ':' || LYIsHtmlSep(*cp))
return(0);
if (compare_type(cp, "news:", 5)) {
*** lynx2-8-2.old/src/GridText.c Thu Jan 14 09:16:46 1999
--- lynx2-8-2/src/GridText.c Thu Jan 14 09:44:51 1999
***************
*** 3082,3087 ****
--- 3082,3088 ----
keypad_mode == LINKS_AND_FORM_FIELDS_ARE_NUMBERED) &&
(text->hiddenlinkflag != HIDDENLINKS_MERGE ||
(LYNoISMAPifUSEMAP &&
+ !(text->node_anchor && text->node_anchor->bookmark) &&
HTAnchor_isISMAPScript(
HTAnchor_followMainLink((HTAnchor *)a->anchor)))));
HTLine *last = text->last_line;
***************
*** 8220,8225 ****
--- 8221,8228 ----
FREE(copied_name_used);
if (Boundary) {
HTSprintf(&query, "\r\n--%s--\r\n", Boundary);
+ } else if (!query) {
+ StrAllocCopy(query, "");
}
FREE(previous_blanks);
*** lynx2-8-2.old/src/HTML.c Sun Jan 3 05:36:27 1999
--- lynx2-8-2/src/HTML.c Sun Jan 3 06:39:42 1999
***************
*** 762,771 ****
if (url_type == LYNXIMGMAP_URL_TYPE) {
/*
! * These have a are non-standard form, basically
* strip the prefix or the code below would insert
* a nonsense host into the pseudo URL. These
! * should never occur where they would used for
* resolution of relative URLs anyway. We can
* also strip the #map part. - kw
*/
--- 762,771 ----
if (url_type == LYNXIMGMAP_URL_TYPE) {
/*
! * These have a non-standard form, basically
* strip the prefix or the code below would insert
* a nonsense host into the pseudo URL. These
! * should never occur where they would be used for
* resolution of relative URLs anyway. We can
* also strip the #map part. - kw
*/
*** lynx2-8-2.old/src/LYCurses.c Sat Dec 12 22:10:36 1998
--- lynx2-8-2/src/LYCurses.c Sun Jan 3 06:43:40 1999
***************
*** 333,340 ****
{
/* ABS_OFF is the same as STACK_OFF for the moment */
case STACK_OFF:
! if (last_ptr)
! LYAttrset(win,last_styles[--last_ptr],-1);
else
LYAttrset(win,A_NORMAL,-1);
return;
--- 333,342 ----
{
/* ABS_OFF is the same as STACK_OFF for the moment */
case STACK_OFF:
! if (last_ptr) {
! int last_attr = last_styles[--last_ptr];
! LYAttrset(win,last_attr,last_attr);
! }
else
LYAttrset(win,A_NORMAL,-1);
return;
*** lynx2-8-2.old/src/LYDownload.c Thu Jan 14 10:26:24 1999
--- lynx2-8-2/src/LYDownload.c Sun Jan 3 06:57:25 1999
***************
*** 480,486 ****
/*
* Get a suggested filename.
*/
- StrAllocCopy(downloaded_url, *newfile);
StrAllocCopy(sug_filename, *newfile);
change_sug_filename(sug_filename);
--- 480,485 ----
***************
*** 489,494 ****
--- 488,494 ----
HTAlert(CANNOT_OPEN_TEMP);
return(-1);
}
+ StrAllocCopy(downloaded_url, *newfile);
LYLocalFileToURL(newfile, tempfile);
LYstrncpy(LYValidDownloadFile,
***************
*** 503,508 ****
--- 503,509 ----
fprintf(fp0, "<em>%s</em> %s\n",
gettext("Downloaded link:"),
downloaded_url);
+ FREE(downloaded_url);
fprintf(fp0, "<em>%s</em> %s\n",
gettext("Suggested file name:"),
***************
*** 554,560 ****
* Free off temp copy.
*/
FREE(sug_filename);
- FREE(downloaded_url);
return(0);
}
--- 555,560 ----
*** lynx2-8-2.old/src/LYMain.c Sun Jan 3 05:36:29 1999
--- lynx2-8-2/src/LYMain.c Sun Jan 3 07:09:57 1999
***************
*** 752,757 ****
--- 752,758 ----
StrAllocCopy(lynx_version_putenv_command, "LYNX_VERSION=");
StrAllocCat(lynx_version_putenv_command, LYNX_VERSION);
(void) putenv(lynx_version_putenv_command);
+ FREE(lynx_version_putenv_command);
#endif /* VMS */
if ((cp = getenv("LYNX_TEMP_SPACE")) != NULL)
*** lynx2-8-2.old/src/LYTraversal.c Wed Nov 18 13:23:55 1998
--- lynx2-8-2/src/LYTraversal.c Sun Jan 3 07:23:00 1999
***************
*** 2,7 ****
--- 2,9 ----
#include <LYGlobalDefs.h>
#include <LYUtils.h>
#include <LYSignal.h>
+ #include <LYClean.h>
+ #include <LYCurses.h>
#include <LYTraversal.h>
#include <LYexit.h>
***************
*** 9,14 ****
--- 11,35 ----
/* routines to handle special traversal feature */
+ PRIVATE void final_perror ARGS2(CONST char *,msg, BOOLEAN, clean_flag)
+ {
+ int saved_errno = errno;
+ if (LYCursesON) {
+ if (clean_flag)
+ cleanup();
+ else
+ stop_curses();
+ }
+ errno = saved_errno;
+ perror(msg);
+ }
+
+ PRIVATE void exit_with_perror ARGS1(CONST char *,msg)
+ {
+ final_perror(msg, TRUE);
+ exit_immediately(-1);
+ }
+
PUBLIC BOOLEAN lookup ARGS1(char *,target)
{
FILE *ifp;
***************
*** 16,23 ****
if ((ifp = fopen(TRAVERSE_FILE,"r")) == NULL) {
if ((ifp = LYNewTxtFile(TRAVERSE_FILE)) == NULL) {
! perror(CANNOT_OPEN_TRAV_FILE);
! exit_immediately(-1);
} else {
fclose(ifp);
return(FALSE);
--- 37,43 ----
if ((ifp = fopen(TRAVERSE_FILE,"r")) == NULL) {
if ((ifp = LYNewTxtFile(TRAVERSE_FILE)) == NULL) {
! exit_with_perror(CANNOT_OPEN_TRAV_FILE);
} else {
fclose(ifp);
return(FALSE);
***************
*** 43,50 ****
FILE *ifp;
if ((ifp = LYAppendToTxtFile(TRAVERSE_FILE)) == NULL) {
! perror(CANNOT_OPEN_TRAV_FILE);
! exit_immediately(-1);
}
fprintf(ifp,"%s\n",target);
--- 63,69 ----
FILE *ifp;
if ((ifp = LYAppendToTxtFile(TRAVERSE_FILE)) == NULL) {
! exit_with_perror(CANNOT_OPEN_TRAV_FILE);
}
fprintf(ifp,"%s\n",target);
***************
*** 58,65 ****
FILE *ifp;
if ((ifp = LYAppendToTxtFile(TRAVERSE_FOUND_FILE)) == NULL) {
! perror(CANNOT_OPEN_TRAF_FILE);
! exit_immediately(-1);
}
fprintf(ifp,"%s\t%s\n",fname, prev_link_name);
--- 77,83 ----
FILE *ifp;
if ((ifp = LYAppendToTxtFile(TRAVERSE_FOUND_FILE)) == NULL) {
! exit_with_perror(CANNOT_OPEN_TRAF_FILE);
}
fprintf(ifp,"%s\t%s\n",fname, prev_link_name);
***************
*** 76,82 ****
return;
if ((ifp = LYAppendToTxtFile(TRAVERSE_FILE)) == NULL) {
! perror(CANNOT_OPEN_TRAV_FILE);
return;
}
--- 94,100 ----
return;
if ((ifp = LYAppendToTxtFile(TRAVERSE_FILE)) == NULL) {
! final_perror(CANNOT_OPEN_TRAV_FILE, FALSE);
return;
}
***************
*** 97,104 ****
FILE *ifp;
if ((ifp = LYAppendToTxtFile(TRAVERSE_REJECT_FILE)) == NULL) {
! perror(CANNOT_OPEN_REJ_FILE);
! exit_immediately(-1);
}
fprintf(ifp,"%s\n",target);
--- 115,121 ----
FILE *ifp;
if ((ifp = LYAppendToTxtFile(TRAVERSE_REJECT_FILE)) == NULL) {
! exit_with_perror(CANNOT_OPEN_REJ_FILE);
}
fprintf(ifp,"%s\n",target);
--- lynx2-8-2.old/WWW/Library/Implementation/HTMIME.c Thu Dec 3 12:28:20 1998
+++ lynx2-8-2/WWW/Library/Implementation/HTMIME.c Thu Jan 14 10:51:46 1999
@@ -105,7 +105,7 @@
/* TRANSPARENT and IGNORE are defined as stg else in _WINDOWS */
} MIME_state;
-#define VALUE_SIZE 1024 /* @@@@@@@ Arbitrary? */
+#define VALUE_SIZE 5120 /* @@@@@@@ Arbitrary? */
struct _HTStream {
CONST HTStreamClass * isa;
*** lynx2-8-2.old/LYMessages_en.h Thu Dec 24 05:27:23 1998
--- lynx2-8-2/LYMessages_en.h Mon Jan 4 21:41:09 1999
***************
*** 21,26 ****
--- 21,27 ----
* the header inclusion statement in your userdefs.h to include
* one of those with a different name.
*/
+ #define ALERT_FORMAT gettext("Alert!: %s")
#define WELCOME_MSG gettext("Welcome")
#define REALLY_QUIT_Y gettext("Are you sure you want to quit? [Y] ")
#define REALLY_QUIT_N gettext("Are you sure you want to quit? [N] ")
*** lynx2-8-2.old/src/HTAlert.h Wed Oct 14 07:23:56 1998
--- lynx2-8-2/src/HTAlert.h Thu Jan 14 11:23:30 1999
***************
*** 10,15 ****
--- 10,17 ----
#include <HTUtils.h>
+ #define ALERT_PREFIX_LEN 5
+
/* Display a message and get the input
**
** On entry,
*** lynx2-8-2.old/fixtext.sh Tue Nov 10 13:47:38 1998
--- lynx2-8-2/fixtext.sh Thu Jan 14 11:12:53 1999
***************
*** 6,9 ****
--- 6,10 ----
sed -e 's/")/");/' \
-e 's/^#define[ ]*\([^ ]*\)[ ]*gettext/char *\1 = gettext/' \
+ -e 's,^#define[ ]*\([^ ]*\)[ ]*\\,/* #define \1 */char *\1 =
\\,' \
$*
*** lynx2-8-2.old/src/LYCharSets.c Sat Nov 21 10:32:10 1998
--- lynx2-8-2/src/LYCharSets.c Thu Jan 14 11:36:16 1999
***************
*** 77,83 ****
"\313", /* capital E, dieresis or umlaut mark (Ë) - Euml */
"\315", /* capital I, acute accent (Í) - Iacute */
"\316", /* capital I, circumflex accent (Î) - Icirc */
! "\314", /* capital I, grave accent (È) - Igrave */
"\317", /* capital I, dieresis or umlaut mark (Ï) - Iuml */
"\321", /* capital N, tilde (Ñ) - Ntilde */
"\323", /* capital O, acute accent (Ó) - Oacute */
--- 77,83 ----
"\313", /* capital E, dieresis or umlaut mark (Ë) - Euml */
"\315", /* capital I, acute accent (Í) - Iacute */
"\316", /* capital I, circumflex accent (Î) - Icirc */
! "\314", /* capital I, grave accent (Ì) - Igrave */
"\317", /* capital I, dieresis or umlaut mark (Ï) - Iuml */
"\321", /* capital N, tilde (Ñ) - Ntilde */
"\323", /* capital O, acute accent (Ó) - Oacute */
- lynx-dev Mixed bag of patches for 2.8.1dev.13,
Klaus Weide <=