diff options
| author | Thomas E. Dickey <dickey@invisible-island.net> | 2001-11-08 20:59:59 -0500 |
|---|---|---|
| committer | Thomas E. Dickey <dickey@invisible-island.net> | 2001-11-08 20:59:59 -0500 |
| commit | 6cb04c09f063188e7dae5d1e5e5c69eb64703626 (patch) | |
| tree | 46c2950351bf3f2cde1f610eae7bc9cfb52c5221 | |
| parent | f78e27712a4f44dbdf3c1532c3d1958989bf40a5 (diff) | |
| download | lynx-snapshots-6cb04c09f063188e7dae5d1e5e5c69eb64703626.tar.gz | |
snapshot of project "lynx", label v2-8-5dev_4
38 files changed, 2655 insertions, 1473 deletions
@@ -1,6 +1,77 @@ Changes since Lynx 2.8 release =============================================================================== +2001-11-08 (2.8.5dev.4) +* if file-upload code is configured, suppress message that indicates it is not + implemented, i.e., "[FILE Input] (not implemented)" -TD +* modify file-upload submission to send plain text if the file is entirely + printable text. Mime encoding is needed if the file contains nulls, etc., + but reportedly may confuse some hosts -TD +* suppress "charset=" clause on form submission if it is iso-8859-1 -TD +* move case for F_FILE_TYPE in HText_SubmitForm() to obtain original behavior + of fallthrough for F_SUBMIT_TYPE, F_TEXT_SUBMIT_TYPE, F_IMAGE_SUBMIT_TYPE to + translate their character set, etc. (report by KW) -TD +* revert 2.8.4dev.21 change to avoid truncating cookie path in LYSetCookie(). + The server that wouldn't work with the current lynx behavior is + identified as "Oracle_Web_Listener/4.0.8.2.3EnterpriseEdition" -DK +* modify LYLegitimizeHREF() change from 2.8.4dev.21 to eliminate newlines from + the HREF rather than converting them to spaces. This fixes a problem with + www.ebay.com which splits up HREFs with newlines. Changing the newlines to + spaces made the HREF no longer match, e.g., when it was built up from + a CGI script (report by Morten Bo Johansen) -TD +* add two test files for testing UTF-8, based on Markus Kuhn's demos + (quickbrown.html and utf-8-demo.html). These work with ncurses 20011103 + patch, for wide-characters except for combining characters (more work is + needed in ncurses). Tested with XFree86 xterm (patch #163) -TD +* modify select_multi_bookmarks() check for interrupt character to limit it to + "hard" interrupt characters such as ^G. This fixes a case where "z" would + have been treated as an interrupt character in advanced multibookmark mode + (reports by Michael Warner, HN, as well as Debian #111463) -TD +* modify SUPPORT_MULTIBYTE_EDIT logic in LYUpperCase() and LYLowerCase() to + check for a null character following an upper-128 code. This is more likely + to occur in EBCDIC, though the multibyte strings should not have a null at + this position in any case (report by PG) -TD +* for wide-character curses configuration, do not force repainting at the end + of display_page() -TD +* modify configure test for mkstemp() to check if that function returns + distinct values (report by Fr3dY indicates that AmigaOS has a broken version + of mkstemp() which always returns the same value) -TD +* modify LYwaddstr() to use wide-character curses functions to make UTF-8 output + work without relying upon side-effects of narrow-character functions. Note + that this relies on the user having set a UTF-8 locale, e.g., en_US.UTF-8 -TD +* modify HText_appendCharacter() to not use utfxtra_on_this_line when compiling + with WIDEC_CURSES, since the curses library already does this adjustment -TD +* correct the following names in LYrcFile.c which were added to allow + ENABLE_LYNXRC lines in lynx.cfg to enable them to be saved in ~/.lynxrc + old new where-used + ------------------------------------- + DTD_recovery tagsoup (command-line option and lynx.cfg) + show_rate show_kb_rate (lynx.cfg) + user_agent useragent (command-line option) + ------------------------------------- + (report by Michel Such <msuch@free.fr>) -TD +* modify LYRefreshEdit() to clear field before repainting (patch by Hataguchi + Takeshi) +* for CJK configuration, force clearing/repainting in HTUserMsg() (patch by + Hataguchi Takeshi) +* make HTInfoMsg() sleep condition consistent with other messages by using + LYSleepInfo() -TD +* reduce clutter with new function utf8_length() -TD +* replace !isascii(ch) with new macro is8bits(ch), to reduce clutter, fix some + sign-extensions and make it more portable -TD +* change some of the "#if" statements to "#ifdef", to work around broken + versions (2.96, 3.0.1) of gcc distributed with Mandrake 8.1 (though + reportedly this is due to Redhat): the -C option passes through comments as + usual, but some comments expand on preprocessor lines, which causes the + preprocessor to report an expression error. This prevented "make + install-help" from running, though the -C option is not needed for that. + However, lacking a working -C option makes the C preprocessor useless for + analyzing bugs -TD +* modify configure script to accept --with-screen=ncursesw, to build with the + wide-character version of ncurses -TD +* modify configure script to look for mkdtemp(), to quiet another bogus linker + message -TD + 2001-10-06 (2.8.5dev.3) * add CF_MKSTEMP configure macro, from vile, to check for a working mkstemp(). This will quiet some bogus warning messages in recent runtime support, but diff --git a/INSTALLATION b/INSTALLATION index dd3ebbb6..1a3462c5 100644 --- a/INSTALLATION +++ b/INSTALLATION @@ -478,18 +478,21 @@ II. Compile instructions -- UNIX or native gettext is used. --with-screen=XXX - Use this option to select the screen type. The option value, - XXX must be one of curses (the default), ncurses, pdcurses or slang. - Specifying a screen type causes the configure script to look in - standard locations for the associated header and library files, - unless you have preset the $CFLAGS and $LIBS variables. + Use this option to select the screen type. The option value, XXX + must be one of curses (the default), ncurses, ncursesw, pdcurses or + slang. Specifying a screen type causes the configure script to + look in standard locations for the associated header and library + files, unless you have preset the $CFLAGS and $LIBS variables. + --with-screen=ncursesw (define NCURSES, WIDEC_CURSES) --with-screen=ncurses (define NCURSES) + --with-screen=pdcurses (define PDCURSES) --with-screen=slang (define USE_SLANG) Note that some systems may have a default curses library which does not support color, while on others, ncurses is installed as - the curses library. + the curses library. The variant ncursesw is the wide-character + version of ncurses. --with-socks[=XXX] (define SOCKS) Use this option to configure with the socks library. diff --git a/WWW/Library/Implementation/HTString.h b/WWW/Library/Implementation/HTString.h index 53c52cd6..be1002be 100644 --- a/WWW/Library/Implementation/HTString.h +++ b/WWW/Library/Implementation/HTString.h @@ -69,7 +69,7 @@ extern char * HTNextField PARAMS ((char** pstr)); extern char * HTNextTok PARAMS((char ** pstr, CONST char * delims, CONST char * bracks, char * found)); -#if ANSI_VARARGS +#ifdef ANSI_VARARGS extern char * HTSprintf (char ** pstr, CONST char * fmt, ...) GCC_PRINTFLIKE(2,3); extern char * HTSprintf0 (char ** pstr, CONST char * fmt, ...) diff --git a/WWW/Library/Implementation/HTUtils.h b/WWW/Library/Implementation/HTUtils.h index e038e1b7..b006913a 100644 --- a/WWW/Library/Implementation/HTUtils.h +++ b/WWW/Library/Implementation/HTUtils.h @@ -411,7 +411,7 @@ are generally not the response status from any specific protocol. #define HT_BAD_EOF -12 /* Premature EOF */ #ifndef va_arg -# if HAVE_STDARG_H && ANSI_VARARGS +# if defined(HAVE_STDARG_H) && defined(ANSI_VARARGS) # include <stdarg.h> # else # if HAVE_VARARGS_H @@ -420,7 +420,7 @@ are generally not the response status from any specific protocol. # endif #endif -#if ANSI_VARARGS +#if defined(ANSI_VARARGS) #define LYva_start(ap,format) va_start(ap,format) #else #define LYva_start(ap,format) va_start(ap) @@ -430,11 +430,13 @@ are generally not the response status from any specific protocol. * GCC can be told that some functions are like printf (and do type-checking on * their parameters). */ -#if GCC_PRINTF +#ifndef GCC_PRINTFLIKE +#if defined(GCC_PRINTF) && !defined(printf) #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var))) #else #define GCC_PRINTFLIKE(fmt,var) /*nothing*/ #endif +#endif #include <HTString.h> /* String utilities */ @@ -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: 2001/4/15 +dnl Updated: 2001/11/3 dnl dnl The autoconf used in Lynx development is GNU autoconf, patched dnl by Tom Dickey. See your local GNU archives, and this URL: @@ -1269,7 +1269,7 @@ do ;; inria) #(vi dnl http://www.kame.net/ - AC_EGREP_CPP(yes, [dnl + AC_EGREP_CPP(yes, [ #include <netinet/in.h> #ifdef IPV6_INRIA_VERSION yes @@ -1277,7 +1277,7 @@ yes ;; kame) #(vi dnl http://www.kame.net/ - AC_EGREP_CPP(yes, [dnl + AC_EGREP_CPP(yes, [ #include <netinet/in.h> #ifdef __KAME__ yes @@ -1285,7 +1285,7 @@ yes ;; linux-glibc) #(vi dnl http://www.v6.linux.or.jp/ - AC_EGREP_CPP(yes, [dnl + AC_EGREP_CPP(yes, [ #include <features.h> #if defined(__GLIBC__) && __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 1 yes @@ -1302,21 +1302,21 @@ yes fi ;; toshiba) #(vi - AC_EGREP_CPP(yes, [dnl + AC_EGREP_CPP(yes, [ #include <sys/param.h> #ifdef _TOSHIBA_INET6 yes #endif], [cf_cv_ipv6type=$i]) ;; v6d) #(vi - AC_EGREP_CPP(yes, [dnl + AC_EGREP_CPP(yes, [ #include </usr/local/v6/include/sys/v6config.h> #ifdef __V6D__ yes #endif], [cf_cv_ipv6type=$i]) ;; zeta) - AC_EGREP_CPP(yes, [dnl + AC_EGREP_CPP(yes, [ #include <sys/param.h> #ifdef _ZETA_MINAMI_INET6 yes @@ -1728,6 +1728,10 @@ dnl Construct a search-list for a nonstandard header-file AC_DEFUN([CF_HEADER_PATH], [$1="" +test "$prefix" != /usr/local && \ +test -d /usr/local && \ +$1="[$]$1 /usr/local/include /usr/local/include/$2 /usr/local/$2/include" + test "$includedir" != NONE && \ test -d "$includedir" && \ $1="[$]$1 $includedir $includedir/$2" @@ -1740,10 +1744,6 @@ test "$prefix" != NONE && \ test -d "$prefix" && \ $1="[$]$1 $prefix/include $prefix/include/$2 $prefix/$2/include" -test "$prefix" != /usr/local && \ -test -d /usr/local && \ -$1="[$]$1 /usr/local/include /usr/local/include/$2 /usr/local/$2/include" - test "$prefix" != /usr && \ $1="[$]$1 /usr/include /usr/include/$2 /usr/$2/include" @@ -1841,6 +1841,10 @@ dnl Construct a search-list for a nonstandard library-file AC_DEFUN([CF_LIBRARY_PATH], [$1="" +test "$prefix" != /usr/local && \ +test -d /usr/local && \ +$1="[$]$1 /usr/local/lib /usr/local/lib/$2 /usr/local/$2/lib" + test "$libdir" != NONE && \ test -d $libdir && \ $1="[$]$1 $libdir $libdir/$2" @@ -1854,10 +1858,6 @@ test "$prefix" != "$exec_prefix" && \ test -d $prefix && \ $1="[$]$1 $prefix/lib $prefix/lib/$2 $prefix/$2/lib" -test "$prefix" != /usr/local && \ -test -d /usr/local && \ -$1="[$]$1 /usr/local/lib /usr/local/lib/$2 /usr/local/$2/lib" - test "$prefix" != /usr && \ $1="[$]$1 /usr/lib /usr/lib/$2 /usr/$2/lib" @@ -1885,7 +1885,8 @@ AC_MSG_RESULT($cf_cv_locale) test $cf_cv_locale = yes && AC_DEFINE(LOCALE) ]) dnl --------------------------------------------------------------------------- -dnl Check for a working mkstemp +dnl Check for a working mkstemp. This creates two files, checks that they are +dnl successfully created and distinct (AmigaOS apparently fails on the last). AC_DEFUN([CF_MKSTEMP],[ AC_CACHE_CHECK(for working mkstemp, cf_cv_func_mkstemp,[ rm -f conftest* @@ -1893,26 +1894,33 @@ AC_TRY_RUN([ #include <sys/types.h> #include <stdlib.h> #include <stdio.h> +#include <string.h> #include <sys/stat.h> int main() { char *tmpl = "conftestXXXXXX"; - char temp[80]; + char name[2][80]; + int n; int result = 0; int fd; struct stat sb; umask(077); - strcpy(temp, tmpl); - if ((fd = mkstemp(temp)) >= 0) { - if (!strcmp(temp, tmpl) - || stat(temp, &sb) != 0 - || (sb.st_mode & S_IFMT) != S_IFREG - || (sb.st_mode & 077) != 0) { - result = 1; + for (n = 0; n < 2; ++n) { + strcpy(name[n], tmpl); + if ((fd = mkstemp(name[n])) >= 0) { + if (!strcmp(name[n], tmpl) + || stat(name[n], &sb) != 0 + || (sb.st_mode & S_IFMT) != S_IFREG + || (sb.st_mode & 077) != 0) { + result = 1; + } + close(fd); } - close(fd); } + if (result == 0 + && !strcmp(name[0], name[1])) + result = 1; exit(result); } ],[cf_cv_func_mkstemp=yes @@ -1974,14 +1982,16 @@ dnl If the installer has set $CFLAGS or $CPPFLAGS so that the ncurses header dnl is already in the include-path, don't even bother with this, since we cannot dnl easily determine which file it is. In this case, it has to be <curses.h>. dnl +dnl The optional parameter gives the root name of the library, in case it is +dnl not installed as the default curses library. That is how the +dnl wide-character version of ncurses is installed. AC_DEFUN([CF_NCURSES_CPPFLAGS], [ -AC_CACHE_CHECK(for ncurses header in include-path, cf_cv_ncurses_h,[ - for cf_header in \ - curses.h \ - ncurses.h \ - ncurses/curses.h \ - ncurses/ncurses.h +cf_ncuhdr_root=ifelse($1,,ncurses,$1) +AC_CACHE_CHECK(for $cf_ncuhdr_root header in include-path, cf_cv_ncurses_h,[ + cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h" + test "$cf_ncuhdr_root" = ncurses && cf_header_list="curses.h ncurses.h $cf_header_list" + for cf_header in $cf_header_list do AC_TRY_COMPILE([#include <$cf_header>],[ #ifdef NCURSES_VERSION @@ -2002,8 +2012,8 @@ make an error if test "$cf_cv_ncurses_h" != no ; then cf_cv_ncurses_header=$cf_cv_ncurses_h else -AC_CACHE_CHECK(for ncurses include-path, cf_cv_ncurses_h2,[ - CF_HEADER_PATH(cf_search,ncurses) +AC_CACHE_CHECK(for $cf_ncuhdr_root include-path, cf_cv_ncurses_h2,[ + CF_HEADER_PATH(cf_search,$cf_ncuhdr_root) test -n "$verbose" && echo for cf_incdir in $cf_search do @@ -2028,8 +2038,8 @@ AC_CACHE_CHECK(for ncurses include-path, cf_cv_ncurses_h2,[ cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2` echo cf_1st_include=$cf_1st_incdir echo cf_2nd_include=$cf_2nd_incdir - if test `basename $cf_1st_incdir` = ncurses ; then - cf_cv_ncurses_header=ncurses/$cf_cv_ncurses_header + if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then + cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header CF_ADD_INCDIR($cf_2nd_incdir) fi CF_ADD_INCDIR($cf_1st_incdir) @@ -2049,6 +2059,9 @@ case $cf_cv_ncurses_header in # (vi ncurses/curses.h|ncurses/ncurses.h) AC_DEFINE(HAVE_NCURSES_NCURSES_H) ;; +ncursesw/curses.h|ncursesw/ncurses.h) + AC_DEFINE(HAVE_NCURSESW_NCURSES_H) + ;; esac CF_NCURSES_VERSION @@ -2060,9 +2073,14 @@ dnl Some distributions have gpm linked with (bsd) curses, which makes it dnl unusable with ncurses. However, we don't want to link with gpm unless dnl ncurses has a dependency, since gpm is normally set up as a shared library, dnl and the linker will record a dependency. +dnl +dnl The optional parameter gives the root name of the library, in case it is +dnl not installed as the default curses library. That is how the +dnl wide-character version of ncurses is installed. AC_DEFUN([CF_NCURSES_LIBS], [AC_REQUIRE([CF_NCURSES_CPPFLAGS]) +cf_nculib_root=ifelse($1,,ncurses,$1) # This works, except for the special case where we find gpm, but # ncurses is in a nonstandard location via $LIBS, and we really want # to link gpm. @@ -2082,13 +2100,13 @@ freebsd*) esac LIBS="$cf_ncurses_LIBS $LIBS" -CF_FIND_LIBRARY(ncurses,ncurses, +CF_FIND_LIBRARY($cf_nculib_root,$cf_nculib_root, [#include <${cf_cv_ncurses_header-curses.h}>], [initscr()], initscr) if test -n "$cf_ncurses_LIBS" ; then - AC_MSG_CHECKING(if we can link ncurses without $cf_ncurses_LIBS) + AC_MSG_CHECKING(if we can link $cf_nculib_root without $cf_ncurses_LIBS) cf_ncurses_SAVE="$LIBS" for p in $cf_ncurses_LIBS ; do q=`echo $LIBS | sed -e 's/'$p' //' -e 's/'$p'$//'` @@ -2924,11 +2942,13 @@ AC_TRY_LINK([],[char *x=(char*)tgoto("",0,0)], CF_VERBOSE(using functions in predefined $cf_cv_termlib LIBS) ],[ ifelse([$1],,,[ -if test "$1" = ncurses; then - CF_NCURSES_CPPFLAGS - CF_NCURSES_LIBS +case "$1" in # (vi +ncurses*) + CF_NCURSES_CPPFLAGS($1) + CF_NCURSES_LIBS($1) cf_cv_termlib=terminfo -fi + ;; +esac ]) if test "$cf_cv_termlib" = none; then # FreeBSD's linker gives bogus results for AC_CHECK_LIB, saying that @@ -3070,6 +3090,21 @@ AC_DEFUN([CF_UPPER], $1=`echo "$2" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%` ])dnl dnl --------------------------------------------------------------------------- +dnl Check for multibyte support, and if not found, utf8 compatibility library +AC_DEFUN([CF_UTF8_LIB], +[ +AC_CACHE_CHECK(for multibyte character support,cf_cv_utf8_lib,[ +AC_TRY_LINK([ +#include <stdlib.h>],[putwc(0,0);],cf_cv_utf8_lib=yes,[ +cf_save_LIBS="$LIBS" +LIBS="-lutf8 $LIBS" +AC_TRY_LINK([ +#include <libutf8.h>],[putwc(0,0);], +[cf_cv_utf8_lib=add-on], +[cf_cv_utf8_lib=no])]) +]) +])dnl +dnl --------------------------------------------------------------------------- dnl Check for UTMP/UTMPX headers AC_DEFUN([CF_UTMP], [ @@ -3281,6 +3316,47 @@ fi fi ])dnl dnl --------------------------------------------------------------------------- +dnl Check for curses implementations that can handle wide-characters +AC_DEFUN([CF_WIDEC_CURSES], +[ +AC_CACHE_CHECK(if curses supports wide characters,cf_cv_widec_curses,[ +AC_TRY_LINK([ +#include <stdlib.h> +#include <${cf_cv_ncurses_header-curses.h}>],[ + wchar_t temp[2]; + wchar_t wch = 'A'; + temp[0] = wch; + waddnwstr(stdscr, temp, 1); +], +[cf_cv_widec_curses=yes], +[cf_cv_widec_curses=no]) +]) + +if test "$cf_cv_widec_curses" = yes ; then + AC_DEFINE(WIDEC_CURSES) + + # This is needed on Tru64 5.0 to declare mbstate_t + AC_CACHE_CHECK(if we must include wchar.h to declare mbstate_t,cf_cv_widec_mbstate,[ + AC_TRY_COMPILE([ +#include <stdlib.h> +#include <${cf_cv_ncurses_header-curses.h}>], +[mbstate_t state], +[cf_cv_widec_mbstate=no], +[AC_TRY_COMPILE([ +#include <stdlib.h> +#include <wchar.h> +#include <${cf_cv_ncurses_header-curses.h}>], +[mbstate_t state], +[cf_cv_widec_mbstate=yes], +[cf_cv_widec_mbstate=unknown])])]) + +if test "$cf_cv_widec_mbstate" = yes ; then + AC_DEFINE(NEED_WCHAR_H) +fi + +fi +])dnl +dnl --------------------------------------------------------------------------- dnl Wrapper for AC_ARG_WITH to ensure that user supplies a pathname, not just dnl defaulting to yes/no. dnl @@ -10,7 +10,7 @@ #undef CAN_SET_ERRNO /* CF_SET_ERRNO */ #undef CHMOD_PATH /* CF_PATH_PROG(chmod) */ #undef CJK_EX /* CF_ARG_ENABLE(cjk) */ -#undef COLOR_CURSES /* defined by CF_COLOR_CURSES */ +#undef COLOR_CURSES /* CF_COLOR_CURSES */ #undef COMPRESS_PATH /* CF_PATH_PROG(compress) */ #undef COPY_PATH /* CF_PATH_PROG(cp) */ #undef CURS_PERFORMANCE /* CF_CURS_PERFORMANCE */ @@ -44,15 +44,15 @@ #undef EXP_NESTED_TABLES /* CF_ARG_ENABLE(nested-tables) */ #undef EXP_PERSISTENT_COOKIES /* CF_ARG_ENABLE(persistent-cookies) */ #undef EXP_READPROGRESS /* CF_ARG_ENABLE(read-eta) */ -#undef FANCY_CURSES /* defined by CF_FANCY_CURSES */ +#undef FANCY_CURSES /* CF_FANCY_CURSES */ #undef GCC_NORETURN /* CF_GCC_ATTRIBUTES */ #undef GCC_PRINTF /* CF_GCC_ATTRIBUTES */ #undef GCC_UNUSED /* CF_GCC_ATTRIBUTES */ #undef GETGROUPS_T /* AC_TYPE_GETGROUPS */ #undef GZIP_PATH /* CF_PATH_PROG(gzip) */ -#undef HAVE_ALLOCA /* defined by AM_GNU_GETTEXT */ -#undef HAVE_ALLOCA_H /* defined by AM_GNU_GETTEXT */ -#undef HAVE_ARGZ_H /* defined by AM_GNU_GETTEXT */ +#undef HAVE_ALLOCA /* AM_GNU_GETTEXT */ +#undef HAVE_ALLOCA_H /* AM_GNU_GETTEXT */ +#undef HAVE_ARGZ_H /* AM_GNU_GETTEXT */ #undef HAVE_ARPA_INET_H #undef HAVE_ASSUME_DEFAULT_COLORS /* ncurses extension */ #undef HAVE_BSD_TOUCHLINE /* CF_CURS_TOUCHLINE */ @@ -60,10 +60,10 @@ #undef HAVE_CBREAK #undef HAVE_CURSESX_H #undef HAVE_CUSERID -#undef HAVE_DCGETTEXT /* defined by AM_GNU_GETTEXT */ +#undef HAVE_DCGETTEXT /* AM_GNU_GETTEXT */ #undef HAVE_DEFINE_KEY -#undef HAVE_DELSCREEN /* defined by CF_CURSES_FUNCS */ -#undef HAVE_DIRENT_H /* defined by AC_HEADER_DIRENT */ +#undef HAVE_DELSCREEN /* CF_CURSES_FUNCS */ +#undef HAVE_DIRENT_H /* AC_HEADER_DIRENT */ #undef HAVE_FCNTL_H /* have <fcntl.h> */ #undef HAVE_FTIME #undef HAVE_GAI_STRERROR /* CF_CHECK_IPV6 */ @@ -71,7 +71,7 @@ #undef HAVE_GETATTRS #undef HAVE_GETBEGX #undef HAVE_GETBEGY -#undef HAVE_GETBKGD /* defined by CF_COLOR_CURSES */ +#undef HAVE_GETBKGD /* CF_COLOR_CURSES */ #undef HAVE_GETCWD #undef HAVE_GETGROUPS #undef HAVE_GETTEXT /* defined if you want to use non-GNU gettext */ @@ -85,45 +85,47 @@ #undef HAVE_LIBINTL_H /* AM_GNU_GETTEXT, or cleanup from that */ #undef HAVE_LIMITS_H #undef HAVE_LOCALE_H -#undef HAVE_LSTAT /* defined by CF_FUNC_LSTAT */ -#undef HAVE_MALLOC_H /* defined by AM_GNU_GETTEXT */ -#undef HAVE_MKSTEMP +#undef HAVE_LSTAT /* CF_FUNC_LSTAT */ +#undef HAVE_MALLOC_H /* AM_GNU_GETTEXT */ +#undef HAVE_MKDTEMP +#undef HAVE_MKSTEMP /* CF_MKSTEMP */ #undef HAVE_MKTEMP -#undef HAVE_MMAP /* defined by AM_GNU_GETTEXT */ -#undef HAVE_MUNMAP /* defined by AM_GNU_GETTEXT */ +#undef HAVE_MMAP /* AM_GNU_GETTEXT */ +#undef HAVE_MUNMAP /* AM_GNU_GETTEXT */ #undef HAVE_NAPMS #undef HAVE_NCURSES_H /* defined if we include <ncurses.h> */ #undef HAVE_NCURSES_NCURSES_H /* defined if we include <ncurses/ncurses.h> */ #undef HAVE_NCURSES_TERM_H /* have <ncurses/term.h> */ +#undef HAVE_NCURSESW_NCURSES_H /* defined if we include <ncursesw/ncurses.h> */ #undef HAVE_NEWPAD #undef HAVE_NEWTERM -#undef HAVE_NL_TYPES_H /* defined by AM_GNU_GETTEXT */ +#undef HAVE_NL_TYPES_H /* AM_GNU_GETTEXT */ #undef HAVE_PNOUTREFRESH #undef HAVE_POPEN #undef HAVE_PUTENV #undef HAVE_READDIR #undef HAVE_RESIZETERM #undef HAVE_RESOLV_H -#undef HAVE_SETENV /* defined by AM_GNU_GETTEXT */ +#undef HAVE_SETENV /* AM_GNU_GETTEXT */ #undef HAVE_SETLOCALE #undef HAVE_SETUID #undef HAVE_SIGACTION /* CF_FUNC_SIGACTION */ -#undef HAVE_SIZECHANGE /* defined by CF_SIZECHANGE */ +#undef HAVE_SIZECHANGE /* CF_SIZECHANGE */ #undef HAVE_STDARG_H /* CF_VARARGS */ #undef HAVE_STDLIB_H -#undef HAVE_STPCPY /* defined by AM_GNU_GETTEXT */ -#undef HAVE_STRCASECMP /* defined by AM_GNU_GETTEXT */ -#undef HAVE_STRCHR /* defined by AM_GNU_GETTEXT */ +#undef HAVE_STPCPY /* AM_GNU_GETTEXT */ +#undef HAVE_STRCASECMP /* AM_GNU_GETTEXT */ +#undef HAVE_STRCHR /* AM_GNU_GETTEXT */ #undef HAVE_STRERROR #undef HAVE_STRING_H #undef HAVE_SYSLOG_H #undef HAVE_SYSV_TOUCHLINE /* CF_CURS_TOUCHLINE */ -#undef HAVE_SYS_DIR_H /* defined by AC_HEADER_DIRENT */ +#undef HAVE_SYS_DIR_H /* AC_HEADER_DIRENT */ #undef HAVE_SYS_FCNTL_H /* have <sys/fcntl.h> */ #undef HAVE_SYS_FILIO_H /* have <sys/filio.h> */ #undef HAVE_SYS_IOCTL_H /* have <sys/ioctl.h> */ -#undef HAVE_SYS_NDIR_H /* defined by AC_HEADER_DIRENT */ -#undef HAVE_SYS_PARAM_H /* defined by AM_GNU_GETTEXT */ +#undef HAVE_SYS_NDIR_H /* AC_HEADER_DIRENT */ +#undef HAVE_SYS_PARAM_H /* AM_GNU_GETTEXT */ #undef HAVE_SYS_TIMEB_H /* have <sys/timeb.h> */ #undef HAVE_SYS_WAIT_H /* have <sys/wait.h> */ #undef HAVE_TERMIOS_H /* have <termios.h> */ @@ -143,7 +145,7 @@ #undef HAVE_UTMP_UT_SESSION /* CF_UTMP_UT_SESSION */ #undef HAVE_UTMP_UT_XSTATUS /* CF_UTMP_UT_XSTATUS */ #undef HAVE_UTMP_UT_XTIME /* CF_UTMP_UT_XTIME */ -#undef HAVE_VALUES_H /* defined by AM_GNU_GETTEXT */ +#undef HAVE_VALUES_H /* AM_GNU_GETTEXT */ #undef HAVE_VARARGS_H /* CF_VARARGS */ #undef HAVE_VASPRINTF #undef HAVE_VFORK_H /* have <vfork.h> */ @@ -152,9 +154,9 @@ #undef HAVE_WREDRAWLN #undef HAVE_WRESIZE #undef HAVE_XCURSES /* CF_PDCURSES_X11 */ -#undef HAVE___ARGZ_COUNT /* defined by AM_GNU_GETTEXT */ -#undef HAVE___ARGZ_NEXT /* defined by AM_GNU_GETTEXT */ -#undef HAVE___ARGZ_STRINGIFY /* defined by AM_GNU_GETTEXT */ +#undef HAVE___ARGZ_COUNT /* AM_GNU_GETTEXT */ +#undef HAVE___ARGZ_NEXT /* AM_GNU_GETTEXT */ +#undef HAVE___ARGZ_STRINGIFY /* AM_GNU_GETTEXT */ #undef IGNORE_CTRL_C /* FIXME: make tests? */ #undef INCLUDE_PROTOTYPES /* CF_SOCKS5 */ #undef INSTALL_ARGS /* CF_PATH_PROG(install) */ @@ -172,9 +174,10 @@ #undef MV_PATH /* CF_PATH_PROG(mv) */ #undef NCURSES /* defined for ncurses support */ #undef NCURSES_BROKEN /* defined for ncurses color support */ -#undef NEED_PTEM_H /* defined by CF_SIZECHANGE */ -#undef NEED_REMOVE /* defined by CF_REMOVE_BROKEN */ -#undef NGROUPS /* defined by CF_NGROUPS */ +#undef NEED_PTEM_H /* CF_SIZECHANGE */ +#undef NEED_REMOVE /* CF_REMOVE_BROKEN */ +#undef NEED_WCHAR_H /* CF_WIDEC_CURSES */ +#undef NGROUPS /* CF_NGROUPS */ #undef NO_CHANGE_EXECUTE_PERMS /* CF_ARG_DISABLE(dired-xpermit) */ #undef NO_CONFIG_INFO /* CF_ARG_DISABLE(config-info) */ #undef NO_EXTENDED_HTMLDTD /* CF_ARG_DISABLE(extended-dtd) */ @@ -197,7 +200,7 @@ #undef SOURCE_CACHE /* CF_ARG_ENABLE(source-cache) */ #undef STDC_HEADERS #undef SYSTEM_MAIL /* CF_DEFINE_PROG */ -#undef SYSTEM_MAIL_FLAGS /* defined by CF_SYSTEM_MAIL_FLAGS */ +#undef SYSTEM_MAIL_FLAGS /* CF_SYSTEM_MAIL_FLAGS */ #undef SYSTEM_NAME /* CF_CHECK_CACHE */ #undef TAR_PATH /* CF_PATH_PROG(tar) */ #undef TELNET_PATH /* CF_PATH_PROG(telnet) */ @@ -228,17 +231,18 @@ #undef UUDECODE_PATH /* CF_PATH_PROG(uudecode) */ #undef WAITPID_USES_UNION /* CF_FUNC_WAIT */ #undef WAIT_USES_UNION /* CF_FUNC_WAIT */ +#undef WIDEC_CURSES /* CF_WIDEC_CURSES */ #undef XCURSES /* CF_PDCURSES_X11 */ #undef ZCAT_PATH /* CF_PATH_PROG(zcat) */ #undef ZIP_PATH /* CF_PATH_PROG(zip) */ #undef _ALL_SOURCE /* AC_AIX */ -#undef inline /* defined by AC_C_INLINE */ +#undef inline /* AC_C_INLINE */ #undef lynx_rand /* CF_SRAND */ #undef lynx_srand /* CF_SRAND */ -#undef mode_t /* defined by AC_TYPE_MODE_T */ -#undef off_t /* defined by AC_TYPE_OFF_T */ -#undef pid_t /* defined by AC_TYPE_PID_T */ -#undef uid_t /* defined by AC_TYPE_UID_T */ +#undef mode_t /* AC_TYPE_MODE_T */ +#undef off_t /* AC_TYPE_OFF_T */ +#undef pid_t /* AC_TYPE_PID_T */ +#undef uid_t /* AC_TYPE_UID_T */ #undef ut_name /* CF_UTMP */ #undef ut_xstatus /* CF_UTMP_UT_XSTATUS */ #undef ut_xtime /* CF_UTMP_UT_XTIME */ @@ -247,7 +251,7 @@ * U/Win defines vfork() as a macro in vfork.h, which is included from unistd.h. */ #ifndef HAVE_VFORK_H -#undef vfork /* defined by AC_FUNC_FORK */ +#undef vfork /* AC_FUNC_FORK */ #endif /* 'const' may be defined externally by the compiler-wrapper, as in 'unproto' @@ -6871,7 +6871,7 @@ if test "${with_screen+set}" = set; then withval="$with_screen" case $withval in -curses|ncurses|pdcurses|slang) +curses|ncurses|ncursesw|pdcurses|slang) cf_cv_screen=$withval ;; *) { echo "configure: error: Unexpected value" 1>&2; exit 1; } @@ -6886,7 +6886,7 @@ fi echo "$ac_t""$cf_cv_screen" 1>&6 case $cf_cv_screen in -ncurses|slang) +ncurses|ncursesw|slang) ;; pdcurses) cf_cv_ncurses_header=xcurses.h @@ -7611,20 +7611,19 @@ esac ;; ncurses) -echo $ac_n "checking for ncurses header in include-path""... $ac_c" 1>&6 -echo "configure:7616: checking for ncurses header in include-path" >&5 +cf_ncuhdr_root=ncurses +echo $ac_n "checking for $cf_ncuhdr_root header in include-path""... $ac_c" 1>&6 +echo "configure:7617: checking for $cf_ncuhdr_root header in include-path" >&5 if eval "test \"`echo '$''{'cf_cv_ncurses_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - for cf_header in \ - curses.h \ - ncurses.h \ - ncurses/curses.h \ - ncurses/ncurses.h + cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h" + test "$cf_ncuhdr_root" = ncurses && cf_header_list="curses.h ncurses.h $cf_header_list" + for cf_header in $cf_header_list do cat > conftest.$ac_ext <<EOF -#line 7628 "configure" +#line 7627 "configure" #include "confdefs.h" #include <$cf_header> int main() { @@ -7642,7 +7641,7 @@ make an error ; return 0; } EOF -if { (eval echo configure:7646: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:7645: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_ncurses_h=$cf_header; break @@ -7662,38 +7661,38 @@ echo "$ac_t""$cf_cv_ncurses_h" 1>&6 if test "$cf_cv_ncurses_h" != no ; then cf_cv_ncurses_header=$cf_cv_ncurses_h else -echo $ac_n "checking for ncurses include-path""... $ac_c" 1>&6 -echo "configure:7667: checking for ncurses include-path" >&5 +echo $ac_n "checking for $cf_ncuhdr_root include-path""... $ac_c" 1>&6 +echo "configure:7666: checking for $cf_ncuhdr_root include-path" >&5 if eval "test \"`echo '$''{'cf_cv_ncurses_h2'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cf_search="" +test "$prefix" != /usr/local && \ +test -d /usr/local && \ +cf_search="$cf_search /usr/local/include /usr/local/include/$cf_ncuhdr_root /usr/local/$cf_ncuhdr_root/include" + test "$includedir" != NONE && \ test -d "$includedir" && \ -cf_search="$cf_search $includedir $includedir/ncurses" +cf_search="$cf_search $includedir $includedir/$cf_ncuhdr_root" test "$oldincludedir" != NONE && \ test -d "$oldincludedir" && \ -cf_search="$cf_search $oldincludedir $oldincludedir/ncurses" +cf_search="$cf_search $oldincludedir $oldincludedir/$cf_ncuhdr_root" test "$prefix" != NONE && \ test -d "$prefix" && \ -cf_search="$cf_search $prefix/include $prefix/include/ncurses $prefix/ncurses/include" - -test "$prefix" != /usr/local && \ -test -d /usr/local && \ -cf_search="$cf_search /usr/local/include /usr/local/include/ncurses /usr/local/ncurses/include" +cf_search="$cf_search $prefix/include $prefix/include/$cf_ncuhdr_root $prefix/$cf_ncuhdr_root/include" test "$prefix" != /usr && \ -cf_search="$cf_search /usr/include /usr/include/ncurses /usr/ncurses/include" +cf_search="$cf_search /usr/include /usr/include/$cf_ncuhdr_root /usr/$cf_ncuhdr_root/include" test "$prefix" != /opt && \ test -d /opt && \ -cf_search="$cf_search /opt/include /opt/include/ncurses /opt/ncurses/include" +cf_search="$cf_search /opt/include /opt/include/$cf_ncuhdr_root /opt/$cf_ncuhdr_root/include" -cf_search="$cf_search $HOME/lib $HOME/lib/ncurses $HOME/ncurses/lib" +cf_search="$cf_search $HOME/lib $HOME/lib/$cf_ncuhdr_root $HOME/$cf_ncuhdr_root/lib" test -n "$verbose" && echo for cf_incdir in $cf_search @@ -7722,8 +7721,8 @@ echo "$ac_t""$cf_cv_ncurses_h2" 1>&6 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2` echo cf_1st_include=$cf_1st_incdir echo cf_2nd_include=$cf_2nd_incdir - if test `basename $cf_1st_incdir` = ncurses ; then - cf_cv_ncurses_header=ncurses/$cf_cv_ncurses_header + if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then + cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header for cf_add_incdir in $cf_2nd_incdir do @@ -7786,11 +7785,17 @@ ncurses/curses.h|ncurses/ncurses.h) EOF ;; +ncursesw/curses.h|ncursesw/ncurses.h) + cat >> confdefs.h <<\EOF +#define HAVE_NCURSESW_NCURSES_H 1 +EOF + + ;; esac echo $ac_n "checking for ncurses version""... $ac_c" 1>&6 -echo "configure:7794: checking for ncurses version" >&5 +echo "configure:7799: checking for ncurses version" >&5 if eval "test \"`echo '$''{'cf_cv_ncurses_version'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -7816,7 +7821,7 @@ Autoconf "old" #endif EOF cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out" - { (eval echo configure:7820: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; } + { (eval echo configure:7825: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; } if test -f conftest.out ; then cf_out=`cat conftest.out | sed -e 's@^Autoconf @@' -e 's@^[^"]*"@@' -e 's@".*@@'` test -n "$cf_out" && cf_cv_ncurses_version="$cf_out" @@ -7825,7 +7830,7 @@ EOF else cat > conftest.$ac_ext <<EOF -#line 7829 "configure" +#line 7834 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header-curses.h}> @@ -7849,7 +7854,7 @@ int main() exit(0); } EOF -if { (eval echo configure:7853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:7858: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then cf_cv_ncurses_version=`cat $cf_tempfile` @@ -7873,13 +7878,14 @@ EOF +cf_nculib_root=ncurses # This works, except for the special case where we find gpm, but # ncurses is in a nonstandard location via $LIBS, and we really want # to link gpm. cf_ncurses_LIBS="" cf_ncurses_SAVE="$LIBS" echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6 -echo "configure:7883: checking for Gpm_Open in -lgpm" >&5 +echo "configure:7889: checking for Gpm_Open in -lgpm" >&5 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7887,7 +7893,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lgpm $LIBS" cat > conftest.$ac_ext <<EOF -#line 7891 "configure" +#line 7897 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -7898,7 +7904,7 @@ int main() { Gpm_Open() ; return 0; } EOF -if { (eval echo configure:7902: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7908: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7914,7 +7920,7 @@ fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 echo $ac_n "checking for initscr in -lgpm""... $ac_c" 1>&6 -echo "configure:7918: checking for initscr in -lgpm" >&5 +echo "configure:7924: checking for initscr in -lgpm" >&5 ac_lib_var=`echo gpm'_'initscr | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7922,7 +7928,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lgpm $LIBS" cat > conftest.$ac_ext <<EOF -#line 7926 "configure" +#line 7932 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -7933,7 +7939,7 @@ int main() { initscr() ; return 0; } EOF -if { (eval echo configure:7937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7943: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7964,7 +7970,7 @@ freebsd*) # This is only necessary if you are linking against an obsolete # version of ncurses (but it should do no harm, since it's static). echo $ac_n "checking for tgoto in -lmytinfo""... $ac_c" 1>&6 -echo "configure:7968: checking for tgoto in -lmytinfo" >&5 +echo "configure:7974: checking for tgoto in -lmytinfo" >&5 ac_lib_var=`echo mytinfo'_'tgoto | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7972,7 +7978,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lmytinfo $LIBS" cat > conftest.$ac_ext <<EOF -#line 7976 "configure" +#line 7982 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -7983,7 +7989,7 @@ int main() { tgoto() ; return 0; } EOF -if { (eval echo configure:7987: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7993: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8008,15 +8014,15 @@ esac LIBS="$cf_ncurses_LIBS $LIBS" - eval 'cf_cv_have_lib_'ncurses'=no' + eval 'cf_cv_have_lib_'$cf_nculib_root'=no' cf_libdir="" echo $ac_n "checking for initscr""... $ac_c" 1>&6 -echo "configure:8015: checking for initscr" >&5 +echo "configure:8021: checking for initscr" >&5 if eval "test \"`echo '$''{'ac_cv_func_initscr'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 8020 "configure" +#line 8026 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char initscr(); below. */ @@ -8039,7 +8045,7 @@ initscr(); ; return 0; } EOF -if { (eval echo configure:8043: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8049: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_initscr=yes" else @@ -8053,26 +8059,26 @@ fi if eval "test \"`echo '$ac_cv_func_'initscr`\" = yes"; then echo "$ac_t""yes" 1>&6 - eval 'cf_cv_have_lib_'ncurses'=yes' + eval 'cf_cv_have_lib_'$cf_nculib_root'=yes' else echo "$ac_t""no" 1>&6 cf_save_LIBS="$LIBS" - echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6 -echo "configure:8063: checking for initscr in -lncurses" >&5 - LIBS="-lncurses $LIBS" + echo $ac_n "checking for initscr in -l$cf_nculib_root""... $ac_c" 1>&6 +echo "configure:8069: checking for initscr in -l$cf_nculib_root" >&5 + LIBS="-l$cf_nculib_root $LIBS" cat > conftest.$ac_ext <<EOF -#line 8066 "configure" +#line 8072 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header-curses.h}> int main() { initscr() ; return 0; } EOF -if { (eval echo configure:8073: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8079: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "$ac_t""yes" 1>&6 - eval 'cf_cv_have_lib_'ncurses'=yes' + eval 'cf_cv_have_lib_'$cf_nculib_root'=yes' else echo "configure: failed program was:" >&5 @@ -8081,52 +8087,766 @@ else echo "$ac_t""no" 1>&6 cf_search="" +test "$prefix" != /usr/local && \ +test -d /usr/local && \ +cf_search="$cf_search /usr/local/lib /usr/local/lib/$cf_nculib_root /usr/local/$cf_nculib_root/lib" + test "$libdir" != NONE && \ test -d $libdir && \ -cf_search="$cf_search $libdir $libdir/ncurses" +cf_search="$cf_search $libdir $libdir/$cf_nculib_root" test "$exec_prefix" != NONE && \ test -d $exec_prefix && \ -cf_search="$cf_search $exec_prefix/lib $exec_prefix/lib/ncurses" +cf_search="$cf_search $exec_prefix/lib $exec_prefix/lib/$cf_nculib_root" test "$prefix" != NONE && \ test "$prefix" != "$exec_prefix" && \ test -d $prefix && \ -cf_search="$cf_search $prefix/lib $prefix/lib/ncurses $prefix/ncurses/lib" +cf_search="$cf_search $prefix/lib $prefix/lib/$cf_nculib_root $prefix/$cf_nculib_root/lib" + +test "$prefix" != /usr && \ +cf_search="$cf_search /usr/lib /usr/lib/$cf_nculib_root /usr/$cf_nculib_root/lib" + +test "$prefix" != / && \ +cf_search="$cf_search /lib /lib/$cf_nculib_root /$cf_nculib_root/lib" + +test "$prefix" != /opt && \ +test -d /opt && \ +cf_search="$cf_search /opt/lib /opt/lib/$cf_nculib_root /opt/$cf_nculib_root/lib" + +cf_search="$cf_search $HOME/lib $HOME/lib/$cf_nculib_root $HOME/$cf_nculib_root/lib" + + for cf_libdir in $cf_search + do + echo $ac_n "checking for -l$cf_nculib_root in $cf_libdir""... $ac_c" 1>&6 +echo "configure:8123: checking for -l$cf_nculib_root in $cf_libdir" >&5 + LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS" + cat > conftest.$ac_ext <<EOF +#line 8126 "configure" +#include "confdefs.h" +#include <${cf_cv_ncurses_header-curses.h}> +int main() { +initscr() +; return 0; } +EOF +if { (eval echo configure:8133: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + echo "$ac_t""yes" 1>&6 + eval 'cf_cv_have_lib_'$cf_nculib_root'=yes' + break +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + echo "$ac_t""no" 1>&6 + LIBS="$cf_save_LIBS" +fi +rm -f conftest* + done + +fi +rm -f conftest* + +fi + +eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root + +if test $cf_found_library = no ; then + { echo "configure: error: Cannot link $cf_nculib_root library" 1>&2; exit 1; } +fi + + + +if test -n "$cf_ncurses_LIBS" ; then + echo $ac_n "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS""... $ac_c" 1>&6 +echo "configure:8163: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5 + cf_ncurses_SAVE="$LIBS" + for p in $cf_ncurses_LIBS ; do + q=`echo $LIBS | sed -e 's/'$p' //' -e 's/'$p'$//'` + if test "$q" != "$LIBS" ; then + LIBS="$q" + fi + done + cat > conftest.$ac_ext <<EOF +#line 8172 "configure" +#include "confdefs.h" +#include <${cf_cv_ncurses_header-curses.h}> +int main() { +initscr(); mousemask(0,0); tgoto((char *)0, 0, 0); +; return 0; } +EOF +if { (eval echo configure:8179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + echo "$ac_t""yes" 1>&6 +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + echo "$ac_t""no" 1>&6 + LIBS="$cf_ncurses_SAVE" +fi +rm -f conftest* +fi + + +echo $ac_n "checking for ncurses version""... $ac_c" 1>&6 +echo "configure:8194: checking for ncurses version" >&5 +if eval "test \"`echo '$''{'cf_cv_ncurses_version'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + cf_cv_ncurses_version=no + cf_tempfile=out$$ + rm -f $cf_tempfile + if test "$cross_compiling" = yes; then + + + # This will not work if the preprocessor splits the line after the + # Autoconf token. The 'unproto' program does that. + cat > conftest.$ac_ext <<EOF +#include <${cf_cv_ncurses_header-curses.h}> +#undef Autoconf +#ifdef NCURSES_VERSION +Autoconf NCURSES_VERSION +#else +#ifdef __NCURSES_H +Autoconf "old" +#endif +; +#endif +EOF + cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out" + { (eval echo configure:8220: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; } + if test -f conftest.out ; then + cf_out=`cat conftest.out | sed -e 's@^Autoconf @@' -e 's@^[^"]*"@@' -e 's@".*@@'` + test -n "$cf_out" && cf_cv_ncurses_version="$cf_out" + rm -f conftest.out + fi + +else + cat > conftest.$ac_ext <<EOF +#line 8229 "configure" +#include "confdefs.h" + +#include <${cf_cv_ncurses_header-curses.h}> +#include <stdio.h> +int main() +{ + FILE *fp = fopen("$cf_tempfile", "w"); +#ifdef NCURSES_VERSION +# ifdef NCURSES_VERSION_PATCH + fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH); +# else + fprintf(fp, "%s\n", NCURSES_VERSION); +# endif +#else +# ifdef __NCURSES_H + fprintf(fp, "old\n"); +# else + make an error +# endif +#endif + exit(0); +} +EOF +if { (eval echo configure:8253: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + + cf_cv_ncurses_version=`cat $cf_tempfile` +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 +fi +rm -fr conftest* +fi + + rm -f $cf_tempfile + +fi + +echo "$ac_t""$cf_cv_ncurses_version" 1>&6 +test "$cf_cv_ncurses_version" = no || cat >> confdefs.h <<\EOF +#define NCURSES 1 +EOF + + + ;; +ncursesw) + +echo $ac_n "checking for multibyte character support""... $ac_c" 1>&6 +echo "configure:8278: checking for multibyte character support" >&5 +if eval "test \"`echo '$''{'cf_cv_utf8_lib'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +cat > conftest.$ac_ext <<EOF +#line 8284 "configure" +#include "confdefs.h" + +#include <stdlib.h> +int main() { +putwc(0,0); +; return 0; } +EOF +if { (eval echo configure:8292: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + cf_cv_utf8_lib=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + +cf_save_LIBS="$LIBS" +LIBS="-lutf8 $LIBS" +cat > conftest.$ac_ext <<EOF +#line 8303 "configure" +#include "confdefs.h" + +#include <libutf8.h> +int main() { +putwc(0,0); +; return 0; } +EOF +if { (eval echo configure:8311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + cf_cv_utf8_lib=add-on +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + cf_cv_utf8_lib=no +fi +rm -f conftest* +fi +rm -f conftest* + +fi + +echo "$ac_t""$cf_cv_utf8_lib" 1>&6 + + +cf_ncuhdr_root=ncursesw +echo $ac_n "checking for $cf_ncuhdr_root header in include-path""... $ac_c" 1>&6 +echo "configure:8331: checking for $cf_ncuhdr_root header in include-path" >&5 +if eval "test \"`echo '$''{'cf_cv_ncurses_h'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h" + test "$cf_ncuhdr_root" = ncurses && cf_header_list="curses.h ncurses.h $cf_header_list" + for cf_header in $cf_header_list + do + cat > conftest.$ac_ext <<EOF +#line 8341 "configure" +#include "confdefs.h" +#include <$cf_header> +int main() { + +#ifdef NCURSES_VERSION +printf("%s\n", NCURSES_VERSION); +#else +#ifdef __NCURSES_H +printf("old\n"); +#else +make an error +#endif +#endif + + +; return 0; } +EOF +if { (eval echo configure:8359: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + cf_cv_ncurses_h=$cf_header; break + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + cf_cv_ncurses_h=no +fi +rm -f conftest* + done + +fi + +echo "$ac_t""$cf_cv_ncurses_h" 1>&6 + +if test "$cf_cv_ncurses_h" != no ; then + cf_cv_ncurses_header=$cf_cv_ncurses_h +else +echo $ac_n "checking for $cf_ncuhdr_root include-path""... $ac_c" 1>&6 +echo "configure:8380: checking for $cf_ncuhdr_root include-path" >&5 +if eval "test \"`echo '$''{'cf_cv_ncurses_h2'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + cf_search="" + +test "$prefix" != /usr/local && \ +test -d /usr/local && \ +cf_search="$cf_search /usr/local/include /usr/local/include/$cf_ncuhdr_root /usr/local/$cf_ncuhdr_root/include" + +test "$includedir" != NONE && \ +test -d "$includedir" && \ +cf_search="$cf_search $includedir $includedir/$cf_ncuhdr_root" + +test "$oldincludedir" != NONE && \ +test -d "$oldincludedir" && \ +cf_search="$cf_search $oldincludedir $oldincludedir/$cf_ncuhdr_root" + +test "$prefix" != NONE && \ +test -d "$prefix" && \ +cf_search="$cf_search $prefix/include $prefix/include/$cf_ncuhdr_root $prefix/$cf_ncuhdr_root/include" + +test "$prefix" != /usr && \ +cf_search="$cf_search /usr/include /usr/include/$cf_ncuhdr_root /usr/$cf_ncuhdr_root/include" + +test "$prefix" != /opt && \ +test -d /opt && \ +cf_search="$cf_search /opt/include /opt/include/$cf_ncuhdr_root /opt/$cf_ncuhdr_root/include" + +cf_search="$cf_search $HOME/lib $HOME/lib/$cf_ncuhdr_root $HOME/$cf_ncuhdr_root/lib" + + test -n "$verbose" && echo + for cf_incdir in $cf_search + do + for cf_header in \ + ncurses.h \ + curses.h + do + if egrep "NCURSES_[VH]" $cf_incdir/$cf_header 1>&5 2>&1; then + cf_cv_ncurses_h2=$cf_incdir/$cf_header + test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6 + break + fi + test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6 + done + test -n "$cf_cv_ncurses_h2" && break + done + test -z "$cf_cv_ncurses_h2" && { echo "configure: error: not found" 1>&2; exit 1; } + +fi + +echo "$ac_t""$cf_cv_ncurses_h2" 1>&6 + + cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's:/[^/]*$::'` + cf_2nd_incdir=`echo $cf_1st_incdir | sed -e 's:/[^/]*$::'` + cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2` + echo cf_1st_include=$cf_1st_incdir + echo cf_2nd_include=$cf_2nd_incdir + if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then + cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header + +for cf_add_incdir in $cf_2nd_incdir +do + while true + do + case $cf_add_incdir in + /usr/include) # (vi + ;; + *) # (vi + CPPFLAGS="$CPPFLAGS -I$cf_add_incdir" + ;; + esac + cf_top_incdir=`echo $cf_add_incdir | sed -e 's:/include/.*$:/include:'` + test "$cf_top_incdir" = "$cf_add_incdir" && break + cf_add_incdir="$cf_top_incdir" + done +done + + fi + +for cf_add_incdir in $cf_1st_incdir +do + while true + do + case $cf_add_incdir in + /usr/include) # (vi + ;; + *) # (vi + CPPFLAGS="$CPPFLAGS -I$cf_add_incdir" + ;; + esac + cf_top_incdir=`echo $cf_add_incdir | sed -e 's:/include/.*$:/include:'` + test "$cf_top_incdir" = "$cf_add_incdir" && break + cf_add_incdir="$cf_top_incdir" + done +done + + +fi + +cat >> confdefs.h <<\EOF +#define NCURSES 1 +EOF + + + +case $cf_cv_ncurses_header in # (vi +*ncurses.h) + cat >> confdefs.h <<\EOF +#define HAVE_NCURSES_H 1 +EOF + + ;; +esac + +case $cf_cv_ncurses_header in # (vi +ncurses/curses.h|ncurses/ncurses.h) + cat >> confdefs.h <<\EOF +#define HAVE_NCURSES_NCURSES_H 1 +EOF + + ;; +ncursesw/curses.h|ncursesw/ncurses.h) + cat >> confdefs.h <<\EOF +#define HAVE_NCURSESW_NCURSES_H 1 +EOF + + ;; +esac + + +echo $ac_n "checking for ncurses version""... $ac_c" 1>&6 +echo "configure:8513: checking for ncurses version" >&5 +if eval "test \"`echo '$''{'cf_cv_ncurses_version'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + cf_cv_ncurses_version=no + cf_tempfile=out$$ + rm -f $cf_tempfile + if test "$cross_compiling" = yes; then + + + # This will not work if the preprocessor splits the line after the + # Autoconf token. The 'unproto' program does that. + cat > conftest.$ac_ext <<EOF +#include <${cf_cv_ncurses_header-curses.h}> +#undef Autoconf +#ifdef NCURSES_VERSION +Autoconf NCURSES_VERSION +#else +#ifdef __NCURSES_H +Autoconf "old" +#endif +; +#endif +EOF + cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out" + { (eval echo configure:8539: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; } + if test -f conftest.out ; then + cf_out=`cat conftest.out | sed -e 's@^Autoconf @@' -e 's@^[^"]*"@@' -e 's@".*@@'` + test -n "$cf_out" && cf_cv_ncurses_version="$cf_out" + rm -f conftest.out + fi + +else + cat > conftest.$ac_ext <<EOF +#line 8548 "configure" +#include "confdefs.h" + +#include <${cf_cv_ncurses_header-curses.h}> +#include <stdio.h> +int main() +{ + FILE *fp = fopen("$cf_tempfile", "w"); +#ifdef NCURSES_VERSION +# ifdef NCURSES_VERSION_PATCH + fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH); +# else + fprintf(fp, "%s\n", NCURSES_VERSION); +# endif +#else +# ifdef __NCURSES_H + fprintf(fp, "old\n"); +# else + make an error +# endif +#endif + exit(0); +} +EOF +if { (eval echo configure:8572: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + + cf_cv_ncurses_version=`cat $cf_tempfile` +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 +fi +rm -fr conftest* +fi + + rm -f $cf_tempfile + +fi + +echo "$ac_t""$cf_cv_ncurses_version" 1>&6 +test "$cf_cv_ncurses_version" = no || cat >> confdefs.h <<\EOF +#define NCURSES 1 +EOF + + + + + +cf_nculib_root=ncursesw + # This works, except for the special case where we find gpm, but + # ncurses is in a nonstandard location via $LIBS, and we really want + # to link gpm. +cf_ncurses_LIBS="" +cf_ncurses_SAVE="$LIBS" +echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6 +echo "configure:8603: checking for Gpm_Open in -lgpm" >&5 +ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lgpm $LIBS" +cat > conftest.$ac_ext <<EOF +#line 8611 "configure" +#include "confdefs.h" +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char Gpm_Open(); + +int main() { +Gpm_Open() +; return 0; } +EOF +if { (eval echo configure:8622: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + echo $ac_n "checking for initscr in -lgpm""... $ac_c" 1>&6 +echo "configure:8638: checking for initscr in -lgpm" >&5 +ac_lib_var=`echo gpm'_'initscr | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lgpm $LIBS" +cat > conftest.$ac_ext <<EOF +#line 8646 "configure" +#include "confdefs.h" +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char initscr(); + +int main() { +initscr() +; return 0; } +EOF +if { (eval echo configure:8657: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + LIBS="$cf_ncurses_SAVE" +else + echo "$ac_t""no" 1>&6 +cf_ncurses_LIBS="-lgpm" +fi + +else + echo "$ac_t""no" 1>&6 +fi + + +case $host_os in #(vi +freebsd*) + # This is only necessary if you are linking against an obsolete + # version of ncurses (but it should do no harm, since it's static). + echo $ac_n "checking for tgoto in -lmytinfo""... $ac_c" 1>&6 +echo "configure:8688: checking for tgoto in -lmytinfo" >&5 +ac_lib_var=`echo mytinfo'_'tgoto | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lmytinfo $LIBS" +cat > conftest.$ac_ext <<EOF +#line 8696 "configure" +#include "confdefs.h" +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char tgoto(); + +int main() { +tgoto() +; return 0; } +EOF +if { (eval echo configure:8707: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS" +else + echo "$ac_t""no" 1>&6 +fi + + ;; +esac + +LIBS="$cf_ncurses_LIBS $LIBS" + + eval 'cf_cv_have_lib_'$cf_nculib_root'=no' + cf_libdir="" + echo $ac_n "checking for initscr""... $ac_c" 1>&6 +echo "configure:8735: checking for initscr" >&5 +if eval "test \"`echo '$''{'ac_cv_func_initscr'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 8740 "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char initscr(); below. */ +#include <assert.h> +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char initscr(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_initscr) || defined (__stub___initscr) +choke me +#else +initscr(); +#endif + +; return 0; } +EOF +if { (eval echo configure:8763: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_initscr=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_initscr=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'initscr`\" = yes"; then + echo "$ac_t""yes" 1>&6 + eval 'cf_cv_have_lib_'$cf_nculib_root'=yes' +else + echo "$ac_t""no" 1>&6 + + cf_save_LIBS="$LIBS" + echo $ac_n "checking for initscr in -l$cf_nculib_root""... $ac_c" 1>&6 +echo "configure:8783: checking for initscr in -l$cf_nculib_root" >&5 + LIBS="-l$cf_nculib_root $LIBS" + cat > conftest.$ac_ext <<EOF +#line 8786 "configure" +#include "confdefs.h" +#include <${cf_cv_ncurses_header-curses.h}> +int main() { +initscr() +; return 0; } +EOF +if { (eval echo configure:8793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + echo "$ac_t""yes" 1>&6 + eval 'cf_cv_have_lib_'$cf_nculib_root'=yes' + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + echo "$ac_t""no" 1>&6 + cf_search="" test "$prefix" != /usr/local && \ test -d /usr/local && \ -cf_search="$cf_search /usr/local/lib /usr/local/lib/ncurses /usr/local/ncurses/lib" +cf_search="$cf_search /usr/local/lib /usr/local/lib/$cf_nculib_root /usr/local/$cf_nculib_root/lib" + +test "$libdir" != NONE && \ +test -d $libdir && \ +cf_search="$cf_search $libdir $libdir/$cf_nculib_root" + +test "$exec_prefix" != NONE && \ +test -d $exec_prefix && \ +cf_search="$cf_search $exec_prefix/lib $exec_prefix/lib/$cf_nculib_root" + +test "$prefix" != NONE && \ +test "$prefix" != "$exec_prefix" && \ +test -d $prefix && \ +cf_search="$cf_search $prefix/lib $prefix/lib/$cf_nculib_root $prefix/$cf_nculib_root/lib" test "$prefix" != /usr && \ -cf_search="$cf_search /usr/lib /usr/lib/ncurses /usr/ncurses/lib" +cf_search="$cf_search /usr/lib /usr/lib/$cf_nculib_root /usr/$cf_nculib_root/lib" test "$prefix" != / && \ -cf_search="$cf_search /lib /lib/ncurses /ncurses/lib" +cf_search="$cf_search /lib /lib/$cf_nculib_root /$cf_nculib_root/lib" test "$prefix" != /opt && \ test -d /opt && \ -cf_search="$cf_search /opt/lib /opt/lib/ncurses /opt/ncurses/lib" +cf_search="$cf_search /opt/lib /opt/lib/$cf_nculib_root /opt/$cf_nculib_root/lib" -cf_search="$cf_search $HOME/lib $HOME/lib/ncurses $HOME/ncurses/lib" +cf_search="$cf_search $HOME/lib $HOME/lib/$cf_nculib_root $HOME/$cf_nculib_root/lib" for cf_libdir in $cf_search do - echo $ac_n "checking for -lncurses in $cf_libdir""... $ac_c" 1>&6 -echo "configure:8117: checking for -lncurses in $cf_libdir" >&5 - LIBS="-L$cf_libdir -lncurses $cf_save_LIBS" + echo $ac_n "checking for -l$cf_nculib_root in $cf_libdir""... $ac_c" 1>&6 +echo "configure:8837: checking for -l$cf_nculib_root in $cf_libdir" >&5 + LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS" cat > conftest.$ac_ext <<EOF -#line 8120 "configure" +#line 8840 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header-curses.h}> int main() { initscr() ; return 0; } EOF -if { (eval echo configure:8127: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8847: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "$ac_t""yes" 1>&6 - eval 'cf_cv_have_lib_'ncurses'=yes' + eval 'cf_cv_have_lib_'$cf_nculib_root'=yes' break else echo "configure: failed program was:" >&5 @@ -8143,17 +8863,17 @@ rm -f conftest* fi -eval 'cf_found_library=$cf_cv_have_lib_'ncurses +eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root if test $cf_found_library = no ; then - { echo "configure: error: Cannot link ncurses library" 1>&2; exit 1; } + { echo "configure: error: Cannot link $cf_nculib_root library" 1>&2; exit 1; } fi if test -n "$cf_ncurses_LIBS" ; then - echo $ac_n "checking if we can link ncurses without $cf_ncurses_LIBS""... $ac_c" 1>&6 -echo "configure:8157: checking if we can link ncurses without $cf_ncurses_LIBS" >&5 + echo $ac_n "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS""... $ac_c" 1>&6 +echo "configure:8877: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5 cf_ncurses_SAVE="$LIBS" for p in $cf_ncurses_LIBS ; do q=`echo $LIBS | sed -e 's/'$p' //' -e 's/'$p'$//'` @@ -8162,14 +8882,14 @@ echo "configure:8157: checking if we can link ncurses without $cf_ncurses_LIBS" fi done cat > conftest.$ac_ext <<EOF -#line 8166 "configure" +#line 8886 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header-curses.h}> int main() { initscr(); mousemask(0,0); tgoto((char *)0, 0, 0); ; return 0; } EOF -if { (eval echo configure:8173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "$ac_t""yes" 1>&6 else @@ -8184,7 +8904,7 @@ fi echo $ac_n "checking for ncurses version""... $ac_c" 1>&6 -echo "configure:8188: checking for ncurses version" >&5 +echo "configure:8908: checking for ncurses version" >&5 if eval "test \"`echo '$''{'cf_cv_ncurses_version'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8210,7 +8930,7 @@ Autoconf "old" #endif EOF cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out" - { (eval echo configure:8214: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; } + { (eval echo configure:8934: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; } if test -f conftest.out ; then cf_out=`cat conftest.out | sed -e 's@^Autoconf @@' -e 's@^[^"]*"@@' -e 's@".*@@'` test -n "$cf_out" && cf_cv_ncurses_version="$cf_out" @@ -8219,7 +8939,7 @@ EOF else cat > conftest.$ac_ext <<EOF -#line 8223 "configure" +#line 8943 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header-curses.h}> @@ -8243,7 +8963,7 @@ int main() exit(0); } EOF -if { (eval echo configure:8247: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:8967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then cf_cv_ncurses_version=`cat $cf_tempfile` @@ -8271,20 +8991,20 @@ pdcurses) slang) echo $ac_n "checking for slang header file""... $ac_c" 1>&6 -echo "configure:8275: checking for slang header file" >&5 +echo "configure:8995: checking for slang header file" >&5 if eval "test \"`echo '$''{'cf_cv_slang_header'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 8281 "configure" +#line 9001 "configure" #include "confdefs.h" #include <slang.h> int main() { printf("%s\n", SLANG_VERSION) ; return 0; } EOF -if { (eval echo configure:8288: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9008: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_slang_header=predefined else @@ -8294,6 +9014,10 @@ else cf_search="" +test "$prefix" != /usr/local && \ +test -d /usr/local && \ +cf_search="$cf_search /usr/local/include /usr/local/include/slang /usr/local/slang/include" + test "$includedir" != NONE && \ test -d "$includedir" && \ cf_search="$cf_search $includedir $includedir/slang" @@ -8306,10 +9030,6 @@ test "$prefix" != NONE && \ test -d "$prefix" && \ cf_search="$cf_search $prefix/include $prefix/include/slang $prefix/slang/include" -test "$prefix" != /usr/local && \ -test -d /usr/local && \ -cf_search="$cf_search /usr/local/include /usr/local/include/slang /usr/local/slang/include" - test "$prefix" != /usr && \ cf_search="$cf_search /usr/include /usr/include/slang /usr/slang/include" @@ -8380,24 +9100,24 @@ else cf_cv_termlib=none cat > conftest.$ac_ext <<EOF -#line 8384 "configure" +#line 9104 "configure" #include "confdefs.h" int main() { char *x=(char*)tgoto("",0,0) ; return 0; } EOF -if { (eval echo configure:8391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9111: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cat > conftest.$ac_ext <<EOF -#line 8394 "configure" +#line 9114 "configure" #include "confdefs.h" int main() { int x=tigetstr("") ; return 0; } EOF -if { (eval echo configure:8401: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9121: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cf_cv_termlib=terminfo else @@ -8426,16 +9146,16 @@ if test "$cf_cv_termlib" = none; then for cf_func in tigetstr tgetstr do echo $ac_n "checking for $cf_func in -l$cf_lib""... $ac_c" 1>&6 -echo "configure:8430: checking for $cf_func in -l$cf_lib" >&5 +echo "configure:9150: checking for $cf_func in -l$cf_lib" >&5 cat > conftest.$ac_ext <<EOF -#line 8432 "configure" +#line 9152 "configure" #include "confdefs.h" int main() { int x=$cf_func("") ; return 0; } EOF -if { (eval echo configure:8439: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9159: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cf_result=yes else @@ -8462,7 +9182,7 @@ fi if test "$cf_cv_termlib" = none; then # allow curses library for broken AIX system. echo $ac_n "checking for initscr in -lcurses""... $ac_c" 1>&6 -echo "configure:8466: checking for initscr in -lcurses" >&5 +echo "configure:9186: checking for initscr in -lcurses" >&5 ac_lib_var=`echo curses'_'initscr | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8470,7 +9190,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcurses $LIBS" cat > conftest.$ac_ext <<EOF -#line 8474 "configure" +#line 9194 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -8481,7 +9201,7 @@ int main() { initscr() ; return 0; } EOF -if { (eval echo configure:8485: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9205: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8502,7 +9222,7 @@ else fi echo $ac_n "checking for tgoto in -ltermcap""... $ac_c" 1>&6 -echo "configure:8506: checking for tgoto in -ltermcap" >&5 +echo "configure:9226: checking for tgoto in -ltermcap" >&5 ac_lib_var=`echo termcap'_'tgoto | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8510,7 +9230,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ltermcap $LIBS" cat > conftest.$ac_ext <<EOF -#line 8514 "configure" +#line 9234 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -8521,7 +9241,7 @@ int main() { tgoto() ; return 0; } EOF -if { (eval echo configure:8525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8553,12 +9273,12 @@ fi cf_slang_LIBS2="$LIBS" echo $ac_n "checking for acos""... $ac_c" 1>&6 -echo "configure:8557: checking for acos" >&5 +echo "configure:9277: checking for acos" >&5 if eval "test \"`echo '$''{'ac_cv_func_acos'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 8562 "configure" +#line 9282 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char acos(); below. */ @@ -8581,7 +9301,7 @@ acos(); ; return 0; } EOF -if { (eval echo configure:8585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9305: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_acos=yes" else @@ -8600,7 +9320,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for acos in -lm""... $ac_c" 1>&6 -echo "configure:8604: checking for acos in -lm" >&5 +echo "configure:9324: checking for acos in -lm" >&5 ac_lib_var=`echo m'_'acos | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8608,7 +9328,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lm $LIBS $LIBS" cat > conftest.$ac_ext <<EOF -#line 8612 "configure" +#line 9332 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -8619,7 +9339,7 @@ int main() { acos() ; return 0; } EOF -if { (eval echo configure:8623: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8661,12 +9381,12 @@ os2*) eval 'cf_cv_have_lib_'video'=no' cf_libdir="" echo $ac_n "checking for v_init""... $ac_c" 1>&6 -echo "configure:8665: checking for v_init" >&5 +echo "configure:9385: checking for v_init" >&5 if eval "test \"`echo '$''{'ac_cv_func_v_init'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 8670 "configure" +#line 9390 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char v_init(); below. */ @@ -8689,7 +9409,7 @@ v_init(); ; return 0; } EOF -if { (eval echo configure:8693: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_v_init=yes" else @@ -8709,17 +9429,17 @@ else cf_save_LIBS="$LIBS" echo $ac_n "checking for v_init in -lvideo""... $ac_c" 1>&6 -echo "configure:8713: checking for v_init in -lvideo" >&5 +echo "configure:9433: checking for v_init in -lvideo" >&5 LIBS="-lvideo $LIBS" cat > conftest.$ac_ext <<EOF -#line 8716 "configure" +#line 9436 "configure" #include "confdefs.h" #include <sys/video.h> int main() { v_init() ; return 0; } EOF -if { (eval echo configure:8723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "$ac_t""yes" 1>&6 eval 'cf_cv_have_lib_'video'=yes' @@ -8731,6 +9451,10 @@ else echo "$ac_t""no" 1>&6 cf_search="" +test "$prefix" != /usr/local && \ +test -d /usr/local && \ +cf_search="$cf_search /usr/local/lib /usr/local/lib/video /usr/local/video/lib" + test "$libdir" != NONE && \ test -d $libdir && \ cf_search="$cf_search $libdir $libdir/video" @@ -8744,10 +9468,6 @@ test "$prefix" != "$exec_prefix" && \ test -d $prefix && \ cf_search="$cf_search $prefix/lib $prefix/lib/video $prefix/video/lib" -test "$prefix" != /usr/local && \ -test -d /usr/local && \ -cf_search="$cf_search /usr/local/lib /usr/local/lib/video /usr/local/video/lib" - test "$prefix" != /usr && \ cf_search="$cf_search /usr/lib /usr/lib/video /usr/video/lib" @@ -8763,17 +9483,17 @@ cf_search="$cf_search $HOME/lib $HOME/lib/video $HOME/video/lib" for cf_libdir in $cf_search do echo $ac_n "checking for -lvideo in $cf_libdir""... $ac_c" 1>&6 -echo "configure:8767: checking for -lvideo in $cf_libdir" >&5 +echo "configure:9487: checking for -lvideo in $cf_libdir" >&5 LIBS="-L$cf_libdir -lvideo $cf_save_LIBS" cat > conftest.$ac_ext <<EOF -#line 8770 "configure" +#line 9490 "configure" #include "confdefs.h" #include <sys/video.h> int main() { v_init() ; return 0; } EOF -if { (eval echo configure:8777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9497: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "$ac_t""yes" 1>&6 eval 'cf_cv_have_lib_'video'=yes' @@ -8806,12 +9526,12 @@ esac eval 'cf_cv_have_lib_'slang'=no' cf_libdir="" echo $ac_n "checking for SLtt_get_screen_size""... $ac_c" 1>&6 -echo "configure:8810: checking for SLtt_get_screen_size" >&5 +echo "configure:9530: checking for SLtt_get_screen_size" >&5 if eval "test \"`echo '$''{'ac_cv_func_SLtt_get_screen_size'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 8815 "configure" +#line 9535 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char SLtt_get_screen_size(); below. */ @@ -8834,7 +9554,7 @@ SLtt_get_screen_size(); ; return 0; } EOF -if { (eval echo configure:8838: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9558: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_SLtt_get_screen_size=yes" else @@ -8854,17 +9574,17 @@ else cf_save_LIBS="$LIBS" echo $ac_n "checking for SLtt_get_screen_size in -lslang""... $ac_c" 1>&6 -echo "configure:8858: checking for SLtt_get_screen_size in -lslang" >&5 +echo "configure:9578: checking for SLtt_get_screen_size in -lslang" >&5 LIBS="-lslang $LIBS" cat > conftest.$ac_ext <<EOF -#line 8861 "configure" +#line 9581 "configure" #include "confdefs.h" #include <slang.h> int main() { SLtt_get_screen_size() ; return 0; } EOF -if { (eval echo configure:8868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "$ac_t""yes" 1>&6 eval 'cf_cv_have_lib_'slang'=yes' @@ -8876,6 +9596,10 @@ else echo "$ac_t""no" 1>&6 cf_search="" +test "$prefix" != /usr/local && \ +test -d /usr/local && \ +cf_search="$cf_search /usr/local/lib /usr/local/lib/slang /usr/local/slang/lib" + test "$libdir" != NONE && \ test -d $libdir && \ cf_search="$cf_search $libdir $libdir/slang" @@ -8889,10 +9613,6 @@ test "$prefix" != "$exec_prefix" && \ test -d $prefix && \ cf_search="$cf_search $prefix/lib $prefix/lib/slang $prefix/slang/lib" -test "$prefix" != /usr/local && \ -test -d /usr/local && \ -cf_search="$cf_search /usr/local/lib /usr/local/lib/slang /usr/local/slang/lib" - test "$prefix" != /usr && \ cf_search="$cf_search /usr/lib /usr/lib/slang /usr/slang/lib" @@ -8908,17 +9628,17 @@ cf_search="$cf_search $HOME/lib $HOME/lib/slang $HOME/slang/lib" for cf_libdir in $cf_search do echo $ac_n "checking for -lslang in $cf_libdir""... $ac_c" 1>&6 -echo "configure:8912: checking for -lslang in $cf_libdir" >&5 +echo "configure:9632: checking for -lslang in $cf_libdir" >&5 LIBS="-L$cf_libdir -lslang $cf_save_LIBS" cat > conftest.$ac_ext <<EOF -#line 8915 "configure" +#line 9635 "configure" #include "confdefs.h" #include <slang.h> int main() { SLtt_get_screen_size() ; return 0; } EOF -if { (eval echo configure:8922: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "$ac_t""yes" 1>&6 eval 'cf_cv_have_lib_'slang'=yes' @@ -8947,7 +9667,7 @@ fi cf_slang_LIBS3="$LIBS" echo $ac_n "checking if we can link slang without termcap""... $ac_c" 1>&6 -echo "configure:8951: checking if we can link slang without termcap" >&5 +echo "configure:9671: checking if we can link slang without termcap" >&5 if test -n "`echo $cf_slang_LIBS1 | sed -e 's/ //g'`" ; then cf_exclude=`echo ".$cf_slang_LIBS2" | sed -e "s@$cf_slang_LIBS1@@" -e 's@^.@@'` else @@ -8955,14 +9675,14 @@ else fi LIBS=`echo ".$cf_slang_LIBS3" | sed -e "s@$cf_exclude@@" -e 's@^.@@'` cat > conftest.$ac_ext <<EOF -#line 8959 "configure" +#line 9679 "configure" #include "confdefs.h" #include <slang.h> int main() { SLtt_get_screen_size() ; return 0; } EOF -if { (eval echo configure:8966: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cf_result=yes else @@ -8979,13 +9699,13 @@ test $cf_result = no && LIBS="$cf_slang_LIBS3" echo $ac_n "checking if we must tell slang this is UNIX""... $ac_c" 1>&6 -echo "configure:8983: checking if we must tell slang this is UNIX" >&5 +echo "configure:9703: checking if we must tell slang this is UNIX" >&5 if eval "test \"`echo '$''{'cf_cv_slang_unix'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 8989 "configure" +#line 9709 "configure" #include "confdefs.h" #include <slang.h> int main() { @@ -8999,7 +9719,7 @@ SLang_TT_Baud_Rate = 1 ; return 0; } EOF -if { (eval echo configure:9003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cf_cv_slang_unix=yes else @@ -9025,7 +9745,7 @@ eval cf_libdir=$libdir cf_libdir=`echo $cf_libdir | sed -e s@'^NONE/'@$prefix/@ -e s@'^NONE/'@$ac_default_prefix/@` echo $ac_n "checking for location of config-file""... $ac_c" 1>&6 -echo "configure:9029: checking for location of config-file" >&5 +echo "configure:9749: checking for location of config-file" >&5 LYNX_CFG_FILE=$cf_libdir/lynx.cfg cat >> confdefs.h <<EOF #define LYNX_CFG_FILE "$LYNX_CFG_FILE" @@ -9037,7 +9757,7 @@ CHARSET_DEFS= echo $ac_n "checking if you want only a few charsets""... $ac_c" 1>&6 -echo "configure:9041: checking if you want only a few charsets" >&5 +echo "configure:9761: checking if you want only a few charsets" >&5 # Check whether --with-charsets or --without-charsets was given. if test "${with_charsets+set}" = set; then @@ -9098,12 +9818,12 @@ fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:9102: checking for ANSI C header files" >&5 +echo "configure:9822: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 9107 "configure" +#line 9827 "configure" #include "confdefs.h" #include <stdlib.h> #include <stdarg.h> @@ -9111,7 +9831,7 @@ else #include <float.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9115: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9835: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -9128,7 +9848,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext <<EOF -#line 9132 "configure" +#line 9852 "configure" #include "confdefs.h" #include <string.h> EOF @@ -9146,7 +9866,7 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext <<EOF -#line 9150 "configure" +#line 9870 "configure" #include "confdefs.h" #include <stdlib.h> EOF @@ -9167,7 +9887,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext <<EOF -#line 9171 "configure" +#line 9891 "configure" #include "confdefs.h" #include <ctype.h> #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -9178,7 +9898,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:9182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9902: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -9202,12 +9922,12 @@ EOF fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:9206: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:9926: checking whether time.h and sys/time.h may both be included" >&5 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 9211 "configure" +#line 9931 "configure" #include "confdefs.h" #include <sys/types.h> #include <sys/time.h> @@ -9216,7 +9936,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:9220: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9940: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -9241,12 +9961,12 @@ for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 -echo "configure:9245: checking for $ac_hdr that defines DIR" >&5 +echo "configure:9965: checking for $ac_hdr that defines DIR" >&5 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 9250 "configure" +#line 9970 "configure" #include "confdefs.h" #include <sys/types.h> #include <$ac_hdr> @@ -9254,7 +9974,7 @@ int main() { DIR *dirp = 0; ; return 0; } EOF -if { (eval echo configure:9258: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9978: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else @@ -9279,7 +9999,7 @@ done # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 -echo "configure:9283: checking for opendir in -ldir" >&5 +echo "configure:10003: checking for opendir in -ldir" >&5 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -9287,7 +10007,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldir $LIBS" cat > conftest.$ac_ext <<EOF -#line 9291 "configure" +#line 10011 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -9298,7 +10018,7 @@ int main() { opendir() ; return 0; } EOF -if { (eval echo configure:9302: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -9320,7 +10040,7 @@ fi else echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -echo "configure:9324: checking for opendir in -lx" >&5 +echo "configure:10044: checking for opendir in -lx" >&5 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -9328,7 +10048,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lx $LIBS" cat > conftest.$ac_ext <<EOF -#line 9332 "configure" +#line 10052 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -9339,7 +10059,7 @@ int main() { opendir() ; return 0; } EOF -if { (eval echo configure:9343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10063: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -9382,17 +10102,17 @@ for ac_hdr in \ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:9386: checking for $ac_hdr" >&5 +echo "configure:10106: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 9391 "configure" +#line 10111 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9396: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:10116: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -9420,13 +10140,13 @@ done echo $ac_n "checking termio.h and termios.h""... $ac_c" 1>&6 -echo "configure:9424: checking termio.h and termios.h" >&5 +echo "configure:10144: checking termio.h and termios.h" >&5 if eval "test \"`echo '$''{'cf_cv_termio_and_termios'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 9430 "configure" +#line 10150 "configure" #include "confdefs.h" #if HAVE_TERMIO_H @@ -9439,7 +10159,7 @@ int main() { putchar (0x0a) ; return 0; } EOF -if { (eval echo configure:9443: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10163: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_termio_and_termios=yes else @@ -9459,13 +10179,13 @@ EOF echo $ac_n "checking for sigaction and structs""... $ac_c" 1>&6 -echo "configure:9463: checking for sigaction and structs" >&5 +echo "configure:10183: checking for sigaction and structs" >&5 if eval "test \"`echo '$''{'cf_cv_func_sigaction'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 9469 "configure" +#line 10189 "configure" #include "confdefs.h" #include <sys/types.h> @@ -9480,7 +10200,7 @@ struct sigaction act; ; return 0; } EOF -if { (eval echo configure:9484: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cf_cv_func_sigaction=yes else @@ -9504,17 +10224,17 @@ for ac_hdr in sys/wait.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:9508: checking for $ac_hdr" >&5 +echo "configure:10228: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 9513 "configure" +#line 10233 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9518: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:10238: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -9551,17 +10271,17 @@ for ac_hdr in wait.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:9555: checking for $ac_hdr" >&5 +echo "configure:10275: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 9560 "configure" +#line 10280 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9565: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:10285: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -9591,17 +10311,17 @@ for ac_hdr in waitstatus.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:9595: checking for $ac_hdr" >&5 +echo "configure:10315: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 9600 "configure" +#line 10320 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9605: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:10325: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -9642,13 +10362,13 @@ fi echo $ac_n "checking for union wait""... $ac_c" 1>&6 -echo "configure:9646: checking for union wait" >&5 +echo "configure:10366: checking for union wait" >&5 if eval "test \"`echo '$''{'cf_cv_type_unionwait'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 9652 "configure" +#line 10372 "configure" #include "confdefs.h" $cf_wait_headers int main() { @@ -9659,7 +10379,7 @@ int x; ; return 0; } EOF -if { (eval echo configure:9663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10383: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cf_cv_type_unionwait=no echo compiles ok w/o union wait 1>&5 @@ -9670,7 +10390,7 @@ else rm -rf conftest* cat > conftest.$ac_ext <<EOF -#line 9674 "configure" +#line 10394 "configure" #include "confdefs.h" $cf_wait_headers int main() { @@ -9685,7 +10405,7 @@ union wait x; ; return 0; } EOF -if { (eval echo configure:9689: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10409: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cf_cv_type_unionwait=yes echo compiles ok with union wait and possibly macros too 1>&5 @@ -9712,20 +10432,20 @@ EOF if test $cf_cv_type_unionwait = yes; then echo $ac_n "checking if union wait can be used as wait-arg""... $ac_c" 1>&6 -echo "configure:9716: checking if union wait can be used as wait-arg" >&5 +echo "configure:10436: checking if union wait can be used as wait-arg" >&5 if eval "test \"`echo '$''{'cf_cv_arg_union_wait'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 9722 "configure" +#line 10442 "configure" #include "confdefs.h" $cf_wait_headers int main() { union wait x; wait(&x) ; return 0; } EOF -if { (eval echo configure:9729: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10449: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_arg_union_wait=yes else @@ -9745,20 +10465,20 @@ EOF echo $ac_n "checking if union wait can be used as waitpid-arg""... $ac_c" 1>&6 -echo "configure:9749: checking if union wait can be used as waitpid-arg" >&5 +echo "configure:10469: checking if union wait can be used as waitpid-arg" >&5 if eval "test \"`echo '$''{'cf_cv_arg_union_waitpid'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 9755 "configure" +#line 10475 "configure" #include "confdefs.h" $cf_wait_headers int main() { union wait x; waitpid(0, &x, 0) ; return 0; } EOF -if { (eval echo configure:9762: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10482: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_arg_union_waitpid=yes else @@ -9784,17 +10504,17 @@ for ac_hdr in stdarg.h varargs.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:9788: checking for $ac_hdr" >&5 +echo "configure:10508: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 9793 "configure" +#line 10513 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9798: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:10518: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -9821,13 +10541,13 @@ fi done echo $ac_n "checking for standard varargs""... $ac_c" 1>&6 -echo "configure:9825: checking for standard varargs" >&5 +echo "configure:10545: checking for standard varargs" >&5 if eval "test \"`echo '$''{'cf_cv_ansi_varargs'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 9831 "configure" +#line 10551 "configure" #include "confdefs.h" #if HAVE_STDARG_H @@ -9842,7 +10562,7 @@ int main() { return 0;} int foo(char *fmt,...){va_list args;va_start(args,fmt);va_end(args) ; return 0; } EOF -if { (eval echo configure:9846: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10566: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_ansi_varargs=yes else @@ -9862,12 +10582,12 @@ EOF echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:9866: checking for uid_t in sys/types.h" >&5 +echo "configure:10586: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 9871 "configure" +#line 10591 "configure" #include "confdefs.h" #include <sys/types.h> EOF @@ -9896,7 +10616,7 @@ EOF fi echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6 -echo "configure:9900: checking type of array argument to getgroups" >&5 +echo "configure:10620: checking type of array argument to getgroups" >&5 if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9904,7 +10624,7 @@ else ac_cv_type_getgroups=cross else cat > conftest.$ac_ext <<EOF -#line 9908 "configure" +#line 10628 "configure" #include "confdefs.h" /* Thanks to Mike Rendell for this test. */ @@ -9929,7 +10649,7 @@ main() } EOF -if { (eval echo configure:9933: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_type_getgroups=gid_t else @@ -9943,7 +10663,7 @@ fi if test $ac_cv_type_getgroups = cross; then cat > conftest.$ac_ext <<EOF -#line 9947 "configure" +#line 10667 "configure" #include "confdefs.h" #include <unistd.h> EOF @@ -9967,12 +10687,12 @@ EOF echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:9971: checking for pid_t" >&5 +echo "configure:10691: checking for pid_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 9976 "configure" +#line 10696 "configure" #include "confdefs.h" #include <sys/types.h> #if STDC_HEADERS @@ -10000,12 +10720,12 @@ EOF fi echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:10004: checking for uid_t in sys/types.h" >&5 +echo "configure:10724: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 10009 "configure" +#line 10729 "configure" #include "confdefs.h" #include <sys/types.h> EOF @@ -10034,12 +10754,12 @@ EOF fi echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:10038: checking for mode_t" >&5 +echo "configure:10758: checking for mode_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 10043 "configure" +#line 10763 "configure" #include "confdefs.h" #include <sys/types.h> #if STDC_HEADERS @@ -10070,17 +10790,17 @@ fi ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for vfork.h""... $ac_c" 1>&6 -echo "configure:10074: checking for vfork.h" >&5 +echo "configure:10794: checking for vfork.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 10079 "configure" +#line 10799 "configure" #include "confdefs.h" #include <vfork.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:10084: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:10804: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -10105,18 +10825,18 @@ else fi echo $ac_n "checking for working vfork""... $ac_c" 1>&6 -echo "configure:10109: checking for working vfork" >&5 +echo "configure:10829: checking for working vfork" >&5 if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$cross_compiling" = yes; then echo $ac_n "checking for vfork""... $ac_c" 1>&6 -echo "configure:10115: checking for vfork" >&5 +echo "configure:10835: checking for vfork" >&5 if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 10120 "configure" +#line 10840 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char vfork(); below. */ @@ -10139,7 +10859,7 @@ vfork(); ; return 0; } EOF -if { (eval echo configure:10143: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10863: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_vfork=yes" else @@ -10161,7 +10881,7 @@ fi ac_cv_func_vfork_works=$ac_cv_func_vfork else cat > conftest.$ac_ext <<EOF -#line 10165 "configure" +#line 10885 "configure" #include "confdefs.h" /* Thanks to Paul Eggert for this test. */ #include <stdio.h> @@ -10256,7 +10976,7 @@ main() { } } EOF -if { (eval echo configure:10260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10980: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_vfork_works=yes else @@ -10280,13 +11000,13 @@ fi echo $ac_n "checking if we should use fcntl or ioctl""... $ac_c" 1>&6 -echo "configure:10284: checking if we should use fcntl or ioctl" >&5 +echo "configure:11004: checking if we should use fcntl or ioctl" >&5 if eval "test \"`echo '$''{'cf_cv_fionbio'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 10290 "configure" +#line 11010 "configure" #include "confdefs.h" #include <sys/types.h> @@ -10298,7 +11018,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:10302: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cf_cv_fionbio=ioctl else @@ -10307,7 +11027,7 @@ else rm -rf conftest* cat > conftest.$ac_ext <<EOF -#line 10311 "configure" +#line 11031 "configure" #include "confdefs.h" #include <sys/types.h> @@ -10324,7 +11044,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:10328: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11048: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cf_cv_fionbio=fcntl else @@ -10347,20 +11067,20 @@ EOF echo $ac_n "checking for broken/missing definition of remove""... $ac_c" 1>&6 -echo "configure:10351: checking for broken/missing definition of remove" >&5 +echo "configure:11071: checking for broken/missing definition of remove" >&5 if eval "test \"`echo '$''{'cf_cv_baddef_remove'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 10357 "configure" +#line 11077 "configure" #include "confdefs.h" #include <stdio.h> int main() { remove("dummy") ; return 0; } EOF -if { (eval echo configure:10364: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cf_cv_baddef_remove=no else @@ -10368,7 +11088,7 @@ else cat conftest.$ac_ext >&5 rm -rf conftest* cat > conftest.$ac_ext <<EOF -#line 10372 "configure" +#line 11092 "configure" #include "confdefs.h" #include <stdio.h> int __unlink(name) { return unlink(name); } @@ -10376,7 +11096,7 @@ int main() { remove("dummy") ; return 0; } EOF -if { (eval echo configure:10380: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cf_cv_baddef_remove=yes else @@ -10400,13 +11120,13 @@ EOF echo $ac_n "checking for lstat""... $ac_c" 1>&6 -echo "configure:10404: checking for lstat" >&5 +echo "configure:11124: checking for lstat" >&5 if eval "test \"`echo '$''{'ac_cv_func_lstat'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 10410 "configure" +#line 11130 "configure" #include "confdefs.h" #include <sys/types.h> @@ -10415,7 +11135,7 @@ int main() { lstat(".", (struct stat *)0) ; return 0; } EOF -if { (eval echo configure:10419: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11139: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_lstat=yes else @@ -10444,6 +11164,7 @@ for ac_func in \ gettimeofday \ getuid \ mktemp \ + mkdtemp \ popen \ putenv \ readdir \ @@ -10457,12 +11178,12 @@ for ac_func in \ do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:10461: checking for $ac_func" >&5 +echo "configure:11182: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 10466 "configure" +#line 11187 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -10485,7 +11206,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:10489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11210: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -10515,12 +11236,12 @@ for ac_func in \ do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:10519: checking for $ac_func" >&5 +echo "configure:11240: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 10524 "configure" +#line 11245 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -10543,7 +11264,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:10547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -10572,7 +11293,7 @@ done echo $ac_n "checking for working mkstemp""... $ac_c" 1>&6 -echo "configure:10576: checking for working mkstemp" >&5 +echo "configure:11297: checking for working mkstemp" >&5 if eval "test \"`echo '$''{'cf_cv_func_mkstemp'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10580,12 +11301,12 @@ else rm -f conftest* if test "$cross_compiling" = yes; then echo $ac_n "checking for mkstemp""... $ac_c" 1>&6 -echo "configure:10584: checking for mkstemp" >&5 +echo "configure:11305: checking for mkstemp" >&5 if eval "test \"`echo '$''{'ac_cv_func_mkstemp'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 10589 "configure" +#line 11310 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char mkstemp(); below. */ @@ -10608,7 +11329,7 @@ mkstemp(); ; return 0; } EOF -if { (eval echo configure:10612: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_mkstemp=yes" else @@ -10630,37 +11351,44 @@ fi else cat > conftest.$ac_ext <<EOF -#line 10634 "configure" +#line 11355 "configure" #include "confdefs.h" #include <sys/types.h> #include <stdlib.h> #include <stdio.h> +#include <string.h> #include <sys/stat.h> int main() { char *tmpl = "conftestXXXXXX"; - char temp[80]; + char name[2][80]; + int n; int result = 0; int fd; struct stat sb; umask(077); - strcpy(temp, tmpl); - if ((fd = mkstemp(temp)) >= 0) { - if (!strcmp(temp, tmpl) - || stat(temp, &sb) != 0 - || (sb.st_mode & S_IFMT) != S_IFREG - || (sb.st_mode & 077) != 0) { - result = 1; + for (n = 0; n < 2; ++n) { + strcpy(name[n], tmpl); + if ((fd = mkstemp(name[n])) >= 0) { + if (!strcmp(name[n], tmpl) + || stat(name[n], &sb) != 0 + || (sb.st_mode & S_IFMT) != S_IFREG + || (sb.st_mode & 077) != 0) { + result = 1; + } + close(fd); } - close(fd); } + if (result == 0 + && !strcmp(name[0], name[1])) + result = 1; exit(result); } EOF -if { (eval echo configure:10664: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11392: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then cf_cv_func_mkstemp=yes @@ -10687,7 +11415,7 @@ fi echo $ac_n "checking for random-integer functions""... $ac_c" 1>&6 -echo "configure:10691: checking for random-integer functions" >&5 +echo "configure:11419: checking for random-integer functions" >&5 if eval "test \"`echo '$''{'cf_cv_srand_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10698,7 +11426,7 @@ do cf_srand_func=`echo $cf_func | sed -e 's@/.*@@'` cf_rand_func=`echo $cf_func | sed -e 's@.*/@@'` cat > conftest.$ac_ext <<EOF -#line 10702 "configure" +#line 11430 "configure" #include "confdefs.h" #ifdef HAVE_STDLIB_H @@ -10712,7 +11440,7 @@ int main() { long seed = 1; $cf_srand_func(seed); seed = $cf_rand_func() ; return 0; } EOF -if { (eval echo configure:10716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cf_cv_srand_func=$cf_func break @@ -10728,7 +11456,7 @@ fi echo "$ac_t""$cf_cv_srand_func" 1>&6 if test "$cf_cv_srand_func" != unknown ; then echo $ac_n "checking for range of random-integers""... $ac_c" 1>&6 -echo "configure:10732: checking for range of random-integers" >&5 +echo "configure:11460: checking for range of random-integers" >&5 if eval "test \"`echo '$''{'cf_cv_rand_max'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10744,7 +11472,7 @@ else ;; esac cat > conftest.$ac_ext <<EOF -#line 10748 "configure" +#line 11476 "configure" #include "confdefs.h" #ifdef HAVE_STDLIB_H @@ -10758,7 +11486,7 @@ int main() { long x = $cf_cv_rand_max ; return 0; } EOF -if { (eval echo configure:10762: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11490: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then : else echo "configure: failed program was:" >&5 @@ -10794,12 +11522,12 @@ for ac_func in strstr do echo $ac_n "checking for $ac_func declaration""... $ac_c" 1>&6 -echo "configure:10798: checking for $ac_func declaration" >&5 +echo "configure:11526: checking for $ac_func declaration" >&5 if eval "test \"`echo '$''{'ac_cv_func_decl_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 10803 "configure" +#line 11531 "configure" #include "confdefs.h" #include <string.h> int main() { @@ -10808,11 +11536,11 @@ extern int ${ac_func}(); #endif ; return 0; } EOF -if { (eval echo configure:10812: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11540: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat > conftest.$ac_ext <<EOF -#line 10816 "configure" +#line 11544 "configure" #include "confdefs.h" #include <string.h> int main() { @@ -10821,7 +11549,7 @@ int (*p)() = ${ac_func}; #endif ; return 0; } EOF -if { (eval echo configure:10825: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11553: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_func_decl_$ac_func=yes" @@ -10863,12 +11591,12 @@ for ac_func in getgrgid getgrnam do echo $ac_n "checking for $ac_func declaration""... $ac_c" 1>&6 -echo "configure:10867: checking for $ac_func declaration" >&5 +echo "configure:11595: checking for $ac_func declaration" >&5 if eval "test \"`echo '$''{'ac_cv_func_decl_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 10872 "configure" +#line 11600 "configure" #include "confdefs.h" #include <stdio.h> @@ -10879,11 +11607,11 @@ extern int ${ac_func}(); #endif ; return 0; } EOF -if { (eval echo configure:10883: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11611: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat > conftest.$ac_ext <<EOF -#line 10887 "configure" +#line 11615 "configure" #include "confdefs.h" #include <stdio.h> @@ -10894,7 +11622,7 @@ int (*p)() = ${ac_func}; #endif ; return 0; } EOF -if { (eval echo configure:10898: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11626: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_func_decl_$ac_func=yes" @@ -10936,13 +11664,13 @@ done echo $ac_n "checking if TRUE/FALSE are defined""... $ac_c" 1>&6 -echo "configure:10940: checking if TRUE/FALSE are defined" >&5 +echo "configure:11668: checking if TRUE/FALSE are defined" >&5 if eval "test \"`echo '$''{'cf_cv_bool_defs'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 10946 "configure" +#line 11674 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header-curses.h}> @@ -10951,7 +11679,7 @@ int main() { int x = TRUE, y = FALSE ; return 0; } EOF -if { (eval echo configure:10955: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11683: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_bool_defs=yes else @@ -10978,13 +11706,13 @@ fi echo $ac_n "checking if external errno is declared""... $ac_c" 1>&6 -echo "configure:10982: checking if external errno is declared" >&5 +echo "configure:11710: checking if external errno is declared" >&5 if eval "test \"`echo '$''{'cf_cv_dcl_errno'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 10988 "configure" +#line 11716 "configure" #include "confdefs.h" #ifdef HAVE_STDLIB_H @@ -10997,7 +11725,7 @@ int main() { long x = (long) errno ; return 0; } EOF -if { (eval echo configure:11001: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11729: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval 'cf_cv_dcl_'errno'=yes' else @@ -11028,13 +11756,13 @@ fi # It's possible (for near-UNIX clones) that the data doesn't exist echo $ac_n "checking if external errno exists""... $ac_c" 1>&6 -echo "configure:11032: checking if external errno exists" >&5 +echo "configure:11760: checking if external errno exists" >&5 if eval "test \"`echo '$''{'cf_cv_have_errno'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 11038 "configure" +#line 11766 "configure" #include "confdefs.h" #undef errno @@ -11044,7 +11772,7 @@ int main() { errno = 2 ; return 0; } EOF -if { (eval echo configure:11048: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval 'cf_cv_have_'errno'=yes' else @@ -11076,21 +11804,21 @@ fi echo $ac_n "checking if we can set errno""... $ac_c" 1>&6 -echo "configure:11080: checking if we can set errno" >&5 +echo "configure:11808: checking if we can set errno" >&5 if eval "test \"`echo '$''{'cf_cv_set_errno'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$cross_compiling" = yes; then cat > conftest.$ac_ext <<EOF -#line 11087 "configure" +#line 11815 "configure" #include "confdefs.h" #include <errno.h> int main() { errno = 255 ; return 0; } EOF -if { (eval echo configure:11094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11822: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cf_cv_set_errno=maybe else @@ -11102,7 +11830,7 @@ fi rm -f conftest* else cat > conftest.$ac_ext <<EOF -#line 11106 "configure" +#line 11834 "configure" #include "confdefs.h" #include <errno.h> @@ -11112,7 +11840,7 @@ int main() exit(errno != 255); } EOF -if { (eval echo configure:11116: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11844: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then cf_cv_set_errno=yes else @@ -11135,20 +11863,20 @@ EOF echo $ac_n "checking for setlocale()""... $ac_c" 1>&6 -echo "configure:11139: checking for setlocale()" >&5 +echo "configure:11867: checking for setlocale()" >&5 if eval "test \"`echo '$''{'cf_cv_locale'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 11145 "configure" +#line 11873 "configure" #include "confdefs.h" #include <locale.h> int main() { setlocale(LC_ALL, "") ; return 0; } EOF -if { (eval echo configure:11152: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cf_cv_locale=yes else @@ -11169,13 +11897,13 @@ EOF echo $ac_n "checking if NGROUPS is defined""... $ac_c" 1>&6 -echo "configure:11173: checking if NGROUPS is defined" >&5 +echo "configure:11901: checking if NGROUPS is defined" >&5 if eval "test \"`echo '$''{'cf_cv_ngroups'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 11179 "configure" +#line 11907 "configure" #include "confdefs.h" #if HAVE_SYS_PARAM_H @@ -11189,7 +11917,7 @@ int main() { int x = NGROUPS ; return 0; } EOF -if { (eval echo configure:11193: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11921: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_ngroups=yes else @@ -11197,7 +11925,7 @@ else cat conftest.$ac_ext >&5 rm -rf conftest* cat > conftest.$ac_ext <<EOF -#line 11201 "configure" +#line 11929 "configure" #include "confdefs.h" #if HAVE_SYS_PARAM_H @@ -11211,7 +11939,7 @@ int main() { int x = NGROUPS_MAX ; return 0; } EOF -if { (eval echo configure:11215: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11943: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_ngroups=NGROUPS_MAX else @@ -11245,13 +11973,13 @@ for cf_name in sys_nerr sys_errlist do echo $ac_n "checking if external $cf_name is declared""... $ac_c" 1>&6 -echo "configure:11249: checking if external $cf_name is declared" >&5 +echo "configure:11977: checking if external $cf_name is declared" >&5 if eval "test \"`echo '$''{'cf_cv_dcl_$cf_name'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 11255 "configure" +#line 11983 "configure" #include "confdefs.h" #ifdef HAVE_STDLIB_H @@ -11264,7 +11992,7 @@ int main() { long x = (long) $cf_name ; return 0; } EOF -if { (eval echo configure:11268: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11996: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval 'cf_cv_dcl_'$cf_name'=yes' else @@ -11295,13 +12023,13 @@ fi # It's possible (for near-UNIX clones) that the data doesn't exist echo $ac_n "checking if external $cf_name exists""... $ac_c" 1>&6 -echo "configure:11299: checking if external $cf_name exists" >&5 +echo "configure:12027: checking if external $cf_name exists" >&5 if eval "test \"`echo '$''{'cf_cv_have_$cf_name'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 11305 "configure" +#line 12033 "configure" #include "confdefs.h" #undef $cf_name @@ -11311,7 +12039,7 @@ int main() { $cf_name = 2 ; return 0; } EOF -if { (eval echo configure:11315: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12043: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval 'cf_cv_have_'$cf_name'=yes' else @@ -11347,17 +12075,17 @@ for ac_hdr in lastlog.h paths.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:11351: checking for $ac_hdr" >&5 +echo "configure:12079: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 11356 "configure" +#line 12084 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:11361: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:12089: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -11384,13 +12112,13 @@ fi done echo $ac_n "checking for lastlog path""... $ac_c" 1>&6 -echo "configure:11388: checking for lastlog path" >&5 +echo "configure:12116: checking for lastlog path" >&5 if eval "test \"`echo '$''{'cf_cv_path_lastlog'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 11394 "configure" +#line 12122 "configure" #include "confdefs.h" #include <sys/types.h> @@ -11405,7 +12133,7 @@ int main() { char *path = _PATH_LASTLOG ; return 0; } EOF -if { (eval echo configure:11409: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:12137: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_path_lastlog="_PATH_LASTLOG" else @@ -11432,7 +12160,7 @@ EOF echo $ac_n "checking for utmp implementation""... $ac_c" 1>&6 -echo "configure:11436: checking for utmp implementation" >&5 +echo "configure:12164: checking for utmp implementation" >&5 if eval "test \"`echo '$''{'cf_cv_have_utmp'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11440,7 +12168,7 @@ else cf_cv_have_utmp=no for cf_header in utmpx utmp ; do cat > conftest.$ac_ext <<EOF -#line 11444 "configure" +#line 12172 "configure" #include "confdefs.h" #include <sys/types.h> @@ -11456,7 +12184,7 @@ struct $cf_header x; ; return 0; } EOF -if { (eval echo configure:11460: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:12188: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_have_utmp=$cf_header break @@ -11466,7 +12194,7 @@ else rm -rf conftest* cat > conftest.$ac_ext <<EOF -#line 11470 "configure" +#line 12198 "configure" #include "confdefs.h" #include <sys/types.h> @@ -11482,7 +12210,7 @@ struct $cf_header x; ; return 0; } EOF -if { (eval echo configure:11486: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:12214: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_have_utmp=$cf_header cat >> confdefs.h <<\EOF @@ -11517,13 +12245,13 @@ EOF if test $cf_cv_have_utmp != no ; then echo $ac_n "checking if utmp.ut_host is declared""... $ac_c" 1>&6 -echo "configure:11521: checking if utmp.ut_host is declared" >&5 +echo "configure:12249: checking if utmp.ut_host is declared" >&5 if eval "test \"`echo '$''{'cf_cv_have_utmp_ut_host'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 11527 "configure" +#line 12255 "configure" #include "confdefs.h" #include <sys/types.h> @@ -11532,7 +12260,7 @@ int main() { struct $cf_cv_have_utmp x; char *y = &x.ut_host[0] ; return 0; } EOF -if { (eval echo configure:11536: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:12264: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_have_utmp_ut_host=yes else @@ -11556,7 +12284,7 @@ fi if test $cf_cv_have_utmp != no ; then echo $ac_n "checking for exit-status in $cf_cv_have_utmp""... $ac_c" 1>&6 -echo "configure:11560: checking for exit-status in $cf_cv_have_utmp" >&5 +echo "configure:12288: checking for exit-status in $cf_cv_have_utmp" >&5 if eval "test \"`echo '$''{'cf_cv_have_utmp_ut_xstatus'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11568,7 +12296,7 @@ for cf_result in \ ut_exit.ut_exit do cat > conftest.$ac_ext <<EOF -#line 11572 "configure" +#line 12300 "configure" #include "confdefs.h" #include <sys/types.h> @@ -11577,7 +12305,7 @@ int main() { struct $cf_cv_have_utmp x; long y = x.$cf_result = 0 ; return 0; } EOF -if { (eval echo configure:11581: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:12309: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_have_utmp_ut_xstatus=$cf_result break @@ -11609,13 +12337,13 @@ fi if test $cf_cv_have_utmp != no ; then echo $ac_n "checking if utmp.ut_xtime is declared""... $ac_c" 1>&6 -echo "configure:11613: checking if utmp.ut_xtime is declared" >&5 +echo "configure:12341: checking if utmp.ut_xtime is declared" >&5 if eval "test \"`echo '$''{'cf_cv_have_utmp_ut_xtime'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 11619 "configure" +#line 12347 "configure" #include "confdefs.h" #include <sys/types.h> @@ -11624,7 +12352,7 @@ int main() { struct $cf_cv_have_utmp x; long y = x.ut_xtime = 0 ; return 0; } EOF -if { (eval echo configure:11628: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:12356: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_have_utmp_ut_xtime=yes else @@ -11632,7 +12360,7 @@ else cat conftest.$ac_ext >&5 rm -rf conftest* cat > conftest.$ac_ext <<EOF -#line 11636 "configure" +#line 12364 "configure" #include "confdefs.h" #include <sys/types.h> @@ -11641,7 +12369,7 @@ int main() { struct $cf_cv_have_utmp x; long y = x.ut_tv.tv_sec ; return 0; } EOF -if { (eval echo configure:11645: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:12373: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_have_utmp_ut_xtime=define else @@ -11676,13 +12404,13 @@ fi if test $cf_cv_have_utmp != no ; then echo $ac_n "checking if utmp.ut_session is declared""... $ac_c" 1>&6 -echo "configure:11680: checking if utmp.ut_session is declared" >&5 +echo "configure:12408: checking if utmp.ut_session is declared" >&5 if eval "test \"`echo '$''{'cf_cv_have_utmp_ut_session'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 11686 "configure" +#line 12414 "configure" #include "confdefs.h" #include <sys/types.h> @@ -11691,7 +12419,7 @@ int main() { struct $cf_cv_have_utmp x; long y = x.ut_session ; return 0; } EOF -if { (eval echo configure:11695: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:12423: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_have_utmp_ut_session=yes else @@ -11716,14 +12444,14 @@ fi echo $ac_n "checking if $cf_cv_have_utmp is SYSV flavor""... $ac_c" 1>&6 -echo "configure:11720: checking if $cf_cv_have_utmp is SYSV flavor" >&5 +echo "configure:12448: checking if $cf_cv_have_utmp is SYSV flavor" >&5 if eval "test \"`echo '$''{'cf_cv_sysv_utmp'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else test "$cf_cv_have_utmp" = "utmp" && cf_prefix="ut" || cf_prefix="utx" cat > conftest.$ac_ext <<EOF -#line 11727 "configure" +#line 12455 "configure" #include "confdefs.h" #include <sys/types.h> @@ -11737,7 +12465,7 @@ struct $cf_cv_have_utmp x; end${cf_prefix}ent(); ; return 0; } EOF -if { (eval echo configure:11741: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12469: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cf_cv_sysv_utmp=yes else @@ -11760,13 +12488,13 @@ fi echo $ac_n "checking if external h_errno exists""... $ac_c" 1>&6 -echo "configure:11764: checking if external h_errno exists" >&5 +echo "configure:12492: checking if external h_errno exists" >&5 if eval "test \"`echo '$''{'cf_cv_have_h_errno'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 11770 "configure" +#line 12498 "configure" #include "confdefs.h" #undef h_errno @@ -11776,7 +12504,7 @@ int main() { h_errno = 2 ; return 0; } EOF -if { (eval echo configure:11780: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12508: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval 'cf_cv_have_'h_errno'=yes' else @@ -11808,21 +12536,21 @@ fi ### These tests must be run after establishing the curses library. if test $cf_cv_screen != slang ; then if test $cf_cv_screen != pdcurses ; then - for ac_hdr in ncurses/term.h term.h + for ac_hdr in $cf_cv_screen/term.h term.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:11816: checking for $ac_hdr" >&5 +echo "configure:12544: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 11821 "configure" +#line 12549 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:11826: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:12554: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -11851,7 +12579,7 @@ done fi echo $ac_n "checking if curses supports alternate-character set""... $ac_c" 1>&6 -echo "configure:11855: checking if curses supports alternate-character set" >&5 +echo "configure:12583: checking if curses supports alternate-character set" >&5 if eval "test \"`echo '$''{'cf_cv_alt_char_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -11859,7 +12587,7 @@ else for mapname in acs_map _acs_map do cat > conftest.$ac_ext <<EOF -#line 11863 "configure" +#line 12591 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header-curses.h}> @@ -11868,7 +12596,7 @@ int main() { chtype x = $mapname['l']; $mapname['m'] = 0 ; return 0; } EOF -if { (eval echo configure:11872: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12600: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cf_cv_alt_char_set=$mapname break @@ -11891,13 +12619,13 @@ EOF echo $ac_n "checking if curses supports fancy attributes""... $ac_c" 1>&6 -echo "configure:11895: checking if curses supports fancy attributes" >&5 +echo "configure:12623: checking if curses supports fancy attributes" >&5 if eval "test \"`echo '$''{'cf_cv_fancy_curses'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 11901 "configure" +#line 12629 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header-curses.h}> @@ -11910,7 +12638,7 @@ attrset(A_UNDERLINE|A_BOLD|A_REVERSE); ; return 0; } EOF -if { (eval echo configure:11914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cf_cv_fancy_curses=yes else @@ -11933,13 +12661,13 @@ EOF if test "$cf_cv_ncurses_version" != no ; then echo $ac_n "checking for obsolete/broken version of ncurses""... $ac_c" 1>&6 -echo "configure:11937: checking for obsolete/broken version of ncurses" >&5 +echo "configure:12665: checking for obsolete/broken version of ncurses" >&5 if eval "test \"`echo '$''{'cf_cv_ncurses_broken'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 11943 "configure" +#line 12671 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header-curses.h}> @@ -11953,7 +12681,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:11957: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:12685: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_ncurses_broken=no else @@ -11978,13 +12706,13 @@ fi echo $ac_n "checking if curses supports color attributes""... $ac_c" 1>&6 -echo "configure:11982: checking if curses supports color attributes" >&5 +echo "configure:12710: checking if curses supports color attributes" >&5 if eval "test \"`echo '$''{'cf_cv_color_curses'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 11988 "configure" +#line 12716 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header-curses.h}> @@ -11999,7 +12727,7 @@ chtype x = COLOR_BLUE; ; return 0; } EOF -if { (eval echo configure:12003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12731: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cf_cv_color_curses=yes else @@ -12033,17 +12761,17 @@ unistd.h \ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:12037: checking for $ac_hdr" >&5 +echo "configure:12765: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 12042 "configure" +#line 12770 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:12047: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:12775: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -12074,17 +12802,17 @@ if test "$ISC" = yes ; then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:12078: checking for $ac_hdr" >&5 +echo "configure:12806: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 12083 "configure" +#line 12811 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:12088: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:12816: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -12119,16 +12847,16 @@ if test "$ac_cv_header_termios_h" = yes ; then esac if test "$termios_bad" = maybe ; then echo $ac_n "checking whether termios.h needs _POSIX_SOURCE""... $ac_c" 1>&6 -echo "configure:12123: checking whether termios.h needs _POSIX_SOURCE" >&5 +echo "configure:12851: checking whether termios.h needs _POSIX_SOURCE" >&5 cat > conftest.$ac_ext <<EOF -#line 12125 "configure" +#line 12853 "configure" #include "confdefs.h" #include <termios.h> int main() { struct termios foo; int x = foo.c_iflag ; return 0; } EOF -if { (eval echo configure:12132: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:12860: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* termios_bad=no else @@ -12137,7 +12865,7 @@ else rm -rf conftest* cat > conftest.$ac_ext <<EOF -#line 12141 "configure" +#line 12869 "configure" #include "confdefs.h" #define _POSIX_SOURCE @@ -12146,7 +12874,7 @@ int main() { struct termios foo; int x = foo.c_iflag ; return 0; } EOF -if { (eval echo configure:12150: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:12878: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* termios_bad=unknown else @@ -12169,7 +12897,7 @@ fi echo $ac_n "checking declaration of size-change""... $ac_c" 1>&6 -echo "configure:12173: checking declaration of size-change" >&5 +echo "configure:12901: checking declaration of size-change" >&5 if eval "test \"`echo '$''{'cf_cv_sizechange'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -12183,7 +12911,7 @@ do CPPFLAGS="$cf_save_CPPFLAGS" test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts" cat > conftest.$ac_ext <<EOF -#line 12187 "configure" +#line 12915 "configure" #include "confdefs.h" #include <sys/types.h> #ifdef HAVE_TERMIOS_H @@ -12222,7 +12950,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:12226: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:12954: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_sizechange=yes else @@ -12261,20 +12989,20 @@ fi echo $ac_n "checking if ttytype is declared in curses library""... $ac_c" 1>&6 -echo "configure:12265: checking if ttytype is declared in curses library" >&5 +echo "configure:12993: checking if ttytype is declared in curses library" >&5 if eval "test \"`echo '$''{'cf_cv_have_ttytype'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 12271 "configure" +#line 12999 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header-curses.h}> int main() { char *x = &ttytype[1]; *x = 1 ; return 0; } EOF -if { (eval echo configure:12278: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13006: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cf_cv_have_ttytype=yes else @@ -12294,14 +13022,117 @@ EOF +echo $ac_n "checking if curses supports wide characters""... $ac_c" 1>&6 +echo "configure:13027: checking if curses supports wide characters" >&5 +if eval "test \"`echo '$''{'cf_cv_widec_curses'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +cat > conftest.$ac_ext <<EOF +#line 13033 "configure" +#include "confdefs.h" + +#include <stdlib.h> +#include <${cf_cv_ncurses_header-curses.h}> +int main() { + + wchar_t temp[2]; + wchar_t wch = 'A'; + temp[0] = wch; + waddnwstr(stdscr, temp, 1); + +; return 0; } +EOF +if { (eval echo configure:13047: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + cf_cv_widec_curses=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + cf_cv_widec_curses=no +fi +rm -f conftest* + +fi + +echo "$ac_t""$cf_cv_widec_curses" 1>&6 + +if test "$cf_cv_widec_curses" = yes ; then + cat >> confdefs.h <<\EOF +#define WIDEC_CURSES 1 +EOF + + + # This is needed on Tru64 5.0 to declare mbstate_t + echo $ac_n "checking if we must include wchar.h to declare mbstate_t""... $ac_c" 1>&6 +echo "configure:13070: checking if we must include wchar.h to declare mbstate_t" >&5 +if eval "test \"`echo '$''{'cf_cv_widec_mbstate'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + cat > conftest.$ac_ext <<EOF +#line 13076 "configure" +#include "confdefs.h" + +#include <stdlib.h> +#include <${cf_cv_ncurses_header-curses.h}> +int main() { +mbstate_t state +; return 0; } +EOF +if { (eval echo configure:13085: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + cf_cv_widec_mbstate=no +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + cat > conftest.$ac_ext <<EOF +#line 13093 "configure" +#include "confdefs.h" + +#include <stdlib.h> +#include <wchar.h> +#include <${cf_cv_ncurses_header-curses.h}> +int main() { +mbstate_t state +; return 0; } +EOF +if { (eval echo configure:13103: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + cf_cv_widec_mbstate=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + cf_cv_widec_mbstate=unknown +fi +rm -f conftest* +fi +rm -f conftest* +fi + +echo "$ac_t""$cf_cv_widec_mbstate" 1>&6 + +if test "$cf_cv_widec_mbstate" = yes ; then + cat >> confdefs.h <<\EOF +#define NEED_WCHAR_H 1 +EOF + +fi + +fi + + echo $ac_n "checking if we must define _XOPEN_SOURCE_EXTENDED""... $ac_c" 1>&6 -echo "configure:12299: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5 +echo "configure:13130: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5 if eval "test \"`echo '$''{'cf_cv_need_xopen_extension'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 12305 "configure" +#line 13136 "configure" #include "confdefs.h" #include <stdlib.h> @@ -12311,7 +13142,7 @@ int main() { long x = winnstr(stdscr, "", 0) ; return 0; } EOF -if { (eval echo configure:12315: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cf_cv_need_xopen_extension=no else @@ -12319,7 +13150,7 @@ else cat conftest.$ac_ext >&5 rm -rf conftest* cat > conftest.$ac_ext <<EOF -#line 12323 "configure" +#line 13154 "configure" #include "confdefs.h" #define _XOPEN_SOURCE_EXTENDED @@ -12330,7 +13161,7 @@ int main() { long x = winnstr(stdscr, "", 0) ; return 0; } EOF -if { (eval echo configure:12334: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13165: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cf_cv_need_xopen_extension=yes else @@ -12373,9 +13204,9 @@ do cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%` echo $ac_n "checking for ${cf_func}""... $ac_c" 1>&6 -echo "configure:12377: checking for ${cf_func}" >&5 +echo "configure:13208: checking for ${cf_func}" >&5 -echo "(line 12379) testing ${cf_func} ..." 1>&5 +echo "(line 13210) testing ${cf_func} ..." 1>&5 if eval "test \"`echo '$''{'cf_cv_func_$cf_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -12384,7 +13215,7 @@ else eval cf_result='$ac_cv_func_'$cf_func if test ".$cf_result" != ".no"; then cat > conftest.$ac_ext <<EOF -#line 12388 "configure" +#line 13219 "configure" #include "confdefs.h" #ifdef HAVE_XCURSES @@ -12409,7 +13240,7 @@ exit(foo == 0); ; return 0; } EOF -if { (eval echo configure:12413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13244: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cf_result=yes else @@ -12441,7 +13272,7 @@ fi echo $ac_n "checking if bibp: URLs should be supported""... $ac_c" 1>&6 -echo "configure:12445: checking if bibp: URLs should be supported" >&5 +echo "configure:13276: checking if bibp: URLs should be supported" >&5 # Check whether --enable-bibp-urls or --disable-bibp-urls was given. if test "${enable_bibp_urls+set}" = set; then @@ -12465,7 +13296,7 @@ EOF echo $ac_n "checking if configuration info should be browsable""... $ac_c" 1>&6 -echo "configure:12469: checking if configuration info should be browsable" >&5 +echo "configure:13300: checking if configuration info should be browsable" >&5 # Check whether --enable-config-info or --disable-config-info was given. if test "${enable_config_info+set}" = set; then @@ -12489,7 +13320,7 @@ EOF echo $ac_n "checking if new-style forms-based options screen should be used""... $ac_c" 1>&6 -echo "configure:12493: checking if new-style forms-based options screen should be used" >&5 +echo "configure:13324: checking if new-style forms-based options screen should be used" >&5 # Check whether --enable-forms-options or --disable-forms-options was given. if test "${enable_forms_options+set}" = set; then @@ -12513,7 +13344,7 @@ EOF echo $ac_n "checking if old-style options menu should be used""... $ac_c" 1>&6 -echo "configure:12517: checking if old-style options menu should be used" >&5 +echo "configure:13348: checking if old-style options menu should be used" >&5 # Check whether --enable-menu-options or --disable-menu-options was given. if test "${enable_menu_options+set}" = set; then @@ -12537,7 +13368,7 @@ EOF echo $ac_n "checking if experimental address-list page should be used""... $ac_c" 1>&6 -echo "configure:12541: checking if experimental address-list page should be used" >&5 +echo "configure:13372: checking if experimental address-list page should be used" >&5 # Check whether --enable-addrlist-page or --disable-addrlist-page was given. if test "${enable_addrlist_page+set}" = set; then @@ -12561,7 +13392,7 @@ EOF echo $ac_n "checking if experimental charset-selection logic should be used""... $ac_c" 1>&6 -echo "configure:12565: checking if experimental charset-selection logic should be used" >&5 +echo "configure:13396: checking if experimental charset-selection logic should be used" >&5 # Check whether --enable-charset-choice or --disable-charset-choice was given. if test "${enable_charset_choice+set}" = set; then @@ -12585,7 +13416,7 @@ EOF echo $ac_n "checking if experimental CJK logic should be used""... $ac_c" 1>&6 -echo "configure:12589: checking if experimental CJK logic should be used" >&5 +echo "configure:13420: checking if experimental CJK logic should be used" >&5 # Check whether --enable-cjk or --disable-cjk was given. if test "${enable_cjk+set}" = set; then @@ -12609,7 +13440,7 @@ EOF echo $ac_n "checking if color-style code should be used""... $ac_c" 1>&6 -echo "configure:12613: checking if color-style code should be used" >&5 +echo "configure:13444: checking if color-style code should be used" >&5 # Check whether --enable-color-style or --disable-color-style was given. if test "${enable_color_style+set}" = set; then @@ -12649,7 +13480,7 @@ EOF echo "$ac_t""yes" 1>&6 echo $ac_n "checking for location of style-sheet file""... $ac_c" 1>&6 -echo "configure:12653: checking for location of style-sheet file" >&5 +echo "configure:13484: checking for location of style-sheet file" >&5 LYNX_LSS_FILE=$cf_libdir/lynx.lss cat >> confdefs.h <<EOF #define LYNX_LSS_FILE "$LYNX_LSS_FILE" @@ -12667,7 +13498,7 @@ test ".$cf_cv_func_use_default_colors" = ".yes" && use_dft_colors=maybe if test "$use_dft_colors" != no ; then echo $ac_n "checking if you want to use default-colors""... $ac_c" 1>&6 -echo "configure:12671: checking if you want to use default-colors" >&5 +echo "configure:13502: checking if you want to use default-colors" >&5 # Check whether --enable-default-colors or --disable-default-colors was given. if test "${enable_default_colors+set}" = set; then @@ -12692,7 +13523,7 @@ EOF fi echo $ac_n "checking if experimental file-upload logic should be used""... $ac_c" 1>&6 -echo "configure:12696: checking if experimental file-upload logic should be used" >&5 +echo "configure:13527: checking if experimental file-upload logic should be used" >&5 # Check whether --enable-file-upload or --disable-file-upload was given. if test "${enable_file_upload+set}" = set; then @@ -12716,7 +13547,7 @@ EOF echo $ac_n "checking if experimental htmlized lynx.cfg should be built""... $ac_c" 1>&6 -echo "configure:12720: checking if experimental htmlized lynx.cfg should be built" >&5 +echo "configure:13551: checking if experimental htmlized lynx.cfg should be built" >&5 # Check whether --enable-htmlized-cfg or --disable-htmlized-cfg was given. if test "${enable_htmlized_cfg+set}" = set; then @@ -12746,7 +13577,7 @@ fi ### check for ipv6 support echo $ac_n "checking whether to enable ipv6""... $ac_c" 1>&6 -echo "configure:12750: checking whether to enable ipv6" >&5 +echo "configure:13581: checking whether to enable ipv6" >&5 # Check whether --enable-ipv6 or --disable-ipv6 was given. if test "${enable_ipv6+set}" = set; then @@ -12767,7 +13598,7 @@ if test "$enableval" = "yes"; then echo $ac_n "checking ipv6 stack type""... $ac_c" 1>&6 -echo "configure:12771: checking ipv6 stack type" >&5 +echo "configure:13602: checking ipv6 stack type" >&5 if eval "test \"`echo '$''{'cf_cv_ipv6type'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -12787,9 +13618,9 @@ do ;; inria) #(vi cat > conftest.$ac_ext <<EOF -#line 12791 "configure" +#line 13622 "configure" #include "confdefs.h" -dnl + #include <netinet/in.h> #ifdef IPV6_INRIA_VERSION yes @@ -12805,9 +13636,9 @@ rm -f conftest* ;; kame) #(vi cat > conftest.$ac_ext <<EOF -#line 12809 "configure" +#line 13640 "configure" #include "confdefs.h" -dnl + #include <netinet/in.h> #ifdef __KAME__ yes @@ -12823,9 +13654,9 @@ rm -f conftest* ;; linux-glibc) #(vi cat > conftest.$ac_ext <<EOF -#line 12827 "configure" +#line 13658 "configure" #include "confdefs.h" -dnl + #include <features.h> #if defined(__GLIBC__) && __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 1 yes @@ -12850,9 +13681,9 @@ rm -f conftest* ;; toshiba) #(vi cat > conftest.$ac_ext <<EOF -#line 12854 "configure" +#line 13685 "configure" #include "confdefs.h" -dnl + #include <sys/param.h> #ifdef _TOSHIBA_INET6 yes @@ -12868,9 +13699,9 @@ rm -f conftest* ;; v6d) #(vi cat > conftest.$ac_ext <<EOF -#line 12872 "configure" +#line 13703 "configure" #include "confdefs.h" -dnl + #include </usr/local/v6/include/sys/v6config.h> #ifdef __V6D__ yes @@ -12886,9 +13717,9 @@ rm -f conftest* ;; zeta) cat > conftest.$ac_ext <<EOF -#line 12890 "configure" +#line 13721 "configure" #include "confdefs.h" -dnl + #include <sys/param.h> #ifdef _ZETA_MINAMI_INET6 yes @@ -12919,7 +13750,7 @@ cf_ipv6lib=none cf_ipv6dir=none echo $ac_n "checking for ipv6 library if required""... $ac_c" 1>&6 -echo "configure:12923: checking for ipv6 library if required" >&5 +echo "configure:13754: checking for ipv6 library if required" >&5 case $cf_cv_ipv6type in #(vi solaris) #(vi ;; @@ -12953,7 +13784,7 @@ echo "$ac_t""$cf_ipv6lib" 1>&6 if test "$cf_ipv6lib" != "none"; then cat > conftest.$ac_ext <<EOF -#line 12957 "configure" +#line 13788 "configure" #include "confdefs.h" #include <sys/types.h> @@ -12964,7 +13795,7 @@ int main() { getaddrinfo(0, 0, 0, 0) ; return 0; } EOF -if { (eval echo configure:12968: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then : else echo "configure: failed program was:" >&5 @@ -12973,6 +13804,10 @@ else cf_search="" +test "$prefix" != /usr/local && \ +test -d /usr/local && \ +cf_search="$cf_search /usr/local/include /usr/local/include/$cf_ipv6dir /usr/local/$cf_ipv6dir/include" + test "$includedir" != NONE && \ test -d "$includedir" && \ cf_search="$cf_search $includedir $includedir/$cf_ipv6dir" @@ -12985,10 +13820,6 @@ test "$prefix" != NONE && \ test -d "$prefix" && \ cf_search="$cf_search $prefix/include $prefix/include/$cf_ipv6dir $prefix/$cf_ipv6dir/include" -test "$prefix" != /usr/local && \ -test -d /usr/local && \ -cf_search="$cf_search /usr/local/include /usr/local/include/$cf_ipv6dir /usr/local/$cf_ipv6dir/include" - test "$prefix" != /usr && \ cf_search="$cf_search /usr/include /usr/include/$cf_ipv6dir /usr/$cf_ipv6dir/include" @@ -13017,12 +13848,12 @@ rm -f conftest* eval 'cf_cv_have_lib_'$cf_ipv6lib'=no' cf_libdir="" echo $ac_n "checking for getaddrinfo""... $ac_c" 1>&6 -echo "configure:13021: checking for getaddrinfo" >&5 +echo "configure:13852: checking for getaddrinfo" >&5 if eval "test \"`echo '$''{'ac_cv_func_getaddrinfo'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 13026 "configure" +#line 13857 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char getaddrinfo(); below. */ @@ -13045,7 +13876,7 @@ getaddrinfo(); ; return 0; } EOF -if { (eval echo configure:13049: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_getaddrinfo=yes" else @@ -13065,10 +13896,10 @@ else cf_save_LIBS="$LIBS" echo $ac_n "checking for getaddrinfo in -l$cf_ipv6lib""... $ac_c" 1>&6 -echo "configure:13069: checking for getaddrinfo in -l$cf_ipv6lib" >&5 +echo "configure:13900: checking for getaddrinfo in -l$cf_ipv6lib" >&5 LIBS="-l$cf_ipv6lib $LIBS" cat > conftest.$ac_ext <<EOF -#line 13072 "configure" +#line 13903 "configure" #include "confdefs.h" #include <sys/types.h> @@ -13079,7 +13910,7 @@ int main() { getaddrinfo(0, 0, 0, 0) ; return 0; } EOF -if { (eval echo configure:13083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "$ac_t""yes" 1>&6 eval 'cf_cv_have_lib_'$cf_ipv6lib'=yes' @@ -13091,6 +13922,10 @@ else echo "$ac_t""no" 1>&6 cf_search="" +test "$prefix" != /usr/local && \ +test -d /usr/local && \ +cf_search="$cf_search /usr/local/lib /usr/local/lib/$cf_ipv6dir /usr/local/$cf_ipv6dir/lib" + test "$libdir" != NONE && \ test -d $libdir && \ cf_search="$cf_search $libdir $libdir/$cf_ipv6dir" @@ -13104,10 +13939,6 @@ test "$prefix" != "$exec_prefix" && \ test -d $prefix && \ cf_search="$cf_search $prefix/lib $prefix/lib/$cf_ipv6dir $prefix/$cf_ipv6dir/lib" -test "$prefix" != /usr/local && \ -test -d /usr/local && \ -cf_search="$cf_search /usr/local/lib /usr/local/lib/$cf_ipv6dir /usr/local/$cf_ipv6dir/lib" - test "$prefix" != /usr && \ cf_search="$cf_search /usr/lib /usr/lib/$cf_ipv6dir /usr/$cf_ipv6dir/lib" @@ -13123,10 +13954,10 @@ cf_search="$cf_search $HOME/lib $HOME/lib/$cf_ipv6dir $HOME/$cf_ipv6dir/lib" for cf_libdir in $cf_search do echo $ac_n "checking for -l$cf_ipv6lib in $cf_libdir""... $ac_c" 1>&6 -echo "configure:13127: checking for -l$cf_ipv6lib in $cf_libdir" >&5 +echo "configure:13958: checking for -l$cf_ipv6lib in $cf_libdir" >&5 LIBS="-L$cf_libdir -l$cf_ipv6lib $cf_save_LIBS" cat > conftest.$ac_ext <<EOF -#line 13130 "configure" +#line 13961 "configure" #include "confdefs.h" #include <sys/types.h> @@ -13137,7 +13968,7 @@ int main() { getaddrinfo(0, 0, 0, 0) ; return 0; } EOF -if { (eval echo configure:13141: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13972: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "$ac_t""yes" 1>&6 eval 'cf_cv_have_lib_'$cf_ipv6lib'=yes' @@ -13170,7 +14001,7 @@ fi echo $ac_n "checking working getaddrinfo""... $ac_c" 1>&6 -echo "configure:13174: checking working getaddrinfo" >&5 +echo "configure:14005: checking working getaddrinfo" >&5 if eval "test \"`echo '$''{'cf_cv_getaddrinfo'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -13179,7 +14010,7 @@ if test "$cross_compiling" = yes; then cf_cv_getaddrinfo=unknown else cat > conftest.$ac_ext <<EOF -#line 13183 "configure" +#line 14014 "configure" #include "confdefs.h" #include <sys/types.h> @@ -13258,7 +14089,7 @@ int main() } EOF -if { (eval echo configure:13262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:14093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then cf_cv_getaddrinfo=yes else @@ -13301,7 +14132,7 @@ fi fi echo $ac_n "checking if experimental element-justification logic should be used""... $ac_c" 1>&6 -echo "configure:13305: checking if experimental element-justification logic should be used" >&5 +echo "configure:14136: checking if experimental element-justification logic should be used" >&5 # Check whether --enable-justify-elts or --disable-justify-elts was given. if test "${enable_justify_elts+set}" = set; then @@ -13325,7 +14156,7 @@ EOF echo $ac_n "checking if experimental keyboard-layout logic should be used""... $ac_c" 1>&6 -echo "configure:13329: checking if experimental keyboard-layout logic should be used" >&5 +echo "configure:14160: checking if experimental keyboard-layout logic should be used" >&5 # Check whether --enable-kbd-layout or --disable-kbd-layout was given. if test "${enable_kbd_layout+set}" = set; then @@ -13349,7 +14180,7 @@ EOF echo $ac_n "checking if experimental JavaScript support should be used""... $ac_c" 1>&6 -echo "configure:13353: checking if experimental JavaScript support should be used" >&5 +echo "configure:14184: checking if experimental JavaScript support should be used" >&5 # Check whether --enable-libjs or --disable-libjs was given. if test "${enable_libjs+set}" = set; then @@ -13373,7 +14204,7 @@ EOF echo $ac_n "checking if experimental nested-table logic should be used""... $ac_c" 1>&6 -echo "configure:13377: checking if experimental nested-table logic should be used" >&5 +echo "configure:14208: checking if experimental nested-table logic should be used" >&5 # Check whether --enable-nested-tables or --disable-nested-tables was given. if test "${enable_nested_tables+set}" = set; then @@ -13397,7 +14228,7 @@ EOF echo $ac_n "checking if html source should be colorized""... $ac_c" 1>&6 -echo "configure:13401: checking if html source should be colorized" >&5 +echo "configure:14232: checking if html source should be colorized" >&5 # Check whether --enable-prettysrc or --disable-prettysrc was given. if test "${enable_prettysrc+set}" = set; then @@ -13421,7 +14252,7 @@ EOF echo $ac_n "checking if read-progress message should show ETA""... $ac_c" 1>&6 -echo "configure:13425: checking if read-progress message should show ETA" >&5 +echo "configure:14256: checking if read-progress message should show ETA" >&5 # Check whether --enable-read-eta or --disable-read-eta was given. if test "${enable_read_eta+set}" = set; then @@ -13445,7 +14276,7 @@ EOF echo $ac_n "checking if scrollbar code should be used""... $ac_c" 1>&6 -echo "configure:13449: checking if scrollbar code should be used" >&5 +echo "configure:14280: checking if scrollbar code should be used" >&5 # Check whether --enable-scrollbar or --disable-scrollbar was given. if test "${enable_scrollbar+set}" = set; then @@ -13476,7 +14307,7 @@ EOF fi echo $ac_n "checking if source caching should be used""... $ac_c" 1>&6 -echo "configure:13480: checking if source caching should be used" >&5 +echo "configure:14311: checking if source caching should be used" >&5 # Check whether --enable-source-cache or --disable-source-cache was given. if test "${enable_source_cache+set}" = set; then @@ -13503,7 +14334,7 @@ EOF echo $ac_n "checking if alternative line-edit bindings should be used""... $ac_c" 1>&6 -echo "configure:13507: checking if alternative line-edit bindings should be used" >&5 +echo "configure:14338: checking if alternative line-edit bindings should be used" >&5 # Check whether --enable-alt-bindings or --disable-alt-bindings was given. if test "${enable_alt_bindings+set}" = set; then @@ -13527,7 +14358,7 @@ EOF echo $ac_n "checking if you want to use extended HTML DTD logic""... $ac_c" 1>&6 -echo "configure:13531: checking if you want to use extended HTML DTD logic" >&5 +echo "configure:14362: checking if you want to use extended HTML DTD logic" >&5 # Check whether --enable-extended-dtd or --disable-extended-dtd was given. if test "${enable_extended_dtd+set}" = set; then @@ -13551,7 +14382,7 @@ EOF echo $ac_n "checking if partial-display should be used""... $ac_c" 1>&6 -echo "configure:13555: checking if partial-display should be used" >&5 +echo "configure:14386: checking if partial-display should be used" >&5 # Check whether --enable-partial or --disable-partial was given. if test "${enable_partial+set}" = set; then @@ -13575,7 +14406,7 @@ EOF echo $ac_n "checking if you want to use external commands""... $ac_c" 1>&6 -echo "configure:13579: checking if you want to use external commands" >&5 +echo "configure:14410: checking if you want to use external commands" >&5 # Check whether --enable-externs or --disable-externs was given. if test "${enable_externs+set}" = set; then @@ -13602,7 +14433,7 @@ EOF fi echo $ac_n "checking if you want to use setfont support""... $ac_c" 1>&6 -echo "configure:13606: checking if you want to use setfont support" >&5 +echo "configure:14437: checking if you want to use setfont support" >&5 # Check whether --enable-font-switch or --disable-font-switch was given. if test "${enable_font_switch+set}" = set; then @@ -13626,7 +14457,7 @@ EOF echo $ac_n "checking if you want cgi-link support""... $ac_c" 1>&6 -echo "configure:13630: checking if you want cgi-link support" >&5 +echo "configure:14461: checking if you want cgi-link support" >&5 # Check whether --enable-cgi-links or --disable-cgi-links was given. if test "${enable_cgi_links+set}" = set; then @@ -13645,7 +14476,7 @@ fi echo "$ac_t""$enableval" 1>&6 echo $ac_n "checking if you want change-exec support""... $ac_c" 1>&6 -echo "configure:13649: checking if you want change-exec support" >&5 +echo "configure:14480: checking if you want change-exec support" >&5 # Check whether --enable-change-exec or --disable-change-exec was given. if test "${enable_change_exec+set}" = set; then @@ -13669,7 +14500,7 @@ EOF echo $ac_n "checking if you want exec-links support""... $ac_c" 1>&6 -echo "configure:13673: checking if you want exec-links support" >&5 +echo "configure:14504: checking if you want exec-links support" >&5 # Check whether --enable-exec-links or --disable-exec-links was given. if test "${enable_exec_links+set}" = set; then @@ -13693,7 +14524,7 @@ EOF echo $ac_n "checking if you want exec-scripts support""... $ac_c" 1>&6 -echo "configure:13697: checking if you want exec-scripts support" >&5 +echo "configure:14528: checking if you want exec-scripts support" >&5 # Check whether --enable-exec-scripts or --disable-exec-scripts was given. if test "${enable_exec_scripts+set}" = set; then @@ -13717,7 +14548,7 @@ EOF echo $ac_n "checking if you want internal-links feature""... $ac_c" 1>&6 -echo "configure:13721: checking if you want internal-links feature" >&5 +echo "configure:14552: checking if you want internal-links feature" >&5 # Check whether --enable-internal-links or --disable-internal-links was given. if test "${enable_internal_links+set}" = set; then @@ -13741,7 +14572,7 @@ EOF echo $ac_n "checking if you want to fork NSL requests""... $ac_c" 1>&6 -echo "configure:13745: checking if you want to fork NSL requests" >&5 +echo "configure:14576: checking if you want to fork NSL requests" >&5 # Check whether --enable-nsl-fork or --disable-nsl-fork was given. if test "${enable_nsl_fork+set}" = set; then @@ -13765,7 +14596,7 @@ EOF echo $ac_n "checking if you want to log URL requests via syslog""... $ac_c" 1>&6 -echo "configure:13769: checking if you want to log URL requests via syslog" >&5 +echo "configure:14600: checking if you want to log URL requests via syslog" >&5 # Check whether --enable-syslog or --disable-syslog was given. if test "${enable_syslog+set}" = set; then @@ -13789,7 +14620,7 @@ EOF echo $ac_n "checking if persistent-cookie logic should be used""... $ac_c" 1>&6 -echo "configure:13793: checking if persistent-cookie logic should be used" >&5 +echo "configure:14624: checking if persistent-cookie logic should be used" >&5 # Check whether --enable-persistent-cookies or --disable-persistent-cookies was given. if test "${enable_persistent_cookies+set}" = set; then @@ -13813,7 +14644,7 @@ EOF echo $ac_n "checking if you want to underline links""... $ac_c" 1>&6 -echo "configure:13817: checking if you want to underline links" >&5 +echo "configure:14648: checking if you want to underline links" >&5 # Check whether --enable-underlines or --disable-underlines was given. if test "${enable_underlines+set}" = set; then @@ -13837,7 +14668,7 @@ EOF echo $ac_n "checking if help files should be gzip'ed""... $ac_c" 1>&6 -echo "configure:13841: checking if help files should be gzip'ed" >&5 +echo "configure:14672: checking if help files should be gzip'ed" >&5 # Check whether --enable-gzip-help or --disable-gzip-help was given. if test "${enable_gzip_help+set}" = set; then @@ -13866,7 +14697,7 @@ fi echo $ac_n "checking if you want to use zlib for decompression of some gzip files""... $ac_c" 1>&6 -echo "configure:13870: checking if you want to use zlib for decompression of some gzip files" >&5 +echo "configure:14701: checking if you want to use zlib for decompression of some gzip files" >&5 # Check whether --with-zlib or --without-zlib was given. if test "${with_zlib+set}" = set; then @@ -13880,16 +14711,16 @@ echo "$ac_t""$use_zlib" 1>&6 if test ".$use_zlib" != ".no" ; then echo $ac_n "checking if we need to add -I option to get zlib.h""... $ac_c" 1>&6 -echo "configure:13884: checking if we need to add -I option to get zlib.h" >&5 +echo "configure:14715: checking if we need to add -I option to get zlib.h" >&5 cat > conftest.$ac_ext <<EOF -#line 13886 "configure" +#line 14717 "configure" #include "confdefs.h" #include <zlib.h> int main() { ; return 0; } EOF -if { (eval echo configure:13893: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:14724: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""no" 1>&6 else @@ -13900,6 +14731,10 @@ else echo "$ac_t""yes" 1>&6 cf_search="" +test "$prefix" != /usr/local && \ +test -d /usr/local && \ +cf_search="$cf_search /usr/local/include /usr/local/include/zlib /usr/local/zlib/include" + test "$includedir" != NONE && \ test -d "$includedir" && \ cf_search="$cf_search $includedir $includedir/zlib" @@ -13912,10 +14747,6 @@ test "$prefix" != NONE && \ test -d "$prefix" && \ cf_search="$cf_search $prefix/include $prefix/include/zlib $prefix/zlib/include" -test "$prefix" != /usr/local && \ -test -d /usr/local && \ -cf_search="$cf_search /usr/local/include /usr/local/include/zlib /usr/local/zlib/include" - test "$prefix" != /usr && \ cf_search="$cf_search /usr/include /usr/include/zlib /usr/zlib/include" @@ -13961,12 +14792,12 @@ rm -f conftest* eval 'cf_cv_have_lib_'z'=no' cf_libdir="" echo $ac_n "checking for gzopen""... $ac_c" 1>&6 -echo "configure:13965: checking for gzopen" >&5 +echo "configure:14796: checking for gzopen" >&5 if eval "test \"`echo '$''{'ac_cv_func_gzopen'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 13970 "configure" +#line 14801 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char gzopen(); below. */ @@ -13989,7 +14820,7 @@ gzopen(); ; return 0; } EOF -if { (eval echo configure:13993: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_gzopen=yes" else @@ -14009,17 +14840,17 @@ else cf_save_LIBS="$LIBS" echo $ac_n "checking for gzopen in -lz""... $ac_c" 1>&6 -echo "configure:14013: checking for gzopen in -lz" >&5 +echo "configure:14844: checking for gzopen in -lz" >&5 LIBS="-lz $LIBS" cat > conftest.$ac_ext <<EOF -#line 14016 "configure" +#line 14847 "configure" #include "confdefs.h" #include <zlib.h> int main() { gzopen("name","mode") ; return 0; } EOF -if { (eval echo configure:14023: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14854: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "$ac_t""yes" 1>&6 eval 'cf_cv_have_lib_'z'=yes' @@ -14031,6 +14862,10 @@ else echo "$ac_t""no" 1>&6 cf_search="" +test "$prefix" != /usr/local && \ +test -d /usr/local && \ +cf_search="$cf_search /usr/local/lib /usr/local/lib/z /usr/local/z/lib" + test "$libdir" != NONE && \ test -d $libdir && \ cf_search="$cf_search $libdir $libdir/z" @@ -14044,10 +14879,6 @@ test "$prefix" != "$exec_prefix" && \ test -d $prefix && \ cf_search="$cf_search $prefix/lib $prefix/lib/z $prefix/z/lib" -test "$prefix" != /usr/local && \ -test -d /usr/local && \ -cf_search="$cf_search /usr/local/lib /usr/local/lib/z /usr/local/z/lib" - test "$prefix" != /usr && \ cf_search="$cf_search /usr/lib /usr/lib/z /usr/z/lib" @@ -14063,17 +14894,17 @@ cf_search="$cf_search $HOME/lib $HOME/lib/z $HOME/z/lib" for cf_libdir in $cf_search do echo $ac_n "checking for -lz in $cf_libdir""... $ac_c" 1>&6 -echo "configure:14067: checking for -lz in $cf_libdir" >&5 +echo "configure:14898: checking for -lz in $cf_libdir" >&5 LIBS="-L$cf_libdir -lz $cf_save_LIBS" cat > conftest.$ac_ext <<EOF -#line 14070 "configure" +#line 14901 "configure" #include "confdefs.h" #include <zlib.h> int main() { gzopen("name","mode") ; return 0; } EOF -if { (eval echo configure:14077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14908: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "$ac_t""yes" 1>&6 eval 'cf_cv_have_lib_'z'=yes' @@ -14107,7 +14938,7 @@ EOF fi echo $ac_n "checking if you want to exclude FINGER code""... $ac_c" 1>&6 -echo "configure:14111: checking if you want to exclude FINGER code" >&5 +echo "configure:14942: checking if you want to exclude FINGER code" >&5 # Check whether --enable-finger or --disable-finger was given. if test "${enable_finger+set}" = set; then @@ -14131,7 +14962,7 @@ EOF echo $ac_n "checking if you want to exclude GOPHER code""... $ac_c" 1>&6 -echo "configure:14135: checking if you want to exclude GOPHER code" >&5 +echo "configure:14966: checking if you want to exclude GOPHER code" >&5 # Check whether --enable-gopher or --disable-gopher was given. if test "${enable_gopher+set}" = set; then @@ -14155,7 +14986,7 @@ EOF echo $ac_n "checking if you want to exclude NEWS code""... $ac_c" 1>&6 -echo "configure:14159: checking if you want to exclude NEWS code" >&5 +echo "configure:14990: checking if you want to exclude NEWS code" >&5 # Check whether --enable-news or --disable-news was given. if test "${enable_news+set}" = set; then @@ -14179,7 +15010,7 @@ EOF echo $ac_n "checking if you want to exclude FTP code""... $ac_c" 1>&6 -echo "configure:14183: checking if you want to exclude FTP code" >&5 +echo "configure:15014: checking if you want to exclude FTP code" >&5 # Check whether --enable-ftp or --disable-ftp was given. if test "${enable_ftp+set}" = set; then @@ -14208,7 +15039,7 @@ EOF # All DirEd functions that were enabled on compilation can be disabled # or modified at run time via DIRED_MENU symbols in lynx.cfg. echo $ac_n "checking if directory-editor code should be used""... $ac_c" 1>&6 -echo "configure:14212: checking if directory-editor code should be used" >&5 +echo "configure:15043: checking if directory-editor code should be used" >&5 # Check whether --enable-dired or --disable-dired was given. if test "${enable_dired+set}" = set; then @@ -14235,7 +15066,7 @@ EOF echo $ac_n "checking if you wish to allow extracting from archives via DirEd""... $ac_c" 1>&6 -echo "configure:14239: checking if you wish to allow extracting from archives via DirEd" >&5 +echo "configure:15070: checking if you wish to allow extracting from archives via DirEd" >&5 # Check whether --enable-dired-dearchive or --disable-dired-dearchive was given. if test "${enable_dired_dearchive+set}" = set; then @@ -14254,7 +15085,7 @@ fi echo "$ac_t""$enableval" 1>&6 echo $ac_n "checking if DirEd mode should override keys""... $ac_c" 1>&6 -echo "configure:14258: checking if DirEd mode should override keys" >&5 +echo "configure:15089: checking if DirEd mode should override keys" >&5 # Check whether --enable-dired-override or --disable-dired-override was given. if test "${enable_dired_override+set}" = set; then @@ -14280,7 +15111,7 @@ fi echo "$ac_t""$enableval" 1>&6 echo $ac_n "checking if you wish to allow permissions commands via DirEd""... $ac_c" 1>&6 -echo "configure:14284: checking if you wish to allow permissions commands via DirEd" >&5 +echo "configure:15115: checking if you wish to allow permissions commands via DirEd" >&5 # Check whether --enable-dired-permit or --disable-dired-permit was given. if test "${enable_dired_permit+set}" = set; then @@ -14306,7 +15137,7 @@ fi echo "$ac_t""$enableval" 1>&6 echo $ac_n "checking if you wish to allow executable-permission commands via DirEd""... $ac_c" 1>&6 -echo "configure:14310: checking if you wish to allow executable-permission commands via DirEd" >&5 +echo "configure:15141: checking if you wish to allow executable-permission commands via DirEd" >&5 # Check whether --enable-dired-xpermit or --disable-dired-xpermit was given. if test "${enable_dired_xpermit+set}" = set; then @@ -14325,7 +15156,7 @@ fi echo "$ac_t""$enableval" 1>&6 echo $ac_n "checking if you wish to allow "tar" commands from DirEd""... $ac_c" 1>&6 -echo "configure:14329: checking if you wish to allow "tar" commands from DirEd" >&5 +echo "configure:15160: checking if you wish to allow "tar" commands from DirEd" >&5 # Check whether --enable-dired-tar or --disable-dired-tar was given. if test "${enable_dired_tar+set}" = set; then @@ -14351,7 +15182,7 @@ fi echo "$ac_t""$enableval" 1>&6 echo $ac_n "checking if you wish to allow "uudecode" commands from DirEd""... $ac_c" 1>&6 -echo "configure:14355: checking if you wish to allow "uudecode" commands from DirEd" >&5 +echo "configure:15186: checking if you wish to allow "uudecode" commands from DirEd" >&5 # Check whether --enable-dired-uudecode or --disable-dired-uudecode was given. if test "${enable_dired_uudecode+set}" = set; then @@ -14377,7 +15208,7 @@ fi echo "$ac_t""$enableval" 1>&6 echo $ac_n "checking if you wish to allow "zip" and "unzip" commands from DirEd""... $ac_c" 1>&6 -echo "configure:14381: checking if you wish to allow "zip" and "unzip" commands from DirEd" >&5 +echo "configure:15212: checking if you wish to allow "zip" and "unzip" commands from DirEd" >&5 # Check whether --enable-dired-zip or --disable-dired-zip was given. if test "${enable_dired_zip+set}" = set; then @@ -14403,7 +15234,7 @@ fi echo "$ac_t""$enableval" 1>&6 echo $ac_n "checking if you wish to allow "gzip" and "gunzip" commands from DirEd""... $ac_c" 1>&6 -echo "configure:14407: checking if you wish to allow "gzip" and "gunzip" commands from DirEd" >&5 +echo "configure:15238: checking if you wish to allow "gzip" and "gunzip" commands from DirEd" >&5 # Check whether --enable-dired-gzip or --disable-dired-gzip was given. if test "${enable_dired_gzip+set}" = set; then @@ -14430,7 +15261,7 @@ fi fi echo $ac_n "checking if you want long-directory listings""... $ac_c" 1>&6 -echo "configure:14434: checking if you want long-directory listings" >&5 +echo "configure:15265: checking if you want long-directory listings" >&5 # Check whether --enable-long-list or --disable-long-list was given. if test "${enable_long_list+set}" = set; then @@ -14456,7 +15287,7 @@ fi echo "$ac_t""$enableval" 1>&6 echo $ac_n "checking if parent-directory references are permitted""... $ac_c" 1>&6 -echo "configure:14460: checking if parent-directory references are permitted" >&5 +echo "configure:15291: checking if parent-directory references are permitted" >&5 # Check whether --enable-parent-dir-refs or --disable-parent-dir-refs was given. if test "${enable_parent_dir_refs+set}" = set; then @@ -14481,7 +15312,7 @@ if test $cf_cv_screen = pdcurses ; then # Uses ac_ vars as temps to allow command line to override cache and checks. # --without-x overrides everything else, but does not touch the cache. echo $ac_n "checking for X""... $ac_c" 1>&6 -echo "configure:14485: checking for X" >&5 +echo "configure:15316: checking for X" >&5 # Check whether --with-x or --without-x was given. @@ -14544,12 +15375,12 @@ if test "$ac_x_includes" = NO; then # First, try using that file with no special directory specified. cat > conftest.$ac_ext <<EOF -#line 14548 "configure" +#line 15379 "configure" #include "confdefs.h" #include <$x_direct_test_include> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:14553: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:15384: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -14618,14 +15449,14 @@ if test "$ac_x_libraries" = NO; then ac_save_LIBS="$LIBS" LIBS="-l$x_direct_test_library $LIBS" cat > conftest.$ac_ext <<EOF -#line 14622 "configure" +#line 15453 "configure" #include "confdefs.h" int main() { ${x_direct_test_function}() ; return 0; } EOF -if { (eval echo configure:14629: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:15460: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* LIBS="$ac_save_LIBS" # We can link X programs with no special library path. @@ -14725,7 +15556,7 @@ clix*) # FIXME: modify the library lookup in autoconf to # allow _s.a suffix ahead of .a echo $ac_n "checking for open in -lc_s""... $ac_c" 1>&6 -echo "configure:14729: checking for open in -lc_s" >&5 +echo "configure:15560: checking for open in -lc_s" >&5 ac_lib_var=`echo c_s'_'open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -14733,7 +15564,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lc_s $LIBS" cat > conftest.$ac_ext <<EOF -#line 14737 "configure" +#line 15568 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -14744,7 +15575,7 @@ int main() { open() ; return 0; } EOF -if { (eval echo configure:14748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:15579: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -14761,7 +15592,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 LIBS="-lc_s $LIBS" echo $ac_n "checking for gethostname in -lbsd""... $ac_c" 1>&6 -echo "configure:14765: checking for gethostname in -lbsd" >&5 +echo "configure:15596: checking for gethostname in -lbsd" >&5 ac_lib_var=`echo bsd'_'gethostname | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -14769,7 +15600,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lbsd $LIBS" cat > conftest.$ac_ext <<EOF -#line 14773 "configure" +#line 15604 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -14780,7 +15611,7 @@ int main() { gethostname() ; return 0; } EOF -if { (eval echo configure:14784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:15615: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -14797,7 +15628,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 LIBS="-lbsd $LIBS" echo $ac_n "checking for gethostname in -lnsl_s""... $ac_c" 1>&6 -echo "configure:14801: checking for gethostname in -lnsl_s" >&5 +echo "configure:15632: checking for gethostname in -lnsl_s" >&5 ac_lib_var=`echo nsl_s'_'gethostname | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -14805,7 +15636,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl_s $LIBS" cat > conftest.$ac_ext <<EOF -#line 14809 "configure" +#line 15640 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -14816,7 +15647,7 @@ int main() { gethostname() ; return 0; } EOF -if { (eval echo configure:14820: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:15651: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -14833,7 +15664,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 LIBS="-lnsl_s $LIBS" echo $ac_n "checking for XOpenDisplay in -lX11_s""... $ac_c" 1>&6 -echo "configure:14837: checking for XOpenDisplay in -lX11_s" >&5 +echo "configure:15668: checking for XOpenDisplay in -lX11_s" >&5 ac_lib_var=`echo X11_s'_'XOpenDisplay | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -14841,7 +15672,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lX11_s $LIBS" cat > conftest.$ac_ext <<EOF -#line 14845 "configure" +#line 15676 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -14852,7 +15683,7 @@ int main() { XOpenDisplay() ; return 0; } EOF -if { (eval echo configure:14856: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:15687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -14869,7 +15700,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 LIBS="-lX11_s $LIBS" echo $ac_n "checking for XtAppInitialize in -lXt_s""... $ac_c" 1>&6 -echo "configure:14873: checking for XtAppInitialize in -lXt_s" >&5 +echo "configure:15704: checking for XtAppInitialize in -lXt_s" >&5 ac_lib_var=`echo Xt_s'_'XtAppInitialize | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -14877,7 +15708,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lXt_s $LIBS" cat > conftest.$ac_ext <<EOF -#line 14881 "configure" +#line 15712 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -14888,7 +15719,7 @@ int main() { XtAppInitialize() ; return 0; } EOF -if { (eval echo configure:14892: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:15723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -14929,7 +15760,7 @@ fi ;; *) echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6 -echo "configure:14933: checking for socket in -lsocket" >&5 +echo "configure:15764: checking for socket in -lsocket" >&5 ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -14937,7 +15768,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsocket $LIBS" cat > conftest.$ac_ext <<EOF -#line 14941 "configure" +#line 15772 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -14948,7 +15779,7 @@ int main() { socket() ; return 0; } EOF -if { (eval echo configure:14952: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:15783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -14976,7 +15807,7 @@ else fi echo $ac_n "checking for gethostname in -lnsl""... $ac_c" 1>&6 -echo "configure:14980: checking for gethostname in -lnsl" >&5 +echo "configure:15811: checking for gethostname in -lnsl" >&5 ac_lib_var=`echo nsl'_'gethostname | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -14984,7 +15815,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <<EOF -#line 14988 "configure" +#line 15819 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -14995,7 +15826,7 @@ int main() { gethostname() ; return 0; } EOF -if { (eval echo configure:14999: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:15830: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -15046,17 +15877,17 @@ else case "`(uname -sr) 2>/dev/null`" in "SunOS 5"*) echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6 -echo "configure:15050: checking whether -R must be followed by a space" >&5 +echo "configure:15881: checking whether -R must be followed by a space" >&5 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries" cat > conftest.$ac_ext <<EOF -#line 15053 "configure" +#line 15884 "configure" #include "confdefs.h" int main() { ; return 0; } EOF -if { (eval echo configure:15060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:15891: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_R_nospace=yes else @@ -15072,14 +15903,14 @@ rm -f conftest* else LIBS="$ac_xsave_LIBS -R $x_libraries" cat > conftest.$ac_ext <<EOF -#line 15076 "configure" +#line 15907 "configure" #include "confdefs.h" int main() { ; return 0; } EOF -if { (eval echo configure:15083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:15914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_R_space=yes else @@ -15111,7 +15942,7 @@ rm -f conftest* # libraries were built with DECnet support. And karl@cs.umb.edu says # the Alpha needs dnet_stub (dnet does not exist). echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6 -echo "configure:15115: checking for dnet_ntoa in -ldnet" >&5 +echo "configure:15946: checking for dnet_ntoa in -ldnet" >&5 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -15119,7 +15950,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldnet $LIBS" cat > conftest.$ac_ext <<EOF -#line 15123 "configure" +#line 15954 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -15130,7 +15961,7 @@ int main() { dnet_ntoa() ; return 0; } EOF -if { (eval echo configure:15134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:15965: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -15152,7 +15983,7 @@ fi if test $ac_cv_lib_dnet_dnet_ntoa = no; then echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6 -echo "configure:15156: checking for dnet_ntoa in -ldnet_stub" >&5 +echo "configure:15987: checking for dnet_ntoa in -ldnet_stub" >&5 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -15160,7 +15991,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldnet_stub $LIBS" cat > conftest.$ac_ext <<EOF -#line 15164 "configure" +#line 15995 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -15171,7 +16002,7 @@ int main() { dnet_ntoa() ; return 0; } EOF -if { (eval echo configure:15175: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:16006: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -15200,12 +16031,12 @@ fi # The nsl library prevents programs from opening the X display # on Irix 5.2, according to dickey@clark.net. echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6 -echo "configure:15204: checking for gethostbyname" >&5 +echo "configure:16035: checking for gethostbyname" >&5 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 15209 "configure" +#line 16040 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char gethostbyname(); below. */ @@ -15228,7 +16059,7 @@ gethostbyname(); ; return 0; } EOF -if { (eval echo configure:15232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:16063: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_gethostbyname=yes" else @@ -15249,7 +16080,7 @@ fi if test $ac_cv_func_gethostbyname = no; then echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6 -echo "configure:15253: checking for gethostbyname in -lnsl" >&5 +echo "configure:16084: checking for gethostbyname in -lnsl" >&5 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -15257,7 +16088,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <<EOF -#line 15261 "configure" +#line 16092 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -15268,7 +16099,7 @@ int main() { gethostbyname() ; return 0; } EOF -if { (eval echo configure:15272: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:16103: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -15298,12 +16129,12 @@ fi # -lsocket must be given before -lnsl if both are needed. # We assume that if connect needs -lnsl, so does gethostbyname. echo $ac_n "checking for connect""... $ac_c" 1>&6 -echo "configure:15302: checking for connect" >&5 +echo "configure:16133: checking for connect" >&5 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 15307 "configure" +#line 16138 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char connect(); below. */ @@ -15326,7 +16157,7 @@ connect(); ; return 0; } EOF -if { (eval echo configure:15330: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:16161: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_connect=yes" else @@ -15347,7 +16178,7 @@ fi if test $ac_cv_func_connect = no; then echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6 -echo "configure:15351: checking for connect in -lsocket" >&5 +echo "configure:16182: checking for connect in -lsocket" >&5 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -15355,7 +16186,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsocket $X_EXTRA_LIBS $LIBS" cat > conftest.$ac_ext <<EOF -#line 15359 "configure" +#line 16190 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -15366,7 +16197,7 @@ int main() { connect() ; return 0; } EOF -if { (eval echo configure:15370: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:16201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -15390,12 +16221,12 @@ fi # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX. echo $ac_n "checking for remove""... $ac_c" 1>&6 -echo "configure:15394: checking for remove" >&5 +echo "configure:16225: checking for remove" >&5 if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 15399 "configure" +#line 16230 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char remove(); below. */ @@ -15418,7 +16249,7 @@ remove(); ; return 0; } EOF -if { (eval echo configure:15422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:16253: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_remove=yes" else @@ -15439,7 +16270,7 @@ fi if test $ac_cv_func_remove = no; then echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6 -echo "configure:15443: checking for remove in -lposix" >&5 +echo "configure:16274: checking for remove in -lposix" >&5 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -15447,7 +16278,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lposix $LIBS" cat > conftest.$ac_ext <<EOF -#line 15451 "configure" +#line 16282 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -15458,7 +16289,7 @@ int main() { remove() ; return 0; } EOF -if { (eval echo configure:15462: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:16293: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -15482,12 +16313,12 @@ fi # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. echo $ac_n "checking for shmat""... $ac_c" 1>&6 -echo "configure:15486: checking for shmat" >&5 +echo "configure:16317: checking for shmat" >&5 if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 15491 "configure" +#line 16322 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char shmat(); below. */ @@ -15510,7 +16341,7 @@ shmat(); ; return 0; } EOF -if { (eval echo configure:15514: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:16345: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_shmat=yes" else @@ -15531,7 +16362,7 @@ fi if test $ac_cv_func_shmat = no; then echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6 -echo "configure:15535: checking for shmat in -lipc" >&5 +echo "configure:16366: checking for shmat in -lipc" >&5 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -15539,7 +16370,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lipc $LIBS" cat > conftest.$ac_ext <<EOF -#line 15543 "configure" +#line 16374 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -15550,7 +16381,7 @@ int main() { shmat() ; return 0; } EOF -if { (eval echo configure:15554: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:16385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -15583,7 +16414,7 @@ fi # libraries we check for below, so use a different variable. # --interran@uluru.Stanford.EDU, kb@cs.umb.edu. echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6 -echo "configure:15587: checking for IceConnectionNumber in -lICE" >&5 +echo "configure:16418: checking for IceConnectionNumber in -lICE" >&5 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -15591,7 +16422,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lICE $X_EXTRA_LIBS $LIBS" cat > conftest.$ac_ext <<EOF -#line 15595 "configure" +#line 16426 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -15602,7 +16433,7 @@ int main() { IceConnectionNumber() ; return 0; } EOF -if { (eval echo configure:15606: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:16437: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -15647,7 +16478,7 @@ do done echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6 -echo "configure:15651: checking for XOpenDisplay in -lX11" >&5 +echo "configure:16482: checking for XOpenDisplay in -lX11" >&5 ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -15655,7 +16486,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS" cat > conftest.$ac_ext <<EOF -#line 15659 "configure" +#line 16490 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -15666,7 +16497,7 @@ int main() { XOpenDisplay() ; return 0; } EOF -if { (eval echo configure:15670: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:16501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -15687,7 +16518,7 @@ else fi echo $ac_n "checking for XtAppInitialize in -lXt""... $ac_c" 1>&6 -echo "configure:15691: checking for XtAppInitialize in -lXt" >&5 +echo "configure:16522: checking for XtAppInitialize in -lXt" >&5 ac_lib_var=`echo Xt'_'XtAppInitialize | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -15695,7 +16526,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS" cat > conftest.$ac_ext <<EOF -#line 15699 "configure" +#line 16530 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -15706,7 +16537,7 @@ int main() { XtAppInitialize() ; return 0; } EOF -if { (eval echo configure:15710: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:16541: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -15781,7 +16612,7 @@ fi echo $ac_n "checking for XextCreateExtension in -lXext""... $ac_c" 1>&6 -echo "configure:15785: checking for XextCreateExtension in -lXext" >&5 +echo "configure:16616: checking for XextCreateExtension in -lXext" >&5 ac_lib_var=`echo Xext'_'XextCreateExtension | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -15789,7 +16620,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lXext $LIBS" cat > conftest.$ac_ext <<EOF -#line 15793 "configure" +#line 16624 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -15800,7 +16631,7 @@ int main() { XextCreateExtension() ; return 0; } EOF -if { (eval echo configure:15804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:16635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -15837,13 +16668,13 @@ do if test $cf_path != default ; then CPPFLAGS="-I$cf_path/include $cf_save" echo $ac_n "checking for $cf_test in $cf_path""... $ac_c" 1>&6 -echo "configure:15841: checking for $cf_test in $cf_path" >&5 +echo "configure:16672: checking for $cf_test in $cf_path" >&5 else echo $ac_n "checking for $cf_test""... $ac_c" 1>&6 -echo "configure:15844: checking for $cf_test" >&5 +echo "configure:16675: checking for $cf_test" >&5 fi cat > conftest.$ac_ext <<EOF -#line 15847 "configure" +#line 16678 "configure" #include "confdefs.h" #include <X11/Intrinsic.h> @@ -15852,7 +16683,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:15856: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:16687: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_result=yes else @@ -15878,21 +16709,21 @@ rm -f conftest* if test $cf_path != default ; then LIBS="-L$cf_path/lib $cf_lib $LIBS" echo $ac_n "checking for $cf_lib in $cf_path""... $ac_c" 1>&6 -echo "configure:15882: checking for $cf_lib in $cf_path" >&5 +echo "configure:16713: checking for $cf_lib in $cf_path" >&5 else LIBS="$cf_lib $LIBS" echo $ac_n "checking for $cf_test in $cf_lib""... $ac_c" 1>&6 -echo "configure:15886: checking for $cf_test in $cf_lib" >&5 +echo "configure:16717: checking for $cf_test in $cf_lib" >&5 fi cat > conftest.$ac_ext <<EOF -#line 15889 "configure" +#line 16720 "configure" #include "confdefs.h" int main() { $cf_test() ; return 0; } EOF -if { (eval echo configure:15896: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:16727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cf_result=yes else @@ -15951,7 +16782,7 @@ do done echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6 -echo "configure:15955: checking for XOpenDisplay in -lX11" >&5 +echo "configure:16786: checking for XOpenDisplay in -lX11" >&5 ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -15959,7 +16790,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS" cat > conftest.$ac_ext <<EOF -#line 15963 "configure" +#line 16794 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -15970,7 +16801,7 @@ int main() { XOpenDisplay() ; return 0; } EOF -if { (eval echo configure:15974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:16805: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -15991,14 +16822,14 @@ else fi echo $ac_n "checking for XCurses library""... $ac_c" 1>&6 -echo "configure:15995: checking for XCurses library" >&5 +echo "configure:16826: checking for XCurses library" >&5 if eval "test \"`echo '$''{'cf_cv_lib_XCurses'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else LIBS="-lXCurses $LIBS" cat > conftest.$ac_ext <<EOF -#line 16002 "configure" +#line 16833 "configure" #include "confdefs.h" #include <xcurses.h> @@ -16008,7 +16839,7 @@ int main() { XCursesExit(); ; return 0; } EOF -if { (eval echo configure:16012: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:16843: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cf_cv_lib_XCurses=yes else @@ -16042,7 +16873,7 @@ fi else echo $ac_n "checking if we can include termio.h with curses""... $ac_c" 1>&6 -echo "configure:16046: checking if we can include termio.h with curses" >&5 +echo "configure:16877: checking if we can include termio.h with curses" >&5 if eval "test \"`echo '$''{'cf_cv_termio_and_curses'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -16051,7 +16882,7 @@ else CPPFLAGS="$CPPFLAGS -DHAVE_CONFIG_H -I. -I${srcdir-.} -I${srcdir-.}/src -I${srcdir-.}/WWW/Library/Implementation" touch lynx_cfg.h cat > conftest.$ac_ext <<EOF -#line 16055 "configure" +#line 16886 "configure" #include "confdefs.h" #include <LYCurses.h> @@ -16060,7 +16891,7 @@ int main() { putchar(0x0a) ; return 0; } EOF -if { (eval echo configure:16064: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:16895: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_termio_and_curses=yes else diff --git a/configure.in b/configure.in index 9b5be075..90ebcccd 100644 --- a/configure.in +++ b/configure.in @@ -396,7 +396,7 @@ AC_ARG_WITH(screen, (XXX is curses (default), ncurses or slang)], [ case $withval in -curses|ncurses|pdcurses|slang) +curses|ncurses|ncursesw|pdcurses|slang) cf_cv_screen=$withval ;; *) AC_ERROR(Unexpected value) @@ -405,7 +405,7 @@ esac], [cf_cv_screen=curses])]) case $cf_cv_screen in -ncurses|slang) +ncurses|ncursesw|slang) ;; pdcurses) cf_cv_ncurses_header=xcurses.h @@ -430,6 +430,12 @@ ncurses) CF_NCURSES_LIBS CF_NCURSES_VERSION ;; +ncursesw) + CF_UTF8_LIB + CF_NCURSES_CPPFLAGS(ncursesw) + CF_NCURSES_LIBS(ncursesw) + CF_NCURSES_VERSION + ;; pdcurses) # do this last, since it changes definition of main: CF_PDCURSES_X11 ;; @@ -553,6 +559,7 @@ AC_CHECK_FUNCS( \ gettimeofday \ getuid \ mktemp \ + mkdtemp \ popen \ putenv \ readdir \ @@ -592,7 +599,7 @@ CF_CHECK_EXTERN_DATA(h_errno,int) ### These tests must be run after establishing the curses library. if test $cf_cv_screen != slang ; then if test $cf_cv_screen != pdcurses ; then - AC_CHECK_HEADERS(ncurses/term.h term.h) + AC_CHECK_HEADERS($cf_cv_screen/term.h term.h) fi CF_ALT_CHAR_SET CF_FANCY_CURSES @@ -600,6 +607,7 @@ if test $cf_cv_screen != slang ; then CF_COLOR_CURSES CF_SIZECHANGE CF_TTYTYPE + CF_WIDEC_CURSES CF_CURSES_FUNCS( \ assume_default_colors \ cbreak \ diff --git a/docs/README.defines b/docs/README.defines index 2ec2ac46..5b9cc92d 100644 --- a/docs/README.defines +++ b/docs/README.defines @@ -94,6 +94,7 @@ Using curses or ncurses library: new size after size changes of the terminal (window). for UNIX handled by ./configure, may be set in HTUtils.h # -DUSE_SCROLLBAR supports scrollbar when built with ncurses +# -DWIDEC_CURSES whether curses lib supports wide/multibyte characters. Using slang library: # -DUSE_SLANG (see INSTALLATION, Section II-1c) @@ -110,7 +111,6 @@ Related to experimental (unsupported) character style code Other general ------------- # -DIGNORE_CTRL_C Define if Control-C shouldn't exit lynx. -# -DNO_CPU_LIMIT Disables Max CPU timeout (includes CLOCKS_PER_SECOND) # -DNO_DUMP_WITH_BACKSPACES Disables -with_backspaces code # -DUSE_VASPRINT Use vasprintf() function # -DNO_RULES Disables code for CERN-style rules files @@ -3181,7 +3181,6 @@ COLOR:6:brightred:black # Note that a few settings (Cookies and Show images) are comprised of more than # one lynx.cfg setting. .nf -#ENABLE_LYNXRC:DTD_recovery:OFF #ENABLE_LYNXRC:accept_all_cookies:ON #ENABLE_LYNXRC:assume_char_set:OFF #ENABLE_LYNXRC:bookmark_file:ON @@ -3201,8 +3200,8 @@ COLOR:6:brightred:black #ENABLE_LYNXRC:kblayout:ON #ENABLE_LYNXRC:keypad_mode:ON #ENABLE_LYNXRC:lineedit_mode:ON -#ENABLE_LYNXRC:make_pseudo_alts_for_inlines:OFF #ENABLE_LYNXRC:make_links_for_all_images:OFF +#ENABLE_LYNXRC:make_pseudo_alts_for_inlines:OFF #ENABLE_LYNXRC:multi_bookmark:ON #ENABLE_LYNXRC:personal_mail_address:ON #ENABLE_LYNXRC:preferred_charset:ON @@ -3216,10 +3215,11 @@ COLOR:6:brightred:black #ENABLE_LYNXRC:show_color:ON #ENABLE_LYNXRC:show_cursor:ON #ENABLE_LYNXRC:show_dotfiles:ON -#ENABLE_LYNXRC:show_rate:OFF +#ENABLE_LYNXRC:show_kb_rate:OFF #ENABLE_LYNXRC:sub_bookmarks:ON -#ENABLE_LYNXRC:user_agent:OFF +#ENABLE_LYNXRC:tagsoup:OFF #ENABLE_LYNXRC:user_mode:ON +#ENABLE_LYNXRC:useragent:OFF #ENABLE_LYNXRC:verbose_images:ON #ENABLE_LYNXRC:vi_keys:ON #ENABLE_LYNXRC:visited_links:ON diff --git a/lynx_help/keystrokes/environments.html b/lynx_help/keystrokes/environments.html index 290ffcb0..06f66a8d 100644 --- a/lynx_help/keystrokes/environments.html +++ b/lynx_help/keystrokes/environments.html @@ -106,7 +106,7 @@ Environment Variables Used By Lynx: the form PROTOCOL_proxy (literally: http_proxy, ftp_proxy, gopher_proxy, etc), to "http://some.server.dom:port/". - See <a href="#proxy">details and examples</a>. + See <a href="#proxy">Proxy details and examples</a>. WWW_access_GATEWAY Lynx still supports use of gateway @@ -118,7 +118,7 @@ Environment Variables Used By Lynx: discontinued. Note that you do not include a terminal '/' for gateways, but do for proxies specified by PROTOCOL_proxy - environment variables. See <a href="#proxy">details</a>. + environment variables. See <a href="#proxy">Proxy details</a>. WWW_HOME This variable, if set, will override @@ -281,7 +281,7 @@ NATIVE LANGUAGE SUPPORT path prefix for message catalogs. <a name="proxy"><em> -Proxy: +Proxy details and examples: </em></a> To set your site's NTTP server as the default host for news reading diff --git a/makefile.in b/makefile.in index 73fb9395..fc75aa74 100644 --- a/makefile.in +++ b/makefile.in @@ -117,11 +117,11 @@ SITE_DEFS = # Your defines here # defines for which there are no configure options: # -DHP_TERMINAL For DIM workaround to REVERSE problems on HP terminals. # -DIGNORE_CTRL_C Define if Control-C shouldn't exit lynx. -# -DNO_CPU_LIMIT Disables Max CPU timeout (includes CLOCKS_PER_SECOND) # -DNO_RULES Disables CERN-style access rules (see lynx.cfg). +# -DMISC_EXP Enable some truly experimental stuff # -DSHORTENED_RBIND For a SOCKSified lynx with the short version of Rbind. # -DSLANG_MBCS_HACK prevent cutoff lines when using UTF8 console (slang only) -# -DUSE_SCROLLBAR supports scrollbar when built with ncurses +# -DUSE_VASPRINT Use vasprintf() function # # if you are linking to freeWAIS-0.202 or older, you should define this # in SITE_DEFS @@ -143,44 +143,10 @@ SITE_DEFS = # Your defines here # # -DDGUX_OLD -# defines which have configure options (see INSTALLATION, Section II-1c.): -# -DARCHIVE_ONLY -# -DDIRED_SUPPORT -# -DDISP_PARTIAL -# -DDONT_TRACK_INTERNAL_LINKS -# -DEXEC_LINKS -# -DEXEC_SCRIPTS -# -DEXP_CHARTRANS_AUTOSWITCH -# -DEXP_PERSISTENT_COOKIES -# -DLONG_LIST -# -DLYNXCGI_LINKS -# -DLY_FIND_LEAKS -# -DNCURSES -# -DNO_CHANGE_EXECUTE_PERMS -# -DNO_EXTENDED_HTMLDTD -# -DNO_PARENT_DIR_REFERENCE -# -DNSL_FORK -# -DOK_GZIP -# -DOK_OVERRIDE -# -DOK_PERMIT -# -DOK_TAR -# -DOK_UUDECODE -# -DOK_ZIP -# -DOPTIONS_FORMS -# -DOPTIONS_MENU -# -DSOCKS -# -DSYSLOG_REQUESTED_URLS -# -DUNDERLINE_LINKS -# -DUSE_COLOR_STYLE -# -DUSE_DEFAULT_COLORS -# -DUSE_EXTERNALS -# -DUSE_SLANG -# -DUSE_SOCKS5 -# -DUSE_ZLIB +# Many other defines have configure options (see INSTALLATION, Section II-1c.): # # for installation of local execution links, please see the file userdefs.h -# TESTED: Linux FreeBSD SunOS Solaris IRIX CLIX HP-UX AIX SCO all lynx$x: cfg_defs.h LYHelp.h @MSG_DIR_MAKE@ $(SHELL) $(srcdir)/fixtext.sh $(srcdir)/LYMessages_en.h >LYMessages.c @INTLDIR_MAKE@ cd intl && $(MAKE) CC="$(CC)" diff --git a/samples/keepviewer b/samples/keepviewer index 92e8f768..f5c0b2c1 100755 --- a/samples/keepviewer +++ b/samples/keepviewer @@ -8,8 +8,13 @@ # Parameters: # $1 is viewer # $2 is filename -chmod 600 $2 -myfile=`echo $2 | sed -e 's@\(.*/tmp/\)\([^/]*/\)\?\(.*\)@\1my\3@'` -ln $2 $myfile || exit 1 -trap "rm -f $myfile" 0 1 2 5 15 -eval $1 $myfile +if test $# = 2 ; then + chmod 600 $2 + myfile=`echo $2 | sed -e 's@\(.*/tmp/\)\([^/]*/\)\?\(.*\)@\1my\3@'` + ln $2 $myfile || exit 1 + trap "rm -f $myfile" 0 1 2 5 15 + eval $1 $myfile +else + echo "Usage: keepviewer <viewer> <filename>" + exit 1 +fi diff --git a/src/GridText.c b/src/GridText.c index 88630322..26cb0656 100644 --- a/src/GridText.c +++ b/src/GridText.c @@ -45,7 +45,7 @@ #define NOTUSED_BAD_FOR_SCREEN #endif -#undef DEBUG_APPCH +/*#define DEBUG_APPCH 1*/ #ifdef SOURCE_CACHE #include <HTFile.h> @@ -494,6 +494,11 @@ PUBLIC char star_string[MAX_LINE + 1]; PRIVATE int ctrl_chars_on_this_line = 0; /* num of ctrl chars in current line */ PRIVATE int utfxtra_on_this_line = 0; /* num of UTF-8 extra bytes in line, they *also* count as ctrl chars. */ +#ifdef WIDEC_CURSES +#define UTFXTRA_ON_THIS_LINE 0 +#else +#define UTFXTRA_ON_THIS_LINE utfxtra_on_this_line +#endif PRIVATE HTStyle default_style = { 0, "(Unstyled)", "", @@ -1094,7 +1099,7 @@ PRIVATE int display_line ARGS4( #define intarget NO #endif /* SHOW_WHEREIS_TARGETS && !USE_COLOR_STYLE */ -#ifndef NCURSES_VERSION +#if !(defined(NCURSES_VERSION) || defined(WIDEC_CURSES)) text->has_utf8 = NO; /* use as per-line flag, except with ncurses */ #endif @@ -1297,30 +1302,9 @@ PRIVATE int display_line ARGS4( #endif /* SHOW_WHEREIS_TARGETS */ #endif /* USE_COLOR_STYLE */ i++; - if (text->T.output_utf8 && !isascii(UCH(buffer[0]))) { + if (text->T.output_utf8 && is8bits(buffer[0])) { text->has_utf8 = YES; - if ((*buffer & 0xe0) == 0xc0) { - utf_extra = 1; - } else if ((*buffer & 0xf0) == 0xe0) { - utf_extra = 2; - } else if ((*buffer & 0xf8) == 0xf0) { - utf_extra = 3; - } else if ((*buffer & 0xfc) == 0xf8) { - utf_extra = 4; - } else if ((*buffer & 0xfe) == 0xfc) { - utf_extra = 5; - } else { - /* - * Garbage. - */ - utf_extra = 0; - } - if (strlen(data) < utf_extra) { - /* - * Shouldn't happen. - */ - utf_extra = 0; - } + utf_extra = utf8_length(text->T.output_utf8, data-1); LastDisplayChar = 'M'; } if (utf_extra) { @@ -1330,7 +1314,7 @@ PRIVATE int display_line ARGS4( buffer[1] = '\0'; data += utf_extra; utf_extra = 0; - } else if (HTCJK != NOCJK && !isascii(UCH(buffer[0])) + } else if (HTCJK != NOCJK && is8bits(buffer[0]) #ifndef CONV_JISX0201KANA_JISX0208KANA && kanji_code != SJIS #endif @@ -1366,7 +1350,7 @@ PRIVATE int display_line ARGS4( } /* end of while */ after_while: -#if !defined(NCURSES_VERSION) +#if !(defined(NCURSES_VERSION) || defined(WIDEC_CURSES)) if (text->has_utf8) { LYtouchline(scrline); text->has_utf8 = NO; /* we had some, but have dealt with it. */ @@ -1651,10 +1635,11 @@ PRIVATE void display_scrollbar ARGS1( LynxChangeStyle(s_sb_bar, STACK_OFF); #endif /* USE_COLOR_STYLE */ LYmove(i + off, LYcols + LYshiftWin - 1); - if (i > top_skip && i <= h - bot_skip) + if (i > top_skip && i <= h - bot_skip) { LYaddch(ACS_BLOCK); - else + } else { LYaddch(ACS_CKBOARD); + } } #ifdef USE_COLOR_STYLE LynxChangeStyle(s_sb_bg, STACK_OFF); @@ -1942,30 +1927,7 @@ PRIVATE void display_page ARGS3( /* * Output all the printable target chars. */ - if (text->T.output_utf8 && !isascii(UCH(tmp[0]))) { - if ((*tmp & 0xe0) == 0xc0) { - utf_extra = 1; - } else if ((*tmp & 0xf0) == 0xe0) { - utf_extra = 2; - } else if ((*tmp & 0xf8) == 0xf0) { - utf_extra = 3; - } else if ((*tmp & 0xfc) == 0xf8) { - utf_extra = 4; - } else if ((*tmp & 0xfe) == 0xfc) { - utf_extra = 5; - } else { - /* - * Garbage. - */ - utf_extra = 0; - } - if (strlen(&line->data[itmp+1]) < utf_extra) { - /* - * Shouldn't happen. - */ - utf_extra = 0; - } - } + utf_extra = utf8_length(text->T.output_utf8, data + itmp); if (utf_extra) { strncpy(&tmp[1], &line->data[itmp+1], utf_extra); tmp[utf_extra+1] = '\0'; @@ -1974,7 +1936,7 @@ PRIVATE void display_page ARGS3( tmp[1] = '\0'; written += (utf_extra + 1); utf_extra = 0; - } else if (HTCJK != NOCJK && !isascii(UCH(tmp[0]))) { + } else if (HTCJK != NOCJK && is8bits(tmp[0])) { /* * For CJK strings, by Masanobu Kimura. */ @@ -2164,7 +2126,7 @@ PRIVATE void display_page ARGS3( /* * Bold the link after incrementing nlinks. */ - highlight(OFF, (nlinks - 1), target); + LYhighlight(OFF, (nlinks - 1), target); display_flag = TRUE; @@ -2238,6 +2200,7 @@ PRIVATE void display_page ARGS3( } #endif /* DISP_PARTIAL */ +#if !defined(WIDEC_CURSES) if (text->has_utf8 || text->had_utf8) { /* * For other than ncurses, repainting is taken care of @@ -2255,6 +2218,8 @@ PRIVATE void display_page ARGS3( */ clearok(curscr, TRUE); } +#endif /* WIDEC_CURSES */ + LYrefresh(); } @@ -2284,9 +2249,13 @@ PUBLIC void HText_beginAppend ARGS1( as any other large value. (But don't use INT_MAX or something close to it to, avoid over/underflow.) - kw */ #ifdef USE_SLANG -#define LYcols_cu (dump_output_immediately ? MAX_COLS : SLtt_Screen_Cols) +#define LYcols_cu(text) (dump_output_immediately ? MAX_COLS : SLtt_Screen_Cols) #else -#define LYcols_cu (dump_output_immediately ? MAX_COLS : DISPLAY_COLS) +#ifdef WIDEC_CURSES +#define LYcols_cu(text) WRAP_COLS(text) +#else +#define LYcols_cu(text) (dump_output_immediately ? MAX_COLS : DISPLAY_COLS) +#endif #endif /* Add a new line of text @@ -2459,7 +2428,9 @@ PRIVATE HTLine * insert_blanks_in_line ARGS7( int curlim = (ip < ninserts ? oldpos[ip] /* Include'em all! */ - : (line->size <= MAX_LINE ? MAX_LINE+1 : line->size+1)); + : ((int)line->size <= MAX_LINE + ? MAX_LINE+1 + : (int)line->size+1)); pre = s; /* Fast forward to char==curlim or EOL. Stop *before* the @@ -2564,7 +2535,7 @@ PRIVATE void split_line ARGS2( char *p; HTLine * previous = text->last_line; int ctrl_chars_on_previous_line = 0; - int utfxtra_on_previous_line = utfxtra_on_this_line; + int utfxtra_on_previous_line = UTFXTRA_ON_THIS_LINE; char * cp; /* can't wrap in middle of multibyte sequences, so allocate 2 extra */ HTLine * line = (HTLine *)LY_CALLOC(1, LINE_SIZE(MAX_LINE)+2); @@ -2698,10 +2669,11 @@ PRIVATE void split_line ARGS2( p[i] == LY_UNDERLINE_END_CHAR || p[i] == LY_BOLD_START_CHAR || p[i] == LY_BOLD_END_CHAR || - p[i] == LY_SOFT_HYPHEN) + p[i] == LY_SOFT_HYPHEN) { ctrl_chars_on_this_line++; - else if (IS_UTF_EXTRA(p[i])) + } else if (IS_UTF_EXTRA(p[i])) { utfxtra_on_this_line++; + } if (p[i] == LY_SOFT_HYPHEN && (int)text->permissible_split < i) text->permissible_split = i + 1; } @@ -2896,8 +2868,9 @@ PRIVATE void split_line ARGS2( *cp == LY_BOLD_START_CHAR || *cp == LY_BOLD_END_CHAR || IS_UTF_EXTRA(*cp) || - *cp == LY_SOFT_HYPHEN) + *cp == LY_SOFT_HYPHEN) { ctrl_chars_on_previous_line++; + } } if ((previous->size > 0) && (int)(previous->data[previous->size-1] == LY_SOFT_HYPHEN)) @@ -2912,9 +2885,9 @@ PRIVATE void split_line ARGS2( if (spare > 0 && !dump_output_immediately && text->T.output_utf8 && ctrl_chars_on_previous_line) { - utfxtra_on_previous_line -= utfxtra_on_this_line; + utfxtra_on_previous_line -= UTFXTRA_ON_THIS_LINE; if (utfxtra_on_previous_line) { - int spare_cu = (LYcols_cu-1) - + int spare_cu = (LYcols_cu(text)-1) - utfxtra_on_previous_line - indent + ctrl_chars_on_previous_line - previous->size; /* @@ -2933,7 +2906,7 @@ PRIVATE void split_line ARGS2( (int)(previous->offset + indent + spare/2 + previous->size) - ctrl_chars_on_previous_line - + utfxtra_on_previous_line <= (LYcols_cu - 1)) + + utfxtra_on_previous_line <= (LYcols_cu(text) - 1)) /* do nothing - it still fits - kw */; else { spare = spare_cu; @@ -3107,22 +3080,8 @@ PRIVATE void split_line ARGS2( *jp = ' '; /* substitute it */ continue; } - if (text->T.output_utf8 && !isascii(UCH(c))) { - int utf_extra = 0; - if ((c & 0xe0) == 0xc0) { - utf_extra = 1; - } else if ((c & 0xf0) == 0xe0) { - utf_extra = 2; - } else if ((c & 0xf8) == 0xf0) { - utf_extra = 3; - } else if ((c & 0xfc) == 0xf8) { - utf_extra = 4; - } else if ((c & 0xfe) == 0xfc) { - utf_extra = 5; - } else - utf_extra = 0; - if ( (int) strlen(jp+1) < utf_extra) - utf_extra = 0; + if (text->T.output_utf8 && is8bits(c)) { + int utf_extra = utf8_length(text->T.output_utf8, jp); r->byte_len += utf_extra; jp += utf_extra; } @@ -3309,7 +3268,9 @@ PUBLIC void HText_appendCharacter ARGS2( { HTLine * line; HTStyle * style; - int indent, utfx; + int indent; + int limit = 0; + int actual; #ifdef DEBUG_APPCH #ifdef CJK_EX @@ -3366,12 +3327,12 @@ PUBLIC void HText_appendCharacter ARGS2( save_ch = 0; } #else - if (ch < 0x80) { - CTRACE((tfp, "add(%c) %d/%d\n", ch, - HTisDocumentSource(), HTOutputFormat != WWW_SOURCE)); + if (UCH(ch) < 0x80) { + CTRACE((tfp, "add(%c) %d/%d\n", UCH(ch), + HTisDocumentSource(), HTOutputFormat != WWW_SOURCE)); } else { - CTRACE((tfp, "add(%02x) %d/%d\n", ch, - HTisDocumentSource(), HTOutputFormat != WWW_SOURCE)); + CTRACE((tfp, "add(%02x) %d/%d\n", UCH(ch), + HTisDocumentSource(), HTOutputFormat != WWW_SOURCE)); } #endif /* CJK_EX */ } @@ -3516,10 +3477,11 @@ PUBLIC void HText_appendCharacter ARGS2( * processing stage anyway. - kw */ #ifndef EBCDIC /* S/390 -- gil -- 1514 */ - if (UCH(ch) >= 128 && HTCJK == NOCJK && + if (is8bits(ch) && HTCJK == NOCJK && !text->T.transp && !text->T.output_utf8 && - UCH(ch) < LYlowest_eightbit[current_char_set]) + UCH(ch) < LYlowest_eightbit[current_char_set]) { return; + } #endif /* EBCDIC */ #endif /* !USE_SLANG */ if (UCH(ch) == 155 && HTCJK == NOCJK) { /* octal 233 */ @@ -3534,7 +3496,6 @@ PUBLIC void HText_appendCharacter ARGS2( style = text->style; indent = text->in_line_1 ? (int)style->indent1st : (int)style->leftIndent; - utfx = utfxtra_on_this_line; if (HTCJK != NOCJK) { switch(text->state) { @@ -3718,8 +3679,9 @@ PUBLIC void HText_appendCharacter ARGS2( if (IsSpecialAttrChar(ch) && ch != LY_SOFT_NEWLINE) { #if !defined(USE_COLOR_STYLE) || !defined(NO_DUMP_WITH_BACKSPACES) - if (line->size >= (MAX_LINE-1)) + if (line->size >= (MAX_LINE-1)) { return; + } #if defined(USE_COLOR_STYLE) && !defined(NO_DUMP_WITH_BACKSPACES) if (with_backspaces && HTCJK==NOCJK && !text->T.output_utf8) { #endif @@ -3757,8 +3719,9 @@ PUBLIC void HText_appendCharacter ARGS2( * on the line, or if it is preceded by a space or * hyphen. - FM */ - if (line->size < 1 || text->permissible_split >= line->size) + if (line->size < 1 || text->permissible_split >= line->size) { return; + } for (i = (text->permissible_split + 1); line->data[i]; i++) { if (!IsSpecialAttrChar(UCH(line->data[i])) && @@ -3775,8 +3738,9 @@ PUBLIC void HText_appendCharacter ARGS2( } #if defined(USE_COLOR_STYLE) && !defined(NO_DUMP_WITH_BACKSPACES) } /* if (with_backspaces && HTCJK==HTNOCJK && !text->T.output_utf8) */ - else - return; + else { + return; + } #endif #else @@ -3796,12 +3760,13 @@ PUBLIC void HText_appendCharacter ARGS2( */ if (IS_UTF_EXTRA(ch)) { if ((line->size > (MAX_LINE-1)) - || (indent + (int)(line->offset + line->size) + - utfxtra_on_this_line - ctrl_chars_on_this_line + - ((line->size > 0) && - (int)(line->data[line->size-1] == + || (indent + (int)(line->offset + line->size) + + UTFXTRA_ON_THIS_LINE + - ctrl_chars_on_this_line + + ((line->size > 0) && + (int)(line->data[line->size-1] == LY_SOFT_HYPHEN ? - 1 : 0)) >= (LYcols_cu-1)) + 1 : 0)) >= (LYcols_cu(text)-1)) ) { if (!text->permissible_split || text->source) { text->permissible_split = line->size; @@ -3817,7 +3782,7 @@ PUBLIC void HText_appendCharacter ARGS2( split_line(text, text->permissible_split); line = text->last_line; if (text->source && line->size - ctrl_chars_on_this_line - + utfxtra_on_this_line == 0) + + UTFXTRA_ON_THIS_LINE == 0) HText_appendCharacter (text, LY_SOFT_NEWLINE); } line->data[line->size++] = (char) ch; @@ -3840,7 +3805,7 @@ PUBLIC void HText_appendCharacter ARGS2( split_line(text, text->permissible_split); line = text->last_line; if (text->source && line->size - ctrl_chars_on_this_line - + utfxtra_on_this_line == 0) + + UTFXTRA_ON_THIS_LINE == 0) HText_appendCharacter (text, LY_SOFT_NEWLINE); } } @@ -3850,15 +3815,15 @@ PUBLIC void HText_appendCharacter ARGS2( * New Line. */ if (ch == '\n') { - new_line(text); - text->in_line_1 = YES; /* First line of new paragraph */ - /* - * There are some pages written in - * different kanji codes. - TA & kw - */ - if (HTCJK == JAPANESE) - text->kcode = NOKANJI; - return; + new_line(text); + text->in_line_1 = YES; /* First line of new paragraph */ + /* + * There are some pages written in + * different kanji codes. - TA & kw + */ + if (HTCJK == JAPANESE) + text->kcode = NOKANJI; + return; } /* @@ -3894,7 +3859,6 @@ PUBLIC void HText_appendCharacter ARGS2( return; } - /* * Tabs. */ @@ -3913,7 +3877,7 @@ PUBLIC void HText_appendCharacter ARGS2( } here = ((int)(line->size + line->offset) + indent) - ctrl_chars_on_this_line; /* Consider special chars GAB */ - here_cu = here + utfxtra_on_this_line; + here_cu = here + UTFXTRA_ON_THIS_LINE; if (style->tabs) { /* Use tab table */ for (Tab = style->tabs; Tab->position <= here; @@ -3976,12 +3940,11 @@ check_WrapSource: * the source visible. */ int target = (int)(line->offset + line->size) - ctrl_chars_on_this_line; - int target_cu = target + utfxtra_on_this_line; + int target_cu = target + UTFXTRA_ON_THIS_LINE; if (target >= (WRAP_COLS(text)-1) - style->rightIndent - (((HTCJK != NOCJK) && text->kanji_buf) ? 1 : 0) || (text->T.output_utf8 && - target_cu + UTF_XLEN(ch) >= (LYcols_cu-1)) - ) { + target_cu + UTF_XLEN(ch) >= (LYcols_cu(text)-1))) { int saved_kanji_buf; int saved_state; @@ -4016,9 +3979,9 @@ check_WrapSource: */ if (text->IgnoreExcess) { int nominal = (indent + (int)(line->offset + line->size) - ctrl_chars_on_this_line); - int limit = (WRAP_COLS(text) - 1); int number; + limit = (WRAP_COLS(text) - 1); if (fields_are_numbered() && !number_fields_on_left && text->last_anchor != 0 @@ -4036,7 +3999,7 @@ check_WrapSource: : 1))))) + 2; } if ((nominal + (int)style->rightIndent) >= limit - || (nominal + utfxtra_on_this_line) >= (LYcols_cu - 1)) { + || (nominal + UTFXTRA_ON_THIS_LINE) >= (LYcols_cu(text) - 1)) { return; } } @@ -4044,21 +4007,21 @@ check_WrapSource: /* * Check for end of line. */ - if (((indent + (int)line->offset + (int)line->size) + + actual = ((indent + (int)line->offset + (int)line->size) + + ((line->size > 0) && + (int)(line->data[line->size-1] == LY_SOFT_HYPHEN ? 1 : 0))); + + if (text->T.output_utf8) { + actual += (UTFXTRA_ON_THIS_LINE - ctrl_chars_on_this_line + UTF_XLEN(ch)); + limit = (LYcols_cu(text) - 1); + } else { + actual += (int)style->rightIndent - ctrl_chars_on_this_line + - (((HTCJK != NOCJK) && text->kanji_buf) ? 1 : 0) + - ((line->size > 0) && - (int)(line->data[line->size-1] == - LY_SOFT_HYPHEN ? - 1 : 0))) >= (WRAP_COLS(text) - 1) || - (text->T.output_utf8 && - (((indent + (int)line->offset + (int)line->size) + - utfxtra_on_this_line - ctrl_chars_on_this_line + - UTF_XLEN(ch) + - ((line->size > 0) && - (int)(line->data[line->size-1] == - LY_SOFT_HYPHEN ? - 1 : 0))) >= (LYcols_cu - 1)))) { + (((HTCJK != NOCJK) && text->kanji_buf) ? 1 : 0); + limit = (WRAP_COLS(text) - 1); + } + + if (actual >= limit) { if (style->wordWrap && HTOutputFormat != WWW_SOURCE) { #ifdef EXP_JUSTIFY_ELTS @@ -4066,33 +4029,34 @@ check_WrapSource: this_line_was_split = TRUE; #endif split_line(text, text->permissible_split); - if (ch == ' ') return; /* Ignore space causing split */ - - } else if (HTOutputFormat == WWW_SOURCE) { - /* - * For source output we don't want to wrap this stuff - * unless absolutely necessary. - LJM - * ! - * If we don't wrap here we might get a segmentation fault. - * but let's see what happens - */ - if ((int)line->size >= (int)(MAX_LINE-1)) { - new_line(text); /* try not to linewrap */ - } - } else { - /* - * For normal stuff like pre let's go ahead and - * wrap so the user can see all of the text. - */ + if (ch == ' ') { + return; /* Ignore space causing split */ + } - if ( (dump_output_immediately|| (crawl && traversal) ) - && dont_wrap_pre) { - if ((int)line->size >= (int)(MAX_LINE-1)) - new_line(text); - } else { + } else if (HTOutputFormat == WWW_SOURCE) { + /* + * For source output we don't want to wrap this stuff + * unless absolutely necessary. - LJM + * ! + * If we don't wrap here we might get a segmentation fault. + * but let's see what happens + */ + if ((int)line->size >= (int)(MAX_LINE-1)) { + new_line(text); /* try not to linewrap */ + } + } else { + /* + * For normal stuff like pre let's go ahead and + * wrap so the user can see all of the text. + */ + if ( (dump_output_immediately|| (crawl && traversal) ) + && dont_wrap_pre) { + if ((int)line->size >= (int)(MAX_LINE-1)) { new_line(text); } - + } else { + new_line(text); + } } } else if ((int)line->size >= (int)(MAX_LINE-1)) { /* @@ -8357,7 +8321,7 @@ PRIVATE int HText_TrueLineSize ARGS3( for (i = 0; i < line->size; i++) { if (!IsSpecialAttrChar(UCH(line->data[i])) && (!(text && text->T.output_utf8) || - UCH(line->data[i]) < 128 || + !is8bits(line->data[i]) || (UCH((line->data[i] & 0xc0)) == 0xc0)) && !isspace(UCH(line->data[i])) && UCH(line->data[i]) != HT_NON_BREAK_SPACE && @@ -8369,7 +8333,7 @@ PRIVATE int HText_TrueLineSize ARGS3( for (i = 0; i < line->size; i++) { if (!IsSpecialAttrChar(line->data[i]) && (!(text && text->T.output_utf8) || - UCH(line->data[i]) < 128 || + !is8bits(line->data[i]) || (UCH(line->data[i] & 0xc0) == 0xc0))) { true_size++; } @@ -9764,6 +9728,123 @@ PRIVATE int find_best_target_cs ARGS3( return (-1); } +PRIVATE BOOLEAN begin_submission_part ARGS5( + char **, query, + BOOLEAN, first_one, + BOOLEAN, SemiColon, + BOOLEAN, PlainText, + char *, Boundary) +{ + if (first_one) { + if (Boundary) { + HTSprintf(query, "--%s\r\n", Boundary); + } + first_one = FALSE; + } else { + if (PlainText) { + StrAllocCat(*query, "\n"); + } else if (SemiColon) { + StrAllocCat(*query, ";"); + } else if (Boundary) { + HTSprintf(query, "\r\n--%s\r\n", Boundary); + } else { + StrAllocCat(*query, "&"); + } + } + return FALSE; +} + +#ifdef EXP_FILE_UPLOAD +PRIVATE BOOLEAN send_a_file ARGS6( + char **, query, + BOOLEAN, PlainText, + char *, MultipartContentType, + char *, Boundary, + char *, name_used, + char *, val_used) +{ + char *escaped1 = NULL; + char *escaped2 = NULL; + FILE *fd; + size_t n, bytes; + BOOLEAN code = FALSE; + BOOLEAN use_mime = FALSE; + char buffer[257]; + char base64buf[128]; + + CTRACE((tfp, "Ok, about to convert %s to mime/thingy\n", val_used)); + + if ((fd = fopen(val_used, BIN_R)) == 0) { + /* We can't open the file, what do we do? */ + HTAlert(gettext("Can't open file for uploading")); + goto exit_disgracefully; + } + StrAllocCopy(escaped2, ""); + while ((bytes = fread(buffer, sizeof(char), 256, fd)) != 0) { + buffer[bytes] = 0; + for (n = 0; n < bytes; ++n) { + int ch = UCH(buffer[n]); + if ((iscntrl(ch) && !isspace(ch)) + || (!iscntrl(ch) && !isprint(ch))) { + use_mime = TRUE; + break; + } + } + if (use_mime) + break; + StrAllocCat(escaped2, buffer); + } + if (use_mime) { + rewind(fd); + StrAllocCopy(escaped2, ""); + while ((bytes = fread(buffer, sizeof(char), 45, fd)) != 0) { + base64_encode(base64buf, buffer, bytes); + StrAllocCat(escaped2, base64buf); + } + } + if (ferror(fd)) { + /* We got an error reading the file, what do we do? */ + HTAlert(gettext("Short read from file, problem?")); + LYCloseInput(fd); + goto exit_disgracefully; + } + LYCloseInput(fd); + /* we need to modify the mime-type here - rp */ + /* Note: could use LYGetFileInfo for that and for + other headers that should be transmitted - kw */ + + if (PlainText) { + StrAllocCopy(escaped1, name_used); + } else if (Boundary) { + StrAllocCopy(escaped1, "Content-Disposition: form-data"); + HTSprintf(&escaped1, "; name=%s", name_used); + HTSprintf(&escaped1, "; filename=\"%s\"", val_used); + if (MultipartContentType) { + StrAllocCat(escaped1, MultipartContentType); + if (use_mime) + StrAllocCat(escaped1, "\r\nContent-Transfer-Encoding: base64"); + } + StrAllocCat(escaped1, "\r\n\r\n"); + } else { + escaped1 = HTEscapeSP(name_used, URL_XALPHAS); + } + + HTSprintf(query, + "%s%s%s%s%s", + escaped1, + (Boundary ? "" : "="), + (PlainText ? "\n" : ""), + escaped2, + ((PlainText && *escaped2) ? "\n" : "")); + code = TRUE; + +exit_disgracefully: + FREE(escaped1); + FREE(escaped2); + return code; +} +#endif /* EXP_FILE_UPLOAD */ + /* * HText_SubmitForm - generate submit data from form fields. * For mailto forms, send the data. @@ -9784,7 +9865,7 @@ PUBLIC int HText_SubmitForm ARGS4( PerFormInfo *thisform; char *query = NULL; char *escaped1 = NULL, *escaped2 = NULL; - int first_one = 1; + BOOLEAN first_one = TRUE; char *last_textarea_name = NULL; int textarea_lineno = 0; char *previous_blanks = NULL; @@ -10078,8 +10159,7 @@ PUBLIC int HText_SubmitForm ARGS4( strcmp(target_csname, "iso-8859-1"))) || (!HTMainText->node_anchor->charset && target_cs != UCLYhndl_for_unspec)) { - StrAllocCat(content_type_out, "; charset="); - StrAllocCat(content_type_out, target_csname); + HTSprintf(&content_type_out, "; charset=%s", target_csname); } } } else { @@ -10115,6 +10195,15 @@ PUBLIC int HText_SubmitForm ARGS4( switch(form_ptr->type) { case F_RESET_TYPE: break; +#ifdef EXP_FILE_UPLOAD + case F_FILE_TYPE: + name_used = (form_ptr->name ? form_ptr->name : ""); + val_used = (form_ptr->value ? form_ptr->value : ""); + CTRACE((tfp, + "I'd submit %s (from %s), but you've not finished it\n", + val_used, name_used)); + break; +#endif case F_SUBMIT_TYPE: case F_TEXT_SUBMIT_TYPE: case F_IMAGE_SUBMIT_TYPE: @@ -10142,16 +10231,6 @@ PUBLIC int HText_SubmitForm ARGS4( break; } /* FALLTHRU */ - -#ifdef EXP_FILE_UPLOAD - case F_FILE_TYPE: - CTRACE((tfp, "I'd submit %s (from %s), but you've not finished it\n", form_ptr->value, form_ptr->name)); - name_used = (form_ptr->name ? form_ptr->name : ""); - val_used = (form_ptr->value ? form_ptr->value : ""); - break; -#endif - - /* fall through */ case F_RADIO_TYPE: case F_CHECKBOX_TYPE: case F_TEXTAREA_TYPE: @@ -10227,24 +10306,20 @@ PUBLIC int HText_SubmitForm ARGS4( if (out_cs >= 0) out_csname = LYCharSet_UC[out_cs].MIMEname; if (Boundary) { + StrAllocCopy(MultipartContentType, + "\r\nContent-Type: text/plain"); if (!success && form_ptr->value_cs < 0) { /* This is weird. */ - StrAllocCopy(MultipartContentType, - "\r\nContent-Type: text/plain; charset="); - StrAllocCat(MultipartContentType, "UNKNOWN-8BIT"); + out_csname = "UNKNOWN-8BIT"; } else if (!success) { - StrAllocCopy(MultipartContentType, - "\r\nContent-Type: text/plain; charset="); - StrAllocCat(MultipartContentType, out_csname); target_csname = NULL; } else { if (!target_csname) { target_csname = LYCharSet_UC[target_cs].MIMEname; } - StrAllocCopy(MultipartContentType, - "\r\nContent-Type: text/plain; charset="); - StrAllocCat(MultipartContentType, out_csname); } + if (strcmp(out_csname, "iso-8859-1")) + HTSprintf(&MultipartContentType, "; charset=%s", out_csname); } /* @@ -10354,82 +10429,18 @@ PUBLIC int HText_SubmitForm ARGS4( #ifdef EXP_FILE_UPLOAD case F_FILE_TYPE: - { - int cdisp_name_startpos = 0; - FILE *fd; - int bytes; - char buffer[257]; - - CTRACE((tfp, "Ok, about to convert %s to mime/thingy\n", form_ptr->value)); - if (first_one) { - if (Boundary) { - HTSprintf(&query, "--%s\r\n", Boundary); - } - first_one = FALSE; - } else { - if (PlainText) { - HTSprintf(&query, "\n"); - } else if (SemiColon) { - HTSprintf(&query, ";"); - } else if (Boundary) { - HTSprintf(&query, "\r\n--%s\r\n", Boundary); - } else { - HTSprintf(&query, "&"); - } - } - - if (PlainText) { - StrAllocCopy(escaped1, name_used); - } else if (Boundary) { - StrAllocCopy(escaped1, - "Content-Disposition: form-data; name="); - cdisp_name_startpos = strlen(escaped1); - StrAllocCat(escaped1, name_used); - StrAllocCat(escaped1, "; filename=\""); - StrAllocCat(escaped1, val_used); - StrAllocCat(escaped1, "\""); - if (MultipartContentType) { - StrAllocCat(escaped1, MultipartContentType); - StrAllocCat(escaped1, "\r\nContent-Transfer-Encoding: base64"); - } - StrAllocCat(escaped1, "\r\n\r\n"); - } else { - escaped1 = HTEscapeSP(name_used, URL_XALPHAS); - } - - if ((fd = fopen(val_used, BIN_R)) == 0) { - /* We can't open the file, what do we do? */ - HTAlert(gettext("Can't open file for uploading")); - goto exit_disgracefully; - } - StrAllocCopy(escaped2, ""); - while ((bytes = fread(buffer, sizeof(char), 45, fd)) != 0) { - char base64buf[128]; - base64_encode(base64buf, buffer, bytes); - StrAllocCat(escaped2, base64buf); - } - if (ferror(fd)) { - /* We got an error reading the file, what do we do? */ - HTAlert(gettext("Short read from file, problem?")); - LYCloseInput(fd); + first_one = begin_submission_part(&query, + first_one, + SemiColon, + PlainText, + Boundary); + if (!send_a_file(&query, + PlainText, + MultipartContentType, + Boundary, + name_used, + val_used)) goto exit_disgracefully; - } - LYCloseInput(fd); - /* we need to modify the mime-type here - rp */ - /* Note: could use LYGetFileInfo for that and for - other headers that should be transmitted - kw */ - - HTSprintf(&query, - "%s%s%s%s%s", - escaped1, - (Boundary ? "" : "="), - (PlainText ? "\n" : ""), - escaped2, - ((PlainText && *escaped2) ? - "\n" : "")); - FREE(escaped1); - FREE(escaped2); - } break; #endif /* EXP_FILE_UPLOAD */ @@ -10451,22 +10462,12 @@ PUBLIC int HText_SubmitForm ARGS4( (form_ptr->value && *form_ptr->value != '\0' && !strcmp(form_ptr->value, link_value)))) { int cdisp_name_startpos = 0; - if (first_one) { - if (Boundary) { - HTSprintf(&query, "--%s\r\n", Boundary); - } - first_one=FALSE; - } else { - if (PlainText) { - StrAllocCat(query, "\n"); - } else if (SemiColon) { - StrAllocCat(query, ";"); - } else if (Boundary) { - HTSprintf(&query, "\r\n--%s\r\n", Boundary); - } else { - StrAllocCat(query, "&"); - } - } + + first_one = begin_submission_part(&query, + first_one, + SemiColon, + PlainText, + Boundary); if (PlainText) { StrAllocCopy(escaped1, name_used); @@ -10522,13 +10523,10 @@ PUBLIC int HText_SubmitForm ARGS4( HTSprintf(&query, "%s%s%s%s%s", escaped1, - (Boundary ? - "" : "="), - (PlainText ? - "\n" : ""), + (Boundary ? "" : "="), + (PlainText ? "\n" : ""), escaped2, - ((PlainText && *escaped2) ? - "\n" : "")); + ((PlainText && *escaped2) ? "\n" : "")); } FREE(escaped1); FREE(escaped2); @@ -10543,37 +10541,25 @@ PUBLIC int HText_SubmitForm ARGS4( * Only add if selected. */ if (form_ptr->num_value) { - if (first_one) { - if (Boundary) { - HTSprintf(&query, - "--%s\r\n", Boundary); - } - first_one=FALSE; - } else { - if (PlainText) { - StrAllocCat(query, "\n"); - } else if (SemiColon) { - StrAllocCat(query, ";"); - } else if (Boundary) { - HTSprintf(&query, "\r\n--%s\r\n", Boundary); - } else { - StrAllocCat(query, "&"); - } - } + first_one = begin_submission_part(&query, + first_one, + SemiColon, + PlainText, + Boundary); if (PlainText) { StrAllocCopy(escaped1, name_used); } else if (Boundary) { StrAllocCopy(escaped1, "Content-Disposition: form-data; name="); - StrAllocCat(escaped1, - name_used); + StrAllocCat(escaped1, name_used); if (MultipartContentType) StrAllocCat(escaped1, MultipartContentType); StrAllocCat(escaped1, "\r\n\r\n"); } else { escaped1 = HTEscapeSP(name_used, URL_XALPHAS); } + if (PlainText || Boundary) { StrAllocCopy(escaped2, (val_used ? @@ -10621,27 +10607,17 @@ PUBLIC int HText_SubmitForm ARGS4( } else { FREE(previous_blanks); } - if (first_one) { - if (Boundary) { - HTSprintf(&query, "--%s\r\n", Boundary); - } - first_one = FALSE; - } else { - if (PlainText) { - StrAllocCat(query, "\n"); - } else if (SemiColon) { - StrAllocCat(query, ";"); - } else if (Boundary) { - HTSprintf(&query, "\r\n--%s\r\n", Boundary); - } else { - StrAllocCat(query, "&"); - } - } + first_one = begin_submission_part(&query, + first_one, + SemiColon, + PlainText, + Boundary); + if (PlainText) { StrAllocCopy(escaped1, name_used); } else if (Boundary) { StrAllocCopy(escaped1, - "Content-Disposition: form-data; name="); + "Content-Disposition: form-data; name="); StrAllocCat(escaped1, name_used); if (MultipartContentType) StrAllocCat(escaped1, MultipartContentType); @@ -10649,16 +10625,14 @@ PUBLIC int HText_SubmitForm ARGS4( } else { escaped1 = HTEscapeSP(name_used, URL_XALPHAS); } + HTSprintf(&query, "%s%s%s%s%s", escaped1, - (Boundary ? - "" : "="), - (PlainText ? - "\n" : ""), + (Boundary ? "" : "="), + (PlainText ? "\n" : ""), escaped2, - ((PlainText && *escaped2) ? - "\n" : "")); + ((PlainText && *escaped2) ? "\n" : "")); FREE(escaped1); last_textarea_name = form_ptr->name; } else { @@ -10696,23 +10670,11 @@ PUBLIC int HText_SubmitForm ARGS4( case F_TEXT_TYPE: case F_OPTION_LIST_TYPE: case F_HIDDEN_TYPE: - if (first_one) { - if (Boundary) { - HTSprintf(&query, "--%s\r\n", Boundary); - } - first_one=FALSE; - } else { - if (PlainText) { - StrAllocCat(query, "\n"); - } else if (SemiColon) { - StrAllocCat(query, ";"); - } else if (Boundary) { - HTSprintf(&query, "\r\n--%s\r\n", Boundary); - } else { - StrAllocCat(query, "&"); - } - } - + first_one = begin_submission_part(&query, + first_one, + SemiColon, + PlainText, + Boundary); if (PlainText) { StrAllocCopy(escaped1, name_used); } else if (Boundary) { @@ -10737,13 +10699,10 @@ PUBLIC int HText_SubmitForm ARGS4( HTSprintf(&query, "%s%s%s%s%s", escaped1, - (Boundary ? - "" : "="), - (PlainText ? - "\n" : ""), + (Boundary ? "" : "="), + (PlainText ? "\n" : ""), escaped2, - ((PlainText && *escaped2) ? - "\n" : "")); + ((PlainText && *escaped2) ? "\n" : "")); FREE(escaped1); FREE(escaped2); FREE(copied_name_used); @@ -12827,29 +12786,8 @@ PRIVATE void redraw_part_of_line ARGS4( default: i++; - if (text->T.output_utf8 && !isascii(UCH(buffer[0]))) { - if ((*buffer & 0xe0) == 0xc0) { - utf_extra = 1; - } else if ((*buffer & 0xf0) == 0xe0) { - utf_extra = 2; - } else if ((*buffer & 0xf8) == 0xf0) { - utf_extra = 3; - } else if ((*buffer & 0xfc) == 0xf8) { - utf_extra = 4; - } else if ((*buffer & 0xfe) == 0xfc) { - utf_extra = 5; - } else { - /* - * Garbage. - */ - utf_extra = 0; - } - if (strlen(data) < utf_extra) { - /* - * Shouldn't happen. - */ - utf_extra = 0; - } + if (text->T.output_utf8 && is8bits(buffer[0])) { + utf_extra = utf8_length(text->T.output_utf8, data-1); LastDisplayChar = 'M'; } if (utf_extra) { @@ -12859,7 +12797,7 @@ PRIVATE void redraw_part_of_line ARGS4( buffer[1] = '\0'; data += utf_extra; utf_extra = 0; - } else if (HTCJK != NOCJK && !isascii(UCH(buffer[0]))) { + } else if (HTCJK != NOCJK && is8bits(buffer[0])) { /* * For CJK strings, by Masanobu Kimura. */ @@ -13050,7 +12988,7 @@ PRIVATE void move_to_glyph ARGS10( * and when to react to it should be cleaned up (here and * further below). For now this seems to work but isn't * very clear. The complications arise from reproducing - * the behavior (previously done in highlight()) for target + * the behavior (previously done in LYhighlight()) for target * strings that fall into or overlap a link: use target * emphasis for the target string, except for the first * and last character of the anchor text if the anchor is @@ -13237,7 +13175,7 @@ PRIVATE void move_to_glyph ARGS10( if (i == XP - 1) { i_after_tgt = i; } else if (i == XP - 2 && HTCJK != NOCJK && - !isascii(UCH(buffer[0]))) { + is8bits(buffer[0])) { i_after_tgt = i; cp_tgt = NULL; if (drawing) { @@ -13295,30 +13233,9 @@ PRIVATE void move_to_glyph ARGS10( } i++; - if (utf_flag && !isascii(UCH(buffer[0]))) { + if (utf_flag && is8bits(buffer[0])) { hadutf8 = YES; - if ((*buffer & 0xe0) == 0xc0) { - utf_extra = 1; - } else if ((*buffer & 0xf0) == 0xe0) { - utf_extra = 2; - } else if ((*buffer & 0xf8) == 0xf0) { - utf_extra = 3; - } else if ((*buffer & 0xfc) == 0xf8) { - utf_extra = 4; - } else if ((*buffer & 0xfe) == 0xfc) { - utf_extra = 5; - } else { - /* - * Garbage. - */ - utf_extra = 0; - } - if (strlen(data) < utf_extra) { - /* - * Shouldn't happen. - */ - utf_extra = 0; - } + utf_extra = utf8_length(utf_flag, data-1); LastDisplayChar = 'M'; } if (utf_extra) { @@ -13344,7 +13261,7 @@ PRIVATE void move_to_glyph ARGS10( buffer[1] = '\0'; sdata += utf_extra; data += utf_extra; utf_extra = 0; - } else if (HTCJK != NOCJK && !isascii(UCH(buffer[0]))) { + } else if (HTCJK != NOCJK && is8bits(buffer[0])) { /* * For CJK strings, by Masanobu Kimura. */ diff --git a/src/HTAlert.c b/src/HTAlert.c index 32452b62..2fb89f9f 100644 --- a/src/HTAlert.c +++ b/src/HTAlert.c @@ -92,7 +92,7 @@ PUBLIC void HTInfoMsg ARGS1( if (Msg && *Msg) { CTRACE((tfp, "Info message: %s\n", Msg)); LYstore_message(Msg); - LYSleep(InfoSecs); + LYSleepInfo(); } } @@ -106,6 +106,12 @@ PUBLIC void HTUserMsg ARGS1( if (Msg && *Msg) { CTRACE((tfp, "User message: %s\n", Msg)); LYstore_message(Msg); +#if !(defined(USE_SLANG) || defined(WIDEC_CURSES)) + if (HTCJK != NOCJK) { + clearok(curscr, TRUE); + LYrefresh(); + } +#endif LYSleepMsg(); } } diff --git a/src/HTForms.h b/src/HTForms.h index cdfa3688..5962f594 100644 --- a/src/HTForms.h +++ b/src/HTForms.h @@ -103,7 +103,7 @@ typedef struct _FormInfo { typedef struct _PerFormInfo { int number; /* form number, see GridText.c */ - /* except for the last two, the followign fields aren't actually used.. */ + /* except for the last two, the following fields aren't actually used.. */ int disabled; /* If YES, can't change values */ struct _PerFormInfo * next; /* pointer to next form in doc */ int nfields; /* number of fields */ @@ -4926,6 +4926,9 @@ PRIVATE int HTML_start_element ARGS6( */ if (present && present[HTML_INPUT_TYPE] && value[HTML_INPUT_TYPE] && *value[HTML_INPUT_TYPE]) { + char *not_impl = NULL; + char *usingval = NULL; + I.type = value[HTML_INPUT_TYPE]; if (!strcasecomp(I.type, "range")) { @@ -4936,7 +4939,7 @@ PRIVATE int HTML_start_element ARGS6( /* * Not yet implemented. */ - HTML_put_string(me,"[RANGE Input] (Not yet implemented.)"); + not_impl = "[RANGE Input]"; #ifdef NOTDEFINED if (me->inFORM) HText_DisableCurrentForm(); @@ -4947,27 +4950,15 @@ PRIVATE int HTML_start_element ARGS6( } else if (!strcasecomp(I.type, "file")) { if (present[HTML_INPUT_ACCEPT]) I.accept = value[HTML_INPUT_ACCEPT]; -#ifdef EXP_FILE_UPLOAD - /* - * Not yet implemented. - */ - if (me->inUnderline == FALSE) { - HText_appendCharacter(me->text, - LY_UNDERLINE_START_CHAR); - } - HTML_put_string(me,"[FILE Input] (Not yet implemented.)"); - if (me->inUnderline == FALSE) { - HText_appendCharacter(me->text, - LY_UNDERLINE_END_CHAR); - } -#else +#ifndef EXP_FILE_UPLOAD + not_impl = "[FILE Input]"; CTRACE((tfp, "Attempting to fake as: %s\n", I.type)); -#endif /* EXP_FILE_UPLOAD */ #ifdef NOTDEFINED if (me->inFORM) HText_DisableCurrentForm(); #endif /* NOTDEFINED */ CTRACE((tfp, "HTML: Ignoring TYPE=\"file\"\n")); +#endif /* EXP_FILE_UPLOAD */ } else if (!strcasecomp(I.type, "button")) { /* @@ -4976,6 +4967,23 @@ PRIVATE int HTML_start_element ARGS6( HTML_put_string(me,"[BUTTON] "); break; } + if (not_impl != NULL) { + if (me->inUnderline == FALSE) { + HText_appendCharacter(me->text, + LY_UNDERLINE_START_CHAR); + } + HTML_put_string(me, not_impl); + if (usingval != NULL) { + HTML_put_string(me, usingval); + FREE(usingval); + } else { + HTML_put_string(me, " (not implemented)"); + } + if (me->inUnderline == FALSE) { + HText_appendCharacter(me->text, + LY_UNDERLINE_END_CHAR); + } + } } /* diff --git a/src/LYBookmark.c b/src/LYBookmark.c index 8a732eb8..d0bd7086 100644 --- a/src/LYBookmark.c +++ b/src/LYBookmark.c @@ -712,7 +712,7 @@ get_advanced_choice: c = LYCharINTERRUPT2; } #endif /* VMS */ - if (LYisNonAlnumKeyname(c, LYK_PREV_DOC) || LYCharIsINTERRUPT(c)) { + if (LYisNonAlnumKeyname(c, LYK_PREV_DOC) || LYCharIsINTERRUPT_HARD(c)) { /* * Treat left-arrow, ^G, or ^C as cancel. */ diff --git a/src/LYCharUtils.c b/src/LYCharUtils.c index 8c5ae7df..7c146c6e 100644 --- a/src/LYCharUtils.c +++ b/src/LYCharUtils.c @@ -2990,6 +2990,7 @@ PUBLIC int LYLegitimizeHREF ARGS4( * No blanks really belong in the HREF, but if it refers to an actual * file, it may actually have blanks in the name. Try to accommodate. */ + LYRemoveNewlines(*href); convert_to_spaces(*href, FALSE); LYTrimLeading(*href); LYTrimTrailing(*href); diff --git a/src/LYCookie.c b/src/LYCookie.c index 27cc5d8d..8efc4e6c 100644 --- a/src/LYCookie.c +++ b/src/LYCookie.c @@ -359,7 +359,7 @@ PRIVATE void store_cookie ARGS3( */ if (!is_prefix(co->path, path)) { invcheck_behaviour_t invcheck_bv = (de ? de->invcheck_bv - : DEFAULT_INVCHECK_BV); + : DEFAULT_INVCHECK_BV); switch (invcheck_bv) { case INVCHECK_LOOSE: break; /* continue as if nothing were wrong */ @@ -651,7 +651,7 @@ PRIVATE char * scan_cookie_sublist ARGS6( char *, path, int, port, HTList *, sublist, - char *, header, + char *, header, BOOL, secure) { HTList *hl = sublist, *next = NULL; @@ -830,8 +830,8 @@ PRIVATE void LYProcessSetCookies ARGS6( CONST char *, SetCookie, CONST char *, SetCookie2, CONST char *, address, - char *, hostname, - char *, path, + char *, hostname, + char *, path, int, port) { CONST char *p, *attr_start, *attr_end, *value_start, *value_end; @@ -1932,7 +1932,15 @@ PUBLIC void LYSetCookie ARGS3( } else if (!strncasecomp(address, "https:", 6)) { port = 443; } - path = HTParse(address, "", PARSE_PATH|PARSE_PUNCTUATION); + if (((path = HTParse(address, "", + PARSE_PATH|PARSE_PUNCTUATION)) != NULL) && + (ptr = strrchr(path, '/')) != NULL) { + if (ptr == path) { + *(ptr+1) = '\0'; /* Leave a single '/' alone */ + } else { + *ptr = '\0'; + } + } if (!(SetCookie && *SetCookie) && !(SetCookie2 && *SetCookie2)) { /* @@ -2119,8 +2127,8 @@ PUBLIC void LYLoadCookies ARGS1 ( expires = atol(expires_a); CTRACE((tfp, "expires:\t%s\n", ctime(&expires))); -/* CTRACE((tfp, "%s\t%s\t%s\t%s\t%ld\t%s\t%s\tREADCOOKIE\n", */ -/* domain, what, path, secure, (long) expires, name, value)); */ +/* CTRACE((tfp, "%s\t%s\t%s\t%s\t%ld\t%s\t%s\tREADCOOKIE\n", */ +/* domain, what, path, secure, (long) expires, name, value)); */ moo = newCookie(); StrAllocCopy(moo->domain, domain); StrAllocCopy(moo->path, path); @@ -2168,7 +2176,7 @@ PUBLIC void LYLoadCookies ARGS1 ( * otherwise set it. */ moo->flags |= COOKIE_FLAG_FROM_FILE | COOKIE_FLAG_EXPIRES_SET | - COOKIE_FLAG_PATH_SET; + COOKIE_FLAG_PATH_SET; if (domain[0] == '.') moo->flags |= COOKIE_FLAG_DOMAIN_SET; if (secure[0] != 'F') @@ -2646,7 +2654,7 @@ Delete_all_cookies_in_domain: if (co->flags & COOKIE_FLAG_FROM_FILE) { HTSprintf0(&buf, "%s\n", gettext("(from a previous session)")); - PUTS(buf); + PUTS(buf); } /* @@ -2705,7 +2713,7 @@ Delete_all_cookies_in_domain: * Show the Maximum Gobble Date. - FM */ HTSprintf0(&buf, "<dd><em>%s</em> %s%s", - gettext("Maximum Gobble Date:"), + gettext("Maximum Gobble Date:"), ((co->flags & COOKIE_FLAG_EXPIRES_SET) ? ctime(&co->expires) : END_OF_SESSION), @@ -2738,8 +2746,8 @@ Delete_all_cookies_in_domain: */ PUBLIC void cookie_domain_flag_set ARGS2( - char *, domainstr, - int, flag) + char *, domainstr, + int, flag) { domain_entry *de = NULL; domain_entry *de2 = NULL; @@ -2850,7 +2858,7 @@ PUBLIC void cookie_domain_flag_set ARGS2( } /* - * If any COOKIE_{ACCEPT,REJECT}_DOMAINS have been defined, process them. + * If any COOKIE_{ACCEPT,REJECT}_DOMAINS have been defined, process them. * These are comma delimited lists of domains. - BJP * * And for query/strict/loose invalid cookie checking. - BJP diff --git a/src/LYCurses.c b/src/LYCurses.c index 2f43537b..24d249d1 100644 --- a/src/LYCurses.c +++ b/src/LYCurses.c @@ -36,6 +36,10 @@ extern int _NOSHARE(COLS); #include <LYHash.h> #endif +#ifdef NEED_WCHAR_H +#include <wchar.h> +#endif + #if defined(COLOR_CURSES) int lynx_has_color = FALSE; #endif @@ -555,7 +559,7 @@ PUBLIC void curses_style ARGS2( PRIVATE BOOL lynx_called_initscr = FALSE; #endif -#if HAVE_USE_DEFAULT_COLORS && USE_DEFAULT_COLORS +#if defined(HAVE_USE_DEFAULT_COLORS) && defined(USE_DEFAULT_COLORS) /* * If we find a "default" color while reading the config-file, set default * colors on the screen. @@ -1000,7 +1004,7 @@ PUBLIC void start_curses NOARGS if (has_colors()) { lynx_has_color = TRUE; start_color(); -#if USE_DEFAULT_COLORS +#ifdef USE_DEFAULT_COLORS #ifdef EXP_ASSUMED_COLOR /* * Adjust the color mapping table to match the ASSUMED_COLOR @@ -1652,29 +1656,147 @@ PUBLIC void LYtouchline ARGS1( } /* - * There's no guarantee that a library won't temporarily write on its input. - * Be safe and copy it when we have const-data. + * Wrapper for waddnstr(). */ PUBLIC void LYwaddnstr ARGS3( WINDOW *, w, - CONST char *, s, + CONST char *, src, size_t, len) { + /* + * We only want to trace this function for the color-style code. It would + * be too much logging if not needed. + */ #ifdef USE_COLOR_STYLE if (TRACE) { int y, x; LYGetYX(y, x); - CTRACE2(TRACE_STYLE, (tfp, "[%2d,%2d] LYwaddnstr(%.*s)\n", y, x, (int) len, s)); + CTRACE2(TRACE_STYLE, (tfp, "[%2d,%2d] LYwaddnstr(%.*s)\n", y, x, (int) len, src)); } #endif + /* + * Wide (multibyte) characters are always written as part of a string. So + * we can handle the conversion in one place. + * + * X/Open curses documents addstr() as able to handle multibyte sequences + * directly, but that is not (2001/11/5) yet implemented in ncurses. Two + * alternatives are possible: translating the string to an array of + * wchar_t's or to an array of cchar_t's. The former is more direct. Both + * have problems with combining-characters in this version of ncurses + * (successive calls are not merged), so I'm using them for testing -TD + */ +#ifdef WIDEC_CURSES +#if 1 /* array of wchar_t's */ + { + static wchar_t *temp = 0; + static size_t used = 0; + + wchar_t wch; + int l = 0; + mbstate_t state; + size_t rc; + int width; + unsigned j; + size_t need; + + memset(&state, 0, sizeof(state)); + need = 1 + len; + if (need > used) { + used = 2 * need; + CTRACE((tfp, "allocated %d (%d)\n", used, len)); + FREE(temp); + temp = typecallocn(wchar_t, used); + } + for (j = 0; j < len; j++) { + rc = mbrtowc(&wch, src + j, len - j, &state); + if (rc == 0 || rc == (size_t)(-1) || rc == (size_t)(-2)) + break; + j += rc - 1; + if ((width = wcwidth(wch)) < 0) + break; + temp[l++] = wch; + } + temp[l] = L'\0'; + waddnwstr(w, temp, l); +#ifdef LY_FIND_LEAKS + FREE(temp); + used = 0; +#endif + } +#else /* array of cchar_t's */ + { + static cchar_t *temp = 0; + static size_t used = 0; + + wchar_t wch; + wchar_t wstr[CCHARW_MAX + 1]; + int l = 0; + mbstate_t state; + size_t rc; + int width; + int y, x; + unsigned j, k; + size_t need; + attr_t attr; + short pair; + + wattr_get(w, &attr, &pair, (void *)0); + + memset(&state, 0, sizeof(state)); + need = 1 + len; + if (need > used) { + used = 2 * need; + CTRACE((tfp, "allocated %d (%d)\n", used, len)); + FREE(temp); + temp = typecallocn(cchar_t, used); + } + for (j = k = 0; j < len; j++) { + rc = mbrtowc(&wch, src + j, len - j, &state); + if (rc == 0 || rc == (size_t)(-1) || rc == (size_t)(-2)) + break; + j += rc - 1; + if ((width = wcwidth(wch)) < 0) + break; + if ((width > 0 && l > 0) || l == CCHARW_MAX) { + wstr[l] = L'\0'; + l = 0; + if (setcchar(temp + k, wstr, attr, 0, NULL) != OK) + break; + ++k; + } + if (width == 0 && l == 0) + wstr[l++] = L' '; + wstr[l++] = wch; + } + if (l > 0) { + wstr[l] = L'\0'; + if (setcchar(temp + k, wstr, attr, 0, NULL) == OK) + ++k; + } + setcchar(temp + k, L"", 0, 0, NULL); + wadd_wchnstr (w, temp, k); + getyx(w, y, x); /* we didn't move - do it now */ + wmove(w, y, x + k); +#ifdef LY_FIND_LEAKS + FREE(temp); + used = 0; +#endif + } +#endif +#else + /* + * There's no guarantee that a library won't temporarily write on its input. + * Be safe and copy it when we have const-data. + */ while (len > 0) { char temp[MAX_LINE]; size_t use = (len >= MAX_LINE) ? MAX_LINE - 1 : len; - memcpy(temp, s, use); + memcpy(temp, src, use); temp[use] = 0; waddstr(w, temp); len -= use; } +#endif } #ifdef VMS diff --git a/src/LYCurses.h b/src/LYCurses.h index 5de3fc6b..9ac77ed7 100644 --- a/src/LYCurses.h +++ b/src/LYCurses.h @@ -171,22 +171,27 @@ typedef struct { #endif #ifdef HAVE_CONFIG_H -# ifdef HAVE_NCURSES_NCURSES_H -# include <ncurses/ncurses.h> +# ifdef HAVE_NCURSESW_NCURSES_H +# undef GCC_PRINTFLIKE /* <libutf8.h> may define 'printf' */ +# include <ncursesw/ncurses.h> # else -# ifdef HAVE_NCURSES_H -# include <ncurses.h> +# ifdef HAVE_NCURSES_NCURSES_H +# include <ncurses/ncurses.h> # else -# ifdef HAVE_CURSESX_H -# include <cursesX.h> /* Ultrix */ +# ifdef HAVE_NCURSES_H +# include <ncurses.h> # else -# ifdef HAVE_JCURSES_H -# include <jcurses.h> /* sony_news */ +# ifdef HAVE_CURSESX_H +# include <cursesX.h> /* Ultrix */ # else -# ifdef HAVE_XCURSES -# include <xcurses.h> /* PDCurses' UNIX port */ +# ifdef HAVE_JCURSES_H +# include <jcurses.h> /* sony_news */ # else -# include <curses.h> /* default */ +# ifdef HAVE_XCURSES +# include <xcurses.h> /* PDCurses' UNIX port */ +# else +# include <curses.h> /* default */ +# endif # endif # endif # endif @@ -613,8 +618,8 @@ FANCY_CURSES. Check your config.log to see why the FANCY_CURSES test failed. * If the screen library allows us to specify "default" color, allow user to * control it. */ -#if USE_DEFAULT_COLORS -#if USE_SLANG || (HAVE_ASSUME_DEFAULT_COLORS && !defined(USE_COLOR_STYLE)) +#ifdef USE_DEFAULT_COLORS +#if USE_SLANG || (defined(HAVE_ASSUME_DEFAULT_COLORS) && !defined(USE_COLOR_STYLE)) #define EXP_ASSUMED_COLOR 1 #endif #endif diff --git a/src/LYLeaks.c b/src/LYLeaks.c index 6f188ebe..3f014d33 100644 --- a/src/LYLeaks.c +++ b/src/LYLeaks.c @@ -785,7 +785,7 @@ PRIVATE char * LYLeakSAVsprintf ARGS6( /* Note: the following may need updating if HTSprintf in HTString.c * is changed. - kw */ -#if ANSI_VARARGS +#ifdef ANSI_VARARGS PRIVATE char * LYLeakHTSprintf (char **pstr, CONST char *fmt, ...) #else PRIVATE char * LYLeakHTSprintf (va_alist) @@ -797,7 +797,7 @@ PRIVATE char * LYLeakHTSprintf (va_alist) va_list ap; LYva_start(ap,fmt); { -#if !ANSI_VARARGS +#ifndef ANSI_VARARGS char ** pstr = va_arg(ap, char **); CONST char * fmt = va_arg(ap, CONST char *); #endif @@ -812,7 +812,7 @@ PRIVATE char * LYLeakHTSprintf (va_alist) /* Note: the following may need updating if HTSprintf0 in HTString.c * is changed. - kw */ -#if ANSI_VARARGS +#ifdef ANSI_VARARGS PRIVATE char * LYLeakHTSprintf0 (char **pstr, CONST char *fmt, ...) #else PRIVATE char * LYLeakHTSprintf0 (va_alist) @@ -823,7 +823,7 @@ PRIVATE char * LYLeakHTSprintf0 (va_alist) va_list ap; LYva_start(ap,fmt); { -#if !ANSI_VARARGS +#ifndef ANSI_VARARGS char ** pstr = va_arg(ap, char **); CONST char * fmt = va_arg(ap, CONST char *); #endif diff --git a/src/LYMain.c b/src/LYMain.c index 36303f4c..71ae0780 100644 --- a/src/LYMain.c +++ b/src/LYMain.c @@ -3477,7 +3477,7 @@ keys (may be incompatible with some curses packages)" "nolog", 4|UNSET_ARG, error_logging, "disable mailing of error messages to document owners" ), -#if HAVE_SIGACTION && defined(SIGWINCH) +#if defined(HAVE_SIGACTION) && defined(SIGWINCH) PARSE_SET( "nonrestarting_sigwinch", 4|SET_ARG, LYNonRestartingSIGWINCH, "\nmake window size change handler non-restarting" diff --git a/src/LYMainLoop.c b/src/LYMainLoop.c index 886213c3..e19a908c 100644 --- a/src/LYMainLoop.c +++ b/src/LYMainLoop.c @@ -217,7 +217,7 @@ PRIVATE BOOL textinput_activated = FALSE; #endif #ifdef INACTIVE_INPUT_STYLE_VH PUBLIC BOOL textinput_redrawn = FALSE; - /*must be public since used in highlight(..)*/ + /*must be public since used in LYhighlight(..)*/ #endif #ifdef LY_FIND_LEAKS @@ -494,7 +494,7 @@ PRIVATE void set_curdoc_link ARGS1( && nextlink >= 0 && nextlink < nlinks) { if (curdoc.link >= 0 && curdoc.link < nlinks) - highlight(OFF, curdoc.link, prev_target); + LYhighlight(OFF, curdoc.link, prev_target); curdoc.link = nextlink; } } @@ -3615,7 +3615,7 @@ PRIVATE void handle_LYK_MAIN_MENU ARGS2( newdoc.isHEAD = FALSE; newdoc.safe = FALSE; newdoc.internal_link = FALSE; - highlight(OFF, curdoc.link, prev_target); + LYhighlight(OFF, curdoc.link, prev_target); #ifdef DIRED_SUPPORT if (lynx_edit_mode) { DIRED_UNCACHE_2; @@ -3903,7 +3903,7 @@ PRIVATE void handle_LYK_NEXT_LINK ARGS3( int, real_c) { if (curdoc.link < nlinks-1) { /* next link */ - highlight(OFF, curdoc.link, prev_target); + LYhighlight(OFF, curdoc.link, prev_target); #ifdef FASTTAB /* * Move to different textarea if TAB in textarea. @@ -6549,10 +6549,10 @@ try_again: * text input field. */ if (!curlink_is_editable) { - highlight(ON, curdoc.link, prev_target); + LYhighlight(ON, curdoc.link, prev_target); #ifndef INACTIVE_INPUT_STYLE_VH } else if (!textinput_activated) { - highlight(ON, curdoc.link, prev_target); + LYhighlight(ON, curdoc.link, prev_target); #endif } } diff --git a/src/LYOptions.c b/src/LYOptions.c index eebb3f93..69c48fac 100644 --- a/src/LYOptions.c +++ b/src/LYOptions.c @@ -2172,7 +2172,7 @@ static OptValues show_color_values[] = { static char * show_cursor_string = "show_cursor"; -#if USE_SCROLLBAR +#ifdef USE_SCROLLBAR static char * show_scrollbar_string = "show_scrollbar"; #endif diff --git a/src/LYReadCFG.c b/src/LYReadCFG.c index 93a6457c..6c956bdb 100644 --- a/src/LYReadCFG.c +++ b/src/LYReadCFG.c @@ -236,7 +236,7 @@ PUBLIC int match_item_by_name ARGS3( #define COLOR_BLACK 0 #endif -#if USE_DEFAULT_COLORS +#ifdef USE_DEFAULT_COLORS int default_fg = DEFAULT_COLOR; int default_bg = DEFAULT_COLOR; #else @@ -294,7 +294,7 @@ PUBLIC int check_color ARGS2( CTRACE2(TRACE_STYLE, (tfp, "check_color(%s,%d)\n", color, the_default)); if (!strcasecomp(color, "default")) { -#if USE_DEFAULT_COLORS +#ifdef USE_DEFAULT_COLORS if (!default_color_reset) the_default = DEFAULT_COLOR; #endif /* USE_DEFAULT_COLORS */ diff --git a/src/LYReadCFG.h b/src/LYReadCFG.h index b6349cc0..e58a1074 100644 --- a/src/LYReadCFG.h +++ b/src/LYReadCFG.h @@ -41,7 +41,7 @@ extern int default_fg; extern int default_bg; extern BOOL default_color_reset; -#if HAVE_USE_DEFAULT_COLORS && USE_DEFAULT_COLORS +#if defined(HAVE_USE_DEFAULT_COLORS) && defined(USE_DEFAULT_COLORS) extern int lynx_default_colors NOPARAMS; #endif diff --git a/src/LYSearch.c b/src/LYSearch.c index 03961129..1afa5eb2 100644 --- a/src/LYSearch.c +++ b/src/LYSearch.c @@ -332,7 +332,7 @@ check_recall: /* * Found in link, changed cur, we're done. */ - highlight(OFF, oldcur, prev_target); + LYhighlight(OFF, oldcur, prev_target); return(TRUE); } } else { @@ -345,7 +345,7 @@ check_recall: /* * Found in link, changed cur, we're done. */ - highlight(OFF, oldcur, prev_target); + LYhighlight(OFF, oldcur, prev_target); return(TRUE); } @@ -366,7 +366,7 @@ check_recall: */ www_user_search((cur_doc->line + offset), cur_doc, prev_target, direction); if (cur_doc->link != oldcur) { - highlight(OFF, oldcur, prev_target); + LYhighlight(OFF, oldcur, prev_target); return(TRUE); } return (BOOL) (www_search_result > 0); diff --git a/src/LYSignal.h b/src/LYSignal.h index e0d5ec0a..9faf619b 100644 --- a/src/LYSignal.h +++ b/src/LYSignal.h @@ -12,7 +12,7 @@ extern void VMSsignal PARAMS((int sig, void (*func)())); #define signal(a,b) VMSsignal(a,b) /* use LYCurses.c routines for interrupts */ #endif /* VMS */ -#if HAVE_SIGACTION +#ifdef HAVE_SIGACTION typedef void LYSigHandlerFunc_t PARAMS((int)); /* implementation in LYUtils.c */ extern void LYExtSignal PARAMS((int sig, LYSigHandlerFunc_t * handler)); diff --git a/src/LYStrings.c b/src/LYStrings.c index 5a3df082..483f7b02 100644 --- a/src/LYStrings.c +++ b/src/LYStrings.c @@ -668,7 +668,7 @@ PUBLIC int LYmbcsstrlen ARGS3( j++; } } else if (!utf_flag && HTCJK != NOCJK && !count_gcells && - !isascii(str[i]) && str[(i + 1)] != '\0' && + is8bits(str[i]) && str[(i + 1)] != '\0' && !IsSpecialAttrChar(str[(i + 1)])) { i++; } @@ -1613,7 +1613,7 @@ re_read: #else if (c == EOF && errno == EINTR) { -#if HAVE_SIZECHANGE || defined(USE_SLANG) +#if defined(HAVE_SIZECHANGE) || defined(USE_SLANG) CTRACE((tfp, "Got EOF with EINTR, recent_sizechange so far is %d\n", recent_sizechange)); if (!recent_sizechange) { /* not yet detected by ourselves */ @@ -1971,7 +1971,7 @@ re_read: #endif /* KEY_BTAB */ #ifdef KEY_RESIZE case KEY_RESIZE: /* size change detected by ncurses */ -#if HAVE_SIZECHANGE || defined(USE_SLANG) +#if defined(HAVE_SIZECHANGE) || defined(USE_SLANG) /* Make call to detect new size, if that may be implemented. * The call may set recent_sizechange (except for USE_SLANG), * which will tell mainloop() to refresh. - kw @@ -2400,7 +2400,8 @@ PUBLIC void LYLowerCase ARGS1( for (i = 0; buffer[i]; i++) #ifdef SUPPORT_MULTIBYTE_EDIT /* 1998/11/23 (Mon) 17:04:55 */ { - if (buffer[i] & 0x80) { + if (buffer[i] & 0x80 + && buffer[i+1] != 0) { if ((kanji_code == SJIS) && IS_SJIS_X0201KANA(UCH((buffer[i])))) { continue; } @@ -2425,7 +2426,8 @@ PUBLIC void LYUpperCase ARGS1( for (i = 0; buffer[i]; i++) #ifdef SUPPORT_MULTIBYTE_EDIT /* 1998/11/23 (Mon) 17:05:10 */ { - if (buffer[i] & 0x80) { + if (buffer[i] & 0x80 + && buffer[i+1] != 0) { if ((kanji_code == SJIS) && IS_SJIS_X0201KANA(UCH((buffer[i])))) { continue; } @@ -2440,6 +2442,21 @@ PUBLIC void LYUpperCase ARGS1( } /* + * Remove newlines from a string. + */ +PUBLIC void LYRemoveNewlines ARGS1( + char *, buffer) +{ + if (buffer != 0) { + size_t i, j; + for (i = j = 0; buffer[i]; i++) + if (buffer[i] != '\n' && buffer[i] != '\r') + buffer[j++] = buffer[i]; + buffer[j] = 0; + } +} + +/* * Remove ALL whitespace from a string (including embedded blanks). */ PUBLIC void LYRemoveBlanks ARGS1( @@ -2668,8 +2685,8 @@ PRIVATE int prev_pos ARGS2( while (i < pos - 1) { int c; c = Buf[i]; - if (!(isascii(c) || - ((kanji_code == SJIS) && IS_SJIS_X0201KANA(UCH(c))))) { + if (is8bits(c) && + !((kanji_code == SJIS) && IS_SJIS_X0201KANA(UCH(c)))) { i++; } i++; @@ -2902,19 +2919,19 @@ PUBLIC int LYEdit1 ARGS4( pos0 = prev_pos(edit, Pos); while (Pos && - (HTCJK == NOCJK || isascii(Buf[pos0])) && + (HTCJK == NOCJK || !is8bits(Buf[pos0])) && !isalnum(UCH(Buf[pos0]))) { Pos = pos0; pos0 = prev_pos(edit, Pos); } - if (HTCJK != NOCJK && !isascii(Buf[pos0])) { - while (Pos && !isascii(Buf[pos0])) { + if (HTCJK != NOCJK && is8bits(Buf[pos0])) { + while (Pos && is8bits(Buf[pos0])) { Pos = pos0; pos0 = prev_pos(edit, Pos); } } else { while (Pos - && isascii(UCH(Buf[pos0])) + && !is8bits(Buf[pos0]) && isalnum(UCH(Buf[pos0]))) { Pos = pos0; pos0 = prev_pos(edit, Pos); @@ -2934,14 +2951,14 @@ PUBLIC int LYEdit1 ARGS4( while (!isalnum(Buf[Pos]) && Buf[Pos]) Pos++ ; #else /* SUPPORT_MULTIBYTE_EDIT */ - if (HTCJK != NOCJK && !isascii(Buf[Pos])) { - while (!isascii(Buf[Pos])) + if (HTCJK != NOCJK && is8bits(Buf[Pos])) { + while (is8bits(Buf[Pos])) Pos += 2; } else { - while (isascii(UCH(Buf[Pos])) && isalnum(UCH(Buf[Pos]))) + while (!is8bits(Buf[Pos]) && isalnum(Buf[Pos])) Pos++; /* '\0' is not a/n */ } - while ((HTCJK == NOCJK || isascii(UCH(Buf[Pos]))) && + while ((HTCJK == NOCJK || !is8bits(Buf[Pos])) && !isalnum(UCH(Buf[Pos])) && Buf[Pos]) Pos++; #endif /* SUPPORT_MULTIBYTE_EDIT */ @@ -3028,7 +3045,7 @@ PUBLIC int LYEdit1 ARGS4( if (Pos >= length) break; #ifdef SUPPORT_MULTIBYTE_EDIT - if (HTCJK != NOCJK && !isascii(Buf[Pos])) + if (HTCJK != NOCJK && is8bits(Buf[Pos])) Pos++; #endif Pos++; @@ -3088,7 +3105,7 @@ PUBLIC int LYEdit1 ARGS4( #else /* SUPPORT_MULTIBYTE_EDIT */ if (Pos < length) { Pos++; - if (HTCJK != NOCJK && !isascii(Buf[Pos-1])) + if (HTCJK != NOCJK && is8bits(Buf[Pos-1])) Pos++; } #endif /* SUPPORT_MULTIBYTE_EDIT */ @@ -3345,7 +3362,7 @@ PUBLIC void LYRefreshEdit ARGS1( int tmp = (Pos - DspWdth) + Margin; while (DspStart < tmp) { - if (!isascii(Buf[DspStart])) + if (is8bits(Buf[DspStart])) DspStart++; DspStart++; } @@ -3367,7 +3384,7 @@ PUBLIC void LYRefreshEdit ARGS1( DspStart = 0; while (DspStart < tmp) { - if (!isascii(Buf[DspStart])) + if (is8bits(Buf[DspStart])) DspStart++; DspStart++; } @@ -3381,7 +3398,7 @@ PUBLIC void LYRefreshEdit ARGS1( str = &Buf[DspStart]; #ifdef SUPPORT_MULTIBYTE_EDIT - if (HTCJK != NOCJK && !isascii(str[0])) + if (HTCJK != NOCJK && is8bits(str[0])) begin_multi = 1; #endif /* SUPPORT_MULTIBYTE_EDIT */ @@ -3439,16 +3456,22 @@ PUBLIC void LYRefreshEdit ARGS1( #endif /* SUPPORT_MULTIBYTE_EDIT */ } else { /* For CJK strings, by Masanobu Kimura */ - if (HTCJK != NOCJK && !isascii(buffer[0])) { -#ifndef SUPPORT_MULTIBYTE_EDIT + if (HTCJK != NOCJK && is8bits(buffer[0])) { if (i < (nrdisplayed - 1)) buffer[1] = str[++i]; -#else /* SUPPORT_MULTIBYTE_EDIT */ - if (i < (nrdisplayed - 1)) { - buffer[1] = str[++i]; - end_multi = 1; - } else - end_multi = 0; +#ifdef SUPPORT_MULTIBYTE_EDIT + end_multi = (i < nrdisplayed); +#if !(defined(USE_SLANG) || defined(WIDEC_CURSES)) + { + int ii, yy, xx; + + LYGetYX(yy, xx); + for (ii = 0; buffer[ii] != '\0'; ++ii) + LYaddch(' '); + LYrefresh(); + LYmove(yy, xx); + } +#endif /* USE_SLANG */ #endif /* SUPPORT_MULTIBYTE_EDIT */ LYaddstr(buffer); buffer[1] = '\0'; @@ -3511,12 +3534,6 @@ PUBLIC void LYRefreshEdit ARGS1( } LYmove(edit->sy, edit->sx + Pos - DspStart); -#ifdef SUPPORT_MULTIBYTE_EDIT -#if (!USE_SLANG && !defined(USE_MULTIBYTE_CURSES)) - if (HTCJK != NOCJK) - lynx_force_repaint(); -#endif /* !USE_SLANG && !defined(USE_MULTIBYTE_CURSES) */ -#endif /* SUPPORT_MULTIBYTE_EDIT */ #ifdef USE_COLOR_STYLE if (estyle != NOSTYLE) @@ -5120,7 +5137,7 @@ PUBLIC char * LYno_attr_mbcs_case_strstr ARGS6( * Seek a first target match. - FM */ for (; *chptr != '\0'; chptr++) { - if ((!utf_flag && HTCJK != NOCJK && !isascii(*chptr) && + if ((!utf_flag && HTCJK != NOCJK && is8bits(*chptr) && *chptr == *tarptr && *(chptr + 1) != '\0' && !IsSpecialAttrChar(*(chptr + 1))) || @@ -5143,7 +5160,7 @@ PUBLIC char * LYno_attr_mbcs_case_strstr ARGS6( if (nendp) *nendp = len; return(chptr); } - if (!utf_flag && HTCJK != NOCJK && !isascii(*chptr) && + if (!utf_flag && HTCJK != NOCJK && is8bits(*chptr) && *chptr == *tarptr && *tmpchptr != '\0' && !IsSpecialAttrChar(*tmpchptr)) { @@ -5180,7 +5197,7 @@ PUBLIC char * LYno_attr_mbcs_case_strstr ARGS6( */ while (1) { if (!IsSpecialAttrChar(*tmpchptr)) { - if (!utf_flag && HTCJK != NOCJK && !isascii(*tmpchptr)) { + if (!utf_flag && HTCJK != NOCJK && is8bits(*tmpchptr)) { if (*tmpchptr == *tmptarptr && *(tmpchptr + 1) == *(tmptarptr + 1) && !IsSpecialAttrChar(*(tmpchptr + 1))) { @@ -5214,7 +5231,7 @@ PUBLIC char * LYno_attr_mbcs_case_strstr ARGS6( } } else if (!(IS_UTF_EXTRA(*chptr) || IsSpecialAttrChar(*chptr))) { - if (!utf_flag && HTCJK != NOCJK && !isascii(*chptr) && + if (!utf_flag && HTCJK != NOCJK && is8bits(*chptr) && *(chptr + 1) != '\0' && !IsSpecialAttrChar(*(chptr + 1))) { chptr++; @@ -5292,7 +5309,7 @@ PUBLIC char * LYno_attr_mbcs_strstr ARGS6( if (nendp) *nendp = len; return(chptr); } - if (!utf_flag && HTCJK != NOCJK && !isascii(*chptr) && + if (!utf_flag && HTCJK != NOCJK && is8bits(*chptr) && *tmpchptr != '\0' && !IsSpecialAttrChar(*tmpchptr)) { /* @@ -5328,7 +5345,7 @@ PUBLIC char * LYno_attr_mbcs_strstr ARGS6( */ while (1) { if (!IsSpecialAttrChar(*tmpchptr)) { - if (!utf_flag && HTCJK != NOCJK && !isascii(*tmpchptr)) { + if (!utf_flag && HTCJK != NOCJK && is8bits(*tmpchptr)) { if (*tmpchptr == *tmptarptr && *(tmpchptr + 1) == *(tmptarptr + 1) && !IsSpecialAttrChar(*(tmpchptr + 1))) { @@ -5361,7 +5378,7 @@ PUBLIC char * LYno_attr_mbcs_strstr ARGS6( } } else if (!(IS_UTF_EXTRA(*chptr) || IsSpecialAttrChar(*chptr))) { - if (!utf_flag && HTCJK != NOCJK && !isascii(*chptr) && + if (!utf_flag && HTCJK != NOCJK && is8bits(*chptr) && *(chptr + 1) != '\0' && !IsSpecialAttrChar(*(chptr + 1))) { chptr++; diff --git a/src/LYStrings.h b/src/LYStrings.h index 081e00e3..0fcebc98 100644 --- a/src/LYStrings.h +++ b/src/LYStrings.h @@ -10,6 +10,8 @@ typedef enum { , RECALL_MAIL } RecallType; +#define is8bits(ch) (UCH(ch) >= 128) /* isascii(ch) is not POSIX */ + /* UPPER8(ch1,ch2) is an extension of (TOUPPER(ch1) - TOUPPER(ch2)) */ extern int UPPER8 PARAMS(( int ch1, @@ -298,6 +300,8 @@ extern void LYLowerCase PARAMS(( char * buffer)); extern void LYUpperCase PARAMS(( char * buffer)); +extern void LYRemoveNewlines PARAMS(( + char * buffer)); extern void LYRemoveBlanks PARAMS(( char * buffer)); extern char * LYSkipBlanks PARAMS(( diff --git a/src/LYUtils.c b/src/LYUtils.c index a743f4ad..d5aa910f 100644 --- a/src/LYUtils.c +++ b/src/LYUtils.c @@ -56,7 +56,7 @@ extern int exec_command(char * cmd, int wait_flag); /* xsystem.c */ #include <lib$routines.h> #endif /* VMS */ -#if HAVE_UTMP +#ifdef HAVE_UTMP #include <pwd.h> #ifdef UTMPX_FOR_UTMP #include <utmpx.h> @@ -192,9 +192,46 @@ PRIVATE char *getenv_text ARGS1(char *, name) } /* + * Check for UTF-8 data, returning the length past the first character. + * Return zero if we found an ordinary character rather than UTF-8. + */ +PUBLIC size_t utf8_length ARGS2( + BOOL, utf_flag, + CONST char *, data) +{ + size_t utf_extra = 0; + + if (utf_flag && is8bits(*data)) { + if ((*data & 0xe0) == 0xc0) { + utf_extra = 1; + } else if ((*data & 0xf0) == 0xe0) { + utf_extra = 2; + } else if ((*data & 0xf8) == 0xf0) { + utf_extra = 3; + } else if ((*data & 0xfc) == 0xf8) { + utf_extra = 4; + } else if ((*data & 0xfe) == 0xfc) { + utf_extra = 5; + } else { + /* + * Garbage. + */ + utf_extra = 0; + } + if (strlen(data+1) < utf_extra) { + /* + * Shouldn't happen. + */ + utf_extra = 0; + } + } + return utf_extra; +} + +/* * Highlight (or unhighlight) a given link. */ -PUBLIC void highlight ARGS3( +PUBLIC void LYhighlight ARGS3( int, flag, int, cur, char *, target) @@ -214,7 +251,7 @@ PUBLIC void highlight ARGS3( BOOL utf_flag = (BOOL)(LYCharSet_UC[current_char_set].enc == UCT_ENC_UTF8); BOOL hl1_drawn = NO; #if defined(USE_COLOR_STYLE) && !defined(NO_HILIT_FIX) - BOOL hl2_drawn=FALSE; /* whether links[cur].hightext2 is already drawn + BOOL hl2_drawn = FALSE; /* whether links[cur].hightext2 is already drawn properly */ #endif tmp[0] = tmp[1] = tmp[2] = '\0'; @@ -375,7 +412,7 @@ PUBLIC void highlight ARGS3( /* * For CJK strings, by Masanobu Kimura. */ - if (HTCJK != NOCJK && !isascii(tmp[0])) { + if (HTCJK != NOCJK && is8bits(tmp[0])) { tmp[1] = links[cur].hightext2[++i]; LYaddstr(tmp); tmp[1] = '\0'; @@ -486,30 +523,7 @@ PUBLIC void highlight ARGS3( */ LYmove(hLine, offset); tmp[0] = data[itmp]; - if (utf_flag && !isascii(tmp[0])) { - if ((*tmp & 0xe0) == 0xc0) { - utf_extra = 1; - } else if ((*tmp & 0xf0) == 0xe0) { - utf_extra = 2; - } else if ((*tmp & 0xf8) == 0xf0) { - utf_extra = 3; - } else if ((*tmp & 0xfc) == 0xf8) { - utf_extra = 4; - } else if ((*tmp & 0xfe) == 0xfc) { - utf_extra = 5; - } else { - /* - * Garbage. - */ - utf_extra = 0; - } - if (strlen(&data[itmp+1]) < utf_extra) { - /* - * Shouldn't happen. - */ - utf_extra = 0; - } - } + utf_extra = utf8_length(utf_flag, data + itmp); if (utf_extra) { LYstrncpy(&tmp[1], &data[itmp+1], utf_extra); itmp += utf_extra; @@ -527,7 +541,7 @@ PUBLIC void highlight ARGS3( tmp[1] = '\0'; written += (utf_extra + 1); utf_extra = 0; - } else if (HTCJK != NOCJK && !isascii(tmp[0])) { + } else if (HTCJK != NOCJK && is8bits(tmp[0])) { /* * For CJK strings, by Masanobu Kimura. */ @@ -583,30 +597,7 @@ PUBLIC void highlight ARGS3( * character of hightext and we are making * the link current. - FM */ - if (utf_flag && !isascii(tmp[0])) { - if ((*tmp & 0xe0) == 0xc0) { - utf_extra = 1; - } else if ((*tmp & 0xf0) == 0xe0) { - utf_extra = 2; - } else if ((*tmp & 0xf8) == 0xf0) { - utf_extra = 3; - } else if ((*tmp & 0xfc) == 0xf8) { - utf_extra = 4; - } else if ((*tmp & 0xfe) == 0xfc) { - utf_extra = 5; - } else { - /* - * Garbage. - */ - utf_extra = 0; - } - if (strlen(&data[itmp+1]) < utf_extra) { - /* - * Shouldn't happen. - */ - utf_extra = 0; - } - } + utf_extra = utf8_length(utf_flag, data + itmp); if (utf_extra) { LYstrncpy(&tmp[1], &data[itmp+1], utf_extra); itmp += utf_extra; @@ -626,7 +617,7 @@ PUBLIC void highlight ARGS3( tmp[1] = '\0'; written += (utf_extra + 1); utf_extra = 0; - } else if (HTCJK != NOCJK && !isascii(tmp[0])) { + } else if (HTCJK != NOCJK && is8bits(tmp[0])) { /* * For CJK strings, by Masanobu Kimura. */ @@ -756,30 +747,7 @@ highlight_hit_within_hightext: */ LYmove(hLine, offset); tmp[0] = data[itmp]; - if (utf_flag && !isascii(tmp[0])) { - if ((*tmp & 0xe0) == 0xc0) { - utf_extra = 1; - } else if ((*tmp & 0xf0) == 0xe0) { - utf_extra = 2; - } else if ((*tmp & 0xf8) == 0xf0) { - utf_extra = 3; - } else if ((*tmp & 0xfc) == 0xf8) { - utf_extra = 4; - } else if ((*tmp & 0xfe) == 0xfc) { - utf_extra = 5; - } else { - /* - * Garbage. - */ - utf_extra = 0; - } - if (strlen(&data[itmp+1]) < utf_extra) { - /* - * Shouldn't happen. - */ - utf_extra = 0; - } - } + utf_extra = utf8_length(utf_flag, data + itmp); if (utf_extra) { LYstrncpy(&tmp[1], &data[itmp+1], utf_extra); itmp += utf_extra; @@ -800,7 +768,7 @@ highlight_hit_within_hightext: tmp[1] = '\0'; written += (utf_extra + 1); utf_extra = 0; - } else if (HTCJK != NOCJK && !isascii(tmp[0])) { + } else if (HTCJK != NOCJK && is8bits(tmp[0])) { /* * For CJK strings, by Masanobu Kimura. */ @@ -859,30 +827,7 @@ highlight_hit_within_hightext: * character of hightext and we are making * the link current. - FM */ - if (utf_flag && !isascii(tmp[0])) { - if ((*tmp & 0xe0) == 0xc0) { - utf_extra = 1; - } else if ((*tmp & 0xf0) == 0xe0) { - utf_extra = 2; - } else if ((*tmp & 0xf8) == 0xf0) { - utf_extra = 3; - } else if ((*tmp & 0xfc) == 0xf8) { - utf_extra = 4; - } else if ((*tmp & 0xfe) == 0xfc) { - utf_extra = 5; - } else { - /* - * Garbage. - */ - utf_extra = 0; - } - if (strlen(&data[itmp+1]) < utf_extra) { - /* - * Shouldn't happen. - */ - utf_extra = 0; - } - } + utf_extra = utf8_length(utf_flag, data + itmp); if (utf_extra) { LYstrncpy(&tmp[1], &data[itmp+1], utf_extra); itmp += utf_extra; @@ -902,7 +847,7 @@ highlight_hit_within_hightext: tmp[1] = '\0'; written += (utf_extra + 1); utf_extra = 0; - } else if (HTCJK != NOCJK && !isascii(tmp[0])) { + } else if (HTCJK != NOCJK && is8bits(tmp[0])) { /* * For CJK strings, by Masanobu Kimura. */ @@ -1021,30 +966,7 @@ highlight_hit_within_hightext: * character of hightext and we are making * the link current. - FM */ - if (utf_flag && !isascii(tmp[0])) { - if ((*tmp & 0xe0) == 0xc0) { - utf_extra = 1; - } else if ((*tmp & 0xf0) == 0xe0) { - utf_extra = 2; - } else if ((*tmp & 0xf8) == 0xf0) { - utf_extra = 3; - } else if ((*tmp & 0xfc) == 0xf8) { - utf_extra = 4; - } else if ((*tmp & 0xfe) == 0xfc) { - utf_extra = 5; - } else { - /* - * Garbage. - */ - utf_extra = 0; - } - if (strlen(&data[itmp+1]) < utf_extra) { - /* - * Shouldn't happen. - */ - utf_extra = 0; - } - } + utf_extra = utf8_length(utf_flag, data); if (utf_extra) { LYstrncpy(&tmp[1], &data[itmp+1], utf_extra); itmp += utf_extra; @@ -1064,7 +986,7 @@ highlight_hit_within_hightext: tmp[1] = '\0'; written += (utf_extra + 1); utf_extra = 0; - } else if (HTCJK != NOCJK && !isascii(tmp[0])) { + } else if (HTCJK != NOCJK && is8bits(tmp[0])) { /* * For CJK strings, by Masanobu Kimura. */ @@ -1198,30 +1120,7 @@ highlight_search_hightext2: */ LYmove(hLine, offset); tmp[0] = data[itmp]; - if (utf_flag && !isascii(tmp[0])) { - if ((*tmp & 0xe0) == 0xc0) { - utf_extra = 1; - } else if ((*tmp & 0xf0) == 0xe0) { - utf_extra = 2; - } else if ((*tmp & 0xf8) == 0xf0) { - utf_extra = 3; - } else if ((*tmp & 0xfc) == 0xf8) { - utf_extra = 4; - } else if ((*tmp & 0xfe) == 0xfc) { - utf_extra = 5; - } else { - /* - * Garbage. - */ - utf_extra = 0; - } - if (strlen(&data[itmp+1]) < utf_extra) { - /* - * Shouldn't happen. - */ - utf_extra = 0; - } - } + utf_extra = utf8_length(utf_flag, data + itmp); if (utf_extra) { LYstrncpy(&tmp[1], &data[itmp+1], utf_extra); itmp += utf_extra; @@ -1239,7 +1138,7 @@ highlight_search_hightext2: tmp[1] = '\0'; written += (utf_extra + 1); utf_extra = 0; - } else if (HTCJK != NOCJK && !isascii(tmp[0])) { + } else if (HTCJK != NOCJK && is8bits(tmp[0])) { /* * For CJK strings, by Masanobu Kimura. */ @@ -1295,30 +1194,7 @@ highlight_search_hightext2: * character of hightext2 and we are making * the link current. - FM */ - if (utf_flag && !isascii(tmp[0])) { - if ((*tmp & 0xe0) == 0xc0) { - utf_extra = 1; - } else if ((*tmp & 0xf0) == 0xe0) { - utf_extra = 2; - } else if ((*tmp & 0xf8) == 0xf0) { - utf_extra = 3; - } else if ((*tmp & 0xfc) == 0xf8) { - utf_extra = 4; - } else if ((*tmp & 0xfe) == 0xfc) { - utf_extra = 5; - } else { - /* - * Garbage. - */ - utf_extra = 0; - } - if (strlen(&data[itmp+1]) < utf_extra) { - /* - * Shouldn't happen. - */ - utf_extra = 0; - } - } + utf_extra = utf8_length(utf_flag, data + itmp); if (utf_extra) { LYstrncpy(&tmp[1], &data[itmp+1], utf_extra); itmp += utf_extra; @@ -1338,7 +1214,7 @@ highlight_search_hightext2: tmp[1] = '\0'; written += (utf_extra + 1); utf_extra = 0; - } else if (HTCJK != NOCJK && !isascii(tmp[0])) { + } else if (HTCJK != NOCJK && is8bits(tmp[0])) { /* * For CJK strings, by Masanobu Kimura. */ @@ -1467,30 +1343,7 @@ highlight_hit_within_hightext2: */ LYmove(hLine, offset); tmp[0] = data[itmp]; - if (utf_flag && !isascii(tmp[0])) { - if ((*tmp & 0xe0) == 0xc0) { - utf_extra = 1; - } else if ((*tmp & 0xf0) == 0xe0) { - utf_extra = 2; - } else if ((*tmp & 0xf8) == 0xf0) { - utf_extra = 3; - } else if ((*tmp & 0xfc) == 0xf8) { - utf_extra = 4; - } else if ((*tmp & 0xfe) == 0xfc) { - utf_extra = 5; - } else { - /* - * Garbage. - */ - utf_extra = 0; - } - if (strlen(&data[itmp+1]) < utf_extra) { - /* - * Shouldn't happen. - */ - utf_extra = 0; - } - } + utf_extra = utf8_length(utf_flag, data + itmp); if (utf_extra) { LYstrncpy(&tmp[1], &data[itmp+1], utf_extra); itmp += utf_extra; @@ -1511,7 +1364,7 @@ highlight_hit_within_hightext2: tmp[1] = '\0'; written += (utf_extra + 1); utf_extra = 0; - } else if (HTCJK != NOCJK && !isascii(tmp[0])) { + } else if (HTCJK != NOCJK && is8bits(tmp[0])) { /* * For CJK strings, by Masanobu Kimura. */ @@ -1570,30 +1423,7 @@ highlight_hit_within_hightext2: * character of hightext2 and we are making * the link current. - FM */ - if (utf_flag && !isascii(tmp[0])) { - if ((*tmp & 0xe0) == 0xc0) { - utf_extra = 1; - } else if ((*tmp & 0xf0) == 0xe0) { - utf_extra = 2; - } else if ((*tmp & 0xf8) == 0xf0) { - utf_extra = 3; - } else if ((*tmp & 0xfc) == 0xf8) { - utf_extra = 4; - } else if ((*tmp & 0xfe) == 0xfc) { - utf_extra = 5; - } else { - /* - * Garbage. - */ - utf_extra = 0; - } - if (strlen(&data[itmp+1]) < utf_extra) { - /* - * Shouldn't happen. - */ - utf_extra = 0; - } - } + utf_extra = utf8_length(utf_flag, data + itmp); if (utf_extra) { LYstrncpy(&tmp[1], &data[itmp+1], utf_extra); itmp += utf_extra; @@ -1613,7 +1443,7 @@ highlight_hit_within_hightext2: tmp[1] = '\0'; written += (utf_extra + 1); utf_extra = 0; - } else if (HTCJK != NOCJK && !isascii(tmp[0])) { + } else if (HTCJK != NOCJK && is8bits(tmp[0])) { /* * For CJK strings, by Masanobu Kimura. */ @@ -1732,30 +1562,7 @@ highlight_hit_within_hightext2: * character of hightext2 and we are making * the link current. - FM */ - if (utf_flag && !isascii(tmp[0])) { - if ((*tmp & 0xe0) == 0xc0) { - utf_extra = 1; - } else if ((*tmp & 0xf0) == 0xe0) { - utf_extra = 2; - } else if ((*tmp & 0xf8) == 0xf0) { - utf_extra = 3; - } else if ((*tmp & 0xfc) == 0xf8) { - utf_extra = 4; - } else if ((*tmp & 0xfe) == 0xfc) { - utf_extra = 5; - } else { - /* - * Garbage. - */ - utf_extra = 0; - } - if (strlen(&data[itmp+1]) < utf_extra) { - /* - * Shouldn't happen. - */ - utf_extra = 0; - } - } + utf_extra = utf8_length(utf_flag, data + itmp); if (utf_extra) { LYstrncpy(&tmp[1], &data[itmp+1], utf_extra); itmp += utf_extra; @@ -1775,7 +1582,7 @@ highlight_hit_within_hightext2: tmp[1] = '\0'; written += (utf_extra + 1); utf_extra = 0; - } else if (HTCJK != NOCJK && !isascii(tmp[0])) { + } else if (HTCJK != NOCJK && is8bits(tmp[0])) { /* * For CJK strings, by Masanobu Kimura. */ @@ -3268,7 +3075,7 @@ PUBLIC void remove_backslashes ARGS1( */ PUBLIC BOOLEAN inlocaldomain NOARGS { -#if HAVE_UTMP +#ifdef HAVE_UTMP int n; FILE *fp; struct utmp me; @@ -3307,7 +3114,7 @@ PUBLIC BOOLEAN inlocaldomain NOARGS #endif /* HAVE_UTMP */ } -#if HAVE_SIGACTION +#ifdef HAVE_SIGACTION /* * An extended alternative for calling signal(), sets some flags for * signal handler as we want them if that functionality is available. @@ -3338,7 +3145,7 @@ PUBLIC void LYExtSignal ARGS2( #endif /* HAVE_SIGACTION */ #if defined(SIGTSTP) && !defined(USE_SLANG) -#if HAVE_SIGACTION +#ifdef HAVE_SIGACTION /* * For switching a signal's handling between SIG_DFL and something * (possibly) different that may have been set up by lynx code or @@ -3436,7 +3243,7 @@ PUBLIC void size_change ARGS1( */ return; #else /* Curses: */ -#if HAVE_SIZECHANGE +#ifdef HAVE_SIZECHANGE #ifdef TIOCGSIZE struct ttysize win; #else @@ -5600,7 +5407,7 @@ PUBLIC CONST char * Home_Dir NOARGS } StrAllocCopy(HomeDir, cp); #else -#if HAVE_UTMP +#ifdef HAVE_UTMP /* * One could use getlogin() and getpwnam() here instead. */ @@ -6523,6 +6330,10 @@ PUBLIC BOOLEAN LYCachedTemp ARGS2( return FALSE; } +#ifndef HAVE_MKDTEMP +#define mkdtemp(path) ((mktemp(path) != 0) && (mkdir(path, 0700) == 0)) +#endif + /* * Open a temp-file, ensuring that it is unique, and not readable by other * users. @@ -6579,8 +6390,7 @@ PUBLIC FILE *LYOpenTemp ARGS3( if (make_it) { int old_mask = umask(HIDE_UMASK); StrAllocCat(lynx_temp_space, "XXXXXX"); - if (mktemp(lynx_temp_space) == 0 - || mkdir(lynx_temp_space, 0700) < 0) { + if (mkdtemp(lynx_temp_space) == 0) { printf("%s: %s\n", lynx_temp_space, LYStrerror(errno)); exit(EXIT_FAILURE); } @@ -7548,7 +7358,7 @@ PUBLIC int LYSystem ARGS1( { int code; int do_free = 0; -#if HAVE_SIGACTION && defined(SIGTSTP) && !defined(USE_SLANG) +#if defined(HAVE_SIGACTION) && defined(SIGTSTP) && !defined(USE_SLANG) struct sigaction saved_sigtstp_act; BOOLEAN sigtstp_saved = FALSE; #endif @@ -7651,13 +7461,13 @@ PUBLIC int LYSystem ARGS1( #else if (restore_sigpipe_for_children) signal(SIGPIPE, SIG_DFL); /* Some commands expect the default */ -#if HAVE_SIGACTION && defined(SIGTSTP) && !defined(USE_SLANG) +#if defined(HAVE_SIGACTION) && defined(SIGTSTP) && !defined(USE_SLANG) if (!dump_output_immediately && !LYCursesON && !no_suspend) sigtstp_saved = LYToggleSigDfl(SIGTSTP, &saved_sigtstp_act, 1); #endif code = system(command); saved_errno = errno; -#if HAVE_SIGACTION && defined(SIGTSTP) && !defined(USE_SLANG) +#if defined(HAVE_SIGACTION) && defined(SIGTSTP) && !defined(USE_SLANG) if (sigtstp_saved) LYToggleSigDfl(SIGTSTP, &saved_sigtstp_act, 0); #endif diff --git a/src/LYUtils.h b/src/LYUtils.h index 95c89eb2..575f872c 100644 --- a/src/LYUtils.h +++ b/src/LYUtils.h @@ -107,6 +107,7 @@ extern int LYValidateOutput PARAMS((char * filename)); extern int find_restriction PARAMS((CONST char * name, int len)); extern int is_url PARAMS((char *filename)); extern int number2arrows PARAMS((int number)); +extern size_t utf8_length PARAMS((BOOL utf_flag, CONST char * data)); extern time_t LYmktime PARAMS((char *string, BOOL absolute)); extern void BeginInternalPage PARAMS((FILE *fp0, char *Title, char *HelpURL)); extern void EndInternalPage PARAMS((FILE *fp0)); @@ -134,11 +135,11 @@ extern void LYRenamedTemp PARAMS((char * oldname, char * newname)); extern void LYTrimHtmlSep PARAMS((char *path)); extern void LYTrimPathSep PARAMS((char *path)); extern void LYTrimRelFromAbsPath PARAMS((char *path)); +extern void LYhighlight PARAMS((int flag, int cur, char *target)); extern void LYsetXDisplay PARAMS((char *new_display)); extern void change_sug_filename PARAMS((char *fname)); extern void convert_to_spaces PARAMS((char *string, BOOL condense)); extern void free_and_clear PARAMS((char **obj)); -extern void highlight PARAMS((int flag, int cur, char *target)); extern void noviceline PARAMS((int more_flag)); extern void parse_restrictions PARAMS((CONST char *s)); extern void print_restrictions_to_fd PARAMS((FILE *fp)); diff --git a/src/LYrcFile.c b/src/LYrcFile.c index f79d8d11..fba32428 100644 --- a/src/LYrcFile.c +++ b/src/LYrcFile.c @@ -240,8 +240,6 @@ PRIVATE void put_editor ARGS2(FILE *, fp, struct config_type *, tbl) /* This table is searched ignoring case */ static Config_Type Config_Table [] = { - MAYBE_ENU("DTD_recovery", Old_DTD, tbl_DTD_recovery, - MSG_ENABLE_LYNXRC), PARSE_SET("accept_all_cookies", LYAcceptAllCookies, N_("\ accept_all_cookies allows the user to tell Lynx to automatically\n\ accept all cookies if desired. The default is \"FALSE\" which will\n\ @@ -403,7 +401,7 @@ WARNING - This is potentially dangerous. Since you may view\n\ you are viewing trusted source information.\n\ ")), #endif -#if USE_SCROLLBAR +#ifdef USE_SCROLLBAR MAYBE_SET("scrollbar", LYShowScrollbar, MSG_ENABLE_LYNXRC), #endif PARSE_SET("select_popups", LYSelectPopups, N_("\ @@ -452,7 +450,7 @@ restricted via a command line switch. If display of hidden files\n\ is disabled, creation of such files via Lynx also is disabled.\n\ ")), #ifdef EXP_READPROGRESS - MAYBE_ENU("show_rate", LYTransferRate, tbl_transfer_rate, + MAYBE_ENU("show_kb_rate", LYTransferRate, tbl_transfer_rate, MSG_ENABLE_LYNXRC), #endif PARSE_ENU("sub_bookmarks", LYMultiBookmarks, tbl_multi_bookmarks, N_("\ @@ -466,7 +464,8 @@ statusline prompt instead of the menu seen in novice and intermediate\n\ user modes. When this option is set to \"standard\", the menu will be\n\ presented regardless of user mode.\n\ ")), - MAYBE_STR("user_agent", LYUserAgent, MSG_ENABLE_LYNXRC), + MAYBE_ENU("tagsoup", Old_DTD, tbl_DTD_recovery, + MSG_ENABLE_LYNXRC), PARSE_ENU("user_mode", user_mode, tbl_user_mode, N_("\ user_mode specifies the users level of knowledge with Lynx. The\n\ default is \"NOVICE\" which displays two extra lines of help at the\n\ @@ -475,6 +474,7 @@ commands. Set user_mode to \"INTERMEDIATE\" to turn off the extra info.\n\ Use \"ADVANCED\" to see the URL of the currently selected link at the\n\ bottom of the screen.\n\ ")), + MAYBE_STR("useragent", LYUserAgent, MSG_ENABLE_LYNXRC), PARSE_SET("verbose_images", verbose_img, N_("\ If verbose_images is \"on\", lynx will print the name of the image\n\ source file in place of [INLINE], [LINK] or [IMAGE]\n\ diff --git a/test/quickbrown.html b/test/quickbrown.html new file mode 100644 index 00000000..a1881431 --- /dev/null +++ b/test/quickbrown.html @@ -0,0 +1,102 @@ +<HTML> +<HEAD> +<TITLE>Markus Kuhn's quick-brown-fox UTF-8 demo</TITLE> +<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"> +<LINK REV="made" HREF="mailto:dickey@invisible-island.net"> +</HEAD> + +<BODY> +<pre> +Sentences that contain all letters commonly used in a language +-------------------------------------------------------------- + +Markus Kuhn <mkuhn@acm.org> -- 1998-11-30 + +This file was UTF-8 encoded. + + +German (de) +----------- + + Falsches Üben von Xylophonmusik quält jeden größeren Zwerg + (= Wrongful practicing of xylophone music tortures every larger dwarf) + + Zwölf Boxkämpfer jagten Eva quer über den Sylter Deich + (= Twelve boxing fighters hunted Eva across the dike of Sylt) + + Heizölrückstoßabdämpfung + (= fuel oil recoil absorber) (jqvwxy missing, but all non-ASCII letters in one word) + +English (en) +------------ + + The quick brown fox jumps over the lazy dog + +French (fr) +----------- + + Portez ce vieux whisky au juge blond qui fume sur son île intérieure, à + côté de l'alcôve ovoïde, où les bûches se consument dans l'âtre, ce qui lui + permet de penser à la cænogenèse de l'être dont il est question dans la + cause ambiguë entendue à Moÿ, dans un capharnaüm qui, pense-t-il, diminue + çà et là la qualité de son œuvre. + + l'île exiguë + Où l'obèse jury mûr + Fête l'haï volapük, + Âne ex aéquo au whist, + Ôtez ce vœu déçu. + + Le cœur déçu mais l'âme plutôt naïve, Louÿs rêva de crapaüter en + canoë au delà des îles, près du mälström où brûlent les novæ. + +Irish Gaelic (ga) +----------------- + + D'fhuascail Íosa, Úrmhac na hÓighe Beannaithe, pór Éava agus Ádhaimh + +Icelandic (is) +-------------- + + Kæmi ný öxi hér ykist þjófum nú bæði víl og ádrepa + + Sævör grét áðan því úlpan var ónýt + (some ASCII letters missing) + +Hebrew (iw) +----------- + + דג סקרן שט בים מאוכזב ולפתע מצא לו חברה איך הקליטה? + +Polish (pl) +----------- + + Pchnąć w tę łódź jeża lub ośm skrzyń fig + +Russian (ru) +------------ + + В чащах юга жил бы цитрус? Да, но фальшивый экземпляр! + (= Would a citrus live in the bushes of south? Yes, but a only a fake!) + + +Please let me know if you find others! Special thanks to the people +from all over the world who contributed these sentences. + +See also: +<ul> +<li><a href="http://www.columbia.edu/kermit/utf8.html" + >http://www.columbia.edu/kermit/utf8.html</a> +<li><a href="http://www.kernel.org/" + >http://www.kernel.org/</a> +<li><a href="http://www.unicode.org/" + >http://www.unicode.org/</a> +<br>and +<li><a href="http://www.cl.cam.ac.uk/~mgk25/ucs/examples/TeX.txt" + >http://www.cl.cam.ac.uk/~mgk25/ucs/examples/TeX.txt</a> +<li><a href="http://www.cl.cam.ac.uk/~mgk25/ucs/wgl4.txt" + >http://www.cl.cam.ac.uk/~mgk25/ucs/wgl4.txt</a> +</ul> +</pre> +</BODY> +</HTML> diff --git a/test/utf-8-demo.html b/test/utf-8-demo.html new file mode 100644 index 00000000..b894119f --- /dev/null +++ b/test/utf-8-demo.html @@ -0,0 +1,215 @@ +<HTML> +<HEAD> +<TITLE>Markus Kuhn's UTF-8 demo</TITLE> +<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"> +<LINK REV="made" HREF="mailto:dickey@invisible-island.net"> +</HEAD> + +<BODY> +<pre> +UTF-8 encoded sample plain-text file +‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ + +Markus Kuhn [ˈmaʳkʊs kuːn] <mkuhn@acm.org> — 1999-08-20 + + +The ASCII compatible UTF-8 encoding of ISO 10646 and Unicode +plain-text files is defined in RFC 2279 and in ISO 10646-1 Annex R. + + +Using Unicode/UTF-8, you can write in emails and source code things such as + +Mathematics and Sciences: + + ∮ E⋅da = Q, n → ∞, ∑ f(i) = ∏ g(i), ∀x∈ℝ: ⌈x⌉ = −⌊−x⌋, α ∧ ¬β = ¬(¬α ∨ β), + + ℕ ⊆ ℕ₀ ⊂ ℤ ⊂ ℚ ⊂ ℝ ⊂ ℂ, ⊥ < a ≠ b ≡ c ≤ d ≪ ⊤ ⇒ (A ⇔ B), + + 2H₂ + O₂ ⇌ 2H₂O, R = 4.7 kΩ, ⌀ 200 mm + +Linguistics and dictionaries: + + ði ıntəˈnæʃənəl fəˈnɛtık əsoʊsiˈeıʃn + Y [ˈʏpsilɔn], Yen [jɛn], Yoga [ˈjoːgɑ] + +APL: + + ((V⍳V)=⍳⍴V)/V←,V ⌷←⍳→⍴∆∇⊃‾⍎⍕⌈ + +Nicer typography in plain text files: + + ╔══════════════════════════════════════════╗ + ║ ║ + ║ • ‘single’ and “double” quotes ║ + ║ ║ + ║ • Curly apostrophes: “We’ve been here” ║ + ║ ║ + ║ • Latin-1 apostrophe and accents: '´` ║ + ║ ║ + ║ • ‚deutsche‘ „Anführungszeichen“ ║ + ║ ║ + ║ • †, ‡, ‰, •, 3–4, —, −5/+5, ™, … ║ + ║ ║ + ║ • ASCII safety test: 1lI|, 0OD, 8B ║ + ║ ╭─────────╮ ║ + ║ • the euro symbol: │ € 14.95 │ ║ + ║ ╰─────────╯ ║ + ╚══════════════════════════════════════════╝ + +Greek (in Polytonic): + + The Greek anthem: + + Σὲ γνωρίζω ἀπὸ τὴν κόψη + τοῦ σπαθιοῦ τὴν τρομερή, + σὲ γνωρίζω ἀπὸ τὴν ὄψη + ποὺ μὲ βία μετράει τὴ γῆ. + + ᾿Απ᾿ τὰ κόκκαλα βγαλμένη + τῶν ῾Ελλήνων τὰ ἱερά + καὶ σὰν πρῶτα ἀνδρειωμένη + χαῖρε, ὦ χαῖρε, ᾿Ελευθεριά! + + From a speech of Demosthenes in the 4th century BC: + + Οὐχὶ ταὐτὰ παρίσταταί μοι γιγνώσκειν, ὦ ἄνδρες ᾿Αθηναῖοι, + ὅταν τ᾿ εἰς τὰ πράγματα ἀποβλέψω καὶ ὅταν πρὸς τοὺς + λόγους οὓς ἀκούω· τοὺς μὲν γὰρ λόγους περὶ τοῦ + τιμωρήσασθαι Φίλιππον ὁρῶ γιγνομένους, τὰ δὲ πράγματ᾿ + εἰς τοῦτο προήκοντα, ὥσθ᾿ ὅπως μὴ πεισόμεθ᾿ αὐτοὶ + πρότερον κακῶς σκέψασθαι δέον. οὐδέν οὖν ἄλλο μοι δοκοῦσιν + οἱ τὰ τοιαῦτα λέγοντες ἢ τὴν ὑπόθεσιν, περὶ ἧς βουλεύεσθαι, + οὐχὶ τὴν οὖσαν παριστάντες ὑμῖν ἁμαρτάνειν. ἐγὼ δέ, ὅτι μέν + ποτ᾿ ἐξῆν τῇ πόλει καὶ τὰ αὑτῆς ἔχειν ἀσφαλῶς καὶ Φίλιππον + τιμωρήσασθαι, καὶ μάλ᾿ ἀκριβῶς οἶδα· ἐπ᾿ ἐμοῦ γάρ, οὐ πάλαι + γέγονεν ταῦτ᾿ ἀμφότερα· νῦν μέντοι πέπεισμαι τοῦθ᾿ ἱκανὸν + προλαβεῖν ἡμῖν εἶναι τὴν πρώτην, ὅπως τοὺς συμμάχους + σώσομεν. ἐὰν γὰρ τοῦτο βεβαίως ὑπάρξῃ, τότε καὶ περὶ τοῦ + τίνα τιμωρήσεταί τις καὶ ὃν τρόπον ἐξέσται σκοπεῖν· πρὶν δὲ + τὴν ἀρχὴν ὀρθῶς ὑποθέσθαι, μάταιον ἡγοῦμαι περὶ τῆς + τελευτῆς ὁντινοῦν ποιεῖσθαι λόγον. + + Δημοσθένους, Γ´ ᾿Ολυνθιακὸς + +Georgian: + + From a Unicode conference invitation: + + გთხოვთ ახლავე გაიაროთ რეგისტრაცია Unicode-ის მეათე საერთაშორისო + კონფერენციაზე დასასწრებად, რომელიც გაიმართება 10-12 მარტს, + ქ. მაინცში, გერმანიაში. კონფერენცია შეჰკრებს ერთად მსოფლიოს + ექსპერტებს ისეთ დარგებში როგორიცაა ინტერნეტი და Unicode-ი, + ინტერნაციონალიზაცია და ლოკალიზაცია, Unicode-ის გამოყენება + ოპერაციულ სისტემებსა, და გამოყენებით პროგრამებში, შრიფტებში, + ტექსტების დამუშავებასა და მრავალენოვან კომპიუტერულ სისტემებში. + +Russian: + + From a Unicode conference invitation: + + Зарегистрируйтесь сейчас на Десятую Международную Конференцию по + Unicode, которая состоится 10-12 марта 1997 года в Майнце в Германии. + Конференция соберет широкий круг экспертов по вопросам глобального + Интернета и Unicode, локализации и интернационализации, воплощению и + применению Unicode в различных операционных системах и программных + приложениях, шрифтах, верстке и многоязычных компьютерных системах. + +Thai (UCS Level 2): + + Excerpt from a poetry on The Romance of The Three Kingdoms (a Chinese + classic 'San Gua'): + + [----------------------------|------------------------] + ๏ แผ่นดินฮั่นเสื่อมโทรมแสนสังเวช พระปกเกศกองบู๊กู้ขึ้นใหม่ + สิบสองกษัตริย์ก่อนหน้าแลถัดไป สององค์ไซร้โง่เขลาเบาปัญญา + ทรงนับถือขันทีเป็นที่พึ่ง บ้านเมืองจึงวิปริตเป็นนักหนา + โฮจิ๋นเรียกทัพทั่วหัวเมืองมา หมายจะฆ่ามดชั่วตัวสำคัญ + เหมือนขับไสไล่เสือจากเคหา รับหมาป่าเข้ามาเลยอาสัญ + ฝ่ายอ้องอุ้นยุแยกให้แตกกัน ใช้สาวนั้นเป็นชนวนชื่นชวนใจ + พลันลิฉุยกุยกีกลับก่อเหตุ ช่างอาเพศจริงหนาฟ้าร้องไห้ + ต้องรบราฆ่าฟันจนบรรลัย ฤๅหาใครค้ำชูกู้บรรลังก์ ฯ + + (The above is a two-column text. If combining characters are handled + correctly, the lines of the second column should be aligned with the + | character above.) + +Ethiopian: + + Proverbs in the Amharic language: + + ሰማይ አይታረስ ንጉሥ አይከሰስ። + ብላ ካለኝ እንደአባቴ በቆመጠኝ። + ጌጥ ያለቤቱ ቁምጥና ነው። + ደሀ በሕልሙ ቅቤ ባይጠጣ ንጣት በገደለው። + የአፍ ወለምታ በቅቤ አይታሽም። + አይጥ በበላ ዳዋ ተመታ። + ሲተረጉሙ ይደረግሙ። + ቀስ በቀስ፥ ዕንቁላል በእግሩ ይሄዳል። + ድር ቢያብር አንበሳ ያስር። + ሰው እንደቤቱ እንጅ እንደ ጉረቤቱ አይተዳደርም። + እግዜር የከፈተውን ጉሮሮ ሳይዘጋው አይድርም። + የጎረቤት ሌባ፥ ቢያዩት ይስቅ ባያዩት ያጠልቅ። + ሥራ ከመፍታት ልጄን ላፋታት። + ዓባይ ማደሪያ የለው፥ ግንድ ይዞ ይዞራል። + የእስላም አገሩ መካ የአሞራ አገሩ ዋርካ። + ተንጋሎ ቢተፉ ተመልሶ ባፉ። + ወዳጅህ ማር ቢሆን ጨርስህ አትላሰው። + እግርህን በፍራሽህ ልክ ዘርጋ። + +Runes: + + ᚻᛖ ᚳᚹᚫᚦ ᚦᚫᛏ ᚻᛖ ᛒᚢᛞᛖ ᚩᚾ ᚦᚫᛗ ᛚᚪᚾᛞᛖ ᚾᚩᚱᚦᚹᛖᚪᚱᛞᚢᛗ ᚹᛁᚦ ᚦᚪ ᚹᛖᛥᚫ + + (Old English, which transcribed into Latin reads 'He cwaeth that he + bude thaem lande northweardum with tha Westsae.' and means 'He said + that he lived in the northern land near the Western Sea.') + +Braille: + + ⡌⠁⠧⠑ ⠼⠁⠒ ⡍⠜⠇⠑⠹⠰⠎ ⡣⠕⠌ + + ⡍⠜⠇⠑⠹ ⠺⠁⠎ ⠙⠑⠁⠙⠒ ⠞⠕ ⠃⠑⠛⠔ ⠺⠊⠹⠲ ⡹⠻⠑ ⠊⠎ ⠝⠕ ⠙⠳⠃⠞ + ⠱⠁⠞⠑⠧⠻ ⠁⠃⠳⠞ ⠹⠁⠞⠲ ⡹⠑ ⠗⠑⠛⠊⠌⠻ ⠕⠋ ⠙⠊⠎ ⠃⠥⠗⠊⠁⠇ ⠺⠁⠎ + ⠎⠊⠛⠝⠫ ⠃⠹ ⠹⠑ ⠊⠇⠻⠛⠹⠍⠁⠝⠂ ⠹⠑ ⠊⠇⠻⠅⠂ ⠹⠑ ⠥⠝⠙⠻⠞⠁⠅⠻⠂ + ⠁⠝⠙ ⠹⠑ ⠡⠊⠑⠋ ⠍⠳⠗⠝⠻⠲ ⡎⠊⠗⠕⠕⠛⠑ ⠎⠊⠛⠝⠫ ⠊⠞⠲ ⡁⠝⠙ + ⡎⠊⠗⠕⠕⠛⠑⠰⠎ ⠝⠁⠍⠑ ⠺⠁⠎ ⠛⠕⠕⠙ ⠥⠏⠕⠝ ⠰⡡⠁⠝⠛⠑⠂ ⠋⠕⠗ ⠁⠝⠹⠹⠔⠛ ⠙⠑ + ⠡⠕⠎⠑ ⠞⠕ ⠏⠥⠞ ⠙⠊⠎ ⠙⠁⠝⠙ ⠞⠕⠲ + + ⡕⠇⠙ ⡍⠜⠇⠑⠹ ⠺⠁⠎ ⠁⠎ ⠙⠑⠁⠙ ⠁⠎ ⠁ ⠙⠕⠕⠗⠤⠝⠁⠊⠇⠲ + + ⡍⠔⠙⠖ ⡊ ⠙⠕⠝⠰⠞ ⠍⠑⠁⠝ ⠞⠕ ⠎⠁⠹ ⠹⠁⠞ ⡊ ⠅⠝⠪⠂ ⠕⠋ ⠍⠹ + ⠪⠝ ⠅⠝⠪⠇⠫⠛⠑⠂ ⠱⠁⠞ ⠹⠻⠑ ⠊⠎ ⠏⠜⠞⠊⠊⠥⠇⠜⠇⠹ ⠙⠑⠁⠙ ⠁⠃⠳⠞ + ⠁ ⠙⠕⠕⠗⠤⠝⠁⠊⠇⠲ ⡊ ⠍⠊⠣⠞ ⠙⠁⠧⠑ ⠃⠑⠲ ⠔⠊⠇⠔⠫⠂ ⠍⠹⠎⠑⠇⠋⠂ ⠞⠕ + ⠗⠑⠛⠜⠙ ⠁ ⠊⠕⠋⠋⠔⠤⠝⠁⠊⠇ ⠁⠎ ⠹⠑ ⠙⠑⠁⠙⠑⠌ ⠏⠊⠑⠊⠑ ⠕⠋ ⠊⠗⠕⠝⠍⠕⠝⠛⠻⠹ + ⠔ ⠹⠑ ⠞⠗⠁⠙⠑⠲ ⡃⠥⠞ ⠹⠑ ⠺⠊⠎⠙⠕⠍ ⠕⠋ ⠳⠗ ⠁⠝⠊⠑⠌⠕⠗⠎ + ⠊⠎ ⠔ ⠹⠑ ⠎⠊⠍⠊⠇⠑⠆ ⠁⠝⠙ ⠍⠹ ⠥⠝⠙⠁⠇⠇⠪⠫ ⠙⠁⠝⠙⠎ + ⠩⠁⠇⠇ ⠝⠕⠞ ⠙⠊⠌⠥⠗⠃ ⠊⠞⠂ ⠕⠗ ⠹⠑ ⡊⠳⠝⠞⠗⠹⠰⠎ ⠙⠕⠝⠑ ⠋⠕⠗⠲ ⡹⠳ + ⠺⠊⠇⠇ ⠹⠻⠑⠋⠕⠗⠑ ⠏⠻⠍⠊⠞ ⠍⠑ ⠞⠕ ⠗⠑⠏⠑⠁⠞⠂ ⠑⠍⠏⠙⠁⠞⠊⠊⠁⠇⠇⠹⠂ ⠹⠁⠞ + ⡍⠜⠇⠑⠹ ⠺⠁⠎ ⠁⠎ ⠙⠑⠁⠙ ⠁⠎ ⠁ ⠙⠕⠕⠗⠤⠝⠁⠊⠇⠲ + + (The first couple of paragraphs of "A Christmas Carol" by Dickens) + +Compact font selection example text: + + ABCDEFGHIJKLMNOPQRSTUVWXYZ /0123456789 + abcdefghijklmnopqrstuvwxyz £©µÀÆÖÞßéöÿ + –—‘“”„†•…‰™œŠŸž€ ΑΒΓΔΩαβγδω АБВГДабвгд + ∀∂∈ℝ∧∪≡∞ ↑↗↨↻⇣ ┐┼╔╘░►☺♀ fi�⑀₂ἠḂӥẄɐː⍎אԱა + +Greetings in various languages: + + Hello world, Καλημέρα κόσμε, コンニチハ + +Box drawing alignment tests: █ + ▉ + ╔══╦══╗ ┌──┬──┐ ╭──┬──╮ ╭──┬──╮ ┏━━┳━━┓ ┎┒┏┑ ╷ ╻ ┏┯┓ ┌┰┐ ▊ ╱╲╱╲╳╳╳ + ║┌─╨─┐║ │╔═╧═╗│ │╒═╪═╕│ │╓─╁─╖│ ┃┌─╂─┐┃ ┗╃╄┙ ╶┼╴╺╋╸┠┼┨ ┝╋┥ ▋ ╲╱╲╱╳╳╳ + ║│╲ ╱│║ │║ ║│ ││ │ ││ │║ ┃ ║│ ┃│ ╿ │┃ ┍╅╆┓ ╵ ╹ ┗┷┛ └┸┘ ▌ ╱╲╱╲╳╳╳ + ╠╡ ╳ ╞╣ ├╢ ╟┤ ├┼─┼─┼┤ ├╫─╂─╫┤ ┣┿╾┼╼┿┫ ┕┛┖┚ ┌┄┄┐ ╎ ┏┅┅┓ ┋ ▍ ╲╱╲╱╳╳╳ + ║│╱ ╲│║ │║ ║│ ││ │ ││ │║ ┃ ║│ ┃│ ╽ │┃ ░░▒▒▓▓██ ┊ ┆ ╎ ╏ ┇ ┋ ▎ + ║└─╥─┘║ │╚═╤═╝│ │╘═╪═╛│ │╙─╀─╜│ ┃└─╂─┘┃ ░░▒▒▓▓██ ┊ ┆ ╎ ╏ ┇ ┋ ▏ + ╚══╩══╝ └──┴──┘ ╰──┴──╯ ╰──┴──╯ ┗━━┻━━┛ └╌╌┘ ╎ ┗╍╍┛ ┋ ▁▂▃▄▅▆▇█ + +</pre> +</BODY> +</HTML> @@ -1340,11 +1340,11 @@ * the version definition with the Project Version on checkout. Just * ignore it. - kw */ /* $Format: "#define LYNX_VERSION \"$ProjectVersion$\""$ */ -#define LYNX_VERSION "2.8.5dev.3" +#define LYNX_VERSION "2.8.5dev.4" #define LYNX_WWW_HOME "http://lynx.browser.org/" #define LYNX_WWW_DIST "http://lynx.isc.org/current/" /* $Format: "#define LYNX_DATE \"$ProjectDate$\""$ */ -#define LYNX_DATE "Sat, 06 Oct 2001 15:02:28 -0700" +#define LYNX_DATE "Thu, 08 Nov 2001 12:48:35 -0800" #define LYNX_DATE_OFF 5 /* truncate the automatically-generated date */ #define LYNX_DATE_LEN 11 /* truncate the automatically-generated date */ |