diff options
42 files changed, 4219 insertions, 4105 deletions
diff --git a/CHANGES b/CHANGES index 06ee566d..9bfaacbc 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,75 @@ Changes since Lynx 2.8 release =============================================================================== +2002-01-01 (2.8.5dev.6) +* add configure options to link with dbmalloc and dmalloc debugging libraries + which offer different features than --enable-find-leaks -TD +* restructured LYhighlight() and logic related to highlighted text using new + functions LYSetHilite(), LYAddHilite(), LYGetHiliteStr() and LYGetHilitePos() + to allow more than two lines to be highlighted in links (Debian #114062) -TD +* simplified some of LYCookie.c with new functions find_domain_entry(), + alloc_attr_value() and parse_attribute() -TD +* modify expansion of %s for WIN_EX EXTERN commands so that short names (used + when the command begins with an uppercase character) are not quoted, and use + backslashes. The normal %s expansion uses forward slashes and may quote the + name if it contains a blank -TD +* modify local directory sort by type to ignore leading '.' characters when + looking for filetype -TD +* modify logic of HTDirEntry() to avoid storing a trailing backslash (DOS-style + path separator) in the anchor URL for local directory entries (from report + by Hataguchi Takeshi) -TD +* amend change in 2.8.5dev.2 to HTLoadHTTP() to omit "Accept-Encoding: gzip" + ensuring that also -source or -dump option is used. Retesting excite.com + shows that it no longer matters, since the page was replaced by a short + javascript which is not sent compressed (request by Hataguchi Takeshi) -TD +* correct a missing definition for COMPRESS_PROG in the configure script + introduced by 2.8.5dev.5 changes (also noted by Stepan Kasal) -TD +* several fixes from Stepan Kasal <kasal@math.cas.cz>: + + remove code in LYCurses.c which checks ttytype variable for "dec-vt" + prefix. EWAN, a decent telnet program for M$ Windows, sets $TERM to + dec-vt100. This is similar to vt102 but it is not appropriate to use vt100 + settings for it. ncurses has in its terminfo database an entry for + "dec-vt100|EWAN telnet's terminal" + The terminfo file is successfully opened when ncurses is initialised and + ttytype is set to the name mentioned above. After stripping "dec-" from + it, lynx ends up searching for + "/usr/share/terminfo/v/vt100|EWAN telnet's terminal" + which cannot cannot be found and lynx crashes. + + compress installed html files with the -9 option of gzip. + + improved install-help makefile rule +* fix some longstanding problems with the DOS port -DK + + fix inability to break out of a hung nameserver lookup or hung connection + attempt without aborting lynx entirely. Using the WATT-32 signal handler + for this seems to work well. Change the default compile option for DJGPP + to -DIGNORE_CTRL_C, causing lynx to ignore SIGINT, so CTRL-BREAK is + completely disabled. With this patch CTRL-C stops current actions without + quitting lynx. To have a way to abort lynx when necessary, bind ALT-X to + SIGQUIT. (The unix default of CTRL-\ is not bound to the same scan code on + different international keyboards, while ALT-X is familiar to DOS users for + existing programs). Because the WATT-32 signal handler was not available + to external programs, a patch to WATT-32 is necessary for the new lynx code + to work. The patch for WATT-32 is shown in the INSTALLATION documentation. + + added some fixes for "/" vs "\" handling in pathnames so that non-DJGPP + programs will see standard DOS pathnames when called. The mailer code was + ignoring the environment variable SHELL when calling the mailer, leading to + a lack of environment space for the mailer to work -DK + + add calls to _eth_release() and _eth_init(), which Gisle Vanem says should + not be necessary in this part of lynx. But this seems to fix get + intermittent hung nameserver lookup sessions after using CTRL-C. +* simplified a loop in HTConfirmCookie() and added CTRACE's to demonstrate that + this is working properly (addresses Debian #119751) -TD +* add some CTRACE's to curses screen initialization and resizing to provide + better diagnosis of problem reported by David Balazic + <david.balazic@uni-mb.si> on HP-UX 11.00) -PG +* modify configure.in and aclocal.m4 to work with autoconf 2.52 patched with + ftp://invisible-island.net/autoconf/autoconf-2.52-20011227.patch.gz +* modify configure macros CF_CURSES_CPPFLAGS and CF_NCURSES_CPPFLAGS to ensure + that the (n)curses.h header file is actually found, in case someone tries to + build lynx without having installed the development files (based on anonymous + posting on comp.os.linux.networking newsgroup) -TD +* update config.guess, config.sub from + http://subversions.gnu.org/cgi-bin/viewcvs/config/config/ + 2001-11-18 (2.8.5dev.5) * modify prompt for file- or directory-name in rename/move operation to provide a default based on the selected file/directory -TD diff --git a/INSTALLATION b/INSTALLATION index 1a3462c5..62415a9e 100644 --- a/INSTALLATION +++ b/INSTALLATION @@ -467,6 +467,12 @@ II. Compile instructions -- UNIX Limit the number of charsets that are compiled-in to the specified list of comma-separated MIME names. + --with-dbmalloc + use Conor Cahill's dbmalloc library + + --with-dmalloc + use Gray Watson's dmalloc library + --with-included-gettext use the GNU gettext library included here (default). See "--enable-nls". @@ -848,6 +854,25 @@ V. Compile instructions -- 386 DOS can be obtained from the openssl-dev archives at: "http://www.mail-archive.com/openssl-dev@openssl.org/msg09104/096b.pch.gz" + In order for lynx to be able to break out of a stuck nameserver + lookup or connection attempt, you should compile with -DIGNORE_CTRL_C + and apply the following patch to WATT-32. + + --- watt32-2.1dev.rel.5/src/pc_cbrk.c.ori Mon Jun 19 16:08:06 2000 + +++ watt32-2.1dev.rel.5/src/pc_cbrk.c Sun Nov 18 11:18:50 2001 + @@ -74,6 +74,11 @@ + longjmp (sig_jmp, 1); + } + + +void sig_handler_watt (int sig) + +{ + + sig_handler (int sig); + +} + + + /* + * want_brk = 0: no ^Break checking + * want_brk = 1: normal ^Break checks + If you have trouble applying the patches, try using the "patch" program, ("ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp/v2gnu/pat253b.zip"). To read the Unix man style documentation, use, for example, "less" @@ -951,7 +976,7 @@ V. Compile instructions -- 386 DOS instead of the SLANG keyhandler unless you define "NO_DJ_KEYHANDLER". #!/bin/sh - CFLAGS="-O2 -I/djgpp/pdcur24 -I/djgpp/watt32/inc" \ + CFLAGS="-O2 -DIGNORE_CTRL_C -I/djgpp/pdcur24 -I/djgpp/watt32/inc" \ LIBS="-L/djgpp/pdcur24/lib -L/djgpp/watt32/lib -liconv" \ ./configure --prefix=d:/djgpp/lynx-rel/lynx-cnf \ --with-screen=curses \ @@ -975,7 +1000,7 @@ V. Compile instructions -- 386 DOS -- 1997/9/29 - D. Kaufman <dkaufman@rahul.net> -- 1997/10/3 - B. Schiavo <Wschiavo@concentric.net> --- Last update - 2001/08/01 +-- Last update - 2001/12/19 VI. General installation instructions diff --git a/WWW/Library/Implementation/HTDOS.c b/WWW/Library/Implementation/HTDOS.c index 0d943a25..47f31283 100644 --- a/WWW/Library/Implementation/HTDOS.c +++ b/WWW/Library/Implementation/HTDOS.c @@ -4,10 +4,7 @@ #include <HTUtils.h> #include <HTDOS.h> - -#ifdef WIN_EX -#include <LYGlobalDefs.h> -#endif +#include <LYStrings.h> /* * Make a copy of the source argument in the result, allowing some extra @@ -71,14 +68,6 @@ char * HTDOS_wwwName ARGS1(CONST char *, dosname) cp_url++; *cp_url = '\0'; } - -#ifdef NOTUSED - if(*cp_url == ':') { - cp_url++; - *cp_url = '/'; /* terminate drive letter to survive */ - } -#endif - return(wwwname); } @@ -151,6 +140,25 @@ char * HTDOS_name ARGS1(char *, wwwname) return (result); } +#ifdef WIN_EX +PUBLIC char *HTDOS_short_name(char *path) +{ + static char sbuf[LY_MAXPATH]; + char *ret; + DWORD r; + + if (strchr(path, '/')) + path = HTDOS_name(path); + r = GetShortPathName(path, sbuf, sizeof sbuf); + if (r >= sizeof(sbuf) || r == 0) { + ret = LYstrncpy(sbuf, path, sizeof(sbuf)); + } else { + ret = sbuf; + } + return ret; +} +#endif + #if defined(DJGPP) && defined(DJGPP_KEYHANDLER) /* PUBLIC getxkey() ** Replaces libc's getxkey() with polling of tcp/ip diff --git a/WWW/Library/Implementation/HTFile.c b/WWW/Library/Implementation/HTFile.c index 4ca9a6f1..9ddfd398 100644 --- a/WWW/Library/Implementation/HTFile.c +++ b/WWW/Library/Implementation/HTFile.c @@ -340,6 +340,7 @@ PRIVATE void LYListFmtParse ARGS5( case 'K': /* size in Kilobytes but not for directories */ if (S_ISDIR(data->file_info.st_mode)) { FormatStr(&buf, start, ""); + StrAllocCat(buf, " "); break; } /* FALL THROUGH */ @@ -1318,16 +1319,15 @@ PUBLIC void HTDirEntry ARGS3( CONST char *, entry) { char * relative = NULL; + char * stripped = NULL; char * escaped = NULL; int len; - if (0 == strcmp(entry,"../")) { - /* - ** Undo slash appending for anchor creation. - */ - StrAllocCopy(escaped,".."); - } else { - escaped = HTEscape(entry, URL_XPALPHAS); + StrAllocCopy(escaped, entry); + LYTrimPathSep(escaped); + if (strcmp(escaped, "..") != 0) { + stripped = escaped; + escaped = HTEscape(stripped, URL_XPALPHAS); if (((len = strlen(escaped)) > 2) && escaped[(len - 3)] == '%' && escaped[(len - 2)] == '2' && @@ -1353,6 +1353,7 @@ PUBLIC void HTDirEntry ARGS3( HTStartAnchor(target, NULL, relative); FREE(relative); } + FREE(stripped); FREE(escaped); } @@ -1632,7 +1633,10 @@ PRIVATE void do_readme ARGS2(HTStructured *, target, CONST char *, localname) PRIVATE char *file_type ARGS1(char *, path) { - char *type = strchr(path, '.'); + char *type; + while (*path == '.') + ++path; + type = strchr(path, '.'); if (type == NULL) type = ""; return type; @@ -1672,6 +1676,13 @@ PRIVATE int dired_cmp ARGS2(void *, a, void *, b) #endif /* LONG_LIST */ if (code == 0) code = AS_cmp(p->file_name, q->file_name); +#if 0 + CTRACE((tfp, "dired_cmp(%d) ->%d\n\t%c:%s (%s)\n\t%c:%s (%s)\n", + dir_list_order, + code, + p->sort_tags, p->file_name, file_type(p->file_name), + q->sort_tags, q->file_name, file_type(q->file_name))); +#endif return code; } diff --git a/WWW/Library/Implementation/HTMLDTD.c b/WWW/Library/Implementation/HTMLDTD.c index 09d39023..ec8aa5e3 100644 --- a/WWW/Library/Implementation/HTMLDTD.c +++ b/WWW/Library/Implementation/HTMLDTD.c @@ -1663,7 +1663,8 @@ PUBLIC void HTSwitchDTD ARGS1( int, new_flag) { if (TRACE) - CTRACE((tfp,"HTMLDTD: Copying DTD element info of size %d, %d * %d\n", + CTRACE((tfp,"HTMLDTD: Copying %s DTD element info of size %d, %d * %d\n", + new_flag ? "strict" : "tagsoup", (int) (new_flag ? sizeof(tags_new) : sizeof(tags_old)), HTML_ALL_ELEMENTS, (int) sizeof(HTTag))); diff --git a/WWW/Library/Implementation/HTTP.c b/WWW/Library/Implementation/HTTP.c index 3562801e..7dcd0d9f 100644 --- a/WWW/Library/Implementation/HTTP.c +++ b/WWW/Library/Implementation/HTTP.c @@ -685,9 +685,12 @@ use_tunnel: * adding the base URL but is simpler than augmenting the dump's * presentation logic -TD */ - if (!LYPrependBaseToSource) + if (LYPrependBaseToSource && dump_output_immediately) { + CTRACE((tfp, "omit Accept-Encoding to work-around interaction with -source\n")); + } else { HTSprintf(&command, "Accept-Encoding: %s, %s%c%c", "gzip", "compress", CR, LF); + } if (language && *language) { HTSprintf(&command, "Accept-Language: %s%c%c", language, CR, LF); @@ -876,7 +879,7 @@ use_tunnel: ** document being proxied. */ if (!strncmp(docname, "http", 4)) { - cookie = LYCookie(host2, path2, port2, secure); + cookie = LYAddCookieHeader(host2, path2, port2, secure); } FREE(host2); FREE(path2); @@ -888,7 +891,7 @@ use_tunnel: /* ** Add cookie for a non-proxied request. - FM */ - cookie = LYCookie(hostname, abspath, portnumber, secure); + cookie = LYAddCookieHeader(hostname, abspath, portnumber, secure); auth_proxy = NO; } /* diff --git a/WWW/Library/Implementation/HTUtils.h b/WWW/Library/Implementation/HTUtils.h index b006913a..95e15456 100644 --- a/WWW/Library/Implementation/HTUtils.h +++ b/WWW/Library/Implementation/HTUtils.h @@ -590,6 +590,26 @@ extern char HTGetSSLCharacter PARAMS((void * handle)); #endif /* USE_SSL */ +#if HAVE_LIBDMALLOC +#include <dmalloc.h> /* Gray Watson's library */ +#define show_alloc() dmalloc_log_unfreed() +#else +#undef HAVE_LIBDMALLOC +#define HAVE_LIBDMALLOC 0 +#endif + +#if HAVE_LIBDBMALLOC +#include <dbmalloc.h> /* Conor Cahill's library */ +#define show_alloc() malloc_dump(fileno(stderr)) +#else +#undef HAVE_LIBDBMALLOC +#define HAVE_LIBDBMALLOC 0 +#endif + +#ifndef show_alloc +#define show_alloc() /* nothing */ +#endif + #include <userdefs.h> #endif /* HTUTILS_H */ diff --git a/aclocal.m4 b/aclocal.m4 index a3d39fd5..fedd1634 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -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/11/3 +dnl Updated: 2001/12/27 dnl dnl The autoconf used in Lynx development is GNU autoconf, patched dnl by Tom Dickey. See your local GNU archives, and this URL: @@ -430,25 +430,39 @@ AC_DEFUN(AM_WITH_NLS, ]) dnl --------------------------------------------------------------------------- dnl Copy non-preprocessor flags to $CFLAGS, preprocessor flags to $CPPFLAGS +dnl The second parameter if given makes this macro verbose. AC_DEFUN([CF_ADD_CFLAGS], [ +cf_new_cflags= +cf_new_cppflags= for cf_add_cflags in $1 do case $cf_add_cflags in #(vi -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi case "$CPPFLAGS" in - *$cf_add_cflags) + *$cf_add_cflags) #(vi ;; - *) - CPPFLAGS="$CPPFLAGS $cf_add_cflags" + *) #(vi + cf_new_cppflags="$cf_new_cppflags $cf_add_cflags" ;; esac ;; *) - CFLAGS="$CFLAGS $cf_add_cflags" + cf_new_cflags="$cf_new_cflags $cf_add_cflags" ;; esac done + +if test -n "$cf_new_cflags" ; then + ifelse($2,,,[CF_VERBOSE(add to \$CFLAGS $cf_new_cflags)]) + CFLAGS="$CFLAGS $cf_new_cflags" +fi + +if test -n "$cf_new_cppflags" ; then + ifelse($2,,,[CF_VERBOSE(add to \$CPPFLAGS $cf_new_cppflags)]) + CPPFLAGS="$CPPFLAGS $cf_new_cppflags" +fi + ])dnl dnl --------------------------------------------------------------------------- dnl Add an include-directory to $CPPFLAGS. Don't add /usr/include, since it's @@ -499,8 +513,7 @@ dnl This is adapted from the macros 'fp_PROG_CC_STDC' and 'fp_C_PROTOTYPES' dnl in the sharutils 4.2 distribution. AC_DEFUN([CF_ANSI_CC_CHECK], [ -AC_MSG_CHECKING(for ${CC-cc} option to accept ANSI C) -AC_CACHE_VAL(cf_cv_ansi_cc,[ +AC_CACHE_CHECK(for ${CC-cc} option to accept ANSI C, cf_cv_ansi_cc,[ cf_cv_ansi_cc=no cf_save_CFLAGS="$CFLAGS" cf_save_CPPFLAGS="$CPPFLAGS" @@ -536,7 +549,6 @@ done CFLAGS="$cf_save_CFLAGS" CPPFLAGS="$cf_save_CPPFLAGS" ]) -AC_MSG_RESULT($cf_cv_ansi_cc) if test "$cf_cv_ansi_cc" != "no"; then if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then @@ -691,7 +703,7 @@ test -n "$system_name" && AC_DEFINE_UNQUOTED(SYSTEM_NAME,"$system_name") AC_CACHE_VAL(cf_cv_system_name,[cf_cv_system_name="$system_name"]) test -z "$system_name" && system_name="$cf_cv_system_name" -test -n "$cf_cv_system_name" && AC_MSG_RESULT("Configuring for $cf_cv_system_name") +test -n "$cf_cv_system_name" && AC_MSG_RESULT(Configuring for $cf_cv_system_name) if test ".$system_name" != ".$cf_cv_system_name" ; then AC_MSG_RESULT(Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)) @@ -699,18 +711,34 @@ if test ".$system_name" != ".$cf_cv_system_name" ; then fi ])dnl dnl --------------------------------------------------------------------------- +dnl Conditionally add to $CFLAGS and $CPPFLAGS values which are derived from +dnl a build-configuration such as imake. These have the pitfall that they +dnl often contain compiler-specific options which we cannot use, mixed with +dnl preprocessor options that we usually can. +AC_DEFUN([CF_CHECK_CFLAGS], +[ +CF_VERBOSE(checking additions to CFLAGS) +cf_check_cflags="$CFLAGS" +cf_check_cppflags="$CPPFLAGS" +CF_ADD_CFLAGS($1,yes) +if test "$cf_check_cflags" != "$CFLAGS" ; then +AC_TRY_LINK([#include <stdio.h>],[printf("Hello world");],, + [CF_VERBOSE(test-compile failed. Undoing change to \$CFLAGS) + if test "$cf_check_cppflags" != "$CPPFLAGS" ; then + CF_VERBOSE(but keeping change to \$CPPFLAGS) + fi + CFLAGS="$cf_check_flags"]) +fi +])dnl +dnl --------------------------------------------------------------------------- dnl Check for data that is usually declared in <stdio.h> or <errno.h>, e.g., dnl the 'errno' variable. Define a DECL_xxx symbol if we must declare it dnl ourselves. dnl -dnl (I would use AC_CACHE_CHECK here, but it will not work when called in a -dnl loop from CF_SYS_ERRLIST). -dnl dnl $1 = the name to check AC_DEFUN([CF_CHECK_ERRNO], [ -AC_MSG_CHECKING(if external $1 is declared) -AC_CACHE_VAL(cf_cv_dcl_$1,[ +AC_CACHE_CHECK(if external $1 is declared, cf_cv_dcl_$1,[ AC_TRY_COMPILE([ #ifdef HAVE_STDLIB_H #include <stdlib.h> @@ -719,16 +747,12 @@ AC_CACHE_VAL(cf_cv_dcl_$1,[ #include <sys/types.h> #include <errno.h> ], [long x = (long) $1], - [eval 'cf_cv_dcl_'$1'=yes'], - [eval 'cf_cv_dcl_'$1'=no']) + [cf_cv_dcl_$1=yes], + [cf_cv_dcl_$1=no]) ]) -eval 'cf_result=$cf_cv_dcl_'$1 -AC_MSG_RESULT($cf_result) - -if test "$cf_result" = no ; then - eval 'cf_result=DECL_'$1 - CF_UPPER(cf_result,$cf_result) +if test "$cf_cv_dcl_$1" = no ; then + CF_UPPER(cf_result,decl_$1) AC_DEFINE_UNQUOTED($cf_result) fi @@ -742,22 +766,18 @@ dnl $1 = the name to check dnl $2 = its type AC_DEFUN([CF_CHECK_EXTERN_DATA], [ -AC_MSG_CHECKING(if external $1 exists) -AC_CACHE_VAL(cf_cv_have_$1,[ +AC_CACHE_CHECK(if external $1 exists, cf_cv_have_$1,[ AC_TRY_LINK([ #undef $1 extern $2 $1; ], [$1 = 2], - [eval 'cf_cv_have_'$1'=yes'], - [eval 'cf_cv_have_'$1'=no'])]) - -eval 'cf_result=$cf_cv_have_'$1 -AC_MSG_RESULT($cf_result) + [cf_cv_have_$1=yes], + [cf_cv_have_$1=no]) +]) -if test "$cf_result" = yes ; then - eval 'cf_result=HAVE_'$1 - CF_UPPER(cf_result,$cf_result) +if test "$cf_cv_have_$1" = yes ; then + CF_UPPER(cf_result,have_$1) AC_DEFINE_UNQUOTED($cf_result) fi @@ -881,7 +901,7 @@ esac test "$cf_cv_curses_incdir" != no && CPPFLAGS="$CPPFLAGS $cf_cv_curses_incdir" AC_CACHE_CHECK(if we have identified curses headers,cf_cv_ncurses_header,[ -cf_cv_ncurses_header=curses.h +cf_cv_ncurses_header=none for cf_header in \ curses.h \ ncurses.h \ @@ -894,6 +914,10 @@ AC_TRY_COMPILE([#include <${cf_header}>], done ]) +if test "$cf_cv_ncurses_header" = none ; then + AC_MSG_ERROR(No curses header-files found) +fi + # cheat, to get the right #define's for HAVE_NCURSES_H, etc. AC_CHECK_HEADERS($cf_cv_ncurses_header) @@ -2248,12 +2272,12 @@ AC_TRY_COMPILE([ [cf_cv_ngroups=no]) ]) AC_MSG_RESULT($cf_cv_ngroups) +]) if test "$cf_cv_ngroups" = no ; then AC_DEFINE(NGROUPS,16) elif test "$cf_cv_ngroups" = NGROUPS_MAX ; then AC_DEFINE(NGROUPS,NGROUPS_MAX) fi -]) ])dnl dnl --------------------------------------------------------------------------- dnl Check if we use the messages included with this program @@ -2367,7 +2391,7 @@ dnl Configure for PDCurses' X11 library AC_DEFUN([CF_PDCURSES_X11],[ AC_REQUIRE([CF_X_ATHENA]) LDFLAGS="$LDFLAGS $X_LIBS" -CF_ADD_CFLAGS($X_CFLAGS) +CF_CHECK_CFLAGS($X_CFLAGS) AC_CHECK_LIB(X11,XOpenDisplay, [LIBS="-lX11 $LIBS"],, [$X_PRE_LIBS $LIBS $X_EXTRA_LIBS]) @@ -2906,7 +2930,6 @@ dnl --------------------------------------------------------------------------- dnl Check if this is a SYSV flavor of UTMP AC_DEFUN([CF_SYSV_UTMP], [ -AC_REQUIRE([CF_UTMP]) AC_CACHE_CHECK(if $cf_cv_have_utmp is SYSV flavor,cf_cv_sysv_utmp,[ test "$cf_cv_have_utmp" = "utmp" && cf_prefix="ut" || cf_prefix="utx" AC_TRY_LINK([ @@ -2928,10 +2951,8 @@ dnl errno.h. Declaration of sys_errlist on BSD4.4 interferes with our dnl declaration. Reported by Keith Bostic. AC_DEFUN([CF_SYS_ERRLIST], [ -for cf_name in sys_nerr sys_errlist -do - CF_CHECK_ERRNO($cf_name) -done + CF_CHECK_ERRNO(sys_nerr) + CF_CHECK_ERRNO(sys_errlist) ])dnl dnl --------------------------------------------------------------------------- dnl Look for termcap libraries, or the equivalent in terminfo. @@ -3113,36 +3134,30 @@ dnl Check for UTMP/UTMPX headers AC_DEFUN([CF_UTMP], [ AC_REQUIRE([CF_LASTLOG]) + AC_CACHE_CHECK(for utmp implementation,cf_cv_have_utmp,[ cf_cv_have_utmp=no for cf_header in utmpx utmp ; do - AC_TRY_COMPILE([ +cf_utmp_includes=" #include <sys/types.h> #include <${cf_header}.h> #define getutent getutxent #ifdef USE_LASTLOG #include <lastlog.h> /* may conflict with utmpx.h on Linux */ #endif -], +" + AC_TRY_COMPILE([$cf_utmp_includes], [struct $cf_header x; char *name = x.ut_name; /* utmp.h and compatible definitions */ ], [cf_cv_have_utmp=$cf_header break], [ - AC_TRY_COMPILE([ -#include <sys/types.h> -#include <${cf_header}.h> -#define getutent getutxent -#ifdef USE_LASTLOG -#include <lastlog.h> /* may conflict with utmpx.h on Linux */ -#endif -], + AC_TRY_COMPILE([$cf_utmp_includes], [struct $cf_header x; char *name = x.ut_user; /* utmpx.h must declare this */ ], [cf_cv_have_utmp=$cf_header - AC_DEFINE(ut_name,ut_user) break ])]) done @@ -3152,6 +3167,7 @@ if test $cf_cv_have_utmp != no ; then AC_DEFINE(HAVE_UTMP) test $cf_cv_have_utmp = utmpx && AC_DEFINE(UTMPX_FOR_UTMP) CF_UTMP_UT_HOST + CF_UTMP_UT_NAME CF_UTMP_UT_XSTATUS CF_UTMP_UT_XTIME CF_UTMP_UT_SESSION @@ -3162,7 +3178,6 @@ dnl --------------------------------------------------------------------------- dnl Check if UTMP/UTMPX struct defines ut_host member AC_DEFUN([CF_UTMP_UT_HOST], [ -AC_REQUIRE([CF_UTMP]) if test $cf_cv_have_utmp != no ; then AC_MSG_CHECKING(if utmp.ut_host is declared) AC_CACHE_VAL(cf_cv_have_utmp_ut_host,[ @@ -3177,11 +3192,46 @@ AC_MSG_RESULT($cf_cv_have_utmp_ut_host) test $cf_cv_have_utmp_ut_host != no && AC_DEFINE(HAVE_UTMP_UT_HOST) fi ]) + +dnl --------------------------------------------------------------------------- +dnl Check if UTMP/UTMPX struct defines ut_name member +AC_DEFUN([CF_UTMP_UT_NAME], +[ +if test $cf_cv_have_utmp != no ; then +AC_CACHE_CHECK(if utmp.ut_name is declared,cf_cv_have_utmp_ut_name,[ + cf_cv_have_utmp_ut_name=no +cf_utmp_includes=" +#include <sys/types.h> +#include <${cf_cv_have_utmp}.h> +#define getutent getutxent +#ifdef USE_LASTLOG +#include <lastlog.h> /* may conflict with utmpx.h on Linux */ +#endif +" +for cf_header in ut_name ut_user ; do + AC_TRY_COMPILE([$cf_utmp_includes], + [struct $cf_cv_have_utmp x; + char *name = x.$cf_header; + ], + [cf_cv_have_utmp_ut_name=$cf_header + break]) +done +]) + +case $cf_cv_have_utmp_ut_name in #(vi +no) #(vi + AC_MSG_ERROR(Cannot find declaration for ut.ut_name) + ;; +ut_user) + AC_DEFINE(ut_name,ut_user) + ;; +esac +fi +]) dnl --------------------------------------------------------------------------- dnl Check if UTMP/UTMPX struct defines ut_session member AC_DEFUN([CF_UTMP_UT_SESSION], [ -AC_REQUIRE([CF_UTMP]) if test $cf_cv_have_utmp != no ; then AC_CACHE_CHECK(if utmp.ut_session is declared, cf_cv_have_utmp_ut_session,[ AC_TRY_COMPILE([ @@ -3209,7 +3259,6 @@ dnl Note: utmp_xstatus is not a conventional compatibility definition in the dnl system header files. AC_DEFUN([CF_UTMP_UT_XSTATUS], [ -AC_REQUIRE([CF_UTMP]) if test $cf_cv_have_utmp != no ; then AC_CACHE_CHECK(for exit-status in $cf_cv_have_utmp,cf_cv_have_utmp_ut_xstatus,[ for cf_result in \ @@ -3237,7 +3286,6 @@ dnl --------------------------------------------------------------------------- dnl Check if UTMP/UTMPX struct defines ut_xtime member AC_DEFUN([CF_UTMP_UT_XTIME], [ -AC_REQUIRE([CF_UTMP]) if test $cf_cv_have_utmp != no ; then AC_CACHE_CHECK(if utmp.ut_xtime is declared, cf_cv_have_utmp_ut_xtime,[ AC_TRY_COMPILE([ @@ -3530,7 +3578,7 @@ esac if test $cf_have_X_LIBS = no ; then AC_PATH_XTRA LDFLAGS="$LDFLAGS $X_LIBS" - CF_ADD_CFLAGS($X_CFLAGS) + CF_CHECK_CFLAGS($X_CFLAGS) AC_CHECK_LIB(X11,XOpenDisplay, [LIBS="-lX11 $LIBS"],, [$X_PRE_LIBS $LIBS $X_EXTRA_LIBS]) @@ -3541,7 +3589,7 @@ if test $cf_have_X_LIBS = no ; then [$X_PRE_LIBS $LIBS $X_EXTRA_LIBS]) else LDFLAGS="$LDFLAGS $X_LIBS" - CF_ADD_CFLAGS($X_CFLAGS) + CF_CHECK_CFLAGS($X_CFLAGS) fi if test $cf_have_X_LIBS = no ; then diff --git a/config.guess b/config.guess index 71de137a..83e7b840 100755 --- a/config.guess +++ b/config.guess @@ -3,7 +3,7 @@ # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 # Free Software Foundation, Inc. -timestamp='2001-03-16' +timestamp='2001-12-13' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -24,8 +24,9 @@ timestamp='2001-03-16' # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. -# Written by Per Bothner <bothner@cygnus.com>. -# Please send patches to <config-patches@gnu.org>. +# Originally written by Per Bothner <bothner@cygnus.com>. +# Please send patches to <config-patches@gnu.org>. Submit a context +# diff and a properly formatted ChangeLog entry. # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and @@ -52,7 +53,7 @@ version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright (C) 1992, 93, 94, 95, 96, 97, 98, 99, 2000 +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO @@ -95,25 +96,25 @@ trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; exit 1' 1 2 15 # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. -case $CC_FOR_BUILD,$HOST_CC,$CC in - ,,) echo "int dummy(){}" > $dummy.c +set_cc_for_build='case $CC_FOR_BUILD,$HOST_CC,$CC in + ,,) echo "int dummy(){}" > $dummy.c ; for c in cc gcc c89 ; do - ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 + ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 ; if test $? = 0 ; then - CC_FOR_BUILD="$c"; break - fi - done - rm -f $dummy.c $dummy.o $dummy.rel + CC_FOR_BUILD="$c"; break ; + fi ; + done ; + rm -f $dummy.c $dummy.o $dummy.rel ; if test x"$CC_FOR_BUILD" = x ; then - CC_FOR_BUILD=no_compiler_found + CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; -esac +esac' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. -# (ghazi@noc.rutgers.edu 8/24/94.) +# (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi @@ -127,29 +128,29 @@ UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) - # Netbsd (nbsd) targets should (where applicable) match one or + # NetBSD (nbsd) targets should (where applicable) match one or # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. - # Determine the machine/vendor (is the vendor relevant). - case "${UNAME_MACHINE}" in - amiga) machine=m68k-unknown ;; - arm32) machine=arm-unknown ;; - atari*) machine=m68k-atari ;; - sun3*) machine=m68k-sun ;; - mac68k) machine=m68k-apple ;; - macppc) machine=powerpc-apple ;; - hp3[0-9][05]) machine=m68k-hp ;; - ibmrt|romp-ibm) machine=romp-ibm ;; - *) machine=${UNAME_MACHINE}-unknown ;; + # + # Note: NetBSD doesn't particularly care about the vendor + # portion of the name. We always set it to "unknown". + UNAME_MACHINE_ARCH=`(uname -p) 2>/dev/null` || \ + UNAME_MACHINE_ARCH=unknown + case "${UNAME_MACHINE_ARCH}" in + arm*) machine=arm-unknown ;; + sh3el) machine=shl-unknown ;; + sh3eb) machine=sh-unknown ;; + *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. - case "${UNAME_MACHINE}" in - i386|sparc|amiga|arm*|hp300|mvme68k|vax|atari|luna68k|mac68k|news68k|next68k|pc532|sun3*|x68k) + case "${UNAME_MACHINE_ARCH}" in + arm*|i386|m68k|ns32k|sh3*|sparc|vax) + eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep __ELF__ >/dev/null then @@ -171,6 +172,45 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit 0 ;; + amiga:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + arc:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + hp300:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mac68k:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + macppc:OpenBSD:*:*) + echo powerpc-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mvme68k:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mvme88k:OpenBSD:*:*) + echo m88k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mvmeppc:OpenBSD:*:*) + echo powerpc-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + pmax:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + sgi:OpenBSD:*:*) + echo mipseb-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + sun3:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + wgrisc:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + *:OpenBSD:*:*) + echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; alpha:OSF1:*:*) if test $UNAME_RELEASE = "V4.0"; then UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` @@ -204,6 +244,7 @@ main: jsr \$26,exit .end main EOF + eval $set_cc_for_build $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null if test "$?" = 0 ; then case `./$dummy` in @@ -225,6 +266,9 @@ EOF 2-307) UNAME_MACHINE="alphaev67" ;; + 2-1307) + UNAME_MACHINE="alphaev68" + ;; esac fi rm -f $dummy.s $dummy @@ -242,30 +286,9 @@ EOF Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit 0;; - amiga:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit 0 ;; - arc64:OpenBSD:*:*) - echo mips64el-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - arc:OpenBSD:*:*) - echo mipsel-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - hkmips:OpenBSD:*:*) - echo mips-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - pmax:OpenBSD:*:*) - echo mipsel-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - sgi:OpenBSD:*:*) - echo mips-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - wgrisc:OpenBSD:*:*) - echo mipsel-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; *:OS/390:*:*) echo i370-ibm-openedition exit 0 ;; @@ -328,9 +351,6 @@ EOF aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit 0 ;; - atari*:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor @@ -357,18 +377,6 @@ EOF *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit 0 ;; - sun3*:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mac68k:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mvme68k:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mvme88k:OpenBSD:*:*) - echo m88k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit 0 ;; @@ -385,6 +393,7 @@ EOF echo clipper-intergraph-clix${UNAME_RELEASE} exit 0 ;; mips:*:*:UMIPS | mips:*:*:RISCos) + eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include <stdio.h> /* for printf() prototype */ @@ -412,6 +421,9 @@ EOF rm -f $dummy.c $dummy echo mips-mips-riscos${UNAME_RELEASE} exit 0 ;; + Motorola:PowerMAX_OS:*:*) + echo powerpc-motorola-powermax + exit 0 ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit 0 ;; @@ -459,7 +471,7 @@ EOF ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' - i?86:AIX:*:*) + i*86:AIX:*:*) echo i386-ibm-aix exit 0 ;; ia64:AIX:*:*) @@ -472,6 +484,7 @@ EOF exit 0 ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then + eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include <sys/systemcfg.h> @@ -533,10 +546,8 @@ EOF 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) - case "${HPUX_REV}" in - 11.[0-9][0-9]) - if [ -x /usr/bin/getconf ]; then - sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` + if [ -x /usr/bin/getconf ]; then + sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 @@ -545,12 +556,13 @@ EOF case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; + '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac - fi ;; - esac - if [ "${HP_ARCH}" = "" ]; then - sed 's/^ //' << EOF >$dummy.c + fi + if [ "${HP_ARCH}" = "" ]; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include <stdlib.h> @@ -583,10 +595,10 @@ EOF exit (0); } EOF - (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy` - if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi - rm -f $dummy.c $dummy - fi ;; + (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null) && HP_ARCH=`./$dummy` + if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi + rm -f $dummy.c $dummy + fi ;; esac echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit 0 ;; @@ -595,6 +607,7 @@ EOF echo ia64-hp-hpux${HPUX_REV} exit 0 ;; 3050*:HI-UX:*:*) + eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include <unistd.h> int @@ -630,7 +643,7 @@ EOF 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit 0 ;; - *9??*:MPE/iX:*:*) + *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit 0 ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) @@ -639,7 +652,7 @@ EOF hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit 0 ;; - i?86:OSF1:*:*) + i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else @@ -649,9 +662,6 @@ EOF parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit 0 ;; - hppa*:OpenBSD:*:*) - echo hppa-unknown-openbsd - exit 0 ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit 0 ;; @@ -674,12 +684,13 @@ EOF echo xmp-cray-unicos exit 0 ;; CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos${UNAME_RELEASE} + echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ - -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ + -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ + -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' @@ -702,10 +713,7 @@ EOF FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit 0 ;; - hp300:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - i?86:BSD/386:*:* | i?86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) + i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit 0 ;; sparc*:BSD/OS:*:*) @@ -717,9 +725,6 @@ EOF *:FreeBSD:*:*) echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit 0 ;; - *:OpenBSD:*:*) - echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` - exit 0 ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit 0 ;; @@ -729,6 +734,9 @@ EOF i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit 0 ;; + x86:Interix*:3*) + echo i386-pc-interix3 + exit 0 ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we @@ -760,97 +768,40 @@ EOF echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; mips:Linux:*:*) - cat >$dummy.c <<EOF -#ifdef __cplusplus -#include <stdio.h> /* for printf() prototype */ -int main (int argc, char *argv[]) { -#else -int main (argc, argv) int argc; char *argv[]; { -#endif -#ifdef __MIPSEB__ - printf ("%s-unknown-linux-gnu\n", argv[1]); -#endif -#ifdef __MIPSEL__ - printf ("%sel-unknown-linux-gnu\n", argv[1]); -#endif - return 0; -} + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=mipsel + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=mips + #else + CPU= + #endif + #endif EOF - $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm -f $dummy.c $dummy && exit 0 - rm -f $dummy.c $dummy + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` + rm -f $dummy.c + test x"${CPU}" != x && echo "${CPU}-pc-linux-gnu" && exit 0 ;; ppc:Linux:*:*) - # Determine Lib Version - cat >$dummy.c <<EOF -#include <features.h> -#if defined(__GLIBC__) -extern char __libc_version[]; -extern char __libc_release[]; -#endif -main(argc, argv) - int argc; - char *argv[]; -{ -#if defined(__GLIBC__) - printf("%s %s\n", __libc_version, __libc_release); -#else - printf("unknown\n"); -#endif - return 0; -} -EOF - LIBC="" - $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null - if test "$?" = 0 ; then - ./$dummy | grep 1\.99 > /dev/null - if test "$?" = 0 ; then LIBC="libc1" ; fi - fi - rm -f $dummy.c $dummy - echo powerpc-unknown-linux-gnu${LIBC} + echo powerpc-unknown-linux-gnu + exit 0 ;; + ppc64:Linux:*:*) + echo powerpc64-unknown-linux-gnu exit 0 ;; alpha:Linux:*:*) - cat <<EOF >$dummy.s - .data - \$Lformat: - .byte 37,100,45,37,120,10,0 # "%d-%x\n" - .text - .globl main - .align 4 - .ent main - main: - .frame \$30,16,\$26,0 - ldgp \$29,0(\$27) - .prologue 1 - .long 0x47e03d80 # implver \$0 - lda \$2,-1 - .long 0x47e20c21 # amask \$2,\$1 - lda \$16,\$Lformat - mov \$0,\$17 - not \$1,\$18 - jsr \$26,printf - ldgp \$29,0(\$26) - mov 0,\$16 - jsr \$26,exit - .end main -EOF - LIBC="" - $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null - if test "$?" = 0 ; then - case `./$dummy` in - 0-0) UNAME_MACHINE="alpha" ;; - 1-0) UNAME_MACHINE="alphaev5" ;; - 1-1) UNAME_MACHINE="alphaev56" ;; - 1-101) UNAME_MACHINE="alphapca56" ;; - 2-303) UNAME_MACHINE="alphaev6" ;; - 2-307) UNAME_MACHINE="alphaev67" ;; - esac - objdump --private-headers $dummy | \ - grep ld.so.1 > /dev/null - if test "$?" = 0 ; then - LIBC="libc1" - fi - fi - rm -f $dummy.s $dummy + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + EV5) UNAME_MACHINE=alphaev5 ;; + EV56) UNAME_MACHINE=alphaev56 ;; + PCA56) UNAME_MACHINE=alphapca56 ;; + PCA57) UNAME_MACHINE=alphapca56 ;; + EV6) UNAME_MACHINE=alphaev6 ;; + EV67) UNAME_MACHINE=alphaev67 ;; + EV68*) UNAME_MACHINE=alphaev68 ;; + esac + objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null + if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} exit 0 ;; parisc:Linux:*:* | hppa:Linux:*:*) @@ -876,78 +827,62 @@ EOF x86_64:Linux:*:*) echo x86_64-unknown-linux-gnu exit 0 ;; - i?86:Linux:*:*) + i*86:Linux:*:*) # The BFD linker knows what the default object file format is, so # first see if it will tell us. cd to the root directory to prevent # problems with other programs or directories called `ld' in the path. - ld_supported_emulations=`cd /; ld --help 2>&1 \ - | sed -ne '/supported emulations:/!d + ld_supported_targets=`cd /; ld --help 2>&1 \ + | sed -ne '/supported targets:/!d s/[ ][ ]*/ /g - s/.*supported emulations: *// + s/.*supported targets: *// s/ .*// p'` - case "$ld_supported_emulations" in - i?86linux) - echo "${UNAME_MACHINE}-pc-linux-gnuaout" - exit 0 - ;; - elf_i?86) + case "$ld_supported_targets" in + elf32-i386) TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" ;; - i?86coff) + a.out-i386-linux) + echo "${UNAME_MACHINE}-pc-linux-gnuaout" + exit 0 ;; + coff-i386) echo "${UNAME_MACHINE}-pc-linux-gnucoff" - exit 0 - ;; - esac - # Either a pre-BFD a.out linker (linux-gnuoldld) - # or one that does not give us useful --help. - # GCC wants to distinguish between linux-gnuoldld and linux-gnuaout. - # If ld does not provide *any* "supported emulations:" - # that means it is gnuoldld. - test -z "$ld_supported_emulations" && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0 - case "${UNAME_MACHINE}" in - i?86) - VENDOR=pc; - ;; - *) - VENDOR=unknown; - ;; + exit 0 ;; + "") + # Either a pre-BFD a.out linker (linux-gnuoldld) or + # one that does not give us useful --help. + echo "${UNAME_MACHINE}-pc-linux-gnuoldld" + exit 0 ;; esac # Determine whether the default compiler is a.out or elf - cat >$dummy.c <<EOF -#include <features.h> -#ifdef __cplusplus -#include <stdio.h> /* for printf() prototype */ - int main (int argc, char *argv[]) { -#else - int main (argc, argv) int argc; char *argv[]; { -#endif -#ifdef __ELF__ -# ifdef __GLIBC__ -# if __GLIBC__ >= 2 - printf ("%s-${VENDOR}-linux-gnu\n", argv[1]); -# else - printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]); -# endif -# else - printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]); -# endif -#else - printf ("%s-${VENDOR}-linux-gnuaout\n", argv[1]); -#endif - return 0; -} + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include <features.h> + #ifdef __ELF__ + # ifdef __GLIBC__ + # if __GLIBC__ >= 2 + LIBC=gnu + # else + LIBC=gnulibc1 + # endif + # else + LIBC=gnulibc1 + # endif + #else + LIBC=gnuaout + #endif EOF - $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm -f $dummy.c $dummy && exit 0 - rm -f $dummy.c $dummy + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` + rm -f $dummy.c + test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0 test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 ;; -# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. earlier versions -# are messed up and put the nodename in both sysname and nodename. - i?86:DYNIX/ptx:4*:*) + i*86:DYNIX/ptx:4*:*) + # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. + # earlier versions are messed up and put the nodename in both + # sysname and nodename. echo i386-sequent-sysv4 exit 0 ;; - i?86:UNIX_SV:4.2MP:2.*) + i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, @@ -955,7 +890,7 @@ EOF # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit 0 ;; - i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*) + i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} @@ -963,16 +898,15 @@ EOF echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit 0 ;; - i?86:*:5:7*) - # Fixed at (any) Pentium or better - UNAME_MACHINE=i586 - if [ ${UNAME_SYSTEM} = "UnixWare" ] ; then - echo ${UNAME_MACHINE}-sco-sysv${UNAME_RELEASE}uw${UNAME_VERSION} - else - echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE} - fi + i*86:*:5:[78]*) + case `/bin/uname -X | grep "^Machine"` in + *486*) UNAME_MACHINE=i486 ;; + *Pentium) UNAME_MACHINE=i586 ;; + *Pent*|*Celeron) UNAME_MACHINE=i686 ;; + esac + echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit 0 ;; - i?86:*:3.2:*) + i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name` echo ${UNAME_MACHINE}-pc-isc$UNAME_REL @@ -990,7 +924,7 @@ EOF echo ${UNAME_MACHINE}-pc-sysv32 fi exit 0 ;; - i?86:*DOS:*:*) + i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit 0 ;; pc:*:*:*) @@ -1018,7 +952,7 @@ EOF exit 0 ;; M68*:*:R3V[567]*:*) test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; - 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0) + 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` @@ -1029,13 +963,13 @@ EOF 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && echo i486-ncr-sysv4 && exit 0 ;; - m68*:LynxOS:2.*:*) + m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit 0 ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit 0 ;; - i?86:LynxOS:2.*:* | i?86:LynxOS:3.[01]*:*) + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit 0 ;; TSUNAMI:LynxOS:2.*:*) @@ -1044,7 +978,7 @@ EOF rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit 0 ;; - PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:*) + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit 0 ;; SM[BE]S:UNIX_SV:*:*) @@ -1064,8 +998,8 @@ EOF echo ns32k-sni-sysv fi exit 0 ;; - PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort - # says <Richard.M.Bartel@ccMail.Census.GOV> + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says <Richard.M.Bartel@ccMail.Census.GOV> echo i586-unisys-sysv4 exit 0 ;; *:UNIX_System_V:4*:FTX*) @@ -1077,6 +1011,10 @@ EOF # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit 0 ;; + *:VOS:*:*) + # From Paul.Green@stratus.com. + echo hppa1.1-stratus-vos + exit 0 ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit 0 ;; @@ -1123,7 +1061,7 @@ EOF *:QNX:*:4*) echo i386-pc-qnx exit 0 ;; - NSR-[KW]:NONSTOP_KERNEL:*:*) + NSR-[GKLNPTVW]:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit 0 ;; *:NonStop-UX:*:*) @@ -1146,7 +1084,7 @@ EOF fi echo ${UNAME_MACHINE}-unknown-plan9 exit 0 ;; - i?86:OS/2:*:*) + i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx @@ -1169,11 +1107,18 @@ EOF *:ITS:*:*) echo pdp10-unknown-its exit 0 ;; + i*86:XTS-300:*:STOP) + echo ${UNAME_MACHINE}-unknown-stop + exit 0 ;; + i*86:atheos:*:*) + echo ${UNAME_MACHINE}-unknown-atheos + exit 0 ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 +eval $set_cc_for_build cat >$dummy.c <<EOF #ifdef _SEQUENT_ # include <sys/types.h> diff --git a/config.hin b/config.hin index d3422818..f65156a1 100644 --- a/config.hin +++ b/config.hin @@ -82,6 +82,8 @@ #undef HAVE_JCURSES_H #undef HAVE_KEYPAD #undef HAVE_LC_MESSAGES /* locale messages */ +#undef HAVE_LIBDBMALLOC /* --with-dbmalloc */ +#undef HAVE_LIBDMALLOC /* --with-dmalloc */ #undef HAVE_LIBINTL_H /* AM_GNU_GETTEXT, or cleanup from that */ #undef HAVE_LIMITS_H #undef HAVE_LOCALE_H @@ -94,10 +96,10 @@ #undef HAVE_MMAP /* AM_GNU_GETTEXT */ #undef HAVE_MUNMAP /* AM_GNU_GETTEXT */ #undef HAVE_NAPMS +#undef HAVE_NCURSESW_NCURSES_H /* defined if we include <ncursesw/ncurses.h> */ #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 /* AM_GNU_GETTEXT */ diff --git a/config.sub b/config.sub index 9df4e53f..59148c76 100755 --- a/config.sub +++ b/config.sub @@ -3,7 +3,7 @@ # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 # Free Software Foundation, Inc. -timestamp='2001-03-09' +timestamp='2001-12-10' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software @@ -29,7 +29,8 @@ timestamp='2001-03-09' # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. -# Please send patches to <config-patches@gnu.org>. +# Please send patches to <config-patches@gnu.org>. Submit a context +# diff and a properly formatted ChangeLog entry. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. @@ -117,7 +118,7 @@ esac # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in - nto-qnx* | linux-gnu* | storm-chaos* | os2-emx*) + nto-qnx* | linux-gnu* | storm-chaos* | os2-emx* | windows32-*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; @@ -157,6 +158,14 @@ case $os in os=-vxworks basic_machine=$1 ;; + -chorusos*) + os=-chorusos + basic_machine=$1 + ;; + -chorusrdb) + os=-chorusrdb + basic_machine=$1 + ;; -hiux*) os=-hiuxwe2 ;; @@ -215,24 +224,35 @@ esac case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. - tahoe | i860 | ia64 | m32r | m68k | m68000 | m88k | ns32k | arc \ - | arm | arme[lb] | arm[bl]e | armv[2345] | armv[345][lb] | strongarm | xscale \ - | pyramid | mn10200 | mn10300 | tron | a29k \ - | 580 | i960 | h8300 \ - | x86 | ppcbe | mipsbe | mipsle | shbe | shle \ - | hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \ - | hppa64 \ - | alpha | alphaev[4-8] | alphaev56 | alphapca5[67] \ - | alphaev6[78] \ - | we32k | ns16k | clipper | i370 | sh | sh[34] \ - | powerpc | powerpcle \ - | 1750a | dsp16xx | pdp10 | pdp11 \ - | mips16 | mips64 | mipsel | mips64el \ - | mips64orion | mips64orionel | mipstx39 | mipstx39el \ - | mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \ - | mips64vr5000 | miprs64vr5000el | mcore | s390 | s390x \ - | sparc | sparclet | sparclite | sparc64 | sparcv9 | v850 | c4x \ - | thumb | d10v | d30v | fr30 | avr | openrisc) + 1750a | 580 \ + | a29k \ + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ + | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ + | c4x | clipper \ + | d10v | d30v | dsp16xx \ + | fr30 \ + | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | i370 | i860 | i960 | ia64 \ + | m32r | m68000 | m68k | m88k | mcore \ + | mips16 | mips64 | mips64el | mips64orion | mips64orionel \ + | mips64vr4100 | mips64vr4100el | mips64vr4300 \ + | mips64vr4300el | mips64vr5000 | mips64vr5000el \ + | mipsbe | mipseb | mipsel | mipsle | mipstx39 | mipstx39el \ + | mipsisa32 \ + | mn10200 | mn10300 \ + | ns16k | ns32k \ + | openrisc \ + | pdp10 | pdp11 | pj | pjl \ + | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ + | pyramid \ + | sh | sh[34] | sh[34]eb | shbe | shle \ + | sparc | sparc64 | sparclet | sparclite | sparcv9 | sparcv9b \ + | strongarm \ + | tahoe | thumb | tic80 | tron \ + | v850 | v850e \ + | we32k \ + | x86 | xscale | xstormy16 | xtensa \ + | z8k) basic_machine=$basic_machine-unknown ;; m6811 | m68hc11 | m6812 | m68hc12) @@ -240,13 +260,13 @@ case $basic_machine in basic_machine=$basic_machine-unknown os=-none ;; - m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | z8k | v70 | h8500 | w65 | pj | pjl) + m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. - i[234567]86 | x86_64) + i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. @@ -255,30 +275,44 @@ case $basic_machine in exit 1 ;; # Recognize the basic CPU types with company name. - # FIXME: clean up the formatting here. - vax-* | tahoe-* | i[234567]86-* | i860-* | ia64-* | m32r-* | m68k-* | m68000-* \ - | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | c[123]* \ - | arm-* | armbe-* | armle-* | armv*-* | strongarm-* | xscale-* \ - | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \ - | power-* | none-* | 580-* | cray2-* | h8300-* | h8500-* | i960-* \ - | xmp-* | ymp-* \ - | x86-* | ppcbe-* | mipsbe-* | mipsle-* | shbe-* | shle-* \ - | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* \ - | hppa2.0n-* | hppa64-* \ - | alpha-* | alphaev[4-8]-* | alphaev56-* | alphapca5[67]-* \ - | alphaev6[78]-* \ - | we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \ - | clipper-* | orion-* \ - | sparclite-* | pdp10-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \ - | sparc64-* | sparcv9-* | sparc86x-* | mips16-* | mips64-* | mipsel-* \ - | mips64el-* | mips64orion-* | mips64orionel-* \ - | mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \ - | mipstx39-* | mipstx39el-* | mcore-* \ - | f30[01]-* | f700-* | s390-* | s390x-* | sv1-* | t3e-* \ - | [cjt]90-* \ - | m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \ - | thumb-* | v850-* | d30v-* | tic30-* | c30-* | fr30-* \ - | bs2000-* | tic54x-* | c54x-* | x86_64-*) + 580-* \ + | a29k-* \ + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ + | alphapca5[67]-* | arc-* \ + | arm-* | armbe-* | armle-* | armv*-* \ + | avr-* \ + | bs2000-* \ + | c[123]* | c30-* | [cjt]90-* | c54x-* \ + | clipper-* | cray2-* | cydra-* \ + | d10v-* | d30v-* \ + | elxsi-* \ + | f30[01]-* | f700-* | fr30-* | fx80-* \ + | h8300-* | h8500-* \ + | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ + | i*86-* | i860-* | i960-* | ia64-* \ + | m32r-* \ + | m68000-* | m680[01234]0-* | m68360-* | m683?2-* | m68k-* \ + | m88110-* | m88k-* | mcore-* \ + | mips-* | mips16-* | mips64-* | mips64el-* | mips64orion-* \ + | mips64orionel-* | mips64vr4100-* | mips64vr4100el-* \ + | mips64vr4300-* | mips64vr4300el-* | mipsbe-* | mipseb-* \ + | mipsle-* | mipsel-* | mipstx39-* | mipstx39el-* \ + | none-* | np1-* | ns16k-* | ns32k-* \ + | orion-* \ + | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ + | pyramid-* \ + | romp-* | rs6000-* \ + | sh-* | sh[34]-* | sh[34]eb-* | shbe-* | shle-* \ + | sparc-* | sparc64-* | sparc86x-* | sparclite-* \ + | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* \ + | t3e-* | tahoe-* | thumb-* | tic30-* | tic54x-* | tic80-* | tron-* \ + | v850-* | v850e-* | vax-* \ + | we32k-* \ + | x86-* | x86_64-* | xmp-* | xps100-* | xscale-* | xstormy16-* \ + | xtensa-* \ + | ymp-* \ + | z8k-*) ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. @@ -385,6 +419,14 @@ case $basic_machine in decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; + decsystem10* | dec10*) + basic_machine=pdp10-dec + os=-tops10 + ;; + decsystem20* | dec20*) + basic_machine=pdp10-dec + os=-tops20 + ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola @@ -505,19 +547,19 @@ case $basic_machine in basic_machine=i370-ibm ;; # I'm not sure what "Sysv32" means. Should this be sysv3.2? - i[34567]86v32) + i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; - i[34567]86v4*) + i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; - i[34567]86v) + i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; - i[34567]86sol2) + i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; @@ -691,7 +733,7 @@ case $basic_machine in pc532 | pc532-*) basic_machine=ns32k-pc532 ;; - pentium | p5 | k5 | k6 | nexgen) + pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon) @@ -700,7 +742,7 @@ case $basic_machine in pentiumii | pentium2) basic_machine=i686-pc ;; - pentium-* | p5-* | k5-* | k6-* | nexgen-*) + pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) @@ -724,6 +766,16 @@ case $basic_machine in ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; + ppc64) basic_machine=powerpc64-unknown + ;; + ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppc64le | powerpc64little | ppc64-le | powerpc64-little) + basic_machine=powerpc64le-unknown + ;; + ppc64le-* | powerpc64little-*) + basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; ps2) basic_machine=i386-ibm ;; @@ -741,6 +793,12 @@ case $basic_machine in rtpc | rtpc-*) basic_machine=romp-ibm ;; + s390 | s390-*) + basic_machine=s390-ibm + ;; + s390x | s390x-*) + basic_machine=s390x-ibm + ;; sa29200) basic_machine=a29k-amd os=-udi @@ -752,7 +810,7 @@ case $basic_machine in basic_machine=sh-hitachi os=-hms ;; - sparclite-wrs) + sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; @@ -832,6 +890,10 @@ case $basic_machine in tx39el) basic_machine=mipstx39el-unknown ;; + toad1) + basic_machine=pdp10-xkl + os=-tops20 + ;; tower | tower-32) basic_machine=m68k-ncr ;; @@ -878,6 +940,10 @@ case $basic_machine in basic_machine=hppa1.1-winbond os=-proelf ;; + windows32) + basic_machine=i386-pc + os=-windows32-msvcrt + ;; xmp) basic_machine=xmp-cray os=-unicos @@ -931,10 +997,10 @@ case $basic_machine in we32k) basic_machine=we32k-att ;; - sh3 | sh4) + sh3 | sh4 | sh3eb | sh4eb) basic_machine=sh-unknown ;; - sparc | sparcv9) + sparc | sparcv9 | sparcv9b) basic_machine=sparc-sun ;; cydra) @@ -956,6 +1022,9 @@ case $basic_machine in basic_machine=c4x-none os=-coff ;; + *-unknown) + # Make sure to match an already-canonicalized machine name. + ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 @@ -1012,16 +1081,18 @@ case $os in | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ + | -chorusos* | -chorusrdb* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ - | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* | -os2*) + | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ + | -os2* | -vos* | -palmos* | -uclinux* | -nucleus*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in - x86-* | i[34567]86-*) + x86-* | i*86-*) ;; *) os=-nto$os @@ -1068,6 +1139,9 @@ case $os in -acis*) os=-aos ;; + -atheos*) + os=-atheos + ;; -386bsd) os=-bsd ;; @@ -1148,6 +1222,7 @@ case $basic_machine in arm*-semi) os=-aout ;; + # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; @@ -1340,6 +1415,9 @@ case $basic_machine in -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; + -vos*) + vendor=stratus + ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; diff --git a/configure b/configure index 1483c8e7..04097dbc 100755 --- a/configure +++ b/configure @@ -191,14 +191,16 @@ Development Options: --disable-trace disable logic for trace code --enable-vertrace verbose trace code --enable-warnings GCC compiler warnings + --with-dbmalloc test: use Conor Cahill's dbmalloc library + --with-dmalloc test: use Gray Watson's dmalloc library Basic Configuration Options: --enable-nls use Native Language Support --with-included-gettext use the GNU gettext library included here --with-catgets use catgets functions if available - --enable-included-msgs use included messages, for i18n support - --with-nls-datadir=DIR NLS data, parent of locale (default: PREFIX/DATADIR) EOF cat <<EOF + --enable-included-msgs use included messages, for i18n support + --with-nls-datadir=DIR NLS data, parent of locale (default: PREFIX/DATADIR) --disable-full-paths control whether full utility pathnames are used --with-ssl[=path] link with ssl library if available --with-socks[=path] link with socks library if available @@ -210,10 +212,10 @@ Experimental Options: --disable-bibp-urls disable support for bibp: URLs --disable-config-info disable browsable configuration-info --disable-forms-options disable experimental forms-based options - --disable-menu-options disable old-style option menu - --enable-addrlist-page use experimental address-list page EOF cat <<EOF + --disable-menu-options disable old-style option menu + --enable-addrlist-page use experimental address-list page --enable-charset-choice use experimental charset-selection logic --enable-cjk use experimental CJK logic --enable-color-style use optional/experimental color style (ncurses/curses) @@ -224,10 +226,10 @@ cat <<EOF --enable-justify-elts use experimental element-justification logic --enable-kbd-layout use experimental keyboard-layout support --enable-libjs use experimental JavaScript support (Mozilla libjs) - --enable-nested-tables use experimental nested-table support - --enable-prettysrc colorize HTML source EOF cat <<EOF + --enable-nested-tables use experimental nested-table support + --enable-prettysrc colorize HTML source --enable-read-eta experimental read-progress message shows ETA --enable-scrollbar use experimental scrollbar, with mouse --enable-source-cache cache HTML source for parse mode changes @@ -238,10 +240,10 @@ Miscellaneous Options: --enable-externs use external commands --enable-font-switch use Linux setfont for character-translation --enable-cgi-links support cgi links w/o a http daemon - --enable-change-exec allow users to change exec options - --enable-exec-links allow lynx to execute programs accessed via a link EOF cat <<EOF + --enable-change-exec allow users to change exec options + --enable-exec-links allow lynx to execute programs accessed via a link --enable-exec-scripts allow lynx to execute programs inferred from a link --enable-internal-links handle following links to same doc differently --enable-nsl-fork fork NSL requests, allowing them to be aborted @@ -252,10 +254,10 @@ cat <<EOF --with-zlib use zlib for decompression of some gzip files --disable-finger disable FINGER logic --disable-gopher disable GOPHER logic - --disable-news disable NEWS logic - --disable-ftp disable FTP logic EOF cat <<EOF + --disable-news disable NEWS logic + --disable-ftp disable FTP logic Directory Editor Options: --disable-dired disable optional directory-editor, DirEd --disable-dired-archive disable dearchiving commands @@ -266,11 +268,11 @@ Directory Editor Options: --disable-dired-uudecode disable "uudecode" command --disable-dired-zip disable "zip", "unzip" commands --disable-dired-gzip disable "gzip", "gunzip" commands +EOF +cat <<EOF --disable-long-list disable long "ls -l" directory listings --disable-parent-dir-refs disable "Up-to" links in directory listings -EOF -cat <<EOF Special Libraries for PDCurses X11: --with-x use the X Window System --with-Xaw3d link with Xaw 3d library @@ -613,9 +615,16 @@ else fi + +# autoconf 2.5x defaults to no cache file; we need the cache file's information +# for building the config page. But start with it empty to avoid confusion by +# people who don't do a "make distclean" after applying patches. +cache_file=config.cache rm -f config.cache; touch config.cache + CONFIG_H=lynx_cfg.h + ac_aux_dir= for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do if test -f $ac_dir/install-sh; then @@ -644,7 +653,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } fi echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:648: checking host system type" >&5 +echo "configure:657: checking host system type" >&5 host_alias=$host case "$host_alias" in @@ -683,7 +692,7 @@ fi test -z "$system_name" && system_name="$cf_cv_system_name" -test -n "$cf_cv_system_name" && echo "$ac_t"""Configuring for $cf_cv_system_name"" 1>&6 +test -n "$cf_cv_system_name" && echo "$ac_t""Configuring for $cf_cv_system_name" 1>&6 if test ".$system_name" != ".$cf_cv_system_name" ; then echo "$ac_t""Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" 1>&6 @@ -714,7 +723,7 @@ esac # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:718: checking for $ac_word" >&5 +echo "configure:727: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -744,7 +753,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:748: checking for $ac_word" >&5 +echo "configure:757: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -795,7 +804,7 @@ fi # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:799: checking for $ac_word" >&5 +echo "configure:808: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -827,7 +836,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:831: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:840: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -838,12 +847,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 842 "configure" +#line 851 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:847: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:856: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -869,12 +878,12 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:873: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:882: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:878: checking whether we are using GNU C" >&5 +echo "configure:887: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -883,7 +892,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:887: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:896: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -902,7 +911,7 @@ ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:906: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:915: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -934,7 +943,7 @@ else fi echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:938: checking how to run the C preprocessor" >&5 +echo "configure:947: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -949,13 +958,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext <<EOF -#line 953 "configure" +#line 962 "configure" #include "confdefs.h" #include <assert.h> Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:959: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:968: \"$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 : @@ -966,13 +975,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext <<EOF -#line 970 "configure" +#line 979 "configure" #include "confdefs.h" #include <assert.h> Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:976: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:985: \"$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 : @@ -983,13 +992,13 @@ else rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext <<EOF -#line 987 "configure" +#line 996 "configure" #include "confdefs.h" #include <assert.h> Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:993: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1002: \"$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 : @@ -1014,7 +1023,7 @@ fi echo "$ac_t""$CPP" 1>&6 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:1018: checking whether ln -s works" >&5 +echo "configure:1027: checking whether ln -s works" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1037,7 +1046,7 @@ fi # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1041: checking for $ac_word" >&5 +echo "configure:1050: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1065,7 +1074,7 @@ else fi echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:1069: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:1078: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1103,7 +1112,7 @@ fi # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:1107: checking for a BSD compatible install" >&5 +echo "configure:1116: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1160,7 +1169,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1164: checking for $ac_word" >&5 +echo "configure:1173: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LINT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1191,9 +1200,9 @@ done echo $ac_n "checking for AIX""... $ac_c" 1>&6 -echo "configure:1195: checking for AIX" >&5 +echo "configure:1204: checking for AIX" >&5 cat > conftest.$ac_ext <<EOF -#line 1197 "configure" +#line 1206 "configure" #include "confdefs.h" #ifdef _AIX yes @@ -1215,7 +1224,7 @@ rm -f conftest* echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6 -echo "configure:1219: checking for POSIXized ISC" >&5 +echo "configure:1228: checking for POSIXized ISC" >&5 if test -d /etc/conf/kconfig.d && grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 then @@ -1241,7 +1250,7 @@ fi echo $ac_n "checking if you want to see long compiling messages""... $ac_c" 1>&6 -echo "configure:1245: checking if you want to see long compiling messages" >&5 +echo "configure:1254: checking if you want to see long compiling messages" >&5 # Check whether --enable-echo or --disable-echo was given. if test "${enable_echo+set}" = set; then @@ -1289,7 +1298,7 @@ fi echo $ac_n "checking if you want to check memory-leaks""... $ac_c" 1>&6 -echo "configure:1293: checking if you want to check memory-leaks" >&5 +echo "configure:1302: checking if you want to check memory-leaks" >&5 # Check whether --enable-find-leaks or --disable-find-leaks was given. if test "${enable_find_leaks+set}" = set; then @@ -1313,7 +1322,7 @@ EOF echo $ac_n "checking if you want to enable debug-code""... $ac_c" 1>&6 -echo "configure:1317: checking if you want to enable debug-code" >&5 +echo "configure:1326: checking if you want to enable debug-code" >&5 # Check whether --enable-debug or --disable-debug was given. if test "${enable_debug+set}" = set; then @@ -1355,7 +1364,7 @@ else fi echo $ac_n "checking if you want to enable lynx trace code *recommended* ""... $ac_c" 1>&6 -echo "configure:1359: checking if you want to enable lynx trace code *recommended* " >&5 +echo "configure:1368: checking if you want to enable lynx trace code *recommended* " >&5 # Check whether --enable-trace or --disable-trace was given. if test "${enable_trace+set}" = set; then @@ -1379,7 +1388,7 @@ EOF echo $ac_n "checking if you want verbose trace code""... $ac_c" 1>&6 -echo "configure:1383: checking if you want verbose trace code" >&5 +echo "configure:1392: checking if you want verbose trace code" >&5 # Check whether --enable-vertrace or --disable-vertrace was given. if test "${enable_vertrace+set}" = set; then @@ -1405,7 +1414,7 @@ EOF if test -n "$GCC" then echo $ac_n "checking if you want to turn on gcc warnings""... $ac_c" 1>&6 -echo "configure:1409: checking if you want to turn on gcc warnings" >&5 +echo "configure:1418: checking if you want to turn on gcc warnings" >&5 # Check whether --enable-warnings or --disable-warnings was given. if test "${enable_warnings+set}" = set; then @@ -1445,9 +1454,9 @@ EOF if test "$GCC" = yes then echo "checking for $CC __attribute__ directives" 1>&6 -echo "configure:1449: checking for $CC __attribute__ directives" >&5 +echo "configure:1458: checking for $CC __attribute__ directives" >&5 cat > conftest.$ac_ext <<EOF -#line 1451 "configure" +#line 1460 "configure" #include "confdefs.h" #include "conftest.h" #include "conftest.i" @@ -1485,7 +1494,7 @@ EOF EOF ;; esac - if { (eval echo configure:1489: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + if { (eval echo configure:1498: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then test -n "$verbose" && echo "$ac_t""... $cf_attribute" 1>&6 cat conftest.h >>confdefs.h # else @@ -1502,11 +1511,11 @@ fi if test "$GCC" = yes then cat > conftest.$ac_ext <<EOF -#line 1506 "configure" +#line 1515 "configure" int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; } EOF echo "checking for $CC warning options" 1>&6 -echo "configure:1510: checking for $CC warning options" >&5 +echo "configure:1519: checking for $CC warning options" >&5 cf_save_CFLAGS="$CFLAGS" EXTRA_CFLAGS="-W -Wall" cf_warn_CONST="" @@ -1524,7 +1533,7 @@ echo "configure:1510: checking for $CC warning options" >&5 Wstrict-prototypes $cf_warn_CONST do CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt" - if { (eval echo configure:1528: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + if { (eval echo configure:1537: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then test -n "$verbose" && echo "$ac_t""... -$cf_opt" 1>&6 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt" test "$cf_opt" = Wcast-qual && EXTRA_CFLAGS="$EXTRA_CFLAGS -DXTSTRINGDEFINES" @@ -1538,6 +1547,130 @@ fi fi fi +echo $ac_n "checking if you want to link with dbmalloc for testing""... $ac_c" 1>&6 +echo "configure:1552: checking if you want to link with dbmalloc for testing" >&5 + +# Check whether --with-dbmalloc or --without-dbmalloc was given. +if test "${with_dbmalloc+set}" = set; then + withval="$with_dbmalloc" + with_dbmalloc=$withval +else + with_dbmalloc=no +fi + +echo "$ac_t""$with_dbmalloc" 1>&6 +if test $with_dbmalloc = yes ; then + echo $ac_n "checking for debug_malloc in -ldbmalloc""... $ac_c" 1>&6 +echo "configure:1565: checking for debug_malloc in -ldbmalloc" >&5 +ac_lib_var=`echo dbmalloc'_'debug_malloc | 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="-ldbmalloc $LIBS" +cat > conftest.$ac_ext <<EOF +#line 1573 "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 debug_malloc(); + +int main() { +debug_malloc() +; return 0; } +EOF +if { (eval echo configure:1584: \"$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 + ac_tr_lib=HAVE_LIB`echo dbmalloc | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.h <<EOF +#define $ac_tr_lib 1 +EOF + + LIBS="-ldbmalloc $LIBS" + +else + echo "$ac_t""no" 1>&6 +fi + +fi + +echo $ac_n "checking if you want to link with dmalloc for testing""... $ac_c" 1>&6 +echo "configure:1614: checking if you want to link with dmalloc for testing" >&5 + +# Check whether --with-dmalloc or --without-dmalloc was given. +if test "${with_dmalloc+set}" = set; then + withval="$with_dmalloc" + with_dmalloc=$withval +else + with_dmalloc=no +fi + +echo "$ac_t""$with_dmalloc" 1>&6 +if test $with_dmalloc = yes ; then + echo $ac_n "checking for dmalloc_debug in -ldmalloc""... $ac_c" 1>&6 +echo "configure:1627: checking for dmalloc_debug in -ldmalloc" >&5 +ac_lib_var=`echo dmalloc'_'dmalloc_debug | 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="-ldmalloc $LIBS" +cat > conftest.$ac_ext <<EOF +#line 1635 "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 dmalloc_debug(); + +int main() { +dmalloc_debug() +; return 0; } +EOF +if { (eval echo configure:1646: \"$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 + ac_tr_lib=HAVE_LIB`echo dmalloc | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.h <<EOF +#define $ac_tr_lib 1 +EOF + + LIBS="-ldmalloc $LIBS" + +else + echo "$ac_t""no" 1>&6 +fi + +fi + cat >> confdefs.h <<\EOF #define UNIX 1 @@ -1545,12 +1678,12 @@ EOF echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:1549: checking for working const" >&5 +echo "configure:1682: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1554 "configure" +#line 1687 "configure" #include "confdefs.h" int main() { @@ -1599,7 +1732,7 @@ ccp = (char const *const *) p; ; return 0; } EOF -if { (eval echo configure:1603: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1736: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -1641,7 +1774,7 @@ clix*) # contributed by Alex Matulich (matuli_a@marlin.navsea.navy.mil) also # references -lmalloc and -lbsd. echo $ac_n "checking for strcmp in -lc_s""... $ac_c" 1>&6 -echo "configure:1645: checking for strcmp in -lc_s" >&5 +echo "configure:1778: checking for strcmp in -lc_s" >&5 ac_lib_var=`echo c_s'_'strcmp | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1649,7 +1782,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lc_s $LIBS" cat > conftest.$ac_ext <<EOF -#line 1653 "configure" +#line 1786 "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 @@ -1660,7 +1793,7 @@ int main() { strcmp() ; return 0; } EOF -if { (eval echo configure:1664: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1797: \"$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 @@ -1758,7 +1891,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1762: checking for $ac_word" >&5 +echo "configure:1895: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1803,17 +1936,17 @@ sony-newsos*) do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1807: checking for $ac_hdr" >&5 +echo "configure:1940: 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 1812 "configure" +#line 1945 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1817: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1950: \"$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* @@ -1857,17 +1990,17 @@ ultrix*) do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1861: checking for $ac_hdr" >&5 +echo "configure:1994: 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 1866 "configure" +#line 1999 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1871: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2004: \"$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* @@ -1904,7 +2037,7 @@ esac if test -z "$GCC" ; then echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6 -echo "configure:1908: checking for ${CC-cc} option to accept ANSI C" >&5 +echo "configure:2041: checking for ${CC-cc} option to accept ANSI C" >&5 if eval "test \"`echo '$''{'cf_cv_ansi_cc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1928,26 +2061,39 @@ for cf_arg in "-DCC_HAS_PROTOS" \ -Xc do +cf_new_cflags= +cf_new_cppflags= for cf_add_cflags in $cf_arg do case $cf_add_cflags in #(vi -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi case "$CPPFLAGS" in - *$cf_add_cflags) + *$cf_add_cflags) #(vi ;; - *) - CPPFLAGS="$CPPFLAGS $cf_add_cflags" + *) #(vi + cf_new_cppflags="$cf_new_cppflags $cf_add_cflags" ;; esac ;; *) - CFLAGS="$CFLAGS $cf_add_cflags" + cf_new_cflags="$cf_new_cflags $cf_add_cflags" ;; esac done +if test -n "$cf_new_cflags" ; then + + CFLAGS="$CFLAGS $cf_new_cflags" +fi + +if test -n "$cf_new_cppflags" ; then + + CPPFLAGS="$CPPFLAGS $cf_new_cppflags" +fi + + cat > conftest.$ac_ext <<EOF -#line 1951 "configure" +#line 2097 "configure" #include "confdefs.h" #ifndef CC_HAS_PROTOS @@ -1963,7 +2109,7 @@ int main() { struct s2 {int (*f) (double a);}; ; return 0; } EOF -if { (eval echo configure:1967: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2113: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_ansi_cc="$cf_arg"; break else @@ -1982,24 +2128,37 @@ echo "$ac_t""$cf_cv_ansi_cc" 1>&6 if test "$cf_cv_ansi_cc" != "no"; then if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then +cf_new_cflags= +cf_new_cppflags= for cf_add_cflags in $cf_cv_ansi_cc do case $cf_add_cflags in #(vi -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi case "$CPPFLAGS" in - *$cf_add_cflags) + *$cf_add_cflags) #(vi ;; - *) - CPPFLAGS="$CPPFLAGS $cf_add_cflags" + *) #(vi + cf_new_cppflags="$cf_new_cppflags $cf_add_cflags" ;; esac ;; *) - CFLAGS="$CFLAGS $cf_add_cflags" + cf_new_cflags="$cf_new_cflags $cf_add_cflags" ;; esac done +if test -n "$cf_new_cflags" ; then + + CFLAGS="$CFLAGS $cf_new_cflags" +fi + +if test -n "$cf_new_cppflags" ; then + + CPPFLAGS="$CPPFLAGS $cf_new_cppflags" +fi + + else cat >> confdefs.h <<\EOF #define CC_HAS_PROTOS 1 @@ -2014,12 +2173,12 @@ fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:2018: checking for ANSI C header files" >&5 +echo "configure:2177: 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 2023 "configure" +#line 2182 "configure" #include "confdefs.h" #include <stdlib.h> #include <stdarg.h> @@ -2027,7 +2186,7 @@ else #include <float.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2031: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2190: \"$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* @@ -2044,7 +2203,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 2048 "configure" +#line 2207 "configure" #include "confdefs.h" #include <string.h> EOF @@ -2062,7 +2221,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 2066 "configure" +#line 2225 "configure" #include "confdefs.h" #include <stdlib.h> EOF @@ -2083,7 +2242,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext <<EOF -#line 2087 "configure" +#line 2246 "configure" #include "confdefs.h" #include <ctype.h> #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -2094,7 +2253,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:2098: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2257: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -2118,21 +2277,21 @@ EOF fi echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:2122: checking for inline" >&5 +echo "configure:2281: checking for inline" >&5 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat > conftest.$ac_ext <<EOF -#line 2129 "configure" +#line 2288 "configure" #include "confdefs.h" int main() { } $ac_kw foo() { ; return 0; } EOF -if { (eval echo configure:2136: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2295: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -2158,12 +2317,12 @@ EOF esac echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:2162: checking for off_t" >&5 +echo "configure:2321: checking for off_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2167 "configure" +#line 2326 "configure" #include "confdefs.h" #include <sys/types.h> #if STDC_HEADERS @@ -2191,12 +2350,12 @@ EOF fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:2195: checking for size_t" >&5 +echo "configure:2354: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2200 "configure" +#line 2359 "configure" #include "confdefs.h" #include <sys/types.h> #if STDC_HEADERS @@ -2226,19 +2385,19 @@ fi # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 -echo "configure:2230: checking for working alloca.h" >&5 +echo "configure:2389: checking for working alloca.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2235 "configure" +#line 2394 "configure" #include "confdefs.h" #include <alloca.h> int main() { char *p = alloca(2 * sizeof(int)); ; return 0; } EOF -if { (eval echo configure:2242: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2401: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_header_alloca_h=yes else @@ -2259,12 +2418,12 @@ EOF fi echo $ac_n "checking for alloca""... $ac_c" 1>&6 -echo "configure:2263: checking for alloca" >&5 +echo "configure:2422: checking for alloca" >&5 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2268 "configure" +#line 2427 "configure" #include "confdefs.h" #ifdef __GNUC__ @@ -2292,7 +2451,7 @@ int main() { char *p = (char *) alloca(1); ; return 0; } EOF -if { (eval echo configure:2296: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2455: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_alloca_works=yes else @@ -2324,12 +2483,12 @@ EOF echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 -echo "configure:2328: checking whether alloca needs Cray hooks" >&5 +echo "configure:2487: checking whether alloca needs Cray hooks" >&5 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2333 "configure" +#line 2492 "configure" #include "confdefs.h" #if defined(CRAY) && ! defined(CRAY2) webecray @@ -2354,12 +2513,12 @@ echo "$ac_t""$ac_cv_os_cray" 1>&6 if test $ac_cv_os_cray = yes; then for ac_func in _getb67 GETB67 getb67; do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2358: checking for $ac_func" >&5 +echo "configure:2517: 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 2363 "configure" +#line 2522 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -2382,7 +2541,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:2386: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2545: \"$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 @@ -2409,7 +2568,7 @@ done fi echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 -echo "configure:2413: checking stack direction for C alloca" >&5 +echo "configure:2572: checking stack direction for C alloca" >&5 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2417,7 +2576,7 @@ else ac_cv_c_stack_direction=0 else cat > conftest.$ac_ext <<EOF -#line 2421 "configure" +#line 2580 "configure" #include "confdefs.h" find_stack_direction () { @@ -2436,7 +2595,7 @@ main () exit (find_stack_direction() < 0); } EOF -if { (eval echo configure:2440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2599: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_stack_direction=1 else @@ -2461,17 +2620,17 @@ for ac_hdr in unistd.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2465: checking for $ac_hdr" >&5 +echo "configure:2624: 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 2470 "configure" +#line 2629 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2475: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2634: \"$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* @@ -2500,12 +2659,12 @@ done for ac_func in getpagesize do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2504: checking for $ac_func" >&5 +echo "configure:2663: 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 2509 "configure" +#line 2668 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -2528,7 +2687,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:2532: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2691: \"$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 @@ -2553,7 +2712,7 @@ fi done echo $ac_n "checking for working mmap""... $ac_c" 1>&6 -echo "configure:2557: checking for working mmap" >&5 +echo "configure:2716: checking for working mmap" >&5 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2561,7 +2720,7 @@ else ac_cv_func_mmap_fixed_mapped=no else cat > conftest.$ac_ext <<EOF -#line 2565 "configure" +#line 2724 "configure" #include "confdefs.h" /* Thanks to Mike Haertel and Jim Avera for this test. @@ -2701,7 +2860,7 @@ main() } EOF -if { (eval echo configure:2705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_mmap_fixed_mapped=yes else @@ -2742,17 +2901,17 @@ unistd.h sys/param.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2746: checking for $ac_hdr" >&5 +echo "configure:2905: 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 2751 "configure" +#line 2910 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2756: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2915: \"$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* @@ -2782,12 +2941,12 @@ done strdup __argz_count __argz_stringify __argz_next do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2786: checking for $ac_func" >&5 +echo "configure:2945: 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 2791 "configure" +#line 2950 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -2810,7 +2969,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:2814: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2973: \"$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 @@ -2839,12 +2998,12 @@ done for ac_func in stpcpy do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2843: checking for $ac_func" >&5 +echo "configure:3002: 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 2848 "configure" +#line 3007 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -2867,7 +3026,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:2871: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3030: \"$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 @@ -2901,19 +3060,19 @@ EOF if test $ac_cv_header_locale_h = yes; then echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6 -echo "configure:2905: checking for LC_MESSAGES" >&5 +echo "configure:3064: checking for LC_MESSAGES" >&5 if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2910 "configure" +#line 3069 "configure" #include "confdefs.h" #include <locale.h> int main() { return LC_MESSAGES ; return 0; } EOF -if { (eval echo configure:2917: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3076: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* am_cv_val_LC_MESSAGES=yes else @@ -2934,7 +3093,7 @@ EOF fi fi echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6 -echo "configure:2938: checking whether NLS is requested" >&5 +echo "configure:3097: checking whether NLS is requested" >&5 # Check whether --enable-nls or --disable-nls was given. if test "${enable_nls+set}" = set; then @@ -2955,7 +3114,7 @@ fi EOF echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6 -echo "configure:2959: checking whether included gettext is requested" >&5 +echo "configure:3118: checking whether included gettext is requested" >&5 # Check whether --with-included-gettext or --without-included-gettext was given. if test "${with_included_gettext+set}" = set; then @@ -2975,17 +3134,17 @@ fi ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for libintl.h""... $ac_c" 1>&6 -echo "configure:2979: checking for libintl.h" >&5 +echo "configure:3138: checking for libintl.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 2984 "configure" +#line 3143 "configure" #include "confdefs.h" #include <libintl.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2989: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3148: \"$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* @@ -3002,19 +3161,19 @@ fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6 -echo "configure:3006: checking for gettext in libc" >&5 +echo "configure:3165: checking for gettext in libc" >&5 if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3011 "configure" +#line 3170 "configure" #include "confdefs.h" #include <libintl.h> int main() { return (int) gettext ("") ; return 0; } EOF -if { (eval echo configure:3018: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gt_cv_func_gettext_libc=yes else @@ -3030,7 +3189,7 @@ echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6 if test "$gt_cv_func_gettext_libc" != "yes"; then echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6 -echo "configure:3034: checking for bindtextdomain in -lintl" >&5 +echo "configure:3193: checking for bindtextdomain in -lintl" >&5 ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3038,7 +3197,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lintl $LIBS" cat > conftest.$ac_ext <<EOF -#line 3042 "configure" +#line 3201 "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 @@ -3049,7 +3208,7 @@ int main() { bindtextdomain() ; return 0; } EOF -if { (eval echo configure:3053: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3212: \"$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 @@ -3067,19 +3226,19 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then gt_save_LIBS="$LIBS" LIBS="-lintl $gt_save_LIBS" echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6 -echo "configure:3071: checking for gettext in libintl" >&5 +echo "configure:3230: checking for gettext in libintl" >&5 if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3076 "configure" +#line 3235 "configure" #include "confdefs.h" int main() { return (int) gettext ("") ; return 0; } EOF -if { (eval echo configure:3083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3242: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gt_cv_func_gettext_libintl=yes else @@ -3113,7 +3272,7 @@ EOF set dummy msgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3117: checking for $ac_word" >&5 +echo "configure:3276: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3147,12 +3306,12 @@ fi for ac_func in dcgettext do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3151: checking for $ac_func" >&5 +echo "configure:3310: 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 3156 "configure" +#line 3315 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -3175,7 +3334,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:3179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3338: \"$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 @@ -3202,7 +3361,7 @@ done # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3206: checking for $ac_word" >&5 +echo "configure:3365: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3239,7 +3398,7 @@ fi set dummy xgettext; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3243: checking for $ac_word" >&5 +echo "configure:3402: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3271,7 +3430,7 @@ else fi cat > conftest.$ac_ext <<EOF -#line 3275 "configure" +#line 3434 "configure" #include "confdefs.h" int main() { @@ -3279,7 +3438,7 @@ extern int _nl_msg_cat_cntr; return _nl_msg_cat_cntr ; return 0; } EOF -if { (eval echo configure:3283: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3442: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* CATOBJEXT=.gmo DATADIRNAME=share @@ -3302,7 +3461,7 @@ fi if test "$CATOBJEXT" = "NONE"; then echo $ac_n "checking whether catgets can be used""... $ac_c" 1>&6 -echo "configure:3306: checking whether catgets can be used" >&5 +echo "configure:3465: checking whether catgets can be used" >&5 # Check whether --with-catgets or --without-catgets was given. if test "${with_catgets+set}" = set; then @@ -3316,7 +3475,7 @@ fi if test "$nls_cv_use_catgets" = "yes"; then echo $ac_n "checking for main in -li""... $ac_c" 1>&6 -echo "configure:3320: checking for main in -li" >&5 +echo "configure:3479: checking for main in -li" >&5 ac_lib_var=`echo i'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3324,14 +3483,14 @@ else ac_save_LIBS="$LIBS" LIBS="-li $LIBS" cat > conftest.$ac_ext <<EOF -#line 3328 "configure" +#line 3487 "configure" #include "confdefs.h" int main() { main() ; return 0; } EOF -if { (eval echo configure:3335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3494: \"$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 @@ -3359,12 +3518,12 @@ else fi echo $ac_n "checking for catgets""... $ac_c" 1>&6 -echo "configure:3363: checking for catgets" >&5 +echo "configure:3522: checking for catgets" >&5 if eval "test \"`echo '$''{'ac_cv_func_catgets'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3368 "configure" +#line 3527 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char catgets(); below. */ @@ -3387,7 +3546,7 @@ catgets(); ; return 0; } EOF -if { (eval echo configure:3391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3550: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_catgets=yes" else @@ -3409,7 +3568,7 @@ EOF # Extract the first word of "gencat", so it can be a program name with args. set dummy gencat; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3413: checking for $ac_word" >&5 +echo "configure:3572: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GENCAT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3445,7 +3604,7 @@ fi # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3449: checking for $ac_word" >&5 +echo "configure:3608: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3483,7 +3642,7 @@ fi set dummy msgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3487: checking for $ac_word" >&5 +echo "configure:3646: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3519,7 +3678,7 @@ fi set dummy xgettext; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3523: checking for $ac_word" >&5 +echo "configure:3682: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3578,7 +3737,7 @@ fi set dummy msgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3582: checking for $ac_word" >&5 +echo "configure:3741: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3612,7 +3771,7 @@ fi # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3616: checking for $ac_word" >&5 +echo "configure:3775: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3649,7 +3808,7 @@ fi set dummy xgettext; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3653: checking for $ac_word" >&5 +echo "configure:3812: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3749,7 +3908,7 @@ fi LINGUAS= else echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6 -echo "configure:3753: checking for catalogs to be installed" >&5 +echo "configure:3912: checking for catalogs to be installed" >&5 NEW_LINGUAS= for lang in ${LINGUAS=$ALL_LINGUAS}; do case "$ALL_LINGUAS" in @@ -3778,17 +3937,17 @@ echo "configure:3753: checking for catalogs to be installed" >&5 if test "$CATOBJEXT" = ".cat"; then ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6 -echo "configure:3782: checking for linux/version.h" >&5 +echo "configure:3941: checking for linux/version.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 3787 "configure" +#line 3946 "configure" #include "confdefs.h" #include <linux/version.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3792: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3951: \"$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* @@ -3869,7 +4028,7 @@ use_our_messages=no if test "$USE_NLS" = yes ; then if test -d $srcdir/po ; then echo $ac_n "checking if we should use included message-library""... $ac_c" 1>&6 -echo "configure:3873: checking if we should use included message-library" >&5 +echo "configure:4032: checking if we should use included message-library" >&5 # Check whether --enable-included-msgs or --disable-included-msgs was given. if test "${enable_included_msgs+set}" = set; then @@ -3907,17 +4066,17 @@ elif test "$USE_NLS" = yes ; then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3911: checking for $ac_hdr" >&5 +echo "configure:4070: 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 3916 "configure" +#line 4075 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3921: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4080: \"$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* @@ -4029,7 +4188,7 @@ eval NLS_DATADIR="$withval" echo $ac_n "checking if you want full utility pathnames""... $ac_c" 1>&6 -echo "configure:4033: checking if you want full utility pathnames" >&5 +echo "configure:4192: checking if you want full utility pathnames" >&5 # Check whether --enable-full-paths or --disable-full-paths was given. if test "${enable_full_paths+set}" = set; then @@ -4054,7 +4213,7 @@ EOF echo $ac_n "checking for system mailer""... $ac_c" 1>&6 -echo "configure:4058: checking for system mailer" >&5 +echo "configure:4217: checking for system mailer" >&5 if eval "test \"`echo '$''{'cf_cv_SYSTEM_MAIL'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4081,7 +4240,7 @@ EOF echo $ac_n "checking system mail flags""... $ac_c" 1>&6 -echo "configure:4085: checking system mail flags" >&5 +echo "configure:4244: checking system mail flags" >&5 if eval "test \"`echo '$''{'cf_cv_system_mail_flags'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4108,13 +4267,13 @@ fi echo $ac_n "checking if we must define _GNU_SOURCE""... $ac_c" 1>&6 -echo "configure:4112: checking if we must define _GNU_SOURCE" >&5 +echo "configure:4271: checking if we must define _GNU_SOURCE" >&5 if eval "test \"`echo '$''{'cf_cv_gnu_source'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4118 "configure" +#line 4277 "configure" #include "confdefs.h" #include <sys/types.h> int main() { @@ -4124,7 +4283,7 @@ make an error #endif ; return 0; } EOF -if { (eval echo configure:4128: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4287: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_gnu_source=no else @@ -4134,7 +4293,7 @@ else cf_save="$CPPFLAGS" CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE" cat > conftest.$ac_ext <<EOF -#line 4138 "configure" +#line 4297 "configure" #include "confdefs.h" #include <sys/types.h> int main() { @@ -4144,7 +4303,7 @@ make an error #endif ; return 0; } EOF -if { (eval echo configure:4148: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4307: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_gnu_source=no else @@ -4166,59 +4325,78 @@ test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE" if test -n "$TRY_CFLAGS" ; then - cf_save_CFLAGS="$CFLAGS" - cf_save_CPPFLAGS="$CPPFLAGS" +test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6 + +cf_check_cflags="$CFLAGS" +cf_check_cppflags="$CPPFLAGS" + +cf_new_cflags= +cf_new_cppflags= for cf_add_cflags in $TRY_CFLAGS do case $cf_add_cflags in #(vi -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi case "$CPPFLAGS" in - *$cf_add_cflags) + *$cf_add_cflags) #(vi ;; - *) - CPPFLAGS="$CPPFLAGS $cf_add_cflags" + *) #(vi + cf_new_cppflags="$cf_new_cppflags $cf_add_cflags" ;; esac ;; *) - CFLAGS="$CFLAGS $cf_add_cflags" + cf_new_cflags="$cf_new_cflags $cf_add_cflags" ;; esac done - echo $ac_n "checking if we should use compile options $TRY_CFLAGS""... $ac_c" 1>&6 -echo "configure:4192: checking if we should use compile options $TRY_CFLAGS" >&5 - cat > conftest.$ac_ext <<EOF -#line 4194 "configure" +if test -n "$cf_new_cflags" ; then + test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6 + + CFLAGS="$CFLAGS $cf_new_cflags" +fi + +if test -n "$cf_new_cppflags" ; then + test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6 + + CPPFLAGS="$CPPFLAGS $cf_new_cppflags" +fi + + +if test "$cf_check_cflags" != "$CFLAGS" ; then +cat > conftest.$ac_ext <<EOF +#line 4370 "configure" #include "confdefs.h" #include <stdio.h> int main() { -FILE *fp = stdin +printf("Hello world"); ; return 0; } EOF -if { (eval echo configure:4201: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - cf_result=yes +if { (eval echo configure:4377: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + : else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - cf_result=no + test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6 + + if test "$cf_check_cppflags" != "$CPPFLAGS" ; then + test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6 + + fi + CFLAGS="$cf_check_flags" fi rm -f conftest* - echo "$ac_t""$cf_result" 1>&6 - if test "$cf_result" = no ; then - CFLAGS="$cf_save_CFLAGS" - CPPFLAGS="$cf_save_CPPFLAGS" - fi +fi + fi ### Look for network libraries first, since some functions (such as gethostname) ### are used in a lot of places. echo $ac_n "checking if you want ssl library""... $ac_c" 1>&6 -echo "configure:4222: checking if you want ssl library" >&5 +echo "configure:4400: checking if you want ssl library" >&5 if eval "test \"`echo '$''{'cf_cv_use_libssl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4238,7 +4416,7 @@ fi echo "$ac_t""$cf_cv_use_libssl" 1>&6 echo $ac_n "checking if you want socks library""... $ac_c" 1>&6 -echo "configure:4242: checking if you want socks library" >&5 +echo "configure:4420: checking if you want socks library" >&5 if eval "test \"`echo '$''{'cf_cv_use_libsocks'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4258,7 +4436,7 @@ fi echo "$ac_t""$cf_cv_use_libsocks" 1>&6 echo $ac_n "checking if you want socks5 library""... $ac_c" 1>&6 -echo "configure:4262: checking if you want socks5 library" >&5 +echo "configure:4440: checking if you want socks5 library" >&5 if eval "test \"`echo '$''{'cf_cv_use_libsocks5'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4334,7 +4512,7 @@ cat >> confdefs.h <<\EOF EOF cat > conftest.$ac_ext <<EOF -#line 4338 "configure" +#line 4516 "configure" #include "confdefs.h" #include <stdio.h> @@ -4343,7 +4521,7 @@ int main() { accept((char *)0) ; return 0; } EOF -if { (eval echo configure:4347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then : else echo "configure: failed program was:" >&5 @@ -4382,10 +4560,10 @@ cat >> confdefs.h <<\EOF EOF echo $ac_n "checking if the socks library uses socks4 prefix""... $ac_c" 1>&6 -echo "configure:4386: checking if the socks library uses socks4 prefix" >&5 +echo "configure:4564: checking if the socks library uses socks4 prefix" >&5 cf_use_socks4=error cat > conftest.$ac_ext <<EOF -#line 4389 "configure" +#line 4567 "configure" #include "confdefs.h" #include <socks.h> @@ -4394,7 +4572,7 @@ int main() { Rinit((char *)0) ; return 0; } EOF -if { (eval echo configure:4398: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4576: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cat >> confdefs.h <<\EOF #define USE_SOCKS4_PREFIX 1 @@ -4406,14 +4584,14 @@ else cat conftest.$ac_ext >&5 rm -rf conftest* cat > conftest.$ac_ext <<EOF -#line 4410 "configure" +#line 4588 "configure" #include "confdefs.h" #include <socks.h> int main() { SOCKSinit((char *)0) ; return 0; } EOF -if { (eval echo configure:4417: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cf_use_socks4=no else @@ -4478,9 +4656,9 @@ EOF fi echo $ac_n "checking if socks5p.h is available""... $ac_c" 1>&6 -echo "configure:4482: checking if socks5p.h is available" >&5 +echo "configure:4660: checking if socks5p.h is available" >&5 cat > conftest.$ac_ext <<EOF -#line 4484 "configure" +#line 4662 "configure" #include "confdefs.h" #define INCLUDE_PROTOTYPES @@ -4490,7 +4668,7 @@ int main() { init((char *)0) ; return 0; } EOF -if { (eval echo configure:4494: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4672: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_use_socks5p_h=yes else @@ -4510,7 +4688,7 @@ else cf_test_netlibs=no echo $ac_n "checking for network libraries""... $ac_c" 1>&6 -echo "configure:4514: checking for network libraries" >&5 +echo "configure:4692: checking for network libraries" >&5 if eval "test \"`echo '$''{'cf_cv_netlibs'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4521,12 +4699,12 @@ cf_test_netlibs=yes for ac_func in gethostname do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4525: checking for $ac_func" >&5 +echo "configure:4703: 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 4530 "configure" +#line 4708 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -4549,7 +4727,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:4553: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4731: \"$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 @@ -4572,7 +4750,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for gethostname in -lnsl""... $ac_c" 1>&6 -echo "configure:4576: checking for gethostname in -lnsl" >&5 +echo "configure:4754: 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 @@ -4580,7 +4758,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl $cf_cv_netlibs $LIBS" cat > conftest.$ac_ext <<EOF -#line 4584 "configure" +#line 4762 "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 @@ -4591,7 +4769,7 @@ int main() { gethostname() ; return 0; } EOF -if { (eval echo configure:4595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4773: \"$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 @@ -4624,7 +4802,7 @@ else echo $ac_n "checking for gethostname in -lsocket""... $ac_c" 1>&6 -echo "configure:4628: checking for gethostname in -lsocket" >&5 +echo "configure:4806: checking for gethostname in -lsocket" >&5 ac_lib_var=`echo socket'_'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 @@ -4632,7 +4810,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsocket $cf_cv_netlibs $LIBS" cat > conftest.$ac_ext <<EOF -#line 4636 "configure" +#line 4814 "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 @@ -4643,7 +4821,7 @@ int main() { gethostname() ; return 0; } EOF -if { (eval echo configure:4647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4825: \"$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 @@ -4688,7 +4866,7 @@ done # I don't know the entrypoints - 97/7/22 TD # AC_HAVE_LIBRARY(inet,cf_cv_netlibs="-linet $cf_cv_netlibs") echo $ac_n "checking for main in -linet""... $ac_c" 1>&6 -echo "configure:4692: checking for main in -linet" >&5 +echo "configure:4870: checking for main in -linet" >&5 ac_lib_var=`echo inet'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4696,14 +4874,14 @@ else ac_save_LIBS="$LIBS" LIBS="-linet $LIBS" cat > conftest.$ac_ext <<EOF -#line 4700 "configure" +#line 4878 "configure" #include "confdefs.h" int main() { main() ; return 0; } EOF -if { (eval echo configure:4707: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4885: \"$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 @@ -4728,12 +4906,12 @@ if test "$ac_cv_func_lsocket" != no ; then for ac_func in socket do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4732: checking for $ac_func" >&5 +echo "configure:4910: 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 4737 "configure" +#line 4915 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -4756,7 +4934,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:4760: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4938: \"$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 @@ -4779,7 +4957,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6 -echo "configure:4783: checking for socket in -lsocket" >&5 +echo "configure:4961: 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 @@ -4787,7 +4965,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsocket $cf_cv_netlibs $LIBS" cat > conftest.$ac_ext <<EOF -#line 4791 "configure" +#line 4969 "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 @@ -4798,7 +4976,7 @@ int main() { socket() ; return 0; } EOF -if { (eval echo configure:4802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4980: \"$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 @@ -4831,7 +5009,7 @@ else echo $ac_n "checking for socket in -lbsd""... $ac_c" 1>&6 -echo "configure:4835: checking for socket in -lbsd" >&5 +echo "configure:5013: checking for socket in -lbsd" >&5 ac_lib_var=`echo bsd'_'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 @@ -4839,7 +5017,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lbsd $cf_cv_netlibs $LIBS" cat > conftest.$ac_ext <<EOF -#line 4843 "configure" +#line 5021 "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 @@ -4850,7 +5028,7 @@ int main() { socket() ; return 0; } EOF -if { (eval echo configure:4854: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5032: \"$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 @@ -4895,12 +5073,12 @@ fi for ac_func in gethostbyname do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4899: checking for $ac_func" >&5 +echo "configure:5077: 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 4904 "configure" +#line 5082 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -4923,7 +5101,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:4927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5105: \"$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 @@ -4946,7 +5124,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6 -echo "configure:4950: checking for gethostbyname in -lnsl" >&5 +echo "configure:5128: 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 @@ -4954,7 +5132,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl $cf_cv_netlibs $LIBS" cat > conftest.$ac_ext <<EOF -#line 4958 "configure" +#line 5136 "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 @@ -4965,7 +5143,7 @@ int main() { gethostbyname() ; return 0; } EOF -if { (eval echo configure:4969: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5147: \"$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 @@ -5006,12 +5184,12 @@ done for ac_func in strcasecmp do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5010: checking for $ac_func" >&5 +echo "configure:5188: 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 5015 "configure" +#line 5193 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -5034,7 +5212,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:5038: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5216: \"$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 @@ -5057,7 +5235,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for strcasecmp in -lresolv""... $ac_c" 1>&6 -echo "configure:5061: checking for strcasecmp in -lresolv" >&5 +echo "configure:5239: checking for strcasecmp in -lresolv" >&5 ac_lib_var=`echo resolv'_'strcasecmp | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5065,7 +5243,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lresolv $cf_cv_netlibs $LIBS" cat > conftest.$ac_ext <<EOF -#line 5069 "configure" +#line 5247 "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 @@ -5076,7 +5254,7 @@ int main() { strcasecmp() ; return 0; } EOF -if { (eval echo configure:5080: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5258: \"$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 @@ -5122,13 +5300,13 @@ test $cf_test_netlibs = no && echo "$cf_cv_netlibs" >&6 fi echo $ac_n "checking for inet_aton function""... $ac_c" 1>&6 -echo "configure:5126: checking for inet_aton function" >&5 +echo "configure:5304: checking for inet_aton function" >&5 if eval "test \"`echo '$''{'cf_cv_have_inet_aton'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5132 "configure" +#line 5310 "configure" #include "confdefs.h" #include <sys/types.h> #include <sys/socket.h> @@ -5139,7 +5317,7 @@ int main() { inet_aton(0, (struct in_addr *)0) ; return 0; } EOF -if { (eval echo configure:5143: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5321: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cf_cv_have_inet_aton=yes else @@ -5159,13 +5337,13 @@ EOF else echo $ac_n "checking for inet_addr function""... $ac_c" 1>&6 -echo "configure:5163: checking for inet_addr function" >&5 +echo "configure:5341: checking for inet_addr function" >&5 if eval "test \"`echo '$''{'cf_cv_have_inet_addr'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5169 "configure" +#line 5347 "configure" #include "confdefs.h" #include <sys/types.h> #include <sys/socket.h> @@ -5176,7 +5354,7 @@ int main() { inet_addr(0) ; return 0; } EOF -if { (eval echo configure:5180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cf_cv_have_inet_addr=yes else @@ -5191,7 +5369,7 @@ fi echo "$ac_t""$cf_cv_have_inet_addr" 1>&6 if test "$cf_cv_have_inet_addr" = no ; then echo $ac_n "checking for library with inet_addr""... $ac_c" 1>&6 -echo "configure:5195: checking for library with inet_addr" >&5 +echo "configure:5373: checking for library with inet_addr" >&5 if eval "test \"`echo '$''{'cf_cv_lib_inet_addr'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5201,7 +5379,7 @@ else do LIBS="$cf_save_LIBS $cf_inetlib" cat > conftest.$ac_ext <<EOF -#line 5205 "configure" +#line 5383 "configure" #include "confdefs.h" #include <sys/types.h> #include <sys/socket.h> @@ -5212,7 +5390,7 @@ int main() { inet_addr(0) ; return 0; } EOF -if { (eval echo configure:5216: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cf_cv_lib_inet_addr=$cf_inetlib else @@ -5245,7 +5423,7 @@ no) #(vi ;; yes) #(vi echo $ac_n "checking for SSL_get_version in -lssl""... $ac_c" 1>&6 -echo "configure:5249: checking for SSL_get_version in -lssl" >&5 +echo "configure:5427: checking for SSL_get_version in -lssl" >&5 ac_lib_var=`echo ssl'_'SSL_get_version | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5253,7 +5431,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lssl -lcrypto $LIBS" cat > conftest.$ac_ext <<EOF -#line 5257 "configure" +#line 5435 "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 @@ -5264,7 +5442,7 @@ int main() { SSL_get_version() ; return 0; } EOF -if { (eval echo configure:5268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5446: \"$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 @@ -5319,9 +5497,9 @@ esac LIBS="$cf_ssl_library $LIBS" echo $ac_n "checking for openssl include directory""... $ac_c" 1>&6 -echo "configure:5323: checking for openssl include directory" >&5 +echo "configure:5501: checking for openssl include directory" >&5 cat > conftest.$ac_ext <<EOF -#line 5325 "configure" +#line 5503 "configure" #include "confdefs.h" #include <stdio.h> @@ -5330,7 +5508,7 @@ int main() { SSL_shutdown((SSL *)0) ; return 0; } EOF -if { (eval echo configure:5334: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5512: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_openssl_incl=yes else @@ -5347,9 +5525,9 @@ EOF echo $ac_n "checking if we can link to ssl library""... $ac_c" 1>&6 -echo "configure:5351: checking if we can link to ssl library" >&5 +echo "configure:5529: checking if we can link to ssl library" >&5 cat > conftest.$ac_ext <<EOF -#line 5353 "configure" +#line 5531 "configure" #include "confdefs.h" #include <stdio.h> @@ -5363,7 +5541,7 @@ int main() { SSL_shutdown((SSL *)0) ; return 0; } EOF -if { (eval echo configure:5367: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5545: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cf_ssl_library=yes else @@ -5386,7 +5564,7 @@ fi fi echo $ac_n "checking for screen type""... $ac_c" 1>&6 -echo "configure:5390: checking for screen type" >&5 +echo "configure:5568: checking for screen type" >&5 if eval "test \"`echo '$''{'cf_cv_screen'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5417,11 +5595,11 @@ ncurses|ncursesw|slang) pdcurses) cf_cv_ncurses_header=xcurses.h ;; -curses) - if eval "test \"`echo '$''{'cf_cv_ncurses_header'+set}'`\" != set"; then - cf_cv_ncurses_header=curses.h - fi - ;; +#curses) +# if eval "test \"`echo '$''{'cf_cv_ncurses_header'+set}'`\" != set"; then +# cf_cv_ncurses_header=curses.h +# fi +# ;; esac case $cf_cv_screen in @@ -5429,7 +5607,7 @@ curses) echo $ac_n "checking for extra include directories""... $ac_c" 1>&6 -echo "configure:5433: checking for extra include directories" >&5 +echo "configure:5611: checking for extra include directories" >&5 if eval "test \"`echo '$''{'cf_cv_curses_incdir'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5453,12 +5631,12 @@ echo "$ac_t""$cf_cv_curses_incdir" 1>&6 test "$cf_cv_curses_incdir" != no && CPPFLAGS="$CPPFLAGS $cf_cv_curses_incdir" echo $ac_n "checking if we have identified curses headers""... $ac_c" 1>&6 -echo "configure:5457: checking if we have identified curses headers" >&5 +echo "configure:5635: checking if we have identified curses headers" >&5 if eval "test \"`echo '$''{'cf_cv_ncurses_header'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else -cf_cv_ncurses_header=curses.h +cf_cv_ncurses_header=none for cf_header in \ curses.h \ ncurses.h \ @@ -5466,14 +5644,14 @@ for cf_header in \ ncurses/ncurses.h do cat > conftest.$ac_ext <<EOF -#line 5470 "configure" +#line 5648 "configure" #include "confdefs.h" #include <${cf_header}> int main() { initscr(); tgoto("?", 0,0) ; return 0; } EOF -if { (eval echo configure:5477: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5655: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_ncurses_header=$cf_header; break else @@ -5487,22 +5665,26 @@ fi echo "$ac_t""$cf_cv_ncurses_header" 1>&6 +if test "$cf_cv_ncurses_header" = none ; then + { echo "configure: error: No curses header-files found" 1>&2; exit 1; } +fi + # cheat, to get the right #define's for HAVE_NCURSES_H, etc. for ac_hdr in $cf_cv_ncurses_header do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:5496: checking for $ac_hdr" >&5 +echo "configure:5678: 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 5501 "configure" +#line 5683 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5506: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5688: \"$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* @@ -5532,7 +5714,7 @@ done echo $ac_n "checking for ncurses version""... $ac_c" 1>&6 -echo "configure:5536: checking for ncurses version" >&5 +echo "configure:5718: 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 @@ -5558,7 +5740,7 @@ Autoconf "old" #endif EOF cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out" - { (eval echo configure:5562: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; } + { (eval echo configure:5744: \"$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" @@ -5567,7 +5749,7 @@ EOF else cat > conftest.$ac_ext <<EOF -#line 5571 "configure" +#line 5753 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header-curses.h}> @@ -5591,7 +5773,7 @@ int main() exit(0); } EOF -if { (eval echo configure:5595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5777: \"$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` @@ -5615,16 +5797,16 @@ EOF echo $ac_n "checking if we have identified curses libraries""... $ac_c" 1>&6 -echo "configure:5619: checking if we have identified curses libraries" >&5 +echo "configure:5801: checking if we have identified curses libraries" >&5 cat > conftest.$ac_ext <<EOF -#line 5621 "configure" +#line 5803 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header-curses.h}> int main() { initscr(); tgoto("?", 0,0) ; return 0; } EOF -if { (eval echo configure:5628: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cf_result=yes else @@ -5640,7 +5822,7 @@ if test "$cf_result" = no ; then case $host_os in #(vi freebsd*) #(vi echo $ac_n "checking for tgoto in -lmytinfo""... $ac_c" 1>&6 -echo "configure:5644: checking for tgoto in -lmytinfo" >&5 +echo "configure:5826: 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 @@ -5648,7 +5830,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lmytinfo $LIBS" cat > conftest.$ac_ext <<EOF -#line 5652 "configure" +#line 5834 "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 @@ -5659,7 +5841,7 @@ int main() { tgoto() ; return 0; } EOF -if { (eval echo configure:5663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5845: \"$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 @@ -5682,7 +5864,7 @@ fi ;; hpux10.*|hpux11.*) #(vi echo $ac_n "checking for initscr in -lcur_colr""... $ac_c" 1>&6 -echo "configure:5686: checking for initscr in -lcur_colr" >&5 +echo "configure:5868: checking for initscr in -lcur_colr" >&5 ac_lib_var=`echo cur_colr'_'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 @@ -5690,7 +5872,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcur_colr $LIBS" cat > conftest.$ac_ext <<EOF -#line 5694 "configure" +#line 5876 "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 @@ -5701,7 +5883,7 @@ int main() { initscr() ; return 0; } EOF -if { (eval echo configure:5705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5887: \"$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 @@ -5724,7 +5906,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for initscr in -lHcurses""... $ac_c" 1>&6 -echo "configure:5728: checking for initscr in -lHcurses" >&5 +echo "configure:5910: checking for initscr in -lHcurses" >&5 ac_lib_var=`echo Hcurses'_'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 @@ -5732,7 +5914,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lHcurses $LIBS" cat > conftest.$ac_ext <<EOF -#line 5736 "configure" +#line 5918 "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 @@ -5743,7 +5925,7 @@ int main() { initscr() ; return 0; } EOF -if { (eval echo configure:5747: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5929: \"$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 @@ -5796,12 +5978,12 @@ if test ".$ac_cv_func_initscr" != .yes ; then # Check for library containing tgoto. Do this before curses library # because it may be needed to link the test-case for initscr. echo $ac_n "checking for tgoto""... $ac_c" 1>&6 -echo "configure:5800: checking for tgoto" >&5 +echo "configure:5982: checking for tgoto" >&5 if eval "test \"`echo '$''{'ac_cv_func_tgoto'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5805 "configure" +#line 5987 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char tgoto(); below. */ @@ -5824,7 +6006,7 @@ tgoto(); ; return 0; } EOF -if { (eval echo configure:5828: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6010: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_tgoto=yes" else @@ -5845,7 +6027,7 @@ else for cf_term_lib in $cf_check_list termcap termlib unknown do echo $ac_n "checking for tgoto in -l$cf_term_lib""... $ac_c" 1>&6 -echo "configure:5849: checking for tgoto in -l$cf_term_lib" >&5 +echo "configure:6031: checking for tgoto in -l$cf_term_lib" >&5 ac_lib_var=`echo $cf_term_lib'_'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 @@ -5853,7 +6035,7 @@ else ac_save_LIBS="$LIBS" LIBS="-l$cf_term_lib $LIBS" cat > conftest.$ac_ext <<EOF -#line 5857 "configure" +#line 6039 "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 @@ -5864,7 +6046,7 @@ int main() { tgoto() ; return 0; } EOF -if { (eval echo configure:5868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6050: \"$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 @@ -5894,7 +6076,7 @@ fi for cf_curs_lib in $cf_check_list xcurses jcurses unknown do echo $ac_n "checking for initscr in -l$cf_curs_lib""... $ac_c" 1>&6 -echo "configure:5898: checking for initscr in -l$cf_curs_lib" >&5 +echo "configure:6080: checking for initscr in -l$cf_curs_lib" >&5 ac_lib_var=`echo $cf_curs_lib'_'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 @@ -5902,7 +6084,7 @@ else ac_save_LIBS="$LIBS" LIBS="-l$cf_curs_lib $LIBS" cat > conftest.$ac_ext <<EOF -#line 5906 "configure" +#line 6088 "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 @@ -5913,7 +6095,7 @@ int main() { initscr() ; return 0; } EOF -if { (eval echo configure:5917: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6099: \"$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 @@ -5939,16 +6121,16 @@ fi LIBS="-l$cf_curs_lib $cf_save_LIBS" if test "$cf_term_lib" = unknown ; then echo $ac_n "checking if we can link with $cf_curs_lib library""... $ac_c" 1>&6 -echo "configure:5943: checking if we can link with $cf_curs_lib library" >&5 +echo "configure:6125: checking if we can link with $cf_curs_lib library" >&5 cat > conftest.$ac_ext <<EOF -#line 5945 "configure" +#line 6127 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header-curses.h}> int main() { initscr() ; return 0; } EOF -if { (eval echo configure:5952: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cf_result=yes else @@ -5964,16 +6146,16 @@ rm -f conftest* : elif test "$cf_term_lib" != predefined ; then echo $ac_n "checking if we need both $cf_curs_lib and $cf_term_lib libraries""... $ac_c" 1>&6 -echo "configure:5968: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5 +echo "configure:6150: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5 cat > conftest.$ac_ext <<EOF -#line 5970 "configure" +#line 6152 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header-curses.h}> int main() { initscr(); tgoto((char *)0, 0, 0); ; return 0; } EOF -if { (eval echo configure:5977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6159: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cf_result=no else @@ -5983,14 +6165,14 @@ else LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS" cat > conftest.$ac_ext <<EOF -#line 5987 "configure" +#line 6169 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header-curses.h}> int main() { initscr() ; return 0; } EOF -if { (eval echo configure:5994: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6176: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cf_result=yes else @@ -6011,14 +6193,14 @@ fi echo $ac_n "checking for curses performance tradeoff""... $ac_c" 1>&6 -echo "configure:6015: checking for curses performance tradeoff" >&5 +echo "configure:6197: checking for curses performance tradeoff" >&5 if eval "test \"`echo '$''{'cf_cv_curs_performance'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cf_cv_curs_performance=no cat > conftest.$ac_ext <<EOF -#line 6022 "configure" +#line 6204 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header-curses.h}> @@ -6032,11 +6214,11 @@ int main() { ; return 0; } EOF -if { (eval echo configure:6036: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6218: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat > conftest.$ac_ext <<EOF -#line 6040 "configure" +#line 6222 "configure" #include "confdefs.h" #define CURS_PERFORMANCE @@ -6051,7 +6233,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:6055: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6237: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_curs_performance=yes else @@ -6074,13 +6256,13 @@ EOF echo $ac_n "checking for curses touchline function""... $ac_c" 1>&6 -echo "configure:6078: checking for curses touchline function" >&5 +echo "configure:6260: checking for curses touchline function" >&5 if eval "test \"`echo '$''{'cf_cv_curs_touchline'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 6084 "configure" +#line 6266 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header-curses.h}> @@ -6088,7 +6270,7 @@ int main() { touchline(stdscr, 1,2,3); ; return 0; } EOF -if { (eval echo configure:6092: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6274: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cf_cv_curs_touchline=bsd else @@ -6096,7 +6278,7 @@ else cat conftest.$ac_ext >&5 rm -rf conftest* cat > conftest.$ac_ext <<EOF -#line 6100 "configure" +#line 6282 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header-curses.h}> @@ -6104,7 +6286,7 @@ int main() { touchline(stdscr, 1,2); ; return 0; } EOF -if { (eval echo configure:6108: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6290: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cf_cv_curs_touchline=sysv else @@ -6139,7 +6321,7 @@ ncurses) cf_ncuhdr_root=ncurses echo $ac_n "checking for $cf_ncuhdr_root header in include-path""... $ac_c" 1>&6 -echo "configure:6143: checking for $cf_ncuhdr_root header in include-path" >&5 +echo "configure:6325: 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 @@ -6149,7 +6331,7 @@ else for cf_header in $cf_header_list do cat > conftest.$ac_ext <<EOF -#line 6153 "configure" +#line 6335 "configure" #include "confdefs.h" #include <$cf_header> int main() { @@ -6167,7 +6349,7 @@ make an error ; return 0; } EOF -if { (eval echo configure:6171: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:6353: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_ncurses_h=$cf_header; break @@ -6188,7 +6370,7 @@ 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:6192: checking for $cf_ncuhdr_root include-path" >&5 +echo "configure:6374: 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 @@ -6321,7 +6503,7 @@ esac echo $ac_n "checking for ncurses version""... $ac_c" 1>&6 -echo "configure:6325: checking for ncurses version" >&5 +echo "configure:6507: 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 @@ -6347,7 +6529,7 @@ Autoconf "old" #endif EOF cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out" - { (eval echo configure:6351: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; } + { (eval echo configure:6533: \"$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" @@ -6356,7 +6538,7 @@ EOF else cat > conftest.$ac_ext <<EOF -#line 6360 "configure" +#line 6542 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header-curses.h}> @@ -6380,7 +6562,7 @@ int main() exit(0); } EOF -if { (eval echo configure:6384: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:6566: \"$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` @@ -6411,7 +6593,7 @@ cf_nculib_root=ncurses cf_ncurses_LIBS="" cf_ncurses_SAVE="$LIBS" echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6 -echo "configure:6415: checking for Gpm_Open in -lgpm" >&5 +echo "configure:6597: 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 @@ -6419,7 +6601,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lgpm $LIBS" cat > conftest.$ac_ext <<EOF -#line 6423 "configure" +#line 6605 "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 @@ -6430,7 +6612,7 @@ int main() { Gpm_Open() ; return 0; } EOF -if { (eval echo configure:6434: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6616: \"$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 @@ -6446,7 +6628,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:6450: checking for initscr in -lgpm" >&5 +echo "configure:6632: 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 @@ -6454,7 +6636,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lgpm $LIBS" cat > conftest.$ac_ext <<EOF -#line 6458 "configure" +#line 6640 "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 @@ -6465,7 +6647,7 @@ int main() { initscr() ; return 0; } EOF -if { (eval echo configure:6469: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6651: \"$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 @@ -6496,7 +6678,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:6500: checking for tgoto in -lmytinfo" >&5 +echo "configure:6682: 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 @@ -6504,7 +6686,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lmytinfo $LIBS" cat > conftest.$ac_ext <<EOF -#line 6508 "configure" +#line 6690 "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 @@ -6515,7 +6697,7 @@ int main() { tgoto() ; return 0; } EOF -if { (eval echo configure:6519: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6701: \"$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 @@ -6543,12 +6725,12 @@ 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:6547: checking for initscr" >&5 +echo "configure:6729: 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 6552 "configure" +#line 6734 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char initscr(); below. */ @@ -6571,7 +6753,7 @@ initscr(); ; return 0; } EOF -if { (eval echo configure:6575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6757: \"$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 @@ -6591,17 +6773,17 @@ else cf_save_LIBS="$LIBS" echo $ac_n "checking for initscr in -l$cf_nculib_root""... $ac_c" 1>&6 -echo "configure:6595: checking for initscr in -l$cf_nculib_root" >&5 +echo "configure:6777: checking for initscr in -l$cf_nculib_root" >&5 LIBS="-l$cf_nculib_root $LIBS" cat > conftest.$ac_ext <<EOF -#line 6598 "configure" +#line 6780 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header-curses.h}> int main() { initscr() ; return 0; } EOF -if { (eval echo configure:6605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6787: \"$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' @@ -6645,17 +6827,17 @@ cf_search="$cf_search $HOME/lib $HOME/lib/$cf_nculib_root $HOME/$cf_nculib_root/ 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:6649: checking for -l$cf_nculib_root in $cf_libdir" >&5 +echo "configure:6831: 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 6652 "configure" +#line 6834 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header-curses.h}> int main() { initscr() ; return 0; } EOF -if { (eval echo configure:6659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6841: \"$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' @@ -6685,7 +6867,7 @@ 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:6689: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5 +echo "configure:6871: 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'$//'` @@ -6694,14 +6876,14 @@ echo "configure:6689: checking if we can link $cf_nculib_root without $cf_ncurse fi done cat > conftest.$ac_ext <<EOF -#line 6698 "configure" +#line 6880 "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:6705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6887: \"$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 @@ -6716,7 +6898,7 @@ fi echo $ac_n "checking for ncurses version""... $ac_c" 1>&6 -echo "configure:6720: checking for ncurses version" >&5 +echo "configure:6902: 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 @@ -6742,7 +6924,7 @@ Autoconf "old" #endif EOF cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out" - { (eval echo configure:6746: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; } + { (eval echo configure:6928: \"$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" @@ -6751,7 +6933,7 @@ EOF else cat > conftest.$ac_ext <<EOF -#line 6755 "configure" +#line 6937 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header-curses.h}> @@ -6775,7 +6957,7 @@ int main() exit(0); } EOF -if { (eval echo configure:6779: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:6961: \"$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` @@ -6800,13 +6982,13 @@ EOF ncursesw) echo $ac_n "checking for multibyte character support""... $ac_c" 1>&6 -echo "configure:6804: checking for multibyte character support" >&5 +echo "configure:6986: 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 6810 "configure" +#line 6992 "configure" #include "confdefs.h" #include <stdlib.h> @@ -6814,7 +6996,7 @@ int main() { putwc(0,0); ; return 0; } EOF -if { (eval echo configure:6818: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7000: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cf_cv_utf8_lib=yes else @@ -6825,7 +7007,7 @@ else cf_save_LIBS="$LIBS" LIBS="-lutf8 $LIBS" cat > conftest.$ac_ext <<EOF -#line 6829 "configure" +#line 7011 "configure" #include "confdefs.h" #include <libutf8.h> @@ -6833,7 +7015,7 @@ int main() { putwc(0,0); ; return 0; } EOF -if { (eval echo configure:6837: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7019: \"$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 @@ -6853,7 +7035,7 @@ 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:6857: checking for $cf_ncuhdr_root header in include-path" >&5 +echo "configure:7039: 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 @@ -6863,7 +7045,7 @@ else for cf_header in $cf_header_list do cat > conftest.$ac_ext <<EOF -#line 6867 "configure" +#line 7049 "configure" #include "confdefs.h" #include <$cf_header> int main() { @@ -6881,7 +7063,7 @@ make an error ; return 0; } EOF -if { (eval echo configure:6885: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:7067: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_ncurses_h=$cf_header; break @@ -6902,7 +7084,7 @@ 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:6906: checking for $cf_ncuhdr_root include-path" >&5 +echo "configure:7088: 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 @@ -7035,7 +7217,7 @@ esac echo $ac_n "checking for ncurses version""... $ac_c" 1>&6 -echo "configure:7039: checking for ncurses version" >&5 +echo "configure:7221: 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 @@ -7061,7 +7243,7 @@ Autoconf "old" #endif EOF cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out" - { (eval echo configure:7065: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; } + { (eval echo configure:7247: \"$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" @@ -7070,7 +7252,7 @@ EOF else cat > conftest.$ac_ext <<EOF -#line 7074 "configure" +#line 7256 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header-curses.h}> @@ -7094,7 +7276,7 @@ int main() exit(0); } EOF -if { (eval echo configure:7098: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:7280: \"$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` @@ -7125,7 +7307,7 @@ cf_nculib_root=ncursesw cf_ncurses_LIBS="" cf_ncurses_SAVE="$LIBS" echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6 -echo "configure:7129: checking for Gpm_Open in -lgpm" >&5 +echo "configure:7311: 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 @@ -7133,7 +7315,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lgpm $LIBS" cat > conftest.$ac_ext <<EOF -#line 7137 "configure" +#line 7319 "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 @@ -7144,7 +7326,7 @@ int main() { Gpm_Open() ; return 0; } EOF -if { (eval echo configure:7148: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7330: \"$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 @@ -7160,7 +7342,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:7164: checking for initscr in -lgpm" >&5 +echo "configure:7346: 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 @@ -7168,7 +7350,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lgpm $LIBS" cat > conftest.$ac_ext <<EOF -#line 7172 "configure" +#line 7354 "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 @@ -7179,7 +7361,7 @@ int main() { initscr() ; return 0; } EOF -if { (eval echo configure:7183: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7365: \"$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 @@ -7210,7 +7392,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:7214: checking for tgoto in -lmytinfo" >&5 +echo "configure:7396: 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 @@ -7218,7 +7400,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lmytinfo $LIBS" cat > conftest.$ac_ext <<EOF -#line 7222 "configure" +#line 7404 "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 @@ -7229,7 +7411,7 @@ int main() { tgoto() ; return 0; } EOF -if { (eval echo configure:7233: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7415: \"$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 @@ -7257,12 +7439,12 @@ 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:7261: checking for initscr" >&5 +echo "configure:7443: 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 7266 "configure" +#line 7448 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char initscr(); below. */ @@ -7285,7 +7467,7 @@ initscr(); ; return 0; } EOF -if { (eval echo configure:7289: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7471: \"$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 @@ -7305,17 +7487,17 @@ else cf_save_LIBS="$LIBS" echo $ac_n "checking for initscr in -l$cf_nculib_root""... $ac_c" 1>&6 -echo "configure:7309: checking for initscr in -l$cf_nculib_root" >&5 +echo "configure:7491: checking for initscr in -l$cf_nculib_root" >&5 LIBS="-l$cf_nculib_root $LIBS" cat > conftest.$ac_ext <<EOF -#line 7312 "configure" +#line 7494 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header-curses.h}> int main() { initscr() ; return 0; } EOF -if { (eval echo configure:7319: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7501: \"$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' @@ -7359,17 +7541,17 @@ cf_search="$cf_search $HOME/lib $HOME/lib/$cf_nculib_root $HOME/$cf_nculib_root/ 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:7363: checking for -l$cf_nculib_root in $cf_libdir" >&5 +echo "configure:7545: 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 7366 "configure" +#line 7548 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header-curses.h}> int main() { initscr() ; return 0; } EOF -if { (eval echo configure:7373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7555: \"$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' @@ -7399,7 +7581,7 @@ 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:7403: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5 +echo "configure:7585: 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'$//'` @@ -7408,14 +7590,14 @@ echo "configure:7403: checking if we can link $cf_nculib_root without $cf_ncurse fi done cat > conftest.$ac_ext <<EOF -#line 7412 "configure" +#line 7594 "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:7419: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7601: \"$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 @@ -7430,7 +7612,7 @@ fi echo $ac_n "checking for ncurses version""... $ac_c" 1>&6 -echo "configure:7434: checking for ncurses version" >&5 +echo "configure:7616: 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 @@ -7456,7 +7638,7 @@ Autoconf "old" #endif EOF cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out" - { (eval echo configure:7460: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; } + { (eval echo configure:7642: \"$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" @@ -7465,7 +7647,7 @@ EOF else cat > conftest.$ac_ext <<EOF -#line 7469 "configure" +#line 7651 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header-curses.h}> @@ -7489,7 +7671,7 @@ int main() exit(0); } EOF -if { (eval echo configure:7493: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:7675: \"$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` @@ -7517,20 +7699,20 @@ pdcurses) slang) echo $ac_n "checking for slang header file""... $ac_c" 1>&6 -echo "configure:7521: checking for slang header file" >&5 +echo "configure:7703: 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 7527 "configure" +#line 7709 "configure" #include "confdefs.h" #include <slang.h> int main() { printf("%s\n", SLANG_VERSION) ; return 0; } EOF -if { (eval echo configure:7534: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:7716: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_slang_header=predefined else @@ -7626,24 +7808,24 @@ else cf_cv_termlib=none cat > conftest.$ac_ext <<EOF -#line 7630 "configure" +#line 7812 "configure" #include "confdefs.h" int main() { char *x=(char*)tgoto("",0,0) ; return 0; } EOF -if { (eval echo configure:7637: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cat > conftest.$ac_ext <<EOF -#line 7640 "configure" +#line 7822 "configure" #include "confdefs.h" int main() { int x=tigetstr("") ; return 0; } EOF -if { (eval echo configure:7647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7829: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cf_cv_termlib=terminfo else @@ -7672,16 +7854,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:7676: checking for $cf_func in -l$cf_lib" >&5 +echo "configure:7858: checking for $cf_func in -l$cf_lib" >&5 cat > conftest.$ac_ext <<EOF -#line 7678 "configure" +#line 7860 "configure" #include "confdefs.h" int main() { int x=$cf_func("") ; return 0; } EOF -if { (eval echo configure:7685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cf_result=yes else @@ -7708,7 +7890,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:7712: checking for initscr in -lcurses" >&5 +echo "configure:7894: 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 @@ -7716,7 +7898,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcurses $LIBS" cat > conftest.$ac_ext <<EOF -#line 7720 "configure" +#line 7902 "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 @@ -7727,7 +7909,7 @@ int main() { initscr() ; return 0; } EOF -if { (eval echo configure:7731: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7913: \"$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 @@ -7748,7 +7930,7 @@ else fi echo $ac_n "checking for tgoto in -ltermcap""... $ac_c" 1>&6 -echo "configure:7752: checking for tgoto in -ltermcap" >&5 +echo "configure:7934: 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 @@ -7756,7 +7938,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ltermcap $LIBS" cat > conftest.$ac_ext <<EOF -#line 7760 "configure" +#line 7942 "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 @@ -7767,7 +7949,7 @@ int main() { tgoto() ; return 0; } EOF -if { (eval echo configure:7771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7953: \"$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 @@ -7799,12 +7981,12 @@ fi cf_slang_LIBS2="$LIBS" echo $ac_n "checking for acos""... $ac_c" 1>&6 -echo "configure:7803: checking for acos" >&5 +echo "configure:7985: 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 7808 "configure" +#line 7990 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char acos(); below. */ @@ -7827,7 +8009,7 @@ acos(); ; return 0; } EOF -if { (eval echo configure:7831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8013: \"$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 @@ -7846,7 +8028,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for acos in -lm""... $ac_c" 1>&6 -echo "configure:7850: checking for acos in -lm" >&5 +echo "configure:8032: 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 @@ -7854,7 +8036,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lm $LIBS $LIBS" cat > conftest.$ac_ext <<EOF -#line 7858 "configure" +#line 8040 "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 @@ -7865,7 +8047,7 @@ int main() { acos() ; return 0; } EOF -if { (eval echo configure:7869: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8051: \"$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 @@ -7907,12 +8089,12 @@ os2*) eval 'cf_cv_have_lib_'video'=no' cf_libdir="" echo $ac_n "checking for v_init""... $ac_c" 1>&6 -echo "configure:7911: checking for v_init" >&5 +echo "configure:8093: 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 7916 "configure" +#line 8098 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char v_init(); below. */ @@ -7935,7 +8117,7 @@ v_init(); ; return 0; } EOF -if { (eval echo configure:7939: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8121: \"$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 @@ -7955,17 +8137,17 @@ else cf_save_LIBS="$LIBS" echo $ac_n "checking for v_init in -lvideo""... $ac_c" 1>&6 -echo "configure:7959: checking for v_init in -lvideo" >&5 +echo "configure:8141: checking for v_init in -lvideo" >&5 LIBS="-lvideo $LIBS" cat > conftest.$ac_ext <<EOF -#line 7962 "configure" +#line 8144 "configure" #include "confdefs.h" #include <sys/video.h> int main() { v_init() ; return 0; } EOF -if { (eval echo configure:7969: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8151: \"$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' @@ -8009,17 +8191,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:8013: checking for -lvideo in $cf_libdir" >&5 +echo "configure:8195: checking for -lvideo in $cf_libdir" >&5 LIBS="-L$cf_libdir -lvideo $cf_save_LIBS" cat > conftest.$ac_ext <<EOF -#line 8016 "configure" +#line 8198 "configure" #include "confdefs.h" #include <sys/video.h> int main() { v_init() ; return 0; } EOF -if { (eval echo configure:8023: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8205: \"$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' @@ -8052,12 +8234,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:8056: checking for SLtt_get_screen_size" >&5 +echo "configure:8238: 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 8061 "configure" +#line 8243 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char SLtt_get_screen_size(); below. */ @@ -8080,7 +8262,7 @@ SLtt_get_screen_size(); ; return 0; } EOF -if { (eval echo configure:8084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8266: \"$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 @@ -8100,17 +8282,17 @@ else cf_save_LIBS="$LIBS" echo $ac_n "checking for SLtt_get_screen_size in -lslang""... $ac_c" 1>&6 -echo "configure:8104: checking for SLtt_get_screen_size in -lslang" >&5 +echo "configure:8286: checking for SLtt_get_screen_size in -lslang" >&5 LIBS="-lslang $LIBS" cat > conftest.$ac_ext <<EOF -#line 8107 "configure" +#line 8289 "configure" #include "confdefs.h" #include <slang.h> int main() { SLtt_get_screen_size() ; return 0; } EOF -if { (eval echo configure:8114: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8296: \"$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' @@ -8154,17 +8336,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:8158: checking for -lslang in $cf_libdir" >&5 +echo "configure:8340: checking for -lslang in $cf_libdir" >&5 LIBS="-L$cf_libdir -lslang $cf_save_LIBS" cat > conftest.$ac_ext <<EOF -#line 8161 "configure" +#line 8343 "configure" #include "confdefs.h" #include <slang.h> int main() { SLtt_get_screen_size() ; return 0; } EOF -if { (eval echo configure:8168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8350: \"$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' @@ -8193,7 +8375,7 @@ fi cf_slang_LIBS3="$LIBS" echo $ac_n "checking if we can link slang without termcap""... $ac_c" 1>&6 -echo "configure:8197: checking if we can link slang without termcap" >&5 +echo "configure:8379: 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 @@ -8201,14 +8383,14 @@ else fi LIBS=`echo ".$cf_slang_LIBS3" | sed -e "s@$cf_exclude@@" -e 's@^.@@'` cat > conftest.$ac_ext <<EOF -#line 8205 "configure" +#line 8387 "configure" #include "confdefs.h" #include <slang.h> int main() { SLtt_get_screen_size() ; return 0; } EOF -if { (eval echo configure:8212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cf_result=yes else @@ -8225,13 +8407,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:8229: checking if we must tell slang this is UNIX" >&5 +echo "configure:8411: 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 8235 "configure" +#line 8417 "configure" #include "confdefs.h" #include <slang.h> int main() { @@ -8245,7 +8427,7 @@ SLang_TT_Baud_Rate = 1 ; return 0; } EOF -if { (eval echo configure:8249: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8431: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cf_cv_slang_unix=yes else @@ -8271,7 +8453,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:8275: checking for location of config-file" >&5 +echo "configure:8457: 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" @@ -8283,7 +8465,7 @@ CHARSET_DEFS= echo $ac_n "checking if you want only a few charsets""... $ac_c" 1>&6 -echo "configure:8287: checking if you want only a few charsets" >&5 +echo "configure:8469: 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 @@ -8344,12 +8526,12 @@ fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:8348: checking for ANSI C header files" >&5 +echo "configure:8530: 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 8353 "configure" +#line 8535 "configure" #include "confdefs.h" #include <stdlib.h> #include <stdarg.h> @@ -8357,7 +8539,7 @@ else #include <float.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8361: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8543: \"$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* @@ -8374,7 +8556,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 8378 "configure" +#line 8560 "configure" #include "confdefs.h" #include <string.h> EOF @@ -8392,7 +8574,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 8396 "configure" +#line 8578 "configure" #include "confdefs.h" #include <stdlib.h> EOF @@ -8413,7 +8595,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext <<EOF -#line 8417 "configure" +#line 8599 "configure" #include "confdefs.h" #include <ctype.h> #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -8424,7 +8606,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:8428: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:8610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -8448,12 +8630,12 @@ EOF fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:8452: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:8634: 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 8457 "configure" +#line 8639 "configure" #include "confdefs.h" #include <sys/types.h> #include <sys/time.h> @@ -8462,7 +8644,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:8466: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:8648: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -8487,12 +8669,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:8491: checking for $ac_hdr that defines DIR" >&5 +echo "configure:8673: 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 8496 "configure" +#line 8678 "configure" #include "confdefs.h" #include <sys/types.h> #include <$ac_hdr> @@ -8500,7 +8682,7 @@ int main() { DIR *dirp = 0; ; return 0; } EOF -if { (eval echo configure:8504: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:8686: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else @@ -8525,7 +8707,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:8529: checking for opendir in -ldir" >&5 +echo "configure:8711: 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 @@ -8533,7 +8715,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldir $LIBS" cat > conftest.$ac_ext <<EOF -#line 8537 "configure" +#line 8719 "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 @@ -8544,7 +8726,7 @@ int main() { opendir() ; return 0; } EOF -if { (eval echo configure:8548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8730: \"$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 @@ -8566,7 +8748,7 @@ fi else echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -echo "configure:8570: checking for opendir in -lx" >&5 +echo "configure:8752: 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 @@ -8574,7 +8756,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lx $LIBS" cat > conftest.$ac_ext <<EOF -#line 8578 "configure" +#line 8760 "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 @@ -8585,7 +8767,7 @@ int main() { opendir() ; return 0; } EOF -if { (eval echo configure:8589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8771: \"$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 @@ -8628,17 +8810,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:8632: checking for $ac_hdr" >&5 +echo "configure:8814: 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 8637 "configure" +#line 8819 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8642: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8824: \"$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* @@ -8666,13 +8848,13 @@ done echo $ac_n "checking termio.h and termios.h""... $ac_c" 1>&6 -echo "configure:8670: checking termio.h and termios.h" >&5 +echo "configure:8852: 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 8676 "configure" +#line 8858 "configure" #include "confdefs.h" #if HAVE_TERMIO_H @@ -8685,7 +8867,7 @@ int main() { putchar (0x0a) ; return 0; } EOF -if { (eval echo configure:8689: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:8871: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_termio_and_termios=yes else @@ -8705,13 +8887,13 @@ EOF echo $ac_n "checking for sigaction and structs""... $ac_c" 1>&6 -echo "configure:8709: checking for sigaction and structs" >&5 +echo "configure:8891: 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 8715 "configure" +#line 8897 "configure" #include "confdefs.h" #include <sys/types.h> @@ -8726,7 +8908,7 @@ struct sigaction act; ; return 0; } EOF -if { (eval echo configure:8730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8912: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cf_cv_func_sigaction=yes else @@ -8750,17 +8932,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:8754: checking for $ac_hdr" >&5 +echo "configure:8936: 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 8759 "configure" +#line 8941 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8764: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8946: \"$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* @@ -8797,17 +8979,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:8801: checking for $ac_hdr" >&5 +echo "configure:8983: 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 8806 "configure" +#line 8988 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8811: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8993: \"$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* @@ -8837,17 +9019,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:8841: checking for $ac_hdr" >&5 +echo "configure:9023: 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 8846 "configure" +#line 9028 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8851: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9033: \"$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* @@ -8888,13 +9070,13 @@ fi echo $ac_n "checking for union wait""... $ac_c" 1>&6 -echo "configure:8892: checking for union wait" >&5 +echo "configure:9074: 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 8898 "configure" +#line 9080 "configure" #include "confdefs.h" $cf_wait_headers int main() { @@ -8905,7 +9087,7 @@ int x; ; return 0; } EOF -if { (eval echo configure:8909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9091: \"$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 @@ -8916,7 +9098,7 @@ else rm -rf conftest* cat > conftest.$ac_ext <<EOF -#line 8920 "configure" +#line 9102 "configure" #include "confdefs.h" $cf_wait_headers int main() { @@ -8931,7 +9113,7 @@ union wait x; ; return 0; } EOF -if { (eval echo configure:8935: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9117: \"$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 @@ -8958,20 +9140,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:8962: checking if union wait can be used as wait-arg" >&5 +echo "configure:9144: 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 8968 "configure" +#line 9150 "configure" #include "confdefs.h" $cf_wait_headers int main() { union wait x; wait(&x) ; return 0; } EOF -if { (eval echo configure:8975: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9157: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_arg_union_wait=yes else @@ -8991,20 +9173,20 @@ EOF echo $ac_n "checking if union wait can be used as waitpid-arg""... $ac_c" 1>&6 -echo "configure:8995: checking if union wait can be used as waitpid-arg" >&5 +echo "configure:9177: 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 9001 "configure" +#line 9183 "configure" #include "confdefs.h" $cf_wait_headers int main() { union wait x; waitpid(0, &x, 0) ; return 0; } EOF -if { (eval echo configure:9008: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9190: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_arg_union_waitpid=yes else @@ -9030,17 +9212,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:9034: checking for $ac_hdr" >&5 +echo "configure:9216: 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 9039 "configure" +#line 9221 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9044: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9226: \"$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* @@ -9067,13 +9249,13 @@ fi done echo $ac_n "checking for standard varargs""... $ac_c" 1>&6 -echo "configure:9071: checking for standard varargs" >&5 +echo "configure:9253: 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 9077 "configure" +#line 9259 "configure" #include "confdefs.h" #if HAVE_STDARG_H @@ -9088,7 +9270,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:9092: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9274: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_ansi_varargs=yes else @@ -9108,12 +9290,12 @@ EOF echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:9112: checking for uid_t in sys/types.h" >&5 +echo "configure:9294: 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 9117 "configure" +#line 9299 "configure" #include "confdefs.h" #include <sys/types.h> EOF @@ -9142,7 +9324,7 @@ EOF fi echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6 -echo "configure:9146: checking type of array argument to getgroups" >&5 +echo "configure:9328: 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 @@ -9150,7 +9332,7 @@ else ac_cv_type_getgroups=cross else cat > conftest.$ac_ext <<EOF -#line 9154 "configure" +#line 9336 "configure" #include "confdefs.h" /* Thanks to Mike Rendell for this test. */ @@ -9175,7 +9357,7 @@ main() } EOF -if { (eval echo configure:9179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9361: \"$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 @@ -9189,7 +9371,7 @@ fi if test $ac_cv_type_getgroups = cross; then cat > conftest.$ac_ext <<EOF -#line 9193 "configure" +#line 9375 "configure" #include "confdefs.h" #include <unistd.h> EOF @@ -9213,12 +9395,12 @@ EOF echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:9217: checking for pid_t" >&5 +echo "configure:9399: 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 9222 "configure" +#line 9404 "configure" #include "confdefs.h" #include <sys/types.h> #if STDC_HEADERS @@ -9246,12 +9428,12 @@ EOF fi echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:9250: checking for uid_t in sys/types.h" >&5 +echo "configure:9432: 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 9255 "configure" +#line 9437 "configure" #include "confdefs.h" #include <sys/types.h> EOF @@ -9280,12 +9462,12 @@ EOF fi echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:9284: checking for mode_t" >&5 +echo "configure:9466: 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 9289 "configure" +#line 9471 "configure" #include "confdefs.h" #include <sys/types.h> #if STDC_HEADERS @@ -9316,17 +9498,17 @@ fi ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for vfork.h""... $ac_c" 1>&6 -echo "configure:9320: checking for vfork.h" >&5 +echo "configure:9502: 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 9325 "configure" +#line 9507 "configure" #include "confdefs.h" #include <vfork.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9330: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9512: \"$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* @@ -9351,18 +9533,18 @@ else fi echo $ac_n "checking for working vfork""... $ac_c" 1>&6 -echo "configure:9355: checking for working vfork" >&5 +echo "configure:9537: 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:9361: checking for vfork" >&5 +echo "configure:9543: 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 9366 "configure" +#line 9548 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char vfork(); below. */ @@ -9385,7 +9567,7 @@ vfork(); ; return 0; } EOF -if { (eval echo configure:9389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9571: \"$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 @@ -9407,7 +9589,7 @@ fi ac_cv_func_vfork_works=$ac_cv_func_vfork else cat > conftest.$ac_ext <<EOF -#line 9411 "configure" +#line 9593 "configure" #include "confdefs.h" /* Thanks to Paul Eggert for this test. */ #include <stdio.h> @@ -9502,7 +9684,7 @@ main() { } } EOF -if { (eval echo configure:9506: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9688: \"$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 @@ -9526,13 +9708,13 @@ fi echo $ac_n "checking if we should use fcntl or ioctl""... $ac_c" 1>&6 -echo "configure:9530: checking if we should use fcntl or ioctl" >&5 +echo "configure:9712: 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 9536 "configure" +#line 9718 "configure" #include "confdefs.h" #include <sys/types.h> @@ -9544,7 +9726,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:9548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cf_cv_fionbio=ioctl else @@ -9553,7 +9735,7 @@ else rm -rf conftest* cat > conftest.$ac_ext <<EOF -#line 9557 "configure" +#line 9739 "configure" #include "confdefs.h" #include <sys/types.h> @@ -9570,7 +9752,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:9574: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cf_cv_fionbio=fcntl else @@ -9593,20 +9775,20 @@ EOF echo $ac_n "checking for broken/missing definition of remove""... $ac_c" 1>&6 -echo "configure:9597: checking for broken/missing definition of remove" >&5 +echo "configure:9779: 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 9603 "configure" +#line 9785 "configure" #include "confdefs.h" #include <stdio.h> int main() { remove("dummy") ; return 0; } EOF -if { (eval echo configure:9610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9792: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cf_cv_baddef_remove=no else @@ -9614,7 +9796,7 @@ else cat conftest.$ac_ext >&5 rm -rf conftest* cat > conftest.$ac_ext <<EOF -#line 9618 "configure" +#line 9800 "configure" #include "confdefs.h" #include <stdio.h> int __unlink(name) { return unlink(name); } @@ -9622,7 +9804,7 @@ int main() { remove("dummy") ; return 0; } EOF -if { (eval echo configure:9626: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cf_cv_baddef_remove=yes else @@ -9646,13 +9828,13 @@ EOF echo $ac_n "checking for lstat""... $ac_c" 1>&6 -echo "configure:9650: checking for lstat" >&5 +echo "configure:9832: 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 9656 "configure" +#line 9838 "configure" #include "confdefs.h" #include <sys/types.h> @@ -9661,7 +9843,7 @@ int main() { lstat(".", (struct stat *)0) ; return 0; } EOF -if { (eval echo configure:9665: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9847: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_lstat=yes else @@ -9704,12 +9886,12 @@ for ac_func in \ do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:9708: checking for $ac_func" >&5 +echo "configure:9890: 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 9713 "configure" +#line 9895 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -9732,7 +9914,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:9736: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9918: \"$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 @@ -9762,12 +9944,12 @@ for ac_func in \ do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:9766: checking for $ac_func" >&5 +echo "configure:9948: 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 9771 "configure" +#line 9953 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -9790,7 +9972,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:9794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9976: \"$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 @@ -9819,7 +10001,7 @@ done echo $ac_n "checking for working mkstemp""... $ac_c" 1>&6 -echo "configure:9823: checking for working mkstemp" >&5 +echo "configure:10005: 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 @@ -9827,12 +10009,12 @@ else rm -f conftest* if test "$cross_compiling" = yes; then echo $ac_n "checking for mkstemp""... $ac_c" 1>&6 -echo "configure:9831: checking for mkstemp" >&5 +echo "configure:10013: 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 9836 "configure" +#line 10018 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char mkstemp(); below. */ @@ -9855,7 +10037,7 @@ mkstemp(); ; return 0; } EOF -if { (eval echo configure:9859: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10041: \"$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 @@ -9877,7 +10059,7 @@ fi else cat > conftest.$ac_ext <<EOF -#line 9881 "configure" +#line 10063 "configure" #include "confdefs.h" #include <sys/types.h> @@ -9914,7 +10096,7 @@ int main() } EOF -if { (eval echo configure:9918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10100: \"$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 @@ -9941,7 +10123,7 @@ fi echo $ac_n "checking for random-integer functions""... $ac_c" 1>&6 -echo "configure:9945: checking for random-integer functions" >&5 +echo "configure:10127: 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 @@ -9952,7 +10134,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 9956 "configure" +#line 10138 "configure" #include "confdefs.h" #ifdef HAVE_STDLIB_H @@ -9966,7 +10148,7 @@ int main() { long seed = 1; $cf_srand_func(seed); seed = $cf_rand_func() ; return 0; } EOF -if { (eval echo configure:9970: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10152: \"$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 @@ -9982,7 +10164,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:9986: checking for range of random-integers" >&5 +echo "configure:10168: 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 @@ -9998,7 +10180,7 @@ else ;; esac cat > conftest.$ac_ext <<EOF -#line 10002 "configure" +#line 10184 "configure" #include "confdefs.h" #ifdef HAVE_STDLIB_H @@ -10012,7 +10194,7 @@ int main() { long x = $cf_cv_rand_max ; return 0; } EOF -if { (eval echo configure:10016: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10198: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then : else echo "configure: failed program was:" >&5 @@ -10048,12 +10230,12 @@ for ac_func in strstr do echo $ac_n "checking for $ac_func declaration""... $ac_c" 1>&6 -echo "configure:10052: checking for $ac_func declaration" >&5 +echo "configure:10234: 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 10057 "configure" +#line 10239 "configure" #include "confdefs.h" #include <string.h> int main() { @@ -10062,11 +10244,11 @@ extern int ${ac_func}(); #endif ; return 0; } EOF -if { (eval echo configure:10066: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10248: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat > conftest.$ac_ext <<EOF -#line 10070 "configure" +#line 10252 "configure" #include "confdefs.h" #include <string.h> int main() { @@ -10075,7 +10257,7 @@ int (*p)() = ${ac_func}; #endif ; return 0; } EOF -if { (eval echo configure:10079: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10261: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_func_decl_$ac_func=yes" @@ -10117,12 +10299,12 @@ for ac_func in getgrgid getgrnam do echo $ac_n "checking for $ac_func declaration""... $ac_c" 1>&6 -echo "configure:10121: checking for $ac_func declaration" >&5 +echo "configure:10303: 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 10126 "configure" +#line 10308 "configure" #include "confdefs.h" #include <stdio.h> @@ -10133,11 +10315,11 @@ extern int ${ac_func}(); #endif ; return 0; } EOF -if { (eval echo configure:10137: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10319: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat > conftest.$ac_ext <<EOF -#line 10141 "configure" +#line 10323 "configure" #include "confdefs.h" #include <stdio.h> @@ -10148,7 +10330,7 @@ int (*p)() = ${ac_func}; #endif ; return 0; } EOF -if { (eval echo configure:10152: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10334: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_func_decl_$ac_func=yes" @@ -10190,13 +10372,13 @@ done echo $ac_n "checking if TRUE/FALSE are defined""... $ac_c" 1>&6 -echo "configure:10194: checking if TRUE/FALSE are defined" >&5 +echo "configure:10376: 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 10200 "configure" +#line 10382 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header-curses.h}> @@ -10205,7 +10387,7 @@ int main() { int x = TRUE, y = FALSE ; return 0; } EOF -if { (eval echo configure:10209: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10391: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_bool_defs=yes else @@ -10232,13 +10414,13 @@ fi echo $ac_n "checking if external errno is declared""... $ac_c" 1>&6 -echo "configure:10236: checking if external errno is declared" >&5 +echo "configure:10418: 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 10242 "configure" +#line 10424 "configure" #include "confdefs.h" #ifdef HAVE_STDLIB_H @@ -10251,27 +10433,24 @@ int main() { long x = (long) errno ; return 0; } EOF -if { (eval echo configure:10255: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10437: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - eval 'cf_cv_dcl_'errno'=yes' + cf_cv_dcl_errno=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval 'cf_cv_dcl_'errno'=no' + cf_cv_dcl_errno=no fi rm -f conftest* fi +echo "$ac_t""$cf_cv_dcl_errno" 1>&6 -eval 'cf_result=$cf_cv_dcl_'errno -echo "$ac_t""$cf_result" 1>&6 - -if test "$cf_result" = no ; then - eval 'cf_result=DECL_'errno +if test "$cf_cv_dcl_errno" = no ; then -cf_result=`echo "$cf_result" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%` +cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%` cat >> confdefs.h <<EOF #define $cf_result 1 @@ -10282,13 +10461,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:10286: checking if external errno exists" >&5 +echo "configure:10465: 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 10292 "configure" +#line 10471 "configure" #include "confdefs.h" #undef errno @@ -10298,26 +10477,24 @@ int main() { errno = 2 ; 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:10481: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - eval 'cf_cv_have_'errno'=yes' + cf_cv_have_errno=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval 'cf_cv_have_'errno'=no' + cf_cv_have_errno=no fi rm -f conftest* -fi +fi -eval 'cf_result=$cf_cv_have_'errno -echo "$ac_t""$cf_result" 1>&6 +echo "$ac_t""$cf_cv_have_errno" 1>&6 -if test "$cf_result" = yes ; then - eval 'cf_result=HAVE_'errno +if test "$cf_cv_have_errno" = yes ; then -cf_result=`echo "$cf_result" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%` +cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%` cat >> confdefs.h <<EOF #define $cf_result 1 @@ -10330,21 +10507,21 @@ fi echo $ac_n "checking if we can set errno""... $ac_c" 1>&6 -echo "configure:10334: checking if we can set errno" >&5 +echo "configure:10511: 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 10341 "configure" +#line 10518 "configure" #include "confdefs.h" #include <errno.h> int main() { errno = 255 ; return 0; } EOF -if { (eval echo configure:10348: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cf_cv_set_errno=maybe else @@ -10356,7 +10533,7 @@ fi rm -f conftest* else cat > conftest.$ac_ext <<EOF -#line 10360 "configure" +#line 10537 "configure" #include "confdefs.h" #include <errno.h> @@ -10366,7 +10543,7 @@ int main() exit(errno != 255); } EOF -if { (eval echo configure:10370: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10547: \"$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 @@ -10389,20 +10566,20 @@ EOF echo $ac_n "checking for setlocale()""... $ac_c" 1>&6 -echo "configure:10393: checking for setlocale()" >&5 +echo "configure:10570: 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 10399 "configure" +#line 10576 "configure" #include "confdefs.h" #include <locale.h> int main() { setlocale(LC_ALL, "") ; return 0; } EOF -if { (eval echo configure:10406: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10583: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cf_cv_locale=yes else @@ -10423,13 +10600,13 @@ EOF echo $ac_n "checking if NGROUPS is defined""... $ac_c" 1>&6 -echo "configure:10427: checking if NGROUPS is defined" >&5 +echo "configure:10604: 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 10433 "configure" +#line 10610 "configure" #include "confdefs.h" #if HAVE_SYS_PARAM_H @@ -10443,7 +10620,7 @@ int main() { int x = NGROUPS ; return 0; } EOF -if { (eval echo configure:10447: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10624: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_ngroups=yes else @@ -10451,7 +10628,7 @@ else cat conftest.$ac_ext >&5 rm -rf conftest* cat > conftest.$ac_ext <<EOF -#line 10455 "configure" +#line 10632 "configure" #include "confdefs.h" #if HAVE_SYS_PARAM_H @@ -10465,7 +10642,7 @@ int main() { int x = NGROUPS_MAX ; return 0; } EOF -if { (eval echo configure:10469: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10646: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_ngroups=NGROUPS_MAX else @@ -10479,6 +10656,9 @@ rm -f conftest* fi rm -f conftest* echo "$ac_t""$cf_cv_ngroups" 1>&6 + +fi + if test "$cf_cv_ngroups" = no ; then cat >> confdefs.h <<\EOF #define NGROUPS 16 @@ -10491,21 +10671,108 @@ EOF fi + + +echo $ac_n "checking if external sys_nerr is declared""... $ac_c" 1>&6 +echo "configure:10678: checking if external sys_nerr is declared" >&5 +if eval "test \"`echo '$''{'cf_cv_dcl_sys_nerr'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + cat > conftest.$ac_ext <<EOF +#line 10684 "configure" +#include "confdefs.h" + +#ifdef HAVE_STDLIB_H +#include <stdlib.h> +#endif +#include <stdio.h> +#include <sys/types.h> +#include <errno.h> +int main() { +long x = (long) sys_nerr +; return 0; } +EOF +if { (eval echo configure:10697: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + cf_cv_dcl_sys_nerr=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + cf_cv_dcl_sys_nerr=no fi +rm -f conftest* +fi +echo "$ac_t""$cf_cv_dcl_sys_nerr" 1>&6 -for cf_name in sys_nerr sys_errlist -do +if test "$cf_cv_dcl_sys_nerr" = no ; then -echo $ac_n "checking if external $cf_name is declared""... $ac_c" 1>&6 -echo "configure:10503: checking if external $cf_name is declared" >&5 -if eval "test \"`echo '$''{'cf_cv_dcl_$cf_name'+set}'`\" = set"; then +cf_result=`echo "decl_sys_nerr" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%` + + cat >> confdefs.h <<EOF +#define $cf_result 1 +EOF + +fi + +# It's possible (for near-UNIX clones) that the data doesn't exist + +echo $ac_n "checking if external sys_nerr exists""... $ac_c" 1>&6 +echo "configure:10725: checking if external sys_nerr exists" >&5 +if eval "test \"`echo '$''{'cf_cv_have_sys_nerr'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 10509 "configure" +#line 10731 "configure" +#include "confdefs.h" + +#undef sys_nerr +extern int sys_nerr; + +int main() { +sys_nerr = 2 +; return 0; } +EOF +if { (eval echo configure:10741: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + cf_cv_have_sys_nerr=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + cf_cv_have_sys_nerr=no +fi +rm -f conftest* + +fi + +echo "$ac_t""$cf_cv_have_sys_nerr" 1>&6 + +if test "$cf_cv_have_sys_nerr" = yes ; then + +cf_result=`echo "have_sys_nerr" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%` + + cat >> confdefs.h <<EOF +#define $cf_result 1 +EOF + +fi + + + + +echo $ac_n "checking if external sys_errlist is declared""... $ac_c" 1>&6 +echo "configure:10770: checking if external sys_errlist is declared" >&5 +if eval "test \"`echo '$''{'cf_cv_dcl_sys_errlist'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + cat > conftest.$ac_ext <<EOF +#line 10776 "configure" #include "confdefs.h" #ifdef HAVE_STDLIB_H @@ -10515,30 +10782,27 @@ else #include <sys/types.h> #include <errno.h> int main() { -long x = (long) $cf_name +long x = (long) sys_errlist ; return 0; } EOF -if { (eval echo configure:10522: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10789: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - eval 'cf_cv_dcl_'$cf_name'=yes' + cf_cv_dcl_sys_errlist=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval 'cf_cv_dcl_'$cf_name'=no' + cf_cv_dcl_sys_errlist=no fi rm -f conftest* fi +echo "$ac_t""$cf_cv_dcl_sys_errlist" 1>&6 -eval 'cf_result=$cf_cv_dcl_'$cf_name -echo "$ac_t""$cf_result" 1>&6 - -if test "$cf_result" = no ; then - eval 'cf_result=DECL_'$cf_name +if test "$cf_cv_dcl_sys_errlist" = no ; then -cf_result=`echo "$cf_result" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%` +cf_result=`echo "decl_sys_errlist" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%` cat >> confdefs.h <<EOF #define $cf_result 1 @@ -10548,43 +10812,41 @@ 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:10553: checking if external $cf_name exists" >&5 -if eval "test \"`echo '$''{'cf_cv_have_$cf_name'+set}'`\" = set"; then +echo $ac_n "checking if external sys_errlist exists""... $ac_c" 1>&6 +echo "configure:10817: checking if external sys_errlist exists" >&5 +if eval "test \"`echo '$''{'cf_cv_have_sys_errlist'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 10559 "configure" +#line 10823 "configure" #include "confdefs.h" -#undef $cf_name -extern int $cf_name; +#undef sys_errlist +extern int sys_errlist; int main() { -$cf_name = 2 +sys_errlist = 2 ; return 0; } EOF -if { (eval echo configure:10569: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10833: \"$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' + cf_cv_have_sys_errlist=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval 'cf_cv_have_'$cf_name'=no' + cf_cv_have_sys_errlist=no fi rm -f conftest* + fi +echo "$ac_t""$cf_cv_have_sys_errlist" 1>&6 -eval 'cf_result=$cf_cv_have_'$cf_name -echo "$ac_t""$cf_result" 1>&6 - -if test "$cf_result" = yes ; then - eval 'cf_result=HAVE_'$cf_name +if test "$cf_cv_have_sys_errlist" = yes ; then -cf_result=`echo "$cf_result" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%` +cf_result=`echo "have_sys_errlist" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%` cat >> confdefs.h <<EOF #define $cf_result 1 @@ -10594,24 +10856,23 @@ fi -done 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:10605: checking for $ac_hdr" >&5 +echo "configure:10866: 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 10610 "configure" +#line 10871 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:10615: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:10876: \"$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* @@ -10638,13 +10899,13 @@ fi done echo $ac_n "checking for lastlog path""... $ac_c" 1>&6 -echo "configure:10642: checking for lastlog path" >&5 +echo "configure:10903: 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 10648 "configure" +#line 10909 "configure" #include "confdefs.h" #include <sys/types.h> @@ -10659,7 +10920,7 @@ int main() { char *path = _PATH_LASTLOG ; return 0; } EOF -if { (eval echo configure:10663: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10924: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_path_lastlog="_PATH_LASTLOG" else @@ -10685,32 +10946,34 @@ EOF + echo $ac_n "checking for utmp implementation""... $ac_c" 1>&6 -echo "configure:10690: checking for utmp implementation" >&5 +echo "configure:10952: 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 cf_cv_have_utmp=no for cf_header in utmpx utmp ; do - cat > conftest.$ac_ext <<EOF -#line 10698 "configure" -#include "confdefs.h" - +cf_utmp_includes=" #include <sys/types.h> #include <${cf_header}.h> #define getutent getutxent #ifdef USE_LASTLOG #include <lastlog.h> /* may conflict with utmpx.h on Linux */ #endif - +" + cat > conftest.$ac_ext <<EOF +#line 10968 "configure" +#include "confdefs.h" +$cf_utmp_includes int main() { struct $cf_header x; char *name = x.ut_name; /* utmp.h and compatible definitions */ ; return 0; } EOF -if { (eval echo configure:10714: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10977: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_have_utmp=$cf_header break @@ -10720,29 +10983,18 @@ else rm -rf conftest* cat > conftest.$ac_ext <<EOF -#line 10724 "configure" +#line 10987 "configure" #include "confdefs.h" - -#include <sys/types.h> -#include <${cf_header}.h> -#define getutent getutxent -#ifdef USE_LASTLOG -#include <lastlog.h> /* may conflict with utmpx.h on Linux */ -#endif - +$cf_utmp_includes int main() { struct $cf_header x; char *name = x.ut_user; /* utmpx.h must declare this */ ; return 0; } EOF -if { (eval echo configure:10740: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10996: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_have_utmp=$cf_header - cat >> confdefs.h <<\EOF -#define ut_name ut_user -EOF - break else @@ -10768,16 +11020,15 @@ EOF 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:10775: checking if utmp.ut_host is declared" >&5 +echo "configure:11026: 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 10781 "configure" +#line 11032 "configure" #include "confdefs.h" #include <sys/types.h> @@ -10786,7 +11037,7 @@ int main() { struct $cf_cv_have_utmp x; char *y = &x.ut_host[0] ; return 0; } EOF -if { (eval echo configure:10790: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11041: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_have_utmp_ut_host=yes else @@ -10807,10 +11058,65 @@ EOF fi +if test $cf_cv_have_utmp != no ; then +echo $ac_n "checking if utmp.ut_name is declared""... $ac_c" 1>&6 +echo "configure:11064: checking if utmp.ut_name is declared" >&5 +if eval "test \"`echo '$''{'cf_cv_have_utmp_ut_name'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + cf_cv_have_utmp_ut_name=no +cf_utmp_includes=" +#include <sys/types.h> +#include <${cf_cv_have_utmp}.h> +#define getutent getutxent +#ifdef USE_LASTLOG +#include <lastlog.h> /* may conflict with utmpx.h on Linux */ +#endif +" +for cf_header in ut_name ut_user ; do + cat > conftest.$ac_ext <<EOF +#line 11080 "configure" +#include "confdefs.h" +$cf_utmp_includes +int main() { +struct $cf_cv_have_utmp x; + char *name = x.$cf_header; + +; return 0; } +EOF +if { (eval echo configure:11089: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + cf_cv_have_utmp_ut_name=$cf_header + break +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 +fi +rm -f conftest* +done + +fi + +echo "$ac_t""$cf_cv_have_utmp_ut_name" 1>&6 + +case $cf_cv_have_utmp_ut_name in #(vi +no) #(vi + { echo "configure: error: Cannot find declaration for ut.ut_name" 1>&2; exit 1; } + ;; +ut_user) + cat >> confdefs.h <<\EOF +#define ut_name ut_user +EOF + + ;; +esac +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:10814: checking for exit-status in $cf_cv_have_utmp" >&5 +echo "configure:11120: 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 @@ -10822,7 +11128,7 @@ for cf_result in \ ut_exit.ut_exit do cat > conftest.$ac_ext <<EOF -#line 10826 "configure" +#line 11132 "configure" #include "confdefs.h" #include <sys/types.h> @@ -10831,7 +11137,7 @@ int main() { struct $cf_cv_have_utmp x; long y = x.$cf_result = 0 ; return 0; } EOF -if { (eval echo configure:10835: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11141: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_have_utmp_ut_xstatus=$cf_result break @@ -10860,16 +11166,15 @@ fi 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:10867: checking if utmp.ut_xtime is declared" >&5 +echo "configure:11172: 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 10873 "configure" +#line 11178 "configure" #include "confdefs.h" #include <sys/types.h> @@ -10878,7 +11183,7 @@ int main() { struct $cf_cv_have_utmp x; long y = x.ut_xtime = 0 ; return 0; } EOF -if { (eval echo configure:10882: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11187: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_have_utmp_ut_xtime=yes else @@ -10886,7 +11191,7 @@ else cat conftest.$ac_ext >&5 rm -rf conftest* cat > conftest.$ac_ext <<EOF -#line 10890 "configure" +#line 11195 "configure" #include "confdefs.h" #include <sys/types.h> @@ -10895,7 +11200,7 @@ int main() { struct $cf_cv_have_utmp x; long y = x.ut_tv.tv_sec ; return 0; } EOF -if { (eval echo configure:10899: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11204: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_have_utmp_ut_xtime=define else @@ -10927,16 +11232,15 @@ fi 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:10934: checking if utmp.ut_session is declared" >&5 +echo "configure:11238: 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 10940 "configure" +#line 11244 "configure" #include "confdefs.h" #include <sys/types.h> @@ -10945,7 +11249,7 @@ int main() { struct $cf_cv_have_utmp x; long y = x.ut_session ; return 0; } EOF -if { (eval echo configure:10949: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11253: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_have_utmp_ut_session=yes else @@ -10968,16 +11272,15 @@ fi fi - echo $ac_n "checking if $cf_cv_have_utmp is SYSV flavor""... $ac_c" 1>&6 -echo "configure:10974: checking if $cf_cv_have_utmp is SYSV flavor" >&5 +echo "configure:11277: 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 10981 "configure" +#line 11284 "configure" #include "confdefs.h" #include <sys/types.h> @@ -10991,7 +11294,7 @@ struct $cf_cv_have_utmp x; end${cf_prefix}ent(); ; return 0; } EOF -if { (eval echo configure:10995: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11298: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cf_cv_sysv_utmp=yes else @@ -11014,13 +11317,13 @@ fi echo $ac_n "checking if external h_errno exists""... $ac_c" 1>&6 -echo "configure:11018: checking if external h_errno exists" >&5 +echo "configure:11321: 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 11024 "configure" +#line 11327 "configure" #include "confdefs.h" #undef h_errno @@ -11030,26 +11333,24 @@ int main() { h_errno = 2 ; return 0; } EOF -if { (eval echo configure:11034: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11337: \"$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' + cf_cv_have_h_errno=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval 'cf_cv_have_'h_errno'=no' + cf_cv_have_h_errno=no fi rm -f conftest* -fi +fi -eval 'cf_result=$cf_cv_have_'h_errno -echo "$ac_t""$cf_result" 1>&6 +echo "$ac_t""$cf_cv_have_h_errno" 1>&6 -if test "$cf_result" = yes ; then - eval 'cf_result=HAVE_'h_errno +if test "$cf_cv_have_h_errno" = yes ; then -cf_result=`echo "$cf_result" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%` +cf_result=`echo "have_h_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%` cat >> confdefs.h <<EOF #define $cf_result 1 @@ -11066,17 +11367,17 @@ if test $cf_cv_screen != slang ; then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:11070: checking for $ac_hdr" >&5 +echo "configure:11371: 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 11075 "configure" +#line 11376 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:11080: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:11381: \"$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* @@ -11105,7 +11406,7 @@ done fi echo $ac_n "checking if curses supports alternate-character set""... $ac_c" 1>&6 -echo "configure:11109: checking if curses supports alternate-character set" >&5 +echo "configure:11410: 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 @@ -11113,7 +11414,7 @@ else for mapname in acs_map _acs_map do cat > conftest.$ac_ext <<EOF -#line 11117 "configure" +#line 11418 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header-curses.h}> @@ -11122,7 +11423,7 @@ int main() { chtype x = $mapname['l']; $mapname['m'] = 0 ; return 0; } EOF -if { (eval echo configure:11126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11427: \"$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 @@ -11145,13 +11446,13 @@ EOF echo $ac_n "checking if curses supports fancy attributes""... $ac_c" 1>&6 -echo "configure:11149: checking if curses supports fancy attributes" >&5 +echo "configure:11450: 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 11155 "configure" +#line 11456 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header-curses.h}> @@ -11164,7 +11465,7 @@ attrset(A_UNDERLINE|A_BOLD|A_REVERSE); ; return 0; } EOF -if { (eval echo configure:11168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11469: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cf_cv_fancy_curses=yes else @@ -11187,13 +11488,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:11191: checking for obsolete/broken version of ncurses" >&5 +echo "configure:11492: 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 11197 "configure" +#line 11498 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header-curses.h}> @@ -11207,7 +11508,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:11211: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11512: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_ncurses_broken=no else @@ -11232,13 +11533,13 @@ fi echo $ac_n "checking if curses supports color attributes""... $ac_c" 1>&6 -echo "configure:11236: checking if curses supports color attributes" >&5 +echo "configure:11537: 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 11242 "configure" +#line 11543 "configure" #include "confdefs.h" #include <${cf_cv_ncurses_header-curses.h}> @@ -11253,7 +11554,7 @@ chtype x = COLOR_BLUE; ; return 0; } EOF -if { (eval echo configure:11257: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11558: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cf_cv_color_curses=yes else @@ -11287,17 +11588,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:11291: checking for $ac_hdr" >&5 +echo "configure:11592: 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 11296 "configure" +#line 11597 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:11301: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:11602: \"$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* @@ -11328,17 +11629,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:11332: checking for $ac_hdr" >&5 +echo "configure:11633: 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 11337 "configure" +#line 11638 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:11342: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:11643: \"$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* @@ -11373,16 +11674,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:11377: checking whether termios.h needs _POSIX_SOURCE" >&5 +echo "configure:11678: checking whether termios.h needs _POSIX_SOURCE" >&5 cat > conftest.$ac_ext <<EOF -#line 11379 "configure" +#line 11680 "configure" #include "confdefs.h" #include <termios.h> int main() { struct termios foo; int x = foo.c_iflag ; return 0; } EOF -if { (eval echo configure:11386: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11687: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* termios_bad=no else @@ -11391,7 +11692,7 @@ else rm -rf conftest* cat > conftest.$ac_ext <<EOF -#line 11395 "configure" +#line 11696 "configure" #include "confdefs.h" #define _POSIX_SOURCE @@ -11400,7 +11701,7 @@ int main() { struct termios foo; int x = foo.c_iflag ; return 0; } EOF -if { (eval echo configure:11404: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11705: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* termios_bad=unknown else @@ -11423,7 +11724,7 @@ fi echo $ac_n "checking declaration of size-change""... $ac_c" 1>&6 -echo "configure:11427: checking declaration of size-change" >&5 +echo "configure:11728: 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 @@ -11437,7 +11738,7 @@ do CPPFLAGS="$cf_save_CPPFLAGS" test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts" cat > conftest.$ac_ext <<EOF -#line 11441 "configure" +#line 11742 "configure" #include "confdefs.h" #include <sys/types.h> #ifdef HAVE_TERMIOS_H @@ -11476,7 +11777,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:11480: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11781: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_sizechange=yes else @@ -11515,20 +11816,20 @@ fi echo $ac_n "checking if ttytype is declared in curses library""... $ac_c" 1>&6 -echo "configure:11519: checking if ttytype is declared in curses library" >&5 +echo "configure:11820: 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 11525 "configure" +#line 11826 "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:11532: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11833: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cf_cv_have_ttytype=yes else @@ -11549,13 +11850,13 @@ EOF echo $ac_n "checking if curses supports wide characters""... $ac_c" 1>&6 -echo "configure:11553: checking if curses supports wide characters" >&5 +echo "configure:11854: 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 11559 "configure" +#line 11860 "configure" #include "confdefs.h" #include <stdlib.h> @@ -11569,7 +11870,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:11573: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cf_cv_widec_curses=yes else @@ -11592,13 +11893,13 @@ 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:11596: checking if we must include wchar.h to declare mbstate_t" >&5 +echo "configure:11897: 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 11602 "configure" +#line 11903 "configure" #include "confdefs.h" #include <stdlib.h> @@ -11607,7 +11908,7 @@ int main() { mbstate_t state ; return 0; } EOF -if { (eval echo configure:11611: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11912: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_widec_mbstate=no else @@ -11615,7 +11916,7 @@ else cat conftest.$ac_ext >&5 rm -rf conftest* cat > conftest.$ac_ext <<EOF -#line 11619 "configure" +#line 11920 "configure" #include "confdefs.h" #include <stdlib.h> @@ -11625,7 +11926,7 @@ int main() { mbstate_t state ; return 0; } EOF -if { (eval echo configure:11629: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11930: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_widec_mbstate=yes else @@ -11659,13 +11960,13 @@ fi echo $ac_n "checking if we must define _XOPEN_SOURCE_EXTENDED""... $ac_c" 1>&6 -echo "configure:11663: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5 +echo "configure:11964: 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 11669 "configure" +#line 11970 "configure" #include "confdefs.h" #include <stdlib.h> @@ -11675,7 +11976,7 @@ int main() { long x = winnstr(stdscr, "", 0) ; return 0; } EOF -if { (eval echo configure:11679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11980: \"$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 @@ -11683,7 +11984,7 @@ else cat conftest.$ac_ext >&5 rm -rf conftest* cat > conftest.$ac_ext <<EOF -#line 11687 "configure" +#line 11988 "configure" #include "confdefs.h" #define _XOPEN_SOURCE_EXTENDED @@ -11694,7 +11995,7 @@ int main() { long x = winnstr(stdscr, "", 0) ; return 0; } EOF -if { (eval echo configure:11698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11999: \"$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 @@ -11737,9 +12038,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:11741: checking for ${cf_func}" >&5 +echo "configure:12042: checking for ${cf_func}" >&5 -echo "(line 11743) testing ${cf_func} ..." 1>&5 +echo "(line 12044) 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 @@ -11748,7 +12049,7 @@ else eval cf_result='$ac_cv_func_'$cf_func if test ".$cf_result" != ".no"; then cat > conftest.$ac_ext <<EOF -#line 11752 "configure" +#line 12053 "configure" #include "confdefs.h" #ifdef HAVE_XCURSES @@ -11773,7 +12074,7 @@ exit(foo == 0); ; return 0; } EOF -if { (eval echo configure:11777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12078: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cf_result=yes else @@ -11805,7 +12106,7 @@ fi echo $ac_n "checking if bibp: URLs should be supported""... $ac_c" 1>&6 -echo "configure:11809: checking if bibp: URLs should be supported" >&5 +echo "configure:12110: 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 @@ -11829,7 +12130,7 @@ EOF echo $ac_n "checking if configuration info should be browsable""... $ac_c" 1>&6 -echo "configure:11833: checking if configuration info should be browsable" >&5 +echo "configure:12134: 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 @@ -11853,7 +12154,7 @@ EOF echo $ac_n "checking if new-style forms-based options screen should be used""... $ac_c" 1>&6 -echo "configure:11857: checking if new-style forms-based options screen should be used" >&5 +echo "configure:12158: 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 @@ -11877,7 +12178,7 @@ EOF echo $ac_n "checking if old-style options menu should be used""... $ac_c" 1>&6 -echo "configure:11881: checking if old-style options menu should be used" >&5 +echo "configure:12182: 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 @@ -11901,7 +12202,7 @@ EOF echo $ac_n "checking if experimental address-list page should be used""... $ac_c" 1>&6 -echo "configure:11905: checking if experimental address-list page should be used" >&5 +echo "configure:12206: 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 @@ -11925,7 +12226,7 @@ EOF echo $ac_n "checking if experimental charset-selection logic should be used""... $ac_c" 1>&6 -echo "configure:11929: checking if experimental charset-selection logic should be used" >&5 +echo "configure:12230: 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 @@ -11949,7 +12250,7 @@ EOF echo $ac_n "checking if experimental CJK logic should be used""... $ac_c" 1>&6 -echo "configure:11953: checking if experimental CJK logic should be used" >&5 +echo "configure:12254: 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 @@ -11973,7 +12274,7 @@ EOF echo $ac_n "checking if color-style code should be used""... $ac_c" 1>&6 -echo "configure:11977: checking if color-style code should be used" >&5 +echo "configure:12278: 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 @@ -12013,7 +12314,7 @@ EOF echo "$ac_t""yes" 1>&6 echo $ac_n "checking for location of style-sheet file""... $ac_c" 1>&6 -echo "configure:12017: checking for location of style-sheet file" >&5 +echo "configure:12318: 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" @@ -12031,7 +12332,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:12035: checking if you want to use default-colors" >&5 +echo "configure:12336: 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 @@ -12056,7 +12357,7 @@ EOF fi echo $ac_n "checking if experimental file-upload logic should be used""... $ac_c" 1>&6 -echo "configure:12060: checking if experimental file-upload logic should be used" >&5 +echo "configure:12361: 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 @@ -12080,7 +12381,7 @@ EOF echo $ac_n "checking if experimental htmlized lynx.cfg should be built""... $ac_c" 1>&6 -echo "configure:12084: checking if experimental htmlized lynx.cfg should be built" >&5 +echo "configure:12385: 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 @@ -12110,7 +12411,7 @@ fi ### check for ipv6 support echo $ac_n "checking whether to enable ipv6""... $ac_c" 1>&6 -echo "configure:12114: checking whether to enable ipv6" >&5 +echo "configure:12415: checking whether to enable ipv6" >&5 # Check whether --enable-ipv6 or --disable-ipv6 was given. if test "${enable_ipv6+set}" = set; then @@ -12131,7 +12432,7 @@ if test "$enableval" = "yes"; then echo $ac_n "checking ipv6 stack type""... $ac_c" 1>&6 -echo "configure:12135: checking ipv6 stack type" >&5 +echo "configure:12436: checking ipv6 stack type" >&5 if eval "test \"`echo '$''{'cf_cv_ipv6type'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -12151,7 +12452,7 @@ do ;; inria) #(vi cat > conftest.$ac_ext <<EOF -#line 12155 "configure" +#line 12456 "configure" #include "confdefs.h" #include <netinet/in.h> @@ -12169,7 +12470,7 @@ rm -f conftest* ;; kame) #(vi cat > conftest.$ac_ext <<EOF -#line 12173 "configure" +#line 12474 "configure" #include "confdefs.h" #include <netinet/in.h> @@ -12187,7 +12488,7 @@ rm -f conftest* ;; linux-glibc) #(vi cat > conftest.$ac_ext <<EOF -#line 12191 "configure" +#line 12492 "configure" #include "confdefs.h" #include <features.h> @@ -12214,7 +12515,7 @@ rm -f conftest* ;; toshiba) #(vi cat > conftest.$ac_ext <<EOF -#line 12218 "configure" +#line 12519 "configure" #include "confdefs.h" #include <sys/param.h> @@ -12232,7 +12533,7 @@ rm -f conftest* ;; v6d) #(vi cat > conftest.$ac_ext <<EOF -#line 12236 "configure" +#line 12537 "configure" #include "confdefs.h" #include </usr/local/v6/include/sys/v6config.h> @@ -12250,7 +12551,7 @@ rm -f conftest* ;; zeta) cat > conftest.$ac_ext <<EOF -#line 12254 "configure" +#line 12555 "configure" #include "confdefs.h" #include <sys/param.h> @@ -12283,7 +12584,7 @@ cf_ipv6lib=none cf_ipv6dir=none echo $ac_n "checking for ipv6 library if required""... $ac_c" 1>&6 -echo "configure:12287: checking for ipv6 library if required" >&5 +echo "configure:12588: checking for ipv6 library if required" >&5 case $cf_cv_ipv6type in #(vi solaris) #(vi ;; @@ -12317,7 +12618,7 @@ echo "$ac_t""$cf_ipv6lib" 1>&6 if test "$cf_ipv6lib" != "none"; then cat > conftest.$ac_ext <<EOF -#line 12321 "configure" +#line 12622 "configure" #include "confdefs.h" #include <sys/types.h> @@ -12328,7 +12629,7 @@ int main() { getaddrinfo(0, 0, 0, 0) ; return 0; } EOF -if { (eval echo configure:12332: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12633: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then : else echo "configure: failed program was:" >&5 @@ -12381,12 +12682,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:12385: checking for getaddrinfo" >&5 +echo "configure:12686: 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 12390 "configure" +#line 12691 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char getaddrinfo(); below. */ @@ -12409,7 +12710,7 @@ getaddrinfo(); ; 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:12714: \"$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 @@ -12429,10 +12730,10 @@ else cf_save_LIBS="$LIBS" echo $ac_n "checking for getaddrinfo in -l$cf_ipv6lib""... $ac_c" 1>&6 -echo "configure:12433: checking for getaddrinfo in -l$cf_ipv6lib" >&5 +echo "configure:12734: checking for getaddrinfo in -l$cf_ipv6lib" >&5 LIBS="-l$cf_ipv6lib $LIBS" cat > conftest.$ac_ext <<EOF -#line 12436 "configure" +#line 12737 "configure" #include "confdefs.h" #include <sys/types.h> @@ -12443,7 +12744,7 @@ int main() { getaddrinfo(0, 0, 0, 0) ; return 0; } EOF -if { (eval echo configure:12447: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12748: \"$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' @@ -12487,10 +12788,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:12491: checking for -l$cf_ipv6lib in $cf_libdir" >&5 +echo "configure:12792: 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 12494 "configure" +#line 12795 "configure" #include "confdefs.h" #include <sys/types.h> @@ -12501,7 +12802,7 @@ int main() { getaddrinfo(0, 0, 0, 0) ; return 0; } EOF -if { (eval echo configure:12505: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12806: \"$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' @@ -12534,7 +12835,7 @@ fi echo $ac_n "checking working getaddrinfo""... $ac_c" 1>&6 -echo "configure:12538: checking working getaddrinfo" >&5 +echo "configure:12839: checking working getaddrinfo" >&5 if eval "test \"`echo '$''{'cf_cv_getaddrinfo'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -12543,7 +12844,7 @@ if test "$cross_compiling" = yes; then cf_cv_getaddrinfo=unknown else cat > conftest.$ac_ext <<EOF -#line 12547 "configure" +#line 12848 "configure" #include "confdefs.h" #include <sys/types.h> @@ -12622,7 +12923,7 @@ int main() } EOF -if { (eval echo configure:12626: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:12927: \"$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 @@ -12665,7 +12966,7 @@ fi fi echo $ac_n "checking if experimental element-justification logic should be used""... $ac_c" 1>&6 -echo "configure:12669: checking if experimental element-justification logic should be used" >&5 +echo "configure:12970: 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 @@ -12689,7 +12990,7 @@ EOF echo $ac_n "checking if experimental keyboard-layout logic should be used""... $ac_c" 1>&6 -echo "configure:12693: checking if experimental keyboard-layout logic should be used" >&5 +echo "configure:12994: 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 @@ -12713,7 +13014,7 @@ EOF echo $ac_n "checking if experimental JavaScript support should be used""... $ac_c" 1>&6 -echo "configure:12717: checking if experimental JavaScript support should be used" >&5 +echo "configure:13018: 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 @@ -12737,7 +13038,7 @@ EOF echo $ac_n "checking if experimental nested-table logic should be used""... $ac_c" 1>&6 -echo "configure:12741: checking if experimental nested-table logic should be used" >&5 +echo "configure:13042: 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 @@ -12761,7 +13062,7 @@ EOF echo $ac_n "checking if html source should be colorized""... $ac_c" 1>&6 -echo "configure:12765: checking if html source should be colorized" >&5 +echo "configure:13066: checking if html source should be colorized" >&5 # Check whether --enable-prettysrc or --disable-prettysrc was given. if test "${enable_prettysrc+set}" = set; then @@ -12785,7 +13086,7 @@ EOF echo $ac_n "checking if read-progress message should show ETA""... $ac_c" 1>&6 -echo "configure:12789: checking if read-progress message should show ETA" >&5 +echo "configure:13090: 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 @@ -12809,7 +13110,7 @@ EOF echo $ac_n "checking if scrollbar code should be used""... $ac_c" 1>&6 -echo "configure:12813: checking if scrollbar code should be used" >&5 +echo "configure:13114: checking if scrollbar code should be used" >&5 # Check whether --enable-scrollbar or --disable-scrollbar was given. if test "${enable_scrollbar+set}" = set; then @@ -12840,7 +13141,7 @@ EOF fi echo $ac_n "checking if source caching should be used""... $ac_c" 1>&6 -echo "configure:12844: checking if source caching should be used" >&5 +echo "configure:13145: 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 @@ -12867,7 +13168,7 @@ EOF echo $ac_n "checking if alternative line-edit bindings should be used""... $ac_c" 1>&6 -echo "configure:12871: checking if alternative line-edit bindings should be used" >&5 +echo "configure:13172: 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 @@ -12891,7 +13192,7 @@ EOF echo $ac_n "checking if you want to use extended HTML DTD logic""... $ac_c" 1>&6 -echo "configure:12895: checking if you want to use extended HTML DTD logic" >&5 +echo "configure:13196: 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 @@ -12915,7 +13216,7 @@ EOF echo $ac_n "checking if partial-display should be used""... $ac_c" 1>&6 -echo "configure:12919: checking if partial-display should be used" >&5 +echo "configure:13220: checking if partial-display should be used" >&5 # Check whether --enable-partial or --disable-partial was given. if test "${enable_partial+set}" = set; then @@ -12939,7 +13240,7 @@ EOF echo $ac_n "checking if you want to use external commands""... $ac_c" 1>&6 -echo "configure:12943: checking if you want to use external commands" >&5 +echo "configure:13244: 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 @@ -12966,7 +13267,7 @@ EOF fi echo $ac_n "checking if you want to use setfont support""... $ac_c" 1>&6 -echo "configure:12970: checking if you want to use setfont support" >&5 +echo "configure:13271: 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 @@ -12990,7 +13291,7 @@ EOF echo $ac_n "checking if you want cgi-link support""... $ac_c" 1>&6 -echo "configure:12994: checking if you want cgi-link support" >&5 +echo "configure:13295: 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 @@ -13009,7 +13310,7 @@ fi echo "$ac_t""$enableval" 1>&6 echo $ac_n "checking if you want change-exec support""... $ac_c" 1>&6 -echo "configure:13013: checking if you want change-exec support" >&5 +echo "configure:13314: 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 @@ -13033,7 +13334,7 @@ EOF echo $ac_n "checking if you want exec-links support""... $ac_c" 1>&6 -echo "configure:13037: checking if you want exec-links support" >&5 +echo "configure:13338: 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 @@ -13057,7 +13358,7 @@ EOF echo $ac_n "checking if you want exec-scripts support""... $ac_c" 1>&6 -echo "configure:13061: checking if you want exec-scripts support" >&5 +echo "configure:13362: 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 @@ -13081,7 +13382,7 @@ EOF echo $ac_n "checking if you want internal-links feature""... $ac_c" 1>&6 -echo "configure:13085: checking if you want internal-links feature" >&5 +echo "configure:13386: 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 @@ -13105,7 +13406,7 @@ EOF echo $ac_n "checking if you want to fork NSL requests""... $ac_c" 1>&6 -echo "configure:13109: checking if you want to fork NSL requests" >&5 +echo "configure:13410: 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 @@ -13129,7 +13430,7 @@ EOF echo $ac_n "checking if you want to log URL requests via syslog""... $ac_c" 1>&6 -echo "configure:13133: checking if you want to log URL requests via syslog" >&5 +echo "configure:13434: 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 @@ -13153,7 +13454,7 @@ EOF echo $ac_n "checking if persistent-cookie logic should be used""... $ac_c" 1>&6 -echo "configure:13157: checking if persistent-cookie logic should be used" >&5 +echo "configure:13458: 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 @@ -13177,7 +13478,7 @@ EOF echo $ac_n "checking if you want to underline links""... $ac_c" 1>&6 -echo "configure:13181: checking if you want to underline links" >&5 +echo "configure:13482: checking if you want to underline links" >&5 # Check whether --enable-underlines or --disable-underlines was given. if test "${enable_underlines+set}" = set; then @@ -13201,7 +13502,7 @@ EOF echo $ac_n "checking if help files should be gzip'ed""... $ac_c" 1>&6 -echo "configure:13205: checking if help files should be gzip'ed" >&5 +echo "configure:13506: 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 @@ -13220,17 +13521,8 @@ fi echo "$ac_t""$use_gzip_help" 1>&6 -COMPRESS_PROG= -COMPRESS_EXT= -if test $use_gzip_help = yes ; then - COMPRESS_PROG=$ac_cv_path_GZIP - COMPRESS_EXT=.gz -fi - - - echo $ac_n "checking if you want to use zlib for decompression of some gzip files""... $ac_c" 1>&6 -echo "configure:13234: checking if you want to use zlib for decompression of some gzip files" >&5 +echo "configure:13526: 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 @@ -13244,16 +13536,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:13248: checking if we need to add -I option to get zlib.h" >&5 +echo "configure:13540: checking if we need to add -I option to get zlib.h" >&5 cat > conftest.$ac_ext <<EOF -#line 13250 "configure" +#line 13542 "configure" #include "confdefs.h" #include <zlib.h> int main() { ; return 0; } EOF -if { (eval echo configure:13257: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:13549: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""no" 1>&6 else @@ -13293,24 +13585,37 @@ cf_search="$cf_search $HOME/lib $HOME/lib/zlib $HOME/zlib/lib" do if test -f $cf_incdir/zlib.h ; then +cf_new_cflags= +cf_new_cppflags= for cf_add_cflags in -I$cf_incdir do case $cf_add_cflags in #(vi -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi case "$CPPFLAGS" in - *$cf_add_cflags) + *$cf_add_cflags) #(vi ;; - *) - CPPFLAGS="$CPPFLAGS $cf_add_cflags" + *) #(vi + cf_new_cppflags="$cf_new_cppflags $cf_add_cflags" ;; esac ;; *) - CFLAGS="$CFLAGS $cf_add_cflags" + cf_new_cflags="$cf_new_cflags $cf_add_cflags" ;; esac done +if test -n "$cf_new_cflags" ; then + + CFLAGS="$CFLAGS $cf_new_cflags" +fi + +if test -n "$cf_new_cppflags" ; then + + CPPFLAGS="$CPPFLAGS $cf_new_cppflags" +fi + + test -n "$verbose" && echo " ... found in $cf_incdir" 1>&6 break @@ -13325,12 +13630,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:13329: checking for gzopen" >&5 +echo "configure:13634: 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 13334 "configure" +#line 13639 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char gzopen(); below. */ @@ -13353,7 +13658,7 @@ gzopen(); ; return 0; } EOF -if { (eval echo configure:13357: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13662: \"$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 @@ -13373,17 +13678,17 @@ else cf_save_LIBS="$LIBS" echo $ac_n "checking for gzopen in -lz""... $ac_c" 1>&6 -echo "configure:13377: checking for gzopen in -lz" >&5 +echo "configure:13682: checking for gzopen in -lz" >&5 LIBS="-lz $LIBS" cat > conftest.$ac_ext <<EOF -#line 13380 "configure" +#line 13685 "configure" #include "confdefs.h" #include <zlib.h> int main() { gzopen("name","mode") ; return 0; } EOF -if { (eval echo configure:13387: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13692: \"$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' @@ -13427,17 +13732,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:13431: checking for -lz in $cf_libdir" >&5 +echo "configure:13736: checking for -lz in $cf_libdir" >&5 LIBS="-L$cf_libdir -lz $cf_save_LIBS" cat > conftest.$ac_ext <<EOF -#line 13434 "configure" +#line 13739 "configure" #include "confdefs.h" #include <zlib.h> int main() { gzopen("name","mode") ; return 0; } EOF -if { (eval echo configure:13441: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13746: \"$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' @@ -13471,7 +13776,7 @@ EOF fi echo $ac_n "checking if you want to exclude FINGER code""... $ac_c" 1>&6 -echo "configure:13475: checking if you want to exclude FINGER code" >&5 +echo "configure:13780: 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 @@ -13495,7 +13800,7 @@ EOF echo $ac_n "checking if you want to exclude GOPHER code""... $ac_c" 1>&6 -echo "configure:13499: checking if you want to exclude GOPHER code" >&5 +echo "configure:13804: 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 @@ -13519,7 +13824,7 @@ EOF echo $ac_n "checking if you want to exclude NEWS code""... $ac_c" 1>&6 -echo "configure:13523: checking if you want to exclude NEWS code" >&5 +echo "configure:13828: 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 @@ -13543,7 +13848,7 @@ EOF echo $ac_n "checking if you want to exclude FTP code""... $ac_c" 1>&6 -echo "configure:13547: checking if you want to exclude FTP code" >&5 +echo "configure:13852: 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 @@ -13572,7 +13877,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:13576: checking if directory-editor code should be used" >&5 +echo "configure:13881: 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 @@ -13599,7 +13904,7 @@ EOF echo $ac_n "checking if you wish to allow extracting from archives via DirEd""... $ac_c" 1>&6 -echo "configure:13603: checking if you wish to allow extracting from archives via DirEd" >&5 +echo "configure:13908: 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 @@ -13618,7 +13923,7 @@ fi echo "$ac_t""$enableval" 1>&6 echo $ac_n "checking if DirEd mode should override keys""... $ac_c" 1>&6 -echo "configure:13622: checking if DirEd mode should override keys" >&5 +echo "configure:13927: 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 @@ -13644,7 +13949,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:13648: checking if you wish to allow permissions commands via DirEd" >&5 +echo "configure:13953: 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 @@ -13670,7 +13975,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:13674: checking if you wish to allow executable-permission commands via DirEd" >&5 +echo "configure:13979: 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 @@ -13689,7 +13994,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:13693: checking if you wish to allow "tar" commands from DirEd" >&5 +echo "configure:13998: 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 @@ -13715,7 +14020,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:13719: checking if you wish to allow "uudecode" commands from DirEd" >&5 +echo "configure:14024: 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 @@ -13741,7 +14046,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:13745: checking if you wish to allow "zip" and "unzip" commands from DirEd" >&5 +echo "configure:14050: 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 @@ -13767,7 +14072,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:13771: checking if you wish to allow "gzip" and "gunzip" commands from DirEd" >&5 +echo "configure:14076: 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 @@ -13794,7 +14099,7 @@ fi fi echo $ac_n "checking if you want long-directory listings""... $ac_c" 1>&6 -echo "configure:13798: checking if you want long-directory listings" >&5 +echo "configure:14103: 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 @@ -13820,7 +14125,7 @@ fi echo "$ac_t""$enableval" 1>&6 echo $ac_n "checking if parent-directory references are permitted""... $ac_c" 1>&6 -echo "configure:13824: checking if parent-directory references are permitted" >&5 +echo "configure:14129: 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 @@ -13843,7 +14148,7 @@ test -z "$TELNET" && TELNET=telnet # Extract the first word of "telnet", so it can be a program name with args. set dummy telnet; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:13847: checking for $ac_word" >&5 +echo "configure:14152: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_TELNET'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -13931,7 +14236,7 @@ IFS="$cf_save_ifs" if test -n "$cf_path_prog" ; then -echo "(line 13935) testing defining path for ${cf_path_prog} ..." 1>&5 +echo "(line 14240) testing defining path for ${cf_path_prog} ..." 1>&5 cat >> confdefs.h <<EOF #define TELNET_PATH "$cf_path_prog" @@ -13948,7 +14253,7 @@ test -z "$TN3270" && TN3270=tn3270 # Extract the first word of "tn3270", so it can be a program name with args. set dummy tn3270; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:13952: checking for $ac_word" >&5 +echo "configure:14257: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_TN3270'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -14036,7 +14341,7 @@ IFS="$cf_save_ifs" if test -n "$cf_path_prog" ; then -echo "(line 14040) testing defining path for ${cf_path_prog} ..." 1>&5 +echo "(line 14345) testing defining path for ${cf_path_prog} ..." 1>&5 cat >> confdefs.h <<EOF #define TN3270_PATH "$cf_path_prog" @@ -14053,7 +14358,7 @@ test -z "$RLOGIN" && RLOGIN=rlogin # Extract the first word of "rlogin", so it can be a program name with args. set dummy rlogin; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:14057: checking for $ac_word" >&5 +echo "configure:14362: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_RLOGIN'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -14141,7 +14446,7 @@ IFS="$cf_save_ifs" if test -n "$cf_path_prog" ; then -echo "(line 14145) testing defining path for ${cf_path_prog} ..." 1>&5 +echo "(line 14450) testing defining path for ${cf_path_prog} ..." 1>&5 cat >> confdefs.h <<EOF #define RLOGIN_PATH "$cf_path_prog" @@ -14159,7 +14464,7 @@ test -z "$MV" && MV=mv # Extract the first word of "mv", so it can be a program name with args. set dummy mv; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:14163: checking for $ac_word" >&5 +echo "configure:14468: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_MV'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -14247,7 +14552,7 @@ IFS="$cf_save_ifs" if test -n "$cf_path_prog" ; then -echo "(line 14251) testing defining path for ${cf_path_prog} ..." 1>&5 +echo "(line 14556) testing defining path for ${cf_path_prog} ..." 1>&5 cat >> confdefs.h <<EOF #define MV_PATH "$cf_path_prog" @@ -14261,20 +14566,20 @@ fi -test -z "$UNCOMPRESS" && UNCOMPRESS=gunzip -# Extract the first word of "gunzip", so it can be a program name with args. -set dummy gunzip; ac_word=$2 +test -z "$GZIP" && GZIP=gzip +# Extract the first word of "gzip", so it can be a program name with args. +set dummy gzip; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:14269: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_UNCOMPRESS'+set}'`\" = set"; then +echo "configure:14574: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_GZIP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - case "$UNCOMPRESS" in + case "$GZIP" in /*) - ac_cv_path_UNCOMPRESS="$UNCOMPRESS" # Let the user override the test with a path. + ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path. ;; ?:/*) - ac_cv_path_UNCOMPRESS="$UNCOMPRESS" # Let the user override the test with a dos path. + ac_cv_path_GZIP="$GZIP" # Let the user override the test with a dos path. ;; *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" @@ -14282,18 +14587,18 @@ else for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then - ac_cv_path_UNCOMPRESS="$ac_dir/$ac_word" + ac_cv_path_GZIP="$ac_dir/$ac_word" break fi done IFS="$ac_save_ifs" - test -z "$ac_cv_path_UNCOMPRESS" && ac_cv_path_UNCOMPRESS="$UNCOMPRESS" + test -z "$ac_cv_path_GZIP" && ac_cv_path_GZIP="$GZIP" ;; esac fi -UNCOMPRESS="$ac_cv_path_UNCOMPRESS" -if test -n "$UNCOMPRESS"; then - echo "$ac_t""$UNCOMPRESS" 1>&6 +GZIP="$ac_cv_path_GZIP" +if test -n "$GZIP"; then + echo "$ac_t""$GZIP" 1>&6 else echo "$ac_t""no" 1>&6 fi @@ -14311,7 +14616,7 @@ os2*) #(vi ;; esac -for cf_temp in $ac_cv_path_UNCOMPRESS +for cf_temp in $ac_cv_path_GZIP do if test -z "$cf_path_prog" ; then if test "$with_full_paths" = yes ; then @@ -14353,33 +14658,33 @@ IFS="$cf_save_ifs" if test -n "$cf_path_prog" ; then -echo "(line 14357) testing defining path for ${cf_path_prog} ..." 1>&5 +echo "(line 14662) testing defining path for ${cf_path_prog} ..." 1>&5 cat >> confdefs.h <<EOF -#define UNCOMPRESS_PATH "$cf_path_prog" +#define GZIP_PATH "$cf_path_prog" EOF test -n "$cf_path_args" && cat >> confdefs.h <<EOF -#define UNCOMPRESS_ARGS "$cf_path_args" +#define GZIP_ARGS "$cf_path_args" EOF fi -test -z "$UNZIP" && UNZIP=unzip -# Extract the first word of "unzip", so it can be a program name with args. -set dummy unzip; ac_word=$2 +test -z "$UNCOMPRESS" && UNCOMPRESS=gunzip +# Extract the first word of "gunzip", so it can be a program name with args. +set dummy gunzip; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:14374: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_UNZIP'+set}'`\" = set"; then +echo "configure:14679: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_UNCOMPRESS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - case "$UNZIP" in + case "$UNCOMPRESS" in /*) - ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path. + ac_cv_path_UNCOMPRESS="$UNCOMPRESS" # Let the user override the test with a path. ;; ?:/*) - ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a dos path. + ac_cv_path_UNCOMPRESS="$UNCOMPRESS" # Let the user override the test with a dos path. ;; *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" @@ -14387,18 +14692,18 @@ else for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then - ac_cv_path_UNZIP="$ac_dir/$ac_word" + ac_cv_path_UNCOMPRESS="$ac_dir/$ac_word" break fi done IFS="$ac_save_ifs" - test -z "$ac_cv_path_UNZIP" && ac_cv_path_UNZIP="$UNZIP" + test -z "$ac_cv_path_UNCOMPRESS" && ac_cv_path_UNCOMPRESS="$UNCOMPRESS" ;; esac fi -UNZIP="$ac_cv_path_UNZIP" -if test -n "$UNZIP"; then - echo "$ac_t""$UNZIP" 1>&6 +UNCOMPRESS="$ac_cv_path_UNCOMPRESS" +if test -n "$UNCOMPRESS"; then + echo "$ac_t""$UNCOMPRESS" 1>&6 else echo "$ac_t""no" 1>&6 fi @@ -14416,7 +14721,7 @@ os2*) #(vi ;; esac -for cf_temp in $ac_cv_path_UNZIP +for cf_temp in $ac_cv_path_UNCOMPRESS do if test -z "$cf_path_prog" ; then if test "$with_full_paths" = yes ; then @@ -14458,33 +14763,33 @@ IFS="$cf_save_ifs" if test -n "$cf_path_prog" ; then -echo "(line 14462) testing defining path for ${cf_path_prog} ..." 1>&5 +echo "(line 14767) testing defining path for ${cf_path_prog} ..." 1>&5 cat >> confdefs.h <<EOF -#define UNZIP_PATH "$cf_path_prog" +#define UNCOMPRESS_PATH "$cf_path_prog" EOF test -n "$cf_path_args" && cat >> confdefs.h <<EOF -#define UNZIP_ARGS "$cf_path_args" +#define UNCOMPRESS_ARGS "$cf_path_args" EOF fi -test -z "$BZIP2" && BZIP2=bzip2 -# Extract the first word of "bzip2", so it can be a program name with args. -set dummy bzip2; ac_word=$2 +test -z "$UNZIP" && UNZIP=unzip +# Extract the first word of "unzip", so it can be a program name with args. +set dummy unzip; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:14479: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_BZIP2'+set}'`\" = set"; then +echo "configure:14784: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_UNZIP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - case "$BZIP2" in + case "$UNZIP" in /*) - ac_cv_path_BZIP2="$BZIP2" # Let the user override the test with a path. + ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path. ;; ?:/*) - ac_cv_path_BZIP2="$BZIP2" # Let the user override the test with a dos path. + ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a dos path. ;; *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" @@ -14492,18 +14797,18 @@ else for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then - ac_cv_path_BZIP2="$ac_dir/$ac_word" + ac_cv_path_UNZIP="$ac_dir/$ac_word" break fi done IFS="$ac_save_ifs" - test -z "$ac_cv_path_BZIP2" && ac_cv_path_BZIP2="$BZIP2" + test -z "$ac_cv_path_UNZIP" && ac_cv_path_UNZIP="$UNZIP" ;; esac fi -BZIP2="$ac_cv_path_BZIP2" -if test -n "$BZIP2"; then - echo "$ac_t""$BZIP2" 1>&6 +UNZIP="$ac_cv_path_UNZIP" +if test -n "$UNZIP"; then + echo "$ac_t""$UNZIP" 1>&6 else echo "$ac_t""no" 1>&6 fi @@ -14521,7 +14826,7 @@ os2*) #(vi ;; esac -for cf_temp in $ac_cv_path_BZIP2 +for cf_temp in $ac_cv_path_UNZIP do if test -z "$cf_path_prog" ; then if test "$with_full_paths" = yes ; then @@ -14563,36 +14868,33 @@ IFS="$cf_save_ifs" if test -n "$cf_path_prog" ; then -echo "(line 14567) testing defining path for ${cf_path_prog} ..." 1>&5 +echo "(line 14872) testing defining path for ${cf_path_prog} ..." 1>&5 cat >> confdefs.h <<EOF -#define BZIP2_PATH "$cf_path_prog" +#define UNZIP_PATH "$cf_path_prog" EOF test -n "$cf_path_args" && cat >> confdefs.h <<EOF -#define BZIP2_ARGS "$cf_path_args" +#define UNZIP_ARGS "$cf_path_args" EOF fi -if test ".$use_dired" != ".no" ; then - - -test -z "$COMPRESS" && COMPRESS=compress -# Extract the first word of "compress", so it can be a program name with args. -set dummy compress; ac_word=$2 +test -z "$BZIP2" && BZIP2=bzip2 +# Extract the first word of "bzip2", so it can be a program name with args. +set dummy bzip2; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:14587: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_COMPRESS'+set}'`\" = set"; then +echo "configure:14889: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_BZIP2'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - case "$COMPRESS" in + case "$BZIP2" in /*) - ac_cv_path_COMPRESS="$COMPRESS" # Let the user override the test with a path. + ac_cv_path_BZIP2="$BZIP2" # Let the user override the test with a path. ;; ?:/*) - ac_cv_path_COMPRESS="$COMPRESS" # Let the user override the test with a dos path. + ac_cv_path_BZIP2="$BZIP2" # Let the user override the test with a dos path. ;; *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" @@ -14600,18 +14902,18 @@ else for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then - ac_cv_path_COMPRESS="$ac_dir/$ac_word" + ac_cv_path_BZIP2="$ac_dir/$ac_word" break fi done IFS="$ac_save_ifs" - test -z "$ac_cv_path_COMPRESS" && ac_cv_path_COMPRESS="$COMPRESS" + test -z "$ac_cv_path_BZIP2" && ac_cv_path_BZIP2="$BZIP2" ;; esac fi -COMPRESS="$ac_cv_path_COMPRESS" -if test -n "$COMPRESS"; then - echo "$ac_t""$COMPRESS" 1>&6 +BZIP2="$ac_cv_path_BZIP2" +if test -n "$BZIP2"; then + echo "$ac_t""$BZIP2" 1>&6 else echo "$ac_t""no" 1>&6 fi @@ -14629,7 +14931,7 @@ os2*) #(vi ;; esac -for cf_temp in $ac_cv_path_COMPRESS +for cf_temp in $ac_cv_path_BZIP2 do if test -z "$cf_path_prog" ; then if test "$with_full_paths" = yes ; then @@ -14671,33 +14973,36 @@ IFS="$cf_save_ifs" if test -n "$cf_path_prog" ; then -echo "(line 14675) testing defining path for ${cf_path_prog} ..." 1>&5 +echo "(line 14977) testing defining path for ${cf_path_prog} ..." 1>&5 cat >> confdefs.h <<EOF -#define COMPRESS_PATH "$cf_path_prog" +#define BZIP2_PATH "$cf_path_prog" EOF test -n "$cf_path_args" && cat >> confdefs.h <<EOF -#define COMPRESS_ARGS "$cf_path_args" +#define BZIP2_ARGS "$cf_path_args" EOF fi -test -z "$GZIP" && GZIP=gzip -# Extract the first word of "gzip", so it can be a program name with args. -set dummy gzip; ac_word=$2 +if test ".$use_dired" != ".no" ; then + + +test -z "$COMPRESS" && COMPRESS=compress +# Extract the first word of "compress", so it can be a program name with args. +set dummy compress; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:14692: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_GZIP'+set}'`\" = set"; then +echo "configure:14997: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_COMPRESS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - case "$GZIP" in + case "$COMPRESS" in /*) - ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path. + ac_cv_path_COMPRESS="$COMPRESS" # Let the user override the test with a path. ;; ?:/*) - ac_cv_path_GZIP="$GZIP" # Let the user override the test with a dos path. + ac_cv_path_COMPRESS="$COMPRESS" # Let the user override the test with a dos path. ;; *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" @@ -14705,18 +15010,18 @@ else for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then - ac_cv_path_GZIP="$ac_dir/$ac_word" + ac_cv_path_COMPRESS="$ac_dir/$ac_word" break fi done IFS="$ac_save_ifs" - test -z "$ac_cv_path_GZIP" && ac_cv_path_GZIP="$GZIP" + test -z "$ac_cv_path_COMPRESS" && ac_cv_path_COMPRESS="$COMPRESS" ;; esac fi -GZIP="$ac_cv_path_GZIP" -if test -n "$GZIP"; then - echo "$ac_t""$GZIP" 1>&6 +COMPRESS="$ac_cv_path_COMPRESS" +if test -n "$COMPRESS"; then + echo "$ac_t""$COMPRESS" 1>&6 else echo "$ac_t""no" 1>&6 fi @@ -14734,7 +15039,7 @@ os2*) #(vi ;; esac -for cf_temp in $ac_cv_path_GZIP +for cf_temp in $ac_cv_path_COMPRESS do if test -z "$cf_path_prog" ; then if test "$with_full_paths" = yes ; then @@ -14776,14 +15081,14 @@ IFS="$cf_save_ifs" if test -n "$cf_path_prog" ; then -echo "(line 14780) testing defining path for ${cf_path_prog} ..." 1>&5 +echo "(line 15085) testing defining path for ${cf_path_prog} ..." 1>&5 cat >> confdefs.h <<EOF -#define GZIP_PATH "$cf_path_prog" +#define COMPRESS_PATH "$cf_path_prog" EOF test -n "$cf_path_args" && cat >> confdefs.h <<EOF -#define GZIP_ARGS "$cf_path_args" +#define COMPRESS_ARGS "$cf_path_args" EOF fi @@ -14793,7 +15098,7 @@ test -z "$RM" && RM=rm # Extract the first word of "rm", so it can be a program name with args. set dummy rm; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:14797: checking for $ac_word" >&5 +echo "configure:15102: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_RM'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -14881,7 +15186,7 @@ IFS="$cf_save_ifs" if test -n "$cf_path_prog" ; then -echo "(line 14885) testing defining path for ${cf_path_prog} ..." 1>&5 +echo "(line 15190) testing defining path for ${cf_path_prog} ..." 1>&5 cat >> confdefs.h <<EOF #define RM_PATH "$cf_path_prog" @@ -14898,7 +15203,7 @@ test -z "$TAR" && TAR=tar # Extract the first word of "tar", so it can be a program name with args. set dummy tar; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:14902: checking for $ac_word" >&5 +echo "configure:15207: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_TAR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -14986,7 +15291,7 @@ IFS="$cf_save_ifs" if test -n "$cf_path_prog" ; then -echo "(line 14990) testing defining path for ${cf_path_prog} ..." 1>&5 +echo "(line 15295) testing defining path for ${cf_path_prog} ..." 1>&5 cat >> confdefs.h <<EOF #define TAR_PATH "$cf_path_prog" @@ -15003,7 +15308,7 @@ test -z "$UUDECODE" && UUDECODE=uudecode # Extract the first word of "uudecode", so it can be a program name with args. set dummy uudecode; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:15007: checking for $ac_word" >&5 +echo "configure:15312: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_UUDECODE'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -15091,7 +15396,7 @@ IFS="$cf_save_ifs" if test -n "$cf_path_prog" ; then -echo "(line 15095) testing defining path for ${cf_path_prog} ..." 1>&5 +echo "(line 15400) testing defining path for ${cf_path_prog} ..." 1>&5 cat >> confdefs.h <<EOF #define UUDECODE_PATH "$cf_path_prog" @@ -15108,7 +15413,7 @@ test -z "$ZCAT" && ZCAT=zcat # Extract the first word of "zcat", so it can be a program name with args. set dummy zcat; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:15112: checking for $ac_word" >&5 +echo "configure:15417: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_ZCAT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -15196,7 +15501,7 @@ IFS="$cf_save_ifs" if test -n "$cf_path_prog" ; then -echo "(line 15200) testing defining path for ${cf_path_prog} ..." 1>&5 +echo "(line 15505) testing defining path for ${cf_path_prog} ..." 1>&5 cat >> confdefs.h <<EOF #define ZCAT_PATH "$cf_path_prog" @@ -15213,7 +15518,7 @@ test -z "$ZIP" && ZIP=zip # Extract the first word of "zip", so it can be a program name with args. set dummy zip; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:15217: checking for $ac_word" >&5 +echo "configure:15522: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_ZIP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -15301,7 +15606,7 @@ IFS="$cf_save_ifs" if test -n "$cf_path_prog" ; then -echo "(line 15305) testing defining path for ${cf_path_prog} ..." 1>&5 +echo "(line 15610) testing defining path for ${cf_path_prog} ..." 1>&5 cat >> confdefs.h <<EOF #define ZIP_PATH "$cf_path_prog" @@ -15314,6 +15619,7 @@ EOF fi + case "$INSTALL" in $srcdir*) # (vi cat >> confdefs.h <<EOF @@ -15328,7 +15634,7 @@ test -z "$INSTALL" && INSTALL=install # Extract the first word of "install", so it can be a program name with args. set dummy install; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:15332: checking for $ac_word" >&5 +echo "configure:15638: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_INSTALL'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -15416,7 +15722,7 @@ IFS="$cf_save_ifs" if test -n "$cf_path_prog" ; then -echo "(line 15420) testing defining path for ${cf_path_prog} ..." 1>&5 +echo "(line 15726) testing defining path for ${cf_path_prog} ..." 1>&5 cat >> confdefs.h <<EOF #define INSTALL_PATH "$cf_path_prog" @@ -15433,6 +15739,15 @@ fi esac fi +COMPRESS_PROG= +COMPRESS_EXT= +if test $use_gzip_help = yes ; then + COMPRESS_PROG="$ac_cv_path_GZIP -9" + COMPRESS_EXT=.gz +fi + + + if test $cf_cv_screen = pdcurses ; then # If we find X, set shell vars x_includes and x_libraries to the @@ -15440,7 +15755,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:15444: checking for X" >&5 +echo "configure:15759: checking for X" >&5 # Check whether --with-x or --without-x was given. @@ -15503,12 +15818,12 @@ if test "$ac_x_includes" = NO; then # First, try using that file with no special directory specified. cat > conftest.$ac_ext <<EOF -#line 15507 "configure" +#line 15822 "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:15512: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:15827: \"$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* @@ -15577,14 +15892,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 15581 "configure" +#line 15896 "configure" #include "confdefs.h" int main() { ${x_direct_test_function}() ; return 0; } EOF -if { (eval echo configure:15588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:15903: \"$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. @@ -15684,7 +15999,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:15688: checking for open in -lc_s" >&5 +echo "configure:16003: 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 @@ -15692,7 +16007,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lc_s $LIBS" cat > conftest.$ac_ext <<EOF -#line 15696 "configure" +#line 16011 "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 @@ -15703,7 +16018,7 @@ int main() { open() ; return 0; } EOF -if { (eval echo configure:15707: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:16022: \"$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 @@ -15720,7 +16035,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:15724: checking for gethostname in -lbsd" >&5 +echo "configure:16039: 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 @@ -15728,7 +16043,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lbsd $LIBS" cat > conftest.$ac_ext <<EOF -#line 15732 "configure" +#line 16047 "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 @@ -15739,7 +16054,7 @@ int main() { gethostname() ; return 0; } EOF -if { (eval echo configure:15743: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:16058: \"$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 @@ -15756,7 +16071,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:15760: checking for gethostname in -lnsl_s" >&5 +echo "configure:16075: 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 @@ -15764,7 +16079,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl_s $LIBS" cat > conftest.$ac_ext <<EOF -#line 15768 "configure" +#line 16083 "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 @@ -15775,7 +16090,7 @@ int main() { gethostname() ; return 0; } EOF -if { (eval echo configure:15779: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:16094: \"$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 @@ -15792,7 +16107,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:15796: checking for XOpenDisplay in -lX11_s" >&5 +echo "configure:16111: 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 @@ -15800,7 +16115,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lX11_s $LIBS" cat > conftest.$ac_ext <<EOF -#line 15804 "configure" +#line 16119 "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 @@ -15811,7 +16126,7 @@ int main() { XOpenDisplay() ; return 0; } EOF -if { (eval echo configure:15815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:16130: \"$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 @@ -15828,7 +16143,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:15832: checking for XtAppInitialize in -lXt_s" >&5 +echo "configure:16147: 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 @@ -15836,7 +16151,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lXt_s $LIBS" cat > conftest.$ac_ext <<EOF -#line 15840 "configure" +#line 16155 "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 @@ -15847,7 +16162,7 @@ int main() { XtAppInitialize() ; return 0; } EOF -if { (eval echo configure:15851: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:16166: \"$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 @@ -15888,7 +16203,7 @@ fi ;; *) echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6 -echo "configure:15892: checking for socket in -lsocket" >&5 +echo "configure:16207: 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 @@ -15896,7 +16211,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsocket $LIBS" cat > conftest.$ac_ext <<EOF -#line 15900 "configure" +#line 16215 "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 @@ -15907,7 +16222,7 @@ int main() { socket() ; return 0; } EOF -if { (eval echo configure:15911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:16226: \"$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 @@ -15935,7 +16250,7 @@ else fi echo $ac_n "checking for gethostname in -lnsl""... $ac_c" 1>&6 -echo "configure:15939: checking for gethostname in -lnsl" >&5 +echo "configure:16254: 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 @@ -15943,7 +16258,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <<EOF -#line 15947 "configure" +#line 16262 "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 @@ -15954,7 +16269,7 @@ int main() { gethostname() ; return 0; } EOF -if { (eval echo configure:15958: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:16273: \"$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 @@ -16005,17 +16320,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:16009: checking whether -R must be followed by a space" >&5 +echo "configure:16324: 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 16012 "configure" +#line 16327 "configure" #include "confdefs.h" int main() { ; return 0; } EOF -if { (eval echo configure:16019: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:16334: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_R_nospace=yes else @@ -16031,14 +16346,14 @@ rm -f conftest* else LIBS="$ac_xsave_LIBS -R $x_libraries" cat > conftest.$ac_ext <<EOF -#line 16035 "configure" +#line 16350 "configure" #include "confdefs.h" int main() { ; return 0; } EOF -if { (eval echo configure:16042: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:16357: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_R_space=yes else @@ -16070,7 +16385,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:16074: checking for dnet_ntoa in -ldnet" >&5 +echo "configure:16389: 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 @@ -16078,7 +16393,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldnet $LIBS" cat > conftest.$ac_ext <<EOF -#line 16082 "configure" +#line 16397 "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 @@ -16089,7 +16404,7 @@ int main() { dnet_ntoa() ; return 0; } EOF -if { (eval echo configure:16093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:16408: \"$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 @@ -16111,7 +16426,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:16115: checking for dnet_ntoa in -ldnet_stub" >&5 +echo "configure:16430: 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 @@ -16119,7 +16434,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldnet_stub $LIBS" cat > conftest.$ac_ext <<EOF -#line 16123 "configure" +#line 16438 "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 @@ -16130,7 +16445,7 @@ int main() { dnet_ntoa() ; return 0; } EOF -if { (eval echo configure:16134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:16449: \"$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 @@ -16159,12 +16474,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:16163: checking for gethostbyname" >&5 +echo "configure:16478: 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 16168 "configure" +#line 16483 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char gethostbyname(); below. */ @@ -16187,7 +16502,7 @@ gethostbyname(); ; return 0; } EOF -if { (eval echo configure:16191: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:16506: \"$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 @@ -16208,7 +16523,7 @@ fi if test $ac_cv_func_gethostbyname = no; then echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6 -echo "configure:16212: checking for gethostbyname in -lnsl" >&5 +echo "configure:16527: 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 @@ -16216,7 +16531,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <<EOF -#line 16220 "configure" +#line 16535 "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 @@ -16227,7 +16542,7 @@ int main() { gethostbyname() ; return 0; } EOF -if { (eval echo configure:16231: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:16546: \"$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 @@ -16257,12 +16572,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:16261: checking for connect" >&5 +echo "configure:16576: 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 16266 "configure" +#line 16581 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char connect(); below. */ @@ -16285,7 +16600,7 @@ connect(); ; return 0; } EOF -if { (eval echo configure:16289: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:16604: \"$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 @@ -16306,7 +16621,7 @@ fi if test $ac_cv_func_connect = no; then echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6 -echo "configure:16310: checking for connect in -lsocket" >&5 +echo "configure:16625: 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 @@ -16314,7 +16629,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsocket $X_EXTRA_LIBS $LIBS" cat > conftest.$ac_ext <<EOF -#line 16318 "configure" +#line 16633 "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 @@ -16325,7 +16640,7 @@ int main() { connect() ; return 0; } EOF -if { (eval echo configure:16329: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:16644: \"$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 @@ -16349,12 +16664,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:16353: checking for remove" >&5 +echo "configure:16668: 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 16358 "configure" +#line 16673 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char remove(); below. */ @@ -16377,7 +16692,7 @@ remove(); ; return 0; } EOF -if { (eval echo configure:16381: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:16696: \"$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 @@ -16398,7 +16713,7 @@ fi if test $ac_cv_func_remove = no; then echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6 -echo "configure:16402: checking for remove in -lposix" >&5 +echo "configure:16717: 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 @@ -16406,7 +16721,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lposix $LIBS" cat > conftest.$ac_ext <<EOF -#line 16410 "configure" +#line 16725 "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 @@ -16417,7 +16732,7 @@ int main() { remove() ; return 0; } EOF -if { (eval echo configure:16421: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:16736: \"$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 @@ -16441,12 +16756,12 @@ fi # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. echo $ac_n "checking for shmat""... $ac_c" 1>&6 -echo "configure:16445: checking for shmat" >&5 +echo "configure:16760: 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 16450 "configure" +#line 16765 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char shmat(); below. */ @@ -16469,7 +16784,7 @@ shmat(); ; return 0; } EOF -if { (eval echo configure:16473: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:16788: \"$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 @@ -16490,7 +16805,7 @@ fi if test $ac_cv_func_shmat = no; then echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6 -echo "configure:16494: checking for shmat in -lipc" >&5 +echo "configure:16809: 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 @@ -16498,7 +16813,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lipc $LIBS" cat > conftest.$ac_ext <<EOF -#line 16502 "configure" +#line 16817 "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 @@ -16509,7 +16824,7 @@ int main() { shmat() ; return 0; } EOF -if { (eval echo configure:16513: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:16828: \"$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 @@ -16542,7 +16857,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:16546: checking for IceConnectionNumber in -lICE" >&5 +echo "configure:16861: 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 @@ -16550,7 +16865,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lICE $X_EXTRA_LIBS $LIBS" cat > conftest.$ac_ext <<EOF -#line 16554 "configure" +#line 16869 "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 @@ -16561,7 +16876,7 @@ int main() { IceConnectionNumber() ; return 0; } EOF -if { (eval echo configure:16565: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:16880: \"$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 @@ -16587,26 +16902,72 @@ fi LDFLAGS="$LDFLAGS $X_LIBS" +test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6 + +cf_check_cflags="$CFLAGS" +cf_check_cppflags="$CPPFLAGS" + +cf_new_cflags= +cf_new_cppflags= for cf_add_cflags in $X_CFLAGS do case $cf_add_cflags in #(vi -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi case "$CPPFLAGS" in - *$cf_add_cflags) + *$cf_add_cflags) #(vi ;; - *) - CPPFLAGS="$CPPFLAGS $cf_add_cflags" + *) #(vi + cf_new_cppflags="$cf_new_cppflags $cf_add_cflags" ;; esac ;; *) - CFLAGS="$CFLAGS $cf_add_cflags" + cf_new_cflags="$cf_new_cflags $cf_add_cflags" ;; esac done +if test -n "$cf_new_cflags" ; then + test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6 + + CFLAGS="$CFLAGS $cf_new_cflags" +fi + +if test -n "$cf_new_cppflags" ; then + test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6 + + CPPFLAGS="$CPPFLAGS $cf_new_cppflags" +fi + + +if test "$cf_check_cflags" != "$CFLAGS" ; then +cat > conftest.$ac_ext <<EOF +#line 16946 "configure" +#include "confdefs.h" +#include <stdio.h> +int main() { +printf("Hello world"); +; return 0; } +EOF +if { (eval echo configure:16953: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + : +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6 + + if test "$cf_check_cppflags" != "$CPPFLAGS" ; then + test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6 + + fi + CFLAGS="$cf_check_flags" +fi +rm -f conftest* +fi + echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6 -echo "configure:16610: checking for XOpenDisplay in -lX11" >&5 +echo "configure:16971: 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 @@ -16614,7 +16975,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS" cat > conftest.$ac_ext <<EOF -#line 16618 "configure" +#line 16979 "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 @@ -16625,7 +16986,7 @@ int main() { XOpenDisplay() ; return 0; } EOF -if { (eval echo configure:16629: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:16990: \"$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 @@ -16646,7 +17007,7 @@ else fi echo $ac_n "checking for XtAppInitialize in -lXt""... $ac_c" 1>&6 -echo "configure:16650: checking for XtAppInitialize in -lXt" >&5 +echo "configure:17011: 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 @@ -16654,7 +17015,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS" cat > conftest.$ac_ext <<EOF -#line 16658 "configure" +#line 17019 "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 @@ -16665,7 +17026,7 @@ int main() { XtAppInitialize() ; return 0; } EOF -if { (eval echo configure:16669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:17030: \"$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 @@ -16693,24 +17054,70 @@ fi else LDFLAGS="$LDFLAGS $X_LIBS" +test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6 + +cf_check_cflags="$CFLAGS" +cf_check_cppflags="$CPPFLAGS" + +cf_new_cflags= +cf_new_cppflags= for cf_add_cflags in $X_CFLAGS do case $cf_add_cflags in #(vi -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi case "$CPPFLAGS" in - *$cf_add_cflags) + *$cf_add_cflags) #(vi ;; - *) - CPPFLAGS="$CPPFLAGS $cf_add_cflags" + *) #(vi + cf_new_cppflags="$cf_new_cppflags $cf_add_cflags" ;; esac ;; *) - CFLAGS="$CFLAGS $cf_add_cflags" + cf_new_cflags="$cf_new_cflags $cf_add_cflags" ;; esac done +if test -n "$cf_new_cflags" ; then + test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6 + + CFLAGS="$CFLAGS $cf_new_cflags" +fi + +if test -n "$cf_new_cppflags" ; then + test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6 + + CPPFLAGS="$CPPFLAGS $cf_new_cppflags" +fi + + +if test "$cf_check_cflags" != "$CFLAGS" ; then +cat > conftest.$ac_ext <<EOF +#line 17098 "configure" +#include "confdefs.h" +#include <stdio.h> +int main() { +printf("Hello world"); +; return 0; } +EOF +if { (eval echo configure:17105: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + : +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6 + + if test "$cf_check_cppflags" != "$CPPFLAGS" ; then + test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6 + + fi + CFLAGS="$cf_check_flags" +fi +rm -f conftest* +fi + fi if test $cf_have_X_LIBS = no ; then @@ -16740,7 +17147,7 @@ fi echo $ac_n "checking for XextCreateExtension in -lXext""... $ac_c" 1>&6 -echo "configure:16744: checking for XextCreateExtension in -lXext" >&5 +echo "configure:17151: 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 @@ -16748,7 +17155,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lXext $LIBS" cat > conftest.$ac_ext <<EOF -#line 16752 "configure" +#line 17159 "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 @@ -16759,7 +17166,7 @@ int main() { XextCreateExtension() ; return 0; } EOF -if { (eval echo configure:16763: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:17170: \"$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 @@ -16796,13 +17203,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:16800: checking for $cf_test in $cf_path" >&5 +echo "configure:17207: checking for $cf_test in $cf_path" >&5 else echo $ac_n "checking for $cf_test""... $ac_c" 1>&6 -echo "configure:16803: checking for $cf_test" >&5 +echo "configure:17210: checking for $cf_test" >&5 fi cat > conftest.$ac_ext <<EOF -#line 16806 "configure" +#line 17213 "configure" #include "confdefs.h" #include <X11/Intrinsic.h> @@ -16811,7 +17218,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:16815: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:17222: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_result=yes else @@ -16837,21 +17244,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:16841: checking for $cf_lib in $cf_path" >&5 +echo "configure:17248: 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:16845: checking for $cf_test in $cf_lib" >&5 +echo "configure:17252: checking for $cf_test in $cf_lib" >&5 fi cat > conftest.$ac_ext <<EOF -#line 16848 "configure" +#line 17255 "configure" #include "confdefs.h" int main() { $cf_test() ; return 0; } EOF -if { (eval echo configure:16855: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:17262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cf_result=yes else @@ -16891,26 +17298,72 @@ EOF LDFLAGS="$LDFLAGS $X_LIBS" +test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6 + +cf_check_cflags="$CFLAGS" +cf_check_cppflags="$CPPFLAGS" + +cf_new_cflags= +cf_new_cppflags= for cf_add_cflags in $X_CFLAGS do case $cf_add_cflags in #(vi -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi case "$CPPFLAGS" in - *$cf_add_cflags) + *$cf_add_cflags) #(vi ;; - *) - CPPFLAGS="$CPPFLAGS $cf_add_cflags" + *) #(vi + cf_new_cppflags="$cf_new_cppflags $cf_add_cflags" ;; esac ;; *) - CFLAGS="$CFLAGS $cf_add_cflags" + cf_new_cflags="$cf_new_cflags $cf_add_cflags" ;; esac done +if test -n "$cf_new_cflags" ; then + test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6 + + CFLAGS="$CFLAGS $cf_new_cflags" +fi + +if test -n "$cf_new_cppflags" ; then + test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6 + + CPPFLAGS="$CPPFLAGS $cf_new_cppflags" +fi + + +if test "$cf_check_cflags" != "$CFLAGS" ; then +cat > conftest.$ac_ext <<EOF +#line 17342 "configure" +#include "confdefs.h" +#include <stdio.h> +int main() { +printf("Hello world"); +; return 0; } +EOF +if { (eval echo configure:17349: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + : +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6 + + if test "$cf_check_cppflags" != "$CPPFLAGS" ; then + test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6 + + fi + CFLAGS="$cf_check_flags" +fi +rm -f conftest* +fi + echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6 -echo "configure:16914: checking for XOpenDisplay in -lX11" >&5 +echo "configure:17367: 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 @@ -16918,7 +17371,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS" cat > conftest.$ac_ext <<EOF -#line 16922 "configure" +#line 17375 "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 @@ -16929,7 +17382,7 @@ int main() { XOpenDisplay() ; return 0; } EOF -if { (eval echo configure:16933: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:17386: \"$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 @@ -16950,14 +17403,14 @@ else fi echo $ac_n "checking for XCurses library""... $ac_c" 1>&6 -echo "configure:16954: checking for XCurses library" >&5 +echo "configure:17407: 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 16961 "configure" +#line 17414 "configure" #include "confdefs.h" #include <xcurses.h> @@ -16967,7 +17420,7 @@ int main() { XCursesExit(); ; return 0; } EOF -if { (eval echo configure:16971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:17424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cf_cv_lib_XCurses=yes else @@ -17001,7 +17454,7 @@ fi else echo $ac_n "checking if we can include termio.h with curses""... $ac_c" 1>&6 -echo "configure:17005: checking if we can include termio.h with curses" >&5 +echo "configure:17458: 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 @@ -17010,7 +17463,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 17014 "configure" +#line 17467 "configure" #include "confdefs.h" #include <LYCurses.h> @@ -17019,7 +17472,7 @@ int main() { putchar(0x0a) ; return 0; } EOF -if { (eval echo configure:17023: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:17476: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cf_cv_termio_and_curses=yes else @@ -17255,23 +17708,23 @@ s%@LIBOBJS@%$LIBOBJS%g s%@INSTALL_LSS@%$INSTALL_LSS%g s%@LYNXCFG_MAKE@%$LYNXCFG_MAKE%g s%@LYNXCFG_URL@%$LYNXCFG_URL%g -s%@COMPRESS_PROG@%$COMPRESS_PROG%g -s%@COMPRESS_EXT@%$COMPRESS_EXT%g s%@TELNET@%$TELNET%g s%@TN3270@%$TN3270%g s%@RLOGIN@%$RLOGIN%g s%@MV@%$MV%g +s%@GZIP@%$GZIP%g s%@UNCOMPRESS@%$UNCOMPRESS%g s%@UNZIP@%$UNZIP%g s%@BZIP2@%$BZIP2%g s%@COMPRESS@%$COMPRESS%g -s%@GZIP@%$GZIP%g s%@RM@%$RM%g s%@TAR@%$TAR%g s%@UUDECODE@%$UUDECODE%g s%@ZCAT@%$ZCAT%g s%@ZIP@%$ZIP%g s%@INSTALL@%$INSTALL%g +s%@COMPRESS_PROG@%$COMPRESS_PROG%g +s%@COMPRESS_EXT@%$COMPRESS_EXT%g s%@X_CFLAGS@%$X_CFLAGS%g s%@X_PRE_LIBS@%$X_PRE_LIBS%g s%@X_LIBS@%$X_LIBS%g diff --git a/configure.in b/configure.in index 00a0b02f..e0a4644b 100644 --- a/configure.in +++ b/configure.in @@ -5,9 +5,16 @@ dnl and Jim Spath <jspath@mail.bcpl.lib.md.us> AC_PREREQ(2.12.971222) AC_INIT(userdefs.h) + +# autoconf 2.5x defaults to no cache file; we need the cache file's information +# for building the config page. But start with it empty to avoid confusion by +# people who don't do a "make distclean" after applying patches. +cache_file=config.cache rm -f config.cache; touch config.cache + CONFIG_H=lynx_cfg.h AC_CONFIG_HEADER($CONFIG_H:config.hin) + CF_CHECK_CACHE PACKAGE=lynx @@ -130,6 +137,26 @@ then fi fi +AC_MSG_CHECKING(if you want to link with dbmalloc for testing) +AC_ARG_WITH(dbmalloc, + [ --with-dbmalloc test: use Conor Cahill's dbmalloc library], + [with_dbmalloc=$withval], + [with_dbmalloc=no]) +AC_MSG_RESULT($with_dbmalloc) +if test $with_dbmalloc = yes ; then + AC_CHECK_LIB(dbmalloc,debug_malloc) +fi + +AC_MSG_CHECKING(if you want to link with dmalloc for testing) +AC_ARG_WITH(dmalloc, + [ --with-dmalloc test: use Gray Watson's dmalloc library], + [with_dmalloc=$withval], + [with_dmalloc=no]) +AC_MSG_RESULT($with_dmalloc) +if test $with_dmalloc = yes ; then + AC_CHECK_LIB(dmalloc,dmalloc_debug) +fi + dnl -------------------------------------------------------------------------- dnl Checks for compiler & standard-library characteristics dnl -------------------------------------------------------------------------- @@ -309,16 +336,7 @@ CF_GNU_SOURCE dnl Collect tests for compiler options into one place if test -n "$TRY_CFLAGS" ; then - cf_save_CFLAGS="$CFLAGS" - cf_save_CPPFLAGS="$CPPFLAGS" - CF_ADD_CFLAGS($TRY_CFLAGS) - AC_MSG_CHECKING(if we should use compile options $TRY_CFLAGS) - AC_TRY_COMPILE([#include <stdio.h>],[FILE *fp = stdin],[cf_result=yes],[cf_result=no]) - AC_MSG_RESULT($cf_result) - if test "$cf_result" = no ; then - CFLAGS="$cf_save_CFLAGS" - CPPFLAGS="$cf_save_CPPFLAGS" - fi + CF_CHECK_CFLAGS($TRY_CFLAGS) fi dnl -------------------------------------------------------------------------- @@ -381,11 +399,11 @@ ncurses|ncursesw|slang) pdcurses) cf_cv_ncurses_header=xcurses.h ;; -curses) - if eval "test \"`echo '$''{'cf_cv_ncurses_header'+set}'`\" != set"; then - cf_cv_ncurses_header=curses.h - fi - ;; +#curses) +# if eval "test \"`echo '$''{'cf_cv_ncurses_header'+set}'`\" != set"; then +# cf_cv_ncurses_header=curses.h +# fi +# ;; esac case $cf_cv_screen in @@ -945,15 +963,6 @@ CF_ARG_ENABLE(gzip-help, [use_gzip_help=no]) AC_MSG_RESULT($use_gzip_help) -COMPRESS_PROG= -COMPRESS_EXT= -if test $use_gzip_help = yes ; then - COMPRESS_PROG=$ac_cv_path_GZIP - COMPRESS_EXT=.gz -fi -AC_SUBST(COMPRESS_PROG) -AC_SUBST(COMPRESS_EXT) - AC_MSG_CHECKING(if you want to use zlib for decompression of some gzip files) AC_ARG_WITH(zlib, [ --with-zlib use zlib for decompression of some gzip files], @@ -1095,6 +1104,7 @@ CF_PATH_PROG(RLOGIN, rlogin) CF_PATH_PROG(MV, mv) +CF_PATH_PROG(GZIP, gzip) CF_PATH_PROG(UNCOMPRESS,gunzip) CF_PATH_PROG(UNZIP, unzip) CF_PATH_PROG(BZIP2, bzip2) @@ -1105,12 +1115,12 @@ dnl -------------------------------------------------------------------------- if test ".$use_dired" != ".no" ; then CF_PATH_PROG(COMPRESS, compress) -CF_PATH_PROG(GZIP, gzip) CF_PATH_PROG(RM, rm) CF_PATH_PROG(TAR, tar) CF_PATH_PROG(UUDECODE, uudecode) CF_PATH_PROG(ZCAT, zcat) CF_PATH_PROG(ZIP, zip) + dnl builtin: CF_PATH_PROG(CHMOD, chmod) dnl builtin: CF_PATH_PROG(COPY, cp) dnl builtin: CF_PATH_PROG(MKDIR, mkdir) @@ -1130,6 +1140,15 @@ $srcdir*) # (vi esac fi +COMPRESS_PROG= +COMPRESS_EXT= +if test $use_gzip_help = yes ; then + COMPRESS_PROG="$ac_cv_path_GZIP -9" + COMPRESS_EXT=.gz +fi +AC_SUBST(COMPRESS_PROG) +AC_SUBST(COMPRESS_EXT) + if test $cf_cv_screen = pdcurses ; then CF_HELP_MESSAGE(Special Libraries for PDCurses X11:) CF_PDCURSES_X11 diff --git a/install.sh b/install.sh index a9611d9e..3c4efb3a 100755 --- a/install.sh +++ b/install.sh @@ -1,15 +1,27 @@ #! /bin/sh # # install - install a program, script, or datafile -# This comes from X11R5. +# This comes from X11R5 (mit/util/scripts/install.sh). +# +# Copyright 1991 by the Massachusetts Institute of Technology +# +# Permission to use, copy, modify, distribute, and sell this software and its +# documentation for any purpose is hereby granted without fee, provided that +# the above copyright notice appear in all copies and that both that +# copyright notice and this permission notice appear in supporting +# documentation, and that the name of M.I.T. not be used in advertising or +# publicity pertaining to distribution of the software without specific, +# written prior permission. M.I.T. makes no representations about the +# suitability of this software for any purpose. It is provided "as is" +# without express or implied warranty. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written -# from scratch. -# +# from scratch. It can only install one file at a time, a restriction +# shared with many OS's install programs. # set DOITPROG to echo to test this script @@ -29,7 +41,7 @@ stripprog="${STRIPPROG-strip}" rmprog="${RMPROG-rm}" mkdirprog="${MKDIRPROG-mkdir}" -tranformbasename="" +transformbasename="" transform_arg="" instcmd="$mvprog" chmodcmd="$chmodprog 0755" @@ -97,38 +109,39 @@ then echo "install: no input file specified" exit 1 else - true + : fi if [ x"$dir_arg" != x ]; then dst=$src src="" - + if [ -d $dst ]; then instcmd=: + chmodcmd="" else - instcmd=mkdir + instcmd=$mkdirprog fi else # Waiting for this to be detected by the "$instcmd $src $dsttmp" command -# might cause directories to be created, which would be especially bad +# might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if [ -f $src -o -d $src ] then - true + : else echo "install: $src does not exist" exit 1 fi - + if [ x"$dst" = x ] then echo "install: no destination specified" exit 1 else - true + : fi # If destination is a directory, append the input filename; if your system @@ -138,7 +151,7 @@ else then dst="$dst"/`basename $src` else - true + : fi fi @@ -150,8 +163,8 @@ dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` # Skip lots of stat calls in the usual case. if [ ! -d "$dstdir" ]; then -defaultIFS=' -' +defaultIFS=' + ' IFS="${IFS-${defaultIFS}}" oIFS="${IFS}" @@ -170,7 +183,7 @@ while [ $# -ne 0 ] ; do then $mkdirprog "${pathcomp}" else - true + : fi pathcomp="${pathcomp}/" @@ -181,29 +194,29 @@ if [ x"$dir_arg" != x ] then $doit $instcmd $dst && - if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi && - if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi && - if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi && - if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi + if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else : ; fi && + if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else : ; fi && + if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else : ; fi && + if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else : ; fi else # If we're going to rename the final executable, determine the name now. - if [ x"$transformarg" = x ] + if [ x"$transformarg" = x ] then dstfile=`basename $dst` else - dstfile=`basename $dst $transformbasename | + dstfile=`basename $dst $transformbasename | sed $transformarg`$transformbasename fi # don't allow the sed command to completely eliminate the filename - if [ x"$dstfile" = x ] + if [ x"$dstfile" = x ] then dstfile=`basename $dst` else - true + : fi # Make a temp file name in the proper directory. @@ -222,15 +235,15 @@ else # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $instcmd $src $dsttmp" command. - if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi && - if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi && - if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi && - if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi && + if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else :;fi && + if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else :;fi && + if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else :;fi && + if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else :;fi && # Now rename the file to the real destination. $doit $rmcmd -f $dstdir/$dstfile && - $doit $mvcmd $dsttmp $dstdir/$dstfile + $doit $mvcmd $dsttmp $dstdir/$dstfile fi && diff --git a/makefile.in b/makefile.in index fc75aa74..53ed4bde 100644 --- a/makefile.in +++ b/makefile.in @@ -327,8 +327,8 @@ help_files.sed : makefile $(srcdir)/lynx_help/help_files.txt @ECHO_CC@if test -n "$(COMPRESS_EXT)"; then echo 's%\$(COMPRESS_EXT)\$(COMPRESS_EXT)%$(COMPRESS_EXT)%g' >> $@; fi @-rm -f help_files.tmp -install-help : help_files.sed $(HELPDIR) - (cd $(HELPDIR) && WD=`pwd` && HEAD=`echo $$WD|sed -e 's!/lynx_help$$!!'` && test $$WD != $$HEAD && rm -rf *) +install-help : help_files.sed $(HELPDIR) $(HELPDIR)/keystrokes + - (cd $(HELPDIR) && WD=`pwd` && HEAD=`echo $$WD|sed -e 's!/lynx_help$$!!'` && test $$WD != $$HEAD && rm -f * keystrokes/*) @LYNXCFG_MAKE@ @echo 'Making htmlized lynx.cfg' @LYNXCFG_MAKE@ cd src && make LYReadCFG.i @LYNXCFG_MAKE@ @-rm -f alphatoc.html body.html cattoc.html @@ -336,23 +336,20 @@ install-help : help_files.sed $(HELPDIR) @LYNXCFG_MAKE@ sed -e 's/ *{ *"\([^"]*\)".*/\1/' | \ @LYNXCFG_MAKE@ perl $(srcdir)/scripts/cfg2html.pl -ms $(srcdir)/lynx.cfg @echo Translating/copying html files - @cat help_files.sed > $(HELPDIR)/help_files.sed @LYNXCFG_MAKE@ @$(SHELL) -c 'for f in alphatoc.html body.html cattoc.html ; do \ -@LYNXCFG_MAKE@ sed -f $(HELPDIR)/help_files.sed $$f > $(HELPDIR)/$$f ; \ +@LYNXCFG_MAKE@ sed -f help_files.sed $$f > $(HELPDIR)/$$f ; \ @LYNXCFG_MAKE@ done' @LYNXCFG_MAKE@ -rm -f src/LYReadCFG.i - @ECHO_CC@$(SHELL) -c 'cd $(srcdir)/lynx_help && ( \ - dirs=keystrokes; \ - (cd $(HELPDIR) && mkdir $$dirs 2>/dev/null ) ; \ - files="*.html */*.html" ; \ + @ECHO_CC@$(SHELL) -c 'sed_prog=`pwd`/help_files.sed && \ + cd $(srcdir)/lynx_help && \ + dirs=keystrokes && \ + files="*.html */*.html" && \ for f in $$files ; do \ - sed -f $(HELPDIR)/help_files.sed $$f > $(HELPDIR)/$$f ; \ - done ; \ + sed -f $$sed_prog $$f > $(HELPDIR)/$$f ; \ + done && \ if test "$(COMPRESS_PROG)" != "" ; then \ (cd $(HELPDIR) && $(COMPRESS_PROG) $$files ) \ - fi ; \ - )' - @-rm -f $(HELPDIR)/help_files.sed + fi' @echo Updating $(libdir)/lynx.cfg $(SHELL) -c 'if test -f $(LIBDIR)/lynx.cfg ; then \ mv $(LIBDIR)/lynx.cfg $(LIBDIR)/lynx.tmp ; \ @@ -413,7 +410,12 @@ uninstall-doc :: -test -d $(DOCDIR) && WD=`cd $(DOCDIR) && pwd` && HEAD=`echo $$WD|sed -e 's!/lynx_doc$$!!'` && test $$WD != $$HEAD && rm -rf $(DOCDIR) -test -d $(HELPDIR) && WD=`cd $(HELPDIR) && pwd` && HEAD=`echo $$WD|sed -e 's!/lynx_help$$!!'` && test $$WD != $$HEAD && cd $(HELPDIR) && rm -f COPYING COPYHEADER -$(BINDIR) $(MANDIR) $(LIBDIR) $(HELPDIR) $(DOCDIR) : +$(BINDIR) \ +$(MANDIR) \ +$(LIBDIR) \ +$(HELPDIR) \ +$(HELPDIR)/keystrokes \ +$(DOCDIR) : $(srcdir)/mkdirs.sh $@ etags: etags -r "/\(PRIVATE\|PUBLIC\)[ \t]+\([a-zA-Z_][a-zA-Z_0-1]*[ \t*]+\)*\([a-zA-Z_][a-zA-Z_0-1]*\)[ \t]+\(ARGS[0-9]\|NOARGS\)/\3/" *.[ch] */*.[ch] */*/*.[ch] */*/*/*.[ch] diff --git a/src/GridText.c b/src/GridText.c index 26cb0656..69c73f37 100644 --- a/src/GridText.c +++ b/src/GridText.c @@ -155,7 +155,7 @@ PUBLIC int LYsb_end = -1; #define MAX_STYLES_ON_LINE 64 /*try to fit in 2 shorts*/ -typedef struct _stylechange { +typedef struct { unsigned int direction:2; /* on or off */ unsigned int horizpos: (sizeof(short)*CHAR_BIT-2); /* horizontal position of this change */ @@ -187,7 +187,7 @@ HTStyleChange stylechanges_buffers[2][MAX_STYLES_ON_LINE]; int stylechanges_buffers_free;/*this is an index of the free buffer. Can be 0 or 1*/ -/* These are generic macors for any pools (provided those structures have the +/* These are generic macros for any pools (provided those structures have the same members as HTStyleChangePool). Pools are used for allocation of groups of objects of the same type T. Pools are represented as a list of structures of type P (called pool chunks here). Structure P has an array of N objects of @@ -303,9 +303,7 @@ typedef struct _TextAnchor { int line_pos; /* Bytes/chars - extent too */ int extent; /* (see HText_trimHightext) */ int line_num; /* Place in document */ - char * hightext; /* The link text */ - char * hightext2; /* A second line*/ - int hightext2offset;/* offset from left */ + HiliteList lites; int link_type; /* Normal, internal, or form? */ FormInfo * input_field; /* Info for form links */ BOOL show_anchor; /* Show the anchor? */ @@ -314,7 +312,7 @@ typedef struct _TextAnchor { HTChildAnchor * anchor; } TextAnchor; -typedef struct _HTTabID { +typedef struct { char * name; /* ID value of TAB */ int column; /* Zero-based column value */ } HTTabID; @@ -427,7 +425,7 @@ PUBLIC BOOL can_justify_stack_depth;/* can be 0 or 1 if all code is correct*/ #endif -typedef struct ht_run_info_ { +typedef struct { int byte_len; /*length in bytes*/ int cell_len; /*length in cells*/ } ht_run_info; @@ -522,6 +520,114 @@ PRIVATE int HText_TrueLineSize PARAMS(( #define CHECK_FREE_MEM #endif +/* + * Set the initial highlight information for a given anchor. + */ +PRIVATE void LYSetHiText ARGS3( + TextAnchor *, a, + char *, text, + int, len) +{ + unsigned have = a->lites.hl_len; + + if (a->lites.hl_info != NULL) { + while (have-- != 0) { + if ((int) (have + 1) < a->lites.hl_len) { + FREE(a->lites.hl_info[have].hl_text); + } + } + FREE(a->lites.hl_info); + } + FREE(a->lites.hl_base.hl_text); + a->lites.hl_len = 0; + + if (text != NULL) { + StrnAllocCopy(a->lites.hl_base.hl_text, text, len); + a->lites.hl_len = 1; + } +} + +/* + * Add highlight information for the next line of a anchor. + */ +PRIVATE void LYAddHiText ARGS3( + TextAnchor *, a, + char *, text, + int, x) +{ + HiliteInfo *have = a->lites.hl_info; + unsigned need = (a->lites.hl_len - 1); + unsigned want = ++(a->lites.hl_len) * sizeof(HiliteInfo); + + if (have != NULL) { + have = realloc(have, want); + } else { + have = malloc(want); + } + a->lites.hl_info = have; + + have[need].hl_text = NULL; + StrAllocCopy(have[need].hl_text, text); + have[need].hl_x = x; +} + +/* + * Get the highlight text, counting from zero. + */ +PRIVATE char *LYGetHiTextStr ARGS2( + TextAnchor *, a, + int, count) +{ + char *result; + + if (count >= a->lites.hl_len) + result = NULL; + else if (count > 0) + result = a->lites.hl_info[count - 1].hl_text; + else + result = a->lites.hl_base.hl_text; + return result; +} + +/* + * Get the X-ordinate at which to draw the corresponding highlight-text + */ +PRIVATE int LYGetHiTextPos ARGS2( + TextAnchor *, a, + int, count) +{ + int result; + + if (count >= a->lites.hl_len) + result = -1; + else if (count > 0) + result = a->lites.hl_info[count - 1].hl_x; + else + result = a->line_pos; + return result; +} + +/* + * Copy highlighting information from anchor 'a' to 'b'. + */ +PRIVATE void LYCopyHiText ARGS2( + TextAnchor *, a, + TextAnchor *, b) +{ + int count; + char *s; + + LYSetHiText(a, NULL, 0); + for (count = 0; ; ++count) { + if ((s = LYGetHiTextStr(b, count)) == NULL) + break; + if (count == 0) { + LYSetHiText(a, s, strlen(s)); + } else { + LYAddHiText(a, s, LYGetHiTextPos(b, count)); + } + } +} #ifdef CHECK_FREE_MEM @@ -843,7 +949,7 @@ PUBLIC HText * HText_new ARGS1( &LYCharSet_UC[current_char_set]); /* - * Check the kcode setting if the anchor has a charset element. - FM + * Check the kcode setting if the anchor has a charset element. -FM */ HText_setKcode(self, anchor->charset, HTAnchor_getUCInfoStage(anchor, UCT_STAGE_HTEXT)); @@ -856,13 +962,13 @@ PUBLIC HText * HText_new ARGS1( */ if (underscore_string[0] != '.') { /* - * Create an array of dots for the UNDERSCORES macro. - FM + * Create an array of dots for the UNDERSCORES macro. -FM */ memset(underscore_string, '.', (MAX_LINE-1)); underscore_string[(MAX_LINE-1)] = '\0'; underscore_string[MAX_LINE] = '\0'; /* - * Create an array of underscores for the STARS macro. - FM + * Create an array of underscores for the STARS macro. -FM */ memset(star_string, '_', (MAX_LINE-1)); star_string[(MAX_LINE-1)] = '\0'; @@ -1000,15 +1106,14 @@ PUBLIC void HText_free ARGS1( FREE(l->input_field); } - FREE(l->hightext); - FREE(l->hightext2); + LYSetHiText(l, NULL, 0); FREE(l); } FormList_delete(self->forms); /* - * Free the tabs list. - FM + * Free the tabs list. -FM */ if (self->tabs) { HTTabID * Tab = NULL; @@ -1023,7 +1128,7 @@ PUBLIC void HText_free ARGS1( } /* - * Free the hidden links list. - FM + * Free the hidden links list. -FM */ if (self->hidden_links) { char * href = NULL; @@ -1037,7 +1142,7 @@ PUBLIC void HText_free ARGS1( /* * Invoke HTAnchor_delete() to free the node_anchor - * if it is not a destination of other links. - FM + * if it is not a destination of other links. -FM */ if (self->node_anchor) { HTAnchor_resetUCInfoStage(self->node_anchor, -1, UCT_STAGE_STRUCTURED, @@ -1276,12 +1381,12 @@ PRIVATE int display_line ARGS4( * into LastDisplayChar if it was a multibyte * character) or hyphen, though it should have * been excluded by HText_appendCharacter() or by - * split_line() in those cases. - FM + * split_line() in those cases. -FM */ break; } else { /* - * Make it a hard hyphen and fall through. - FM + * Make it a hard hyphen and fall through. -FM */ buffer[0] = '-'; } @@ -1339,7 +1444,7 @@ PRIVATE int display_line ARGS4( * spacing characters in this code set, * but this will become an issue when * the development code set's multibyte - * character handling is used. - FM + * character handling is used. -FM */ LastDisplayChar = 'M'; } else { @@ -1395,7 +1500,7 @@ PRIVATE void display_title ARGS1( int limit; /* - * Make sure we have a text structure. - FM + * Make sure we have a text structure. -FM */ if (!text) return; @@ -1411,7 +1516,7 @@ PRIVATE void display_title ARGS1( #endif /* USE_COLOR_STYLE */ /* - * Load the title field. - FM + * Load the title field. -FM */ StrAllocCopy(title, (HTAnchor_title(text->node_anchor) ? @@ -1420,7 +1525,7 @@ PRIVATE void display_title ARGS1( /* * There shouldn't be any \n in the title field, * but if there is, lets kill it now. Also trim - * any trailing spaces. - FM + * any trailing spaces. -FM */ if ((cp = strchr(title,'\n')) != NULL) *cp = '\0'; @@ -1465,7 +1570,7 @@ PRIVATE void display_title ARGS1( /* * Generate and display the title string, with page indicator * if appropriate, preceded by the toolbar token if appropriate, - * and truncated if necessary. - FM & KW + * and truncated if necessary. -FM & KW */ if (HTCJK != NOCJK) { if (*title && @@ -1518,7 +1623,7 @@ PRIVATE void display_title ARGS1( /* * Note that this truncation is not taking into * account the possibility that multibyte - * characters might be present. - FM + * characters might be present. -FM */ #ifdef SH_EX /* 1999/06/15 (Tue) 10:17:28 */ int last; @@ -1880,11 +1985,11 @@ PRIVATE void display_page ARGS3( #ifdef USE_COLOR_STYLE /* otherwise done in display_line - kw */ /* * If the target is on this line, recursively - * seek and emphasize it. - FM + * seek and emphasize it. -FM */ data = (char *)line->data; offset = (int)line->offset; - while ((target && *target) && + while (non_empty(target) && (cp = LYno_attr_mb_strstr(data, target, text->T.output_utf8, YES, @@ -1954,7 +2059,7 @@ PRIVATE void display_page ARGS3( /* * Stop the emphasis, and reset the offset and * data pointer for our current position in the - * line. - FM + * line. -FM */ LYstopTargetEmphasis(); LYGetYX(y, offset); @@ -1963,7 +2068,7 @@ PRIVATE void display_page ARGS3( /* * Adjust the cursor position, should we be at * the end of the line, or not have another hit - * in it. - FM + * in it. -FM */ LYmove((i + 2), 0); } /* end while */ @@ -1972,7 +2077,7 @@ PRIVATE void display_page ARGS3( /* * Stop if this is the last line. Otherwise, make sure - * display_flag is set and process the next line. - FM + * display_flag is set and process the next line. -FM */ if (line == text->last_line) { /* @@ -2009,18 +2114,29 @@ PRIVATE void display_page ARGS3( Anchor_ptr->line_num <= stop_before_for_anchors; Anchor_ptr = Anchor_ptr->next) { - if (Anchor_ptr->line_num >= line_number && - Anchor_ptr->line_num < stop_before_for_anchors) { + if (Anchor_ptr->line_num >= line_number + && Anchor_ptr->line_num < stop_before_for_anchors) { + char *hi_string = LYGetHiTextStr(Anchor_ptr, 0); + /* * Load normal hypertext anchors. */ - if (Anchor_ptr->show_anchor && Anchor_ptr->hightext && - strlen(Anchor_ptr->hightext) > 0 && - (Anchor_ptr->link_type & HYPERTEXT_ANCHOR)) { + if (Anchor_ptr->show_anchor + && non_empty(hi_string) + && (Anchor_ptr->link_type & HYPERTEXT_ANCHOR)) { + int count; + char *s; + + for (count = 0; ; ++count) { + s = LYGetHiTextStr(Anchor_ptr, count); + if (count == 0) + LYSetHilite(nlinks, s); + if (s == NULL) + break; + if (count != 0) + LYAddHilite(nlinks, s, LYGetHiTextPos(Anchor_ptr, count)); + } - links[nlinks].hightext = Anchor_ptr->hightext; - links[nlinks].hightext2 = Anchor_ptr->hightext2; - links[nlinks].hightext2_offset = Anchor_ptr->hightext2offset; links[nlinks].inUnderline = Anchor_ptr->inUnderline; links[nlinks].anchor_number = Anchor_ptr->number; @@ -2072,13 +2188,13 @@ PRIVATE void display_page ARGS3( else links[nlinks].type = WWW_LINK_TYPE; links[nlinks].target = empty_string; - links[nlinks].form = NULL; + links[nlinks].l_form = NULL; nlinks++; display_flag = TRUE; } else if (Anchor_ptr->link_type == INPUT_ANCHOR - && Anchor_ptr->input_field->type != F_HIDDEN_TYPE) { + && Anchor_ptr->input_field->type != F_HIDDEN_TYPE) { /* * Handle form fields. */ @@ -2089,7 +2205,7 @@ PRIVATE void display_page ARGS3( links[nlinks].anchor_number = Anchor_ptr->number; links[nlinks].anchor_line_num = Anchor_ptr->line_num; - links[nlinks].form = FormInfo_ptr; + links[nlinks].l_form = FormInfo_ptr; links[nlinks].lx = Anchor_ptr->line_pos; links[nlinks].ly = ((Anchor_ptr->line_num + 1) - line_number); links[nlinks].type = WWW_FORM_LINK_TYPE; @@ -2098,30 +2214,23 @@ PRIVATE void display_page ARGS3( StrAllocCopy(links[nlinks].lname, empty_string); if (FormInfo_ptr->type == F_RADIO_TYPE) { - if (FormInfo_ptr->num_value) - links[nlinks].hightext = checked_radio; - else - links[nlinks].hightext = unchecked_radio; - + LYSetHilite(nlinks, + FormInfo_ptr->num_value + ? checked_radio + : unchecked_radio); } else if (FormInfo_ptr->type == F_CHECKBOX_TYPE) { - if (FormInfo_ptr->num_value) - links[nlinks].hightext = checked_box; - else - links[nlinks].hightext = unchecked_box; - + LYSetHilite(nlinks, + FormInfo_ptr->num_value + ? checked_box + : unchecked_box); } else if (FormInfo_ptr->type == F_PASSWORD_TYPE) { - links[nlinks].hightext = STARS(strlen(FormInfo_ptr->value)); - + LYSetHilite(nlinks, + STARS(strlen(FormInfo_ptr->value))); } else { /* TEXT type */ - links[nlinks].hightext = FormInfo_ptr->value; + LYSetHilite(nlinks, + FormInfo_ptr->value); } - /* - * Never a second line on form types. - */ - links[nlinks].hightext2 = NULL; - links[nlinks].hightext2_offset = 0; - nlinks++; /* * Bold the link after incrementing nlinks. @@ -2134,23 +2243,23 @@ PRIVATE void display_page ARGS3( /* * Not showing anchor. */ - if (Anchor_ptr->hightext && *Anchor_ptr->hightext) + if (non_empty(hi_string)) CTRACE((tfp, "\nGridText: Not showing link, hightext=%s\n", - Anchor_ptr->hightext)); + hi_string)); } } if (Anchor_ptr == text->last_anchor) /* - * No more links in document. - FM + * No more links in document. -FM */ break; if (nlinks == MAXLINKS) { /* * Links array is full. If interactive, tell user - * to use half-page or two-line scrolling. - FM + * to use half-page or two-line scrolling. -FM */ if (LYCursesON) { HTAlert(MAXLINKS_REACHED); @@ -2162,10 +2271,12 @@ PRIVATE void display_page ARGS3( /* * Free any un-reallocated links[] entries - * from the previous page draw. - FM + * from the previous page draw. -FM */ - for (i = nlinks; i < last_nlinks; i++) + for (i = nlinks; i < last_nlinks; i++) { + LYSetHilite(i, NULL); FREE(links[i].lname); + } last_nlinks = nlinks; /* @@ -2633,13 +2744,13 @@ PRIVATE void split_line ARGS2( unsigned plen; int i; - /* Split the line. - FM */ + /* Split the line. -FM */ prevdata[previous->size] = '\0'; previous->size = split; /* * Trim any spaces or soft hyphens from the beginning - * of our new line. - FM + * of our new line. -FM */ p = prevdata + split; while (( @@ -2679,7 +2790,7 @@ PRIVATE void split_line ARGS2( } ctrl_chars_on_this_line += utfxtra_on_this_line; - /* Add the data to the new line. - FM */ + /* Add the data to the new line. -FM */ strcat(linedata, p); line->size += plen; } @@ -2965,7 +3076,7 @@ PRIVATE void split_line ARGS2( /* * If we split the line, adjust the anchor - * structure values for the new line. - FM + * structure values for the new line. -FM */ if (s > 0) { /* if not completely empty */ @@ -3503,7 +3614,7 @@ PUBLIC void HText_appendCharacter ARGS2( if (ch == CH_ESC) { /* S/390 -- gil -- 1536 */ /* ** Setting up for CJK escape sequence handling (based on - ** Takuya ASADA's (asada@three-a.co.jp) CJK Lynx). - FM + ** Takuya ASADA's (asada@three-a.co.jp) CJK Lynx). -FM */ text->state = S_esc; text->kanji_buf = '\0'; @@ -3561,7 +3672,7 @@ PUBLIC void HText_appendCharacter ARGS2( */ if (ch == 'B' || ch == 'J' || ch == 'T') { /* - * Can split here. - FM + * Can split here. -FM */ text->permissible_split = text->last_line->size; text->state = S_text; @@ -3569,7 +3680,7 @@ PUBLIC void HText_appendCharacter ARGS2( } else if (ch == 'I') { text->state = S_jisx0201_text; /* - * Can split here. - FM + * Can split here. -FM */ text->permissible_split = text->last_line->size; text->kcode = JIS; @@ -3655,7 +3766,7 @@ PUBLIC void HText_appendCharacter ARGS2( } else { text->kanji_buf = ch; /* - * Can split here. - FM + * Can split here. -FM */ text->permissible_split = text->last_line->size; return; @@ -3717,7 +3828,7 @@ PUBLIC void HText_appendCharacter ARGS2( /* * Ignore the soft hyphen if it is the first character * on the line, or if it is preceded by a space or - * hyphen. - FM + * hyphen. -FM */ if (line->size < 1 || text->permissible_split >= line->size) { return; @@ -3870,7 +3981,7 @@ PUBLIC void HText_appendCharacter ARGS2( if (line->size > 0 && line->data[line->size-1] == LY_SOFT_HYPHEN) { /* * A tab shouldn't follow a soft hyphen, so - * if one does, we'll dump the soft hyphen. - FM + * if one does, we'll dump the soft hyphen. -FM */ line->data[--line->size] = '\0'; ctrl_chars_on_this_line--; @@ -3915,7 +4026,7 @@ PUBLIC void HText_appendCharacter ARGS2( new_line(text); } else { /* - * Can split here. - FM + * Can split here. -FM */ text->permissible_split = line->size; if (target_cu > (WRAP_COLS(text)-1)) @@ -3963,7 +4074,7 @@ check_WrapSource: if (ch == ' ') { /* - * Can split here. - FM + * Can split here. -FM */ text->permissible_split = text->last_line->size; /* @@ -4202,7 +4313,7 @@ check_WrapSource: if (ch == LY_SOFT_HYPHEN) { ctrl_chars_on_this_line++; /* - * Can split here. - FM + * Can split here. -FM */ text->permissible_split = text->last_line->size; } @@ -4792,8 +4903,6 @@ PUBLIC int HText_beginAnchor ARGS3( if (a == NULL) outofmem(__FILE__, "HText_beginAnchor"); - a->hightext = NULL; - a->hightext2 = NULL; a->inUnderline = underline; a->line_num = text->Lines; @@ -4842,7 +4951,7 @@ PRIVATE BOOL HText_endAnchor0 ARGS3( * a particular anchor. This allows us to set links * for positions indicated by NAME or ID attributes, * without needing to close any anchor with an HREF - * within which that link might be embedded. - FM + * within which that link might be embedded. -FM */ if (number <= 0 || number == text->last_anchor->number) { a = text->last_anchor; @@ -4856,7 +4965,7 @@ PRIVATE BOOL HText_endAnchor0 ARGS3( /* * There's no anchor with that number, * so we'll default to the last anchor, - * and cross our fingers. - FM + * and cross our fingers. -FM */ a = text->last_anchor; } @@ -4907,19 +5016,19 @@ PRIVATE BOOL HText_endAnchor0 ARGS3( /* * Check if the anchor content has only * white and special characters, starting - * with the content on the last line. - FM + * with the content on the last line. -FM */ a->extent += extent_adjust; if (a->extent > (int)last->size) { /* * The anchor extends over more than one line, - * so set up to check the entire last line. - FM + * so set up to check the entire last line. -FM */ i = last->size; } else { /* * The anchor is restricted to the last line, - * so check from the start of the anchor. - FM + * so check from the start of the anchor. -FM */ i = a->extent; } @@ -4939,14 +5048,14 @@ PRIVATE BOOL HText_endAnchor0 ARGS3( * The anchor starts on a preceding line, and * the last line has only white and special * characters, so declare the entire extent - * of the last line as blank. - FM + * of the last line as blank. -FM */ CurBlankExtent = BlankExtent = last->size; } else { /* * The anchor starts on the last line, and * has only white or special characters, so - * declare the anchor's extent as blank. - FM + * declare the anchor's extent as blank. -FM */ CurBlankExtent = BlankExtent = a->extent; } @@ -4957,7 +5066,7 @@ PRIVATE BOOL HText_endAnchor0 ARGS3( * checked has only white and special characters, * check whether the anchor's content on the * immediately preceding line also has only - * white and special characters. - FM + * white and special characters. -FM */ while (i == 0 && (a->extent > CurBlankExtent || @@ -4971,13 +5080,13 @@ PRIVATE BOOL HText_endAnchor0 ARGS3( if (j < 0) { /* * The anchor starts on a preceding line, - * so check all of this line. - FM + * so check all of this line. -FM */ j = 0; i = prev->size; } else { /* - * The anchor starts on this line. - FM + * The anchor starts on this line. -FM */ i = a->extent - CurBlankExtent; } @@ -5001,7 +5110,7 @@ PRIVATE BOOL HText_endAnchor0 ARGS3( * This line has only white and special * characters, so treat its entire extent * as blank, and decrement the pointer for - * the line to be analyzed. - FM + * the line to be analyzed. -FM */ CurBlankExtent += prev->size; BlankExtent = CurBlankExtent; @@ -5010,7 +5119,7 @@ PRIVATE BOOL HText_endAnchor0 ARGS3( /* * The anchor starts on this line, and it * has only white or special characters, so - * declare the anchor's extent as blank. - FM + * declare the anchor's extent as blank. -FM */ BlankExtent = a->extent; break; @@ -5025,7 +5134,7 @@ PRIVATE BOOL HText_endAnchor0 ARGS3( /* * It's an invisible anchor probably from an ALT="" * or an ignored ISMAP attribute due to a companion - * USEMAP. - FM + * USEMAP. -FM */ a->show_anchor = NO; @@ -5036,7 +5145,7 @@ PRIVATE BOOL HText_endAnchor0 ARGS3( /* * If links are numbered, then try to get rid of the - * numbered bracket and adjust the anchor count. - FM + * numbered bracket and adjust the anchor count. -FM * * Well, let's do this only if -hiddenlinks=merged is not in * effect, or if we can be reasonably sure that @@ -5053,16 +5162,16 @@ PRIVATE BOOL HText_endAnchor0 ARGS3( /* * Set start->data[j] to the close-square-bracket, * or to the beginning of the line on which the - * anchor start. - FM + * anchor start. -FM */ if (start == last) { /* - * The anchor starts on the last line. - FM + * The anchor starts on the last line. -FM */ j = (last->size - a->extent - 1); } else { /* - * The anchor starts on a previous line. - FM + * The anchor starts on a previous line. -FM */ prev = start->prev; j = (start->size - a->extent + CurBlankExtent - 1); @@ -5078,7 +5187,7 @@ PRIVATE BOOL HText_endAnchor0 ARGS3( * a close-square-bracket, check whether we had a wrap * and the close-square-bracket is at the end of the * previous line. If so, strip the numbered bracket - * from that line. - FM + * from that line. -FM */ if (start->data[j] == ']') { j--; @@ -5094,7 +5203,7 @@ PRIVATE BOOL HText_endAnchor0 ARGS3( if (start->data[j] == '[') { /* * The numbered bracket is entirely - * on this line. - FM + * on this line. -FM */ NumSize++; if (start==last && (int)text->permissible_split > j) { @@ -5135,7 +5244,7 @@ PRIVATE BOOL HText_endAnchor0 ARGS3( /* * The numbered bracket started on the * previous line, and part of it was - * wrapped to this line. - FM + * wrapped to this line. -FM */ NumSize++; l = (i - j); @@ -5168,14 +5277,14 @@ PRIVATE BOOL HText_endAnchor0 ARGS3( } else { /* * Shucks! We didn't find the - * numbered bracket. - FM + * numbered bracket. -FM */ a->show_anchor = YES; } } else { /* * Shucks! We didn't find the - * numbered bracket. - FM + * numbered bracket. -FM */ a->show_anchor = YES; } @@ -5205,7 +5314,7 @@ PRIVATE BOOL HText_endAnchor0 ARGS3( /* * The numbered bracket is all on the * previous line, and the anchor content - * was wrapped to the last line. - FM + * was wrapped to the last line. -FM */ NumSize++; k = j + NumSize; @@ -5218,21 +5327,21 @@ PRIVATE BOOL HText_endAnchor0 ARGS3( } else { /* * Shucks! We didn't find the - * numbered bracket. - FM + * numbered bracket. -FM */ a->show_anchor = YES; } } else { /* * Shucks! We didn't find the - * numbered bracket. - FM + * numbered bracket. -FM */ a->show_anchor = YES; } } else { /* * Shucks! We didn't find the - * numbered bracket. - FM + * numbered bracket. -FM */ a->show_anchor = YES; } @@ -5243,7 +5352,7 @@ PRIVATE BOOL HText_endAnchor0 ARGS3( /* * The anchor's content is not restricted to only * white and special characters, so we'll show it - * as a link. - FM + * as a link. -FM */ a->show_anchor = YES; if (BlankExtent) { @@ -5259,7 +5368,7 @@ PRIVATE BOOL HText_endAnchor0 ARGS3( * and special characters, so set its number * and extent to zero, decrement the visible * anchor number counter, and add this anchor - * to the hidden links list. - FM + * to the hidden links list. -FM */ a->extent = 0; if (text->hiddenlinkflag != HIDDENLINKS_MERGE) { @@ -5272,7 +5381,7 @@ PRIVATE BOOL HText_endAnchor0 ARGS3( * The anchor's content is not restricted to white * and special characters, so we'll display the * content, but shorten its extent by any trailing - * blank lines we've detected. - FM + * blank lines we've detected. -FM */ a->extent -= ((BlankExtent < a->extent) ? BlankExtent : 0); @@ -5290,7 +5399,7 @@ PRIVATE BOOL HText_endAnchor0 ARGS3( /* * It's a named anchor without an HREF, so it * should be registered but not shown as a - * link. - FM + * link. -FM */ a->show_anchor = NO; a->extent = 0; @@ -5349,8 +5458,7 @@ PRIVATE int remove_special_attr_chars ARGS1( */ soft_newline_count += (*cp == LY_SOFT_NEWLINE); if (!IsSpecialAttrChar(*cp)) { - *buf = *cp, - buf++; + *buf++ = *cp; } } *buf = '\0'; @@ -5424,7 +5532,7 @@ PUBLIC void HText_endAppend ARGS1( /* * Fix up the anchor structure values and - * create the hightext strings. - FM + * create the hightext strings. -FM */ HText_trimHightext(text, TRUE, -1); } @@ -5445,12 +5553,13 @@ PUBLIC void HText_endAppend ARGS1( ** extent fields are counting bytes in the HTLine data, including ** invisible special attribute chars and counting UTF-8 multibyte ** characters as multiple bytes. -** AFTER the adjustment, the anchor line_pos (and hightext2offset -** if applicable) fields indicate x positions in terms of displayed -** character cells, and the extent field apparently is unimportant; -** the anchor text has been copied to the hightext (and possibly -** hightext2) fields (which should have been NULL up to that point), -** with special attribute chars removed. +** +** AFTER the adjustment, the anchor line_pos (and hightext offset if +** applicable) fields indicate x positions in terms of displayed character +** cells, and the extent field apparently is unimportant; the anchor text has +** been copied to the hightext fields (which should have been NULL up to that +** point), with special attribute chars removed. +** ** This needs to be done so that display_page finds the anchors in the ** form it expects when it sets the links[] elements. */ @@ -5463,7 +5572,12 @@ PRIVATE void HText_trimHightext ARGS3( TextAnchor *anchor_ptr; TextAnchor *prev_a = NULL; HTLine *line_ptr; + HTLine *line_ptr2; unsigned char ch; + char *hilite_str; + int hilite_len; + int actual_len; + int count_line; if (!text) return; @@ -5486,7 +5600,7 @@ PRIVATE void HText_trimHightext ARGS3( /* * Fix up the anchor structure values and - * create the hightext strings. - FM + * create the hightext strings. -FM */ for (anchor_ptr = text->first_anchor; anchor_ptr; @@ -5528,7 +5642,7 @@ re_parse: * done the trimming & adjusting for this anchor, so avoid * doing it a second time. - kw */ - if (anchor_ptr->hightext) + if ((hilite_str = LYGetHiTextStr(anchor_ptr, 0)) != NULL) continue; if (anchor_ptr->line_pos > (int) line_ptr->size) { @@ -5564,11 +5678,12 @@ re_parse: CTRACE((tfp, "anchor text: '%s'\n", line_ptr->data)); /* - * If the link begins with an end of line and we have more - * lines, then start the highlighting on the next line. - FM - * But if an empty anchor is at the end of line and empty, - * keep it where it is, unless the previous anchor in the list - * (if any) already starts later. - kw + * If the link begins with an end of line and we have more lines, then + * start the highlighting on the next line. -FM. + * + * But if an empty anchor is at the end of line and empty, keep it + * where it is, unless the previous anchor in the list (if any) already + * starts later. - kw */ if ((unsigned)anchor_ptr->line_pos >= strlen(line_ptr->data)) { if (cur_line < text->Lines && @@ -5586,61 +5701,76 @@ re_parse: } /* - * Copy the link name into the data structure. + * Copy the link name into the data structure. */ - if (line_ptr->data && - anchor_ptr->extent > 0 && anchor_ptr->line_pos >= 0) { - StrnAllocCopy(anchor_ptr->hightext, - &line_ptr->data[anchor_ptr->line_pos], - anchor_ptr->extent); + if (line_ptr->data + && anchor_ptr->extent > 0 + && anchor_ptr->line_pos >= 0) { + LYSetHiText(anchor_ptr, + &line_ptr->data[anchor_ptr->line_pos], + anchor_ptr->extent); } else { - StrAllocCopy(anchor_ptr->hightext, ""); + LYSetHiText(anchor_ptr, "", 0); } /* - * If true the anchor extends over two lines, - * copy that into the data structure. + * If the anchor extends over more than one line, copy that into the + * data structure. */ - if ((unsigned)anchor_ptr->extent > strlen(anchor_ptr->hightext)) { - HTLine *line_ptr2 = line_ptr->next; - - if (!final) { - if (cur_line + 1 >= stop_before) { - FREE(anchor_ptr->hightext); /* bail out */ - break; - } + hilite_str = LYGetHiTextStr(anchor_ptr, 0); + hilite_len = strlen(hilite_str); + actual_len = anchor_ptr->extent; + + line_ptr2 = line_ptr; + count_line = cur_line; + while (actual_len > hilite_len) { + count_line++; + line_ptr2 = line_ptr2->next; + + if (!final + && count_line >= stop_before) { + LYSetHiText(anchor_ptr, NULL, 0); + break; } + /* - * Double check that we have a line pointer, - * and if so, copy into hightext2. + * Double check that we have a line pointer, and if so, copy into + * highlight text. */ if (line_ptr2) { - StrnAllocCopy(anchor_ptr->hightext2, + char *hi_string = NULL; + int hi_offset = line_ptr2->offset; + + StrnAllocCopy(hi_string, line_ptr2->data, - (anchor_ptr->extent - - strlen(anchor_ptr->hightext))); - anchor_ptr->hightext2offset = line_ptr2->offset; + (actual_len - hilite_len)); + actual_len -= strlen(hi_string); /*handle LY_SOFT_NEWLINEs -VH */ - anchor_ptr->hightext2offset += - remove_special_attr_chars(anchor_ptr->hightext2); + hi_offset += remove_special_attr_chars(hi_string); if (anchor_ptr->link_type & HYPERTEXT_ANCHOR) { - LYTrimTrailing(anchor_ptr->hightext2); - if (anchor_ptr->hightext2[0] == '\0') { - FREE(anchor_ptr->hightext2); - anchor_ptr->hightext2offset = 0; - } + LYTrimTrailing(hi_string); + } + if (non_empty(hi_string)) { + LYAddHiText(anchor_ptr, hi_string, hi_offset); } + FREE(hi_string); } } - remove_special_attr_chars(anchor_ptr->hightext); + + if (!final + && count_line >= stop_before) { + break; + } + + hilite_str = LYGetHiTextStr(anchor_ptr, 0); + remove_special_attr_chars(hilite_str); if (anchor_ptr->link_type & HYPERTEXT_ANCHOR) { - LYTrimTrailing(anchor_ptr->hightext); + LYTrimTrailing(hilite_str); } /* - * Subtract any formatting characters from the x position - * of the link. + * Subtract any formatting characters from the x position of the link. */ if (anchor_ptr->line_pos > 0) { register int offset = 0, i = 0; @@ -5709,7 +5839,7 @@ PUBLIC HTChildAnchor * HText_childNumber ARGS1( /* * HText_FormDescNumber() returns a description of the form field * with index N. The index corresponds to the [number] we print - * for the field. - FM & LE + * for the field. -FM & LE */ PUBLIC void HText_FormDescNumber ARGS2( int, number, @@ -5982,7 +6112,7 @@ PUBLIC int HTGetLinkInfo ARGS6( } return(LINK_LINE_FOUND); } else { - *hightext= a->hightext; + *hightext = LYGetHiTextStr(a, 0); link_dest = HTAnchor_followMainLink((HTAnchor *)a->anchor); { char *cp_freeme = NULL; @@ -6057,7 +6187,7 @@ PRIVATE BOOLEAN same_anchor_or_field ARGS5( #define same_anchor_as_link(i,a,ta_same) (i >= 0 && a &&\ same_anchor_or_field(links[i].anchor_number,\ - (links[i].type == WWW_FORM_LINK_TYPE) ? links[i].form : NULL,\ + (links[i].type == WWW_FORM_LINK_TYPE) ? links[i].l_form : NULL,\ a->number,\ (a->link_type == INPUT_ANCHOR) ? a->input_field : NULL,\ ta_same)) @@ -6085,7 +6215,7 @@ PUBLIC BOOL HText_TAHasMoreLines ARGS2( if (direction < 0) { for (a = HTMainText->first_anchor; a; prev_a = a, a = a->next) { if (a->link_type == INPUT_ANCHOR && - links[curlink].form == a->input_field) { + links[curlink].l_form == a->input_field) { return same_anchors(a, prev_a, TRUE); } if (links[curlink].anchor_number && @@ -6098,7 +6228,7 @@ PUBLIC BOOL HText_TAHasMoreLines ARGS2( if (a == HTMainText->last_anchor) break; if (a->link_type == INPUT_ANCHOR && - links[curlink].form == a->input_field) { + links[curlink].l_form == a->input_field) { return same_anchors(a, a->next, TRUE); } if (links[curlink].anchor_number && @@ -6321,7 +6451,7 @@ PUBLIC int HTGetLinkOrFieldStart ARGS5( * *data with all IsSpecial characters stripped, its offset and * the printable target length (without IsSpecial, or extra CJK * or utf8 characters) are loaded into *offset and *tLen, and - * TRUE is returned. - FM + * TRUE is returned. -FM */ PUBLIC BOOL HText_getFirstTargetInLine ARGS7( HText *, text, @@ -6339,14 +6469,16 @@ PUBLIC BOOL HText_getFirstTargetInLine ARGS7( /* * Make sure we have an HText structure, that line_num is - * in its range, and that we have a target string. - FM + * in its range, and that we have a target string. -FM */ - if (!(text && line_num >= 0 && line_num <= text->Lines && - target && *target)) + if (!(text + && line_num >= 0 + && line_num <= text->Lines + && non_empty(target))) return(FALSE); /* - * Find the line and set up its data and offset - FM + * Find the line and set up its data and offset -FM */ for (i = 0, line = FirstHTLine(text); i < line_num && (line != text->last_line); @@ -6364,7 +6496,7 @@ PUBLIC BOOL HText_getFirstTargetInLine ARGS7( * If the target is on the line, load the offset of * its first character and the subsequent line data, * strip any special characters from the loaded line - * data, and return TRUE. - FM + * data, and return TRUE. -FM */ if (((cp = LYno_attr_mb_strstr(LineData, target, @@ -6376,7 +6508,7 @@ PUBLIC BOOL HText_getFirstTargetInLine ARGS7( * We had a hit so load the results, * remove IsSpecial characters from * the allocated data string, and - * return TRUE. - FM + * return TRUE. -FM */ *offset = (LineOffset + HitOffset); *tLen = (LenNeeded - HitOffset); @@ -6386,7 +6518,7 @@ PUBLIC BOOL HText_getFirstTargetInLine ARGS7( } /* - * The line does not contain the target. - FM + * The line does not contain the target. -FM */ return(FALSE); } @@ -6421,7 +6553,7 @@ PUBLIC CONST char *HText_getStyle NOARGS /* * HText_getSugFname returns the suggested filename of the current * document (normally derived from a Content-Disposition header with - * attachment; filename=name.suffix). - FM + * attachment; filename=name.suffix). -FM */ PUBLIC CONST char * HText_getSugFname NOARGS { @@ -6435,7 +6567,7 @@ PUBLIC CONST char * HText_getSugFname NOARGS * or truncates the string's suffix if appropriate, based on whether * the anchor indicates that the file is compressed. We assume * that the file was not uncompressed (as when downloading), and - * believe the headers about whether it's compressed or not. - FM + * believe the headers about whether it's compressed or not. -FM * * Added third arg - if strip_ok is FALSE, we don't trust the anchor * info enough to remove a compression suffix if the anchor object @@ -6455,7 +6587,7 @@ PUBLIC void HTCheckFnameForCompression ARGS3( CompressFileType second; /* - * Make sure we have a string and anchor. - FM + * Make sure we have a string and anchor. -FM */ if (!(fn && anchor)) return; @@ -6468,14 +6600,14 @@ PUBLIC void HTCheckFnameForCompression ARGS3( /* * Check the anchor's content_type and content_encoding - * elements for a gzip or Unix compressed file. - FM + * elements for a gzip or Unix compressed file. -FM */ ct = HTAnchor_content_type(anchor); ce = HTAnchor_content_encoding(anchor); if (ce == NULL && ct != 0) { /* * No Content-Encoding, so check - * the Content-Type. - FM + * the Content-Type. -FM */ if (!strncasecomp(ct, "application/gzip", 16) || !strncasecomp(ct, "application/x-gzip", 18)) { @@ -6521,7 +6653,7 @@ PUBLIC void HTCheckFnameForCompression ARGS3( /* * Seek the last dot, and check whether - * we have a gzip or compress suffix. - FM + * we have a gzip or compress suffix. -FM */ if ((dot = strrchr(fn, '.')) != NULL) { if (HTCompressFileType(fn, ".", &cp) != cftNone) { @@ -6529,7 +6661,7 @@ PUBLIC void HTCheckFnameForCompression ARGS3( /* * It has a suffix which signifies a gzipped * or compressed file for us, but the anchor - * claims otherwise, so tweak the suffix. - FM + * claims otherwise, so tweak the suffix. -FM */ *dot = '\0'; } @@ -6540,7 +6672,7 @@ PUBLIC void HTCheckFnameForCompression ARGS3( /* * It has a tail which signifies a gzipped * file for us, but the anchor claims otherwise, - * so tweak the suffix. - FM + * so tweak the suffix. -FM */ if (cp == dot+1) cp--; @@ -6549,7 +6681,7 @@ PUBLIC void HTCheckFnameForCompression ARGS3( /* * The anchor claims it's gzipped, and we * believe it, so force this tail to the - * conventional suffix. - FM + * conventional suffix. -FM */ #ifdef VMS *cp = '-'; @@ -6581,7 +6713,7 @@ PUBLIC void HTCheckFnameForCompression ARGS3( } /* - * Add the appropriate suffix. - FM + * Add the appropriate suffix. -FM */ if (*suffix) { if (!dot) { @@ -6599,7 +6731,7 @@ PUBLIC void HTCheckFnameForCompression ARGS3( /* * HText_getLastModified returns the Last-Modified header - * if available, for the current document. - FM + * if available, for the current document. -FM */ PUBLIC CONST char * HText_getLastModified NOARGS { @@ -6609,7 +6741,7 @@ PUBLIC CONST char * HText_getLastModified NOARGS /* * HText_getDate returns the Date header - * if available, for the current document. - FM + * if available, for the current document. -FM */ PUBLIC CONST char * HText_getDate NOARGS { @@ -6619,7 +6751,7 @@ PUBLIC CONST char * HText_getDate NOARGS /* * HText_getServer returns the Server header - * if available, for the current document. - FM + * if available, for the current document. -FM */ PUBLIC CONST char * HText_getServer NOARGS { @@ -6688,7 +6820,7 @@ PUBLIC BOOL HText_pageHasPrevTarget NOARGS /* * HText_LinksInLines returns the number of links in the - * 'Lines' number of lines beginning with 'line_num'-1. - FM + * 'Lines' number of lines beginning with 'line_num'-1. -FM */ PUBLIC int HText_LinksInLines ARGS3( HText *, text, @@ -6828,7 +6960,7 @@ PUBLIC BOOL HText_select ARGS1( HTMainAnchor = text->node_anchor; /* - * Make this text the most current in the loaded texts list. - FM + * Make this text the most current in the loaded texts list. -FM */ if (loaded_texts && HTList_removeObject(loaded_texts, text)) HTList_addObject(loaded_texts, text); @@ -6841,7 +6973,7 @@ PUBLIC BOOL HText_select ARGS1( /* * This function returns TRUE if doc's post_data, address * and isHEAD elements are identical to those of a loaded - * (memory cached) text. - FM + * (memory cached) text. -FM */ PUBLIC BOOL HText_POSTReplyLoaded ARGS1( document *, doc) @@ -6852,13 +6984,13 @@ PUBLIC BOOL HText_POSTReplyLoaded ARGS1( BOOL is_head; /* - * Make sure we have the structures. - FM + * Make sure we have the structures. -FM */ if (!cur || !doc) return(FALSE); /* - * Make sure doc is for a POST reply. - FM + * Make sure doc is for a POST reply. -FM */ if ((post_data = doc->post_data) == NULL || (address = doc->address) == NULL) @@ -6867,7 +6999,7 @@ PUBLIC BOOL HText_POSTReplyLoaded ARGS1( /* * Loop through the loaded texts looking for a - * POST reply match. - FM + * POST reply match. -FM */ while (NULL != (text = (HText *)HTList_nextObject(cur))) { if (text->node_anchor && @@ -7059,7 +7191,7 @@ PUBLIC HTAnchor * HText_linkSelTo ARGS2( } /* - * Utility for freeing the list of previous isindex and whereis queries. - FM + * Utility for freeing the list of previous isindex and whereis queries. -FM */ PUBLIC void HTSearchQueries_free NOARGS { @@ -7079,7 +7211,7 @@ PUBLIC void HTSearchQueries_free NOARGS /* * Utility for listing isindex and whereis queries, making - * any repeated queries the most current in the list. - FM + * any repeated queries the most current in the list. -FM */ PUBLIC void HTAddSearchQuery ARGS1( char *, query) @@ -7088,7 +7220,7 @@ PUBLIC void HTAddSearchQuery ARGS1( char *old; HTList *cur; - if (!(query && *query)) + if (!non_empty(query)) return; StrAllocCopy(new_query, query); @@ -7140,7 +7272,7 @@ PUBLIC int do_www_search ARGS1( HTUnEscape(searchstring); strcpy(temp, searchstring); /* - * Make sure it's treated as the most recent query. - FM + * Make sure it's treated as the most recent query. -FM */ HTAddSearchQuery(searchstring); } else { @@ -7172,19 +7304,19 @@ get_query: if (recall && ch == UPARROW) { if (PreviousSearch) { /* - * Use the second to last query in the list. - FM + * Use the second to last query in the list. -FM */ QueryNum = 1; PreviousSearch = FALSE; } else { /* - * Go back to the previous query in the list. - FM + * Go back to the previous query in the list. -FM */ QueryNum++; } if (QueryNum >= QueryTotal) /* - * Roll around to the last query in the list. - FM + * Roll around to the last query in the list. -FM */ QueryNum = 0; if ((cp=(char *)HTList_objectAt(search_queries, @@ -7203,19 +7335,19 @@ get_query: } else if (recall && ch == DNARROW) { if (PreviousSearch) { /* - * Use the first query in the list. - FM + * Use the first query in the list. -FM */ QueryNum = QueryTotal - 1; PreviousSearch = FALSE; } else { /* - * Advance to the next query in the list. - FM + * Advance to the next query in the list. -FM */ QueryNum--; } if (QueryNum < 0) /* - * Roll around to the first query in the list. - FM + * Roll around to the first query in the list. -FM */ QueryNum = QueryTotal - 1; if ((cp=(char *)HTList_objectAt(search_queries, @@ -7241,7 +7373,7 @@ get_query: } /* - * Strip leaders and trailers. - FM + * Strip leaders and trailers. -FM */ LYTrimLeading(searchstring); if (!(*searchstring)) { @@ -7260,7 +7392,7 @@ get_query: /* * Add searchstring to the query list, - * or make it the most current. - FM + * or make it the most current. -FM */ HTAddSearchQuery(searchstring); @@ -7309,7 +7441,7 @@ get_query: * If it's redirection, use_this_url_instead is set, and * mainloop() will deal with it such that security features * and restrictions are checked before acting on the URL, or - * rejecting it. - FM + * rejecting it. -FM */ return(NOT_FOUND); } @@ -7373,7 +7505,7 @@ PUBLIC void print_wwwfile_to_fd ARGS2( if (!first && line->data[0] != LY_SOFT_NEWLINE) { fputc('\n',fp); /* - * Add news-style quotation if requested. - FM + * Add news-style quotation if requested. -FM */ if (is_reply) { fputc('>',fp); @@ -7586,26 +7718,29 @@ PRIVATE BOOL anchor_has_target ARGS2( { OptionType * option; char *stars = NULL, *cp; + int count; /* - * Search the hightext string, and hightext2 if present, - * taking the case_sensitive setting into account. - FM + * Search the hightext strings, taking the case_sensitive setting into + * account. -FM */ - if (LYno_attr_strstr(a->hightext, target) - || LYno_attr_strstr(a->hightext2, target)) { - return TRUE; + for (count = 0; ; ++count) { + if ((cp = LYGetHiTextStr(a, count)) == NULL) + break; + if (LYno_attr_strstr(cp, target)) + return TRUE; } /* * Search the relevant form fields, taking the - * case_sensitive setting into account. - FM + * case_sensitive setting into account. -FM */ if ((a->input_field != NULL && a->input_field->value != NULL) && a->input_field->type != F_HIDDEN_TYPE) { if (a->input_field->type == F_PASSWORD_TYPE) { /* * Check the actual, hidden password, and then - * the displayed string. - FM + * the displayed string. -FM */ if (LYno_attr_strstr(a->input_field->value, target)) { return TRUE; @@ -7621,7 +7756,7 @@ PRIVATE BOOL anchor_has_target ARGS2( } else if (a->input_field->type == F_OPTION_LIST_TYPE) { /* * Search the option strings that are displayed - * when the popup is invoked. - FM + * when the popup is invoked. -FM */ option = a->input_field->select_list; while (option != NULL) { @@ -7632,7 +7767,7 @@ PRIVATE BOOL anchor_has_target ARGS2( } } else if (a->input_field->type == F_RADIO_TYPE) { /* - * Search for checked or unchecked parens. - FM + * Search for checked or unchecked parens. -FM */ if (a->input_field->num_value) { cp = checked_radio; @@ -7644,7 +7779,7 @@ PRIVATE BOOL anchor_has_target ARGS2( } } else if (a->input_field->type == F_CHECKBOX_TYPE) { /* - * Search for checked or unchecked square brackets. - FM + * Search for checked or unchecked square brackets. -FM */ if (a->input_field->num_value) { cp = checked_box; @@ -7656,10 +7791,9 @@ PRIVATE BOOL anchor_has_target ARGS2( } } else { /* - * Check the values intended for display. - * May have been found already via the - * hightext search, but make sure here - * that the entire value is searched. - FM + * Check the values intended for display. May have been found + * already via the hightext search, but make sure here that the + * entire value is searched. -FM */ if (LYno_attr_strstr(a->input_field->value, target)) { return TRUE; @@ -8368,7 +8502,7 @@ PUBLIC BOOL HText_inLineOne ARGS1( * the removed line (i.e., control characters, or it * wouldn't have tested blank) should have been * reiterated by split_line() in the retained blank - * line. - FM + * line. -FM */ PUBLIC void HText_RemovePreviousLine ARGS1( HText *, text) @@ -8393,7 +8527,7 @@ PUBLIC void HText_RemovePreviousLine ARGS1( * alignment is HT_LEFT. The offset is still zero, * because that's not determined for HT_CENTER or * HT_RIGHT until subsequent characters are received - * and split_line() is called. - FM + * and split_line() is called. -FM */ PUBLIC int HText_getCurrentColumn ARGS1( HText *, text) @@ -8424,7 +8558,7 @@ PUBLIC int HText_getMaximumColumn ARGS1( /* * NOTE: This function uses HText_getCurrentColumn() which * presently is correct only if the alignment is - * HT_LEFT. - FM + * HT_LEFT. -FM */ PUBLIC void HText_setTabID ARGS2( HText *, text, @@ -8467,7 +8601,7 @@ PUBLIC int HText_getTabIDColumn ARGS2( HTTabID * Tab; HTList * cur = text->tabs; - if (text && name && *name && cur) { + if (text && non_empty(name) && cur) { while (NULL != (Tab = (HTTabID *)HTList_nextObject(cur))) { if (Tab->name && !strcmp(Tab->name, name)) break; @@ -8487,7 +8621,7 @@ PUBLIC int HText_getTabIDColumn ARGS2( * into text->hidden_links, whose count can be determined * via HText_HiddenLinks(), below. The addresses can be * retrieved via HText_HiddenLinkAt(), below, based on - * count. - FM + * count. -FM */ PRIVATE void HText_AddHiddenLink ARGS2( HText *, text, @@ -8496,14 +8630,14 @@ PRIVATE void HText_AddHiddenLink ARGS2( HTAnchor *dest; /* - * Make sure we have an HText structure and anchor. - FM + * Make sure we have an HText structure and anchor. -FM */ if (!(text && textanchor && textanchor->anchor)) return; /* * Create the hidden links list - * if it hasn't been already. - FM + * if it hasn't been already. -FM */ if (text->hidden_links == NULL) text->hidden_links = HTList_new(); @@ -8511,7 +8645,7 @@ PRIVATE void HText_AddHiddenLink ARGS2( /* * Store the address, in reverse list order * so that first in will be first out on - * retrievals. - FM + * retrievals. -FM */ if ((dest = HTAnchor_followMainLink((HTAnchor *)textanchor->anchor)) && (text->hiddenlinkflag != HIDDENLINKS_IGNORE || @@ -8523,7 +8657,7 @@ PRIVATE void HText_AddHiddenLink ARGS2( /* * This function returns the number of addresses - * that are loaded in text->hidden_links. - FM + * that are loaded in text->hidden_links. -FM */ PUBLIC int HText_HiddenLinkCount ARGS1( HText *, text) @@ -8539,7 +8673,7 @@ PUBLIC int HText_HiddenLinkCount ARGS1( /* * This function returns the address, corresponding to * a hidden link, at the position (zero-based) in the - * text->hidden_links list of the number argument. - FM + * text->hidden_links list of the number argument. -FM */ PUBLIC char * HText_HiddenLinkAt ARGS2( HText *, text, @@ -8581,7 +8715,7 @@ PUBLIC void HText_beginForm ARGS5( HTFormDisabled = FALSE; /* - * Check the ACTION. - FM + * Check the ACTION. -FM */ if (action != NULL) { if (!strncmp(action, "mailto:", 7)) { @@ -8593,16 +8727,16 @@ PUBLIC void HText_beginForm ARGS5( StrAllocCopy(HTFormAction, HTLoadedDocumentURL()); /* - * Check the METHOD. - FM + * Check the METHOD. -FM */ if (method != NULL && HTFormMethod != URL_MAIL_METHOD) if (!strcasecomp(method,"post") || !strcasecomp(method,"pget")) HTFormMethod = URL_POST_METHOD; /* - * Check the ENCTYPE. - FM + * Check the ENCTYPE. -FM */ - if ((enctype != NULL) && *enctype) { + if (non_empty(enctype)) { StrAllocCopy(HTFormEnctype, enctype); if (HTFormMethod != URL_MAIL_METHOD && !strncasecomp(enctype, "multipart/form-data", 19)) @@ -8612,9 +8746,9 @@ PUBLIC void HText_beginForm ARGS5( } /* - * Check the TITLE. - FM + * Check the TITLE. -FM */ - if ((title != NULL) && *title) + if (non_empty(title)) StrAllocCopy(HTFormTitle, title); else FREE(HTFormTitle); @@ -8662,18 +8796,18 @@ PUBLIC void HText_endForm ARGS1( if (HTFormFields == 1 && text && text->first_anchor) { /* * Support submission of a single text input field in - * the form via <return> instead of a submit button. - FM + * the form via <return> instead of a submit button. -FM */ TextAnchor * a = text->first_anchor; /* - * Go through list of anchors and get our input field. - FM + * Go through list of anchors and get our input field. -FM */ while (a) { if (a->link_type == INPUT_ANCHOR && a->input_field->number == HTFormNumber && a->input_field->type == F_TEXT_TYPE) { /* - * Got it. Make it submitting. - FM + * Got it. Make it submitting. -FM */ a->input_field->submit_action = NULL; StrAllocCopy(a->input_field->submit_action, HTFormAction); @@ -8815,7 +8949,7 @@ PRIVATE char * HText_skipOptionNumPrefix ARGS1( */ char *cp = opname; - if ((cp && *cp && *cp++ == '(') && + if ((non_empty(cp) && *cp++ == '(') && *cp && isdigit(UCH(*cp++))) { while (*cp && isdigit(UCH(*cp))) ++cp; @@ -8897,7 +9031,7 @@ PUBLIC char * HText_setLastOptionValue ARGS7( fields_are_numbered()) { /* * Collapse any space between the popup option - * prefix and actual value. - FM + * prefix and actual value. -FM */ if ((cp1 = HText_skipOptionNumPrefix(cp)) > cp) { i = 0, j = (cp1 - cp); @@ -9152,7 +9286,7 @@ PUBLIC int HText_beginInput ARGS3( * to a radio button, and it's the first with this name, make * sure it's checked by default. Otherwise, if it's checked, * uncheck the default or any preceding radio button with this - * name that was checked. - FM + * name that was checked. -FM */ if (I->type != NULL && !strcmp(I->type,"OPTION") && HTCurSelectGroupType == F_RADIO_TYPE && LYSelectPopups == FALSE) { @@ -9194,7 +9328,7 @@ PUBLIC int HText_beginInput ARGS3( a->link_type = INPUT_ANCHOR; a->show_anchor = YES; - a->hightext = NULL; + LYSetHiText(a, NULL, 0); a->extent = 2; a->input_field = f; @@ -9207,7 +9341,7 @@ PUBLIC int HText_beginInput ARGS3( HTFormFields++; /* - * Set the no_cache flag if the METHOD is POST. - FM + * Set the no_cache flag if the METHOD is POST. -FM */ if (HTFormMethod == URL_POST_METHOD) f->no_cache = TRUE; @@ -9329,7 +9463,7 @@ PUBLIC int HText_beginInput ARGS3( f->type = F_KEYGEN_TYPE; } else { /* - * Note that TYPE="scribble" defaults to TYPE="text". - FM + * Note that TYPE="scribble" defaults to TYPE="text". -FM */ f->type = F_TEXT_TYPE; /* default */ } @@ -9375,7 +9509,7 @@ PUBLIC int HText_beginInput ARGS3( /* * Set VALUE, if it exists. Otherwise, if it's not - * an option list make it a zero-length string. - FM + * an option list make it a zero-length string. -FM */ if (IValue != NULL) { /* @@ -9407,7 +9541,7 @@ PUBLIC int HText_beginInput ARGS3( * Run checks and fill in necessary values. */ if (f->type == F_RESET_TYPE) { - if (f->value && *f->value != '\0') { + if (non_empty(f->value)) { f->size = strlen(f->value); } else { StrAllocCopy(f->value, "Reset"); @@ -9415,7 +9549,7 @@ PUBLIC int HText_beginInput ARGS3( } } else if (f->type == F_IMAGE_SUBMIT_TYPE || f->type == F_SUBMIT_TYPE) { - if (f->value && *f->value != '\0') { + if (non_empty(f->value)) { f->size = strlen(f->value); } else if (f->type == F_IMAGE_SUBMIT_TYPE) { StrAllocCopy(f->value, "[IMAGE]-Submit"); @@ -9523,7 +9657,7 @@ PUBLIC int HText_beginInput ARGS3( * the most we could highlight on overwrites, and/or * handle in the line editor. The actual values for * text entry lines can be long, and will be scrolled - * horizontally within the editing window. - FM + * horizontally within the editing window. -FM */ MaximumSize -= (1 + (int)text->style->leftIndent + @@ -9551,7 +9685,7 @@ PUBLIC int HText_beginInput ARGS3( * For all other fields we limit the size element to * 10 less than the screen width, because either they * are types with small placeholders, and/or are a - * type which is handled via a popup window. - FM + * type which is handled via a popup window. -FM */ MaximumSize -= 10; break; @@ -9660,7 +9794,7 @@ PRIVATE double get_trans_q ARGS2( UCGetLYhndl_byMIME(givenmime)); if (!tq) return 0.0; - if (p && *p) { + if (non_empty(p)) { char *pair, *field = p, *pval, *ptok; /* Get all the parameters to the Charset */ while ((pair = HTNextTok(&field, ";", "\"", NULL)) != NULL) { @@ -9905,7 +10039,7 @@ PUBLIC int HText_SubmitForm ARGS4( if (submit_item->submit_action) { /* - * If we're mailing, make sure it's a mailto ACTION. - FM + * If we're mailing, make sure it's a mailto ACTION. -FM */ if ((submit_item->submit_method == URL_MAIL_METHOD) && strncmp(submit_item->submit_action, "mailto:", 7)) { @@ -9917,13 +10051,13 @@ PUBLIC int HText_SubmitForm ARGS4( } /* - * Check the ENCTYPE and set up the appropriate variables. - FM + * Check the ENCTYPE and set up the appropriate variables. -FM */ if (submit_item->submit_enctype && !strncasecomp(submit_item->submit_enctype, "text/plain", 10)) { /* * Do not hex escape, and use physical newlines - * to separate name=value pairs. - FM + * to separate name=value pairs. -FM */ PlainText = TRUE; } else if (submit_item->submit_enctype && @@ -9931,7 +10065,7 @@ PUBLIC int HText_SubmitForm ARGS4( "application/sgml-form-urlencoded", 32)) { /* * Use semicolons instead of ampersands as the - * separators for name=value pairs. - FM + * separators for name=value pairs. -FM */ SemiColon = TRUE; } else if (submit_item->submit_enctype && @@ -9941,7 +10075,7 @@ PUBLIC int HText_SubmitForm ARGS4( * Use the multipart MIME format. We should generate * a boundary string which we are sure doesn't occur * in the content, but for now we'll just assume that - * this string doesn't. - FM + * this string doesn't. -FM */ Boundary = "xnyLAaB03X"; } @@ -10012,7 +10146,7 @@ PUBLIC int HText_SubmitForm ARGS4( field_has_special = NO; for (p = val; - p && *p && !(field_has_8bit && field_has_special); + non_empty(p) && !(field_has_8bit && field_has_special); p++) if ((*p == HT_NON_BREAK_SPACE) || (*p == HT_EN_SPACE) || @@ -10022,7 +10156,7 @@ PUBLIC int HText_SubmitForm ARGS4( field_has_8bit = YES; } for (p = form_ptr->name; - p && *p && !(name_has_8bit && name_has_special); + non_empty(p) && !(name_has_8bit && name_has_special); p++) if ((*p == HT_NON_BREAK_SPACE) || (*p == HT_EN_SPACE) || @@ -10115,7 +10249,7 @@ PUBLIC int HText_SubmitForm ARGS4( /* * We are submitting POST content to a server, * so load content_type_out. This will be put in - * the post_content_type element if all goes well. - FM, kw + * the post_content_type element if all goes well. -FM, kw */ if (SemiColon == TRUE) { StrAllocCopy(content_type_out, @@ -10207,19 +10341,19 @@ PUBLIC int HText_SubmitForm ARGS4( case F_SUBMIT_TYPE: case F_TEXT_SUBMIT_TYPE: case F_IMAGE_SUBMIT_TYPE: - if (!(form_ptr->name && *form_ptr->name != '\0' && + if (!(non_empty(form_ptr->name) && !strcmp(form_ptr->name, link_name))) { CTRACE((tfp, "SubmitForm: skipping submit field with ")); CTRACE((tfp, "name \"%s\" for link_name \"%s\", %s.\n", form_ptr->name ? form_ptr->name : "???", link_name ? link_name : "???", - (form_ptr->name && *form_ptr->name) ? + non_empty(form_ptr->name) ? "not current link" : "no field name")); break; } if (!(form_ptr->type == F_TEXT_SUBMIT_TYPE || - (form_ptr->value && *form_ptr->value != '\0' && + (non_empty(form_ptr->value) && !strcmp(form_ptr->value, link_value)))) { CTRACE((tfp, "SubmitForm: skipping submit field with ")); @@ -10255,7 +10389,7 @@ PUBLIC int HText_SubmitForm ARGS4( field_has_8bit = NO; field_has_special = NO; for (p = val_used; - p && *p && !(field_has_8bit && field_has_special); + non_empty(p) && !(field_has_8bit && field_has_special); p++) { if ((*p == HT_NON_BREAK_SPACE) || (*p == HT_EN_SPACE) || @@ -10341,7 +10475,7 @@ PUBLIC int HText_SubmitForm ARGS4( name_has_8bit = NO; name_has_special = NO; for (p = name_used; - p && *p && !(name_has_8bit && name_has_special); + non_empty(p) && !(name_has_8bit && name_has_special); p++) { if ((*p == HT_NON_BREAK_SPACE) || (*p == HT_EN_SPACE) || @@ -10454,12 +10588,12 @@ PUBLIC int HText_SubmitForm ARGS4( * multiple submit buttons, or a single type="text" * that's been converted to a TEXT_SUBMIT_TYPE), * include the name=value pair, or fake name.x=0 and - * name.y=0 pairs for IMAGE_SUBMIT_TYPE. - FM + * name.y=0 pairs for IMAGE_SUBMIT_TYPE. -FM */ - if ((form_ptr->name && *form_ptr->name != '\0' && + if ((non_empty(form_ptr->name) && !strcmp(form_ptr->name, link_name)) && (form_ptr->type == F_TEXT_SUBMIT_TYPE || - (form_ptr->value && *form_ptr->value != '\0' && + (non_empty(form_ptr->value) && !strcmp(form_ptr->value, link_value)))) { int cdisp_name_startpos = 0; @@ -10495,7 +10629,7 @@ PUBLIC int HText_SubmitForm ARGS4( /* * It's a clickable image submit button. * Fake a 0,0 coordinate pair, which - * typically returns the image's default. - FM + * typically returns the image's default. -FM */ if (Boundary) { escaped1[cdisp_name_startpos] = '\0'; @@ -11054,7 +11188,7 @@ PUBLIC BOOL HText_hasUTF8OutputSet ARGS1( } /* -** Check charset and set the kcode element. - FM +** Check charset and set the kcode element. -FM ** Info on the input charset may be passed in in two forms, ** as a string (if given explicitly) and as a pointer to ** a LYUCcharset (from chartrans mechanism); either can be NULL. @@ -11087,7 +11221,7 @@ PUBLIC void HText_setKcode ARGS3( charset = p_in->MIMEname; } /* - ** Check whether we have a specified charset. - FM + ** Check whether we have a specified charset. -FM */ if (!charset || *charset == '\0') { return; @@ -11097,7 +11231,7 @@ PUBLIC void HText_setKcode ARGS3( ** We've included the charset, and not forced a download offer, ** only if the currently selected character set can handle it, ** so check the charset value and set the text->kcode element - ** appropriately. - FM + ** appropriately. -FM */ /* If charset isn't specified explicitely nor assumed, * p_in->MIMEname would be set as display charset. @@ -11126,7 +11260,7 @@ PUBLIC void HText_setKcode ARGS3( } else { /* ** If we get to here, it's not CJK, so disable that if - ** it is enabled. But only if we are quite sure. - FM & kw + ** it is enabled. But only if we are quite sure. -FM & kw */ text->kcode = NOKANJI; if (HTCJK != NOCJK) { @@ -11149,7 +11283,7 @@ PUBLIC void HText_setKcode ARGS3( } /* -** Set a permissible split at the current end of the last line. - FM +** Set a permissible split at the current end of the last line. -FM */ PUBLIC void HText_setBreakPoint ARGS1( HText *, text) @@ -11158,7 +11292,7 @@ PUBLIC void HText_setBreakPoint ARGS1( return; /* - * Can split here. - FM + * Can split here. -FM */ text->permissible_split = text->last_line->size; @@ -11176,7 +11310,7 @@ PUBLIC void HText_setBreakPoint ARGS1( ** command. Otherwise, it returns TRUE, i.e, that ** the target document might differ from the current, ** based on any caching directives or analyses which -** claimed or suggested this. - FM +** claimed or suggested this. -FM */ PUBLIC BOOL HText_AreDifferent ARGS2( HTParentAnchor *, anchor, @@ -11273,7 +11407,7 @@ PUBLIC BOOL HText_AreDifferent ARGS2( /* * We'll assume the target is a position in the currently * displayed document, and thus can ignore any header, META, - * or other directives not to use a cached rendition. - FM + * or other directives not to use a cached rendition. -FM */ return(FALSE); } @@ -11693,9 +11827,7 @@ PRIVATE void insert_new_textarea_anchor ARGS2( a->line_pos = anchor->line_pos; a->extent = anchor->extent; a->line_num = anchor->line_num + 1; - StrAllocCopy (a->hightext, anchor->hightext); - StrAllocCopy (a->hightext2, anchor->hightext2); - a->hightext2offset = anchor->hightext2offset; + LYCopyHiText(a, anchor); a->link_type = anchor->link_type; a->input_field = f; a->show_anchor = anchor->show_anchor; @@ -11918,7 +12050,7 @@ hang_detected: /* ugliness has happened; inform user and do the best we can */ * --KED 02/01/99 */ PUBLIC int HText_ExtEditForm ARGS1( - struct link *, form_link) + LinkInfo *, form_link) { struct stat stat_info; size_t size; @@ -11939,7 +12071,7 @@ PUBLIC int HText_ExtEditForm ARGS1( int orig_cnt = 0; int line_cnt = 1; - FormInfo *form = form_link->form; + FormInfo *form = form_link->l_form; char *areaname = form->name; int form_num = form->number; @@ -12256,14 +12388,14 @@ PUBLIC int HText_ExtEditForm ARGS1( * --KED 02/14/99 */ PUBLIC void HText_ExpandTextarea ARGS2( - struct link *, form_link, - int, newlines) + LinkInfo *, form_link, + int, newlines) { TextAnchor *anchor_ptr; TextAnchor *end_anchor = NULL; BOOLEAN firstanchor = TRUE; - FormInfo *form = form_link->form; + FormInfo *form = form_link->l_form; char *areaname = form->name; int form_num = form->number; @@ -12356,7 +12488,7 @@ PUBLIC void HText_ExpandTextarea ARGS2( * --KED 02/21/99 */ PUBLIC int HText_InsertFile ARGS1( - struct link *, form_link) + LinkInfo *, form_link) { struct stat stat_info; size_t size; @@ -12370,7 +12502,7 @@ PUBLIC int HText_InsertFile ARGS1( BOOLEAN firstanchor = TRUE; BOOLEAN truncalert = FALSE; - FormInfo *form = form_link->form; + FormInfo *form = form_link->l_form; char *areaname = form->name; int form_num = form->number; @@ -12518,9 +12650,7 @@ PUBLIC int HText_InsertFile ARGS1( a->line_pos = anchor_ptr->line_pos; a->extent = anchor_ptr->extent; a->line_num = anchor_ptr->line_num; - StrAllocCopy (a->hightext, anchor_ptr->hightext); - StrAllocCopy (a->hightext2, anchor_ptr->hightext2); - a->hightext2offset = anchor_ptr->hightext2offset; + LYCopyHiText(a, anchor_ptr); a->link_type = anchor_ptr->link_type; a->input_field = f; a->show_anchor = anchor_ptr->show_anchor; @@ -12675,14 +12805,12 @@ PUBLIC int HText_InsertFile ARGS1( * characters) of it. It doesn't check whether the 'len' bytes crosses a * character boundary (if multibyte chars are in string). Assumes that the * cursor is positioned in the place where the 1st char of string should be - * drawn. Currently used only in redraw_lines_of_link when - * defined(USE_COLOR_STYLE) && !defined(NO_HILIT_FIX) + * drawn. + * * This code is based on display_line. This code was tested with ncurses only - * (since no support for lss is availble for Slang) and with - * defined(USE_COLOR_STYLE). - * -HV. + * (since no support for lss is availble for Slang) -HV. */ -#if defined(USE_COLOR_STYLE) && !defined(NO_HILIT_FIX) +#ifdef USE_COLOR_STYLE PRIVATE void redraw_part_of_line ARGS4( HTLine *, line, char*, str, @@ -12772,12 +12900,12 @@ PRIVATE void redraw_part_of_line ARGS4( * into LastDisplayChar if it was a multibyte * character) or hyphen, though it should have * been excluded by HText_appendCharacter() or by - * split_line() in those cases. - FM + * split_line() in those cases. -FM */ break; } else { /* - * Make it a hard hyphen and fall through. - FM + * Make it a hard hyphen and fall through. -FM */ buffer[0] = '-'; i++; @@ -12814,7 +12942,7 @@ PRIVATE void redraw_part_of_line ARGS4( * spacing characters in this code set, * but this will become an issue when * the development code set's multibyte - * character handling is used. - FM + * character handling is used. -FM */ LastDisplayChar = 'M'; } else { @@ -12839,7 +12967,7 @@ PRIVATE void redraw_part_of_line ARGS4( #endif return; } -#endif /* defined(USE_COLOR_STYLE) && !defined(NO_HILIT_FIX) */ +#endif /* USE_COLOR_STYLE */ #ifndef USE_COLOR_STYLE /* @@ -13153,12 +13281,12 @@ PRIVATE void move_to_glyph ARGS10( * into LastDisplayChar if it was a multibyte * character) or hyphen, though it should have * been excluded by HText_appendCharacter() or by - * split_line() in those cases. - FM + * split_line() in those cases. -FM */ break; } else { /* - * Make it a hard hyphen and fall through. - FM + * Make it a hard hyphen and fall through. -FM */ buffer[0] = '-'; } @@ -13273,15 +13401,13 @@ PRIVATE void move_to_glyph ARGS10( i++; sdata++; data++; /* - * For now, load 'M' into LastDisplayChar, - * but we should check whether it's white - * and if so, use ' '. I don't know if - * there actually are white CJK characters, - * and we're loading ' ' for multibyte - * spacing characters in this code set, - * but this will become an issue when - * the development code set's multibyte - * character handling is used. - FM + * For now, load 'M' into LastDisplayChar, but we should + * check whether it's white and if so, use ' '. I don't + * know if there actually are white CJK characters, and + * we're loading ' ' for multibyte spacing characters in + * this code set, but this will become an issue when the + * development code set's multibyte character handling is + * used. -FM */ LastDisplayChar = 'M'; } else { @@ -13350,7 +13476,7 @@ PUBLIC void LYMoveToLink ARGS6( if (links[i].ly < links[cur].ly) break; if (links[i].type == WWW_FORM_LINK_TYPE) { - XP_draw_min = links[i].ly + links[i].form->size; + XP_draw_min = links[i].ly + links[i].l_form->size; break; } } @@ -13384,41 +13510,37 @@ PUBLIC void LYMoveToLink ARGS6( #endif /* !USE_COLOR_STYLE */ /* - This is used only if compiled with lss support. It's called to draw - regular link (1st two lines of link) when it's being unhighlighted in - highlight:LYUtils. -*/ - + * This is used only if compiled with lss support. It's called to draw regular + * link (1st two lines of link) when it's being unhighlighted in LYhighlight(). + */ PUBLIC void redraw_lines_of_link ARGS1( int, cur GCC_UNUSED) { -#if defined(USE_COLOR_STYLE) && !defined(NO_HILIT_FIX) +#ifdef USE_COLOR_STYLE #define pvtTITLE_HEIGHT 1 - HTLine* todr1, *todr2; + HTLine* todr1; int lines_back; + int row, col, count; + char *text; if (HTMainText->next_line == HTMainText->last_line) { /* we are at the last page - that is partially filled */ - lines_back = HTMainText->Lines - ( links[cur].ly-pvtTITLE_HEIGHT+ + lines_back = HTMainText->Lines - ( links[cur].ly - pvtTITLE_HEIGHT+ HTMainText->top_of_screen); } else { - lines_back = display_lines - (links[cur].ly-pvtTITLE_HEIGHT); + lines_back = display_lines - (links[cur].ly - pvtTITLE_HEIGHT); } todr1 = HTMainText->next_line; while (lines_back-- > 0) todr1 = todr1->prev; - todr2 = (links[cur].hightext2 && links[cur].ly < display_lines) ? - todr1->next : 0; - LYmove(links[cur].ly, links[cur].lx); - redraw_part_of_line (todr1, links[cur].hightext, - strlen(links[cur].hightext), HTMainText); - if (todr2) { - LYmove(links[cur].ly+1,links[cur].hightext2_offset); - redraw_part_of_line (todr2, links[cur].hightext2, - strlen(links[cur].hightext2), HTMainText); + row = links[cur].ly; + for (count = 0; row < display_lines && (text = LYGetHiliteStr(cur, count)) != NULL; ++count) { + col = LYGetHilitePos(cur, count); + LYmove(row++, col); + redraw_part_of_line (todr1, text, strlen(text), HTMainText); + todr1 = todr1->next; } - #undef pvtTITLE_HEIGHT #else /* no dead code !*/ diff --git a/src/GridText.h b/src/GridText.h index 0e2956a7..e2887925 100644 --- a/src/GridText.h +++ b/src/GridText.h @@ -260,12 +260,12 @@ extern BOOL HText_AreDifferent PARAMS(( CONST char * full_address)); extern int HText_ExtEditForm PARAMS(( - struct link * form_link)); + LinkInfo * form_link)); extern void HText_ExpandTextarea PARAMS(( - struct link * form_link, + LinkInfo * form_link, int newlines)); extern int HText_InsertFile PARAMS(( - struct link * form_link)); + LinkInfo * form_link)); extern void redraw_lines_of_link PARAMS((int cur)); extern void LYMoveToLink PARAMS(( diff --git a/src/HTAlert.c b/src/HTAlert.c index 2fb89f9f..d70423aa 100644 --- a/src/HTAlert.c +++ b/src/HTAlert.c @@ -774,7 +774,7 @@ PUBLIC BOOL HTConfirmCookie ARGS4( _statusline(message); FREE(message); } - while (1) { + for (;;) { if(LYAcceptAllCookies) { ch = 'A'; } else { @@ -806,15 +806,17 @@ PUBLIC BOOL HTConfirmCookie ARGS4( && isalpha(ch) && (p = strrchr(prompt, L_PAREN)) != 0) { + CTRACE((tfp, "Looking for %c in %s\n", ch, p)); while (*p != R_PAREN && *p != 0 && isalpha(UCH(*s))) { - if (*p == ch) { - ch = *s; - break; - } else { - if (isalpha(UCH(*p)) && (*p == TOUPPER(*p))) - s++; - p++; + if (isalpha(UCH(*p)) && (*p == TOUPPER(*p))) { + CTRACE((tfp, "...testing %c/%c\n", *p, *s)); + if (*p == ch) { + ch = *s; + break; + } + ++s; } + ++p; } } } diff --git a/src/HTForms.h b/src/HTForms.h index 5962f594..c9c82dcc 100644 --- a/src/HTForms.h +++ b/src/HTForms.h @@ -9,15 +9,15 @@ /* change_form_link calls change_form_link_ex with all its args and FALSE as last arg */ -extern int change_form_link PARAMS((struct link *form_link, - document *newdoc, BOOLEAN *refresh_screen, - char *link_name, char *link_value, +extern int change_form_link PARAMS((int cur, + document *newdoc, + BOOLEAN *refresh_screen, BOOLEAN use_last_tfpos, BOOLEAN immediate_submit)); -extern int change_form_link_ex PARAMS((struct link *form_link, - document *newdoc, BOOLEAN *refresh_screen, - char *link_name, char *link_value, +extern int change_form_link_ex PARAMS((int cur, + document *newdoc, + BOOLEAN *refresh_screen, BOOLEAN use_last_tfpos, BOOLEAN immediate_submit, BOOLEAN draw_only)); diff --git a/src/LYClean.c b/src/LYClean.c index 22bb32cb..1082ca88 100644 --- a/src/LYClean.c +++ b/src/LYClean.c @@ -13,6 +13,10 @@ #include <LYexit.h> #include <LYLeaks.h> +#ifdef WATT32 +extern void sig_handler_watt(int); +#endif /* WATT32 */ + #ifdef VMS BOOLEAN HadVMSInterrupt = FALSE; #endif /* VMS */ @@ -29,8 +33,17 @@ PUBLIC void cleanup_sig ARGS1( /* * Need to rearm the signal. */ +#ifdef WATT32 + if (wathndlcbrk) { + sig_handler_watt(sig); /* Use WATT-32 signal handler */ + } /* Requires patch to WATT-32 */ +#endif /* WATT32 */ signal(SIGINT, cleanup_sig); sigint = TRUE; +#ifdef WATT32 + _eth_release(); + _eth_init(); +#endif /* WATT32 */ return; } #endif /* IGNORE_CTRL_C */ diff --git a/src/LYCookie.c b/src/LYCookie.c index 8efc4e6c..fdf37227 100644 --- a/src/LYCookie.c +++ b/src/LYCookie.c @@ -296,6 +296,30 @@ PRIVATE BOOL is_prefix ARGS2(CONST char *, a, CONST char *, b) } /* + * Find the domain-entry for the given name. + */ +PRIVATE domain_entry * find_domain_entry ARGS1( + CONST char *, name) +{ + HTList *hl; + domain_entry *de = NULL; + + if (name != 0 + && *name != '\0') { + for (hl = domain_list; hl != NULL; hl = hl->next) { + de = (domain_entry *)hl->object; + if (de != NULL + && de->domain != NULL + && !strcasecomp(name, de->domain)) { + break; + } + de = NULL; + } + } + return de; +} + +/* ** Store a cookie somewhere in the domain list. - AK & FM */ PRIVATE void store_cookie ARGS3( @@ -333,19 +357,8 @@ PRIVATE void store_cookie ARGS3( * is already listed. */ cookie_list = NULL; - for (hl = domain_list; hl != NULL; hl = hl->next) { - de = (domain_entry *)hl->object; - if ((de != NULL && de->domain != NULL) && - !strcasecomp(co->domain, de->domain)) { - cookie_list = de->cookie_list; - break; - } - } - - if(hl == NULL) { - de = NULL; - cookie_list = NULL; - } + if ((de = find_domain_entry(co->domain)) != NULL) + cookie_list = de->cookie_list; /* * Apply sanity checks. @@ -375,6 +388,7 @@ PRIVATE void store_cookie ARGS3( return; } } + /* * The next 4 conditions do NOT apply if the domain is still * the default of request-host. (domains - case insensitive). @@ -398,15 +412,13 @@ PRIVATE void store_cookie ARGS3( * value otherwise qualified. - FM */ if (co->domain[0] != '.' || co->domain[1] == '\0') { - CTRACE((tfp, "store_cookie: Rejecting domain '%s'.\n", - co->domain)); + CTRACE((tfp, "store_cookie: Rejecting domain '%s'.\n", co->domain)); freeCookie(co); return; } ptr = strchr((co->domain + 1), '.'); if (ptr == NULL || ptr[1] == '\0') { - CTRACE((tfp, "store_cookie: Rejecting domain '%s'.\n", - co->domain)); + CTRACE((tfp, "store_cookie: Rejecting domain '%s'.\n", co->domain)); freeCookie(co); return; } @@ -468,8 +480,8 @@ PRIVATE void store_cookie ARGS3( hostname); if (!HTConfirmDefault(msg, NO)) { CTRACE((tfp, "store_cookie: Rejecting domain '%s' for host '%s'.\n", - co->domain, - hostname)); + co->domain, + hostname)); freeCookie(co); FREE(msg); return; @@ -490,28 +502,14 @@ PRIVATE void store_cookie ARGS3( FREE(msg); } - if (hl == NULL) { + if (de == NULL) { /* - * Domain not found; add a new entry for this domain. + * Domain not found; add a new entry for this domain. */ de = typecalloc(domain_entry); if (de == NULL) outofmem(__FILE__, "store_cookie"); -#if 0 /* was: ifdef EXP_PERSISTENT_COOKIES */ - /* - * The default behavior for this new domain could be set - * differently if the cookie comes from a file, as the - * code had it originally, but there doesn't seem to be - * a good reason for it any more; setting more permissive - * behavior for individual domains is now possible via - * configuration options. - kw - */ - if (persistent_cookies - && (co->flags & COOKIE_FLAG_FROM_FILE)) - de->bv = ACCEPT_ALWAYS; /* ?? */ - else -#endif - de->bv = QUERY_USER; + de->bv = QUERY_USER; de->invcheck_bv = DEFAULT_INVCHECK_BV; /* should this go here? */ cookie_list = de->cookie_list = HTList_new(); StrAllocCopy(de->domain, co->domain); @@ -823,6 +821,260 @@ PRIVATE char * scan_cookie_sublist ARGS6( } /* + * Presence of value is needed (indicated normally by '=') to start a cookie, + * but it can be an empty string. - kw 1999-06-24 + */ +PRIVATE char *alloc_attr_value ARGS2( + CONST char *, value_start, + CONST char *, value_end) +{ + char *value = NULL; + + if (value_start && value_end >= value_start) { + int value_len = (value_end - value_start); + + if (value_len > max_cookies_buffer) { + value_len = max_cookies_buffer; + } + value = typecallocn(char, value_len + 1); + if (value == NULL) + outofmem(__FILE__, "LYProcessSetCookies"); + LYstrncpy(value, value_start, value_len); + } + return value; +} + +#define FLAGS_INVALID_PORT 1 +#define FLAGS_KNOWN_ATTR 2 +#define FLAGS_MAXAGE_ATTR 4 + +PRIVATE unsigned parse_attribute ARGS9( + unsigned, flags, + cookie *, cur_cookie, + int *, cookie_len, + CONST char *, attr_start, + int, attr_len, + char *, value, + CONST char *, address, + char *, hostname, + int, port) +{ + BOOLEAN known_attr = NO; + int url_type; + + flags &= ~FLAGS_KNOWN_ATTR; + if (attr_len == 6 && !strncasecomp(attr_start, "secure", 6)) { + if (value == NULL) { + known_attr = YES; + if (cur_cookie != NULL) { + cur_cookie->flags |= COOKIE_FLAG_SECURE; + } + } else { + /* + * If secure has a value, assume someone + * misused it as cookie name. - FM + */ + known_attr = NO; + } + } else if (attr_len == 7 && !strncasecomp(attr_start, "discard", 7)) { + if (value == NULL) { + known_attr = YES; + if (cur_cookie != NULL) { + cur_cookie->flags |= COOKIE_FLAG_DISCARD; + } + } else { + /* + * If discard has a value, assume someone + * used it as a cookie name. - FM + */ + known_attr = NO; + } + } else if (attr_len == 7 && !strncasecomp(attr_start, "comment", 7)) { + known_attr = YES; + if (cur_cookie != NULL && value && + /* + * Don't process a repeat comment. - FM + */ + cur_cookie->comment == NULL) { + StrAllocCopy(cur_cookie->comment, value); + *cookie_len += strlen(cur_cookie->comment); + } + } else if (attr_len == 10 && !strncasecomp(attr_start, + "commentURL", 10)) { + known_attr = YES; + if (cur_cookie != NULL && value && + /* + * Don't process a repeat commentURL. - FM + */ + cur_cookie->commentURL == NULL) { + /* + * We should get only absolute URLs as + * values, but will resolve versus the + * request's URL just in case. - FM + */ + cur_cookie->commentURL = HTParse(value, + address, + PARSE_ALL); + /* + * Accept only URLs for http or https servers. - FM + */ + if ((url_type = is_url(cur_cookie->commentURL)) && + (url_type == HTTP_URL_TYPE || + url_type == HTTPS_URL_TYPE)) { + *cookie_len += strlen(cur_cookie->commentURL); + } else { + CTRACE((tfp, "LYProcessSetCookies: Rejecting commentURL value '%s'\n", + cur_cookie->commentURL)); + FREE(cur_cookie->commentURL); + } + } + } else if (attr_len == 6 && !strncasecomp(attr_start, "domain", 6)) { + known_attr = YES; + if (cur_cookie != NULL && value && + /* + * Don't process a repeat domain. - FM + */ + !(cur_cookie->flags & COOKIE_FLAG_DOMAIN_SET)) { + *cookie_len -= strlen(cur_cookie->domain); + /* + * If the value does not have a lead dot, + * but does have an embedded dot, and is + * not an exact match to the hostname, nor + * is a numeric IP address, add a lead dot. + * Otherwise, use the value as is. - FM + * (domains - case insensitive). + */ + if (value[0] != '.' && value[0] != '\0' && + value[1] != '\0' && strcasecomp(value, hostname)) { + char *ptr = strchr(value, '.'); + if (ptr != NULL && ptr[1] != '\0') { + ptr = value; + while (*ptr == '.' || + isdigit(UCH(*ptr))) + ptr++; + if (*ptr != '\0') { + CTRACE((tfp, + "LYProcessSetCookies: Adding lead dot for domain value '%s'\n", + value)); + StrAllocCopy(cur_cookie->domain, "."); + StrAllocCat(cur_cookie->domain, value); + } else { + StrAllocCopy(cur_cookie->domain, value); + } + } else { + StrAllocCopy(cur_cookie->domain, value); + } + } else { + StrAllocCopy(cur_cookie->domain, value); + } + *cookie_len += strlen(cur_cookie->domain); + cur_cookie->flags |= COOKIE_FLAG_DOMAIN_SET; + } + } else if (attr_len == 4 && !strncasecomp(attr_start, "path", 4)) { + known_attr = YES; + if (cur_cookie != NULL && value && + /* + * Don't process a repeat path. - FM + */ + !(cur_cookie->flags & COOKIE_FLAG_PATH_SET)) { + *cookie_len -= strlen(cur_cookie->path); + StrAllocCopy(cur_cookie->path, value); + *cookie_len += (cur_cookie->pathlen = strlen(cur_cookie->path)); + cur_cookie->flags |= COOKIE_FLAG_PATH_SET; + } + } else if (attr_len == 4 && !strncasecomp(attr_start, "port", 4)) { + if (cur_cookie != NULL && value && + /* + * Don't process a repeat port. - FM + */ + cur_cookie->PortList == NULL) { + char *cp = value; + while ((*cp != '\0') && + (isdigit(UCH(*cp)) || + *cp == ',' || *cp == ' ')) { + cp++; + } + if (*cp == '\0') { + if (!port_matches(port, value)) { + flags |= FLAGS_INVALID_PORT; + } else { + StrAllocCopy(cur_cookie->PortList, value); + *cookie_len += strlen(cur_cookie->PortList); + } + known_attr = YES; + } else { + known_attr = NO; + } + } else if (cur_cookie != NULL) { + /* + * Don't process a repeat port. - FM + */ + if (cur_cookie->PortList == NULL) { + HTSprintf0(&(cur_cookie->PortList), "%d", port); + *cookie_len += strlen(cur_cookie->PortList); + } + known_attr = YES; + } + } else if (attr_len == 7 && !strncasecomp(attr_start, "version", 7)) { + known_attr = YES; + if (cur_cookie != NULL && value && + /* + * Don't process a repeat version. - FM + */ + cur_cookie->version < 1) { + int temp = strtol(value, NULL, 10); + if (errno != -ERANGE) { + cur_cookie->version = temp; + } + } + } else if (attr_len == 7 && !strncasecomp(attr_start, "max-age", 7)) { + known_attr = YES; + if (cur_cookie != NULL && value && + /* + * Don't process a repeat max-age. - FM + */ + !(flags & FLAGS_MAXAGE_ATTR)) { + int temp = strtol(value, NULL, 10); + cur_cookie->flags |= COOKIE_FLAG_EXPIRES_SET; + if (errno == -ERANGE) { + cur_cookie->expires = (time_t)0; + } else { + cur_cookie->expires = (time(NULL) + temp); + CTRACE((tfp, "LYSetCookie: expires %ld, %s", + (long) cur_cookie->expires, + ctime(&cur_cookie->expires))); + } + flags |= FLAGS_MAXAGE_ATTR; + } + } else if (attr_len == 7 && !strncasecomp(attr_start, "expires", 7)) { + /* + * Convert an 'expires' attribute value if we haven't + * received a 'max-age'. Note that 'expires' should not + * be used in Version 1 cookies, but it might be used for + * "backward compatibility", and, in turn, ill-informed + * people surely would start using it instead of, rather + * than in addition to, 'max-age'. - FM + */ + known_attr = YES; + if ((cur_cookie != NULL && !(flags & FLAGS_MAXAGE_ATTR)) && + !(cur_cookie->flags & COOKIE_FLAG_EXPIRES_SET)) { + if (value) { + cur_cookie->flags |= COOKIE_FLAG_EXPIRES_SET; + cur_cookie->expires = LYmktime(value, FALSE); + if (cur_cookie->expires > 0) { + CTRACE((tfp, "LYSetCookie: expires %ld, %s", + (long) cur_cookie->expires, + ctime(&cur_cookie->expires))); + } + } + } + } + if (known_attr) + flags |= FLAGS_KNOWN_ATTR; + return flags; +} + +/* ** Process potentially concatenated Set-Cookie2 and/or Set-Cookie ** headers. - FM */ @@ -837,11 +1089,10 @@ PRIVATE void LYProcessSetCookies ARGS6( CONST char *p, *attr_start, *attr_end, *value_start, *value_end; HTList *CombinedCookies = NULL, *cl = NULL; cookie *cur_cookie = NULL, *co = NULL; - int length = 0, url_type = 0; + int cookie_len = 0; int NumCookies = 0; - BOOL MaxAgeAttrSet = FALSE; BOOL Quoted = FALSE; - BOOLEAN invalidport = FALSE; + unsigned parse_flags = 0; if (!(SetCookie && *SetCookie) && !(SetCookie2 && *SetCookie2)) { @@ -1052,257 +1303,32 @@ PRIVATE void LYProcessSetCookies ARGS6( * Now, we can handle this attribute/value pair. */ if (attr_end > attr_start) { - int len = (attr_end - attr_start); - BOOLEAN known_attr = NO; - char *value = NULL; - - if (value_start && value_end >= value_start) { - /* - * Presence of value is now needed (indicated normally by '=') - * to start a cookie, but it can now be an empty string. - * - kw 1999-06-24 - */ - int value_len = (value_end - value_start); - - if (value_len > max_cookies_buffer) { - value_len = max_cookies_buffer; - } - value = typecallocn(char, value_len + 1); - if (value == NULL) - outofmem(__FILE__, "LYProcessSetCookies"); - LYstrncpy(value, value_start, value_len); - } - if (len == 6 && !strncasecomp(attr_start, "secure", 6)) { - if (value == NULL) { - known_attr = YES; - if (cur_cookie != NULL) { - cur_cookie->flags |= COOKIE_FLAG_SECURE; - } - } else { - /* - * If secure has a value, assume someone - * misused it as cookie name. - FM - */ - known_attr = NO; - } - } else if (len == 7 && !strncasecomp(attr_start, "discard", 7)) { - if (value == NULL) { - known_attr = YES; - if (cur_cookie != NULL) { - cur_cookie->flags |= COOKIE_FLAG_DISCARD; - } - } else { - /* - * If discard has a value, assume someone - * used it as a cookie name. - FM - */ - known_attr = NO; - } - } else if (len == 7 && !strncasecomp(attr_start, "comment", 7)) { - known_attr = YES; - if (cur_cookie != NULL && value && - /* - * Don't process a repeat comment. - FM - */ - cur_cookie->comment == NULL) { - StrAllocCopy(cur_cookie->comment, value); - length += strlen(cur_cookie->comment); - } - } else if (len == 10 && !strncasecomp(attr_start, - "commentURL", 10)) { - known_attr = YES; - if (cur_cookie != NULL && value && - /* - * Don't process a repeat commentURL. - FM - */ - cur_cookie->commentURL == NULL) { - /* - * We should get only absolute URLs as - * values, but will resolve versus the - * request's URL just in case. - FM - */ - cur_cookie->commentURL = HTParse(value, - address, - PARSE_ALL); - /* - * Accept only URLs for http or https servers. - FM - */ - if ((url_type = is_url(cur_cookie->commentURL)) && - (url_type == HTTP_URL_TYPE || - url_type == HTTPS_URL_TYPE)) { - length += strlen(cur_cookie->commentURL); - } else { - CTRACE((tfp, "LYProcessSetCookies: Rejecting commentURL value '%s'\n", - cur_cookie->commentURL)); - FREE(cur_cookie->commentURL); - } - } - } else if (len == 6 && !strncasecomp(attr_start, "domain", 6)) { - known_attr = YES; - if (cur_cookie != NULL && value && - /* - * Don't process a repeat domain. - FM - */ - !(cur_cookie->flags & COOKIE_FLAG_DOMAIN_SET)) { - length -= strlen(cur_cookie->domain); - /* - * If the value does not have a lead dot, - * but does have an embedded dot, and is - * not an exact match to the hostname, nor - * is a numeric IP address, add a lead dot. - * Otherwise, use the value as is. - FM - * (domains - case insensitive). - */ - if (value[0] != '.' && value[0] != '\0' && - value[1] != '\0' && strcasecomp(value, hostname)) { - char *ptr = strchr(value, '.'); - if (ptr != NULL && ptr[1] != '\0') { - ptr = value; - while (*ptr == '.' || - isdigit(UCH(*ptr))) - ptr++; - if (*ptr != '\0') { - CTRACE((tfp, - "LYProcessSetCookies: Adding lead dot for domain value '%s'\n", - value)); - StrAllocCopy(cur_cookie->domain, "."); - StrAllocCat(cur_cookie->domain, value); - } else { - StrAllocCopy(cur_cookie->domain, value); - } - } else { - StrAllocCopy(cur_cookie->domain, value); - } - } else { - StrAllocCopy(cur_cookie->domain, value); - } - length += strlen(cur_cookie->domain); - cur_cookie->flags |= COOKIE_FLAG_DOMAIN_SET; - } - } else if (len == 4 && !strncasecomp(attr_start, "path", 4)) { - known_attr = YES; - if (cur_cookie != NULL && value && - /* - * Don't process a repeat path. - FM - */ - !(cur_cookie->flags & COOKIE_FLAG_PATH_SET)) { - length -= strlen(cur_cookie->path); - StrAllocCopy(cur_cookie->path, value); - length += (cur_cookie->pathlen = strlen(cur_cookie->path)); - cur_cookie->flags |= COOKIE_FLAG_PATH_SET; - } - } else if (len == 4 && !strncasecomp(attr_start, "port", 4)) { - if (cur_cookie != NULL && value && - /* - * Don't process a repeat port. - FM - */ - cur_cookie->PortList == NULL) { - char *cp = value; - while ((*cp != '\0') && - (isdigit(UCH(*cp)) || - *cp == ',' || *cp == ' ')) { - cp++; - } - if (*cp == '\0' && !port_matches(port, value)) { - invalidport = TRUE; - known_attr = YES; - } else if (*cp == '\0') { - StrAllocCopy(cur_cookie->PortList, value); - length += strlen(cur_cookie->PortList); - known_attr = YES; - } else { - known_attr = NO; - } - } else if (cur_cookie != NULL) { - /* - * Don't process a repeat port. - FM - */ - if (cur_cookie->PortList == NULL) { - HTSprintf0(&(cur_cookie->PortList), "%d", port); - length += strlen(cur_cookie->PortList); - } - known_attr = YES; - } - } else if (len == 7 && !strncasecomp(attr_start, "version", 7)) { - known_attr = YES; - if (cur_cookie != NULL && value && - /* - * Don't process a repeat version. - FM - */ - cur_cookie->version < 1) { - int temp = strtol(value, NULL, 10); - if (errno != -ERANGE) { - cur_cookie->version = temp; - } - } - } else if (len == 7 && !strncasecomp(attr_start, "max-age", 7)) { - known_attr = YES; - if (cur_cookie != NULL && value && - /* - * Don't process a repeat max-age. - FM - */ - !MaxAgeAttrSet) { - int temp = strtol(value, NULL, 10); - cur_cookie->flags |= COOKIE_FLAG_EXPIRES_SET; - if (errno == -ERANGE) { - cur_cookie->expires = (time_t)0; - } else { - cur_cookie->expires = (time(NULL) + temp); - CTRACE((tfp, "LYSetCookie: expires %ld, %s", - (long) cur_cookie->expires, - ctime(&cur_cookie->expires))); - } - MaxAgeAttrSet = TRUE; - } - } else if (len == 7 && !strncasecomp(attr_start, "expires", 7)) { - /* - * Convert an 'expires' attribute value if we haven't - * received a 'max-age'. Note that 'expires' should not - * be used in Version 1 cookies, but it might be used for - * "backward compatibility", and, in turn, ill-informed - * people surely would start using it instead of, rather - * than in addition to, 'max-age'. - FM - */ - known_attr = YES; - if ((cur_cookie != NULL && !MaxAgeAttrSet) && - !(cur_cookie->flags & COOKIE_FLAG_EXPIRES_SET)) { - if (value) { - cur_cookie->flags |= COOKIE_FLAG_EXPIRES_SET; - cur_cookie->expires = LYmktime(value, FALSE); - if (cur_cookie->expires > 0) { - CTRACE((tfp, "LYSetCookie: expires %ld, %s", - (long) cur_cookie->expires, - ctime(&cur_cookie->expires))); - } - } - } - } + char *value = alloc_attr_value(value_start, value_end); + + parse_flags = parse_attribute (parse_flags, + cur_cookie, + &cookie_len, + attr_start, + (attr_end - attr_start), + value, + address, + hostname, + port); /* - * If none of the above comparisons succeeded, and we have - * a value, then we have an unknown pair of the form 'foo=bar', - * which means it's time to create a new cookie. If we don't - * have a non-zero-length value, assume it's an error or a - * new, unknown attribute which doesn't take a value, and - * ignore it. - FM - */ - /* if (!known_attr && value_end > value_start) */ - - /* Is there any reason we don't want to accept cookies with - * no value? This seems to be needed for sites that reset a - * cookie by nulling out the value. If this causes problems, - * we can go back to the original behavior above. - BJP - * - * Presence of value is now needed (indicated normally by '='), - * but it can now be an empty string. - kw 1999-06-24 + * Presence of value is needed (indicated normally by '='), + * but it can be an empty string. - kw 1999-06-24 */ - if (!known_attr && value && value_end >= value_start) { + if (!(parse_flags & FLAGS_KNOWN_ATTR) + && value + && value_end >= value_start) { /* * If we've started a cookie, and it's not too big, * save it in the CombinedCookies list. - FM */ - if (length <= max_cookies_buffer && cur_cookie != NULL && - !invalidport) { + if (cookie_len <= max_cookies_buffer + && cur_cookie != NULL + && !(parse_flags & FLAGS_INVALID_PORT)) { /* * Assume version 1 if not set to that or higher. - FM */ @@ -1318,10 +1344,10 @@ PRIVATE void LYProcessSetCookies ARGS6( (cur_cookie->value ? cur_cookie->value : "[no value]"))); CTRACE((tfp, - invalidport ? + (parse_flags & FLAGS_INVALID_PORT) ? " due to excessive length!\n" : " due to invalid port!\n")); - if (invalidport) { + if (parse_flags & FLAGS_INVALID_PORT) { NumCookies --; } freeCookie(cur_cookie); @@ -1331,19 +1357,18 @@ PRIVATE void LYProcessSetCookies ARGS6( * Start a new cookie. - FM */ cur_cookie = newCookie(); - invalidport = FALSE; - length = 0; + cookie_len = 0; NumCookies++; MemAllocCopy(&(cur_cookie->name), attr_start, attr_end); - length += strlen(cur_cookie->name); + cookie_len += strlen(cur_cookie->name); MemAllocCopy(&(cur_cookie->value), value_start, value_end); - length += strlen(cur_cookie->value); + cookie_len += strlen(cur_cookie->value); StrAllocCopy(cur_cookie->domain, hostname); - length += strlen(cur_cookie->domain); + cookie_len += strlen(cur_cookie->domain); StrAllocCopy(cur_cookie->path, path); - length += (cur_cookie->pathlen = strlen(cur_cookie->path)); + cookie_len += (cur_cookie->pathlen = strlen(cur_cookie->path)); cur_cookie->port = port; - MaxAgeAttrSet = FALSE; + parse_flags = 0; cur_cookie->quoted = TRUE; } FREE(value); @@ -1355,19 +1380,19 @@ PRIVATE void LYProcessSetCookies ARGS6( * if we are within the length limit. - FM */ if (NumCookies <= max_cookies_domain - && length <= max_cookies_buffer - && cur_cookie != NULL && !invalidport) { + && cookie_len <= max_cookies_buffer + && cur_cookie != NULL && !(parse_flags & FLAGS_INVALID_PORT)) { if (cur_cookie->version < 1) { cur_cookie->version = 1; } HTList_appendObject(CombinedCookies, cur_cookie); - } else if (cur_cookie != NULL && !invalidport) { + } else if (cur_cookie != NULL && !(parse_flags & FLAGS_INVALID_PORT)) { CTRACE((tfp, "LYProcessSetCookies: Rejecting Set-Cookie2: %s=%s\n", (cur_cookie->name ? cur_cookie->name : "[no name]"), (cur_cookie->value ? cur_cookie->value : "[no value]"))); CTRACE((tfp, " due to excessive %s%s%s\n", - (length > max_cookies_buffer ? "length" : ""), - (length > max_cookies_buffer && + (cookie_len > max_cookies_buffer ? "length" : ""), + (cookie_len > max_cookies_buffer && NumCookies > max_cookies_domain ? " and " : ""), @@ -1388,7 +1413,7 @@ PRIVATE void LYProcessSetCookies ARGS6( * Process the Set-Cookie header, if no non-zero-length Set-Cookie2 * header was present. - FM */ - length = 0; + cookie_len = 0; NumCookies = 0; cur_cookie = NULL; p = ((SetCookie && !(SetCookie2 && *SetCookie2)) ? SetCookie : ""); @@ -1572,241 +1597,31 @@ PRIVATE void LYProcessSetCookies ARGS6( * Now, we can handle this attribute/value pair. */ if (attr_end > attr_start) { - int len = (attr_end - attr_start); - BOOLEAN known_attr = NO; - char *value = NULL; - - if (value_start && value_end >= value_start) { - /* - * Presence of value is now needed (indicated normally by '=') - * to start a cookie, but it can now be an empty string. - * - kw 1999-06-24 - */ - int value_len = (value_end - value_start); - - if (value_len > max_cookies_buffer) { - value_len = max_cookies_buffer; - } - value = typecallocn(char, value_len + 1); - if (value == NULL) - outofmem(__FILE__, "LYProcessSetCookies"); - LYstrncpy(value, value_start, value_len); - } - if (len == 6 && !strncasecomp(attr_start, "secure", 6)) { - if (value == NULL) { - known_attr = YES; - if (cur_cookie != NULL) { - cur_cookie->flags |= COOKIE_FLAG_SECURE; - } - } else { - /* - * If secure has a value, assume someone - * misused it as cookie name. - FM - */ - known_attr = NO; - } - } else if (len == 7 && !strncasecomp(attr_start, "discard", 7)) { - if (value == NULL) { - known_attr = YES; - if (cur_cookie != NULL) { - cur_cookie->flags |= COOKIE_FLAG_DISCARD; - } - } else { - /* - * If discard has a value, assume someone - * used it as a cookie name. - FM - */ - known_attr = NO; - } - } else if (len == 7 && !strncasecomp(attr_start, "comment", 7)) { - known_attr = YES; - if (cur_cookie != NULL && value && - /* - * Don't process a repeat comment. - FM - */ - cur_cookie->comment == NULL) { - StrAllocCopy(cur_cookie->comment, value); - length += strlen(cur_cookie->comment); - } - } else if (len == 10 && !strncasecomp(attr_start, - "commentURL", 10)) { - known_attr = YES; - if (cur_cookie != NULL && value && - /* - * Don't process a repeat commentURL. - FM - */ - cur_cookie->commentURL == NULL) { - /* - * We should get only absolute URLs as - * values, but will resolve versus the - * request's URL just in case. - FM - */ - cur_cookie->commentURL = HTParse(value, - address, - PARSE_ALL); - /* - * Accept only URLs for http or https servers. - FM - */ - if ((url_type = is_url(cur_cookie->commentURL)) && - (url_type == HTTP_URL_TYPE || - url_type == HTTPS_URL_TYPE)) { - length += strlen(cur_cookie->commentURL); - } else { - CTRACE((tfp, "LYProcessSetCookies: Rejecting commentURL value '%s'\n", - cur_cookie->commentURL)); - FREE(cur_cookie->commentURL); - } - } - } else if (len == 6 && !strncasecomp(attr_start, "domain", 6)) { - known_attr = YES; - if (cur_cookie != NULL && value && - /* - * Don't process a repeat domain. - FM - */ - !(cur_cookie->flags & COOKIE_FLAG_DOMAIN_SET)) { - length -= strlen(cur_cookie->domain); - /* - * If the value does not have a lead dot, - * but does have an embedded dot, and is - * not an exact match to the hostname, nor - * is a numeric IP address, add a lead dot. - * Otherwise, use the value as is. - FM - * (domains - case insensitive). - */ - if (value[0] != '.' && value[0] != '\0' && - value[1] != '\0' && strcasecomp(value, hostname)) { - char *ptr = strchr(value, '.'); - if (ptr != NULL && ptr[1] != '\0') { - ptr = value; - while (*ptr == '.' || - isdigit(UCH(*ptr))) - ptr++; - if (*ptr != '\0') { - CTRACE((tfp, - "LYProcessSetCookies: Adding lead dot for domain value '%s'\n", - value)); - StrAllocCopy(cur_cookie->domain, "."); - StrAllocCat(cur_cookie->domain, value); - } else { - StrAllocCopy(cur_cookie->domain, value); - } - } else { - StrAllocCopy(cur_cookie->domain, value); - } - } else { - StrAllocCopy(cur_cookie->domain, value); - } - length += strlen(cur_cookie->domain); - cur_cookie->flags |= COOKIE_FLAG_DOMAIN_SET; - } - } else if (len == 4 && !strncasecomp(attr_start, "path", 4)) { - known_attr = YES; - if (cur_cookie != NULL && value && - /* - * Don't process a repeat path. - FM - */ - !(cur_cookie->flags & COOKIE_FLAG_PATH_SET)) { - length -= strlen(cur_cookie->path); - StrAllocCopy(cur_cookie->path, value); - length += (cur_cookie->pathlen = strlen(cur_cookie->path)); - cur_cookie->flags |= COOKIE_FLAG_PATH_SET; - } - } else if (len == 4 && !strncasecomp(attr_start, "port", 4)) { - if (cur_cookie != NULL && value && - /* - * Don't process a repeat port. - FM - */ - cur_cookie->PortList == NULL) { - char *cp = value; - while ((*cp != '\0') && - (isdigit(UCH(*cp)) || - *cp == ',' || *cp == ' ')) { - cp++; - } - if (*cp == '\0' && port_matches(port, value)) { - StrAllocCopy(cur_cookie->PortList, value); - length += strlen(cur_cookie->PortList); - known_attr = YES; - } else { - known_attr = NO; - } - } else if (cur_cookie != NULL) { - /* - * Don't process a repeat port. - FM - */ - if (cur_cookie->PortList == NULL) { - HTSprintf0(&(cur_cookie->PortList), "%d", port); - length += strlen(cur_cookie->PortList); - } - known_attr = YES; - } - } else if (len == 7 && !strncasecomp(attr_start, "version", 7)) { - known_attr = YES; - if (cur_cookie != NULL && value && - /* - * Don't process a repeat version. - FM - */ - cur_cookie->version < 1) { - int temp = strtol(value, NULL, 10); - if (errno != -ERANGE) { - cur_cookie->version = temp; - } - } - } else if (len == 7 && !strncasecomp(attr_start, "max-age", 7)) { - known_attr = YES; - if ((cur_cookie != NULL) && !MaxAgeAttrSet && value) { - int temp = strtol(value, NULL, 10); - cur_cookie->flags |= COOKIE_FLAG_EXPIRES_SET; - if (errno == -ERANGE) { - cur_cookie->expires = (time_t)0; - } else { - cur_cookie->expires = (time(NULL) + temp); - } - MaxAgeAttrSet = TRUE; - } - } else if (len == 7 && !strncasecomp(attr_start, "expires", 7)) { - /* - * Convert an 'expires' attribute value if we haven't - * received a 'max-age'. Note that 'expires' should not - * be used in Version 1 cookies, but it might be used for - * "backward compatibility", and, in turn, ill-informed - * people surely would start using it instead of, rather - * than in addition to, 'max-age'. - FM - */ - known_attr = YES; - if ((cur_cookie != NULL) && !(MaxAgeAttrSet) && - !(cur_cookie->flags & COOKIE_FLAG_EXPIRES_SET)) { - if (value) { - cur_cookie->flags |= COOKIE_FLAG_EXPIRES_SET; - cur_cookie->expires = LYmktime(value, FALSE); - } - } - } + char *value = alloc_attr_value(value_start, value_end); + + parse_flags = parse_attribute (parse_flags, + cur_cookie, + &cookie_len, + attr_start, + (attr_end - attr_start), + value, + address, + hostname, + port); /* - * If none of the above comparisons succeeded, and we have - * a value, then we have an unknown pair of the form 'foo=bar', - * which means it's time to create a new cookie. If we don't - * have a non-zero-length value, assume it's an error or a - * new, unknown attribute which doesn't take a value, and - * ignore it. - FM - */ - /* if (!known_attr && value_end > value_start) */ - - /* Is there any reason we don't want to accept cookies with - * no value? This seems to be needed for sites that reset a - * cookie by nulling out the value. If this causes problems, - * we can go back to the original behavior above. - BJP - * - * Presence of value is now needed (indicated normally by '='), - * but it can now be an empty string. - kw 1999-06-24 + * Presence of value is needed (indicated normally by '='), + * but it can be an empty string. - kw 1999-06-24 */ - if (!known_attr && value && value_end >= value_start) { + if (!(parse_flags & FLAGS_KNOWN_ATTR) + && value + && value_end >= value_start) { /* * If we've started a cookie, and it's not too big, * save it in the CombinedCookies list. - FM */ - if (length <= max_cookies_buffer && cur_cookie != NULL) { + if (cookie_len <= max_cookies_buffer + && cur_cookie != NULL) { /* * If we had a Set-Cookie2 header, make sure * the version is at least 1, and mark it for @@ -1833,17 +1648,18 @@ PRIVATE void LYProcessSetCookies ARGS6( * Start a new cookie. - FM */ cur_cookie = newCookie(); - length = 0; + NumCookies++; + cookie_len = 0; MemAllocCopy(&(cur_cookie->name), attr_start, attr_end); - length += strlen(cur_cookie->name); + cookie_len += strlen(cur_cookie->name); MemAllocCopy(&(cur_cookie->value), value_start, value_end); - length += strlen(cur_cookie->value); + cookie_len += strlen(cur_cookie->value); StrAllocCopy(cur_cookie->domain, hostname); - length += strlen(cur_cookie->domain); + cookie_len += strlen(cur_cookie->domain); StrAllocCopy(cur_cookie->path, path); - length += (cur_cookie->pathlen = strlen(cur_cookie->path)); + cookie_len += (cur_cookie->pathlen = strlen(cur_cookie->path)); cur_cookie->port = port; - MaxAgeAttrSet = FALSE; + parse_flags = 0; cur_cookie->quoted = Quoted; Quoted = FALSE; } @@ -1854,7 +1670,7 @@ PRIVATE void LYProcessSetCookies ARGS6( /* * Handle the final Set-Cookie cookie if within length limit. - FM */ - if (NumCookies <= max_cookies_domain && length <= max_cookies_buffer && cur_cookie != NULL) { + if (NumCookies <= max_cookies_domain && cookie_len <= max_cookies_buffer && cur_cookie != NULL) { if (SetCookie2 != NULL) { if (cur_cookie->version < 1) { cur_cookie->version = 1; @@ -1867,8 +1683,8 @@ PRIVATE void LYProcessSetCookies ARGS6( (cur_cookie->name ? cur_cookie->name : "[no name]"), (cur_cookie->value ? cur_cookie->value : "[no value]"))); CTRACE((tfp, " due to excessive %s%s%s\n", - (length > max_cookies_buffer ? "length" : ""), - (length > max_cookies_buffer && NumCookies > max_cookies_domain ? " and " : ""), + (cookie_len > max_cookies_buffer ? "length" : ""), + (cookie_len > max_cookies_buffer && NumCookies > max_cookies_domain ? " and " : ""), (NumCookies > max_cookies_domain ? "number!\n" : "!\n"))); freeCookie(cur_cookie); cur_cookie = NULL; @@ -1987,7 +1803,7 @@ PUBLIC void LYSetCookie ARGS3( ** Entry function from creating a Cookie: request header ** if needed. - AK & FM */ -PUBLIC char * LYCookie ARGS4( +PUBLIC char * LYAddCookieHeader ARGS4( char *, hostname, char *, path, int, port, @@ -2013,17 +1829,15 @@ PUBLIC char * LYCookie ARGS4( if (de != NULL) { if (!HTList_isEmpty(de->cookie_list)) { /* - * Scan the domain's cookie_list for - * any cookies we should include in - * our request header. + * Scan the domain's cookie_list for any cookies we should + * include in our request header. */ header = scan_cookie_sublist(hostname, path, port, de->cookie_list, header, secure); } else if (de->bv == QUERY_USER && de->invcheck_bv == DEFAULT_INVCHECK_BV) { /* - * No cookies in this domain, and no default - * accept/reject choice was set by the user, - * so delete the domain. - FM + * No cookies in this domain, and no default accept/reject + * choice was set by the user, so delete the domain. - FM */ FREE(de->domain); HTList_delete(de->cookie_list); @@ -2345,203 +2159,185 @@ PRIVATE int LYHandleCookies ARGS4 ( /* * Seek the domain in the domain_list structure. - FM */ - for (dl = domain_list; dl != NULL; dl = dl->next) { - de = dl->object; - if (!(de && de->domain)) - /* - * First object in the list always is empty. - FM - */ - continue; - if (!strcasecomp(domain, de->domain)) { - FREE(domain); + if ((de = find_domain_entry(domain)) != NULL) { + FREE(domain); + /* + * We found the domain. Check + * whether a lynxID is present. - FM + */ + if (lynxID) { /* - * We found the domain. Check - * whether a lynxID is present. - FM + * Seek and delete the cookie with this lynxID + * in the domain's cookie list. - FM */ - if (lynxID) { - /* - * Seek and delete the cookie with this lynxID - * in the domain's cookie list. - FM - */ - for (cl = de->cookie_list; cl != NULL; cl = cl->next) { - if ((co = (cookie *)cl->object) == NULL) - /* - * First object is always empty. - FM - */ - continue; - if (!strcmp(lynxID, co->lynxID)) { + for (cl = de->cookie_list; cl != NULL; cl = cl->next) { + if ((co = (cookie *)cl->object) == NULL) + /* + * First object is always empty. - FM + */ + continue; + if (!strcmp(lynxID, co->lynxID)) { + /* + * We found the cookie. + * Delete it if confirmed. - FM + */ + if (HTConfirm(DELETE_COOKIE_CONFIRMATION) == FALSE) + { + FREE(lynxID); + HTNoDataOK = 1; + return(HT_NO_DATA); + } + HTList_removeObject(de->cookie_list, co); + freeCookie(co); + co = NULL; + total_cookies--; + if ((de->bv == QUERY_USER && + HTList_isEmpty(de->cookie_list)) && + HTConfirm(DELETE_EMPTY_DOMAIN_CONFIRMATION)) { /* - * We found the cookie. - * Delete it if confirmed. - FM + * No more cookies in this domain, no + * default accept/reject choice was set + * by the user, and got confirmation on + * deleting the domain, so do it. - FM */ - if (HTConfirm(DELETE_COOKIE_CONFIRMATION) == FALSE) - { - FREE(lynxID); - HTNoDataOK = 1; - return(HT_NO_DATA); - } - HTList_removeObject(de->cookie_list, co); - freeCookie(co); - co = NULL; - total_cookies--; - if ((de->bv == QUERY_USER && - HTList_isEmpty(de->cookie_list)) && - HTConfirm(DELETE_EMPTY_DOMAIN_CONFIRMATION)) { - /* - * No more cookies in this domain, no - * default accept/reject choice was set - * by the user, and got confirmation on - * deleting the domain, so do it. - FM - */ - FREE(de->domain); - HTList_delete(de->cookie_list); - de->cookie_list = NULL; - HTList_removeObject(domain_list, de); - FREE(de); - HTProgress(DOMAIN_EATEN); - } else { - HTProgress(COOKIE_EATEN); - } - LYSleepMsg(); - HTNoDataOK = 1; - break; + FREE(de->domain); + HTList_delete(de->cookie_list); + de->cookie_list = NULL; + HTList_removeObject(domain_list, de); + FREE(de); + HTProgress(DOMAIN_EATEN); + } else { + HTProgress(COOKIE_EATEN); } + LYSleepMsg(); + HTNoDataOK = 1; + break; } + } + } else { + /* + * Prompt whether to delete all of the cookies in this domain, + * or the domain if no cookies in it, or to change its 'allow' + * setting, or to cancel, and then act on the user's response. + * - FM + */ + if (HTList_isEmpty(de->cookie_list)) { + _statusline(DELETE_DOMAIN_SET_ALLOW_OR_CANCEL); } else { - /* - * Prompt whether to delete all of the cookies in - * this domain, or the domain if no cookies in it, - * or to change its 'allow' setting, or to cancel, - * and then act on the user's response. - FM - */ - if (HTList_isEmpty(de->cookie_list)) { - _statusline(DELETE_DOMAIN_SET_ALLOW_OR_CANCEL); - } else { - _statusline(DELETE_COOKIES_SET_ALLOW_OR_CANCEL); - } - HTNoDataOK = 1; - while (1) { - ch = LYgetch_single(); + _statusline(DELETE_COOKIES_SET_ALLOW_OR_CANCEL); + } + HTNoDataOK = 1; + while (1) { + ch = LYgetch_single(); #ifdef VMS - if (HadVMSInterrupt) { - HadVMSInterrupt = FALSE; - ch = 'C'; - } + if (HadVMSInterrupt) { + HadVMSInterrupt = FALSE; + ch = 'C'; + } #endif /* VMS */ - switch(ch) { - case 'A': - /* - * Set to accept all cookies - * from this domain. - FM - */ - de->bv = ACCEPT_ALWAYS; - HTUserMsg2(ALWAYS_ALLOWING_COOKIES, - de->domain); - return(HT_NO_DATA); - - case 'C': - /* - * Cancelled. - FM - */ - reject: - HTUserMsg(CANCELLED); - return(HT_NO_DATA); - - case 'D': - if (HTList_isEmpty(de->cookie_list)) { - /* - * We had an empty domain, so we - * were asked to delete it. - FM - */ - FREE(de->domain); - HTList_delete(de->cookie_list); - de->cookie_list = NULL; - HTList_removeObject(domain_list, de); - FREE(de); - HTProgress(DOMAIN_EATEN); - LYSleepMsg(); - break; - } + switch(ch) { + case 'A': + /* + * Set to accept all cookies from this domain. - FM + */ + de->bv = ACCEPT_ALWAYS; + HTUserMsg2(ALWAYS_ALLOWING_COOKIES, de->domain); + return(HT_NO_DATA); + + case 'C': + /* + * Cancelled. - FM + */ + reject: + HTUserMsg(CANCELLED); + return(HT_NO_DATA); + + case 'D': + if (HTList_isEmpty(de->cookie_list)) { + /* + * We had an empty domain, so we were asked to + * delete it. - FM + */ + FREE(de->domain); + HTList_delete(de->cookie_list); + de->cookie_list = NULL; + HTList_removeObject(domain_list, de); + FREE(de); + HTProgress(DOMAIN_EATEN); + LYSleepMsg(); + break; + } Delete_all_cookies_in_domain: - /* - * Delete all cookies in this domain. - FM - */ - cl = de->cookie_list; - while (cl) { - next = cl->next; - co = cl->object; - if (co) { - HTList_removeObject(de->cookie_list, - co); - freeCookie(co); - co = NULL; - total_cookies--; - } - cl = next; - } - HTProgress(DOMAIN_COOKIES_EATEN); - LYSleepMsg(); - /* - * If a default accept/reject - * choice is set, we're done. - FM - */ - if (de->bv != QUERY_USER) - return(HT_NO_DATA); - /* - * Check whether to delete - * the empty domain. - FM - */ - if(HTConfirm( - DELETE_EMPTY_DOMAIN_CONFIRMATION)) { - FREE(de->domain); - HTList_delete(de->cookie_list); - de->cookie_list = NULL; - HTList_removeObject(domain_list, de); - FREE(de); - HTProgress(DOMAIN_EATEN); - LYSleepMsg(); - } - break; - - case 'P': - /* - * Set to prompt for cookie acceptance - * from this domain. - FM - */ - de->bv = QUERY_USER; - HTUserMsg2(PROMPTING_TO_ALLOW_COOKIES, - de->domain); - return(HT_NO_DATA); - - case 'V': - /* - * Set to reject all cookies - * from this domain. - FM - */ - de->bv = REJECT_ALWAYS; - HTUserMsg2(NEVER_ALLOWING_COOKIES, - de->domain); - if ((!HTList_isEmpty(de->cookie_list)) && - HTConfirm(DELETE_ALL_COOKIES_IN_DOMAIN)) - goto Delete_all_cookies_in_domain; - return(HT_NO_DATA); - - default: - if (LYCharIsINTERRUPT(ch)) - goto reject; - continue; + /* + * Delete all cookies in this domain. - FM + */ + cl = de->cookie_list; + while (cl) { + next = cl->next; + co = cl->object; + if (co) { + HTList_removeObject(de->cookie_list, co); + freeCookie(co); + co = NULL; + total_cookies--; + } + cl = next; + } + HTProgress(DOMAIN_COOKIES_EATEN); + LYSleepMsg(); + /* + * If a default accept/reject choice is set, we're + * done. - FM + */ + if (de->bv != QUERY_USER) + return(HT_NO_DATA); + /* + * Check whether to delete the empty domain. - FM + */ + if (HTConfirm(DELETE_EMPTY_DOMAIN_CONFIRMATION)) { + FREE(de->domain); + HTList_delete(de->cookie_list); + de->cookie_list = NULL; + HTList_removeObject(domain_list, de); + FREE(de); + HTProgress(DOMAIN_EATEN); + LYSleepMsg(); } break; + + case 'P': + /* + * Set to prompt for cookie acceptance from this + * domain. - FM + */ + de->bv = QUERY_USER; + HTUserMsg2(PROMPTING_TO_ALLOW_COOKIES, de->domain); + return(HT_NO_DATA); + + case 'V': + /* + * Set to reject all cookies from this domain. - FM + */ + de->bv = REJECT_ALWAYS; + HTUserMsg2(NEVER_ALLOWING_COOKIES, de->domain); + if ((!HTList_isEmpty(de->cookie_list)) && + HTConfirm(DELETE_ALL_COOKIES_IN_DOMAIN)) + goto Delete_all_cookies_in_domain; + return(HT_NO_DATA); + + default: + if (LYCharIsINTERRUPT(ch)) + goto reject; + continue; } + break; } - break; } } if (HTList_isEmpty(domain_list)) { /* - * There are no more domains left. - * Don't delete the domain_list, otherwise - * atexit may be called multiple times. - kw + * There are no more domains left. Don't delete the domain_list, + * otherwise atexit may be called multiple times. - kw */ HTProgress(ALL_COOKIES_EATEN); LYSleepMsg(); @@ -2552,11 +2348,10 @@ Delete_all_cookies_in_domain: } /* - * If we get to here, it was a LYNXCOOKIE:/ URL - * for creating and displaying the Cookie Jar Page, - * or we didn't find the domain or cookie in a - * deletion request. Set up an HTML stream and - * return an updated Cookie Jar Page. - FM + * If we get to here, it was a LYNXCOOKIE:/ URL for creating and displaying + * the Cookie Jar Page, or we didn't find the domain or cookie in a + * deletion request. Set up an HTML stream and return an updated Cookie + * Jar Page. - FM */ target = HTStreamStack(format_in, format_out, @@ -2570,8 +2365,8 @@ Delete_all_cookies_in_domain: } /* - * Load HTML strings into buf and pass buf - * to the target for parsing and rendering. - FM + * Load HTML strings into buf and pass buf to the target for parsing and + * rendering. - FM */ #define PUTS(buf) (*target->isa->put_block)(target, buf, strlen(buf)) @@ -2607,15 +2402,15 @@ Delete_all_cookies_in_domain: de->domain, de->domain, de->domain); PUTS(buf); switch (de->bv) { - case (ACCEPT_ALWAYS): - HTSprintf0(&buf, COOKIES_ALWAYS_ALLOWED); - break; - case (REJECT_ALWAYS): - HTSprintf0(&buf, COOKIES_NEVER_ALLOWED); - break; - case (QUERY_USER): - HTSprintf0(&buf, COOKIES_ALLOWED_VIA_PROMPT); - break; + case (ACCEPT_ALWAYS): + HTSprintf0(&buf, COOKIES_ALWAYS_ALLOWED); + break; + case (REJECT_ALWAYS): + HTSprintf0(&buf, COOKIES_NEVER_ALLOWED); + break; + case (QUERY_USER): + HTSprintf0(&buf, COOKIES_ALLOWED_VIA_PROMPT); + break; } PUTS(buf); HTSprintf0(&buf, "\n"); @@ -2745,17 +2540,14 @@ Delete_all_cookies_in_domain: ** invcheck behavior, as well as accept/reject behavior. - BJP */ -PUBLIC void cookie_domain_flag_set ARGS2( +PRIVATE void cookie_domain_flag_set ARGS2( char *, domainstr, int, flag) { domain_entry *de = NULL; - domain_entry *de2 = NULL; - HTList *hl = NULL; char **str = typecalloc(char *); char *dstr = NULL; char *strsmall = NULL; - int isexisting = FALSE; if (str == NULL) { HTAlwaysAlert(gettext("Internal"), @@ -2764,10 +2556,8 @@ PUBLIC void cookie_domain_flag_set ARGS2( } /* - * Is this the first domain we're handling? If so, initialize - * domain_list. + * Is this the first domain we're handling? If so, initialize domain_list. */ - if (domain_list == NULL) { #ifdef LY_FIND_LEAKS atexit(LYCookieJar_free); @@ -2789,67 +2579,53 @@ PUBLIC void cookie_domain_flag_set ARGS2( /* * Check the list of existing domains to see if this is a - * re-setting of an already existing domains -- if so, just + * re-setting of an already existing domain -- if so, just * change the behavior, if not, create a new domain entry. */ - for (hl = domain_list; hl != NULL; hl = hl->next) { - de2 = (domain_entry *)hl->object; - if ((de2 != NULL && de2->domain != NULL) && - !strcasecomp(strsmall, de2->domain)) { - isexisting = TRUE; - break; - } else { - isexisting = FALSE; - } - } - - if(!isexisting) { + if ((de = find_domain_entry(strsmall)) == NULL) { de = typecalloc(domain_entry); - if (de == NULL) outofmem(__FILE__, "cookie_domain_flag_set"); + de->bv = ACCEPT_ALWAYS; + de->invcheck_bv = INVCHECK_QUERY; + switch(flag) { - case (FLAG_ACCEPT_ALWAYS): de->bv = ACCEPT_ALWAYS; - de->invcheck_bv = DEFAULT_INVCHECK_BV; - break; - case (FLAG_REJECT_ALWAYS): de->bv = REJECT_ALWAYS; - de->invcheck_bv = DEFAULT_INVCHECK_BV; - break; - case (FLAG_QUERY_USER): de->bv = QUERY_USER; - de->invcheck_bv = DEFAULT_INVCHECK_BV; - break; - case (FLAG_INVCHECK_QUERY): de->invcheck_bv = INVCHECK_QUERY; - de->bv = QUERY_USER; - break; - case (FLAG_INVCHECK_STRICT): de->invcheck_bv = INVCHECK_STRICT; - de->bv = QUERY_USER; - break; - case (FLAG_INVCHECK_LOOSE): de->invcheck_bv = INVCHECK_LOOSE; - de->bv = QUERY_USER; - break; + case (FLAG_ACCEPT_ALWAYS): de->invcheck_bv = DEFAULT_INVCHECK_BV; + break; + case (FLAG_REJECT_ALWAYS): de->invcheck_bv = DEFAULT_INVCHECK_BV; + break; + case (FLAG_QUERY_USER): de->invcheck_bv = DEFAULT_INVCHECK_BV; + break; + case (FLAG_INVCHECK_QUERY): de->bv = QUERY_USER; + break; + case (FLAG_INVCHECK_STRICT): de->bv = QUERY_USER; + break; + case (FLAG_INVCHECK_LOOSE): de->bv = QUERY_USER; + break; } StrAllocCopy(de->domain, strsmall); de->cookie_list = HTList_new(); HTList_appendObject(domain_list, de); - } else { - switch(flag) { - case (FLAG_ACCEPT_ALWAYS): de2->bv = ACCEPT_ALWAYS; - break; - case (FLAG_REJECT_ALWAYS): de2->bv = REJECT_ALWAYS; - break; - case (FLAG_QUERY_USER): de2->bv = QUERY_USER; - break; - case (FLAG_INVCHECK_QUERY): de2->invcheck_bv = INVCHECK_QUERY; - break; - case (FLAG_INVCHECK_STRICT): de2->invcheck_bv = INVCHECK_STRICT; - break; - case (FLAG_INVCHECK_LOOSE): de2->invcheck_bv = INVCHECK_LOOSE; - break; - } } + switch(flag) { + case (FLAG_ACCEPT_ALWAYS): de->bv = ACCEPT_ALWAYS; + break; + case (FLAG_REJECT_ALWAYS): de->bv = REJECT_ALWAYS; + break; + case (FLAG_QUERY_USER): de->bv = QUERY_USER; + break; + case (FLAG_INVCHECK_QUERY): de->invcheck_bv = INVCHECK_QUERY; + break; + case (FLAG_INVCHECK_STRICT): de->invcheck_bv = INVCHECK_STRICT; + break; + case (FLAG_INVCHECK_LOOSE): de->invcheck_bv = INVCHECK_LOOSE; + break; + } + CTRACE((tfp, "cookie_domain_flag_set (%s, bv=%d, invcheck_bv=%d)\n", + strsmall, de->bv, de->invcheck_bv)); } FREE(strsmall); diff --git a/src/LYCookie.h b/src/LYCookie.h index f038ed2d..59e7ab79 100644 --- a/src/LYCookie.h +++ b/src/LYCookie.h @@ -7,17 +7,27 @@ #include <HTList.h> -typedef enum {ACCEPT_ALWAYS, REJECT_ALWAYS, QUERY_USER} behaviour_t; -typedef enum {INVCHECK_QUERY, - INVCHECK_STRICT, - INVCHECK_LOOSE} invcheck_behaviour_t; -typedef enum {FLAG_ACCEPT_ALWAYS, - FLAG_REJECT_ALWAYS, - FLAG_QUERY_USER, - FLAG_FROM_FILE, - FLAG_INVCHECK_QUERY, - FLAG_INVCHECK_STRICT, - FLAG_INVCHECK_LOOSE} cookie_domain_flags; +typedef enum { + ACCEPT_ALWAYS = 0 + , REJECT_ALWAYS + , QUERY_USER +} behaviour_t; + +typedef enum { + INVCHECK_QUERY = 0 + , INVCHECK_STRICT + , INVCHECK_LOOSE +} invcheck_behaviour_t; + +typedef enum { + FLAG_ACCEPT_ALWAYS = 0 + , FLAG_REJECT_ALWAYS + , FLAG_QUERY_USER + , FLAG_FROM_FILE + , FLAG_INVCHECK_QUERY + , FLAG_INVCHECK_STRICT + , FLAG_INVCHECK_LOOSE +} cookie_domain_flags; struct _domain_entry { char * domain; /* Domain for which these cookies are valid */ @@ -31,7 +41,7 @@ extern void LYSetCookie PARAMS(( CONST char * SetCookie, CONST char * SetCookie2, CONST char * address)); -extern char *LYCookie PARAMS(( +extern char *LYAddCookieHeader PARAMS(( char * hostname, char * partialpath, int port, @@ -40,9 +50,6 @@ extern void LYStoreCookies PARAMS(( char * cookie_file)); extern void LYLoadCookies PARAMS(( char * cookie_file)); -extern void cookie_domain_flag_set PARAMS(( - char * domainstr, - int flag)); extern void LYConfigCookies NOPARAMS; #endif /* LYCOOKIES_H */ diff --git a/src/LYCurses.c b/src/LYCurses.c index 9e040ee0..aca351b3 100644 --- a/src/LYCurses.c +++ b/src/LYCurses.c @@ -1,8 +1,17 @@ #include <HTUtils.h> #include <HTAlert.h> + #ifdef __DJGPP__ #include <conio.h> +/* The conio.h distributed with GNU gettext package may redefine gettext() to + * _conio_gettext(). Restore our definition. + */ +#ifndef HAVE_GETTEXT +#undef gettext +#define gettext(s) s +#endif /* HAVE_GETTEXT */ #endif /* __DJGPP__ */ + #include <LYCurses.h> #include <LYStyle.h> #include <LYUtils.h> @@ -757,6 +766,7 @@ PUBLIC void LYnoVideo ARGS1( #endif } +#define NEWTERM_NAME "newterm" #if !defined(VMS) && !defined(USE_SLANG) /* * If newterm is not defined, assume a curses subset which @@ -766,6 +776,7 @@ PUBLIC void LYnoVideo ARGS1( static SCREEN *LYscreen = NULL; #define LYDELSCR() { \ if (recent_sizechange) { \ + CTRACE((tfp, "Screen size: delscreen()\n")); \ delscreen(LYscreen); \ LYscreen = NULL; } } /* @@ -773,6 +784,8 @@ if (recent_sizechange) { \ */ #else /* HAVE_NEWTERM */ static WINDOW *LYscreen = NULL; +#undef NEWTERM_NAME +#define NEWTERM_NAME "initscr" #undef newterm #define newterm(type, out, in) (initscr()) #define LYDELSCR() /* nothing */ @@ -907,6 +920,7 @@ PUBLIC void start_curses NOARGS * If we are VMS then do initscr() everytime start_curses() * is called! */ + CTRACE((tfp, "Screen size: initscr()\n")); initscr(); /* start curses */ #else /* Unix: */ @@ -942,12 +956,14 @@ PUBLIC void start_curses NOARGS } #endif /* defined(__MVS__) */ #endif /* !(defined(NCURSES) && defined(HAVE_RESIZETERM)) */ + CTRACE((tfp, "Screen size: %s()\n", NEWTERM_NAME)); if (!(LYscreen = newterm(NULL,stdout,stdin))) { /* start curses */ fprintf(tfp, "%s\n", gettext("Terminal initialisation failed - unknown terminal type?")); exit_immediately (EXIT_FAILURE); } #else + CTRACE((tfp, "Screen size: initscr()\n")); initscr(); #endif /* HAVE_NEWTERM */ lynx_called_initscr = TRUE; @@ -956,6 +972,7 @@ PUBLIC void start_curses NOARGS size_change(0); recent_sizechange = FALSE; /* prevent mainloop drawing 1st doc twice */ #endif /* SIGWINCH */ + CTRACE((tfp, "Screen size is now %d x %d\n", LYlines, LYcols )); #ifdef USE_CURSES_PADS if (LYuseCursesPads) { @@ -1417,13 +1434,6 @@ PUBLIC BOOLEAN setup ARGS1( #if HAVE_TTYTYPE /* - * Get terminal type (strip 'dec-' from vms style types). - */ - if (strncmp((CONST char*)ttytype, "dec-vt", 6) == 0) { - (void) setterm(ttytype + 4); - } - - /* * Account for lossage on the 'sun' terminal type (80x24) Sun text * console driver. It only supports reverse video, but all SGR * sequences produce that same reverse video, and the terminfo diff --git a/src/LYExtern.c b/src/LYExtern.c index 01939689..3bf057fb 100644 --- a/src/LYExtern.c +++ b/src/LYExtern.c @@ -68,10 +68,6 @@ static char *decode_string(char *s) #ifdef WIN_EX /* * Quote the path to make it safe for shell command processing. - * - * We use a simple technique which involves quoting the entire - * string using single quotes, escaping the real single quotes - * with double quotes. This may be gross but it seems to work. */ PUBLIC char * quote_pathname ARGS1( char *, pathname) @@ -110,20 +106,16 @@ PRIVATE char *format_command ARGS2( char *, command, char *, param) { -#ifdef WIN_EX - char pram_string[LY_MAXPATH]; -#endif char *cmdbuf = NULL; -#if (defined(VMS) || defined(DOSPATH) || defined(__EMX__)) && !defined(WIN_EX) - format(&cmdbuf, command, param); -#else /* Unix or DOS/Win: */ #if defined(WIN_EX) if (*param != '\"' && strchr(param, ' ') != NULL) { char *cp = quote_pathname(param); format(&cmdbuf, command, cp); FREE(cp); } else { + char pram_string[LY_MAXPATH]; + LYstrncpy(pram_string, param, sizeof(pram_string)-1); decode_string(pram_string); param = pram_string; @@ -156,31 +148,28 @@ PRIVATE char *format_command ARGS2( *p = '\0'; } } - if (*e_buff != '\"' && strchr(e_buff, ' ') != NULL) { - p = quote_pathname(e_buff); - LYstrncpy(e_buff, p, sizeof(e_buff)-1); - FREE(p); - } - /* Less ==> short filename, - * less ==> long filename + /* Less ==> short filename with backslashes, + * less ==> long filename with forward slashes, may be quoted */ if (isupper(command[0])) { format(&cmdbuf, command, HTDOS_short_name(e_buff)); } else { + if (*e_buff != '\"' && strchr(e_buff, ' ') != NULL) { + p = quote_pathname(e_buff); + LYstrncpy(e_buff, p, sizeof(e_buff)-1); + FREE(p); + } format(&cmdbuf, command, e_buff); } } else { format(&cmdbuf, command, param); } } -#else /* Unix */ - { - format(&cmdbuf, command, param); - } +#else + format(&cmdbuf, command, param); #endif -#endif /* VMS */ return cmdbuf; } diff --git a/src/LYForms.c b/src/LYForms.c index 928b1663..f7b9e99b 100644 --- a/src/LYForms.c +++ b/src/LYForms.c @@ -26,7 +26,7 @@ #endif /* VMS && !USE_SLANG */ PRIVATE int form_getstr PARAMS(( - struct link * form_link, + int cur, BOOLEAN use_last_tfpos, BOOLEAN redraw_only)); @@ -58,17 +58,17 @@ PRIVATE char ** options_list ARGS1( return result; } -PUBLIC int change_form_link_ex ARGS8( - struct link *, form_link, +PUBLIC int change_form_link_ex ARGS6( + int, cur, document *, newdoc, BOOLEAN *, refresh_screen, - char *, link_name, - char *, link_value, BOOLEAN, use_last_tfpos, BOOLEAN, immediate_submit, BOOLEAN, redraw_only) { - FormInfo *form = form_link->form; + FormInfo *form = links[cur].l_form; + char *link_name = form->name; + char *link_value = form->value; int newdoc_changed = 0; int c = DO_NOTHING; int OrigNumValue; @@ -85,19 +85,14 @@ PUBLIC int change_form_link_ex ARGS8( /* * Move to the link position. */ - LYmove(form_link->ly, form_link->lx); + LYmove(links[cur].ly, links[cur].lx); switch(form->type) { case F_CHECKBOX_TYPE: if (form->disabled == YES) break; - if (form->num_value) { - form_link->hightext = unchecked_box; - form->num_value = 0; - } else { - form_link->hightext = checked_box; - form->num_value = 1; - } + LYSetHilite(cur, form->num_value ? unchecked_box : checked_box); + form->num_value = ! form->num_value; break; case F_OPTION_LIST_TYPE: @@ -110,8 +105,8 @@ PUBLIC int change_form_link_ex ARGS8( if (form->disabled == YES) { int dummy; dummy = LYhandlePopupList(form->num_value, - form_link->ly, - form_link->lx, + links[cur].ly, + links[cur].lx, (CONST char **)my_data, form->size, form->size_l, @@ -128,8 +123,8 @@ PUBLIC int change_form_link_ex ARGS8( } OrigNumValue = form->num_value; form->num_value = LYhandlePopupList(form->num_value, - form_link->ly, - form_link->lx, + links[cur].ly, + links[cur].lx, (CONST char **)my_data, form->size, form->size_l, @@ -179,17 +174,17 @@ PUBLIC int change_form_link_ex ARGS8( */ lynx_start_radio_color (); for (i = 0; i < nlinks; i++) { - if (links[i].type == WWW_FORM_LINK_TYPE && - links[i].form->type == F_RADIO_TYPE && - links[i].form->number == form->number && + if (links[i].type == WWW_FORM_LINK_TYPE + && links[i].l_form->type == F_RADIO_TYPE + && links[i].l_form->number == form->number /* * If it has the same name and its on... */ - !strcmp(links[i].form->name, form->name) && - links[i].form->num_value) { + && !strcmp(links[i].l_form->name, form->name) + && links[i].l_form->num_value) { LYmove(links[i].ly, links[i].lx); LYaddstr(unchecked_radio); - links[i].hightext = unchecked_radio; + LYSetHilite(i, unchecked_radio); } } lynx_stop_radio_color (); @@ -200,7 +195,7 @@ PUBLIC int change_form_link_ex ARGS8( /* * Now highlight this one. */ - form_link->hightext = checked_radio; + LYSetHilite(cur, checked_radio); } break; @@ -208,11 +203,10 @@ PUBLIC int change_form_link_ex ARGS8( case F_TEXT_TYPE: case F_TEXTAREA_TYPE: case F_PASSWORD_TYPE: - c = form_getstr(form_link, use_last_tfpos, redraw_only); - if (form->type == F_PASSWORD_TYPE) - form_link->hightext = STARS(strlen(form->value)); - else - form_link->hightext = form->value; + c = form_getstr(cur, use_last_tfpos, redraw_only); + LYSetHilite(cur, (form->type == F_PASSWORD_TYPE) + ? STARS(strlen(form->value)) + : form->value); break; case F_RESET_TYPE: @@ -224,11 +218,11 @@ PUBLIC int change_form_link_ex ARGS8( case F_TEXT_SUBMIT_TYPE: if (redraw_only) { - c = form_getstr(form_link, use_last_tfpos, TRUE); + c = form_getstr(cur, use_last_tfpos, TRUE); break; } if (!immediate_submit) - c = form_getstr(form_link, use_last_tfpos, FALSE); + c = form_getstr(cur, use_last_tfpos, FALSE); if (form->disabled == YES && (c == '\r' || c == '\n' || immediate_submit)) { if (peek_mouse_link() >= 0) @@ -257,7 +251,7 @@ PUBLIC int change_form_link_ex ARGS8( if (immediate_submit || ((c == '\r' || c == '\n' || c == LAC_TO_LKC0(LYK_SUBMIT)) && peek_mouse_link() == -1)) { - form_link->hightext = form->value; + LYSetHilite(cur, form->value); #ifdef TEXT_SUBMIT_CONFIRM_WANTED if (!immediate_submit && (c == '\r' || c == '\n') && !HTConfirmDefault(NO_SUBMIT_BUTTON_QUERY), YES) { @@ -307,7 +301,7 @@ PUBLIC int change_form_link_ex ARGS8( c = DO_NOTHING; break; } else { - form_link->hightext = form->value; + LYSetHilite(cur, form->value); } break; @@ -348,18 +342,20 @@ PUBLIC int change_form_link_ex ARGS8( return(c); } -PUBLIC int change_form_link ARGS7( - struct link *, form_link, +PUBLIC int change_form_link ARGS5( + int, cur, document *, newdoc, BOOLEAN *, refresh_screen, - char *, link_name, - char *, link_value, BOOLEAN, use_last_tfpos, BOOLEAN, immediate_submit) { /*pass all our args and FALSE as last arg*/ - return change_form_link_ex(form_link,newdoc,refresh_screen,link_name, - link_value,use_last_tfpos,immediate_submit, FALSE /*redraw_only*/ ); + return change_form_link_ex(cur, + newdoc, + refresh_screen, + use_last_tfpos, + immediate_submit, + FALSE /*redraw_only*/ ); } PRIVATE int LastTFPos = -1; /* remember last text field position */ @@ -371,11 +367,11 @@ PRIVATE void LYSetLastTFPos ARGS1( } PRIVATE int form_getstr ARGS3( - struct link *, form_link, + int, cur, BOOLEAN, use_last_tfpos, BOOLEAN, redraw_only) { - FormInfo *form = form_link->form; + FormInfo *form = links[cur].l_form; char *value = form->value; int ch; int far_col; @@ -760,13 +756,15 @@ again: to do it inside LYLineEdit(). This should work for prompts too. */ if ( (action != LYE_BACK_LL && action != LYE_FORW_RL) - || ((form_link - links) >= 0 - && (form_link - links) < nlinks + || (cur >= 0 + && cur < nlinks && (action==LYE_FORW_RL - ? (form_link - links) < nlinks - 1 - : (form_link - links) > 0) - && form_link[action==LYE_FORW_RL ? 1 : -1].ly - == form_link->ly)) + ? cur < nlinks - 1 + : cur > 0) + && links[cur + ((action==LYE_FORW_RL) + ? 1 + : -1)].ly + == links[cur].ly)) goto breakfor; } #ifdef SUPPORT_MULTIBYTE_EDIT diff --git a/src/LYGetFile.c b/src/LYGetFile.c index 1c4097ea..ce0bb79b 100644 --- a/src/LYGetFile.c +++ b/src/LYGetFile.c @@ -1250,6 +1250,8 @@ PUBLIC int follow_link_number ARGS4( */ if (*num > 0) { int info; + char *text; + /* * Get the lname, and hightext, directly from www * structures and add it to the cur link so that @@ -1260,12 +1262,14 @@ PUBLIC int follow_link_number ARGS4( * in the current document, whether it is displayed * on the screen or not! */ - if ((info = HTGetLinkInfo(*num, - want_go, - &new_top, - &new_link, - &links[cur].hightext, - &links[cur].lname)) == WWW_INTERN_LINK_TYPE) { + info = HTGetLinkInfo(*num, + want_go, + &new_top, + &new_link, + &text, + &links[cur].lname); + LYSetHilite(cur, text); + if (info == WWW_INTERN_LINK_TYPE) { links[cur].type = WWW_INTERN_LINK_TYPE; return(DO_LINK_STUFF); } else if (info == LINK_LINE_FOUND) { diff --git a/src/LYHistory.c b/src/LYHistory.c index b012e230..554cc786 100644 --- a/src/LYHistory.c +++ b/src/LYHistory.c @@ -292,7 +292,7 @@ PRIVATE void clean_extra NOARGS /* What is the relationship to are_different() from the mainloop?! */ PRIVATE int are_identical ARGS2( - histstruct *, doc, + HistInfo *, doc, document *, doc1) { return ( STREQ(doc1->address, doc->address) diff --git a/src/LYLocal.c b/src/LYLocal.c index 42b96763..1183b30e 100644 --- a/src/LYLocal.c +++ b/src/LYLocal.c @@ -434,8 +434,12 @@ PRIVATE int make_directory ARGS1(char *, path) code = (LYExecv(MKDIR_PATH, args, msg) <= 0) ? -1 : 1; FREE(msg); #else +#ifdef _WINDOWS + code = mkdir(path) ? -1 : 1; +#else code = mkdir(path, 0777) ? -1 : 1; #endif +#endif return (code); } diff --git a/src/LYMail.c b/src/LYMail.c index d5432c7f..4fbf79a4 100644 --- a/src/LYMail.c +++ b/src/LYMail.c @@ -476,6 +476,9 @@ PUBLIC int LYSendMailFile ARGS5( char *, message) { char *cmd = NULL; +#ifdef __DJGPP__ + char *shell; +#endif /* __DJGPP__ */ int code; #if USE_BLAT_MAILER @@ -492,10 +495,33 @@ PUBLIC int LYSendMailFile ARGS5( ); else #endif +#ifdef __DJGPP__ + if ((shell = getenv("SHELL")) != NULL) { + if (strstr(shell, "sh") != NULL) { + HTSprintf0(&cmd, "%s -c %s -t \"%s\" -F %s", + shell, + system_mail, + the_address, + the_filename); + } else { + HTSprintf0(&cmd, "%s /c %s -t \"%s\" -F %s", + shell, + system_mail, + the_address, + the_filename); + } + } else { + HTSprintf0(&cmd, "%s -t \"%s\" -F %s", + system_mail, + the_address, + the_filename); + } +#else HTSprintf0(&cmd, "%s -t \"%s\" -F %s", system_mail, the_address, the_filename); +#endif /* __DJGPP__ */ stop_curses(); SetOutputMode(O_TEXT); @@ -988,7 +1014,7 @@ PUBLIC void mailmsg ARGS4( fprintf(fd, gettext("The link %s :?: %s \n"), links[cur].lname, links[cur].target); - fprintf(fd, gettext("called \"%s\"\n"), links[cur].hightext); + fprintf(fd, gettext("called \"%s\"\n"), LYGetHiliteStr(cur, 0)); fprintf(fd, gettext("in the file \"%s\" called \"%s\"\n"), filename, linkname); fprintf(fd, "%s\n\n", gettext("was requested but was not available.")); fprintf(fd, "%s\n\n", gettext("Thought you might want to know.")); diff --git a/src/LYMain.c b/src/LYMain.c index 6524f09a..e8905b90 100644 --- a/src/LYMain.c +++ b/src/LYMain.c @@ -40,6 +40,7 @@ #include <dpmi.h> #include <io.h> #include <sys/stat.h> +#include <sys/exceptn.h> #endif /* __DJGPP__ */ #ifdef __EMX__ @@ -420,7 +421,7 @@ PUBLIC char *startrealm = NULL; /* the startfile realm */ PUBLIC char *system_mail = NULL; /* The path for sending mail */ PUBLIC char *system_mail_flags = NULL; /* Flags for sending mail */ PUBLIC char *x_display = NULL; /* display environment variable */ -PUBLIC histstruct history[MAXHIST]; +PUBLIC HistInfo history[MAXHIST]; PUBLIC int AlertSecs; /* time-delay for HTAlert() messages */ PUBLIC int InfoSecs; /* time-delay for Information messages */ PUBLIC int LYMultiBookmarks = MULTI_BOOKMARK_SUPPORT; @@ -434,7 +435,7 @@ PUBLIC int lynx_temp_subspace = 0; /* > 0 if we made temp-directory */ PUBLIC int nhist = 0; /* number of history entries */ PUBLIC int nlinks = 0; /* number of links in memory */ PUBLIC int outgoing_mail_charset = -1; /* translate mail to this charset */ -PUBLIC linkstruct links[MAXLINKS]; +PUBLIC LinkInfo links[MAXLINKS]; #ifndef DISABLE_BIBP PUBLIC BOOLEAN BibP_bibhost_available = FALSE; /* until check succeeds */ @@ -948,6 +949,8 @@ PUBLIC int main ARGS2( } else { init_ctrl_break[0] = 1; } + __djgpp_set_sigquit_key(0x082D); /* Bind ALT-X to SIGQUIT */ + signal(SIGQUIT, cleanup_sig); atexit(reset_break); #endif /* __DJGPP__ */ @@ -1034,8 +1037,8 @@ PUBLIC int main ARGS2( /* * Zero the links and history struct arrays. */ - memset((void *)links, 0, sizeof(linkstruct)*MAXLINKS); - memset((void *)history, 0, sizeof(histstruct)*MAXHIST); + memset((void *)links, 0, sizeof(LinkInfo)*MAXLINKS); + memset((void *)history, 0, sizeof(HistInfo)*MAXHIST); /* * Zero the MultiBookmark arrays. */ @@ -1101,15 +1104,15 @@ PUBLIC int main ARGS2( if ((cp = getenv("LYNX_TEMP_SPACE")) != NULL) StrAllocCopy(lynx_temp_space, cp); -#if defined (UNIX) +#if defined (UNIX) || defined (__DJGPP__) else if ((cp = getenv("TMPDIR")) != NULL) StrAllocCopy(lynx_temp_space, cp); #endif #if defined (DOSPATH) || defined (__EMX__) else if ((cp = getenv("TEMP")) != NULL) - StrAllocCopy(lynx_temp_space, HTSYS_name(cp)); + StrAllocCopy(lynx_temp_space, cp); else if ((cp = getenv("TMP")) != NULL) - StrAllocCopy(lynx_temp_space, HTSYS_name(cp)); + StrAllocCopy(lynx_temp_space, cp); #endif else #ifdef TEMP_SPACE @@ -1159,6 +1162,7 @@ PUBLIC int main ARGS2( } #else LYAddPathSep(&lynx_temp_space); + StrAllocCopy(lynx_temp_space, HTSYS_name(lynx_temp_space)); #endif /* VMS */ if ((HTStat(lynx_temp_space, &dir_info) < 0 diff --git a/src/LYMainLoop.c b/src/LYMainLoop.c index e19a908c..545f0bb7 100644 --- a/src/LYMainLoop.c +++ b/src/LYMainLoop.c @@ -171,7 +171,7 @@ PRIVATE int str_n_cmp(const char *p, const char *q, int n) PRIVATE void exit_immediately_with_error_message PARAMS((int state, BOOLEAN first_file)); PRIVATE void status_link PARAMS((char *curlink_name, BOOLEAN show_more, BOOLEAN show_indx)); -PRIVATE void show_main_statusline PARAMS((CONST linkstruct curlink, int for_what)); +PRIVATE void show_main_statusline PARAMS((CONST LinkInfo curlink, int for_what)); PRIVATE void form_noviceline PARAMS((int)); PRIVATE int are_different PARAMS((document *doc1, document *doc2)); @@ -826,9 +826,10 @@ PRIVATE int find_link_near_col ARGS2( while ((delta > 0 ? (i < nlinks) : (i >= 0)) && cy == links[i].ly) { int cx = links[i].lx; + char *text = LYGetHiliteStr(i, 0); - if (links[i].hightext) - cx += strlen(links[i].hightext)/2; + if (text != NULL) + cx += strlen(text) / 2; cx -= col; if (cx < 0) cx = -cx; @@ -986,7 +987,7 @@ PRIVATE int handle_LYK_ACTIVATE ARGS6( if (links[curdoc.link].type == WWW_FORM_LINK_TYPE) { #ifdef TEXTFIELDS_MAY_NEED_ACTIVATION if (real_cmd == LYK_ACTIVATE && textfields_need_activation && - F_TEXTLIKE(links[curdoc.link].form->type)) { + F_TEXTLIKE(links[curdoc.link].l_form->type)) { textinput_activated = TRUE; show_main_statusline(links[curdoc.link], FOR_INPUT); @@ -998,14 +999,14 @@ PRIVATE int handle_LYK_ACTIVATE ARGS6( /* * Don't try to submit forms with bad actions. - FM */ - if (links[curdoc.link].form->type == F_SUBMIT_TYPE || - links[curdoc.link].form->type == F_IMAGE_SUBMIT_TYPE || - links[curdoc.link].form->type == + if (links[curdoc.link].l_form->type == F_SUBMIT_TYPE || + links[curdoc.link].l_form->type == F_IMAGE_SUBMIT_TYPE || + links[curdoc.link].l_form->type == F_TEXT_SUBMIT_TYPE) { /* * Do nothing if it's disabled. - FM */ - if (links[curdoc.link].form->disabled == YES) { + if (links[curdoc.link].l_form->disabled == YES) { HTOutputFormat = WWW_PRESENT; LYforce_no_cache = FALSE; reloading = FALSE; @@ -1014,8 +1015,8 @@ PRIVATE int handle_LYK_ACTIVATE ARGS6( /* * Make sure we have an action. - FM */ - if (!links[curdoc.link].form->submit_action || - *links[curdoc.link].form->submit_action + if (!links[curdoc.link].l_form->submit_action || + *links[curdoc.link].l_form->submit_action == '\0') { HTUserMsg(NO_FORM_ACTION); HTOutputFormat = WWW_PRESENT; @@ -1027,7 +1028,7 @@ PRIVATE int handle_LYK_ACTIVATE ARGS6( * Check for no_mail if the form action * is a mailto URL. - FM */ - if (links[curdoc.link].form->submit_method + if (links[curdoc.link].l_form->submit_method == URL_MAIL_METHOD && no_mail) { HTAlert(FORM_MAILTO_DISALLOWED); HTOutputFormat = WWW_PRESENT; @@ -1041,7 +1042,7 @@ PRIVATE int handle_LYK_ACTIVATE ARGS6( */ if (no_file_url && !strncasecomp( - links[curdoc.link].form->submit_action, + links[curdoc.link].l_form->submit_action, "file:", 5)) { HTAlert(FILE_ACTIONS_DISALLOWED); HTOutputFormat = WWW_PRESENT; @@ -1054,48 +1055,48 @@ PRIVATE int handle_LYK_ACTIVATE ARGS6( * via an internal URL. - FM */ if (!strncasecomp( - links[curdoc.link].form->submit_action, + links[curdoc.link].l_form->submit_action, "LYNXCOOKIE:", 11) || #ifdef DIRED_SUPPORT #ifdef OK_PERMIT (!(strncasecomp( - links[curdoc.link].form->submit_action, + links[curdoc.link].l_form->submit_action, "LYNXDIRED:", 10)) && (no_dired_support || strncasecomp( - (links[curdoc.link].form->submit_action + 10), + (links[curdoc.link].l_form->submit_action + 10), "//PERMIT_LOCATION", 17) || !LYIsUIPage(curdoc.address, UIP_PERMIT_OPTIONS))) || #else !strncasecomp( - links[curdoc.link].form->submit_action, + links[curdoc.link].l_form->submit_action, "LYNXDIRED:", 10) || #endif /* OK_PERMIT */ #endif /* DIRED_SUPPORT */ !strncasecomp( - links[curdoc.link].form->submit_action, + links[curdoc.link].l_form->submit_action, "LYNXDOWNLOAD:", 13) || !strncasecomp( - links[curdoc.link].form->submit_action, + links[curdoc.link].l_form->submit_action, "LYNXHIST:", 9) || !strncasecomp( - links[curdoc.link].form->submit_action, + links[curdoc.link].l_form->submit_action, "LYNXKEYMAP:", 11) || !strncasecomp( - links[curdoc.link].form->submit_action, + links[curdoc.link].l_form->submit_action, "LYNXIMGMAP:", 11) || !strncasecomp( - links[curdoc.link].form->submit_action, + links[curdoc.link].l_form->submit_action, "LYNXPRINT:", 10) || !strncasecomp( - links[curdoc.link].form->submit_action, + links[curdoc.link].l_form->submit_action, "lynxexec:", 9) || !strncasecomp( - links[curdoc.link].form->submit_action, + links[curdoc.link].l_form->submit_action, "lynxprog:", 9)) { HTAlert(SPECIAL_ACTION_DISALLOWED); CTRACE((tfp, "LYMainLoop: Rejected '%s'\n", - links[curdoc.link].form->submit_action)); + links[curdoc.link].l_form->submit_action)); HTOutputFormat = WWW_PRESENT; LYforce_no_cache = FALSE; reloading = FALSE; @@ -1106,9 +1107,9 @@ PRIVATE int handle_LYK_ACTIVATE ARGS6( * Check for enctype and let user know we * don't yet support multipart/form-data - FM */ - if (links[curdoc.link].form->submit_enctype) { + if (links[curdoc.link].l_form->submit_enctype) { if (!strcmp( - links[curdoc.link].form->submit_enctype, + links[curdoc.link].l_form->submit_enctype, "multipart/form-data")) { HTAlert( gettext("Enctype multipart/form-data not yet supported! Cannot submit.")); @@ -1126,52 +1127,49 @@ gettext("Enctype multipart/form-data not yet supported! Cannot submit.")); !strncmp(curdoc.address, "file:", 5)) { LYNoRefererForThis = TRUE; } - if (links[curdoc.link].form->submit_method - != URL_MAIL_METHOD) { + if (links[curdoc.link].l_form->submit_method != URL_MAIL_METHOD) { StrAllocCopy(newdoc.title, - links[curdoc.link].hightext); + LYGetHiliteStr(curdoc.link, 0)); } } + /* * Normally we don't get here for text input fields, * but it can happen as a result of mouse positioning. * In that case the statusline will not have updated * info, so update it now. - kw */ - - if (F_TEXTLIKE(links[curdoc.link].form->type)) { - show_formlink_statusline(links[curdoc.link].form, - (real_cmd==LYK_NOCACHE || - real_cmd==LYK_DOWNLOAD || - real_cmd==LYK_HEAD || - (real_cmd==LYK_SUBMIT && + if (F_TEXTLIKE(links[curdoc.link].l_form->type)) { + show_formlink_statusline(links[curdoc.link].l_form, + (real_cmd == LYK_NOCACHE || + real_cmd == LYK_DOWNLOAD || + real_cmd == LYK_HEAD || + (real_cmd == LYK_SUBMIT && !textinput_activated)) ? FOR_PANEL : FOR_INPUT); - if (user_mode==NOVICE_MODE && + if (user_mode == NOVICE_MODE && textinput_activated && - (real_cmd==LYK_ACTIVATE || real_cmd==LYK_SUBMIT)) { - form_noviceline(links[curdoc.link].form->disabled); + (real_cmd == LYK_ACTIVATE || real_cmd == LYK_SUBMIT)) { + form_noviceline(links[curdoc.link].l_form->disabled); } } - *c = change_form_link(&links[curdoc.link], + *c = change_form_link(curdoc.link, &newdoc, refresh_screen, - links[curdoc.link].form->name, - links[curdoc.link].form->value, FALSE, - (BOOLEAN)(real_cmd==LYK_SUBMIT || - real_cmd==LYK_NOCACHE || - real_cmd==LYK_DOWNLOAD || - real_cmd==LYK_HEAD)); + (BOOLEAN)(real_cmd == LYK_SUBMIT || + real_cmd == LYK_NOCACHE || + real_cmd == LYK_DOWNLOAD || + real_cmd == LYK_HEAD)); if (*c != LKC_DONE || *refresh_screen) { /* * Cannot have been a submit field for which * newdoc was filled in. - kw */ - if ((links[curdoc.link].form->type == F_SUBMIT_TYPE || - links[curdoc.link].form->type == F_IMAGE_SUBMIT_TYPE || - links[curdoc.link].form->type == F_TEXT_SUBMIT_TYPE) && - links[curdoc.link].form->submit_method + if ((links[curdoc.link].l_form->type == F_SUBMIT_TYPE || + links[curdoc.link].l_form->type == F_IMAGE_SUBMIT_TYPE || + links[curdoc.link].l_form->type == F_TEXT_SUBMIT_TYPE) && + links[curdoc.link].l_form->submit_method != URL_MAIL_METHOD) { /* * Try to undo change of newdoc.title done above. @@ -1233,7 +1231,7 @@ gettext("Enctype multipart/form-data not yet supported! Cannot submit.")); case '\r': default: if ((real_cmd == LYK_ACTIVATE || real_cmd == LYK_SUBMIT) && - F_TEXTLIKE(links[curdoc.link].form->type) && + F_TEXTLIKE(links[curdoc.link].l_form->type) && textinput_activated) return 3; break; @@ -1314,7 +1312,7 @@ gettext("Enctype multipart/form-data not yet supported! Cannot submit.")); * Follow a normal link or anchor. */ StrAllocCopy(newdoc.address, links[curdoc.link].lname); - StrAllocCopy(newdoc.title, links[curdoc.link].hightext); + StrAllocCopy(newdoc.title, LYGetHiliteStr(curdoc.link, 0)); #ifndef DONT_TRACK_INTERNAL_LINKS /* * For internal links, retain POST content if present. @@ -1591,7 +1589,7 @@ PRIVATE void handle_LYK_ADD_BOOKMARK ARGS3( */ if (links[curdoc.link].type != WWW_FORM_LINK_TYPE) { save_bookmark_link(links[curdoc.link].lname, - links[curdoc.link].hightext); + LYGetHiliteStr(curdoc.link, 0)); *refresh_screen = TRUE; /* MultiBookmark support */ } else { HTUserMsg(NOBOOK_FORM_FIELD); @@ -2020,10 +2018,10 @@ PRIVATE int handle_LYK_DOWNLOAD ARGS3( return 1; /* mouse stuff was confused, ignore - kw */ if (nlinks > 0) { if (links[curdoc.link].type == WWW_FORM_LINK_TYPE) { - if (links[curdoc.link].form->type == F_SUBMIT_TYPE || - links[curdoc.link].form->type == F_IMAGE_SUBMIT_TYPE || - links[curdoc.link].form->type == F_TEXT_SUBMIT_TYPE) { - if (links[curdoc.link].form->submit_method == + if (links[curdoc.link].l_form->type == F_SUBMIT_TYPE || + links[curdoc.link].l_form->type == F_IMAGE_SUBMIT_TYPE || + links[curdoc.link].l_form->type == F_TEXT_SUBMIT_TYPE) { + if (links[curdoc.link].l_form->submit_method == URL_MAIL_METHOD) { if (*old_c != real_c) { *old_c = real_c; @@ -2031,7 +2029,7 @@ PRIVATE int handle_LYK_DOWNLOAD ARGS3( } return 0; } - if (!strncmp(links[curdoc.link].form->submit_action, + if (!strncmp(links[curdoc.link].l_form->submit_action, "LYNXOPTIONS:", 12)) { if (*old_c != real_c) { *old_c = real_c; @@ -2107,7 +2105,7 @@ PRIVATE int handle_LYK_DOWNLOAD ARGS3( * OK, we download from history page, restore URL from stack. */ StrAllocCopy(newdoc.address, history[number].address); - StrAllocCopy(newdoc.title, links[curdoc.link].hightext); + StrAllocCopy(newdoc.title, LYGetHiliteStr(curdoc.link, 0)); StrAllocCopy(newdoc.bookmark, history[number].bookmark); FREE(newdoc.post_data); FREE(newdoc.post_content_type); @@ -2181,7 +2179,7 @@ PRIVATE int handle_LYK_DOWNLOAD ARGS3( * entire document will be downloaded. */ StrAllocCopy(newdoc.address, links[curdoc.link].lname); - StrAllocCopy(newdoc.title, links[curdoc.link].hightext); + StrAllocCopy(newdoc.title, LYGetHiliteStr(curdoc.link, 0)); #ifndef DONT_TRACK_INTERNAL_LINKS /* * Might be an internal link in the same doc from a @@ -2246,10 +2244,11 @@ PRIVATE void handle_LYK_DOWN_LINK ARGS3( int newlink; if (*follow_col == -1) { + char *text = LYGetHiliteStr(curdoc.link, 0); *follow_col = links[curdoc.link].lx; - if (links[curdoc.link].hightext) - *follow_col += strlen(links[curdoc.link].hightext)/2; + if (text != NULL) + *follow_col += strlen(text) / 2; } newlink = find_link_near_col(*follow_col, 1); @@ -2303,8 +2302,8 @@ PRIVATE int handle_LYK_DWIMEDIT ARGS3( * document. KED */ if (nlinks > 0 && - links[curdoc.link].type == WWW_FORM_LINK_TYPE && - links[curdoc.link].form->type == F_TEXTAREA_TYPE) { + links[curdoc.link].type == WWW_FORM_LINK_TYPE && + links[curdoc.link].l_form->type == F_TEXTAREA_TYPE) { *cmd = LYK_EDIT_TEXTAREA; return 2; } @@ -2321,8 +2320,8 @@ PRIVATE int handle_LYK_DWIMEDIT ARGS3( * via the above if() statement.] */ if (nlinks > 0 && - links[curdoc.link].type == WWW_FORM_LINK_TYPE && - links[curdoc.link].form->type == F_TEXT_TYPE) { + links[curdoc.link].type == WWW_FORM_LINK_TYPE && + links[curdoc.link].l_form->type == F_TEXT_TYPE) { HTUserMsg (CANNOT_EDIT_FIELD); return 1; } @@ -2515,11 +2514,11 @@ PRIVATE void handle_LYK_DWIMHELP ARGS1( */ if (curdoc.link >= 0 && curdoc.link < nlinks && links[curdoc.link].type == WWW_FORM_LINK_TYPE && - !links[curdoc.link].form->disabled && - (links[curdoc.link].form->type == F_TEXT_TYPE || - links[curdoc.link].form->type == F_TEXT_SUBMIT_TYPE || - links[curdoc.link].form->type == F_PASSWORD_TYPE || - links[curdoc.link].form->type == F_TEXTAREA_TYPE)) { + !links[curdoc.link].l_form->disabled && + (links[curdoc.link].l_form->type == F_TEXT_TYPE || + links[curdoc.link].l_form->type == F_TEXT_SUBMIT_TYPE || + links[curdoc.link].l_form->type == F_PASSWORD_TYPE || + links[curdoc.link].l_form->type == F_TEXTAREA_TYPE)) { *cshelpfile = LYLineeditHelpURL(); } } @@ -2545,8 +2544,8 @@ PRIVATE void handle_LYK_EDIT_TEXTAREA ARGS3( /* * See if the current link is in a form TEXTAREA. */ - else if (links[curdoc.link].type == WWW_FORM_LINK_TYPE && - links[curdoc.link].form->type == F_TEXTAREA_TYPE) { + else if (links[curdoc.link].type == WWW_FORM_LINK_TYPE && + links[curdoc.link].l_form->type == F_TEXTAREA_TYPE) { /* stop screen */ stop_curses(); @@ -2594,9 +2593,9 @@ PRIVATE int handle_LYK_ELGOTO ARGS5( } if (!(nlinks > 0 && curdoc.link > -1) || (links[curdoc.link].type == WWW_FORM_LINK_TYPE && - links[curdoc.link].form->type != F_SUBMIT_TYPE && - links[curdoc.link].form->type != F_IMAGE_SUBMIT_TYPE && - links[curdoc.link].form->type != F_TEXT_SUBMIT_TYPE)) { + links[curdoc.link].l_form->type != F_SUBMIT_TYPE && + links[curdoc.link].l_form->type != F_IMAGE_SUBMIT_TYPE && + links[curdoc.link].l_form->type != F_TEXT_SUBMIT_TYPE)) { /* * No links on page, or not a normal link * or form submit button. - FM @@ -2608,8 +2607,8 @@ PRIVATE int handle_LYK_ELGOTO ARGS5( return 0; } if ((links[curdoc.link].type == WWW_FORM_LINK_TYPE) && - (!links[curdoc.link].form->submit_action || - *links[curdoc.link].form->submit_action == '\0')) { + (!links[curdoc.link].l_form->submit_action || + *links[curdoc.link].l_form->submit_action == '\0')) { /* * Form submit button with no ACTION defined. - FM */ @@ -2643,7 +2642,7 @@ PRIVATE int handle_LYK_ELGOTO ARGS5( LYstrncpy(user_input_buffer, ((links[curdoc.link].type == WWW_FORM_LINK_TYPE) ? - links[curdoc.link].form->submit_action : links[curdoc.link].lname), + links[curdoc.link].l_form->submit_action : links[curdoc.link].lname), (MAX_LINE - 1)); /* @@ -2655,7 +2654,7 @@ PRIVATE int handle_LYK_ELGOTO ARGS5( user_input_buffer[0] != '\0' && strcmp(user_input_buffer, ((links[curdoc.link].type == WWW_FORM_LINK_TYPE) - ? links[curdoc.link].form->submit_action + ? links[curdoc.link].l_form->submit_action : links[curdoc.link].lname))) { if (!LYTrimStartfile(user_input_buffer)) { LYRemoveBlanks(user_input_buffer); @@ -2711,32 +2710,32 @@ PRIVATE BOOLEAN handle_LYK_FASTBACKW_LINK ARGS3( * before it if there is one on this screen. - kw */ if (links[curdoc.link].type == WWW_FORM_LINK_TYPE && - links[curdoc.link].form->type == F_TEXTAREA_TYPE) { - int thisgroup = links[curdoc.link].form->number; - char *thisname = links[curdoc.link].form->name; + links[curdoc.link].l_form->type == F_TEXTAREA_TYPE) { + int thisgroup = links[curdoc.link].l_form->number; + char *thisname = links[curdoc.link].l_form->name; if (curdoc.link > 0 && !(links[0].type == WWW_FORM_LINK_TYPE && - links[0].form->type == F_TEXTAREA_TYPE && - links[0].form->number == thisgroup && - sametext(links[0].form->name, thisname))) { + links[0].l_form->type == F_TEXTAREA_TYPE && + links[0].l_form->number == thisgroup && + sametext(links[0].l_form->name, thisname))) { do nextlink--; while (links[nextlink].type == WWW_FORM_LINK_TYPE && - links[nextlink].form->type == F_TEXTAREA_TYPE && - links[nextlink].form->number == thisgroup && - sametext(links[nextlink].form->name, thisname)); + links[nextlink].l_form->type == F_TEXTAREA_TYPE && + links[nextlink].l_form->number == thisgroup && + sametext(links[nextlink].l_form->name, thisname)); samepage = 1; } else if (!more && Newline == 1 && (links[0].type == WWW_FORM_LINK_TYPE && - links[0].form->type == F_TEXTAREA_TYPE && - links[0].form->number == thisgroup && - sametext(links[0].form->name, thisname)) && + links[0].l_form->type == F_TEXTAREA_TYPE && + links[0].l_form->number == thisgroup && + sametext(links[0].l_form->name, thisname)) && !(links[nlinks-1].type == WWW_FORM_LINK_TYPE && - links[nlinks-1].form->type == F_TEXTAREA_TYPE && - links[nlinks-1].form->number == thisgroup && - sametext(links[nlinks-1].form->name, thisname))) { + links[nlinks-1].l_form->type == F_TEXTAREA_TYPE && + links[nlinks-1].l_form->number == thisgroup && + sametext(links[nlinks-1].l_form->name, thisname))) { nextlink = nlinks - 1; samepage = 1; @@ -2760,21 +2759,21 @@ PRIVATE BOOLEAN handle_LYK_FASTBACKW_LINK ARGS3( */ if (nextlink > 0 && links[nextlink].type == WWW_FORM_LINK_TYPE && - links[nextlink].form->type == F_TEXTAREA_TYPE) { - int thisgroup = links[nextlink].form->number; - char *thisname = links[nextlink].form->name; + links[nextlink].l_form->type == F_TEXTAREA_TYPE) { + int thisgroup = links[nextlink].l_form->number; + char *thisname = links[nextlink].l_form->name; if (links[0].type == WWW_FORM_LINK_TYPE && - links[0].form->type == F_TEXTAREA_TYPE && - links[0].form->number == thisgroup && - sametext(links[0].form->name, thisname)) { + links[0].l_form->type == F_TEXTAREA_TYPE && + links[0].l_form->number == thisgroup && + sametext(links[0].l_form->name, thisname)) { nextlink = 0; } else while (nextlink > 1 && links[nextlink-1].type == WWW_FORM_LINK_TYPE && - links[nextlink-1].form->type == F_TEXTAREA_TYPE && - links[nextlink-1].form->number == thisgroup && - sametext(links[nextlink-1].form->name, thisname)) { + links[nextlink-1].l_form->type == F_TEXTAREA_TYPE && + links[nextlink-1].l_form->number == thisgroup && + sametext(links[nextlink-1].l_form->name, thisname)) { nextlink--; } } @@ -2818,21 +2817,21 @@ PRIVATE void handle_LYK_FASTFORW_LINK ARGS2( * after it if there is one on this screen. - kw */ if (links[curdoc.link].type == WWW_FORM_LINK_TYPE && - links[curdoc.link].form->type == F_TEXTAREA_TYPE) { - int thisgroup = links[curdoc.link].form->number; - char *thisname = links[curdoc.link].form->name; + links[curdoc.link].l_form->type == F_TEXTAREA_TYPE) { + int thisgroup = links[curdoc.link].l_form->number; + char *thisname = links[curdoc.link].l_form->name; if (curdoc.link < nlinks-1 && !(links[nlinks-1].type == WWW_FORM_LINK_TYPE && - links[nlinks-1].form->type == F_TEXTAREA_TYPE && - links[nlinks-1].form->number == thisgroup && - sametext(links[nlinks-1].form->name, thisname))) { + links[nlinks-1].l_form->type == F_TEXTAREA_TYPE && + links[nlinks-1].l_form->number == thisgroup && + sametext(links[nlinks-1].l_form->name, thisname))) { do nextlink++; while (links[nextlink].type == WWW_FORM_LINK_TYPE && - links[nextlink].form->type == F_TEXTAREA_TYPE && - links[nextlink].form->number == thisgroup && - sametext(links[nextlink].form->name, thisname)); + links[nextlink].l_form->type == F_TEXTAREA_TYPE && + links[nextlink].l_form->number == thisgroup && + sametext(links[nextlink].l_form->name, thisname)); samepage = 1; } else if (!more && Newline == 1 && curdoc.link > 0) { nextlink = 0; @@ -2943,8 +2942,8 @@ PRIVATE void handle_LYK_GROW_TEXTAREA ARGS1( /* * See if the current link is in a form TEXTAREA. */ - if (links[curdoc.link].type == WWW_FORM_LINK_TYPE && - links[curdoc.link].form->type == F_TEXTAREA_TYPE) { + if (links[curdoc.link].type == WWW_FORM_LINK_TYPE && + links[curdoc.link].l_form->type == F_TEXTAREA_TYPE) { HText_ExpandTextarea (&links[curdoc.link], TEXTAREA_EXPAND_SIZE); @@ -2962,10 +2961,10 @@ PRIVATE BOOLEAN handle_LYK_HEAD ARGS1( int c; if (nlinks > 0 && - (links[curdoc.link].type != WWW_FORM_LINK_TYPE || - links[curdoc.link].form->type == F_SUBMIT_TYPE || - links[curdoc.link].form->type == F_IMAGE_SUBMIT_TYPE || - links[curdoc.link].form->type == F_TEXT_SUBMIT_TYPE)) { + (links[curdoc.link].type != WWW_FORM_LINK_TYPE || + links[curdoc.link].l_form->type == F_SUBMIT_TYPE || + links[curdoc.link].l_form->type == F_IMAGE_SUBMIT_TYPE || + links[curdoc.link].l_form->type == F_TEXT_SUBMIT_TYPE)) { /* * We have links, and the current link is a normal link or a form's * submit button. - FM @@ -3009,16 +3008,16 @@ PRIVATE BOOLEAN handle_LYK_HEAD ARGS1( strncmp(curdoc.address, "http", 4))) { HTUserMsg(LINK_NOT_HTTP_URL); } else if (links[curdoc.link].type == WWW_FORM_LINK_TYPE && - links[curdoc.link].form->disabled) { + links[curdoc.link].l_form->disabled) { HTUserMsg(FORM_ACTION_DISABLED); } else if (links[curdoc.link].type == WWW_FORM_LINK_TYPE && - strncmp(links[curdoc.link].form->submit_action, + strncmp(links[curdoc.link].l_form->submit_action, "lynxcgi:", 8) && - strncmp(links[curdoc.link].form->submit_action, + strncmp(links[curdoc.link].l_form->submit_action, "http", 4)) { HTUserMsg(FORM_ACTION_NOT_HTTP_URL); } else if (links[curdoc.link].type == WWW_FORM_LINK_TYPE && - links[curdoc.link].form->submit_method == + links[curdoc.link].l_form->submit_method == URL_POST_METHOD && HTConfirm(CONFIRM_POST_LINK_HEAD) == FALSE) { HTInfoMsg(CANCELLED); @@ -3374,8 +3373,8 @@ PRIVATE void handle_LYK_INSERT_FILE ARGS3( /* * See if the current link is in a form TEXTAREA. */ - if (links[curdoc.link].type == WWW_FORM_LINK_TYPE && - links[curdoc.link].form->type == F_TEXTAREA_TYPE) { + if (links[curdoc.link].type == WWW_FORM_LINK_TYPE && + links[curdoc.link].l_form->type == F_TEXTAREA_TYPE) { /* * Reject attempts to use this for gaining access to @@ -3908,18 +3907,18 @@ PRIVATE void handle_LYK_NEXT_LINK ARGS3( /* * Move to different textarea if TAB in textarea. */ - if (links[curdoc.link].type == WWW_FORM_LINK_TYPE && - links[curdoc.link].form->type == F_TEXTAREA_TYPE && + if (links[curdoc.link].type == WWW_FORM_LINK_TYPE && + links[curdoc.link].l_form->type == F_TEXTAREA_TYPE && c=='\t') { - int thisgroup = links[curdoc.link].form->number; - char *thisname = links[curdoc.link].form->name; + int thisgroup = links[curdoc.link].l_form->number; + char *thisname = links[curdoc.link].l_form->name; do curdoc.link++; while ((curdoc.link < nlinks-1) && links[curdoc.link].type == WWW_FORM_LINK_TYPE && - links[curdoc.link].form->type == F_TEXTAREA_TYPE && - links[curdoc.link].form->number == thisgroup && - sametext(links[curdoc.link].form->name, thisname)); + links[curdoc.link].l_form->type == F_TEXTAREA_TYPE && + links[curdoc.link].l_form->number == thisgroup && + sametext(links[curdoc.link].l_form->name, thisname)); } else { curdoc.link++; } @@ -3962,9 +3961,9 @@ PRIVATE BOOLEAN handle_LYK_NOCACHE ARGS2( { if (nlinks > 0) { if (links[curdoc.link].type == WWW_FORM_LINK_TYPE && - links[curdoc.link].form->type != F_SUBMIT_TYPE && - links[curdoc.link].form->type != F_IMAGE_SUBMIT_TYPE && - links[curdoc.link].form->type != F_TEXT_SUBMIT_TYPE) { + links[curdoc.link].l_form->type != F_SUBMIT_TYPE && + links[curdoc.link].l_form->type != F_IMAGE_SUBMIT_TYPE && + links[curdoc.link].l_form->type != F_TEXT_SUBMIT_TYPE) { if (*old_c != real_c) { *old_c = real_c; HTUserMsg(NOT_ON_SUBMIT_OR_LINK); @@ -4481,12 +4480,12 @@ PRIVATE void handle_LYK_SWITCH_DTD NOARGS PRIVATE void handle_LYK_TAG_LINK NOARGS { if (lynx_edit_mode && nlinks > 0 && !no_dired_support) { - if (!strcmp(links[curdoc.link].hightext, "..")) + if (!strcmp(LYGetHiliteStr(curdoc.link, 0), "..")) return; /* Never tag the parent directory */ if (dir_list_style == MIXED_STYLE) { - if (!strcmp(links[curdoc.link].hightext, "../")) + if (!strcmp(LYGetHiliteStr(curdoc.link, 0), "../")) return; - } else if (!strncmp(links[curdoc.link].hightext, "Up to ", 6)) + } else if (!strncmp(LYGetHiliteStr(curdoc.link, 0), "Up to ", 6)) return; { /* @@ -4682,10 +4681,11 @@ PRIVATE void handle_LYK_UP_LINK ARGS4( int newlink; if (*follow_col == -1) { + char *text = LYGetHiliteStr(curdoc.link, 0); *follow_col = links[curdoc.link].lx; - if (links[curdoc.link].hightext) - *follow_col += strlen(links[curdoc.link].hightext)/2; + if (text != NULL) + *follow_col += strlen(text) / 2; } newlink = find_link_near_col(*follow_col, -1); @@ -4916,7 +4916,7 @@ PRIVATE void handle_LYK_digit ARGS6( * Follow a normal link. */ StrAllocCopy(newdoc.address, links[lindx].lname); - StrAllocCopy(newdoc.title, links[lindx].hightext); + StrAllocCopy(newdoc.title, LYGetHiliteStr(lindx, 0)); #ifndef DONT_TRACK_INTERNAL_LINKS /* * For internal links, retain POST content if present. @@ -6441,10 +6441,10 @@ try_again: curlink_is_editable = (nlinks > 0 && links[curdoc.link].type == WWW_FORM_LINK_TYPE && - (links[curdoc.link].form->type == F_TEXT_TYPE || - links[curdoc.link].form->type == F_TEXT_SUBMIT_TYPE || - links[curdoc.link].form->type == F_PASSWORD_TYPE || - links[curdoc.link].form->type == F_TEXTAREA_TYPE)); + (links[curdoc.link].l_form->type == F_TEXT_TYPE || + links[curdoc.link].l_form->type == F_TEXT_SUBMIT_TYPE || + links[curdoc.link].l_form->type == F_PASSWORD_TYPE || + links[curdoc.link].l_form->type == F_TEXTAREA_TYPE)); use_last_tfpos = (curlink_is_editable && (real_cmd == LYK_LPOS_PREV_LINK || @@ -6464,7 +6464,7 @@ try_again: if (links[curdoc.link].type == WWW_FORM_LINK_TYPE) { - switch(links[curdoc.link].form->type) { + switch(links[curdoc.link].l_form->type) { case F_TEXT_SUBMIT_TYPE: case F_SUBMIT_TYPE: case F_IMAGE_SUBMIT_TYPE: @@ -6605,13 +6605,11 @@ try_again: * Replace novice lines if in NOVICE_MODE. */ if (user_mode==NOVICE_MODE) { - form_noviceline(links[curdoc.link].form->disabled); + form_noviceline(links[curdoc.link].l_form->disabled); } - real_c = change_form_link(&links[curdoc.link], + real_c = change_form_link(curdoc.link, &newdoc, &refresh_screen, - links[curdoc.link].form->name, - links[curdoc.link].form->value, - use_last_tfpos, FALSE); + use_last_tfpos, FALSE); } #ifdef TEXTFIELDS_MAY_NEED_ACTIVATION if (textfields_need_activation) @@ -6630,15 +6628,15 @@ try_again: do_change_link(); if ((c == '\n' || c == '\r') && links[curdoc.link].type == WWW_FORM_LINK_TYPE && - F_TEXTLIKE(links[curdoc.link].form->type) && + F_TEXTLIKE(links[curdoc.link].l_form->type) && !textfields_need_activation) { c = DO_NOTHING; } #ifdef TEXTFIELDS_MAY_NEED_ACTIVATION } else if ((links[curdoc.link].type == WWW_FORM_LINK_TYPE && - links[curdoc.link].form->type == F_TEXTAREA_TYPE) + links[curdoc.link].l_form->type == F_TEXTAREA_TYPE) && textfields_need_activation - && !links[curdoc.link].form->disabled + && !links[curdoc.link].l_form->disabled && peek_mouse_link() < 0 && (((LKC_TO_LAC(keymap,real_c) == LYK_NEXT_LINK || #ifdef TEXTAREA_AUTOGROW @@ -6648,11 +6646,11 @@ try_again: LKC_TO_LAC(keymap,real_c) == LYK_DOWN_LINK) && ((curdoc.link < nlinks-1 && links[curdoc.link+1].type == WWW_FORM_LINK_TYPE && - links[curdoc.link+1].form->type == F_TEXTAREA_TYPE - && (links[curdoc.link].form->number == - links[curdoc.link+1].form->number) && - strcmp(links[curdoc.link].form->name, - links[curdoc.link+1].form->name) == 0) || + links[curdoc.link+1].l_form->type == F_TEXTAREA_TYPE + && (links[curdoc.link].l_form->number == + links[curdoc.link+1].l_form->number) && + strcmp(links[curdoc.link].l_form->name, + links[curdoc.link+1].l_form->name) == 0) || (curdoc.link == nlinks-1 && more && HText_TAHasMoreLines(curdoc.link, 1)))) || ((LKC_TO_LAC(keymap,real_c) == LYK_PREV_LINK || @@ -6660,11 +6658,11 @@ try_again: LKC_TO_LAC(keymap,real_c) == LYK_UP_LINK) && ((curdoc.link > 0 && links[curdoc.link-1].type == WWW_FORM_LINK_TYPE && - links[curdoc.link-1].form->type == F_TEXTAREA_TYPE - && (links[curdoc.link].form->number == - links[curdoc.link-1].form->number) && - strcmp(links[curdoc.link].form->name, - links[curdoc.link-1].form->name) == 0) || + links[curdoc.link-1].l_form->type == F_TEXTAREA_TYPE + && (links[curdoc.link].l_form->number == + links[curdoc.link-1].l_form->number) && + strcmp(links[curdoc.link].l_form->name, + links[curdoc.link-1].l_form->name) == 0) || (curdoc.link == 0 && curdoc.line > 1 && HText_TAHasMoreLines(curdoc.link, -1)))))) { textinput_activated = TRUE; @@ -6693,23 +6691,23 @@ try_again: * try and improve the "readability" (such as it is). * Caveat emptor to anyone trying to change it.] */ - if ((links[curdoc.link].type == WWW_FORM_LINK_TYPE && - links[curdoc.link].form->type == F_TEXTAREA_TYPE) && + if ((links[curdoc.link].type == WWW_FORM_LINK_TYPE && + links[curdoc.link].l_form->type == F_TEXTAREA_TYPE) && ((curdoc.link == nlinks-1 && !(more && HText_TAHasMoreLines(curdoc.link, 1))) || ((curdoc.link < nlinks-1) && !(links[curdoc.link+1].type == WWW_FORM_LINK_TYPE && - links[curdoc.link+1].form->type == F_TEXTAREA_TYPE)) + links[curdoc.link+1].l_form->type == F_TEXTAREA_TYPE)) || ((curdoc.link < nlinks-1) && ((links[curdoc.link+1].type == WWW_FORM_LINK_TYPE && - links[curdoc.link+1].form->type == F_TEXTAREA_TYPE) + links[curdoc.link+1].l_form->type == F_TEXTAREA_TYPE) && - ((links[curdoc.link].form->number != - links[curdoc.link+1].form->number) || - (strcmp (links[curdoc.link].form->name, - links[curdoc.link+1].form->name) != 0)))))) { + ((links[curdoc.link].l_form->number != + links[curdoc.link+1].l_form->number) || + (strcmp (links[curdoc.link].l_form->name, + links[curdoc.link+1].l_form->name) != 0)))))) { HText_ExpandTextarea (&links[curdoc.link], 1); @@ -6758,10 +6756,8 @@ try_again: if (curlink_is_editable && !textinput_redrawn) { /*draw the text entry, but don't activate it*/ textinput_redrawn = TRUE; - change_form_link_ex(&links[curdoc.link], + change_form_link_ex(curdoc.link, &newdoc, &refresh_screen, - links[curdoc.link].form->name, - links[curdoc.link].form->value, use_last_tfpos, FALSE, TRUE); if (LYShowCursor) { LYmove(links[curdoc.link].ly, @@ -6869,7 +6865,7 @@ new_cmd: /* default: if (curdoc.link >= 0 && curdoc.link < nlinks && links[curdoc.link].type == WWW_FORM_LINK_TYPE && - F_TEXTLIKE(links[curdoc.link].form->type)) { + F_TEXTLIKE(links[curdoc.link].l_form->type)) { #ifdef TEXTFIELDS_MAY_NEED_ACTIVATION if (textfields_need_activation) { @@ -7677,7 +7673,7 @@ PUBLIC void HTAddGotoURL ARGS1( * to tell the user other misc info. */ PRIVATE void show_main_statusline ARGS2( - CONST linkstruct, curlink, + CONST LinkInfo, curlink, int, for_what) { /* @@ -7710,7 +7706,7 @@ PRIVATE void show_main_statusline ARGS2( #endif /* NORMAL_NON_FORM_LINK_STATUSLINES_FOR_ALL_USER_MODES */ #endif /* INDICATE_FORMS_MODE_FOR_ALL_LINKS_ON_PAGE */ if (curlink.type == WWW_FORM_LINK_TYPE) { - show_formlink_statusline(curlink.form, for_what); + show_formlink_statusline(curlink.l_form, for_what); } else { statusline(NORMAL_LINK_MESSAGE); } diff --git a/src/LYSearch.c b/src/LYSearch.c index 1afa5eb2..9e4f5b25 100644 --- a/src/LYSearch.c +++ b/src/LYSearch.c @@ -9,36 +9,41 @@ #include <LYLeaks.h> PRIVATE BOOL link_has_target ARGS2( - linkstruct *, a, + int, cur, char *, target) { + LinkInfo *a = &links[cur]; OptionType *option; char *stars = NULL, *cp; + int count; /* - * Search the hightext string, and hightext2 if present, - * taking the case_sensitive setting into account. - FM + * Search the hightext strings, if present, taking the case_sensitive + * setting into account. */ - if (LYno_attr_strstr(a->hightext, target) - || LYno_attr_strstr(a->hightext2, target)) { - return TRUE; + for (count = 0; ; ++count) { + char *text = LYGetHiliteStr(cur, count); + if (text == NULL) + break; + if (LYno_attr_strstr(text, target)) + return TRUE; } /* * Search the relevant form fields, taking the * case_sensitive setting into account. - FM */ - if ((a->form != NULL && a->form->value != NULL) && - a->form->type != F_HIDDEN_TYPE) { - if (a->form->type == F_PASSWORD_TYPE) { + if ((a->l_form != NULL && a->l_form->value != NULL) && + a->l_form->type != F_HIDDEN_TYPE) { + if (a->l_form->type == F_PASSWORD_TYPE) { /* * Check the actual, hidden password, and then * the displayed string. - FM */ - if (LYno_attr_strstr(a->form->value, target)) { + if (LYno_attr_strstr(a->l_form->value, target)) { return TRUE; } - StrAllocCopy(stars, a->form->value); + StrAllocCopy(stars, a->l_form->value); for (cp = stars; *cp != '\0'; cp++) *cp = '*'; if (LYno_attr_strstr(stars, target)) { @@ -46,23 +51,23 @@ PRIVATE BOOL link_has_target ARGS2( return TRUE; } FREE(stars); - } else if (a->form->type == F_OPTION_LIST_TYPE) { + } else if (a->l_form->type == F_OPTION_LIST_TYPE) { /* * Search the option strings that are displayed * when the popup is invoked. - FM */ - option = a->form->select_list; + option = a->l_form->select_list; while (option != NULL) { if (LYno_attr_strstr(option->name, target)) { return TRUE; } option = option->next; } - } else if (a->form->type == F_RADIO_TYPE) { + } else if (a->l_form->type == F_RADIO_TYPE) { /* * Search for checked or unchecked parens. - FM */ - if (a->form->num_value) { + if (a->l_form->num_value) { cp = checked_radio; } else { cp = unchecked_radio; @@ -70,11 +75,11 @@ PRIVATE BOOL link_has_target ARGS2( if (LYno_attr_strstr(cp, target)) { return TRUE; } - } else if (a->form->type == F_CHECKBOX_TYPE) { + } else if (a->l_form->type == F_CHECKBOX_TYPE) { /* * Search for checked or unchecked square brackets. - FM */ - if (a->form->num_value) { + if (a->l_form->num_value) { cp = checked_box; } else { cp = unchecked_box; @@ -89,7 +94,7 @@ PRIVATE BOOL link_has_target ARGS2( * hightext search, but make sure here * that the entire value is searched. - FM */ - if (LYno_attr_strstr(a->form->value, target)) { + if (LYno_attr_strstr(a->l_form->value, target)) { return TRUE; } } @@ -113,7 +118,7 @@ PRIVATE int check_next_target_in_links ARGS2( if (nlinks != 0) { for (i = *cur + 1; i < nlinks; ++i) { - if (link_has_target(&links[i], target)) { + if (link_has_target(i, target)) { *cur = i; return TRUE; } @@ -130,7 +135,7 @@ PRIVATE int check_prev_target_in_links ARGS2( if (nlinks != 0) { for (i = *cur - 1; i >= 0; --i) { - if (link_has_target(&links[i], target)) { + if (link_has_target(i, target)) { *cur = i; return TRUE; } diff --git a/src/LYShowInfo.c b/src/LYShowInfo.c index 9fe2b751..8b2337c6 100644 --- a/src/LYShowInfo.c +++ b/src/LYShowInfo.c @@ -369,16 +369,16 @@ PUBLIC int LYShowInfo ARGS4( if (nlinks > 0) { fprintf(fp0, "<h2>%s</h2>\n<dl compact>", gettext("Link that you currently have selected")); - StrAllocCopy(Title, links[doc->link].hightext); + StrAllocCopy(Title, LYGetHiliteStr(doc->link, 0)); LYEntify(&Title, TRUE); fprintf(fp0, "<dt><em>%s</em> %s\n", gettext("Linkname:"), Title); if (lynx_mode == FORMS_LYNX_MODE && links[doc->link].type == WWW_FORM_LINK_TYPE) { - if (links[doc->link].form->submit_method) { - int method = links[doc->link].form->submit_method; - char *enctype = links[doc->link].form->submit_enctype; + if (links[doc->link].l_form->submit_method) { + int method = links[doc->link].l_form->submit_method; + char *enctype = links[doc->link].l_form->submit_enctype; fprintf(fp0, "<dt> <em>%s</em> %s\n", gettext("Method:"), @@ -391,13 +391,13 @@ PUBLIC int LYShowInfo ARGS4( *enctype ? enctype : "application/x-www-form-urlencoded")); } - if (links[doc->link].form->submit_action) { - StrAllocCopy(Address, links[doc->link].form->submit_action); + if (links[doc->link].l_form->submit_action) { + StrAllocCopy(Address, links[doc->link].l_form->submit_action); LYEntify(&Address, TRUE); fprintf(fp0, "<dt> <em>Action:</em> %s\n", Address); } - if (!(links[doc->link].form->submit_method && - links[doc->link].form->submit_action)) { + if (!(links[doc->link].l_form->submit_method && + links[doc->link].l_form->submit_action)) { fprintf(fp0, "<dt> %s\n", gettext("(Form field)")); } } else { diff --git a/src/LYStrings.c b/src/LYStrings.c index dc9862d4..730d7e38 100644 --- a/src/LYStrings.c +++ b/src/LYStrings.c @@ -452,26 +452,28 @@ PRIVATE int set_clicked_link ARGS4( /* Loop over the links and see if we can get a match */ for (i = 0; i < nlinks; i++) { int len, lx = links[i].lx, is_text = 0; + int count = 0; + char *text = LYGetHiliteStr(i, count); if (links[i].type == WWW_FORM_LINK_TYPE - && F_TEXTLIKE(links[i].form->type)) + && F_TEXTLIKE(links[i].l_form->type)) is_text = 1; - if (is_text) - len = links[i].form->size; - else - len = strlen(links[i].hightext ); - /* Check the first line of the link */ - if ( links[i].hightext != NULL) { + if (text != NULL) { + if (is_text) + len = links[i].l_form->size; + else + len = strlen(text); cur_err = XYdist(x, y, links[i].lx, links[i].ly, len); /* Check the second line */ - if (cur_err > 0 && links[i].hightext2 != NULL) { - /* Note that there is never hightext2 if is_text */ + while (cur_err > 0 + && (text = LYGetHiliteStr(i, ++count)) != NULL) { + /* Note that there is at most one hightext if is_text */ int cur_err_2 = XYdist(x, y, - links[i].hightext2_offset, - links[i].ly+1, - strlen(links[i].hightext2)); + LYGetHilitePos(i, count), + links[i].ly + count, + strlen(text)); cur_err = HTMIN(cur_err, cur_err_2); } if (cur_err > 0 && is_text) @@ -484,7 +486,7 @@ PRIVATE int set_clicked_link ARGS4( /* double-click, if we care: submit text submit fields. - kw */ if (clicks > 1 && is_text && - links[i].form->type == F_TEXT_SUBMIT_TYPE) { + links[i].l_form->type == F_TEXT_SUBMIT_TYPE) { if (code != FOR_INPUT /* submit current input field directly */ || !(cury == y && (curx >= lx) && ((curx - lx) <= len))) { @@ -649,7 +651,7 @@ PUBLIC int LYmbcsstrlen ARGS3( { int i, j, len = 0; - if (!str && *str) + if (!non_empty(str)) return(len); for (i = 0; str[i] != '\0'; i++) { @@ -2103,7 +2105,7 @@ re_read: else if (mouse_link >= 0 && textfields_need_activation && links[mouse_link].type == WWW_FORM_LINK_TYPE && - F_TEXTLIKE(links[mouse_link].form->type)) + F_TEXTLIKE(links[mouse_link].l_form->type)) lac = LYK_ACTIVATE; #endif } @@ -4393,7 +4395,7 @@ redraw: */ if ((cp = (char *)HTList_objectAt(search_queries, 0)) != NULL) { - LYstrncpy(prev_target_buffer, cp, sizeof(prev_target_buffer)); + LYstrncpy(prev_target_buffer, cp, sizeof(prev_target_buffer) - 1); QueryNum = 0; FirstRecall = FALSE; } @@ -4938,6 +4940,7 @@ PUBLIC CONST char * LYLineeditHelpURL NOARGS } return NULL; } + /* * A replacement for 'strsep()' */ @@ -5420,7 +5423,7 @@ PUBLIC char * SNACat ARGS3( CONST char *, src, int, n) { - if (src && *src) { + if (non_empty(src)) { if (*dest) { int length = strlen(*dest); *dest = (char *)realloc(*dest, length + n + 1); diff --git a/src/LYStrings.h b/src/LYStrings.h index 0fcebc98..5a4e95b0 100644 --- a/src/LYStrings.h +++ b/src/LYStrings.h @@ -78,6 +78,8 @@ extern char * LYno_attr_mbcs_case_strstr PARAMS(( int * nstartp, int * nendp)); +#define non_empty(s) ((s) != NULL && *(s) != '\0') + #define LYno_attr_mb_strstr(chptr, tarptr, utf_flag, count_gcells, nstartp, nendp) \ (case_sensitive \ ? LYno_attr_mbcs_strstr(chptr, tarptr, utf_flag, count_gcells, nstartp, nendp) \ diff --git a/src/LYStructs.h b/src/LYStructs.h index fd95aee5..180a5ab1 100644 --- a/src/LYStructs.h +++ b/src/LYStructs.h @@ -5,24 +5,36 @@ #include <HTAnchor.h> #endif /* HTANCHOR_H */ -typedef struct link { +typedef struct { + int hl_x; + char *hl_text; +} HiliteInfo; + +typedef struct { + int hl_len; /* number of strings in this struct */ + HiliteInfo hl_base; + HiliteInfo *hl_info; +} HiliteList; + +typedef struct { char *lname; char *target; - char *hightext; - char *hightext2; - int hightext2_offset; + char *l_hightext; + char *l_hightext2; + int l_hightext2_offset; BOOL inUnderline; /* TRUE when this link is in underlined context. */ int lx; int ly; int type; /* Type of link, Forms, WWW, etc. */ int anchor_number; /* The anchor number within the HText structure. */ int anchor_line_num;/* The anchor line number in the HText structure. */ - struct _FormInfo *form; /* Pointer to form info. */ -} linkstruct; -extern linkstruct links[MAXLINKS]; + HiliteList list; + struct _FormInfo *l_form; /* Pointer to form info. */ +} LinkInfo; +extern LinkInfo links[MAXLINKS]; extern int nlinks; -typedef struct _document { +typedef struct { char * title; char * address; char * post_data; @@ -43,7 +55,7 @@ typedef struct _document { #include <HTForms.h> #endif /* HTFORMS_H */ -typedef struct _histstruct { +typedef struct { char * title; char * address; char * post_data; @@ -58,7 +70,7 @@ typedef struct _histstruct { int intern_seq_start; /* indicates which element on the history is the start of this sequence of "internal links", otherwise -1 */ -} histstruct; +} HistInfo; extern int Visited_Links_As; @@ -77,7 +89,7 @@ typedef struct _VisitedLink { struct _VisitedLink *prev_first; } VisitedLink; -extern histstruct history[MAXHIST]; +extern HistInfo history[MAXHIST]; extern int nhist; /******************************************************************************/ diff --git a/src/LYStyle.c b/src/LYStyle.c index 0d2caeea..496bf802 100644 --- a/src/LYStyle.c +++ b/src/LYStyle.c @@ -1,6 +1,6 @@ /* character level styles for Lynx * (c) 1996 Rob Partington -- donated to the Lyncei (if they want it :-) - * @Id: LYStyle.c 1.48 Wed, 15 Aug 2001 15:09:52 -0700 dickey @ + * @Id: LYStyle.c 1.49 Tue, 01 Jan 2002 17:30:08 -0800 dickey @ */ #include <HTUtils.h> #include <HTML.h> @@ -604,7 +604,7 @@ PUBLIC void cache_tag_styles NOARGS for (i = 0; i < HTML_ELEMENTS; ++i) { - strcpy(buf, HTML_dtd.tags[i].name); + LYstrncpy(buf, HTML_dtd.tags[i].name, sizeof(buf)-1); LYLowerCase(buf); cached_tag_styles[i] = hash_code(buf); } diff --git a/src/LYUtils.c b/src/LYUtils.c index 3f94afad..6baa52cd 100644 --- a/src/LYUtils.c +++ b/src/LYUtils.c @@ -188,7 +188,7 @@ PRIVATE LY_TEMP *FindTempfileByFP ARGS1(FILE *, fp) PRIVATE char *getenv_text ARGS1(char *, name) { char *result = getenv(name); - return (result != 0 && *result != 0) ? result : 0; + return non_empty(result) ? result : 0; } /* @@ -229,261 +229,158 @@ PUBLIC size_t utf8_length ARGS2( } /* - * Highlight (or unhighlight) a given link. + * Set the initial highlight information for a given link. */ -PUBLIC void LYhighlight ARGS3( - int, flag, +PUBLIC void LYSetHilite ARGS2( int, cur, - char *, target) + char *, text) { - char buffer[200]; - int i; - char tmp[7]; -#ifdef SHOW_WHEREIS_TARGETS - char *cp; - char *theData = NULL; - char *Data = NULL; - int Offset, HitOffset, tLen; - int LenNeeded; - BOOL TargetEmphasisON = FALSE; - BOOL target1_drawn = NO; -#endif - 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 - properly */ -#endif - tmp[0] = tmp[1] = tmp[2] = '\0'; + links[cur].list.hl_base.hl_text = text; + links[cur].list.hl_len = (text != NULL) ? 1 : 0; + FREE(links[cur].list.hl_info); +} - /* - * Bugs in the history code might cause -1 to be sent for cur, which - * yields a crash when LYstrncpy() is called with a nonsense pointer. - * As far as I know, such bugs have been squashed, but if they should - * reappear, this works around them. - FM - */ - if (cur < 0) - cur = 0; -#if defined(TEXTFIELDS_MAY_NEED_ACTIVATION) && defined(INACTIVE_INPUT_STYLE_VH) - if (flag == OFF) - textinput_redrawn = FALSE; -#endif +/* + * Add highlight information for the next line of a link. + */ +PUBLIC void LYAddHilite ARGS3( + int, cur, + char *, text, + int, x) +{ + HiliteList *list = &(links[cur].list); + HiliteInfo *have = list->hl_info; + unsigned need = (list->hl_len - 1); + unsigned want = ++(list->hl_len) * sizeof(HiliteInfo); - if (nlinks > 0) { -#if defined(USE_COLOR_STYLE) && !defined(NO_HILIT_FIX) - if (flag == ON || links[cur].type == WWW_FORM_LINK_TYPE) -#endif - { -#ifndef USE_COLOR_STYLE - if (links[cur].type == WWW_FORM_LINK_TYPE || - !links[cur].hightext) { - LYMoveToLink(cur, target, NULL, - flag, links[cur].inUnderline, utf_flag); - lynx_start_link_color (flag == ON, links[cur].inUnderline); - } else { - LYMoveToLink(cur, target, links[cur].hightext, - flag, links[cur].inUnderline, utf_flag); - hl1_drawn = YES; -#ifdef SHOW_WHEREIS_TARGETS - target1_drawn = YES; -#endif - } -#else /* here USE_COLOR_STYLE defined */ - int s = s_alink; + if (have != NULL) { + have = realloc(have, want); + } else { + have = malloc(want); + } + list->hl_info = have; + have[need].hl_text = text; + have[need].hl_x = x; +} -#ifdef TEXTFIELDS_MAY_NEED_ACTIVATION - if ( textfields_need_activation && - links[cur].type == WWW_FORM_LINK_TYPE && - F_TEXTLIKE(links[cur].form->type) ) - s = s_curedit; -#endif +/* + * Get the highlight text, counting from zero. + */ +PUBLIC char *LYGetHiliteStr ARGS2( + int, cur, + int, count) +{ + char *result; + if (count >= links[cur].list.hl_len) + result = NULL; + else if (count > 0) + result = links[cur].list.hl_info[count - 1].hl_text; + else + result = links[cur].list.hl_base.hl_text; + return result; +} -# define LXP (links[cur].lx) -# define LYP (links[cur].ly) - if (flag != ON) { - int x; - /* - * This is where we try to restore the original style when - * a link is unhighlighted. The purpose of cached_styles[][] - * is to save the original style just for this case. - * If it doesn't have a color change saved at just the right - * position, we look at preceding positions in the same line - * until we find one. - */ - if (LYP >= 0 && LYP < CACHEH && LXP >= 0 && LXP < CACHEW) { - CTRACE2(TRACE_STYLE, - (tfp, "STYLE.highlight.off: cached style @(%d,%d): ", - LYP, LXP)); - s = cached_styles[LYP][LXP]; - if (s == 0) { - for (x = LXP-1; x >= 0; x--) { - if (cached_styles[LYP][x]) { - if (cached_styles[LYP][x] > 0) { - s = cached_styles[LYP][x]; - cached_styles[LYP][LXP] = s; - } - CTRACE((tfp, "found %d, x_offset=%d.\n", - cached_styles[LYP][x], (int)x-LXP)); - break; - } - } - if (s == 0) { - CTRACE((tfp, "not found, assume <a>.\n")); - s = s_a; - } - } else { - CTRACE((tfp, "found %d.\n", s)); - } - } else { - CTRACE2(TRACE_STYLE, (tfp, "STYLE.highlight.off: can't use cache.\n")); - s = s_a; - } - } else { - CTRACE2(TRACE_STYLE, (tfp, "STYLE.highlight.on: @(%d,%d).\n", LYP, LXP)); - } - LYmove(LYP, LXP); - LynxChangeStyle(s, STACK_ON); -#endif - } +/* + * Get the X-ordinate at which to draw the corresponding highlight-text + */ +PUBLIC int LYGetHilitePos ARGS2( + int, cur, + int, count) +{ + int result; + if (count >= links[cur].list.hl_len) + result = -1; + else if (count > 0) + result = links[cur].list.hl_info[count - 1].hl_x; + else + result = links[cur].lx; + return result; +} - if (links[cur].type == WWW_FORM_LINK_TYPE) { - int len; - int avail_space = (LYcols - links[cur].lx) - 1; +#define LXP (links[cur].lx) +#define LYP (links[cur].ly) - LYstrncpy(buffer, - (links[cur].hightext ? - links[cur].hightext : ""), - (avail_space > links[cur].form->size ? - links[cur].form->size : avail_space)); - LYaddstr(buffer); +#ifdef SHOW_WHEREIS_TARGETS - len = strlen(buffer); - for (; len < links[cur].form->size && len < avail_space; len++) - LYaddch('_'); +#define SKIP_GLYPHS(theFlag, theData, theOffset) \ + (theFlag \ + ? LYmbcs_skip_glyphs(theData, (theOffset), theFlag) \ + : (theData + (theOffset))) - } else { -#if defined(USE_COLOR_STYLE) && !defined(NO_HILIT_FIX) - if (flag == OFF) { - hl2_drawn = TRUE; - redraw_lines_of_link(cur); - CTRACE2(TRACE_STYLE, (tfp, "STYLE.highlight.off: NOFIX branch @(%d,%d).\n", LYP, LXP)); - } else -#endif - if (!hl1_drawn) { - /* - * Copy into the buffer only what will fit - * within the width of the screen. - */ - LYmbcsstrncpy(buffer, - (links[cur].hightext ? - links[cur].hightext : ""), - (sizeof(buffer) - 1), - ((LYcols - 1) - links[cur].lx), - utf_flag); - LYaddstr(buffer); - } - } +/* + * If we have an emphasized WHEREIS hit in the highlighted text, restore the + * emphasis. Note that we never emphasize the first and last characters of the + * highlighted text when we are making the link current, so the link attributes + * for the current link will persist at the beginning and end, providing an + * indication to the user that it has been made current. Also note that we use + * HText_getFirstTargetInLine() to determine if there's a hit in the HText + * structure line containing the link, and if so, get back a copy of the line + * starting at that first hit (which might be before or after our link), and + * with all IsSpecial characters stripped, so we don't need to deal with them + * here. -FM + */ +PRIVATE BOOL show_whereis_targets ARGS6( + int, flag, + int, cur, + int, count, + char *, target, + BOOL, TargetEmphasisON, + BOOL, utf_flag) +{ + char *Data = NULL; + char *cp; + char *theData = NULL; + char buffer[MAX_LINE]; + char tmp[7]; + int HitOffset; + int LenNeeded; + int Offset; + int tLen; - /* - * Display a second line as well. - */ - if ( links[cur].hightext2 && links[cur].ly < display_lines -#if defined(USE_COLOR_STYLE) && !defined(NO_HILIT_FIX) - && hl2_drawn == FALSE -#endif - ) { - lynx_stop_link_color (flag == ON, links[cur].inUnderline); - LYmove((links[cur].ly + 1), links[cur].hightext2_offset); -#ifndef USE_COLOR_STYLE - lynx_start_link_color (flag == ON, links[cur].inUnderline); -#else - CTRACE2(TRACE_STYLE, - (tfp, "STYLE.highlight.line2: @(%d,%d), style=%d.\n", - links[cur].ly + 1, links[cur].hightext2_offset, - flag == ON ? s_alink : s_a)); - LynxChangeStyle(flag == ON ? s_alink : s_a, ABS_ON); -#endif + tmp[0] = tmp[1] = tmp[2] = '\0'; - for (i = 0; (tmp[0] = links[cur].hightext2[i]) != '\0' && - i+links[cur].hightext2_offset < LYcols; i++) { - if (!IsSpecialAttrChar(links[cur].hightext2[i])) { - /* - * For CJK strings, by Masanobu Kimura. - */ - if (HTCJK != NOCJK && is8bits(tmp[0])) { - tmp[1] = links[cur].hightext2[++i]; - LYaddstr(tmp); - tmp[1] = '\0'; - } else { - LYaddstr(tmp); - } - } - } - } -#if defined(USE_COLOR_STYLE) && !defined(NO_HILIT_FIX) - if ( hl2_drawn == FALSE ) -#endif - lynx_stop_link_color (flag == ON, links[cur].inUnderline); + if (non_empty(target) + && (links[cur].type & WWW_LINK_TYPE) + && non_empty(LYGetHiliteStr(cur, count)) + && links[cur].ly + count < display_lines + && HText_getFirstTargetInLine(HTMainText, + links[cur].anchor_line_num + count, + utf_flag, + &Offset, + &tLen, + &theData, + target)) { + int itmp, written, len, y, offset; + char *data; + int tlen = strlen(target); + int hlen, hLen; + int hLine = links[cur].ly + count; + int hoffset = LYGetHilitePos(cur, count); + size_t utf_extra = 0; -#ifdef SHOW_WHEREIS_TARGETS - if (!target1_drawn) /* - * If we have an emphasized WHEREIS hit in the highlighted - * text, restore the emphasis. Note that we never emphasize - * the first and last characters of the highlighted text when - * we are making the link current, so the link attributes for - * the current link will persist at the beginning and end, - * providing an indication to the user that it has been made - * current. Also note that we use HText_getFirstTargetInLine() - * to determine if there's a hit in the HText structure line - * containing the link, and if so, get back a copy of the line - * starting at that first hit (which might be before or after - * our link), and with all IsSpecial characters stripped, so we - * don't need to deal with them here. - FM + * Copy into the buffer only what will fit up to the right border of + * the screen. -FM */ - if (target && *target && (links[cur].type & WWW_LINK_TYPE) && - links[cur].hightext && *links[cur].hightext && - HText_getFirstTargetInLine(HTMainText, - links[cur].anchor_line_num, - utf_flag, - (int *)&Offset, - (int *)&tLen, - (char **)&theData, - target)) { - int itmp, written, len, y, offset; - char *data; - int tlen = strlen(target); - int hlen, hLen; - int hLine = links[cur].ly, hoffset = links[cur].lx; - size_t utf_extra = 0; - - /* - * Copy into the buffer only what will fit - * up to the right border of the screen. - FM - */ - LYmbcsstrncpy(buffer, - (links[cur].hightext ? - links[cur].hightext : ""), - (sizeof(buffer) - 1), - ((LYcols - 1) - links[cur].lx), - utf_flag); - hlen = strlen(buffer); - hLen = ((HTCJK != NOCJK || utf_flag) ? - LYmbcsstrlen(buffer, utf_flag, YES) : hlen); - - /* - * Break out if the first hit in the line - * starts after this link. - FM - */ - if (Offset >= (hoffset + hLen)) { - goto highlight_search_hightext2; - } + LYmbcsstrncpy(buffer, + (LYGetHiliteStr(cur, count) ? + LYGetHiliteStr(cur, count) : ""), + (sizeof(buffer) - 1), + ((LYcols - 1) - LYGetHilitePos(cur, count)), + utf_flag); + hlen = strlen(buffer); + hLen = ((HTCJK != NOCJK || utf_flag) ? + LYmbcsstrlen(buffer, utf_flag, YES) : hlen); + /* + * Break out if the first hit in the line starts after this link. -FM + */ + if (Offset < (hoffset + hLen)) { /* - * Recursively skip hits that end before this link, and - * break out if there is no hit beyond those. - FM + * Recursively skip hits that end before this link, and break out + * if there is no hit beyond those. -FM */ Data = theData; while ((Offset < hoffset) && @@ -494,22 +391,22 @@ PUBLIC void LYhighlight ARGS3( target, utf_flag, YES, &HitOffset, - &LenNeeded)) != NULL) && - (offset + LenNeeded) < LYcols) { + &LenNeeded)) != NULL) + && (offset + LenNeeded) < LYcols) { Data = cp; Offset = (offset + HitOffset); } else { - goto highlight_search_hightext2; + goto highlight_search_done; } } data = buffer; offset = hoffset; /* - * If the hit starts before the hightext, and ends - * in or beyond the hightext, restore the emphasis, - * skipping the first and last characters of the - * hightext if we're making the link current. - FM + * If the hit starts before the hightext, and ends in or beyond the + * hightext, restore the emphasis, skipping the first and last + * characters of the hightext if we're making the link current. + * -FM */ if ((Offset < offset) && ((Offset + tLen) > offset)) { @@ -518,8 +415,8 @@ PUBLIC void LYhighlight ARGS3( len = (tlen - (offset - Offset)); /* - * Go to the start of the hightext and - * handle its first character. - FM + * Go to the start of the hightext and handle its first + * character. -FM */ LYmove(hLine, offset); tmp[0] = data[itmp]; @@ -528,8 +425,8 @@ PUBLIC void LYhighlight ARGS3( LYstrncpy(&tmp[1], &data[itmp+1], utf_extra); itmp += utf_extra; /* - * Start emphasis immediately if we are - * making the link non-current. - FM + * Start emphasis immediately if we are making the link + * non-current. -FM */ if (flag != ON) { LYstartTargetEmphasis(); @@ -543,12 +440,12 @@ PUBLIC void LYhighlight ARGS3( utf_extra = 0; } else if (HTCJK != NOCJK && is8bits(tmp[0])) { /* - * For CJK strings, by Masanobu Kimura. + * For CJK strings, by Masanobu Kimura. */ tmp[1] = data[++itmp]; /* - * Start emphasis immediately if we are - * making the link non-current. - FM + * Start emphasis immediately if we are making the link + * non-current. -FM */ if (flag != ON) { LYstartTargetEmphasis(); @@ -561,8 +458,8 @@ PUBLIC void LYhighlight ARGS3( written += 2; } else { /* - * Start emphasis immediately if we are making - * the link non-current. - FM + * Start emphasis immediately if we are making the link + * non-current. -FM */ if (flag != ON) { LYstartTargetEmphasis(); @@ -575,9 +472,8 @@ PUBLIC void LYhighlight ARGS3( } itmp++; /* - * Start emphasis after the first character - * if we are making the link current and this - * is not the last character. - FM + * Start emphasis after the first character if we are making + * the link current and this is not the last character. -FM */ if (!TargetEmphasisON && data[itmp] != '\0') { @@ -586,25 +482,24 @@ PUBLIC void LYhighlight ARGS3( } /* - * Handle the remaining characters. - FM + * Handle the remaining characters. -FM */ for (; written < len && (tmp[0] = data[itmp]) != '\0'; itmp++) { /* - * Print all the other target chars, except - * the last character if it is also the last - * character of hightext and we are making - * the link current. - FM + * Print all the other target chars, except the last + * character if it is also the last character of hightext + * and we are making the link current. -FM */ utf_extra = utf8_length(utf_flag, data + itmp); if (utf_extra) { LYstrncpy(&tmp[1], &data[itmp+1], utf_extra); itmp += utf_extra; /* - * Make sure we don't restore emphasis to - * the last character of hightext if we - * are making the link current. - FM + * Make sure we don't restore emphasis to the last + * character of hightext if we are making the link + * current. -FM */ if (flag == ON && data[(itmp + 1)] == '\0') { LYstopTargetEmphasis(); @@ -619,13 +514,13 @@ PUBLIC void LYhighlight ARGS3( utf_extra = 0; } else if (HTCJK != NOCJK && is8bits(tmp[0])) { /* - * For CJK strings, by Masanobu Kimura. + * For CJK strings, by Masanobu Kimura. */ tmp[1] = data[++itmp]; /* - * Make sure we don't restore emphasis to - * the last character of hightext if we - * are making the link current. - FM + * Make sure we don't restore emphasis to the last + * character of hightext if we are making the link + * current. -FM */ if (flag == ON && data[(itmp + 1)] == '\0') { LYstopTargetEmphasis(); @@ -639,9 +534,9 @@ PUBLIC void LYhighlight ARGS3( written += 2; } else { /* - * Make sure we don't restore emphasis to - * the last character of hightext if we - * are making the link current. - FM + * Make sure we don't restore emphasis to the last + * character of hightext if we are making the link + * current. -FM */ if (flag == ON && data[(itmp + 1)] == '\0') { LYstopTargetEmphasis(); @@ -656,56 +551,38 @@ PUBLIC void LYhighlight ARGS3( } /* - * Stop the emphasis if we haven't already, then - * reset the offset to our current position in - * the line, and if that is beyond the link, or - * or we are making the link current and it is - * the last character of the hightext, we are - * done. - FM + * Stop the emphasis if we haven't already, then reset the + * offset to our current position in the line, and if that is + * beyond the link, or or we are making the link current and it + * is the last character of the hightext, we are done. -FM */ if (TargetEmphasisON) { LYstopTargetEmphasis(); TargetEmphasisON = FALSE; } LYGetYX(y, offset); - if (offset >= - (hoffset + - (flag == ON ? (hLen - 1) : hLen))) { - goto highlight_search_hightext2; - } - - /* - * See if we have another hit that starts - * within the hightext. - FM - */ - data = (Data + (offset - Offset)); - if (!utf_flag) { - data = Data + (offset - Offset); - } else { - data = LYmbcs_skip_glyphs(Data, - (offset - Offset), - utf_flag); - } - if (((cp = LYno_attr_mb_strstr(data, + if (offset < (hoffset + (flag == ON ? (hLen - 1) : hLen)) + /* + * See if we have another hit that starts within the + * hightext. -FM + */ + && ((cp = LYno_attr_mb_strstr(data = SKIP_GLYPHS(utf_flag, Data, offset - Offset), target, utf_flag, YES, &HitOffset, - &LenNeeded)) != NULL) && - (offset + LenNeeded) < LYcols) { + &LenNeeded)) != NULL) + && (offset + LenNeeded) < LYcols /* - * If the hit starts after the end of the hightext, - * or we are making the link current and the hit - * starts at its last character, we are done. - FM + * If the hit starts after the end of the hightext, or we + * are making the link current and the hit starts at its + * last character, we are done. -FM */ - if ((HitOffset + offset) >= - (hoffset + - (flag == ON ? (hLen - 1) : hLen))) { - goto highlight_search_hightext2; - } - + && (HitOffset + offset) < + (hoffset + + (flag == ON ? (hLen - 1) : hLen))) { /* - * Set up the data and offset for the hit, and let - * the code for within hightext hits handle it. - FM + * Set up the data and offset for the hit, and let the code + * for within hightext hits handle it. -FM */ Data = cp; Offset = (offset + HitOffset); @@ -713,410 +590,29 @@ PUBLIC void LYhighlight ARGS3( offset = hoffset; goto highlight_hit_within_hightext; } - goto highlight_search_hightext2; - } - -highlight_hit_within_hightext: - /* - * If we get to here, the hit starts within the - * hightext. If we are making the link current - * and it's the last character in the hightext, - * we are done. Otherwise, move there and start - * restoring the emphasis. - FM - */ - if ((Offset - offset) > - (flag == ON ? (hLen - 1) : hLen)) { - goto highlight_search_hightext2; - } - if (!utf_flag) { - data += (Offset - offset); - } else { - LYrefresh(); - data = LYmbcs_skip_glyphs(data, - (Offset - offset), - utf_flag); - } - offset = Offset; - itmp = 0; - written = 0; - len = tlen; - - /* - * Go to the start of the hit and - * handle its first character. - FM - */ - LYmove(hLine, offset); - tmp[0] = data[itmp]; - utf_extra = utf8_length(utf_flag, data + itmp); - if (utf_extra) { - LYstrncpy(&tmp[1], &data[itmp+1], utf_extra); - itmp += utf_extra; - /* - * Start emphasis immediately if we are making - * the link non-current, or we are making it - * current but this is not the first or last - * character of the hightext. - FM - */ - if (flag != ON || - (offset > hoffset && data[itmp+1] != '\0')) { - LYstartTargetEmphasis(); - TargetEmphasisON = TRUE; - LYaddstr(tmp); - } else { - LYmove(hLine, (offset + 1)); - } - tmp[1] = '\0'; - written += (utf_extra + 1); - utf_extra = 0; - } else if (HTCJK != NOCJK && is8bits(tmp[0])) { - /* - * For CJK strings, by Masanobu Kimura. - */ - tmp[1] = data[++itmp]; - /* - * Start emphasis immediately if we are making - * the link non-current, or we are making it - * current but this is not the first or last - * character of the hightext. - FM - */ - if (flag != ON || - (offset > hoffset && data[itmp+1] != '\0')) { - LYstartTargetEmphasis(); - TargetEmphasisON = TRUE; - LYaddstr(tmp); - } else { - LYmove(hLine, (offset + 1)); - } - tmp[1] = '\0'; - written += 2; - } else { - /* - * Start emphasis immediately if we are making - * the link non-current, or we are making it - * current but this is not the first or last - * character of the hightext. - FM - */ - if (flag != ON || - (offset > hoffset && data[itmp+1] != '\0')) { - LYstartTargetEmphasis(); - TargetEmphasisON = TRUE; - LYaddstr(tmp); - } else { - LYmove(hLine, (offset + 1)); - } - written++; - } - itmp++; - /* - * Start emphasis after the first character - * if we are making the link current and this - * is not the last character. - FM - */ - if (!TargetEmphasisON && - data[itmp] != '\0') { - LYstartTargetEmphasis(); - TargetEmphasisON = TRUE; - } - - for (; - written < len && (tmp[0] = data[itmp]) != '\0'; - itmp++) { - /* - * Print all the other target chars, except - * the last character if it is also the last - * character of hightext and we are making - * the link current. - FM - */ - utf_extra = utf8_length(utf_flag, data + itmp); - if (utf_extra) { - LYstrncpy(&tmp[1], &data[itmp+1], utf_extra); - itmp += utf_extra; - /* - * Make sure we don't restore emphasis to - * the last character of hightext if we - * are making the link current. - FM - */ - if (flag == ON && data[(itmp + 1)] == '\0') { - LYstopTargetEmphasis(); - TargetEmphasisON = FALSE; - LYGetYX(y, offset); - LYmove(hLine, (offset + 1)); - } else { - LYaddstr(tmp); - } - tmp[1] = '\0'; - written += (utf_extra + 1); - utf_extra = 0; - } else if (HTCJK != NOCJK && is8bits(tmp[0])) { - /* - * For CJK strings, by Masanobu Kimura. - */ - tmp[1] = data[++itmp]; - /* - * Make sure we don't restore emphasis to - * the last character of hightext if we - * are making the link current. - FM - */ - if (flag == ON && data[(itmp + 1)] == '\0') { - LYstopTargetEmphasis(); - TargetEmphasisON = FALSE; - LYGetYX(y, offset); - LYmove(hLine, (offset + 1)); - } else { - LYaddstr(tmp); - } - tmp[1] = '\0'; - written += 2; - } else { - /* - * Make sure we don't restore emphasis to - * the last character of hightext if we - * are making the link current. - FM - */ - if (flag == ON && data[(itmp + 1)] == '\0') { - LYstopTargetEmphasis(); - TargetEmphasisON = FALSE; - LYGetYX(y, offset); - LYmove(hLine, (offset + 1)); - } else { - LYaddstr(tmp); - } - written++; - } - } - - /* - * Stop the emphasis if we haven't already, then reset - * the offset to our current position in the line, and - * if that is beyond the link, or we are making the link - * current and it is the last character in the hightext, - * we are done. - FM - */ - if (TargetEmphasisON) { - LYstopTargetEmphasis(); - TargetEmphasisON = FALSE; - } - LYGetYX(y, offset); - if (offset >= - (hoffset + (flag == ON ? (hLen - 1) : hLen))) { - goto highlight_search_hightext2; - } - - /* - * See if we have another hit that starts - * within the hightext. - FM - */ - if (!utf_flag) { - data = Data + (offset - Offset); - } else { - data = LYmbcs_skip_glyphs(Data, - (offset - Offset), - utf_flag); - } - if (((cp = LYno_attr_mb_strstr(data, - target, - utf_flag, YES, - &HitOffset, - &LenNeeded)) != NULL) && - (offset + LenNeeded) < LYcols) { - /* - * If the hit starts after the end of the hightext, - * or we are making the link current and the hit - * starts at its last character, we are done. - FM - */ - if ((HitOffset + offset) >= - (hoffset + - (flag == ON ? (hLen - 1) : hLen))) { - goto highlight_search_hightext2; - } - - /* - * If the target extends beyond our buffer, emphasize - * everything in the hightext starting at this hit. - * Otherwise, set up the data and offsets, and loop - * back. - FM - */ - if ((HitOffset + (offset + tLen)) >= - (hoffset + hLen)) { - offset = (HitOffset + offset); - if (!utf_flag) { - data = buffer + (offset - hoffset); - } else { - LYrefresh(); - data = LYmbcs_skip_glyphs(buffer, - (offset - hoffset), - utf_flag); - } - LYmove(hLine, offset); - itmp = 0; - written = 0; - len = strlen(data); - - /* - * Turn the emphasis back on. - FM - */ - LYstartTargetEmphasis(); - TargetEmphasisON = TRUE; - for (; - written < len && (tmp[0] = data[itmp]) != '\0'; - itmp++) { - /* - * Print all the other target chars, except - * the last character if it is also the last - * character of hightext and we are making - * the link current. - FM - */ - utf_extra = utf8_length(utf_flag, data); - if (utf_extra) { - LYstrncpy(&tmp[1], &data[itmp+1], utf_extra); - itmp += utf_extra; - /* - * Make sure we don't restore emphasis to - * the last character of hightext if we - * are making the link current. - FM - */ - if (flag == ON && data[(itmp + 1)] == '\0') { - LYstopTargetEmphasis(); - TargetEmphasisON = FALSE; - LYGetYX(y, offset); - LYmove(hLine, (offset + 1)); - } else { - LYaddstr(tmp); - } - tmp[1] = '\0'; - written += (utf_extra + 1); - utf_extra = 0; - } else if (HTCJK != NOCJK && is8bits(tmp[0])) { - /* - * For CJK strings, by Masanobu Kimura. - */ - tmp[1] = data[++itmp]; - /* - * Make sure we don't restore emphasis to - * the last character of hightext if we - * are making the link current. - FM - */ - if (flag == ON && data[(itmp + 1)] == '\0') { - LYstopTargetEmphasis(); - TargetEmphasisON = FALSE; - } else { - LYaddstr(tmp); - } - tmp[1] = '\0'; - written += 2; - } else { - /* - * Make sure we don't restore emphasis to - * the last character of hightext if we - * are making the link current. - FM - */ - if (flag == ON && data[(itmp + 1)] == '\0') { - LYstopTargetEmphasis(); - TargetEmphasisON = FALSE; - } else { - LYaddstr(tmp); - } - written++; - } - } - /* - * Turn off the emphasis if we haven't already, - * and then we're done. - FM - */ - if (TargetEmphasisON) { - LYstopTargetEmphasis(); - } - goto highlight_search_hightext2; - } else { - Data = cp; - Offset = (offset + HitOffset); - data = buffer; - offset = hoffset; - goto highlight_hit_within_hightext; - } - } - goto highlight_search_hightext2; - } -highlight_search_hightext2: - if (target && *target && (links[cur].type & WWW_LINK_TYPE) && - links[cur].hightext2 && *links[cur].hightext2 && - links[cur].ly < display_lines && - HText_getFirstTargetInLine(HTMainText, - (links[cur].anchor_line_num + 1), - utf_flag, - (int *)&Offset, - (int *)&tLen, - (char **)&theData, - target)) { - int itmp, written, len, y, offset; - char *data; - int tlen = strlen(target); - int hlen, hLen; - int hLine = (links[cur].ly + 1); - int hoffset = links[cur].hightext2_offset; - size_t utf_extra = 0; - - /* - * Copy into the buffer only what will fit - * up to the right border of the screen. - FM - */ - LYmbcsstrncpy(buffer, - (links[cur].hightext2 ? - links[cur].hightext2 : ""), - (sizeof(buffer) - 1), - ((LYcols - 1) - links[cur].hightext2_offset), - utf_flag); - hlen = strlen(buffer); - hLen = ((HTCJK != NOCJK || utf_flag) ? - LYmbcsstrlen(buffer, utf_flag, YES) : hlen); - - /* - * Break out if the first hit in the line - * starts after this link. - FM - */ - if (Offset >= (hoffset + hLen)) { goto highlight_search_done; } +highlight_hit_within_hightext: /* - * Recursively skip hits that end before this link, and - * break out if there is no hit beyond those. - FM + * If we get to here, the hit starts within the hightext. If we + * are making the link current and it's the last character in the + * hightext, we are done. Otherwise, move there and start + * restoring the emphasis. -FM */ - Data = theData; - while ((Offset < hoffset) && - ((Offset + tLen) <= hoffset)) { - data = (Data + tlen); - offset = (Offset + tLen); - if (((cp = LYno_attr_mb_strstr(data, - target, - utf_flag, YES, - &HitOffset, - &LenNeeded)) != NULL) && - (offset + LenNeeded) < LYcols) { - Data = cp; - Offset = (offset + HitOffset); - } else { - goto highlight_search_done; + if ((Offset - offset) <= (flag == ON ? (hLen - 1) : hLen)) { + data = SKIP_GLYPHS(utf_flag, data, Offset - offset); + if (utf_flag) { + LYrefresh(); } - } - data = buffer; - offset = hoffset; - - /* - * If the hit starts before the hightext2, and ends - * in or beyond the hightext2, restore the emphasis, - * skipping the first and last characters of the - * hightext2 if we're making the link current. - FM - */ - if ((Offset < offset) && - ((Offset + tLen) > offset)) { + offset = Offset; itmp = 0; written = 0; - len = (tlen - (offset - Offset)); + len = tlen; /* - * Go to the start of the hightext2 and - * handle its first character. - FM + * Go to the start of the hit and handle its first character. + * -FM */ LYmove(hLine, offset); tmp[0] = data[itmp]; @@ -1125,10 +621,12 @@ highlight_search_hightext2: LYstrncpy(&tmp[1], &data[itmp+1], utf_extra); itmp += utf_extra; /* - * Start emphasis immediately if we are - * making the link non-current. - FM + * Start emphasis immediately if we are making the link + * non-current, or we are making it current but this is not + * the first or last character of the hightext. -FM */ - if (flag != ON) { + if (flag != ON || + (offset > hoffset && data[itmp+1] != '\0')) { LYstartTargetEmphasis(); TargetEmphasisON = TRUE; LYaddstr(tmp); @@ -1140,14 +638,16 @@ highlight_search_hightext2: utf_extra = 0; } else if (HTCJK != NOCJK && is8bits(tmp[0])) { /* - * For CJK strings, by Masanobu Kimura. + * For CJK strings, by Masanobu Kimura. */ tmp[1] = data[++itmp]; /* - * Start emphasis immediately if we are - * making the link non-current. - FM + * Start emphasis immediately if we are making the link + * non-current, or we are making it current but this is not + * the first or last character of the hightext. -FM */ - if (flag != ON) { + if (flag != ON || + (offset > hoffset && data[itmp+1] != '\0')) { LYstartTargetEmphasis(); TargetEmphasisON = TRUE; LYaddstr(tmp); @@ -1158,10 +658,12 @@ highlight_search_hightext2: written += 2; } else { /* - * Start emphasis immediately if we are making - * the link non-current. - FM + * Start emphasis immediately if we are making the link + * non-current, or we are making it current but this is not + * the first or last character of the hightext. -FM */ - if (flag != ON) { + if (flag != ON || + (offset > hoffset && data[itmp+1] != '\0')) { LYstartTargetEmphasis(); TargetEmphasisON = TRUE; LYaddstr(tmp); @@ -1172,9 +674,8 @@ highlight_search_hightext2: } itmp++; /* - * Start emphasis after the first character - * if we are making the link current and this - * is not the last character. - FM + * Start emphasis after the first character if we are making + * the link current and this is not the last character. -FM */ if (!TargetEmphasisON && data[itmp] != '\0') { @@ -1182,26 +683,22 @@ highlight_search_hightext2: TargetEmphasisON = TRUE; } - /* - * Handle the remaining characters. - FM - */ for (; written < len && (tmp[0] = data[itmp]) != '\0'; itmp++) { /* - * Print all the other target chars, except - * the last character if it is also the last - * character of hightext2 and we are making - * the link current. - FM + * Print all the other target chars, except the last + * character if it is also the last character of hightext + * and we are making the link current. -FM */ utf_extra = utf8_length(utf_flag, data + itmp); if (utf_extra) { LYstrncpy(&tmp[1], &data[itmp+1], utf_extra); itmp += utf_extra; /* - * Make sure we don't restore emphasis to - * the last character of hightext2 if we - * are making the link current. - FM + * Make sure we don't restore emphasis to the last + * character of hightext if we are making the link + * current. -FM */ if (flag == ON && data[(itmp + 1)] == '\0') { LYstopTargetEmphasis(); @@ -1216,13 +713,13 @@ highlight_search_hightext2: utf_extra = 0; } else if (HTCJK != NOCJK && is8bits(tmp[0])) { /* - * For CJK strings, by Masanobu Kimura. + * For CJK strings, by Masanobu Kimura. */ tmp[1] = data[++itmp]; /* - * Make sure we don't restore emphasis to - * the last character of hightext2 if we - * are making the link current. - FM + * Make sure we don't restore emphasis to the last + * character of hightext if we are making the link + * current. -FM */ if (flag == ON && data[(itmp + 1)] == '\0') { LYstopTargetEmphasis(); @@ -1236,9 +733,9 @@ highlight_search_hightext2: written += 2; } else { /* - * Make sure we don't restore emphasis to - * the last character of hightext2 if we - * are making the link current. - FM + * Make sure we don't restore emphasis to the last + * character of hightext if we are making the link + * current. -FM */ if (flag == ON && data[(itmp + 1)] == '\0') { LYstopTargetEmphasis(); @@ -1253,388 +750,353 @@ highlight_search_hightext2: } /* - * Stop the emphasis if we haven't already, then - * reset the offset to our current position in - * the line, and if that is beyond the link, or - * or we are making the link current and it is - * the last character of the hightext2, we are - * done. - FM + * Stop the emphasis if we haven't already, then reset the + * offset to our current position in the line, and if that is + * beyond the link, or we are making the link current and it is + * the last character in the hightext, we are done. -FM */ if (TargetEmphasisON) { LYstopTargetEmphasis(); TargetEmphasisON = FALSE; } LYGetYX(y, offset); - if (offset >= - (hoffset + - (flag == ON ? (hLen - 1) : hLen))) { - goto highlight_search_done; - } - - /* - * See if we have another hit that starts - * within the hightext2. - FM - */ - if (!utf_flag) { - data = Data + (offset - Offset); - } else { - data = LYmbcs_skip_glyphs(Data, - (offset - Offset), - utf_flag); - } - if (((cp = LYno_attr_mb_strstr(data, + if (offset < (hoffset + (flag == ON ? (hLen - 1) : hLen)) + /* + * See if we have another hit that starts within the + * hightext. -FM + */ + && ((cp = LYno_attr_mb_strstr(data = SKIP_GLYPHS(utf_flag, Data, offset - Offset), target, utf_flag, YES, &HitOffset, - &LenNeeded)) != NULL) && - (offset + LenNeeded) < LYcols) { + &LenNeeded)) != NULL) + && (offset + LenNeeded) < LYcols /* - * If the hit starts after the end of the hightext2, - * or we are making the link current and the hit - * starts at its last character, we are done. - FM + * If the hit starts after the end of the hightext, or we + * are making the link current and the hit starts at its + * last character, we are done. -FM */ - if ((HitOffset + offset) >= - (hoffset + - (flag == ON ? (hLen - 1) : hLen))) { - goto highlight_search_done; - } - + && (HitOffset + offset) < (hoffset + (flag == ON ? (hLen - 1) : hLen))) { /* - * Set up the data and offset for the hit, and let - * the code for within hightext2 hits handle it. - FM + * If the target extends beyond our buffer, emphasize + * everything in the hightext starting at this hit. + * Otherwise, set up the data and offsets, and loop back. + * -FM */ - Data = cp; - Offset = (offset + HitOffset); - data = buffer; - offset = hoffset; - goto highlight_hit_within_hightext2; + if ((HitOffset + (offset + tLen)) >= (hoffset + hLen)) { + offset = (HitOffset + offset); + data = SKIP_GLYPHS(utf_flag, Data, offset - hoffset); + if (utf_flag) { + LYrefresh(); + } + LYmove(hLine, offset); + itmp = 0; + written = 0; + len = strlen(data); + + /* + * Turn the emphasis back on. -FM + */ + LYstartTargetEmphasis(); + TargetEmphasisON = TRUE; + for (; + written < len && (tmp[0] = data[itmp]) != '\0'; + itmp++) { + /* + * Print all the other target chars, except the + * last character if it is also the last character + * of hightext and we are making the link current. + * -FM + */ + utf_extra = utf8_length(utf_flag, data + itmp); + if (utf_extra) { + LYstrncpy(&tmp[1], &data[itmp+1], utf_extra); + itmp += utf_extra; + /* + * Make sure we don't restore emphasis to the + * last character of hightext if we are making + * the link current. -FM + */ + if (flag == ON && data[(itmp + 1)] == '\0') { + LYstopTargetEmphasis(); + TargetEmphasisON = FALSE; + LYGetYX(y, offset); + LYmove(hLine, (offset + 1)); + } else { + LYaddstr(tmp); + } + tmp[1] = '\0'; + written += (utf_extra + 1); + utf_extra = 0; + } else if (HTCJK != NOCJK && is8bits(tmp[0])) { + /* + * For CJK strings, by Masanobu Kimura. + */ + tmp[1] = data[++itmp]; + /* + * Make sure we don't restore emphasis to the + * last character of hightext if we are making + * the link current. -FM + */ + if (flag == ON && data[(itmp + 1)] == '\0') { + LYstopTargetEmphasis(); + TargetEmphasisON = FALSE; + } else { + LYaddstr(tmp); + } + tmp[1] = '\0'; + written += 2; + } else { + /* + * Make sure we don't restore emphasis to the + * last character of hightext if we are making + * the link current. -FM + */ + if (flag == ON && data[(itmp + 1)] == '\0') { + LYstopTargetEmphasis(); + TargetEmphasisON = FALSE; + } else { + LYaddstr(tmp); + } + written++; + } + } + /* + * Turn off the emphasis if we haven't already, and + * then we're done. -FM + */ + if (TargetEmphasisON) { + LYstopTargetEmphasis(); + } + } else { + Data = cp; + Offset = (offset + HitOffset); + data = buffer; + offset = hoffset; + goto highlight_hit_within_hightext; + } } - goto highlight_search_done; } + } + } +highlight_search_done: + FREE(theData); + return TargetEmphasisON; +} +#endif /* SHOW_WHEREIS_TARGETS */ -highlight_hit_within_hightext2: - /* - * If we get to here, the hit starts within the - * hightext2. If we are making the link current - * and it's the last character in the hightext2, - * we are done. Otherwise, move there and start - * restoring the emphasis. - FM - */ - if ((Offset - offset) > - (flag == ON ? (hLen - 1) : hLen)) { - goto highlight_search_done; - } - if (!utf_flag) { - data += (Offset - offset); - } else { - LYrefresh(); - data = LYmbcs_skip_glyphs(data, - (Offset - offset), - utf_flag); - } - offset = Offset; - itmp = 0; - written = 0; - len = tlen; +#ifdef USE_COLOR_STYLE +PRIVATE int find_cached_style ARGS2( + int, cur, + int, flag) +{ + int s = s_alink; - /* - * Go to the start of the hit and - * handle its first character. - FM - */ - LYmove(hLine, offset); - tmp[0] = data[itmp]; - utf_extra = utf8_length(utf_flag, data + itmp); - if (utf_extra) { - LYstrncpy(&tmp[1], &data[itmp+1], utf_extra); - itmp += utf_extra; - /* - * Start emphasis immediately if we are making - * the link non-current, or we are making it - * current but this is not the first or last - * character of the hightext2. - FM - */ - if (flag != ON || - (offset > hoffset && data[itmp+1] != '\0')) { - LYstartTargetEmphasis(); - TargetEmphasisON = TRUE; - LYaddstr(tmp); - } else { - LYmove(hLine, (offset + 1)); +#ifdef TEXTFIELDS_MAY_NEED_ACTIVATION + if ( textfields_need_activation + && links[cur].type == WWW_FORM_LINK_TYPE + && F_TEXTLIKE(links[cur].l_form->type) ) + s = s_curedit; +#endif + + if (flag != ON) { + int x; + /* + * This is where we try to restore the original style when a link is + * unhighlighted. The purpose of cached_styles[][] is to save the + * original style just for this case. If it doesn't have a color + * change saved at just the right position, we look at preceding + * positions in the same line until we find one. + */ + if (LYP >= 0 && LYP < CACHEH && LXP >= 0 && LXP < CACHEW) { + CTRACE2(TRACE_STYLE, + (tfp, "STYLE.highlight.off: cached style @(%d,%d): ", + LYP, LXP)); + s = cached_styles[LYP][LXP]; + if (s == 0) { + for (x = LXP-1; x >= 0; x--) { + if (cached_styles[LYP][x]) { + if (cached_styles[LYP][x] > 0) { + s = cached_styles[LYP][x]; + cached_styles[LYP][LXP] = s; + } + CTRACE((tfp, "found %d, x_offset=%d.\n", + cached_styles[LYP][x], (int)x-LXP)); + break; + } } - tmp[1] = '\0'; - written += (utf_extra + 1); - utf_extra = 0; - } else if (HTCJK != NOCJK && is8bits(tmp[0])) { - /* - * For CJK strings, by Masanobu Kimura. - */ - tmp[1] = data[++itmp]; - /* - * Start emphasis immediately if we are making - * the link non-current, or we are making it - * current but this is not the first or last - * character of the hightext2. - FM - */ - if (flag != ON || - (offset > hoffset && data[itmp+1] != '\0')) { - LYstartTargetEmphasis(); - TargetEmphasisON = TRUE; - LYaddstr(tmp); - } else { - LYmove(hLine, (offset + 1)); + if (s == 0) { + CTRACE((tfp, "not found, assume <a>.\n")); + s = s_a; } - tmp[1] = '\0'; - written += 2; } else { - /* - * Start emphasis immediately if we are making - * the link non-current, or we are making it - * current but this is not the first or last - * character of the hightext2. - FM - */ - if (flag != ON || - (offset > hoffset && data[itmp+1] != '\0')) { - LYstartTargetEmphasis(); - TargetEmphasisON = TRUE; - LYaddstr(tmp); - } else { - LYmove(hLine, (offset + 1)); - } - written++; - } - itmp++; - /* - * Start emphasis after the first character - * if we are making the link current and this - * is not the last character. - FM - */ - if (!TargetEmphasisON && - data[itmp] != '\0') { - LYstartTargetEmphasis(); - TargetEmphasisON = TRUE; + CTRACE((tfp, "found %d.\n", s)); } + } else { + CTRACE2(TRACE_STYLE, (tfp, "STYLE.highlight.off: can't use cache.\n")); + s = s_a; + } + } else { + CTRACE2(TRACE_STYLE, (tfp, "STYLE.highlight.on: @(%d,%d).\n", LYP, LXP)); + } + return s; +} +#endif /* USE_COLOR_STYLE */ - for (; - written < len && (tmp[0] = data[itmp]) != '\0'; - itmp++) { - /* - * Print all the other target chars, except - * the last character if it is also the last - * character of hightext2 and we are making - * the link current. - FM - */ - utf_extra = utf8_length(utf_flag, data + itmp); - if (utf_extra) { - LYstrncpy(&tmp[1], &data[itmp+1], utf_extra); - itmp += utf_extra; - /* - * Make sure we don't restore emphasis to - * the last character of hightext2 if we - * are making the link current. - FM - */ - if (flag == ON && data[(itmp + 1)] == '\0') { - LYstopTargetEmphasis(); - TargetEmphasisON = FALSE; - LYGetYX(y, offset); - LYmove(hLine, (offset + 1)); - } else { - LYaddstr(tmp); - } - tmp[1] = '\0'; - written += (utf_extra + 1); - utf_extra = 0; - } else if (HTCJK != NOCJK && is8bits(tmp[0])) { - /* - * For CJK strings, by Masanobu Kimura. - */ - tmp[1] = data[++itmp]; - /* - * Make sure we don't restore emphasis to - * the last character of hightext2 if we - * are making the link current. - FM - */ - if (flag == ON && data[(itmp + 1)] == '\0') { - LYstopTargetEmphasis(); - TargetEmphasisON = FALSE; - LYGetYX(y, offset); - LYmove(hLine, (offset + 1)); - } else { - LYaddstr(tmp); - } - tmp[1] = '\0'; - written += 2; - } else { - /* - * Make sure we don't restore emphasis to - * the last character of hightext2 if we - * are making the link current. - FM - */ - if (flag == ON && data[(itmp + 1)] == '\0') { - LYstopTargetEmphasis(); - TargetEmphasisON = FALSE; - LYGetYX(y, offset); - LYmove(hLine, (offset + 1)); - } else { - LYaddstr(tmp); - } - written++; - } - } +/* + * Highlight (or unhighlight) a given link. + */ +PUBLIC void LYhighlight ARGS3( + int, flag, + int, cur, + char *, target) +{ + char buffer[MAX_LINE]; + int i; + int hi_count; + int hi_offset; + char tmp[7]; + char *hi_string; +#ifdef SHOW_WHEREIS_TARGETS + BOOL TargetEmphasisON = FALSE; + BOOL target1_drawn = NO; +#endif + BOOL utf_flag = (BOOL)(LYCharSet_UC[current_char_set].enc == UCT_ENC_UTF8); + BOOL hl1_drawn = NO; +#ifdef USE_COLOR_STYLE + BOOL hl2_drawn = FALSE; /* whether links[cur].l_hightext2 is already drawn + properly */ +#endif + tmp[0] = tmp[1] = tmp[2] = '\0'; - /* - * Stop the emphasis if we haven't already, then reset - * the offset to our current position in the line, and - * if that is beyond the link, or we are making the link - * current and it is the last character in the hightext2, - * we are done. - FM - */ - if (TargetEmphasisON) { - LYstopTargetEmphasis(); - TargetEmphasisON = FALSE; - } - LYGetYX(y, offset); - if (offset >= - (hoffset + (flag == ON ? (hLen - 1) : hLen))) { - goto highlight_search_done; - } + /* + * Bugs in the history code might cause -1 to be sent for cur, which yields + * a crash when LYstrncpy() is called with a nonsense pointer. As far as I + * know, such bugs have been squashed, but if they should reappear, this + * works around them. -FM + */ + if (cur < 0) + cur = 0; +#if defined(TEXTFIELDS_MAY_NEED_ACTIVATION) && defined(INACTIVE_INPUT_STYLE_VH) + if (flag == OFF) + textinput_redrawn = FALSE; +#endif + + if (nlinks > 0) { +#ifdef USE_COLOR_STYLE + if (flag == ON || links[cur].type == WWW_FORM_LINK_TYPE) { + LYmove(LYP, LXP); + LynxChangeStyle(find_cached_style(cur, flag), STACK_ON); + } +#else + if (links[cur].type == WWW_FORM_LINK_TYPE + || LYGetHiliteStr(cur, 0) == NULL) { + LYMoveToLink(cur, target, NULL, + flag, links[cur].inUnderline, utf_flag); + lynx_start_link_color (flag == ON, links[cur].inUnderline); + } else { + LYMoveToLink(cur, target, LYGetHiliteStr(cur, 0), + flag, links[cur].inUnderline, utf_flag); + hl1_drawn = YES; +#ifdef SHOW_WHEREIS_TARGETS + target1_drawn = YES; +#endif + } +#endif + + if (links[cur].type == WWW_FORM_LINK_TYPE) { + int len; + int avail_space = (LYcols - links[cur].lx) - 1; + char *text = LYGetHiliteStr(cur, 0); + + if (avail_space > links[cur].l_form->size) + avail_space = links[cur].l_form->size; + if (avail_space > (int) sizeof(buffer) - 1) + avail_space = (int) sizeof(buffer) - 1; + + LYstrncpy(buffer, (text != NULL ? text : ""), avail_space); + LYaddstr(buffer); + len = strlen(buffer); + for (; len < links[cur].l_form->size && len < avail_space; len++) + LYaddch('_'); + +#ifdef USE_COLOR_STYLE + } else if (flag == OFF) { + hl2_drawn = TRUE; + redraw_lines_of_link(cur); + CTRACE2(TRACE_STYLE, (tfp, "STYLE.highlight.off: NOFIX branch @(%d,%d).\n", LYP, LXP)); +#endif + } else if (!hl1_drawn) { /* - * See if we have another hit that starts - * within the hightext2. - FM + * Copy into the buffer only what will fit within the width of the + * screen. */ - if (!utf_flag) { - data = (Data + (offset - Offset)); - } else { - data = LYmbcs_skip_glyphs(Data, - (offset - Offset), - utf_flag); - } - if (((cp = LYno_attr_mb_strstr(data, - target, - utf_flag, YES, - &HitOffset, - &LenNeeded)) != NULL) && - (offset + LenNeeded) < LYcols) { - /* - * If the hit starts after the end of the hightext2, - * or we are making the link current and the hit - * starts at its last character, we are done. - FM - */ - if ((HitOffset + offset) >= - (hoffset + - (flag == ON ? (hLen - 1) : hLen))) { - goto highlight_search_done; - } + LYmbcsstrncpy(buffer, + (LYGetHiliteStr(cur, 0) ? + LYGetHiliteStr(cur, 0) : ""), + (sizeof(buffer) - 1), + ((LYcols - 1) - links[cur].lx), + utf_flag); + LYaddstr(buffer); + } - /* - * If the target extends beyond our buffer, emphasize - * everything in the hightext2 starting at this hit. - * Otherwise, set up the data and offsets, and loop - * back. - FM - */ - if ((HitOffset + (offset + tLen)) >= - (hoffset + hLen)) { - offset = (HitOffset + offset); - if (!utf_flag) { - data = buffer + (offset - hoffset); - } else { - LYrefresh(); - data = LYmbcs_skip_glyphs(buffer, - (offset - hoffset), - utf_flag); - } - LYmove(hLine, offset); - itmp = 0; - written = 0; - len = strlen(data); + /* + * Display a second line as well. + */ +#ifdef USE_COLOR_STYLE + if (hl2_drawn == FALSE) +#endif + { + for (hi_count = 1; + (hi_string = LYGetHiliteStr(cur, hi_count)) != NULL + && links[cur].ly + hi_count <= display_lines; + ++hi_count) { - /* - * Turn the emphasis back on. - FM - */ - LYstartTargetEmphasis(); - TargetEmphasisON = TRUE; - for (; - written < len && (tmp[0] = data[itmp]) != '\0'; - itmp++) { + hi_offset = LYGetHilitePos(cur, hi_count); + lynx_stop_link_color (flag == ON, links[cur].inUnderline); + LYmove(links[cur].ly + hi_count, hi_offset); + +#ifdef USE_COLOR_STYLE + CTRACE2(TRACE_STYLE, + (tfp, "STYLE.highlight.line2: @(%d,%d), style=%d.\n", + links[cur].ly + hi_count, hi_offset, + flag == ON ? s_alink : s_a)); + LynxChangeStyle(flag == ON ? s_alink : s_a, ABS_ON); +#else + lynx_start_link_color (flag == ON, links[cur].inUnderline); +#endif + + for (i = 0; (tmp[0] = hi_string[i]) != '\0' + && (i + hi_offset) < LYcols; i++) { + if (!IsSpecialAttrChar(hi_string[i])) { /* - * Print all the other target chars, except - * the last character if it is also the last - * character of hightext2 and we are making - * the link current. - FM + * For CJK strings, by Masanobu Kimura. */ - utf_extra = utf8_length(utf_flag, data + itmp); - if (utf_extra) { - LYstrncpy(&tmp[1], &data[itmp+1], utf_extra); - itmp += utf_extra; - /* - * Make sure we don't restore emphasis to - * the last character of hightext2 if we - * are making the link current. - FM - */ - if (flag == ON && data[(itmp + 1)] == '\0') { - LYstopTargetEmphasis(); - TargetEmphasisON = FALSE; - LYGetYX(y, offset); - LYmove(hLine, (offset + 1)); - } else { - LYaddstr(tmp); - } - tmp[1] = '\0'; - written += (utf_extra + 1); - utf_extra = 0; - } else if (HTCJK != NOCJK && is8bits(tmp[0])) { - /* - * For CJK strings, by Masanobu Kimura. - */ - tmp[1] = data[++itmp]; - /* - * Make sure we don't restore emphasis to - * the last character of hightext2 if we - * are making the link current. - FM - */ - if (flag == ON && data[(itmp + 1)] == '\0') { - LYstopTargetEmphasis(); - TargetEmphasisON = FALSE; - } else { - LYaddstr(tmp); - } + if (HTCJK != NOCJK && is8bits(tmp[0])) { + tmp[1] = LYGetHiliteStr(cur, 1)[++i]; + LYaddstr(tmp); tmp[1] = '\0'; - written += 2; } else { - /* - * Make sure we don't restore emphasis to - * the last character of hightext2 if we - * are making the link current. - FM - */ - if (flag == ON && data[(itmp + 1)] == '\0') { - LYstopTargetEmphasis(); - TargetEmphasisON = FALSE; - } else { - LYaddstr(tmp); - } - written++; + LYaddstr(tmp); } - } - /* - * Turn off the emphasis if we haven't already, - * and then we're done. - FM - */ - if (TargetEmphasisON) { - LYstopTargetEmphasis(); - } - goto highlight_search_done; - } else { - Data = cp; - Offset = (offset + HitOffset); - data = buffer; - offset = hoffset; - goto highlight_hit_within_hightext2; + } } } - goto highlight_search_done; + lynx_stop_link_color (flag == ON, links[cur].inUnderline); + } + +#ifdef SHOW_WHEREIS_TARGETS + for (hi_count = target1_drawn ? 1 : 0; + LYGetHiliteStr(cur, hi_count) != NULL; + hi_count++) { + TargetEmphasisON = show_whereis_targets(flag, + cur, + hi_count, + target, + TargetEmphasisON, + utf_flag); } -highlight_search_done: - FREE(theData); if (!LYShowCursor) /* @@ -2432,7 +1894,7 @@ PUBLIC void LYAddLocalhostAlias ARGS1( { char *LocalAlias = NULL; - if (!(alias && *alias)) + if (!non_empty(alias)) return; if (!localhost_aliases) { @@ -2910,12 +2372,11 @@ PUBLIC BOOLEAN LYFixCursesOnForAccess ARGS2( * Determine whether we allow HEAD and related flags for a URL. - kw */ PUBLIC BOOLEAN LYCanDoHEAD ARGS1( - CONST char *, address - ) + CONST char *, address) { char *temp0 = NULL; int isurl; - if (!(address && *address)) + if (!non_empty(address)) return FALSE; if (!strncmp(address, "http", 4)) return TRUE; @@ -2963,7 +2424,7 @@ PUBLIC BOOLEAN LYCanDoHEAD ARGS1( #ifdef ALLOW_PROXY_HEAD if (isurl != FILE_URL_TYPE) { char *acc_method = HTParse(temp0, "", PARSE_ACCESS); - if (acc_method && *acc_method) { + if (non_empty(acc_method)) { char *proxy; StrAllocCat(acc_method, "_proxy"); proxy = getenv(acc_method); @@ -3341,7 +2802,7 @@ PUBLIC void HTAddSugFilename ARGS1( char *old; HTList *cur; - if (!(fname && *fname)) + if (!non_empty(fname)) return; StrAllocCopy(new, fname); @@ -4237,7 +3698,7 @@ PUBLIC void LYEnsureAbsoluteURL ARGS3( { char *temp = NULL; - if (!(*href && *(*href))) + if (!non_empty(*href)) return; /* @@ -4254,7 +3715,7 @@ PUBLIC void LYEnsureAbsoluteURL ARGS3( (name ? name : ""), (name ? " " : ""), *href)); LYConvertToURL(href, fixit); } - if ((temp = HTParse(*href, "", PARSE_ALL)) != NULL && *temp != '\0') + if (non_empty(temp = HTParse(*href, "", PARSE_ALL))) StrAllocCopy(*href, temp); FREE(temp); } @@ -5213,7 +4674,7 @@ PUBLIC BOOLEAN LYAddSchemeForURL ARGS2( FREE(Str); return GotScheme; - } else if (default_scheme != NULL && *default_scheme != '\0') { + } else if (non_empty(default_scheme)) { StrAllocCopy(Str, default_scheme); GotScheme = TRUE; StrAllocCat(Str, *AllocatedString); @@ -5424,7 +4885,7 @@ PUBLIC CONST char * Home_Dir NOARGS StrAllocCopy(HomeDir, "/tmp"); } #ifdef UNIX - if (cp && *cp) + if (non_empty(cp)) HTAlwaysAlert(NULL, gettext("Ignoring invalid HOME")); #endif #endif /* VMS */ @@ -5701,7 +5162,7 @@ PUBLIC void LYAddPathToHome ARGS3( #else #define NO_HOMEPATH "/error" #endif /* VMS */ - if (!(home && *home)) + if (!non_empty(home)) /* * Home_Dir() has a bug if this ever happens. - FM */ @@ -5789,7 +5250,7 @@ PUBLIC time_t LYmktime ARGS2( /* * Make sure we have a string to parse. - FM */ - if (!(string && *string)) + if (!non_empty(string)) return(0); s = string; CTRACE((tfp, "LYmktime: Parsing '%s'\n", s)); @@ -6707,7 +6168,7 @@ PUBLIC int LYRemoveTemp ARGS1( LY_TEMP *p, *q; int code = -1; - if (name != 0 && *name != 0) { + if (non_empty(name)) { CTRACE((tfp, "LYRemoveTemp(%s)\n", name)); for (p = ly_temp, q = 0; p != 0; q = p, p = p->next) { if (!strcmp(name, p->name)) { @@ -7196,7 +6657,7 @@ PUBLIC void LYTrimPathSep ARGS1( #endif /* - * Add a trailing path-separator to avoid confusing other programs when we concateate + * Add a trailing path-separator to avoid confusing other programs when we concatenate * to it. This only applies to local filesystems. */ PUBLIC void LYAddPathSep ARGS1( @@ -7750,8 +7211,6 @@ PUBLIC void get_clip_release NOARGS #if defined(WIN_EX) /* 1997/10/16 (Thu) 20:13:28 */ -#define MAX_DOS_PATH 128 /* exactly 80 */ - PUBLIC int put_clip(char *szBuffer) { HANDLE hWnd; @@ -7838,28 +7297,6 @@ PUBLIC void get_clip_release() CloseClipboard(); m_locked = 0; } - - -PUBLIC char *HTDOS_short_name(char *path) -{ - static char sbuf[MAX_DOS_PATH]; - char *ret; - DWORD r; - - r = GetShortPathName(path, sbuf, sizeof sbuf); - if (r >= sizeof sbuf) { -#if 0 /* DEBUG */ - fprintf(stderr, "bug: recompile with MAX_DOS_PATH > %d\n", r); -#endif - ret = path; - } - if (r == 0) { - ret = path; - } else { - ret = sbuf; - } - return ret; -} #endif #if defined(WIN_EX) diff --git a/src/LYUtils.h b/src/LYUtils.h index 575f872c..f009994f 100644 --- a/src/LYUtils.h +++ b/src/LYUtils.h @@ -91,6 +91,7 @@ extern FILE *LYOpenTemp PARAMS((char *result, CONST char *suffix, CONST char *mo extern FILE *LYOpenTempRewrite PARAMS((char *result, CONST char *suffix, CONST char *mode)); extern FILE *LYReopenTemp PARAMS((char *name)); extern char *Current_Dir PARAMS((char * pathname)); +extern char *LYGetHiliteStr PARAMS(( int cur, int count)); extern char *LYLastPathSep PARAMS((CONST char *path)); extern char *LYPathLeaf PARAMS((char * pathname)); extern char *LYSysShell NOPARAMS; @@ -101,6 +102,7 @@ extern int HTCheckForInterrupt NOPARAMS; extern int LYCheckForProxyURL PARAMS((char *filename)); extern int LYConsoleInputFD PARAMS((BOOLEAN need_selectable)); extern int LYCopyFile PARAMS((char *src, char *dst)); +extern int LYGetHilitePos PARAMS(( int cur, int count)); extern int LYRemoveTemp PARAMS((char *name)); extern int LYSystem PARAMS((char *command)); extern int LYValidateOutput PARAMS((char * filename)); @@ -113,6 +115,7 @@ extern void BeginInternalPage PARAMS((FILE *fp0, char *Title, char *HelpURL)); extern void EndInternalPage PARAMS((FILE *fp0)); extern void HTAddSugFilename PARAMS((char *fname)); extern void HTSugFilenames_free NOPARAMS; +extern void LYAddHilite PARAMS((int cur, char *text, int x)); extern void LYAddHtmlSep PARAMS((char **path)); extern void LYAddHtmlSep0 PARAMS((char *path)); extern void LYAddLocalhostAlias PARAMS((char *alias)); @@ -132,6 +135,7 @@ extern void LYFixCursesOn PARAMS((CONST char* reason)); extern void LYLocalFileToURL PARAMS((char **target, CONST char *source)); extern void LYLocalhostAliases_free NOPARAMS; extern void LYRenamedTemp PARAMS((char * oldname, char * newname)); +extern void LYSetHilite PARAMS((int cur, char *text)); extern void LYTrimHtmlSep PARAMS((char *path)); extern void LYTrimPathSep PARAMS((char *path)); extern void LYTrimRelFromAbsPath PARAMS((char *path)); diff --git a/src/LYexit.c b/src/LYexit.c index fbc13160..8341180f 100644 --- a/src/LYexit.c +++ b/src/LYexit.c @@ -166,6 +166,7 @@ PUBLIC void LYexit ARGS1( } LYCloseTracelog(); #endif /* !VMS */ + show_alloc(); exit(status); } diff --git a/src/structdump.h b/src/structdump.h index 03f6e49a..cd64e71a 100644 --- a/src/structdump.h +++ b/src/structdump.h @@ -31,8 +31,10 @@ CTRACE((tfp, "\n" \ "}\n", \ (L), sizeof(*((L))), \ (L)->lname, (L)->lname, (L)->target, (L)->target, \ - (L)->hightext, (L)->hightext, (L)->hightext2, (L)->hightext2, \ - (L)->hightext2_offset, (L)->inUnderline, (L)->lx, (L)->ly, \ + (L)->l_hightext, (L)->l_hightext, \ + (L)->l_hightext2, (L)->l_hightext2, \ + (L)->l_hightext2_offset, \ + (L)->inUnderline, (L)->lx, (L)->ly, \ (L)->type, (L)->anchor_number, (L)->anchor_line_num, (L)->form)); \ }else{ \ CTRACE((tfp, "\n" \ diff --git a/userdefs.h b/userdefs.h index d8112670..3e716793 100644 --- a/userdefs.h +++ b/userdefs.h @@ -1347,11 +1347,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.5" +#define LYNX_VERSION "2.8.5dev.6" #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 "Sun, 18 Nov 2001 17:37:14 -0800" +#define LYNX_DATE "Tue, 01 Jan 2002 17:30:08 -0800" #define LYNX_DATE_OFF 5 /* truncate the automatically-generated date */ #define LYNX_DATE_LEN 11 /* truncate the automatically-generated date */ |