Commit e1f1452e authored by Chris Allegretta's avatar Chris Allegretta
Browse files

General: - New flag -o, --operatingdir, similar to Pico's -o mode. New...

General: - New flag -o, --operatingdir, similar to Pico's -o mode.  New function check_operating_dir(), changes to load_file (arg), open_file_dup_search (arg), new function do_gotopos for -F.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@767 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
No related merge requests found
Showing with 583 additions and 270 deletions
+583 -270
...@@ -6,6 +6,9 @@ CVS code - ...@@ -6,6 +6,9 @@ CVS code -
use a flag instead (just as messy?) use a flag instead (just as messy?)
- --enable-tiny now leaves out the Auto Indent code, do you really - --enable-tiny now leaves out the Auto Indent code, do you really
need that on a bootdisk? =-) need that on a bootdisk? =-)
- New flag -o, --operatingdir, similar to Pico's -o mode. New
function check_operating_dir(), changes to load_file (arg),
open_file_dup_search (arg), new function do_gotopos for -F.
- nano.c: - nano.c:
main() main()
- Added vars oldcurrent and oldcurrent_x to check whether cursor - Added vars oldcurrent and oldcurrent_x to check whether cursor
......
...@@ -54,7 +54,10 @@ ...@@ -54,7 +54,10 @@
/* Define this to disable the mouse functions */ /* Define this to disable the mouse functions */
#undef DISABLE_MOUSE #undef DISABLE_MOUSE
/* Define this to load files upon inserting them, and allow switching between them; this is disabled if NANO_SMALL is defined */ /* Define this to disable setting of the operating directory (chroot of sorts) */
#undef DISABLE_OPERATINGDIR
/* Define this to enable multiple file buffers; this is disabled if NANO_SMALL is defined */
#undef ENABLE_MULTIBUFFER #undef ENABLE_MULTIBUFFER
/* Define this to use the .nanorc file */ /* Define this to use the .nanorc file */
......
...@@ -88,7 +88,10 @@ ...@@ -88,7 +88,10 @@
/* Define this to disable the mouse functions */ /* Define this to disable the mouse functions */
#undef DISABLE_MOUSE #undef DISABLE_MOUSE
/* Define this to load files upon inserting them, and allow switching between them; this is disabled if NANO_SMALL is defined */ /* Define this to disable setting of the operating directory (chroot of sorts) */
#undef DISABLE_OPERATINGDIR
/* Define this to enable multiple file buffers; this is disabled if NANO_SMALL is defined */
#undef ENABLE_MULTIBUFFER #undef ENABLE_MULTIBUFFER
/* Define this to use the .nanorc file */ /* Define this to use the .nanorc file */
......
...@@ -21,7 +21,7 @@ ac_help="$ac_help ...@@ -21,7 +21,7 @@ ac_help="$ac_help
ac_help="$ac_help ac_help="$ac_help
--enable-undo Enable undo support" --enable-undo Enable undo support"
ac_help="$ac_help ac_help="$ac_help
--enable-multibuffer Enable use of file loading on insertion, and switching between loaded files; this is disabled if --enable-tiny is used" --enable-multibuffer Enable multiple file buffers; this is disabled if --enable-tiny is used"
ac_help="$ac_help ac_help="$ac_help
--enable-nanorc Enable use of .nanorc file" --enable-nanorc Enable use of .nanorc file"
ac_help="$ac_help ac_help="$ac_help
...@@ -40,6 +40,8 @@ ac_help="$ac_help ...@@ -40,6 +40,8 @@ ac_help="$ac_help
--disable-wrapping Disable all wrapping of text (and -w flag)" --disable-wrapping Disable all wrapping of text (and -w flag)"
ac_help="$ac_help ac_help="$ac_help
--disable-mouse Disable mouse support (and -m flag)" --disable-mouse Disable mouse support (and -m flag)"
ac_help="$ac_help
--disable-operatingdir Disable setting of operating directory (chroot of sorts)"
ac_help="$ac_help ac_help="$ac_help
--with-slang[=DIR] Use the slang library instead of curses" --with-slang[=DIR] Use the slang library instead of curses"
ac_help="$ac_help ac_help="$ac_help
...@@ -601,7 +603,7 @@ ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. ...@@ -601,7 +603,7 @@ ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh. # ./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 $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
echo "configure:605: checking for a BSD compatible install" >&5 echo "configure:607: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
...@@ -654,7 +656,7 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' ...@@ -654,7 +656,7 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
echo "configure:658: checking whether build environment is sane" >&5 echo "configure:660: checking whether build environment is sane" >&5
# Just in case # Just in case
sleep 1 sleep 1
echo timestamp > conftestfile echo timestamp > conftestfile
...@@ -711,7 +713,7 @@ test "$program_suffix" != NONE && ...@@ -711,7 +713,7 @@ test "$program_suffix" != NONE &&
test "$program_transform_name" = "" && program_transform_name="s,x,x," test "$program_transform_name" = "" && program_transform_name="s,x,x,"
echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
echo "configure:715: checking whether ${MAKE-make} sets \${MAKE}" >&5 echo "configure:717: checking whether ${MAKE-make} sets \${MAKE}" >&5
set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` 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 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
...@@ -757,7 +759,7 @@ EOF ...@@ -757,7 +759,7 @@ EOF
missing_dir=`cd $ac_aux_dir && pwd` missing_dir=`cd $ac_aux_dir && pwd`
echo $ac_n "checking for working aclocal""... $ac_c" 1>&6 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
echo "configure:761: checking for working aclocal" >&5 echo "configure:763: checking for working aclocal" >&5
# Run test in a subshell; some versions of sh will print an error if # Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected. # an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh. # Redirect stdin to placate older versions of autoconf. Sigh.
...@@ -770,7 +772,7 @@ else ...@@ -770,7 +772,7 @@ else
fi fi
echo $ac_n "checking for working autoconf""... $ac_c" 1>&6 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
echo "configure:774: checking for working autoconf" >&5 echo "configure:776: checking for working autoconf" >&5
# Run test in a subshell; some versions of sh will print an error if # Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected. # an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh. # Redirect stdin to placate older versions of autoconf. Sigh.
...@@ -783,7 +785,7 @@ else ...@@ -783,7 +785,7 @@ else
fi fi
echo $ac_n "checking for working automake""... $ac_c" 1>&6 echo $ac_n "checking for working automake""... $ac_c" 1>&6
echo "configure:787: checking for working automake" >&5 echo "configure:789: checking for working automake" >&5
# Run test in a subshell; some versions of sh will print an error if # Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected. # an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh. # Redirect stdin to placate older versions of autoconf. Sigh.
...@@ -796,7 +798,7 @@ else ...@@ -796,7 +798,7 @@ else
fi fi
echo $ac_n "checking for working autoheader""... $ac_c" 1>&6 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
echo "configure:800: checking for working autoheader" >&5 echo "configure:802: checking for working autoheader" >&5
# Run test in a subshell; some versions of sh will print an error if # Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected. # an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh. # Redirect stdin to placate older versions of autoconf. Sigh.
...@@ -809,7 +811,7 @@ else ...@@ -809,7 +811,7 @@ else
fi fi
echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
echo "configure:813: checking for working makeinfo" >&5 echo "configure:815: checking for working makeinfo" >&5
# Run test in a subshell; some versions of sh will print an error if # Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected. # an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh. # Redirect stdin to placate older versions of autoconf. Sigh.
...@@ -830,7 +832,7 @@ ALL_LINGUAS="es de fr it id fi hu ca cs gl uk ru sv no nl da" ...@@ -830,7 +832,7 @@ ALL_LINGUAS="es de fr it id fi hu ca cs gl uk ru sv no nl da"
# Extract the first word of "gcc", so it can be a program name with args. # Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2 set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:834: checking for $ac_word" >&5 echo "configure:836: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -860,7 +862,7 @@ if test -z "$CC"; then ...@@ -860,7 +862,7 @@ if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args. # Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2 set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:864: checking for $ac_word" >&5 echo "configure:866: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -911,7 +913,7 @@ fi ...@@ -911,7 +913,7 @@ fi
# Extract the first word of "cl", so it can be a program name with args. # Extract the first word of "cl", so it can be a program name with args.
set dummy cl; ac_word=$2 set dummy cl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:915: checking for $ac_word" >&5 echo "configure:917: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -943,7 +945,7 @@ fi ...@@ -943,7 +945,7 @@ fi
fi fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
echo "configure:947: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 echo "configure:949: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
ac_ext=c ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
...@@ -954,12 +956,12 @@ cross_compiling=$ac_cv_prog_cc_cross ...@@ -954,12 +956,12 @@ cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext << EOF cat > conftest.$ac_ext << EOF
#line 958 "configure" #line 960 "configure"
#include "confdefs.h" #include "confdefs.h"
main(){return(0);} main(){return(0);}
EOF EOF
if { (eval echo configure:963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:965: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ac_cv_prog_cc_works=yes ac_cv_prog_cc_works=yes
# If we can't run a trivial program, we are probably using a cross compiler. # If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then if (./conftest; exit) 2>/dev/null; then
...@@ -985,12 +987,12 @@ if test $ac_cv_prog_cc_works = no; then ...@@ -985,12 +987,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; } { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
echo "configure:989: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "configure:991: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
echo "configure:994: checking whether we are using GNU C" >&5 echo "configure:996: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -999,7 +1001,7 @@ else ...@@ -999,7 +1001,7 @@ else
yes; yes;
#endif #endif
EOF EOF
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1003: \"$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:1005: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes ac_cv_prog_gcc=yes
else else
ac_cv_prog_gcc=no ac_cv_prog_gcc=no
...@@ -1018,7 +1020,7 @@ ac_test_CFLAGS="${CFLAGS+set}" ...@@ -1018,7 +1020,7 @@ ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS" ac_save_CFLAGS="$CFLAGS"
CFLAGS= CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
echo "configure:1022: checking whether ${CC-cc} accepts -g" >&5 echo "configure:1024: checking whether ${CC-cc} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -1051,7 +1053,7 @@ fi ...@@ -1051,7 +1053,7 @@ fi
echo $ac_n "checking for strerror in -lcposix""... $ac_c" 1>&6 echo $ac_n "checking for strerror in -lcposix""... $ac_c" 1>&6
echo "configure:1055: checking for strerror in -lcposix" >&5 echo "configure:1057: checking for strerror in -lcposix" >&5
ac_lib_var=`echo cposix'_'strerror | sed 'y%./+-%__p_%'` ac_lib_var=`echo cposix'_'strerror | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
...@@ -1059,7 +1061,7 @@ else ...@@ -1059,7 +1061,7 @@ else
ac_save_LIBS="$LIBS" ac_save_LIBS="$LIBS"
LIBS="-lcposix $LIBS" LIBS="-lcposix $LIBS"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1063 "configure" #line 1065 "configure"
#include "confdefs.h" #include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */ /* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2 /* We use char because int might match the return type of a gcc2
...@@ -1070,7 +1072,7 @@ int main() { ...@@ -1070,7 +1072,7 @@ int main() {
strerror() strerror()
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:1074: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:1076: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes" eval "ac_cv_lib_$ac_lib_var=yes"
else else
...@@ -1102,7 +1104,7 @@ fi ...@@ -1102,7 +1104,7 @@ fi
if test "$enable_largefile" != no; then if test "$enable_largefile" != no; then
echo $ac_n "checking for special C compiler options needed for large files""... $ac_c" 1>&6 echo $ac_n "checking for special C compiler options needed for large files""... $ac_c" 1>&6
echo "configure:1106: checking for special C compiler options needed for large files" >&5 echo "configure:1108: checking for special C compiler options needed for large files" >&5
if eval "test \"`echo '$''{'ac_cv_sys_largefile_CC'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_sys_largefile_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -1111,7 +1113,7 @@ else ...@@ -1111,7 +1113,7 @@ else
# IRIX 6.2 and later do not support large files by default, # IRIX 6.2 and later do not support large files by default,
# so use the C compiler's -n32 option if that helps. # so use the C compiler's -n32 option if that helps.
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1115 "configure" #line 1117 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <sys/types.h> #include <sys/types.h>
/* Check that off_t can represent 2**63 - 1 correctly. /* Check that off_t can represent 2**63 - 1 correctly.
...@@ -1127,7 +1129,7 @@ int main() { ...@@ -1127,7 +1129,7 @@ int main() {
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:1131: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then if { (eval echo configure:1133: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
: :
else else
echo "configure: failed program was:" >&5 echo "configure: failed program was:" >&5
...@@ -1136,7 +1138,7 @@ else ...@@ -1136,7 +1138,7 @@ else
ac_save_CC="$CC" ac_save_CC="$CC"
CC="$CC -n32" CC="$CC -n32"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1140 "configure" #line 1142 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <sys/types.h> #include <sys/types.h>
/* Check that off_t can represent 2**63 - 1 correctly. /* Check that off_t can represent 2**63 - 1 correctly.
...@@ -1152,7 +1154,7 @@ int main() { ...@@ -1152,7 +1154,7 @@ int main() {
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:1156: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then if { (eval echo configure:1158: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest* rm -rf conftest*
ac_cv_sys_largefile_CC=' -n32' ac_cv_sys_largefile_CC=' -n32'
else else
...@@ -1172,13 +1174,13 @@ echo "$ac_t""$ac_cv_sys_largefile_CC" 1>&6 ...@@ -1172,13 +1174,13 @@ echo "$ac_t""$ac_cv_sys_largefile_CC" 1>&6
fi fi
echo $ac_n "checking for _FILE_OFFSET_BITS value needed for large files""... $ac_c" 1>&6 echo $ac_n "checking for _FILE_OFFSET_BITS value needed for large files""... $ac_c" 1>&6
echo "configure:1176: checking for _FILE_OFFSET_BITS value needed for large files" >&5 echo "configure:1178: checking for _FILE_OFFSET_BITS value needed for large files" >&5
if eval "test \"`echo '$''{'ac_cv_sys_file_offset_bits'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_sys_file_offset_bits'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
ac_cv_sys_file_offset_bits=no ac_cv_sys_file_offset_bits=no
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1182 "configure" #line 1184 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <sys/types.h> #include <sys/types.h>
/* Check that off_t can represent 2**63 - 1 correctly. /* Check that off_t can represent 2**63 - 1 correctly.
...@@ -1194,14 +1196,14 @@ int main() { ...@@ -1194,14 +1196,14 @@ int main() {
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:1198: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then if { (eval echo configure:1200: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
: :
else else
echo "configure: failed program was:" >&5 echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5 cat conftest.$ac_ext >&5
rm -rf conftest* rm -rf conftest*
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1205 "configure" #line 1207 "configure"
#include "confdefs.h" #include "confdefs.h"
#define _FILE_OFFSET_BITS 64 #define _FILE_OFFSET_BITS 64
#include <sys/types.h> #include <sys/types.h>
...@@ -1219,7 +1221,7 @@ int main() { ...@@ -1219,7 +1221,7 @@ int main() {
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:1223: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then if { (eval echo configure:1225: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest* rm -rf conftest*
ac_cv_sys_file_offset_bits=64 ac_cv_sys_file_offset_bits=64
else else
...@@ -1239,13 +1241,13 @@ EOF ...@@ -1239,13 +1241,13 @@ EOF
fi fi
echo $ac_n "checking for _LARGE_FILES value needed for large files""... $ac_c" 1>&6 echo $ac_n "checking for _LARGE_FILES value needed for large files""... $ac_c" 1>&6
echo "configure:1243: checking for _LARGE_FILES value needed for large files" >&5 echo "configure:1245: checking for _LARGE_FILES value needed for large files" >&5
if eval "test \"`echo '$''{'ac_cv_sys_large_files'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_sys_large_files'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
ac_cv_sys_large_files=no ac_cv_sys_large_files=no
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1249 "configure" #line 1251 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <sys/types.h> #include <sys/types.h>
/* Check that off_t can represent 2**63 - 1 correctly. /* Check that off_t can represent 2**63 - 1 correctly.
...@@ -1261,14 +1263,14 @@ int main() { ...@@ -1261,14 +1263,14 @@ int main() {
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:1265: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then if { (eval echo configure:1267: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
: :
else else
echo "configure: failed program was:" >&5 echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5 cat conftest.$ac_ext >&5
rm -rf conftest* rm -rf conftest*
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1272 "configure" #line 1274 "configure"
#include "confdefs.h" #include "confdefs.h"
#define _LARGE_FILES 1 #define _LARGE_FILES 1
#include <sys/types.h> #include <sys/types.h>
...@@ -1286,7 +1288,7 @@ int main() { ...@@ -1286,7 +1288,7 @@ int main() {
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:1290: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then if { (eval echo configure:1292: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest* rm -rf conftest*
ac_cv_sys_large_files=1 ac_cv_sys_large_files=1
else else
...@@ -1309,7 +1311,7 @@ EOF ...@@ -1309,7 +1311,7 @@ EOF
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
echo "configure:1313: checking how to run the C preprocessor" >&5 echo "configure:1315: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory. # On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then if test -n "$CPP" && test -d "$CPP"; then
CPP= CPP=
...@@ -1324,13 +1326,13 @@ else ...@@ -1324,13 +1326,13 @@ else
# On the NeXT, cc -E runs the code through the compiler's parser, # On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp. # not just through cpp.
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1328 "configure" #line 1330 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <assert.h> #include <assert.h>
Syntax Error Syntax Error
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1334: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:1336: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then if test -z "$ac_err"; then
: :
...@@ -1341,13 +1343,13 @@ else ...@@ -1341,13 +1343,13 @@ else
rm -rf conftest* rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp" CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1345 "configure" #line 1347 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <assert.h> #include <assert.h>
Syntax Error Syntax Error
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1351: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:1353: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then if test -z "$ac_err"; then
: :
...@@ -1358,13 +1360,13 @@ else ...@@ -1358,13 +1360,13 @@ else
rm -rf conftest* rm -rf conftest*
CPP="${CC-cc} -nologo -E" CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1362 "configure" #line 1364 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <assert.h> #include <assert.h>
Syntax Error Syntax Error
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1368: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:1370: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then if test -z "$ac_err"; then
: :
...@@ -1389,12 +1391,12 @@ fi ...@@ -1389,12 +1391,12 @@ fi
echo "$ac_t""$CPP" 1>&6 echo "$ac_t""$CPP" 1>&6
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
echo "configure:1393: checking for ANSI C header files" >&5 echo "configure:1395: checking for ANSI C header files" >&5
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1398 "configure" #line 1400 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <stdlib.h> #include <stdlib.h>
#include <stdarg.h> #include <stdarg.h>
...@@ -1402,7 +1404,7 @@ else ...@@ -1402,7 +1404,7 @@ else
#include <float.h> #include <float.h>
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1406: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:1408: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then if test -z "$ac_err"; then
rm -rf conftest* rm -rf conftest*
...@@ -1419,7 +1421,7 @@ rm -f conftest* ...@@ -1419,7 +1421,7 @@ rm -f conftest*
if test $ac_cv_header_stdc = yes; then if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI. # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1423 "configure" #line 1425 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <string.h> #include <string.h>
EOF EOF
...@@ -1437,7 +1439,7 @@ fi ...@@ -1437,7 +1439,7 @@ fi
if test $ac_cv_header_stdc = yes; then if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1441 "configure" #line 1443 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <stdlib.h> #include <stdlib.h>
EOF EOF
...@@ -1458,7 +1460,7 @@ if test "$cross_compiling" = yes; then ...@@ -1458,7 +1460,7 @@ if test "$cross_compiling" = yes; then
: :
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1462 "configure" #line 1464 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <ctype.h> #include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z') #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
...@@ -1469,7 +1471,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); ...@@ -1469,7 +1471,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); } exit (0); }
EOF EOF
if { (eval echo configure:1473: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null if { (eval echo configure:1475: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then then
: :
else else
...@@ -1496,17 +1498,17 @@ for ac_hdr in fcntl.h unistd.h malloc.h termios.h termio.h limits.h getopt.h reg ...@@ -1496,17 +1498,17 @@ for ac_hdr in fcntl.h unistd.h malloc.h termios.h termio.h limits.h getopt.h reg
do do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:1500: checking for $ac_hdr" >&5 echo "configure:1502: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1505 "configure" #line 1507 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <$ac_hdr> #include <$ac_hdr>
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1510: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:1512: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then if test -z "$ac_err"; then
rm -rf conftest* rm -rf conftest*
...@@ -1565,6 +1567,10 @@ EOF ...@@ -1565,6 +1567,10 @@ EOF
#define DISABLE_MOUSE 1 #define DISABLE_MOUSE 1
EOF EOF
cat >> confdefs.h <<\EOF
#define DISABLE_OPERATINGDIR 1
EOF
fi fi
fi fi
...@@ -1732,8 +1738,20 @@ EOF ...@@ -1732,8 +1738,20 @@ EOF
fi fi
# Check whether --enable-operatingdir or --disable-operatingdir was given.
if test "${enable_operatingdir+set}" = set; then
enableval="$enable_operatingdir"
if test x$enableval != xyes; then
cat >> confdefs.h <<\EOF
#define DISABLE_OPERATINGDIR 1
EOF
fi
fi
echo $ac_n "checking whether to use slang""... $ac_c" 1>&6 echo $ac_n "checking whether to use slang""... $ac_c" 1>&6
echo "configure:1737: checking whether to use slang" >&5 echo "configure:1755: checking whether to use slang" >&5
CURSES_LIB_NAME="" CURSES_LIB_NAME=""
# Check whether --with-slang or --without-slang was given. # Check whether --with-slang or --without-slang was given.
if test "${with_slang+set}" = set; then if test "${with_slang+set}" = set; then
...@@ -1753,17 +1771,17 @@ if test "${with_slang+set}" = set; then ...@@ -1753,17 +1771,17 @@ if test "${with_slang+set}" = set; then
ac_safe=`echo "slcurses.h" | sed 'y%./+-%__p_%'` ac_safe=`echo "slcurses.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for slcurses.h""... $ac_c" 1>&6 echo $ac_n "checking for slcurses.h""... $ac_c" 1>&6
echo "configure:1757: checking for slcurses.h" >&5 echo "configure:1775: checking for slcurses.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1762 "configure" #line 1780 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <slcurses.h> #include <slcurses.h>
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1767: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:1785: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then if test -z "$ac_err"; then
rm -rf conftest* rm -rf conftest*
...@@ -1780,21 +1798,21 @@ fi ...@@ -1780,21 +1798,21 @@ fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&6 echo "$ac_t""yes" 1>&6
echo $ac_n "checking for SLtt_initialize in -lslang""... $ac_c" 1>&6 echo $ac_n "checking for SLtt_initialize in -lslang""... $ac_c" 1>&6
echo "configure:1784: checking for SLtt_initialize in -lslang" >&5 echo "configure:1802: checking for SLtt_initialize in -lslang" >&5
_libs=$LIBS _libs=$LIBS
LIBS="$LIBS -lslang" LIBS="$LIBS -lslang"
if test "$cross_compiling" = yes; then if test "$cross_compiling" = yes; then
echo "configure: warning: *** Can not use slang when cross-compiling" 1>&2 echo "configure: warning: *** Can not use slang when cross-compiling" 1>&2
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1791 "configure" #line 1809 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <stdio.h> #include <stdio.h>
#include <slcurses.h> #include <slcurses.h>
int main () { SLtt_initialize (NULL); return 0; } int main () { SLtt_initialize (NULL); return 0; }
EOF EOF
if { (eval echo configure:1798: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null if { (eval echo configure:1816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then then
echo "$ac_t""yes" 1>&6 echo "$ac_t""yes" 1>&6
cat >> confdefs.h <<\EOF cat >> confdefs.h <<\EOF
...@@ -1817,7 +1835,7 @@ else ...@@ -1817,7 +1835,7 @@ else
# We might need the term library # We might need the term library
for termlib in ncurses curses termcap terminfo termlib; do for termlib in ncurses curses termcap terminfo termlib; do
echo $ac_n "checking for tputs in -l${termlib}""... $ac_c" 1>&6 echo $ac_n "checking for tputs in -l${termlib}""... $ac_c" 1>&6
echo "configure:1821: checking for tputs in -l${termlib}" >&5 echo "configure:1839: checking for tputs in -l${termlib}" >&5
ac_lib_var=`echo ${termlib}'_'tputs | sed 'y%./+-%__p_%'` ac_lib_var=`echo ${termlib}'_'tputs | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
...@@ -1825,7 +1843,7 @@ else ...@@ -1825,7 +1843,7 @@ else
ac_save_LIBS="$LIBS" ac_save_LIBS="$LIBS"
LIBS="-l${termlib} $LIBS" LIBS="-l${termlib} $LIBS"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1829 "configure" #line 1847 "configure"
#include "confdefs.h" #include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */ /* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2 /* We use char because int might match the return type of a gcc2
...@@ -1836,7 +1854,7 @@ int main() { ...@@ -1836,7 +1854,7 @@ int main() {
tputs() tputs()
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:1840: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:1858: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes" eval "ac_cv_lib_$ac_lib_var=yes"
else else
...@@ -1860,20 +1878,20 @@ fi ...@@ -1860,20 +1878,20 @@ fi
done done
echo $ac_n "checking for SLtt_initialize in -lslang $tcap""... $ac_c" 1>&6 echo $ac_n "checking for SLtt_initialize in -lslang $tcap""... $ac_c" 1>&6
echo "configure:1864: checking for SLtt_initialize in -lslang $tcap" >&5 echo "configure:1882: checking for SLtt_initialize in -lslang $tcap" >&5
LIBS="$LIBS $tcap" LIBS="$LIBS $tcap"
if test "$cross_compiling" = yes; then if test "$cross_compiling" = yes; then
echo "configure: warning: *** Can not use slang when cross-compiling" 1>&2 echo "configure: warning: *** Can not use slang when cross-compiling" 1>&2
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1870 "configure" #line 1888 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <stdio.h> #include <stdio.h>
#include <slcurses.h> #include <slcurses.h>
int main () { SLtt_initialize (NULL); return 0; } int main () { SLtt_initialize (NULL); return 0; }
EOF EOF
if { (eval echo configure:1877: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null if { (eval echo configure:1895: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then then
echo "$ac_t""yes" 1>&6 echo "$ac_t""yes" 1>&6
cat >> confdefs.h <<\EOF cat >> confdefs.h <<\EOF
...@@ -1895,20 +1913,20 @@ else ...@@ -1895,20 +1913,20 @@ else
echo "$ac_t""no" 1>&6 echo "$ac_t""no" 1>&6
# We might need the math library # We might need the math library
echo $ac_n "checking for SLtt_initialize in -lslang $tcap -lm""... $ac_c" 1>&6 echo $ac_n "checking for SLtt_initialize in -lslang $tcap -lm""... $ac_c" 1>&6
echo "configure:1899: checking for SLtt_initialize in -lslang $tcap -lm" >&5 echo "configure:1917: checking for SLtt_initialize in -lslang $tcap -lm" >&5
LIBS="$LIBS -lm" LIBS="$LIBS -lm"
if test "$cross_compiling" = yes; then if test "$cross_compiling" = yes; then
echo "configure: warning: *** Can not use slang when cross-compiling" 1>&2 echo "configure: warning: *** Can not use slang when cross-compiling" 1>&2
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1905 "configure" #line 1923 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <stdio.h> #include <stdio.h>
#include <slcurses.h> #include <slcurses.h>
int main () { SLtt_initialize (NULL); return 0; } int main () { SLtt_initialize (NULL); return 0; }
EOF EOF
if { (eval echo configure:1912: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null if { (eval echo configure:1930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then then
echo "$ac_t""yes" 1>&6 echo "$ac_t""yes" 1>&6
cat >> confdefs.h <<\EOF cat >> confdefs.h <<\EOF
...@@ -1965,12 +1983,12 @@ fi ...@@ -1965,12 +1983,12 @@ fi
for ac_func in snprintf vsnprintf for ac_func in snprintf vsnprintf
do do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:1969: checking for $ac_func" >&5 echo "configure:1987: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1974 "configure" #line 1992 "configure"
#include "confdefs.h" #include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes, /* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */ which can conflict with char $ac_func(); below. */
...@@ -1993,7 +2011,7 @@ $ac_func(); ...@@ -1993,7 +2011,7 @@ $ac_func();
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:1997: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:2015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_func_$ac_func=yes" eval "ac_cv_func_$ac_func=yes"
else else
...@@ -2072,7 +2090,7 @@ fi ...@@ -2072,7 +2090,7 @@ fi
# Extract the first word of "glib-config", so it can be a program name with args. # Extract the first word of "glib-config", so it can be a program name with args.
set dummy glib-config; ac_word=$2 set dummy glib-config; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2076: checking for $ac_word" >&5 echo "configure:2094: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GLIB_CONFIG'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_path_GLIB_CONFIG'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -2107,7 +2125,7 @@ fi ...@@ -2107,7 +2125,7 @@ fi
min_glib_version=1.2.4 min_glib_version=1.2.4
echo $ac_n "checking for GLIB - version >= $min_glib_version""... $ac_c" 1>&6 echo $ac_n "checking for GLIB - version >= $min_glib_version""... $ac_c" 1>&6
echo "configure:2111: checking for GLIB - version >= $min_glib_version" >&5 echo "configure:2129: checking for GLIB - version >= $min_glib_version" >&5
no_glib="" no_glib=""
if test "$GLIB_CONFIG" = "no" ; then if test "$GLIB_CONFIG" = "no" ; then
no_glib=yes no_glib=yes
...@@ -2130,7 +2148,7 @@ echo "configure:2111: checking for GLIB - version >= $min_glib_version" >&5 ...@@ -2130,7 +2148,7 @@ echo "configure:2111: checking for GLIB - version >= $min_glib_version" >&5
echo $ac_n "cross compiling; assumed OK... $ac_c" echo $ac_n "cross compiling; assumed OK... $ac_c"
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 2134 "configure" #line 2152 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <glib.h> #include <glib.h>
...@@ -2206,7 +2224,7 @@ main () ...@@ -2206,7 +2224,7 @@ main ()
} }
EOF EOF
if { (eval echo configure:2210: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null if { (eval echo configure:2228: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then then
: :
else else
...@@ -2240,7 +2258,7 @@ fi ...@@ -2240,7 +2258,7 @@ fi
CFLAGS="$CFLAGS $GLIB_CFLAGS" CFLAGS="$CFLAGS $GLIB_CFLAGS"
LIBS="$LIBS $GLIB_LIBS" LIBS="$LIBS $GLIB_LIBS"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 2244 "configure" #line 2262 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <glib.h> #include <glib.h>
...@@ -2250,7 +2268,7 @@ int main() { ...@@ -2250,7 +2268,7 @@ int main() {
return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); return ((glib_major_version) || (glib_minor_version) || (glib_micro_version));
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:2254: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:2272: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
echo "*** The test program compiled, but did not run. This usually means" echo "*** The test program compiled, but did not run. This usually means"
echo "*** that the run-time linker is not finding GLIB or finding the wrong" echo "*** that the run-time linker is not finding GLIB or finding the wrong"
...@@ -2297,12 +2315,12 @@ fi ...@@ -2297,12 +2315,12 @@ fi
echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
echo "configure:2301: checking return type of signal handlers" >&5 echo "configure:2319: checking return type of signal handlers" >&5
if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 2306 "configure" #line 2324 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <sys/types.h> #include <sys/types.h>
#include <signal.h> #include <signal.h>
...@@ -2319,7 +2337,7 @@ int main() { ...@@ -2319,7 +2337,7 @@ int main() {
int i; int i;
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:2323: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then if { (eval echo configure:2341: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest* rm -rf conftest*
ac_cv_type_signal=void ac_cv_type_signal=void
else else
...@@ -2338,12 +2356,12 @@ EOF ...@@ -2338,12 +2356,12 @@ EOF
echo $ac_n "checking for vprintf""... $ac_c" 1>&6 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
echo "configure:2342: checking for vprintf" >&5 echo "configure:2360: checking for vprintf" >&5
if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 2347 "configure" #line 2365 "configure"
#include "confdefs.h" #include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes, /* System header to define __stub macros and hopefully few prototypes,
which can conflict with char vprintf(); below. */ which can conflict with char vprintf(); below. */
...@@ -2366,7 +2384,7 @@ vprintf(); ...@@ -2366,7 +2384,7 @@ vprintf();
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:2370: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:2388: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_func_vprintf=yes" eval "ac_cv_func_vprintf=yes"
else else
...@@ -2390,12 +2408,12 @@ fi ...@@ -2390,12 +2408,12 @@ fi
if test "$ac_cv_func_vprintf" != yes; then if test "$ac_cv_func_vprintf" != yes; then
echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
echo "configure:2394: checking for _doprnt" >&5 echo "configure:2412: checking for _doprnt" >&5
if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 2399 "configure" #line 2417 "configure"
#include "confdefs.h" #include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes, /* System header to define __stub macros and hopefully few prototypes,
which can conflict with char _doprnt(); below. */ which can conflict with char _doprnt(); below. */
...@@ -2418,7 +2436,7 @@ _doprnt(); ...@@ -2418,7 +2436,7 @@ _doprnt();
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:2422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:2440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_func__doprnt=yes" eval "ac_cv_func__doprnt=yes"
else else
...@@ -2445,12 +2463,12 @@ fi ...@@ -2445,12 +2463,12 @@ fi
for ac_func in getopt_long for ac_func in getopt_long
do do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:2449: checking for $ac_func" >&5 echo "configure:2467: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 2454 "configure" #line 2472 "configure"
#include "confdefs.h" #include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes, /* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */ which can conflict with char $ac_func(); below. */
...@@ -2473,7 +2491,7 @@ $ac_func(); ...@@ -2473,7 +2491,7 @@ $ac_func();
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:2477: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:2495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_func_$ac_func=yes" eval "ac_cv_func_$ac_func=yes"
else else
...@@ -2506,17 +2524,17 @@ then ...@@ -2506,17 +2524,17 @@ then
do do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:2510: checking for $ac_hdr" >&5 echo "configure:2528: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 2515 "configure" #line 2533 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <$ac_hdr> #include <$ac_hdr>
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2520: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:2538: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then if test -z "$ac_err"; then
rm -rf conftest* rm -rf conftest*
...@@ -2543,7 +2561,7 @@ fi ...@@ -2543,7 +2561,7 @@ fi
done done
echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6 echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
echo "configure:2547: checking for tgetent in -lncurses" >&5 echo "configure:2565: checking for tgetent in -lncurses" >&5
ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'` ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
...@@ -2551,7 +2569,7 @@ else ...@@ -2551,7 +2569,7 @@ else
ac_save_LIBS="$LIBS" ac_save_LIBS="$LIBS"
LIBS="-lncurses $LIBS" LIBS="-lncurses $LIBS"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 2555 "configure" #line 2573 "configure"
#include "confdefs.h" #include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */ /* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2 /* We use char because int might match the return type of a gcc2
...@@ -2562,7 +2580,7 @@ int main() { ...@@ -2562,7 +2580,7 @@ int main() {
tgetent() tgetent()
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:2566: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:2584: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes" eval "ac_cv_lib_$ac_lib_var=yes"
else else
...@@ -2587,7 +2605,7 @@ fi ...@@ -2587,7 +2605,7 @@ fi
if eval "test x$CURSES_LIB_NAME = x" if eval "test x$CURSES_LIB_NAME = x"
then then
echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6 echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
echo "configure:2591: checking for tgetent in -lcurses" >&5 echo "configure:2609: checking for tgetent in -lcurses" >&5
ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'` ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
...@@ -2595,7 +2613,7 @@ else ...@@ -2595,7 +2613,7 @@ else
ac_save_LIBS="$LIBS" ac_save_LIBS="$LIBS"
LIBS="-lcurses $LIBS" LIBS="-lcurses $LIBS"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 2599 "configure" #line 2617 "configure"
#include "confdefs.h" #include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */ /* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2 /* We use char because int might match the return type of a gcc2
...@@ -2606,7 +2624,7 @@ int main() { ...@@ -2606,7 +2624,7 @@ int main() {
tgetent() tgetent()
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:2610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:2628: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes" eval "ac_cv_lib_$ac_lib_var=yes"
else else
...@@ -2632,7 +2650,7 @@ fi ...@@ -2632,7 +2650,7 @@ fi
if eval "test x$CURSES_LIB_NAME = x" if eval "test x$CURSES_LIB_NAME = x"
then then
echo $ac_n "checking for initscr in -lcurses""... $ac_c" 1>&6 echo $ac_n "checking for initscr in -lcurses""... $ac_c" 1>&6
echo "configure:2636: checking for initscr in -lcurses" >&5 echo "configure:2654: checking for initscr in -lcurses" >&5
ac_lib_var=`echo curses'_'initscr | sed 'y%./+-%__p_%'` ac_lib_var=`echo curses'_'initscr | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
...@@ -2640,7 +2658,7 @@ else ...@@ -2640,7 +2658,7 @@ else
ac_save_LIBS="$LIBS" ac_save_LIBS="$LIBS"
LIBS="-lcurses $LIBS" LIBS="-lcurses $LIBS"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 2644 "configure" #line 2662 "configure"
#include "confdefs.h" #include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */ /* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2 /* We use char because int might match the return type of a gcc2
...@@ -2651,7 +2669,7 @@ int main() { ...@@ -2651,7 +2669,7 @@ int main() {
initscr() initscr()
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:2655: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:2673: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes" eval "ac_cv_lib_$ac_lib_var=yes"
else else
...@@ -2676,7 +2694,7 @@ fi ...@@ -2676,7 +2694,7 @@ fi
if eval "test x$CURSES_LIB_NAME = x" if eval "test x$CURSES_LIB_NAME = x"
then then
echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6 echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
echo "configure:2680: checking for tgetent in -ltermcap" >&5 echo "configure:2698: checking for tgetent in -ltermcap" >&5
ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'` ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
...@@ -2684,7 +2702,7 @@ else ...@@ -2684,7 +2702,7 @@ else
ac_save_LIBS="$LIBS" ac_save_LIBS="$LIBS"
LIBS="-ltermcap $LIBS" LIBS="-ltermcap $LIBS"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 2688 "configure" #line 2706 "configure"
#include "confdefs.h" #include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */ /* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2 /* We use char because int might match the return type of a gcc2
...@@ -2695,7 +2713,7 @@ int main() { ...@@ -2695,7 +2713,7 @@ int main() {
tgetent() tgetent()
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:2699: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:2717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes" eval "ac_cv_lib_$ac_lib_var=yes"
else else
...@@ -2729,7 +2747,7 @@ fi ...@@ -2729,7 +2747,7 @@ fi
echo $ac_n "checking for use_default_colors in -l$CURSES_LIB_NAME""... $ac_c" 1>&6 echo $ac_n "checking for use_default_colors in -l$CURSES_LIB_NAME""... $ac_c" 1>&6
echo "configure:2733: checking for use_default_colors in -l$CURSES_LIB_NAME" >&5 echo "configure:2751: checking for use_default_colors in -l$CURSES_LIB_NAME" >&5
ac_lib_var=`echo $CURSES_LIB_NAME'_'use_default_colors | sed 'y%./+-%__p_%'` ac_lib_var=`echo $CURSES_LIB_NAME'_'use_default_colors | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
...@@ -2737,7 +2755,7 @@ else ...@@ -2737,7 +2755,7 @@ else
ac_save_LIBS="$LIBS" ac_save_LIBS="$LIBS"
LIBS="-l$CURSES_LIB_NAME $LIBS" LIBS="-l$CURSES_LIB_NAME $LIBS"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 2741 "configure" #line 2759 "configure"
#include "confdefs.h" #include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */ /* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2 /* We use char because int might match the return type of a gcc2
...@@ -2748,7 +2766,7 @@ int main() { ...@@ -2748,7 +2766,7 @@ int main() {
use_default_colors() use_default_colors()
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:2752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:2770: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes" eval "ac_cv_lib_$ac_lib_var=yes"
else else
...@@ -2773,7 +2791,7 @@ fi ...@@ -2773,7 +2791,7 @@ fi
if test x$slang_support != xyes; then if test x$slang_support != xyes; then
echo $ac_n "checking for wresize in -l$CURSES_LIB_NAME""... $ac_c" 1>&6 echo $ac_n "checking for wresize in -l$CURSES_LIB_NAME""... $ac_c" 1>&6
echo "configure:2777: checking for wresize in -l$CURSES_LIB_NAME" >&5 echo "configure:2795: checking for wresize in -l$CURSES_LIB_NAME" >&5
ac_lib_var=`echo $CURSES_LIB_NAME'_'wresize | sed 'y%./+-%__p_%'` ac_lib_var=`echo $CURSES_LIB_NAME'_'wresize | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
...@@ -2781,7 +2799,7 @@ else ...@@ -2781,7 +2799,7 @@ else
ac_save_LIBS="$LIBS" ac_save_LIBS="$LIBS"
LIBS="-l$CURSES_LIB_NAME $LIBS" LIBS="-l$CURSES_LIB_NAME $LIBS"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 2785 "configure" #line 2803 "configure"
#include "confdefs.h" #include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */ /* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2 /* We use char because int might match the return type of a gcc2
...@@ -2792,7 +2810,7 @@ int main() { ...@@ -2792,7 +2810,7 @@ int main() {
wresize() wresize()
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:2796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:2814: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes" eval "ac_cv_lib_$ac_lib_var=yes"
else else
...@@ -2816,7 +2834,7 @@ else ...@@ -2816,7 +2834,7 @@ else
fi fi
echo $ac_n "checking for resizeterm in -l$CURSES_LIB_NAME""... $ac_c" 1>&6 echo $ac_n "checking for resizeterm in -l$CURSES_LIB_NAME""... $ac_c" 1>&6
echo "configure:2820: checking for resizeterm in -l$CURSES_LIB_NAME" >&5 echo "configure:2838: checking for resizeterm in -l$CURSES_LIB_NAME" >&5
ac_lib_var=`echo $CURSES_LIB_NAME'_'resizeterm | sed 'y%./+-%__p_%'` ac_lib_var=`echo $CURSES_LIB_NAME'_'resizeterm | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
...@@ -2824,7 +2842,7 @@ else ...@@ -2824,7 +2842,7 @@ else
ac_save_LIBS="$LIBS" ac_save_LIBS="$LIBS"
LIBS="-l$CURSES_LIB_NAME $LIBS" LIBS="-l$CURSES_LIB_NAME $LIBS"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 2828 "configure" #line 2846 "configure"
#include "confdefs.h" #include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */ /* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2 /* We use char because int might match the return type of a gcc2
...@@ -2835,7 +2853,7 @@ int main() { ...@@ -2835,7 +2853,7 @@ int main() {
resizeterm() resizeterm()
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:2839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:2857: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes" eval "ac_cv_lib_$ac_lib_var=yes"
else else
...@@ -2861,12 +2879,12 @@ fi ...@@ -2861,12 +2879,12 @@ fi
# Taken from aumix (can't tell form the variable name?) # Taken from aumix (can't tell form the variable name?)
echo $ac_n "checking for private member _use_keypad in WINDOW""... $ac_c" 1>&6 echo $ac_n "checking for private member _use_keypad in WINDOW""... $ac_c" 1>&6
echo "configure:2865: checking for private member _use_keypad in WINDOW" >&5 echo "configure:2883: checking for private member _use_keypad in WINDOW" >&5
if eval "test \"`echo '$''{'aumix_cv_struct_window_usekeypad'+set}'`\" = set"; then if eval "test \"`echo '$''{'aumix_cv_struct_window_usekeypad'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 2870 "configure" #line 2888 "configure"
#include "confdefs.h" #include "confdefs.h"
#ifdef HAVE_NCURSES_H #ifdef HAVE_NCURSES_H
#include <ncurses.h> #include <ncurses.h>
...@@ -2877,7 +2895,7 @@ int main() { ...@@ -2877,7 +2895,7 @@ int main() {
WINDOW w; w._use_keypad; WINDOW w; w._use_keypad;
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:2881: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then if { (eval echo configure:2899: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest* rm -rf conftest*
aumix_cv_struct_window_usekeypad=yes aumix_cv_struct_window_usekeypad=yes
else else
...@@ -2923,7 +2941,7 @@ fi ...@@ -2923,7 +2941,7 @@ fi
# Extract the first word of "ranlib", so it can be a program name with args. # Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2 set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2927: checking for $ac_word" >&5 echo "configure:2945: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -2951,12 +2969,12 @@ else ...@@ -2951,12 +2969,12 @@ else
fi fi
echo $ac_n "checking for working const""... $ac_c" 1>&6 echo $ac_n "checking for working const""... $ac_c" 1>&6
echo "configure:2955: checking for working const" >&5 echo "configure:2973: checking for working const" >&5
if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 2960 "configure" #line 2978 "configure"
#include "confdefs.h" #include "confdefs.h"
int main() { int main() {
...@@ -3005,7 +3023,7 @@ ccp = (char const *const *) p; ...@@ -3005,7 +3023,7 @@ ccp = (char const *const *) p;
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:3009: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then if { (eval echo configure:3027: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest* rm -rf conftest*
ac_cv_c_const=yes ac_cv_c_const=yes
else else
...@@ -3026,21 +3044,21 @@ EOF ...@@ -3026,21 +3044,21 @@ EOF
fi fi
echo $ac_n "checking for inline""... $ac_c" 1>&6 echo $ac_n "checking for inline""... $ac_c" 1>&6
echo "configure:3030: checking for inline" >&5 echo "configure:3048: checking for inline" >&5
if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
ac_cv_c_inline=no ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do for ac_kw in inline __inline__ __inline; do
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 3037 "configure" #line 3055 "configure"
#include "confdefs.h" #include "confdefs.h"
int main() { int main() {
} $ac_kw foo() { } $ac_kw foo() {
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:3044: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then if { (eval echo configure:3062: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest* rm -rf conftest*
ac_cv_c_inline=$ac_kw; break ac_cv_c_inline=$ac_kw; break
else else
...@@ -3066,12 +3084,12 @@ EOF ...@@ -3066,12 +3084,12 @@ EOF
esac esac
echo $ac_n "checking for off_t""... $ac_c" 1>&6 echo $ac_n "checking for off_t""... $ac_c" 1>&6
echo "configure:3070: checking for off_t" >&5 echo "configure:3088: checking for off_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 3075 "configure" #line 3093 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <sys/types.h> #include <sys/types.h>
#if STDC_HEADERS #if STDC_HEADERS
...@@ -3099,12 +3117,12 @@ EOF ...@@ -3099,12 +3117,12 @@ EOF
fi fi
echo $ac_n "checking for size_t""... $ac_c" 1>&6 echo $ac_n "checking for size_t""... $ac_c" 1>&6
echo "configure:3103: checking for size_t" >&5 echo "configure:3121: checking for size_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 3108 "configure" #line 3126 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <sys/types.h> #include <sys/types.h>
#if STDC_HEADERS #if STDC_HEADERS
...@@ -3134,19 +3152,19 @@ fi ...@@ -3134,19 +3152,19 @@ fi
# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
# for constant arguments. Useless! # for constant arguments. Useless!
echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
echo "configure:3138: checking for working alloca.h" >&5 echo "configure:3156: checking for working alloca.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 3143 "configure" #line 3161 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <alloca.h> #include <alloca.h>
int main() { int main() {
char *p = alloca(2 * sizeof(int)); char *p = alloca(2 * sizeof(int));
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:3150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:3168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
ac_cv_header_alloca_h=yes ac_cv_header_alloca_h=yes
else else
...@@ -3167,12 +3185,12 @@ EOF ...@@ -3167,12 +3185,12 @@ EOF
fi fi
echo $ac_n "checking for alloca""... $ac_c" 1>&6 echo $ac_n "checking for alloca""... $ac_c" 1>&6
echo "configure:3171: checking for alloca" >&5 echo "configure:3189: checking for alloca" >&5
if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 3176 "configure" #line 3194 "configure"
#include "confdefs.h" #include "confdefs.h"
#ifdef __GNUC__ #ifdef __GNUC__
...@@ -3200,7 +3218,7 @@ int main() { ...@@ -3200,7 +3218,7 @@ int main() {
char *p = (char *) alloca(1); char *p = (char *) alloca(1);
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:3204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:3222: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
ac_cv_func_alloca_works=yes ac_cv_func_alloca_works=yes
else else
...@@ -3232,12 +3250,12 @@ EOF ...@@ -3232,12 +3250,12 @@ EOF
echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
echo "configure:3236: checking whether alloca needs Cray hooks" >&5 echo "configure:3254: checking whether alloca needs Cray hooks" >&5
if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 3241 "configure" #line 3259 "configure"
#include "confdefs.h" #include "confdefs.h"
#if defined(CRAY) && ! defined(CRAY2) #if defined(CRAY) && ! defined(CRAY2)
webecray webecray
...@@ -3262,12 +3280,12 @@ echo "$ac_t""$ac_cv_os_cray" 1>&6 ...@@ -3262,12 +3280,12 @@ echo "$ac_t""$ac_cv_os_cray" 1>&6
if test $ac_cv_os_cray = yes; then if test $ac_cv_os_cray = yes; then
for ac_func in _getb67 GETB67 getb67; do for ac_func in _getb67 GETB67 getb67; do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:3266: checking for $ac_func" >&5 echo "configure:3284: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 3271 "configure" #line 3289 "configure"
#include "confdefs.h" #include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes, /* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */ which can conflict with char $ac_func(); below. */
...@@ -3290,7 +3308,7 @@ $ac_func(); ...@@ -3290,7 +3308,7 @@ $ac_func();
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:3294: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:3312: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_func_$ac_func=yes" eval "ac_cv_func_$ac_func=yes"
else else
...@@ -3317,7 +3335,7 @@ done ...@@ -3317,7 +3335,7 @@ done
fi fi
echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
echo "configure:3321: checking stack direction for C alloca" >&5 echo "configure:3339: checking stack direction for C alloca" >&5
if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -3325,7 +3343,7 @@ else ...@@ -3325,7 +3343,7 @@ else
ac_cv_c_stack_direction=0 ac_cv_c_stack_direction=0
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 3329 "configure" #line 3347 "configure"
#include "confdefs.h" #include "confdefs.h"
find_stack_direction () find_stack_direction ()
{ {
...@@ -3344,7 +3362,7 @@ main () ...@@ -3344,7 +3362,7 @@ main ()
exit (find_stack_direction() < 0); exit (find_stack_direction() < 0);
} }
EOF EOF
if { (eval echo configure:3348: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null if { (eval echo configure:3366: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then then
ac_cv_c_stack_direction=1 ac_cv_c_stack_direction=1
else else
...@@ -3369,17 +3387,17 @@ for ac_hdr in unistd.h ...@@ -3369,17 +3387,17 @@ for ac_hdr in unistd.h
do do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:3373: checking for $ac_hdr" >&5 echo "configure:3391: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 3378 "configure" #line 3396 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <$ac_hdr> #include <$ac_hdr>
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:3383: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:3401: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then if test -z "$ac_err"; then
rm -rf conftest* rm -rf conftest*
...@@ -3408,12 +3426,12 @@ done ...@@ -3408,12 +3426,12 @@ done
for ac_func in getpagesize for ac_func in getpagesize
do do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:3412: checking for $ac_func" >&5 echo "configure:3430: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 3417 "configure" #line 3435 "configure"
#include "confdefs.h" #include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes, /* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */ which can conflict with char $ac_func(); below. */
...@@ -3436,7 +3454,7 @@ $ac_func(); ...@@ -3436,7 +3454,7 @@ $ac_func();
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:3440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:3458: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_func_$ac_func=yes" eval "ac_cv_func_$ac_func=yes"
else else
...@@ -3461,7 +3479,7 @@ fi ...@@ -3461,7 +3479,7 @@ fi
done done
echo $ac_n "checking for working mmap""... $ac_c" 1>&6 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
echo "configure:3465: checking for working mmap" >&5 echo "configure:3483: checking for working mmap" >&5
if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -3469,7 +3487,7 @@ else ...@@ -3469,7 +3487,7 @@ else
ac_cv_func_mmap_fixed_mapped=no ac_cv_func_mmap_fixed_mapped=no
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 3473 "configure" #line 3491 "configure"
#include "confdefs.h" #include "confdefs.h"
/* Thanks to Mike Haertel and Jim Avera for this test. /* Thanks to Mike Haertel and Jim Avera for this test.
...@@ -3609,7 +3627,7 @@ main() ...@@ -3609,7 +3627,7 @@ main()
} }
EOF EOF
if { (eval echo configure:3613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null if { (eval echo configure:3631: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then then
ac_cv_func_mmap_fixed_mapped=yes ac_cv_func_mmap_fixed_mapped=yes
else else
...@@ -3637,17 +3655,17 @@ unistd.h sys/param.h ...@@ -3637,17 +3655,17 @@ unistd.h sys/param.h
do do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:3641: checking for $ac_hdr" >&5 echo "configure:3659: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 3646 "configure" #line 3664 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <$ac_hdr> #include <$ac_hdr>
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:3651: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:3669: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then if test -z "$ac_err"; then
rm -rf conftest* rm -rf conftest*
...@@ -3677,12 +3695,12 @@ done ...@@ -3677,12 +3695,12 @@ done
strdup __argz_count __argz_stringify __argz_next strdup __argz_count __argz_stringify __argz_next
do do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:3681: checking for $ac_func" >&5 echo "configure:3699: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 3686 "configure" #line 3704 "configure"
#include "confdefs.h" #include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes, /* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */ which can conflict with char $ac_func(); below. */
...@@ -3705,7 +3723,7 @@ $ac_func(); ...@@ -3705,7 +3723,7 @@ $ac_func();
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:3709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:3727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_func_$ac_func=yes" eval "ac_cv_func_$ac_func=yes"
else else
...@@ -3734,12 +3752,12 @@ done ...@@ -3734,12 +3752,12 @@ done
for ac_func in stpcpy for ac_func in stpcpy
do do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:3738: checking for $ac_func" >&5 echo "configure:3756: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 3743 "configure" #line 3761 "configure"
#include "confdefs.h" #include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes, /* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */ which can conflict with char $ac_func(); below. */
...@@ -3762,7 +3780,7 @@ $ac_func(); ...@@ -3762,7 +3780,7 @@ $ac_func();
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:3766: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:3784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_func_$ac_func=yes" eval "ac_cv_func_$ac_func=yes"
else else
...@@ -3796,19 +3814,19 @@ EOF ...@@ -3796,19 +3814,19 @@ EOF
if test $ac_cv_header_locale_h = yes; then if test $ac_cv_header_locale_h = yes; then
echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6 echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
echo "configure:3800: checking for LC_MESSAGES" >&5 echo "configure:3818: checking for LC_MESSAGES" >&5
if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 3805 "configure" #line 3823 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <locale.h> #include <locale.h>
int main() { int main() {
return LC_MESSAGES return LC_MESSAGES
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:3812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:3830: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
am_cv_val_LC_MESSAGES=yes am_cv_val_LC_MESSAGES=yes
else else
...@@ -3829,7 +3847,7 @@ EOF ...@@ -3829,7 +3847,7 @@ EOF
fi fi
fi fi
echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6 echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
echo "configure:3833: checking whether NLS is requested" >&5 echo "configure:3851: checking whether NLS is requested" >&5
# Check whether --enable-nls or --disable-nls was given. # Check whether --enable-nls or --disable-nls was given.
if test "${enable_nls+set}" = set; then if test "${enable_nls+set}" = set; then
enableval="$enable_nls" enableval="$enable_nls"
...@@ -3867,7 +3885,7 @@ fi ...@@ -3867,7 +3885,7 @@ fi
EOF EOF
echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6 echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
echo "configure:3871: checking whether included gettext is requested" >&5 echo "configure:3889: checking whether included gettext is requested" >&5
# Check whether --with-included-gettext or --without-included-gettext was given. # Check whether --with-included-gettext or --without-included-gettext was given.
if test "${with_included_gettext+set}" = set; then if test "${with_included_gettext+set}" = set; then
withval="$with_included_gettext" withval="$with_included_gettext"
...@@ -3886,17 +3904,17 @@ fi ...@@ -3886,17 +3904,17 @@ fi
ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'` ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for libintl.h""... $ac_c" 1>&6 echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
echo "configure:3890: checking for libintl.h" >&5 echo "configure:3908: checking for libintl.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 3895 "configure" #line 3913 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <libintl.h> #include <libintl.h>
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:3900: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:3918: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then if test -z "$ac_err"; then
rm -rf conftest* rm -rf conftest*
...@@ -3913,19 +3931,19 @@ fi ...@@ -3913,19 +3931,19 @@ fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&6 echo "$ac_t""yes" 1>&6
echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6 echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
echo "configure:3917: checking for gettext in libc" >&5 echo "configure:3935: checking for gettext in libc" >&5
if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 3922 "configure" #line 3940 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <libintl.h> #include <libintl.h>
int main() { int main() {
return (int) gettext ("") return (int) gettext ("")
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:3929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:3947: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
gt_cv_func_gettext_libc=yes gt_cv_func_gettext_libc=yes
else else
...@@ -3941,7 +3959,7 @@ echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6 ...@@ -3941,7 +3959,7 @@ echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
if test "$gt_cv_func_gettext_libc" != "yes"; then if test "$gt_cv_func_gettext_libc" != "yes"; then
echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6 echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
echo "configure:3945: checking for bindtextdomain in -lintl" >&5 echo "configure:3963: checking for bindtextdomain in -lintl" >&5
ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'` ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
...@@ -3949,7 +3967,7 @@ else ...@@ -3949,7 +3967,7 @@ else
ac_save_LIBS="$LIBS" ac_save_LIBS="$LIBS"
LIBS="-lintl $LIBS" LIBS="-lintl $LIBS"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 3953 "configure" #line 3971 "configure"
#include "confdefs.h" #include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */ /* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2 /* We use char because int might match the return type of a gcc2
...@@ -3960,7 +3978,7 @@ int main() { ...@@ -3960,7 +3978,7 @@ int main() {
bindtextdomain() bindtextdomain()
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:3964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:3982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes" eval "ac_cv_lib_$ac_lib_var=yes"
else else
...@@ -3976,7 +3994,7 @@ fi ...@@ -3976,7 +3994,7 @@ fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6 echo "$ac_t""yes" 1>&6
echo $ac_n "checking for gettext in -lintl""... $ac_c" 1>&6 echo $ac_n "checking for gettext in -lintl""... $ac_c" 1>&6
echo "configure:3980: checking for gettext in -lintl" >&5 echo "configure:3998: checking for gettext in -lintl" >&5
ac_lib_var=`echo intl'_'gettext | sed 'y%./+-%__p_%'` ac_lib_var=`echo intl'_'gettext | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
...@@ -3984,7 +4002,7 @@ else ...@@ -3984,7 +4002,7 @@ else
ac_save_LIBS="$LIBS" ac_save_LIBS="$LIBS"
LIBS="-lintl $LIBS" LIBS="-lintl $LIBS"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 3988 "configure" #line 4006 "configure"
#include "confdefs.h" #include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */ /* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2 /* We use char because int might match the return type of a gcc2
...@@ -3995,7 +4013,7 @@ int main() { ...@@ -3995,7 +4013,7 @@ int main() {
gettext() gettext()
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:3999: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:4017: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes" eval "ac_cv_lib_$ac_lib_var=yes"
else else
...@@ -4037,7 +4055,7 @@ EOF ...@@ -4037,7 +4055,7 @@ EOF
# Extract the first word of "msgfmt", so it can be a program name with args. # Extract the first word of "msgfmt", so it can be a program name with args.
set dummy msgfmt; ac_word=$2 set dummy msgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:4041: checking for $ac_word" >&5 echo "configure:4059: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -4071,12 +4089,12 @@ fi ...@@ -4071,12 +4089,12 @@ fi
for ac_func in dcgettext for ac_func in dcgettext
do do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:4075: checking for $ac_func" >&5 echo "configure:4093: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 4080 "configure" #line 4098 "configure"
#include "confdefs.h" #include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes, /* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */ which can conflict with char $ac_func(); below. */
...@@ -4099,7 +4117,7 @@ $ac_func(); ...@@ -4099,7 +4117,7 @@ $ac_func();
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:4103: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:4121: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_func_$ac_func=yes" eval "ac_cv_func_$ac_func=yes"
else else
...@@ -4126,7 +4144,7 @@ done ...@@ -4126,7 +4144,7 @@ done
# Extract the first word of "gmsgfmt", so it can be a program name with args. # Extract the first word of "gmsgfmt", so it can be a program name with args.
set dummy gmsgfmt; ac_word=$2 set dummy gmsgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:4130: checking for $ac_word" >&5 echo "configure:4148: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -4162,7 +4180,7 @@ fi ...@@ -4162,7 +4180,7 @@ fi
# Extract the first word of "xgettext", so it can be a program name with args. # Extract the first word of "xgettext", so it can be a program name with args.
set dummy xgettext; ac_word=$2 set dummy xgettext; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:4166: checking for $ac_word" >&5 echo "configure:4184: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -4194,7 +4212,7 @@ else ...@@ -4194,7 +4212,7 @@ else
fi fi
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 4198 "configure" #line 4216 "configure"
#include "confdefs.h" #include "confdefs.h"
int main() { int main() {
...@@ -4202,7 +4220,7 @@ extern int _nl_msg_cat_cntr; ...@@ -4202,7 +4220,7 @@ extern int _nl_msg_cat_cntr;
return _nl_msg_cat_cntr return _nl_msg_cat_cntr
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:4206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:4224: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
CATOBJEXT=.gmo CATOBJEXT=.gmo
DATADIRNAME=share DATADIRNAME=share
...@@ -4225,7 +4243,7 @@ fi ...@@ -4225,7 +4243,7 @@ fi
if test "$CATOBJEXT" = "NONE"; then if test "$CATOBJEXT" = "NONE"; then
echo $ac_n "checking whether catgets can be used""... $ac_c" 1>&6 echo $ac_n "checking whether catgets can be used""... $ac_c" 1>&6
echo "configure:4229: checking whether catgets can be used" >&5 echo "configure:4247: checking whether catgets can be used" >&5
# Check whether --with-catgets or --without-catgets was given. # Check whether --with-catgets or --without-catgets was given.
if test "${with_catgets+set}" = set; then if test "${with_catgets+set}" = set; then
withval="$with_catgets" withval="$with_catgets"
...@@ -4238,7 +4256,7 @@ fi ...@@ -4238,7 +4256,7 @@ fi
if test "$nls_cv_use_catgets" = "yes"; then if test "$nls_cv_use_catgets" = "yes"; then
echo $ac_n "checking for main in -li""... $ac_c" 1>&6 echo $ac_n "checking for main in -li""... $ac_c" 1>&6
echo "configure:4242: checking for main in -li" >&5 echo "configure:4260: checking for main in -li" >&5
ac_lib_var=`echo i'_'main | sed 'y%./+-%__p_%'` ac_lib_var=`echo i'_'main | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
...@@ -4246,14 +4264,14 @@ else ...@@ -4246,14 +4264,14 @@ else
ac_save_LIBS="$LIBS" ac_save_LIBS="$LIBS"
LIBS="-li $LIBS" LIBS="-li $LIBS"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 4250 "configure" #line 4268 "configure"
#include "confdefs.h" #include "confdefs.h"
int main() { int main() {
main() main()
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:4257: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:4275: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes" eval "ac_cv_lib_$ac_lib_var=yes"
else else
...@@ -4281,12 +4299,12 @@ else ...@@ -4281,12 +4299,12 @@ else
fi fi
echo $ac_n "checking for catgets""... $ac_c" 1>&6 echo $ac_n "checking for catgets""... $ac_c" 1>&6
echo "configure:4285: checking for catgets" >&5 echo "configure:4303: checking for catgets" >&5
if eval "test \"`echo '$''{'ac_cv_func_catgets'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_func_catgets'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 4290 "configure" #line 4308 "configure"
#include "confdefs.h" #include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes, /* System header to define __stub macros and hopefully few prototypes,
which can conflict with char catgets(); below. */ which can conflict with char catgets(); below. */
...@@ -4309,7 +4327,7 @@ catgets(); ...@@ -4309,7 +4327,7 @@ catgets();
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:4313: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:4331: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_func_catgets=yes" eval "ac_cv_func_catgets=yes"
else else
...@@ -4331,7 +4349,7 @@ EOF ...@@ -4331,7 +4349,7 @@ EOF
# Extract the first word of "gencat", so it can be a program name with args. # Extract the first word of "gencat", so it can be a program name with args.
set dummy gencat; ac_word=$2 set dummy gencat; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:4335: checking for $ac_word" >&5 echo "configure:4353: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GENCAT'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_path_GENCAT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -4367,7 +4385,7 @@ fi ...@@ -4367,7 +4385,7 @@ fi
# Extract the first word of "gmsgfmt", so it can be a program name with args. # Extract the first word of "gmsgfmt", so it can be a program name with args.
set dummy gmsgfmt; ac_word=$2 set dummy gmsgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:4371: checking for $ac_word" >&5 echo "configure:4389: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -4404,7 +4422,7 @@ fi ...@@ -4404,7 +4422,7 @@ fi
# Extract the first word of "msgfmt", so it can be a program name with args. # Extract the first word of "msgfmt", so it can be a program name with args.
set dummy msgfmt; ac_word=$2 set dummy msgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:4408: checking for $ac_word" >&5 echo "configure:4426: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -4439,7 +4457,7 @@ fi ...@@ -4439,7 +4457,7 @@ fi
# Extract the first word of "xgettext", so it can be a program name with args. # Extract the first word of "xgettext", so it can be a program name with args.
set dummy xgettext; ac_word=$2 set dummy xgettext; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:4443: checking for $ac_word" >&5 echo "configure:4461: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -4497,7 +4515,7 @@ fi ...@@ -4497,7 +4515,7 @@ fi
# Extract the first word of "msgfmt", so it can be a program name with args. # Extract the first word of "msgfmt", so it can be a program name with args.
set dummy msgfmt; ac_word=$2 set dummy msgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:4501: checking for $ac_word" >&5 echo "configure:4519: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -4531,7 +4549,7 @@ fi ...@@ -4531,7 +4549,7 @@ fi
# Extract the first word of "gmsgfmt", so it can be a program name with args. # Extract the first word of "gmsgfmt", so it can be a program name with args.
set dummy gmsgfmt; ac_word=$2 set dummy gmsgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:4535: checking for $ac_word" >&5 echo "configure:4553: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -4567,7 +4585,7 @@ fi ...@@ -4567,7 +4585,7 @@ fi
# Extract the first word of "xgettext", so it can be a program name with args. # Extract the first word of "xgettext", so it can be a program name with args.
set dummy xgettext; ac_word=$2 set dummy xgettext; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:4571: checking for $ac_word" >&5 echo "configure:4589: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
...@@ -4664,7 +4682,7 @@ fi ...@@ -4664,7 +4682,7 @@ fi
LINGUAS= LINGUAS=
else else
echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6 echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
echo "configure:4668: checking for catalogs to be installed" >&5 echo "configure:4686: checking for catalogs to be installed" >&5
NEW_LINGUAS= NEW_LINGUAS=
for lang in ${LINGUAS=$ALL_LINGUAS}; do for lang in ${LINGUAS=$ALL_LINGUAS}; do
case "$ALL_LINGUAS" in case "$ALL_LINGUAS" in
...@@ -4692,17 +4710,17 @@ echo "configure:4668: checking for catalogs to be installed" >&5 ...@@ -4692,17 +4710,17 @@ echo "configure:4668: checking for catalogs to be installed" >&5
if test "$CATOBJEXT" = ".cat"; then if test "$CATOBJEXT" = ".cat"; then
ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'` ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6 echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
echo "configure:4696: checking for linux/version.h" >&5 echo "configure:4714: checking for linux/version.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 4701 "configure" #line 4719 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <linux/version.h> #include <linux/version.h>
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:4706: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:4724: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then if test -z "$ac_err"; then
rm -rf conftest* rm -rf conftest*
......
...@@ -26,6 +26,7 @@ AC_ARG_ENABLE(tiny, ...@@ -26,6 +26,7 @@ AC_ARG_ENABLE(tiny,
AC_DEFINE(DISABLE_JUSTIFY) AC_DEFINE(DISABLE_JUSTIFY)
AC_DEFINE(DISABLE_BROWSER) AC_DEFINE(DISABLE_BROWSER)
AC_DEFINE(DISABLE_MOUSE) AC_DEFINE(DISABLE_MOUSE)
AC_DEFINE(DISABLE_OPERATINGDIR)
fi]) fi])
AC_ARG_ENABLE(extra, AC_ARG_ENABLE(extra,
...@@ -43,7 +44,7 @@ AC_ARG_ENABLE(undo, ...@@ -43,7 +44,7 @@ AC_ARG_ENABLE(undo,
fi]) fi])
AC_ARG_ENABLE(multibuffer, AC_ARG_ENABLE(multibuffer,
[ --enable-multibuffer Enable use of file loading on insertion, and switching between loaded files; this is disabled if --enable-tiny is used], [ --enable-multibuffer Enable multiple file buffers; this is disabled if --enable-tiny is used],
[if test x$enableval = xyes && test x$tiny_support != xyes; then [if test x$enableval = xyes && test x$tiny_support != xyes; then
AC_DEFINE(ENABLE_MULTIBUFFER) multibuffer_support=yes AC_DEFINE(ENABLE_MULTIBUFFER) multibuffer_support=yes
fi]) fi])
...@@ -110,6 +111,12 @@ AC_ARG_ENABLE(mouse, ...@@ -110,6 +111,12 @@ AC_ARG_ENABLE(mouse,
AC_DEFINE(DISABLE_MOUSE) AC_DEFINE(DISABLE_MOUSE)
fi]) fi])
AC_ARG_ENABLE(operatingdir,
[ --disable-operatingdir Disable setting of operating directory (chroot of sorts)],
[if test x$enableval != xyes; then
AC_DEFINE(DISABLE_OPERATINGDIR)
fi])
AC_MSG_CHECKING([whether to use slang]) AC_MSG_CHECKING([whether to use slang])
CURSES_LIB_NAME="" CURSES_LIB_NAME=""
AC_ARG_WITH(slang, AC_ARG_WITH(slang,
......
...@@ -44,16 +44,20 @@ ...@@ -44,16 +44,20 @@
#endif #endif
/* Load file into edit buffer - takes data from file struct */ /* Load file into edit buffer - takes data from file struct */
void load_file(void) void load_file(int quiet)
{ {
current = fileage; current = fileage;
#ifdef ENABLE_MULTIBUFFER #ifdef ENABLE_MULTIBUFFER
/* add a new entry to the open_files structure, and check for /* if quiet is zero, add a new entry to the open_files structure, and
duplicate entries; if a duplicate entry was found, reload the do duplicate checking; otherwise, update the current entry and
currently open file (it may have been changed during duplicate don't do duplicate checking (the latter is needed in the case of
handling) */ the alternate spell checker); if a duplicate entry was found,
if (add_open_file(0, 1) == 2) reload the currently open file (it may have been changed during
duplicate handling) */
if (quiet != 0)
quiet = 1;
if (add_open_file(quiet, 1 - quiet) == 2)
load_open_file(); load_open_file();
#endif #endif
...@@ -79,8 +83,8 @@ void new_file(void) ...@@ -79,8 +83,8 @@ void new_file(void)
/* if there aren't any entries in open_files, create the entry for /* if there aren't any entries in open_files, create the entry for
this new file, and, of course, don't bother checking for this new file, and, of course, don't bother checking for
duplicates; without this, if nano is started without a filename on duplicates; without this, if nano is started without a filename on
the command line, a new file with no name will be created, but it the command line, a new file will be created, but it will be given
will be given no open_files entry, leading to problems later on */ no open_files entry, leading to problems later on */
if (!open_files) if (!open_files)
add_open_file(0, 0); add_open_file(0, 0);
#endif #endif
...@@ -149,7 +153,7 @@ filestruct *read_line(char *buf, filestruct * prev, int *line1ins) ...@@ -149,7 +153,7 @@ filestruct *read_line(char *buf, filestruct * prev, int *line1ins)
} }
int read_file(int fd, char *filename) int read_file(int fd, char *filename, int quiet)
{ {
long size, num_lines = 0, linetemp = 0; long size, num_lines = 0, linetemp = 0;
char input[2]; /* buffer */ char input[2]; /* buffer */
...@@ -220,7 +224,7 @@ int read_file(int fd, char *filename) ...@@ -220,7 +224,7 @@ int read_file(int fd, char *filename)
totsize--; totsize--;
/* Update the edit buffer */ /* Update the edit buffer */
load_file(); load_file(quiet);
} }
statusbar(_("Read %d lines"), num_lines); statusbar(_("Read %d lines"), num_lines);
totlines += num_lines; totlines += num_lines;
...@@ -262,13 +266,14 @@ int open_file(char *filename, int insert, int quiet) ...@@ -262,13 +266,14 @@ int open_file(char *filename, int insert, int quiet)
/* Don't open character or block files. Sorry, /dev/sndstat! */ /* Don't open character or block files. Sorry, /dev/sndstat! */
statusbar(_("File \"%s\" is a device file"), filename); statusbar(_("File \"%s\" is a device file"), filename);
if (!insert) if (!insert)
new_file(); new_file();
return -1; return -1;
} }
if (!quiet) if (!quiet)
statusbar(_("Reading File")); statusbar(_("Reading File"));
read_file(fd, filename); read_file(fd, filename, quiet);
} }
return 1; return 1;
...@@ -319,6 +324,15 @@ int do_insertfile(int loading_file) ...@@ -319,6 +324,15 @@ int do_insertfile(int loading_file)
} }
#endif #endif
#ifndef DISABLE_OPERATINGDIR
if (operating_dir) {
if (check_operating_dir(realname, 0)) {
statusbar(_("Can't insert file from outside of %s"), operating_dir);
return 0;
}
}
#endif
#ifdef ENABLE_MULTIBUFFER #ifdef ENABLE_MULTIBUFFER
if (loading_file) { if (loading_file) {
...@@ -346,7 +360,7 @@ int do_insertfile(int loading_file) ...@@ -346,7 +360,7 @@ int do_insertfile(int loading_file)
#ifdef ENABLE_MULTIBUFFER #ifdef ENABLE_MULTIBUFFER
if (loading_file) if (loading_file)
load_file(); load_file(0);
else else
#endif #endif
...@@ -475,9 +489,7 @@ int add_open_file(int update, int dup_fix) ...@@ -475,9 +489,7 @@ int add_open_file(int update, int dup_fix)
while (current->prev) while (current->prev)
current = current->prev; current = current->prev;
open_files->file = copy_filestruct(current); open_files->file = copy_filestruct(current);
do_gotoline(open_files->lineno, 1); do_gotopos(open_files->lineno, open_files->file_current_x, open_files->file_current_y, open_files->file_placewewant);
placewewant = open_files->file_placewewant;
update_line(current, current_x);
/* save current modification status */ /* save current modification status */
open_files->file_modified = ISSET(MODIFIED); open_files->file_modified = ISSET(MODIFIED);
...@@ -525,13 +537,9 @@ int load_open_file(void) ...@@ -525,13 +537,9 @@ int load_open_file(void)
totlines = open_files->file_totlines; totlines = open_files->file_totlines;
totsize = open_files->file_totsize; totsize = open_files->file_totsize;
/* since do_gotoline() resets the x-coordinate but not the /* restore full file position: line number, x-coordinate, y-
y-coordinate, set all coordinates up this way */ coordinate, place we want */
current_y = open_files->file_current_y; do_gotopos(open_files->lineno, open_files->file_current_x, open_files->file_current_y, open_files->file_placewewant);
do_gotoline(open_files->lineno, 1);
current_x = open_files->file_current_x;
placewewant = open_files->file_placewewant;
update_line(current, current_x);
/* set up modification status and update the titlebar */ /* set up modification status and update the titlebar */
if (open_files->file_modified) if (open_files->file_modified)
...@@ -556,7 +564,7 @@ int load_open_file(void) ...@@ -556,7 +564,7 @@ int load_open_file(void)
* *
* Note: This should only be called inside open_file_dup_fix(). * Note: This should only be called inside open_file_dup_fix().
*/ */
filestruct *open_file_dup_search(void) filestruct *open_file_dup_search(int update)
{ {
filestruct *tmp; filestruct *tmp;
char *path; char *path;
...@@ -582,9 +590,18 @@ filestruct *open_file_dup_search(void) ...@@ -582,9 +590,18 @@ filestruct *open_file_dup_search(void)
if (!strcmp(tmp->file_path, path)) { if (!strcmp(tmp->file_path, path)) {
/* if it's not the current entry, we've found a duplicate */ if (!update)
if (tmp != open_files) /* if we're making a new entry and there's an entry with
the same full path, we've found a duplicate */
return tmp; return tmp;
else {
/* if we're updating an existing entry and there's an
entry with the same full path that isn't the current
entry, we've found a duplicate */
if (tmp != open_files)
return tmp;
}
} }
/* go to the next entry */ /* go to the next entry */
...@@ -602,7 +619,7 @@ filestruct *open_file_dup_search(void) ...@@ -602,7 +619,7 @@ filestruct *open_file_dup_search(void)
*/ */
int open_file_dup_fix(int update) int open_file_dup_fix(int update)
{ {
filestruct *tmp = open_file_dup_search(); filestruct *tmp = open_file_dup_search(update);
if (!tmp) if (!tmp)
return 0; return 0;
...@@ -766,17 +783,25 @@ int close_open_file(void) ...@@ -766,17 +783,25 @@ int close_open_file(void)
display_main_list(); display_main_list();
return 0; return 0;
} }
#endif
#if defined (ENABLE_MULTIBUFFER) || !defined (DISABLE_OPERATINGDIR)
/* /*
* When passed "[relative path][filename]" in origpath, return "[full * When passed "[relative path]" or "[relative path][filename]" in
* path][filename]" on success, or NULL on error. * origpath, return "[full path]" or "[full path][filename]" on success,
* or NULL on error. This is still done if the file doesn't exist but
* the relative path does (since the file could exist in memory but not
* yet on disk); it is not done if the relative path doesn't exist (since
* the first call to chdir() will fail then).
*/ */
char *get_full_path(const char *origpath) char *get_full_path(char *origpath)
{ {
char *newpath = NULL, *last_slash, *d_here, *d_there, *d_there_file; char *newpath = NULL, *last_slash, *d_here, *d_there, *d_there_file, tmp;
int last_slash_index; int path_only, last_slash_index;
struct stat fileinfo;
/* first, get the current directory */ /* first, get the current directory, and tack a slash onto the end of
it */
#ifdef PATH_MAX #ifdef PATH_MAX
d_here = getcwd(NULL, PATH_MAX + 1); d_here = getcwd(NULL, PATH_MAX + 1);
...@@ -787,14 +812,42 @@ char *get_full_path(const char *origpath) ...@@ -787,14 +812,42 @@ char *get_full_path(const char *origpath)
if (d_here) { if (d_here) {
align(&d_here); align(&d_here);
d_here = nrealloc(d_here, strlen(d_here) + 2);
strcat(d_here, "/");
/* stat origpath; if stat() fails, assume that origpath refers to
a new file that hasn't been saved to disk yet (i. e. set
path_only to 0); if stat() succeeds, set path_only to 0 if
origpath doesn't refer to a directory, or to 1 if it does */
path_only = stat(origpath, &fileinfo);
if (path_only == -1)
path_only = 0;
else {
if (S_ISDIR(fileinfo.st_mode))
path_only = 1;
else
path_only = 0;
}
/* get the filename (with path included) and save it in both /* save the value of origpath in both d_there and d_there_file */
d_there and d_there_file */
d_there = charalloc(strlen(origpath) + 1); d_there = charalloc(strlen(origpath) + 1);
d_there_file = charalloc(strlen(origpath) + 1); d_there_file = charalloc(strlen(origpath) + 1);
strcpy(d_there, origpath); strcpy(d_there, origpath);
strcpy(d_there_file, origpath); strcpy(d_there_file, origpath);
/* if we have a path but no filename, tack slashes onto the ends
of both d_there and d_there_file, if they don't end in slashes
already */
if (path_only) {
tmp = d_there[strlen(d_there) - 1];
if (tmp != '/') {
d_there = nrealloc(d_there, strlen(d_there) + 2);
strcat(d_there, "/");
d_there_file = nrealloc(d_there_file, strlen(d_there_file) + 2);
strcat(d_there_file, "/");
}
}
/* search for the last slash in d_there */ /* search for the last slash in d_there */
last_slash = strrchr(d_there, '/'); last_slash = strrchr(d_there, '/');
...@@ -807,19 +860,27 @@ char *get_full_path(const char *origpath) ...@@ -807,19 +860,27 @@ char *get_full_path(const char *origpath)
else { else {
/* otherwise, remove all non-path elements from d_there */ /* otherwise, remove all non-path elements from d_there
(i. e. everything after the last slash) */
last_slash_index = strlen(d_there) - strlen(last_slash); last_slash_index = strlen(d_there) - strlen(last_slash);
null_at(d_there, last_slash_index); null_at(d_there, last_slash_index + 1);
/* and remove all non-file elements from d_there_file */ /* and remove all non-file elements from d_there_file (i. e.
last_slash++; everything before and including the last slash); if we
d_there_file = nrealloc(d_there_file, strlen(last_slash) + 1); have a path but no filename, don't do anything */
strcpy(d_there_file, last_slash); if (!path_only) {
last_slash = strrchr(d_there_file, '/');
last_slash++;
strcpy(d_there_file, last_slash);
align(&d_there_file);
}
/* now go to the path specified in d_there */ /* now go to the path specified in d_there */
if (chdir(d_there) != -1) { if (chdir(d_there) != -1) {
/* get the full pathname, and save it back in d_there */ /* get the full pathname, and save it back in d_there,
tacking a slash on the end if we have a path but no
filename; if the saving fails, get out */
free(d_there); free(d_there);
...@@ -830,6 +891,12 @@ char *get_full_path(const char *origpath) ...@@ -830,6 +891,12 @@ char *get_full_path(const char *origpath)
#endif #endif
align(&d_there); align(&d_there);
if (d_there) {
d_there = nrealloc(d_there, strlen(d_there) + 2);
strcat(d_there, "/");
}
else
return NULL;
} }
/* finally, go back to where we were before, d_here (no error /* finally, go back to where we were before, d_here (no error
...@@ -840,11 +907,17 @@ char *get_full_path(const char *origpath) ...@@ -840,11 +907,17 @@ char *get_full_path(const char *origpath)
/* all data is set up; fill in newpath */ /* all data is set up; fill in newpath */
/* newpath = d_there + "/" + d_there_file */ /* if we have a path and a filename, newpath = d_there +
newpath = charalloc(strlen(d_there) + strlen(d_there_file) + 2); d_there_file; otherwise, newpath = d_there */
strcpy(newpath, d_there); if (!path_only) {
strcat(newpath, "/"); newpath = charalloc(strlen(d_there) + strlen(d_there_file) + 1);
strcat(newpath, d_there_file); strcpy(newpath, d_there);
strcat(newpath, d_there_file);
}
else {
newpath = charalloc(strlen(d_there) + 1);
strcpy(newpath, d_there);
}
/* finally, clean up */ /* finally, clean up */
free(d_there_file); free(d_there_file);
...@@ -854,6 +927,72 @@ char *get_full_path(const char *origpath) ...@@ -854,6 +927,72 @@ char *get_full_path(const char *origpath)
return newpath; return newpath;
} }
#endif /* ENABLE_MULTIBUFFER || !DISABLE_OPERATINGDIR */
#ifndef DISABLE_OPERATINGDIR
/*
* Check to see if we're inside the operating directory. Return 0 if we
* are, or 1 otherwise. If allow_tabcomp is nonzero, allow incomplete
* names that would be matches for the operating directory, so that tab
* completion will work.
*/
int check_operating_dir(char *currpath, int allow_tabcomp)
{
/* this is static so that we only need to get it the first time this
function is called; also, a relative operating directory path will
only be handled properly if this is done */
static char *full_operating_dir = NULL;
char *fullpath, *whereami1, *whereami2 = NULL;
/* if no operating directory is set, don't bother doing anything */
if (!operating_dir)
return 0;
/* if the operating directory is "/", that's the same as having no
operating directory, so discard it and get out */
if (!strcmp(operating_dir, "/")) {
operating_dir = NULL;
return 0;
}
/* get the full operating (if we don't have it already) and current
directories, and then search the current for the operating (for
normal usage) and the operating for the current (for tab
completion, if we're allowing it); if the current directory's path
doesn't exist, assume we're outside the operating directory */
if (!full_operating_dir) {
full_operating_dir = get_full_path(operating_dir);
/* if get_full_path() failed, discard the operating directory */
if (!full_operating_dir) {
operating_dir = NULL;
return 0;
}
}
fullpath = get_full_path(currpath);
if (!fullpath)
return 1;
whereami1 = strstr(fullpath, full_operating_dir);
if (allow_tabcomp)
whereami2 = strstr(full_operating_dir, fullpath);
/* if both searches failed, we're outside the operating directory */
if (!whereami1 && !whereami2)
return 1;
/* check the search results; if the full operating directory path is
not at the beginning of the full current path (for normal usage)
and vice versa (for tab completion, if we're allowing it), we're
outside the operating directory */
if (whereami1 != fullpath && whereami2 != full_operating_dir)
return 1;
/* otherwise, we're still inside it */
return 0;
}
#endif #endif
/* /*
...@@ -898,6 +1037,18 @@ int write_file(char *name, int tmp, int append, int nonamechange) ...@@ -898,6 +1037,18 @@ int write_file(char *name, int tmp, int append, int nonamechange)
realname = mallocstrcpy(realname, name); realname = mallocstrcpy(realname, name);
#endif #endif
#ifndef DISABLE_OPERATINGDIR
if (!tmp && operating_dir) {
/* if we're writing a temporary file, we're going outside the
operating directory, so skip the operating directory test */
if (check_operating_dir(realname, 0)) {
statusbar(_("Can't write outside of %s"), operating_dir);
return -1;
}
}
#endif
/* Save the state of file at the end of the symlink (if there is one) */ /* Save the state of file at the end of the symlink (if there is one) */
realexists = stat(realname, &st); realexists = stat(realname, &st);
...@@ -1325,6 +1476,16 @@ char **username_tab_completion(char *buf, int *num_matches) ...@@ -1325,6 +1476,16 @@ char **username_tab_completion(char *buf, int *num_matches)
* This makes a lot more sense to me (Chris) this way... * This makes a lot more sense to me (Chris) this way...
*/ */
#ifndef DISABLE_OPERATINGDIR
/* ...unless the match exists outside the operating
directory, in which case just go to the next match */
if (operating_dir) {
if (check_operating_dir(userdata->pw_dir, 1))
continue;
}
#endif
matchline = charalloc(strlen(userdata->pw_name) + 2); matchline = charalloc(strlen(userdata->pw_name) + 2);
sprintf(matchline, "~%s", userdata->pw_name); sprintf(matchline, "~%s", userdata->pw_name);
matches[*num_matches] = matchline; matches[*num_matches] = matchline;
...@@ -1415,6 +1576,27 @@ char **cwd_tab_completion(char *buf, int *num_matches) ...@@ -1415,6 +1576,27 @@ char **cwd_tab_completion(char *buf, int *num_matches)
/* Cool, found a match. Add it to the list /* Cool, found a match. Add it to the list
* This makes a lot more sense to me (Chris) this way... * This makes a lot more sense to me (Chris) this way...
*/ */
#ifndef DISABLE_OPERATINGDIR
/* ...unless the match exists outside the operating
directory, in which case just go to the next match; to
properly do operating directory checking, we have to add the
directory name to the beginning of the proposed match
before we check it */
if (operating_dir) {
tmp2 = charalloc(strlen(dirName) + strlen(next->d_name) + 2);
strcpy(tmp2, dirName);
strcat(tmp2, "/");
strcat(tmp2, next->d_name);
if (check_operating_dir(tmp2, 1)) {
free(tmp2);
continue;
}
free(tmp2);
}
#endif
tmp2 = NULL; tmp2 = NULL;
tmp2 = charalloc(strlen(next->d_name) + 1); tmp2 = charalloc(strlen(next->d_name) + 1);
strcpy(tmp2, next->d_name); strcpy(tmp2, next->d_name);
...@@ -1518,6 +1700,13 @@ char *input_tab(char *buf, int place, int *lastWasTab, int *newplace) ...@@ -1518,6 +1700,13 @@ char *input_tab(char *buf, int place, int *lastWasTab, int *newplace)
strncpy(copyto, matches[0], strlen(matches[0]) + 1); strncpy(copyto, matches[0], strlen(matches[0]) + 1);
*newplace += strlen(matches[0]) - pos; *newplace += strlen(matches[0]) - pos;
/* if an exact match is typed in and Tab is pressed,
*newplace will now be negative; in that case, make it
zero, so that the cursor will stay where it is instead of
moving backward */
if (*newplace < 0)
*newplace = 0;
/* Is it a directory? */ /* Is it a directory? */
append_slash_if_dir(buf, lastWasTab, newplace); append_slash_if_dir(buf, lastWasTab, newplace);
...@@ -1925,6 +2114,19 @@ char *do_browser(char *inpath) ...@@ -1925,6 +2114,19 @@ char *do_browser(char *inpath)
path = mallocstrcpy(path, filelist[selected]); path = mallocstrcpy(path, filelist[selected]);
#ifndef DISABLE_OPERATINGDIR
/* Note: The case of the user's being completely outside the
operating directory is handled elsewhere, before this
point */
if (operating_dir) {
if (check_operating_dir(path, 0)) {
statusbar(_("Can't visit parent in restricted mode"));
beep();
break;
}
}
#endif
st = filestat(path); st = filestat(path);
if (S_ISDIR(st.st_mode)) { if (S_ISDIR(st.st_mode)) {
if ((test_dir = opendir(path)) == NULL) { if ((test_dir = opendir(path)) == NULL) {
...@@ -1961,6 +2163,15 @@ char *do_browser(char *inpath) ...@@ -1961,6 +2163,15 @@ char *do_browser(char *inpath)
bottombars(browser_list, BROWSER_LIST_LEN); bottombars(browser_list, BROWSER_LIST_LEN);
curs_set(0); curs_set(0);
#ifndef DISABLE_OPERATINGDIR
if (operating_dir) {
if (check_operating_dir(answer, 0)) {
statusbar(_("Can't go outside of %s in restricted mode"), operating_dir);
break;
}
}
#endif
if (j < 0) { if (j < 0) {
statusbar(_("Goto Cancelled")); statusbar(_("Goto Cancelled"));
break; break;
......
...@@ -75,6 +75,11 @@ char *help_text; /* The text in the help window */ ...@@ -75,6 +75,11 @@ char *help_text; /* The text in the help window */
filestruct *mark_beginbuf; /* the begin marker buffer */ filestruct *mark_beginbuf; /* the begin marker buffer */
int mark_beginx; /* X value in the string to start */ int mark_beginx; /* X value in the string to start */
#ifndef DISABLE_OPERATINGDIR
char *operating_dir = NULL; /* Operating directory, which we can't go
higher than */
#endif
#ifndef DISABLE_SPELLER #ifndef DISABLE_SPELLER
char *alt_speller; /* Alternative spell command */ char *alt_speller; /* Alternative spell command */
#endif #endif
......
...@@ -434,8 +434,12 @@ void usage(void) ...@@ -434,8 +434,12 @@ void usage(void)
printf(_(" -m --mouse Enable mouse\n")); printf(_(" -m --mouse Enable mouse\n"));
#endif #endif
#endif #endif
#ifndef DISABLE_OPERATINGDIR
printf(_ printf(_
(" -p --pico Emulate Pico as closely as possible\n")); (" -o [dir] --operatingdir Set operating directory\n"));
#endif
printf(_
(" -p --pico Emulate Pico as closely as possible\n"));
#ifndef DISABLE_WRAPJUSTIFY #ifndef DISABLE_WRAPJUSTIFY
printf printf
...@@ -481,6 +485,9 @@ void usage(void) ...@@ -481,6 +485,9 @@ void usage(void)
#ifdef NCURSES_MOUSE_VERSION #ifdef NCURSES_MOUSE_VERSION
printf(_(" -m Enable mouse\n")); printf(_(" -m Enable mouse\n"));
#endif #endif
#endif
#ifndef DISABLE_OPERATINGDIR
printf(_(" -o [dir] Set operating directory\n"));
#endif #endif
printf(_(" -p Emulate Pico as closely as possible\n")); printf(_(" -p Emulate Pico as closely as possible\n"));
...@@ -547,6 +554,9 @@ void version(void) ...@@ -547,6 +554,9 @@ void version(void)
#ifdef DISABLE_MOUSE #ifdef DISABLE_MOUSE
printf(" --disable-mouse"); printf(" --disable-mouse");
#endif #endif
#ifdef DISABLE_OPERATINGDIR
printf(" --disable-operatingdir");
#endif
#endif /* NANO_SMALL */ #endif /* NANO_SMALL */
#ifdef DISABLE_WRAPPING #ifdef DISABLE_WRAPPING
...@@ -1533,16 +1543,12 @@ int do_alt_speller(char *file_name) ...@@ -1533,16 +1543,12 @@ int do_alt_speller(char *file_name)
global_init(); global_init();
open_file(file_name, 0, 1); open_file(file_name, 0, 1);
do_gotoline(lineno_cur, 0); /* go back to the old line while keeping the same position, mark the
file as modified, and make sure that the titlebar is refreshed */
do_gotoline(lineno_cur, 1);
set_modified(); set_modified();
clearok(topwin, FALSE);
#ifdef ENABLE_MULTIBUFFER titlebar(NULL);
/* if we have multiple files open, the spell-checked (current) file
is now stored after the un-spell-checked file in the open_files
structure, so go back to the un-spell-checked file and close it */
open_prevfile(0);
close_open_file();
#endif
return TRUE; return TRUE;
} }
...@@ -1569,6 +1575,14 @@ int do_spell(void) ...@@ -1569,6 +1575,14 @@ int do_spell(void)
return 0; return 0;
} }
#ifdef ENABLE_MULTIBUFFER
/* update the current open_files entry before spell-checking, in case
any problems occur; the case of there being no open_files entries
is handled elsewhere (before we reach this point); no duplicate
checking is needed here */
add_open_file(1, 0);
#endif
if (alt_speller) if (alt_speller)
spell_res = do_alt_speller(temp); spell_res = do_alt_speller(temp);
else else
...@@ -2400,6 +2414,9 @@ int main(int argc, char *argv[]) ...@@ -2400,6 +2414,9 @@ int main(int argc, char *argv[])
{"fill", 1, 0, 'r'}, {"fill", 1, 0, 'r'},
#endif #endif
{"mouse", 0, 0, 'm'}, {"mouse", 0, 0, 'm'},
#ifndef DISABLE_OPERATINGDIR
{"operatingdir", 1, 0, 'o'},
#endif
{"pico", 0, 0, 'p'}, {"pico", 0, 0, 'p'},
{"nofollow", 0, 0, 'l'}, {"nofollow", 0, 0, 'l'},
{"tabsize", 1, 0, 'T'}, {"tabsize", 1, 0, 'T'},
...@@ -2428,11 +2445,11 @@ int main(int argc, char *argv[]) ...@@ -2428,11 +2445,11 @@ int main(int argc, char *argv[])
#endif /* ENABLE_NANORC */ #endif /* ENABLE_NANORC */
#ifdef HAVE_GETOPT_LONG #ifdef HAVE_GETOPT_LONG
while ((optchr = getopt_long(argc, argv, "h?FT:RVbcefgijklmpr:s:tvwxz", while ((optchr = getopt_long(argc, argv, "h?FT:RVabcefgijklmo:pr:s:tvwxz",
long_options, &option_index)) != EOF) { long_options, &option_index)) != EOF) {
#else #else
while ((optchr = while ((optchr =
getopt(argc, argv, "h?FT:RVbcefgijklmpr:s:tvwxz")) != EOF) { getopt(argc, argv, "h?FT:RVabcefgijklmo:pr:s:tvwxz")) != EOF) {
#endif #endif
switch (optchr) { switch (optchr) {
...@@ -2458,6 +2475,7 @@ int main(int argc, char *argv[]) ...@@ -2458,6 +2475,7 @@ int main(int argc, char *argv[])
case 'V': case 'V':
version(); version();
exit(0); exit(0);
case 'a':
case 'b': case 'b':
case 'e': case 'e':
case 'f': case 'f':
...@@ -2486,6 +2504,20 @@ int main(int argc, char *argv[]) ...@@ -2486,6 +2504,20 @@ int main(int argc, char *argv[])
case 'm': case 'm':
SET(USE_MOUSE); SET(USE_MOUSE);
break; break;
#ifndef DISABLE_OPERATINGDIR
case 'o':
operating_dir = charalloc(strlen(optarg) + 1);
strcpy(operating_dir, optarg);
/* make sure we're inside the operating directory */
if (check_operating_dir(".", 0)) {
if (chdir(operating_dir) == -1) {
free(operating_dir);
operating_dir = NULL;
}
}
break;
#endif
case 'p': case 'p':
SET(PICO_MODE); SET(PICO_MODE);
break; break;
......
...@@ -17,6 +17,9 @@ ...@@ -17,6 +17,9 @@
# Don't follow symlinks when writing files # Don't follow symlinks when writing files
# set nofollow # set nofollow
# Set operating directory (chroot of sorts)
# set operatingdir "~"
# Use Pico Compatibility mode for the shortcut lists and search text # Use Pico Compatibility mode for the shortcut lists and search text
# set pico # set pico
......
...@@ -44,6 +44,9 @@ extern char *answer; ...@@ -44,6 +44,9 @@ extern char *answer;
extern char *hblank, *help_text; extern char *hblank, *help_text;
extern char *last_search; extern char *last_search;
extern char *last_replace; extern char *last_replace;
#ifndef DISABLE_OPERATINGDIR
extern char *operating_dir;
#endif
#ifndef DISABLE_SPELLER #ifndef DISABLE_SPELLER
extern char *alt_speller; extern char *alt_speller;
#endif #endif
...@@ -100,10 +103,19 @@ int do_insertfile(int loading_file); ...@@ -100,10 +103,19 @@ int do_insertfile(int loading_file);
int add_open_file(int update, int dup_fix); int add_open_file(int update, int dup_fix);
#endif #endif
#ifndef DISABLE_OPERATINGDIR
int check_operating_dir(char *currpath, int allow_tabcomp);
#endif
int do_writeout(char *path, int exiting, int append); int do_writeout(char *path, int exiting, int append);
int do_gotoline(long line, int save_pos); int do_gotoline(long line, int save_pos);
int do_replace_loop(char *prevanswer, filestruct *begin, int *beginx, int do_replace_loop(char *prevanswer, filestruct *begin, int *beginx,
int wholewords, int *i); int wholewords, int *i);
#ifdef ENABLE_MULTIBUFFER
void do_gotopos(long line, int pos_x, int pos_y, int pos_placewewant);
#endif
/* Now in move.c */ /* Now in move.c */
int do_up(void); int do_up(void);
int do_down(void); int do_down(void);
...@@ -198,8 +210,8 @@ int open_prevfile(int closing_file), open_nextfile(int closing_file); ...@@ -198,8 +210,8 @@ int open_prevfile(int closing_file), open_nextfile(int closing_file);
char *charalloc (size_t howmuch); char *charalloc (size_t howmuch);
#ifdef ENABLE_MULTIBUFFER #if defined (ENABLE_MULTIBUFFER) || !defined (ENABLE_OPERATINGDIR)
char *get_full_path(const char *origpath); char *get_full_path(char *origpath);
#endif #endif
#ifndef DISABLE_BROWSER #ifndef DISABLE_BROWSER
...@@ -225,5 +237,5 @@ filestruct *findnextstr(int quiet, filestruct * begin, ...@@ -225,5 +237,5 @@ filestruct *findnextstr(int quiet, filestruct * begin,
int beginx, char *needle); int beginx, char *needle);
#ifdef ENABLE_MULTIBUFFER #ifdef ENABLE_MULTIBUFFER
filestruct *open_file_dup_search(void); filestruct *open_file_dup_search(int update);
#endif #endif
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
#define _(string) (string) #define _(string) (string)
#endif #endif
#define NUM_RCOPTS 15 #define NUM_RCOPTS 16
/* Static stuff for the nanorc file */ /* Static stuff for the nanorc file */
rcoption rcopts[NUM_RCOPTS] = rcoption rcopts[NUM_RCOPTS] =
{ {
...@@ -49,6 +49,7 @@ rcoption rcopts[NUM_RCOPTS] = ...@@ -49,6 +49,7 @@ rcoption rcopts[NUM_RCOPTS] =
{"cut", CUT_TO_END}, {"cut", CUT_TO_END},
{"nofollow", FOLLOW_SYMLINKS}, {"nofollow", FOLLOW_SYMLINKS},
{"mouse", USE_MOUSE}, {"mouse", USE_MOUSE},
{"operatingdir", 0},
{"pico", PICO_MODE}, {"pico", PICO_MODE},
#ifndef DISABLE_WRAPJUSTIFY #ifndef DISABLE_WRAPJUSTIFY
...@@ -166,6 +167,7 @@ void parse_rcfile(FILE *rcstream, char *filename) ...@@ -166,6 +167,7 @@ void parse_rcfile(FILE *rcstream, char *filename)
#endif #endif
if (set == 1 || rcopts[i].flag == FOLLOW_SYMLINKS) { if (set == 1 || rcopts[i].flag == FOLLOW_SYMLINKS) {
if ( if (
!strcasecmp(rcopts[i].name, "operatingdir") ||
#ifndef DISABLE_WRAPJUSTIFY #ifndef DISABLE_WRAPJUSTIFY
!strcasecmp(rcopts[i].name, "fill") || !strcasecmp(rcopts[i].name, "fill") ||
#endif #endif
......
...@@ -791,3 +791,17 @@ int do_gotoline_void(void) ...@@ -791,3 +791,17 @@ int do_gotoline_void(void)
{ {
return do_gotoline(0, 0); return do_gotoline(0, 0);
} }
#ifdef ENABLE_MULTIBUFFER
void do_gotopos(long line, int pos_x, int pos_y, int pos_placewewant)
{
/* since do_gotoline() resets the x-coordinate but not the
y-coordinate, set the coordinates up this way */
current_y = pos_y;
do_gotoline(line, 1);
current_x = pos_x;
placewewant = pos_placewewant;
update_line(current, pos_x);
}
#endif
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment