diff options
-rw-r--r-- | CHANGES.configure | 4 | ||||
-rw-r--r-- | CHANGES.new | 18 | ||||
-rw-r--r-- | WWW/Library/Implementation/HTMLDTD.c | 4 | ||||
-rw-r--r-- | WWW/Library/Implementation/SGML.c | 4 | ||||
-rw-r--r-- | aclocal.m4 | 2 | ||||
-rw-r--r-- | config.hin | 1 | ||||
-rwxr-xr-x | configure | 2 | ||||
-rw-r--r-- | lynx_help/Lynx_users_guide.html | 2 | ||||
-rw-r--r-- | lynx_help/keystroke_commands/option_help.html | 2 | ||||
-rw-r--r-- | src/LYLocal.c | 11 | ||||
-rw-r--r-- | src/LYStrings.c | 17 | ||||
-rw-r--r-- | src/LYUtils.c | 97 |
12 files changed, 129 insertions, 35 deletions
diff --git a/CHANGES.configure b/CHANGES.configure index 3ffe4102..a9261de1 100644 --- a/CHANGES.configure +++ b/CHANGES.configure @@ -1,3 +1,7 @@ +97-09-12 +-------- +* Correct mismatch/omission of HAVE_TYPE_UNION_WAIT symbol from + change for wait vs waitpid. - TD 97-09-10 -------- * Modify CF_WITH_PATH to allow substitution of --libdir and other diff --git a/CHANGES.new b/CHANGES.new index 8a18e4d9..6a2720ed 100644 --- a/CHANGES.new +++ b/CHANGES.new @@ -10,8 +10,24 @@ README.configure), and miscellaneous other changes. Note that the 2.7 -> 2.7.1 changes (which are listed at the beginning of the current CHANGES file) are duplicated here. - KW] +97-09-15 +* Recover from bad sequence "<=" in SGML.c by outputting those characters + litterally. - KW +* Try again after interrupted waitpid() in LYExecv(). - JED +* Some tweaks in new DTD, some doc typo corrections. - KW +97-09-13 +* Changes in LYConvertToURL() for better handling of the case when the + pathname of the current directory (when Lynx is invoked) contains + unusual, URL-reserved characters (especially '#') and we test for + a relative but URL-encoded path. (no change for VMS) - KW +97-09-13 +* Changes in LYStrings.c to enable keypad() processing for non-NCURSES + if HAVE_KEYPAD is defined. - KW +97-09-12 +* Correct mismatch/omission of HAVE_TYPE_UNION_WAIT symbol from + change for wait vs waitpid. - TD 97-09-11 -* Tweaks in HTMLGen.c for display of spacial characters and line breaking +* Tweaks in HTMLGen.c for display of special characters and line breaking with -preparsed. - KW * Got rid of use of underlining together with reverse for non-current links for (n)curses if color is not used. - KW diff --git a/WWW/Library/Implementation/HTMLDTD.c b/WWW/Library/Implementation/HTMLDTD.c index 7b5c0279..7eb1d86b 100644 --- a/WWW/Library/Implementation/HTMLDTD.c +++ b/WWW/Library/Implementation/HTMLDTD.c @@ -1326,7 +1326,7 @@ static attr ulist_attr[] = { /* UL attributes */ /* { "FN" , fn_attr, HTML_FN_ATTRIBUTES, SGML_MIXED }, */ #define T_FN 0x0200, 0x8FBCF,0x8FFFF,0xB6680,0xB7EBF,0x8114F,0x00000 /* { "FONT" , font_attr, HTML_FONT_ATTRIBUTES, SGML_EMPTY }, */ -#define T_FONT 0x0001, 0x8B04F,0x8FFFF,0xA778F,0xF7FBF,0x00001,0x00004 +#define T_FONT 0x0001, 0x8B04F,0x8FFFF,0xB778F,0xF7FBF,0x00001,0x00004 /* { "FORM" , form_attr, HTML_FORM_ATTRIBUTES, SGML_EMPTY }, */ #define T_FORM 0x0080, 0x0FF6F,0x0FF7F,0x36E07,0x33F07,0x88DFF,0x00000 /* { "FRAME" , frame_attr, HTML_FRAME_ATTRIBUTES, SGML_EMPTY }, */ @@ -1417,7 +1417,7 @@ static attr ulist_attr[] = { /* UL attributes */ /* { "SAMP" , gen_attr, HTML_GEN_ATTRIBUTES, SGML_MIXED }, */ #define T_SAMP 0x0002, 0x8B04F,0x8FFFF,0xA778F,0xF7FBF,0x00002,0x00000 /* { "SCRIPT" , script_attr, HTML_SCRIPT_ATTRIBUTES, SGML_LITTERAL }, */ -#define T_SCRIPT 0x2000, 0x00000,0x00000,0x57F8F,0x57FFF,0x87F5F,0x00000 +#define T_SCRIPT 0x2000, 0x00000,0x00000,0x77F9F,0x77FFF,0x87F5F,0x00000 /* { "SELECT" , select_attr, HTML_SELECT_ATTRIBUTES, SGML_MIXED }, */ #define T_SELECT 0x0040, 0x08000,0x08000,0x03FAF,0x13FBF,0x80F5F,0x00000 #define T_SHY 0x1000, 0x00000,0x00000,0x3779F,0x77FBF,0x8101F,0x00001 diff --git a/WWW/Library/Implementation/SGML.c b/WWW/Library/Implementation/SGML.c index 5cd5d871..0ec49ff0 100644 --- a/WWW/Library/Implementation/SGML.c +++ b/WWW/Library/Implementation/SGML.c @@ -1720,9 +1720,9 @@ top1: context->first_bracket = FALSE; HTChunkPutc(string, c); break; - } else if (WHITE(c) && !string->size) { /* <WHITE */ + } else if (!string->size && (WHITE(c) || c == '=')) {/* <WHITE or <= */ /* - ** Recover the '<' and WHITE character. - FM + ** Recover the '<' and WHITE or '=' character. - FM, kw */ context->state = S_text; PUTC('<'); diff --git a/aclocal.m4 b/aclocal.m4 index 7d03dba5..700186db 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1024,7 +1024,7 @@ AC_CACHE_VAL(cf_cv_type_unionwait,[ [cf_cv_type_unionwait=yes], [cf_cv_type_unionwait=no])]) AC_MSG_RESULT($cf_cv_type_unionwait) -test $cf_cv_type_unionwait = yes && AC_DEFINE(HAVE_TYPE_UNIONWAIT) +test $cf_cv_type_unionwait = yes && AC_DEFINE(HAVE_TYPE_UNION_WAIT) ])dnl dnl --------------------------------------------------------------------------- AC_DEFUN([CF_UTMP], diff --git a/config.hin b/config.hin index c1c1d699..decb8a91 100644 --- a/config.hin +++ b/config.hin @@ -39,6 +39,7 @@ #undef HAVE_SYS_NDIR_H /* defined by AC_HEADER_DIRENT */ #undef HAVE_TERMIOS_H /* have <termios.h> */ #undef HAVE_TTYTYPE +#undef HAVE_TYPE_UNION_WAIT /* CF_UNION_WAIT */ #undef HAVE_UNISTD_H /* have <unistd.h> */ #undef HAVE_UTMP #undef IGNORE_CTRL_C /* FIXME: make tests? */ diff --git a/configure b/configure index f6377489..3240af4b 100755 --- a/configure +++ b/configure @@ -5224,7 +5224,7 @@ fi echo "$ac_t""$cf_cv_type_unionwait" 1>&6 test $cf_cv_type_unionwait = yes && cat >> confdefs.h <<\EOF -#define HAVE_TYPE_UNIONWAIT 1 +#define HAVE_TYPE_UNION_WAIT 1 EOF diff --git a/lynx_help/Lynx_users_guide.html b/lynx_help/Lynx_users_guide.html index efdf884e..76ec18ff 100644 --- a/lynx_help/Lynx_users_guide.html +++ b/lynx_help/Lynx_users_guide.html @@ -614,7 +614,7 @@ return to Lynx or the '<em>></em>' command to save the options to a an HTTP server to indicate what it is) but you know by some means that you have the matching display character set selected. Should be OFF when an Asian (CJK) set is selected but the document - is ISO-8850-1. The setting also can be toggled via the RAW_TOGGLE + is ISO-8859-1. The setting also can be toggled via the RAW_TOGGLE command, normally mapped to '<em>@</em>', and at startup via the <em>-raw</em> switch. diff --git a/lynx_help/keystroke_commands/option_help.html b/lynx_help/keystroke_commands/option_help.html index 8a1d8ab0..c54b52e0 100644 --- a/lynx_help/keystroke_commands/option_help.html +++ b/lynx_help/keystroke_commands/option_help.html @@ -107,7 +107,7 @@ it is) but you know by some means that you have the matching display character set selected. Should be OFF when an Asian (CJK) set is selected but the - document is ISO-8850-1. The setting also can be + document is ISO-8859-1. The setting also can be toggled via the RAW_TOGGLE command, normally mapped to '@', and at startup via the -raw switch. diff --git a/src/LYLocal.c b/src/LYLocal.c index 2865603a..98f29ce4 100644 --- a/src/LYLocal.c +++ b/src/LYLocal.c @@ -2228,7 +2228,16 @@ PUBLIC int LYExecv ARGS3( while (wait(&wstatus) != pid) ; /* do nothing */ #else - waitpid(pid, &wstatus, 0); /* wait for child */ + while (-1 == waitpid (pid, &wstatus, 0)) /* wait for child */ + { +#ifdef EINTR + if (errno == EINTR) continue; +#endif +#ifdef ERESTARTSYS + if (errno == ERESTARTSYS) continue; +#endif + break; + } #endif if (WEXITSTATUS(wstatus) != 0 || WTERMSIG(wstatus) > 0) { /* error return */ diff --git a/src/LYStrings.c b/src/LYStrings.c index 03bef9af..aac67203 100644 --- a/src/LYStrings.c +++ b/src/LYStrings.c @@ -207,15 +207,19 @@ PUBLIC int LYmbcsstrlen ARGS2( #define GetChar() wgetch(stdscr) #endif -#if !defined(GetChar) -#ifdef VMS +#if !defined(GetChar) && defined(VMS) #define GetChar() ttgetc() +#endif + +#if !defined(GetChar) +#ifdef HAVE_KEYPAD +#define GetChar getch #else #ifndef USE_GETCHAR #define USE_GETCHAR #endif /* !USE_GETCHAR */ #define GetChar() getchar() /* used to be "getc(stdin)" and "getch()" */ -#endif /* VMS */ +#endif /* HAVE_KEYPAD */ #endif /* !defined(GetChar) */ #if defined(NCURSES) @@ -281,7 +285,7 @@ PUBLIC int LYgetch NOARGS { int a, b, c, d = -1; -#if defined(IGNORE_CTRL_C) || defined(USE_GETCHAR) +#if defined(IGNORE_CTRL_C) || defined(USE_GETCHAR) || !defined(NCURSES) re_read: #endif /* IGNORE_CTRL_C || USE_GETCHAR */ #ifndef USE_SLANG @@ -346,6 +350,11 @@ re_read: goto re_read; } #endif /* IGNORE_CTRL_C */ +#if !defined(USE_GETCHAR) && !defined(VMS) && !defined(NCURSES) + if (c == ERR && errno == EINTR) /* may have been handled signal - kw */ + goto re_read; +#endif /* USE_GETCHAR */ + cleanup(); #ifndef NOSIGHUP (void) signal(SIGHUP, SIG_DFL); diff --git a/src/LYUtils.c b/src/LYUtils.c index d95a0635..388d6adb 100644 --- a/src/LYUtils.c +++ b/src/LYUtils.c @@ -3895,6 +3895,7 @@ have_VMS_URL: * Create a full path to the current default directory. */ char curdir[DIRNAMESIZE]; + char *temp2 = NULL; BOOL is_local = FALSE; #if HAVE_GETCWD getcwd (curdir, DIRNAMESIZE); @@ -3910,13 +3911,16 @@ have_VMS_URL: StrAllocCat(temp, "/"); StrAllocCat(temp, old_string); #else - if (old_string[1] != ':' && old_string[1] != '|') - { - StrAllocCopy(temp, HTDOS_wwwName(curdir)); - if(curdir[strlen(curdir)-1] != '/') - StrAllocCat(temp, "/"); - StrAllocCat(temp, old_string); - } else StrAllocCopy(temp, old_string); + if (old_string[1] != ':' && old_string[1] != '|') { + StrAllocCopy(temp, HTDOS_wwwName(curdir)); + if(curdir[strlen(curdir)-1] != '/') + StrAllocCat(temp, "/"); + LYstrncpy(curdir, temp, (DIRNAMESIZE - 1)); + StrAllocCat(temp, old_string); + } else { + curdir[0] = '\0'; + StrAllocCopy(temp, old_string); + } #endif /* DOSPATH */ LYTrimRelFromAbsPath(temp); if (TRACE) { @@ -3936,33 +3940,82 @@ have_VMS_URL: } is_local = TRUE; } else { - if ((fragment = strchr(temp, '#')) != NULL) - *fragment = '\0'; - StrAllocCopy(cp, temp); - HTUnEscape(cp); - if ((stat(cp, &st) > -1) || - (fptemp = fopen(cp, "r")) != NULL) { + char *cp2 = NULL; + StrAllocCopy(temp2, curdir); + if (curdir[0] != '\0' && curdir[strlen(curdir)-1] != '/') + StrAllocCat(temp2, "/"); + StrAllocCopy(cp, old_string); + if ((fragment = strchr(cp, '#')) != NULL) + *fragment = '\0'; /* keep as pointer into cp string */ + HTUnEscape(cp); /* unescape given path without fragment */ + StrAllocCat(temp2, cp); /* append to current dir */ + StrAllocCopy(cp2, temp2); /* keep a copy in cp2 */ + LYTrimRelFromAbsPath(temp2); + + if (strcmp(temp2, temp) != 0 && + ((stat(temp2, &st) > -1) || + (fptemp = fopen(temp2, "r")) != NULL)) { /* * It is a subdirectory or file on the local system * with escaped characters and/or a fragment to be * appended to the URL. - FM */ - if (fragment != NULL) { - *fragment = '#'; - fragment = NULL; + + FREE(temp); + if (strcmp(cp2, temp2) == 0) { + /* + * LYTrimRelFromAbsPath did nothing, use + * old_string as given. - kw + */ + temp = HTEscape(curdir, URL_PATH); + if (curdir[0] != '\0' && curdir[strlen(curdir)-1] != '/') + StrAllocCat(temp, "/"); + StrAllocCat(temp, old_string); + } else { + temp = HTEscape(temp2, URL_PATH); + if (fragment != NULL) { + *fragment = '#'; + StrAllocCat(temp, fragment); + } } + StrAllocCat(*AllocatedString, temp); if (TRACE) { fprintf(stderr, "Converted '%s' to '%s'\n", old_string, *AllocatedString); } is_local = TRUE; + + } else if (strchr(curdir, '#') != NULL || + strchr(curdir, '%') != NULL) { + /* + * If PWD has some unusual characters, construct a + * filename in temp where those are escaped. This + * is mostly to prevent this function from returning + * with some weird URL if the LYExpandHostForURL tests + * further down fail. - kw + */ + FREE(temp); + if (strcmp(cp2, temp2) == 0) { + /* + * LYTrimRelFromAbsPath did nothing, use + * old_string as given. - kw + */ + temp = HTEscape(curdir, URL_PATH); + if (curdir[0] != '\0' && curdir[strlen(curdir)-1] != '/') + StrAllocCat(temp, "/"); + StrAllocCat(temp, old_string); + } else { + temp = HTEscape(temp2, URL_PATH); + if (fragment != NULL) { + *fragment = '#'; + StrAllocCat(temp, fragment); + } + } } + FREE(cp); - if (fragment != NULL) { - *fragment = '#'; - fragment = NULL; - } + FREE(cp2); } if (is_local == FALSE) { /* @@ -3971,7 +4024,8 @@ have_VMS_URL: * the scheme with "http://" as the default. */ if (TRACE) { - fprintf(stderr, "Can't stat() or fopen() '%s'\n", temp); + fprintf(stderr, "Can't stat() or fopen() '%s'\n", + temp2 ? temp2 : temp); } if (LYExpandHostForURL((char **)&old_string, URLDomainPrefixes, @@ -3990,6 +4044,7 @@ have_VMS_URL: } } FREE(temp); + FREE(temp2); if (fptemp) { fclose(fptemp); fptemp = NULL; |