Commit 8c980e71 authored by Axel Beckert's avatar Axel Beckert

Imported Upstream version 2.8.7dev4

parent 563c9624
Changes since Lynx 2.8 release
===============================================================================
2006-11-14 (2.8.7dev.4)
* use RFC-822 encoding for filenames passed via file-upload forms (Debian
#181165) -TD
* correct check of return-value from FindLeadingTilde() in dev.3 cleanup of
"~" parsing -TD
2006-11-12 (2.8.7dev.3)
* change the default HELPFILE to the 2.8.6 release directory since the
page on subir.com contains obsolete information -TD
* eliminate references to obsolete url
http://www.hippo.ru/%7Ehvv/
using the 2.8.6 release directory instead, e.g.,
http://lynx.isc.org/release/lynx2-8-6/lynx_help/
This is useful mainly for platforms which do not use the configure script -TD
* update et.po from
http://www.iro.umontreal.ca/translation/maint/lynx/
* modify CF_PDCURSES_X11 to use xcurses-config script if available -TD
* improve parsing for embedded "~", ensuring that it is interpreted as a
user's home directory only if it follows a pathname separator (Debian
#388622) -TD
* ensure that PERSONAL_EXTENSION_MAP and PERSONAL_MAILCAP are absolute
pathnames, performing tilde expansion as needed. Pathnames that are not
given in absolute form will be sought under the user's home directory as if
they began with "~/" -TD
2006-11-06 (2.8.7dev.2)
* ensure that the configured values for PERSONAL_EXTENSION_MAP and
PERSONAL_MAILCAP are absolute pathnames -TD
* ensure that the configured values for GLOBAL_EXTENSION_MAP and GLOBAL_MAILCAP
are absolute pathnames -TD
* modify logic for reading PERSONAL_EXTENSION_MAP and PERSONAL_MAILCAP to
ensure that they are files that are controlled only by the user. The
default values for these allow lynx to read configuration information
......
......@@ -4,7 +4,7 @@ dnl and Jim Spath <jspath@mail.bcpl.lib.md.us>
dnl and Philippe De Muyter <phdm@macqel.be>
dnl
dnl Created: 1997/1/28
dnl Updated: 2006/10/29
dnl Updated: 2006/11/12
dnl
dnl The autoconf used in Lynx development is GNU autoconf 2.13 or 2.52, patched
dnl by Thomas Dickey. See your local GNU archives, and this URL:
......@@ -3374,11 +3374,23 @@ case ".[$]$1" in #(vi
esac
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_PDCURSES_X11 version: 6 updated: 2002/10/27 18:21:42
dnl CF_PDCURSES_X11 version: 7 updated: 2006/11/12 17:31:59
dnl ---------------
dnl Configure for PDCurses' X11 library
AC_DEFUN([CF_PDCURSES_X11],[
AC_REQUIRE([CF_X_ATHENA])
AC_PATH_PROGS(XCURSES_CONFIG,xcurses-config,none)
if test "$XCURSES_CONFIG" != none ; then
CPPFLAGS="`$XCURSES_CONFIG --cflags` $CPPFLAGS"
LIBS="`$XCURSES_CONFIG --libs` $LIBS"
cf_cv_lib_XCurses=yes
else
LDFLAGS="$LDFLAGS $X_LIBS"
CF_CHECK_CFLAGS($X_CFLAGS)
AC_CHECK_LIB(X11,XOpenDisplay,
......@@ -3393,6 +3405,9 @@ char *XCursesProgramName = "test";
[cf_cv_lib_XCurses=yes],
[cf_cv_lib_XCurses=no])
])
fi
if test $cf_cv_lib_XCurses = yes ; then
AC_DEFINE(UNIX)
AC_DEFINE(XCURSES)
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -25,7 +25,7 @@ dnl ---------------------------------------------------------------------------
dnl
dnl ask PRCS to plug-in the project-version for the configure-script.
dnl $Format: "AC_REVISION($ProjectVersion$)"$
AC_REVISION(2.8.7dev.2)
AC_REVISION(2.8.7dev.4)
# Save the original $CFLAGS so we can distinguish whether the user set those
# in the environment, or whether autoconf added -O and -g options:
......@@ -57,7 +57,7 @@ AC_ARG_WITH(system-type,
PACKAGE=lynx
dnl ask PRCS to plug-in the project-version for the packages.
# $Format: "VERSION=$ProjectVersion$"$
VERSION=2.8.7dev.2
VERSION=2.8.7dev.4
AC_SUBST(PACKAGE)
AC_SUBST(VERSION)
AC_SUBST(DESTDIR)
......@@ -781,13 +781,10 @@ CF_ARG_ENABLE(htmlized-cfg,
AC_MSG_RESULT($use_exp_htmlized_cfg)
LYNXCFG_MAKE=''
LYNXCFG_URL=''
if test $use_exp_htmlized_cfg = no ; then
LYNXCFG_MAKE='#'
LYNXCFG_URL='http://www.hippo.ru/%7Ehvv/'
fi
AC_SUBST(LYNXCFG_MAKE)
AC_SUBST(LYNXCFG_URL)
### check for ipv6 support
AC_MSG_CHECKING([whether to enable ipv6])
......
......@@ -3,10 +3,10 @@
# or Lynx_Dir:lynx.cfg (VMS)
#
# $Format: "#PRCS LYNX_VERSION \"$ProjectVersion$\""$
#PRCS LYNX_VERSION "2.8.7dev.2"
#PRCS LYNX_VERSION "2.8.7dev.4"
#
# $Format: "#PRCS LYNX_DATE \"$ProjectDate$\""$
#PRCS LYNX_DATE "Mon, 06 Nov 2006 17:14:13 -0800"
#PRCS LYNX_DATE "Tue, 14 Nov 2006 17:12:30 -0800"
#
# Definition pairs are of the form VARIABLE:DEFINITION
# NO spaces are allowed between the pair items.
......@@ -112,10 +112,10 @@ STARTFILE:http://lynx.isc.org/
# for this distribution (use SHELL syntax including the device
# on VMS systems).
# The default HELPFILE is:
# http://www.subir.com/lynx/lynx_help/lynx_help_main.html
# http://lynx.isc.org/release/lynx2-8-6/lynx_help/lynx_help_main.html
# This should be changed to the local path.
#
HELPFILE:http://www.subir.com/lynx/lynx_help/lynx_help_main.html
HELPFILE:http://lynx.isc.org/release/lynx2-8-6/lynx_help/lynx_help_main.html
.ex
#HELPFILE:file://localhost/PATH_TO/lynx_help/lynx_help_main.html
......
......@@ -3054,8 +3054,8 @@ from your local add-on configuration file. It is really cool to read
lynx.cfg with its comments for hundreds of options,
most of them commented out because they are built-in defaults.
You may visit an index of options:
<a href="http://www.hippo.ru/%7Ehvv/lynxcfg_toc.html">by category</a> or
<a href="http://www.hippo.ru/%7Ehvv/lynxcfg_toc.html#alphatoc">by alphabet</a>.
<a href="http://lynx.isc.org/release/lynx2-8-6/lynx_help/cattoc.html">by category</a> or
<a href="http://lynx.isc.org/release/lynx2-8-6/lynx_help/alphatoc.html">by alphabet</a>.
<p>To view your current configuration derived from lynx.cfg and any
included configuration files, press <em>'g'</em> and type in
......
......@@ -313,12 +313,14 @@ install-doc : $(DOCDIR) $(HELPDIR)
# So we limit sed delimiters to '!' and '%', depending on the expected text.
FIX_SED = tr '=' '"'
LYNXCFG_URL='http://lynx.isc.org/release/lynx2-8-6/lynx_help/'
help_files.sed : makefile $(srcdir)/lynx_help/help_files.txt
@echo Constructing sed-script $@
@-rm -f $@ help_files.tmp
@cat $(srcdir)/lynx_help/help_files.txt > help_files.tmp
@LYNXCFG_MAKE@ @echo 's!http://www.hippo.ru/%7Ehvv/lynxcfg_toc.html#alphatoc!alphatoc.html!g' >> help_files.tmp
@LYNXCFG_MAKE@ @echo 's!http://www.hippo.ru/%7Ehvv/lynxcfg_toc.html!cattoc.html!g' >> help_files.tmp
@LYNXCFG_MAKE@ @echo 's!$(LYNXCFG_URL)alphatoc.html!alphatoc.html!g' >> help_files.tmp
@LYNXCFG_MAKE@ @echo 's!$(LYNXCFG_URL)cattoc.html!cattoc.html!g' >> help_files.tmp
@LYNXCFG_MAKE@ @echo 's!alphatoc\.html!alphatoc.html$(COMPRESS_EXT)!g' >> help_files.tmp
@LYNXCFG_MAKE@ @echo 's!cattoc\.html!cattoc.html$(COMPRESS_EXT)!g' >> help_files.tmp
@LYNXCFG_MAKE@ @echo 's!body\.html!body.html$(COMPRESS_EXT)!g' >> help_files.tmp
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -11422,11 +11422,17 @@ int HText_SubmitForm(FormInfo * submit_item, DocInfo *doc, char *link_name,
StrAllocCopy(escaped1, my_data[anchor_count].name);
} else if (Boundary) {
const char *t = guess_content_type(val_used);
char *copied_fname = NULL;
StrAllocCopy(escaped1, "Content-Disposition: form-data");
HTSprintf(&escaped1, "; name=\"%s\"",
my_data[anchor_count].name);
HTSprintf(&escaped1, "; filename=\"%s\"", val_used);
StrAllocCopy(copied_fname, val_used);
HTMake822Word(&copied_fname, FALSE);
HTSprintf(&escaped1, "; filename=\"%s\"", copied_fname);
FREE(copied_fname);
/* Should we take into account the encoding? */
HTSprintf(&escaped1, "\r\nContent-Type: %s", t);
if (my_data[anchor_count].quote == QUOTE_BASE64)
......
......@@ -161,15 +161,10 @@ void HTFormatInit(void)
/*
* Load the local maps.
*/
if (IsOurFile(personal_type_map)
if (IsOurFile(LYAbsOrHomePath(&personal_type_map))
&& LYCanReadFile(personal_type_map)) {
/* These should override everything else. */
HTLoadTypesConfigFile(personal_type_map, mediaUSR);
} else {
char buffer[LY_MAXPATH];
LYAddPathToHome(buffer, sizeof(buffer), personal_type_map);
HTLoadTypesConfigFile(buffer, mediaUSR);
}
/*
......@@ -1341,15 +1336,10 @@ void HTFileInit(void)
/*
* Load the local maps.
*/
if (IsOurFile(personal_extension_map)
if (IsOurFile(LYAbsOrHomePath(&personal_extension_map))
&& LYCanReadFile(personal_extension_map)) {
/* These should override everything else. */
HTLoadExtensionsConfigFile(personal_extension_map);
} else {
char buffer[LY_MAXPATH];
LYAddPathToHome(buffer, sizeof(buffer), personal_extension_map);
HTLoadExtensionsConfigFile(buffer);
}
}
......
......@@ -465,15 +465,9 @@ int getfile(DocInfo *doc, int *target)
/*
* Convert '~' to $HOME.
*/
if ((cp = strchr(doc->address, '~'))) {
HTSprintf0(&p, "%.*s%s%s",
cp - doc->address,
doc->address,
wwwName(Home_Dir()),
cp + 1);
} else {
StrAllocCopy(p, doc->address);
}
StrAllocCopy(p, doc->address);
LYTildeExpand(&p, TRUE);
/*
* Show URL before executing it.
*/
......@@ -785,33 +779,7 @@ int getfile(DocInfo *doc, int *target)
* was entered, simplifying, and eliminating any residual
* relative elements. - FM
*/
if (((cp = HTParse(doc->address, "",
PARSE_PATH + PARSE_ANCHOR + PARSE_PUNCTUATION))
!= NULL) &&
!strncmp(cp, "/~", 2)) {
char *cp1 = strstr(doc->address, "/~");
char *cp2;
CTRACE((tfp, "getfile: URL '%s'\n",
doc->address));
*cp1 = '\0';
cp1 += 2;
StrAllocCopy(temp, doc->address);
StrAllocCopy(cp, wwwName(Home_Dir()));
if (!LYIsHtmlSep(*cp))
LYAddHtmlSep(&temp);
StrAllocCat(temp, cp);
if ((cp2 = strchr(cp1, '/')) != NULL) {
LYTrimRelFromAbsPath(cp2);
StrAllocCat(temp, cp2);
}
StrAllocCopy(doc->address, temp);
FREE(temp);
CTRACE((tfp, " changed to '%s'\n",
doc->address));
WWWDoc.address = doc->address;
}
FREE(cp);
LYTildeExpand(&(doc->address), TRUE);
}
CTRACE_SLEEP(MessageSecs);
user_message(WWW_WAIT_MESSAGE, doc->address);
......
......@@ -734,7 +734,7 @@ static int modify_tagged(char *testpath)
/*
* Replace ~/ references to the home directory.
*/
if (!strncmp(tmpbuf, "~/", 2)) {
if (LYIsTilde(tmpbuf[0]) && LYIsPathSep(tmpbuf[1])) {
char *cp1 = NULL;
StrAllocCopy(cp1, Home_Dir());
......@@ -913,8 +913,8 @@ static int modify_location(char *testpath)
/*
* Allow ~/ references to the home directory.
*/
if (!strncmp(tmpbuf, "~/", 2)
|| !strcmp(tmpbuf, "~")) {
if (LYIsTilde(tmpbuf[0])
&& (tmpbuf[1] == '\0' || LYIsPathSep(tmpbuf[1]))) {
StrAllocCopy(newpath, Home_Dir());
StrAllocCat(newpath, (tmpbuf + 1));
LYstrncpy(tmpbuf, newpath, sizeof(tmpbuf) - 1);
......@@ -1029,6 +1029,10 @@ int local_modify(DocInfo *doc, char **newpath)
return 0;
}
#define BadChars() ((!no_dotfiles && show_dotfiles) \
? "~/" \
: ".~/")
/*
* Create a new empty file in the current directory.
*/
......@@ -1037,19 +1041,14 @@ static int create_file(char *current_location)
int code = FALSE;
char tmpbuf[DIRED_MAXBUF];
char *testpath = NULL;
const char *bad_chars = ".~/";
tmpbuf[0] = '\0';
if (get_filename(gettext("Enter name of file to create: "),
tmpbuf, sizeof(tmpbuf)) != NULL) {
if (!no_dotfiles && show_dotfiles) {
bad_chars = "~/";
}
if (strstr(tmpbuf, "//") != NULL) {
HTAlert(gettext("Illegal redirection \"//\" found! Request ignored."));
} else if (strlen(tmpbuf) && strchr(bad_chars, tmpbuf[0]) == NULL) {
} else if (strlen(tmpbuf) && strchr(BadChars(), tmpbuf[0]) == NULL) {
StrAllocCopy(testpath, current_location);
LYAddPathSep(&testpath);
......@@ -1078,19 +1077,14 @@ static int create_directory(char *current_location)
int code = FALSE;
char tmpbuf[DIRED_MAXBUF];
char *testpath = NULL;
const char *bad_chars = ".~/";
tmpbuf[0] = '\0';
if (get_filename(gettext("Enter name for new directory: "),
tmpbuf, sizeof(tmpbuf)) != NULL) {
if (!no_dotfiles && show_dotfiles) {
bad_chars = "~/";
}
if (strstr(tmpbuf, "//") != NULL) {
HTAlert(gettext("Illegal redirection \"//\" found! Request ignored."));
} else if (strlen(tmpbuf) && strchr(bad_chars, tmpbuf[0]) == NULL) {
} else if (strlen(tmpbuf) && strchr(BadChars(), tmpbuf[0]) == NULL) {
StrAllocCopy(testpath, current_location);
LYAddPathSep(&testpath);
......@@ -2280,11 +2274,11 @@ BOOLEAN local_install(char *destpath,
}
/* deal with ~/ or /~/ at the beginning - kw */
if (destpath[0] == '~' &&
(destpath[1] == '/' || destpath[1] == '\0')) {
if (LYIsTilde(destpath[0]) &&
(LYIsPathSep(destpath[1]) || destpath[1] == '\0')) {
cp = &destpath[1];
} else if (destpath[0] == '/' && destpath[1] == '~' &&
(destpath[2] == '/' || destpath[2] == '\0')) {
} else if (LYIsPathSep(destpath[0]) && LYIsTilde(destpath[1]) &&
(LYIsPathSep(destpath[2]) || destpath[2] == '\0')) {
cp = &destpath[2];
}
if (cp) {
......
......@@ -856,37 +856,6 @@ static void FixCharacters(void)
}
#endif /* EBCDIC */
static void tildeExpand(char **pathname,
BOOLEAN embedded)
{
char *temp = *pathname;
if (embedded) {
if (temp != NULL) {
temp = strstr(*pathname, "/~");
if (temp != 0)
temp++;
else
temp = *pathname;
}
}
if (temp != NULL
&& temp[0] == '~') {
if (temp[1] == '/'
&& temp[2] != '\0') {
temp = NULL;
StrAllocCopy(temp, *pathname + 2);
StrAllocCopy(*pathname, wwwName(Home_Dir()));
LYAddPathSep(pathname);
StrAllocCat(*pathname, temp);
FREE(temp);
} else if (temp[1] == '\0') {
StrAllocCopy(*pathname, wwwName(Home_Dir()));
}
}
}
static BOOL GetStdin(char **buf,
BOOL marker)
{
......@@ -967,6 +936,7 @@ static void SetLocale(void)
#if defined(HAVE_LIBINTL_H) || defined(HAVE_LIBGETTEXT_H)
{
char *cp;
if ((cp = LYGetEnv("LYNX_LOCALEDIR")) == 0)
cp = LOCALEDIR;
bindtextdomain("lynx", cp);
......@@ -1213,7 +1183,7 @@ int main(int argc,
#ifdef WIN_EX /* for Windows 2000 ... 1999/08/23 (Mon) 08:24:35 */
if (access(lynx_temp_space, 0) != 0)
#endif
tildeExpand(&lynx_temp_space, TRUE);
LYTildeExpand(&lynx_temp_space, TRUE);
if ((cp = strstr(lynx_temp_space, "$USER")) != NULL) {
char *cp1;
......@@ -1411,14 +1381,14 @@ int main(int argc,
* Open command-script, if specified
*/
if (lynx_cmd_script != 0) {
tildeExpand(&lynx_cmd_script, TRUE);
LYTildeExpand(&lynx_cmd_script, TRUE);
LYOpenCmdScript();
}
/*
* Open command-logging, if specified
*/
if (lynx_cmd_logfile != 0) {
tildeExpand(&lynx_cmd_logfile, TRUE);
LYTildeExpand(&lynx_cmd_logfile, TRUE);
LYOpenCmdLogfile(argc, argv);
}
#endif
......@@ -1457,7 +1427,7 @@ int main(int argc,
StrAllocCopy(lynx_cfg_file, LYNX_CFG_FILE);
#ifndef _WINDOWS /* avoid the whole ~ thing for now */
tildeExpand(&lynx_cfg_file, FALSE);
LYTildeExpand(&lynx_cfg_file, FALSE);
#endif
/*
......@@ -1574,7 +1544,7 @@ int main(int argc,
if (!lynx_lss_file)
StrAllocCopy(lynx_lss_file, LYNX_LSS_FILE);
tildeExpand(&lynx_lss_file, TRUE);
LYTildeExpand(&lynx_lss_file, TRUE);
/*
* If the lynx-style file is not available, inform the user and exit.
......@@ -1692,14 +1662,14 @@ int main(int argc,
LYAddPathToHome(LYCookieFile, LY_MAXPATH, COOKIE_FILE);
} else {
tildeExpand(&LYCookieFile, FALSE);
LYTildeExpand(&LYCookieFile, FALSE);
}
LYLoadCookies(LYCookieFile);
}
/* tilde-expand LYCookieSaveFile */
if (LYCookieSaveFile != NULL) {
tildeExpand(&LYCookieSaveFile, FALSE);
LYTildeExpand(&LYCookieSaveFile, FALSE);
}
/*
......@@ -1738,7 +1708,7 @@ int main(int argc,
FREE(lynx_save_space);
}
if (lynx_save_space) {
tildeExpand(&lynx_save_space, TRUE);
LYTildeExpand(&lynx_save_space, TRUE);
#ifdef VMS
LYLowerCase(lynx_save_space);
if (strchr(lynx_save_space, '/') != NULL) {
......
......@@ -1736,7 +1736,7 @@ static void handle_LYK_COMMENT(BOOLEAN *refresh_screen,
if (temp != NULL) {
HTUnEscape(temp);
if (*temp == '~' && strlen(temp) > 1) {
if (LYIsTilde(*temp) && strlen(temp) > 1) {
/*
* It's a ~user URL so guess user@host. - FM
*/
......@@ -5008,9 +5008,7 @@ void handle_LYK_CHDIR(void)
return;
}
if (*buf == '~' && !buf[1]) {
StrAllocCopy(p, Home_Dir());
} else if (*buf == '~') {
if (LYIsTilde(*buf) && (LYIsPathSep(buf[1]) || buf[1] == '\0')) {
HTSprintf0(&p, "%s%s", Home_Dir(), buf + 1);
} else {
StrAllocCopy(p, buf);
......
......@@ -336,7 +336,7 @@ void LYoptions(void)
/*
* If the user changes the display we need memory to put it in.
*/
char display_option[256];
char display_option[MAX_LINE];
char *choices[MAXCHOICES];
int CurrentCharSet = current_char_set;
int CurrentAssumeCharSet = UCLYhndl_for_unspec;
......@@ -1772,8 +1772,7 @@ void edit_bookmarks(void)
#define MULTI_OFFSET 8
int a; /* misc counter */
char MBM_tmp_line[256]; /* buffer for LYgetstr */
char ehead_buffer[265];
char MBM_tmp_line[LY_MAXPATH]; /* buffer for LYgetstr */
/*
* We need (MBM_V_MAXFILES + MULTI_OFFSET) lines to display the whole list
......@@ -1801,8 +1800,11 @@ void edit_bookmarks(void)
LYmove(0, 5);
lynx_start_h1_color();
if (LYlines < (MBM_V_MAXFILES + MULTI_OFFSET)) {
sprintf(ehead_buffer, MULTIBOOKMARKS_EHEAD_MASK, MBM_current);
char *ehead_buffer = 0;
HTSprintf0(&ehead_buffer, MULTIBOOKMARKS_EHEAD_MASK, MBM_current);
LYaddstr(ehead_buffer);
FREE(ehead_buffer);
} else {
LYaddstr(MULTIBOOKMARKS_EHEAD);
}
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment