diff --git a/ChangeLog b/ChangeLog index d9dce292..630df59c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,12 @@ CVS code - +- General + - Added configure argument --disable tabcomp. Affects + configure.in, configure, bottom of files.c and write_file, and + winio.c:nanogettsr(). + - Username tab completion code, and cleaned up existing tabcomp + code. New functions real_dir_from_tide(), append_slash_if_dir(), + username_tab_completion is more than a stub now =-). + nano 0.9.21 - 11/23/2000 - AUTHORS - Added Rocco Corsi. diff --git a/acconfig.h b/acconfig.h index bc13f22f..e1ede568 100644 --- a/acconfig.h +++ b/acconfig.h @@ -24,3 +24,5 @@ /* Define to use the slang wrappers for curses instead of native curses */ #undef USE_SLANG +/* Define to disable the tab completion code Chris worked so hard on! */ +#undef DISABLE_TABCOMP diff --git a/config.h.in b/config.h.in index c79e0f2e..36956d5e 100644 --- a/config.h.in +++ b/config.h.in @@ -76,6 +76,9 @@ /* Define to use the slang wrappers for curses instead of native curses */ #undef USE_SLANG +/* Define to disable the tab completion code Chris worked so hard on! */ +#undef DISABLE_TABCOMP + /* Define if you have the __argz_count function. */ #undef HAVE___ARGZ_COUNT diff --git a/configure b/configure index afe0454c..a42f6887 100755 --- a/configure +++ b/configure @@ -14,6 +14,8 @@ ac_default_prefix=/usr/local ac_help="$ac_help --enable-tiny Disables features for the sake of size (currently disables detailed help and i18n)" +ac_help="$ac_help + --disable-tabcomp Disables tab completion code for a smaller binary" ac_help="$ac_help --with-slang[=DIR] Use the slang library instead of curses" ac_help="$ac_help @@ -571,7 +573,7 @@ ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:575: checking for a BSD compatible install" >&5 +echo "configure:577: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -624,7 +626,7 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6 -echo "configure:628: checking whether build environment is sane" >&5 +echo "configure:630: checking whether build environment is sane" >&5 # Just in case sleep 1 echo timestamp > conftestfile @@ -681,7 +683,7 @@ test "$program_suffix" != NONE && test "$program_transform_name" = "" && program_transform_name="s,x,x," echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:685: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:687: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -727,7 +729,7 @@ EOF missing_dir=`cd $ac_aux_dir && pwd` echo $ac_n "checking for working aclocal""... $ac_c" 1>&6 -echo "configure:731: checking for working aclocal" >&5 +echo "configure:733: checking for working aclocal" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -740,7 +742,7 @@ else fi echo $ac_n "checking for working autoconf""... $ac_c" 1>&6 -echo "configure:744: checking for working autoconf" >&5 +echo "configure:746: checking for working autoconf" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -753,7 +755,7 @@ else fi echo $ac_n "checking for working automake""... $ac_c" 1>&6 -echo "configure:757: checking for working automake" >&5 +echo "configure:759: checking for working automake" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -766,7 +768,7 @@ else fi echo $ac_n "checking for working autoheader""... $ac_c" 1>&6 -echo "configure:770: checking for working autoheader" >&5 +echo "configure:772: checking for working autoheader" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -779,7 +781,7 @@ else fi echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6 -echo "configure:783: checking for working makeinfo" >&5 +echo "configure:785: checking for working makeinfo" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -800,7 +802,7 @@ ALL_LINGUAS="es de fr it id fi" # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:804: checking for $ac_word" >&5 +echo "configure:806: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -830,7 +832,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure: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 echo $ac_n "(cached) $ac_c" 1>&6 else @@ -881,7 +883,7 @@ fi # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:885: checking for $ac_word" >&5 +echo "configure:887: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -913,7 +915,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:917: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:919: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -924,12 +926,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 928 "configure" +#line 930 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:933: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:935: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -955,12 +957,12 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:959: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:961: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:964: checking whether we are using GNU C" >&5 +echo "configure:966: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -969,7 +971,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:973: \"$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:975: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -988,7 +990,7 @@ ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:992: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:994: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1020,7 +1022,7 @@ else fi echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6 -echo "configure:1024: checking for POSIXized ISC" >&5 +echo "configure:1026: checking for POSIXized ISC" >&5 if test -d /etc/conf/kconfig.d && grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 then @@ -1042,7 +1044,7 @@ fi echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1046: checking how to run the C preprocessor" >&5 +echo "configure:1048: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -1057,13 +1059,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1067: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1069: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -1074,13 +1076,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1084: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1086: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -1091,13 +1093,13 @@ else rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1101: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1103: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -1122,12 +1124,12 @@ fi echo "$ac_t""$CPP" 1>&6 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:1126: checking for ANSI C header files" >&5 +echo "configure:1128: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -1135,7 +1137,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1139: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1141: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -1152,7 +1154,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -1170,7 +1172,7 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -1191,7 +1193,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -1202,7 +1204,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:1206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1208: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -1229,17 +1231,17 @@ for ac_hdr in fcntl.h unistd.h malloc.h termios.h termio.h limits.h getopt.h reg do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1233: checking for $ac_hdr" >&5 +echo "configure:1235: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1243: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1245: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -1278,8 +1280,20 @@ EOF fi +# Check whether --enable-tabcomp or --disable-tabcomp was given. +if test "${enable_tabcomp+set}" = set; then + enableval="$enable_tabcomp" + if test x$enableval != xyes; then + cat >> confdefs.h <<\EOF +#define DISABLE_TABCOMP 1 +EOF + + fi +fi + + echo $ac_n "checking whether to use slang""... $ac_c" 1>&6 -echo "configure:1283: checking whether to use slang" >&5 +echo "configure:1297: checking whether to use slang" >&5 CURSES_LIB_NAME="" # Check whether --with-slang or --without-slang was given. if test "${with_slang+set}" = set; then @@ -1299,17 +1313,17 @@ if test "${with_slang+set}" = set; then ac_safe=`echo "slcurses.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for slcurses.h""... $ac_c" 1>&6 -echo "configure:1303: checking for slcurses.h" >&5 +echo "configure:1317: checking for slcurses.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1313: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1327: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -1326,21 +1340,21 @@ fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 echo $ac_n "checking for SLtt_initialize in -lslang""... $ac_c" 1>&6 -echo "configure:1330: checking for SLtt_initialize in -lslang" >&5 +echo "configure:1344: checking for SLtt_initialize in -lslang" >&5 _libs=$LIBS LIBS="$LIBS -lslang" if test "$cross_compiling" = yes; then echo "configure: warning: *** Can not use slang when cross-compiling" 1>&2 else cat > conftest.$ac_ext < #include int main () { SLtt_initialize (NULL); return 0; } EOF -if { (eval echo configure:1344: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then echo "$ac_t""yes" 1>&6 cat >> confdefs.h <<\EOF @@ -1363,7 +1377,7 @@ else # We might need the term library for termlib in ncurses curses termcap terminfo termlib; do echo $ac_n "checking for tputs in -l${termlib}""... $ac_c" 1>&6 -echo "configure:1367: checking for tputs in -l${termlib}" >&5 +echo "configure:1381: checking for tputs in -l${termlib}" >&5 ac_lib_var=`echo ${termlib}'_'tputs | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1371,7 +1385,7 @@ else ac_save_LIBS="$LIBS" LIBS="-l${termlib} $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1400: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1406,20 +1420,20 @@ fi done echo $ac_n "checking for SLtt_initialize in -lslang $tcap""... $ac_c" 1>&6 -echo "configure:1410: checking for SLtt_initialize in -lslang $tcap" >&5 +echo "configure:1424: checking for SLtt_initialize in -lslang $tcap" >&5 LIBS="$LIBS $tcap" if test "$cross_compiling" = yes; then echo "configure: warning: *** Can not use slang when cross-compiling" 1>&2 else cat > conftest.$ac_ext < #include int main () { SLtt_initialize (NULL); return 0; } EOF -if { (eval echo configure:1423: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1437: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then echo "$ac_t""yes" 1>&6 cat >> confdefs.h <<\EOF @@ -1441,20 +1455,20 @@ else echo "$ac_t""no" 1>&6 # We might need the math library echo $ac_n "checking for SLtt_initialize in -lslang $tcap -lm""... $ac_c" 1>&6 -echo "configure:1445: checking for SLtt_initialize in -lslang $tcap -lm" >&5 +echo "configure:1459: checking for SLtt_initialize in -lslang $tcap -lm" >&5 LIBS="$LIBS -lm" if test "$cross_compiling" = yes; then echo "configure: warning: *** Can not use slang when cross-compiling" 1>&2 else cat > conftest.$ac_ext < #include int main () { SLtt_initialize (NULL); return 0; } EOF -if { (eval echo configure:1458: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then echo "$ac_t""yes" 1>&6 cat >> confdefs.h <<\EOF @@ -1511,12 +1525,12 @@ fi for ac_func in snprintf vsnprintf do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1515: checking for $ac_func" >&5 +echo "configure:1529: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1557: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -1618,7 +1632,7 @@ fi # Extract the first word of "glib-config", so it can be a program name with args. set dummy glib-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1622: checking for $ac_word" >&5 +echo "configure:1636: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GLIB_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1653,7 +1667,7 @@ fi min_glib_version=1.2.4 echo $ac_n "checking for GLIB - version >= $min_glib_version""... $ac_c" 1>&6 -echo "configure:1657: checking for GLIB - version >= $min_glib_version" >&5 +echo "configure:1671: checking for GLIB - version >= $min_glib_version" >&5 no_glib="" if test "$GLIB_CONFIG" = "no" ; then no_glib=yes @@ -1676,7 +1690,7 @@ echo "configure:1657: checking for GLIB - version >= $min_glib_version" >&5 echo $ac_n "cross compiling; assumed OK... $ac_c" else cat > conftest.$ac_ext < @@ -1752,7 +1766,7 @@ main () } EOF -if { (eval echo configure:1756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1770: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -1786,7 +1800,7 @@ fi CFLAGS="$CFLAGS $GLIB_CFLAGS" LIBS="$LIBS $GLIB_LIBS" cat > conftest.$ac_ext < @@ -1796,7 +1810,7 @@ int main() { return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ; return 0; } EOF -if { (eval echo configure:1800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1814: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* 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" @@ -1843,12 +1857,12 @@ fi echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:1847: checking return type of signal handlers" >&5 +echo "configure:1861: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -1865,7 +1879,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:1869: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1883: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -1884,12 +1898,12 @@ EOF echo $ac_n "checking for vprintf""... $ac_c" 1>&6 -echo "configure:1888: checking for vprintf" >&5 +echo "configure:1902: checking for vprintf" >&5 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_vprintf=yes" else @@ -1936,12 +1950,12 @@ fi if test "$ac_cv_func_vprintf" != yes; then echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 -echo "configure:1940: checking for _doprnt" >&5 +echo "configure:1954: checking for _doprnt" >&5 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func__doprnt=yes" else @@ -1991,12 +2005,12 @@ fi for ac_func in getopt_long do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1995: checking for $ac_func" >&5 +echo "configure:2009: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2037: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2052,17 +2066,17 @@ then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2056: checking for $ac_hdr" >&5 +echo "configure:2070: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2066: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2080: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2089,7 +2103,7 @@ fi done echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6 -echo "configure:2093: checking for tgetent in -lncurses" >&5 +echo "configure:2107: checking for tgetent in -lncurses" >&5 ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2097,7 +2111,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lncurses $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2133,7 +2147,7 @@ fi if eval "test x$CURSES_LIB_NAME = x" then echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6 -echo "configure:2137: checking for tgetent in -lcurses" >&5 +echo "configure:2151: checking for tgetent in -lcurses" >&5 ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2141,7 +2155,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcurses $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2178,7 +2192,7 @@ fi if eval "test x$CURSES_LIB_NAME = x" then echo $ac_n "checking for initscr in -lcurses""... $ac_c" 1>&6 -echo "configure:2182: checking for initscr in -lcurses" >&5 +echo "configure:2196: checking for initscr in -lcurses" >&5 ac_lib_var=`echo curses'_'initscr | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2186,7 +2200,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcurses $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2215: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2222,7 +2236,7 @@ fi if eval "test x$CURSES_LIB_NAME = x" then echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6 -echo "configure:2226: checking for tgetent in -ltermcap" >&5 +echo "configure:2240: checking for tgetent in -ltermcap" >&5 ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2230,7 +2244,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ltermcap $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2259: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2275,7 +2289,7 @@ fi echo $ac_n "checking for wresize in -l$CURSES_LIB_NAME""... $ac_c" 1>&6 -echo "configure:2279: checking for wresize in -l$CURSES_LIB_NAME" >&5 +echo "configure:2293: checking for wresize in -l$CURSES_LIB_NAME" >&5 ac_lib_var=`echo $CURSES_LIB_NAME'_'wresize | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2283,7 +2297,7 @@ else ac_save_LIBS="$LIBS" LIBS="-l$CURSES_LIB_NAME $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2312: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2342,7 +2356,7 @@ fi # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2346: checking for $ac_word" >&5 +echo "configure:2360: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2370,12 +2384,12 @@ else fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:2374: checking for working const" >&5 +echo "configure:2388: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2442: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -2445,21 +2459,21 @@ EOF fi echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:2449: checking for inline" >&5 +echo "configure:2463: checking for inline" >&5 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2477: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -2485,12 +2499,12 @@ EOF esac echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:2489: checking for off_t" >&5 +echo "configure:2503: checking for off_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -2518,12 +2532,12 @@ EOF fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:2522: checking for size_t" >&5 +echo "configure:2536: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -2553,19 +2567,19 @@ fi # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 -echo "configure:2557: checking for working alloca.h" >&5 +echo "configure:2571: checking for working alloca.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { void *p = alloca(2 * sizeof(int)); ; return 0; } EOF -if { (eval echo configure:2569: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2583: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_header_alloca_h=yes else @@ -2586,12 +2600,12 @@ EOF fi echo $ac_n "checking for alloca""... $ac_c" 1>&6 -echo "configure:2590: checking for alloca" >&5 +echo "configure:2604: checking for alloca" >&5 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2637: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_alloca_works=yes else @@ -2651,12 +2665,12 @@ EOF echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 -echo "configure:2655: checking whether alloca needs Cray hooks" >&5 +echo "configure:2669: checking whether alloca needs Cray hooks" >&5 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 if test $ac_cv_os_cray = yes; then for ac_func in _getb67 GETB67 getb67; do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2685: checking for $ac_func" >&5 +echo "configure:2699: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2736,7 +2750,7 @@ done fi echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 -echo "configure:2740: checking stack direction for C alloca" >&5 +echo "configure:2754: checking stack direction for C alloca" >&5 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2744,7 +2758,7 @@ else ac_cv_c_stack_direction=0 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2781: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_stack_direction=1 else @@ -2788,17 +2802,17 @@ for ac_hdr in unistd.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2792: checking for $ac_hdr" >&5 +echo "configure:2806: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2802: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2816: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2827,12 +2841,12 @@ done for ac_func in getpagesize do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2831: checking for $ac_func" >&5 +echo "configure:2845: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2880,7 +2894,7 @@ fi done echo $ac_n "checking for working mmap""... $ac_c" 1>&6 -echo "configure:2884: checking for working mmap" >&5 +echo "configure:2898: checking for working mmap" >&5 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2888,7 +2902,7 @@ else ac_cv_func_mmap_fixed_mapped=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3049: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_mmap_fixed_mapped=yes else @@ -3059,17 +3073,17 @@ unistd.h sys/param.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3063: checking for $ac_hdr" >&5 +echo "configure:3077: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3073: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3087: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -3099,12 +3113,12 @@ done strdup __argz_count __argz_stringify __argz_next do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3103: checking for $ac_func" >&5 +echo "configure:3117: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3145: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3156,12 +3170,12 @@ done for ac_func in stpcpy do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3160: checking for $ac_func" >&5 +echo "configure:3174: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3202: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3218,19 +3232,19 @@ EOF if test $ac_cv_header_locale_h = yes; then echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6 -echo "configure:3222: checking for LC_MESSAGES" >&5 +echo "configure:3236: checking for LC_MESSAGES" >&5 if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { return LC_MESSAGES ; return 0; } EOF -if { (eval echo configure:3234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3248: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* am_cv_val_LC_MESSAGES=yes else @@ -3251,7 +3265,7 @@ EOF fi fi echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6 -echo "configure:3255: checking whether NLS is requested" >&5 +echo "configure:3269: checking whether NLS is requested" >&5 # Check whether --enable-nls or --disable-nls was given. if test "${enable_nls+set}" = set; then enableval="$enable_nls" @@ -3271,7 +3285,7 @@ fi EOF echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6 -echo "configure:3275: checking whether included gettext is requested" >&5 +echo "configure:3289: checking whether included gettext is requested" >&5 # Check whether --with-included-gettext or --without-included-gettext was given. if test "${with_included_gettext+set}" = set; then withval="$with_included_gettext" @@ -3290,17 +3304,17 @@ fi ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for libintl.h""... $ac_c" 1>&6 -echo "configure:3294: checking for libintl.h" >&5 +echo "configure:3308: checking for libintl.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3304: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3318: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -3317,19 +3331,19 @@ fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6 -echo "configure:3321: checking for gettext in libc" >&5 +echo "configure:3335: checking for gettext in libc" >&5 if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { return (int) gettext ("") ; return 0; } EOF -if { (eval echo configure:3333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gt_cv_func_gettext_libc=yes else @@ -3345,7 +3359,7 @@ echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6 if test "$gt_cv_func_gettext_libc" != "yes"; then echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6 -echo "configure:3349: checking for bindtextdomain in -lintl" >&5 +echo "configure:3363: checking for bindtextdomain in -lintl" >&5 ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3353,7 +3367,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lintl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3382: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3380,12 +3394,12 @@ fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6 -echo "configure:3384: checking for gettext in libintl" >&5 +echo "configure:3398: checking for gettext in libintl" >&5 if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else echo $ac_n "checking for gettext in -lintl""... $ac_c" 1>&6 -echo "configure:3389: checking for gettext in -lintl" >&5 +echo "configure:3403: checking for gettext in -lintl" >&5 ac_lib_var=`echo intl'_'gettext | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3393,7 +3407,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lintl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3443,7 +3457,7 @@ EOF # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3447: checking for $ac_word" >&5 +echo "configure:3461: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3477,12 +3491,12 @@ fi for ac_func in dcgettext do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3481: checking for $ac_func" >&5 +echo "configure:3495: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3523: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3532,7 +3546,7 @@ done # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3536: checking for $ac_word" >&5 +echo "configure:3550: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3568,7 +3582,7 @@ fi # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3572: checking for $ac_word" >&5 +echo "configure:3586: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3600,7 +3614,7 @@ else fi cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3626: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* CATOBJEXT=.gmo DATADIRNAME=share @@ -3631,7 +3645,7 @@ fi if test "$CATOBJEXT" = "NONE"; then echo $ac_n "checking whether catgets can be used""... $ac_c" 1>&6 -echo "configure:3635: checking whether catgets can be used" >&5 +echo "configure:3649: checking whether catgets can be used" >&5 # Check whether --with-catgets or --without-catgets was given. if test "${with_catgets+set}" = set; then withval="$with_catgets" @@ -3644,7 +3658,7 @@ fi if test "$nls_cv_use_catgets" = "yes"; then echo $ac_n "checking for main in -li""... $ac_c" 1>&6 -echo "configure:3648: checking for main in -li" >&5 +echo "configure:3662: checking for main in -li" >&5 ac_lib_var=`echo i'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3652,14 +3666,14 @@ else ac_save_LIBS="$LIBS" LIBS="-li $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3677: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3687,12 +3701,12 @@ else fi echo $ac_n "checking for catgets""... $ac_c" 1>&6 -echo "configure:3691: checking for catgets" >&5 +echo "configure:3705: checking for catgets" >&5 if eval "test \"`echo '$''{'ac_cv_func_catgets'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_catgets=yes" else @@ -3737,7 +3751,7 @@ EOF # Extract the first word of "gencat", so it can be a program name with args. set dummy gencat; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3741: checking for $ac_word" >&5 +echo "configure:3755: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GENCAT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3773,7 +3787,7 @@ fi # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3777: checking for $ac_word" >&5 +echo "configure:3791: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3810,7 +3824,7 @@ fi # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3814: checking for $ac_word" >&5 +echo "configure:3828: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3845,7 +3859,7 @@ fi # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3849: checking for $ac_word" >&5 +echo "configure:3863: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3903,7 +3917,7 @@ fi # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3907: checking for $ac_word" >&5 +echo "configure:3921: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3937,7 +3951,7 @@ fi # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3941: checking for $ac_word" >&5 +echo "configure:3955: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3973,7 +3987,7 @@ fi # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3977: checking for $ac_word" >&5 +echo "configure:3991: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4066,7 +4080,7 @@ fi LINGUAS= else echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6 -echo "configure:4070: checking for catalogs to be installed" >&5 +echo "configure:4084: checking for catalogs to be installed" >&5 NEW_LINGUAS= for lang in ${LINGUAS=$ALL_LINGUAS}; do case "$ALL_LINGUAS" in @@ -4094,17 +4108,17 @@ echo "configure:4070: checking for catalogs to be installed" >&5 if test "$CATOBJEXT" = ".cat"; then ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6 -echo "configure:4098: checking for linux/version.h" >&5 +echo "configure:4112: checking for linux/version.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4108: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4122: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* diff --git a/configure.in b/configure.in index 464ff3ef..5f19c1a7 100644 --- a/configure.in +++ b/configure.in @@ -21,6 +21,12 @@ AC_ARG_ENABLE(tiny, AC_DEFINE(NANO_SMALL) tiny_support=yes fi]) +AC_ARG_ENABLE(tabcomp, +[ --disable-tabcomp Disables tab completion code for a smaller binary], + [if test x$enableval != xyes; then + AC_DEFINE(DISABLE_TABCOMP) + fi]) + AC_MSG_CHECKING(whether to use slang) CURSES_LIB_NAME="" AC_ARG_WITH(slang, diff --git a/files.c b/files.c index 1fb4e295..cad218b2 100644 --- a/files.c +++ b/files.c @@ -295,6 +295,7 @@ int write_file(char *name, int tmp) filestruct *fileptr; int fd, mask = 0; struct stat st; + char *realname = NULL; if (!strcmp(name, "")) { statusbar(_("Cancelled")); @@ -302,17 +303,21 @@ int write_file(char *name, int tmp) } titlebar(); fileptr = fileage; - +#ifndef DISABLE_TABCOMP + realname = real_dir_from_tilde(name); +#else + realname = mallocstrcpy(realname, name); +#endif /* Check to see if the file is a regular file and FOLLOW_SYMLINKS is set. If so then don't do the delete and recreate code which would cause unexpected behavior */ - lstat(name, &st); + lstat(realname, &st); /* Open the file and truncate it. Trust the symlink. */ if ((ISSET(FOLLOW_SYMLINKS) || !S_ISLNK(st.st_mode)) && !tmp) { - if ((fd = open(name, O_WRONLY | O_CREAT | O_TRUNC, + if ((fd = open(realname, O_WRONLY | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH)) == -1) { if (ISSET(TEMP_OPT)) { @@ -321,18 +326,19 @@ int write_file(char *name, int tmp) } statusbar(_("Could not open file for writing: %s"), strerror(errno)); + free(realname); return -1; } } /* Don't follow symlink. Create new file. */ else { - if (strlen(name) > (PATH_MAX - 7)) { + if (strlen(realname) > (PATH_MAX - 7)) { statusbar(_("Could not open file: Path length exceeded.")); return -1; } memset(buf, 0x00, PATH_MAX + 1); - strcat(buf, name); + strcat(buf, realname); strcat(buf, ".XXXXXX"); if ((fd = mkstemp(buf)) == -1) { if (ISSET(TEMP_OPT)) { @@ -385,13 +391,13 @@ int write_file(char *name, int tmp) if (close(fd) == -1) { - statusbar(_("Could not close %s: %s"), name, strerror(errno)); + statusbar(_("Could not close %s: %s"), realname, strerror(errno)); unlink(buf); return -1; } if (!ISSET(FOLLOW_SYMLINKS) || tmp) { - if (stat(name, &st) == -1) { + if (stat(realname, &st) == -1) { /* Use default umask as file permisions if file is a new file. */ mask = umask(0); umask(mask); @@ -404,37 +410,37 @@ int write_file(char *name, int tmp) } else { /* Use permissions from file we are overwriting. */ mask = st.st_mode; - if (unlink(name) == -1) { + if (unlink(realname) == -1) { if (errno != ENOENT) { statusbar(_("Could not open %s for writing: %s"), - name, strerror(errno)); + realname, strerror(errno)); unlink(buf); return -1; } } } - if (link(buf, name) != -1) + if (link(buf, realname) != -1) unlink(buf); else if (errno != EPERM) { statusbar(_("Could not open %s for writing: %s"), name, strerror(errno)); unlink(buf); return -1; - } else if (rename(buf, name) == -1) { /* Try a rename?? */ - statusbar(_("Could not open %s for writing: %s"), - name, strerror(errno)); + } else if (rename(buf, realname) == -1) { /* Try a rename?? */ + statusbar(_("Could not open %s for writing: %s"), + realname, strerror(errno)); unlink(buf); return -1; } - if (chmod(name, mask) == -1) { + if (chmod(realname, mask) == -1) { statusbar(_("Could not set permissions %o on %s: %s"), - mask, name, strerror(errno)); + mask, realname, strerror(errno)); } } if (!tmp) { - strncpy(filename, name, 132); + strncpy(filename, realname, 132); statusbar(_("Wrote %d lines"), lineswritten); } UNSET(MODIFIED); @@ -497,6 +503,58 @@ int do_writeout_void(void) return do_writeout(0); } +#ifndef DISABLE_TABCOMP +static char **homedirs; + +/* Return a malloc()ed string containing the actual directory, used + * to convert ~user and ~/ notation... + */ +char *real_dir_from_tilde (char *buf) +{ + char *dirtmp = NULL, *tmp; + + if (buf[0] == '~') { + + if (buf[1] == '/') { + if (getenv("HOME") != NULL) { + dirtmp = nmalloc(strlen(buf) + 2 + strlen(getenv("HOME"))); + + sprintf(dirtmp, "%s/%s", getenv("HOME"), &buf[2]); + } + } + else if (buf[1] != 0) { + dirtmp = nmalloc(strlen(buf) + 2 + strlen(homedirs[0])); + for (tmp = &buf[2]; *tmp != '/' && *tmp != 0; tmp++); + + sprintf(dirtmp, "%s%s", homedirs[0], tmp); + } + } + else + dirtmp = mallocstrcpy(dirtmp, buf); + + return dirtmp; +} + +/* Tack a slash onto the string we're completing if it's a directory */ +void append_slash_if_dir(char *buf, int *lastWasTab, int *place) +{ + char *dirptr; + struct stat fileinfo; + + dirptr = real_dir_from_tilde(buf); + + if (stat(dirptr, &fileinfo) == -1) + ; + else if (S_ISDIR(fileinfo.st_mode)) { + strncat(buf, "/", 1); + *place += 1; + /* now we start over again with # of tabs so far */ + *lastWasTab = 0; + } + + if (dirptr != buf) + free(dirptr); +} /* * These functions (username_tab_completion, cwd_tab_completion, and @@ -517,24 +575,90 @@ int do_writeout_void(void) * This code may safely be consumed by a BSD or GPL license. */ -#if 0 char **username_tab_completion(char *buf, int *num_matches) { - char **matches = (char **) NULL; - *num_matches = 0; + char **matches = (char **) NULL, *line = NULL, *lineptr; + char *matchline = NULL, *matchdir = NULL; + + int fd, i = 0, status = 1; + char byte[1]; + + if((fd = open("/etc/passwd", O_RDONLY)) == -1) { + return NULL; + } + + if (homedirs != NULL) { + for (i = 0; i < *num_matches; i++) + free(homedirs[i]); + free(homedirs); + homedirs = (char **) NULL; + *num_matches = 0; + } + matches = nmalloc(BUFSIZ); + homedirs = nmalloc(BUFSIZ); + strcat(buf, "*"); + do { + i = 0; + line = nmalloc(1); + while ((status = read(fd, byte, 1)) != 0 && byte[0] != '\n') { + + line[i] = byte[0]; + i++; + line = nrealloc(line, i+1); + } + + if (i == 0) + break; + + line[i] = 0; + lineptr = strtok(line, ":"); + + if (check_wildcard_match(line, &buf[1]) == TRUE) { + + if (*num_matches == BUFSIZ) + break; + + /* Cool, found a match. Add it to the list + * This makes a lot more sense to me (Chris) this way... + */ + matchline = nmalloc(strlen(line) + 2); + sprintf(matchline, "~%s", line); + + for (i = 0; i <= 4 && lineptr != NULL; i++) + lineptr = strtok(NULL, ":"); + + if (lineptr == NULL) + break; + + matchdir = mallocstrcpy(matchdir, lineptr); + homedirs[*num_matches] = matchdir; + matches[*num_matches] = matchline; + + ++*num_matches; + + /* If there's no more room, bail out */ + if (*num_matches == BUFSIZ) + break; + } + + free(line); + + } while (status != 0); + + close(fd); + return matches; #ifdef DEBUG fprintf(stderr, "\nin username_tab_completion\n"); #endif return (matches); } -#endif /* This was originally called exe_n_cwd_tab_completion, but we're not worried about executables, only filenames :> */ char **cwd_tab_completion(char *buf, int *num_matches) { - char *dirName, *tmp = NULL, *tmp2 = NULL; + char *dirName, *dirtmp = NULL, *tmp = NULL, *tmp2 = NULL; char **matches = (char **) NULL; DIR *dir; struct dirent *next; @@ -569,6 +693,17 @@ char **cwd_tab_completion(char *buf, int *num_matches) fprintf(stderr, "\ntmp = %s\n", tmp); #endif + dirtmp = real_dir_from_tilde(dirName); + free(dirName); + dirName = dirtmp; + +#ifdef DEBUG + fprintf(stderr, "\nDir = %s\n", dirName); + fprintf(stderr, "\nbuf = %s\n", buf); + fprintf(stderr, "\ntmp = %s\n", tmp); +#endif + + dir = opendir(dirName); if (!dir) { /* Don't print an error, just shut up and return */ @@ -618,7 +753,6 @@ char *input_tab(char *buf, int place, int *lastWasTab, int *newplace) int pos = place, i = 0, col = 0, editline = 0; int longestname = 0; char *foo; - struct stat fileinfo; if (*lastWasTab == FALSE) { char *tmp, *copyto, *matchBuf; @@ -648,9 +782,9 @@ char *input_tab(char *buf, int place, int *lastWasTab, int *newplace) /* If the word starts with `~' and there is no slash in the word, * then try completing this word as a username. */ - /* FIXME -- this check is broken! + /* FIXME -- this check is broken! */ if (*tmp == '~' && !strchr(tmp, '/')) - matches = username_tab_completion(tmp, &num_matches); */ + matches = username_tab_completion(tmp, &num_matches); /* Try to match everything in the current working directory that * matches. */ @@ -680,21 +814,8 @@ char *input_tab(char *buf, int place, int *lastWasTab, int *newplace) } else tmp = buf; - if (!strcmp(tmp, matches[0])) { - - /* Is it a directory? */ - if (stat(buf, &fileinfo) == -1) - break; - else if (S_ISDIR(fileinfo.st_mode)) { - - /* Tack on a slash */ - strncat(buf, "/", 1); - *newplace += 1; - /* now we start over with 0 tabs so far */ - *lastWasTab = 0; - } - break; - } + if (!strcmp(tmp, matches[0])) + append_slash_if_dir(buf, lastWasTab, newplace); copyto = tmp; for (pos = 0; *tmp == matches[0][pos] && @@ -705,14 +826,9 @@ char *input_tab(char *buf, int place, int *lastWasTab, int *newplace) strncpy(copyto, matches[0], strlen(matches[0]) + 1); *newplace += strlen(matches[0]) - pos; - if (stat(buf, &fileinfo) == -1) - break; - else if (S_ISDIR(fileinfo.st_mode)) { - strncat(buf, "/", 1); - *newplace += 1; - /* now we start over again with # of tabs so far */ - *lastWasTab = 0; - } + /* Is it a directory? */ + append_slash_if_dir(buf, lastWasTab, newplace); + break; default: /* Check to see if all matches share a beginning, and if so @@ -815,3 +931,4 @@ char *input_tab(char *buf, int place, int *lastWasTab, int *newplace) curs_set(1); return buf; } +#endif diff --git a/po/nano.pot b/po/nano.pot index f49f884d..3b1d74fb 100644 --- a/po/nano.pot +++ b/po/nano.pot @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2000-11-22 20:20-0500\n" +"POT-Creation-Date: 2000-11-24 08:45-0500\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -55,59 +55,59 @@ msgstr "" msgid "File to insert [from ./] " msgstr "" -#: files.c:276 files.c:300 files.c:488 nano.c:1355 +#: files.c:276 files.c:301 files.c:494 nano.c:1355 msgid "Cancelled" msgstr "" -#: files.c:322 files.c:342 files.c:356 files.c:373 files.c:379 +#: files.c:327 files.c:348 files.c:362 files.c:379 files.c:385 #, c-format msgid "Could not open file for writing: %s" msgstr "" -#: files.c:330 +#: files.c:336 msgid "Could not open file: Path length exceeded." msgstr "" -#: files.c:361 +#: files.c:367 #, c-format msgid "Wrote >%s\n" msgstr "" -#: files.c:388 +#: files.c:394 #, c-format msgid "Could not close %s: %s" msgstr "" #. Try a rename?? -#: files.c:409 files.c:420 files.c:425 +#: files.c:415 files.c:426 files.c:431 #, c-format msgid "Could not open %s for writing: %s" msgstr "" -#: files.c:431 +#: files.c:437 #, c-format msgid "Could not set permissions %o on %s: %s" msgstr "" -#: files.c:438 +#: files.c:444 #, c-format msgid "Wrote %d lines" msgstr "" -#: files.c:467 +#: files.c:473 msgid "File Name to write" msgstr "" -#: files.c:472 +#: files.c:478 #, c-format msgid "filename is %s" msgstr "" -#: files.c:477 +#: files.c:483 msgid "File exists, OVERWRITE ?" msgstr "" -#: files.c:801 +#: files.c:917 msgid "(more)" msgstr "" @@ -384,7 +384,7 @@ msgid "Case Sens" msgstr "" #: global.c:344 global.c:364 global.c:375 global.c:385 global.c:401 -#: global.c:405 global.c:411 winio.c:1020 +#: global.c:405 global.c:411 winio.c:1025 msgid "Cancel" msgstr "" @@ -817,67 +817,67 @@ msgstr "" msgid "actual_x_from_start for xplus=%d returned %d\n" msgstr "" -#: winio.c:433 +#: winio.c:438 #, c-format msgid "input '%c' (%d)\n" msgstr "" -#: winio.c:471 +#: winio.c:476 msgid "New Buffer" msgstr "" -#: winio.c:474 +#: winio.c:479 msgid " File: ..." msgstr "" -#: winio.c:482 +#: winio.c:487 msgid "Modified" msgstr "" -#: winio.c:934 +#: winio.c:939 #, c-format msgid "Moved to (%d, %d) in edit buffer\n" msgstr "" -#: winio.c:945 +#: winio.c:950 #, c-format msgid "current->data = \"%s\"\n" msgstr "" -#: winio.c:990 +#: winio.c:995 #, c-format msgid "I got \"%s\"\n" msgstr "" -#: winio.c:1015 +#: winio.c:1020 msgid "Yes" msgstr "" -#: winio.c:1017 +#: winio.c:1022 msgid "All" msgstr "" -#: winio.c:1019 +#: winio.c:1024 msgid "No" msgstr "" -#: winio.c:1156 +#: winio.c:1161 #, c-format msgid "do_cursorpos: linepct = %f, bytepct = %f\n" msgstr "" -#: winio.c:1160 +#: winio.c:1165 msgid "line %d of %d (%.0f%%), character %d of %d (%.0f%%)" msgstr "" -#: winio.c:1288 +#: winio.c:1293 msgid "Dumping file buffer to stderr...\n" msgstr "" -#: winio.c:1290 +#: winio.c:1295 msgid "Dumping cutbuffer to stderr...\n" msgstr "" -#: winio.c:1292 +#: winio.c:1297 msgid "Dumping a buffer to stderr...\n" msgstr "" diff --git a/proto.h b/proto.h index dcb03c70..2b826388 100644 --- a/proto.h +++ b/proto.h @@ -88,7 +88,9 @@ int do_down(void); int do_left(void); int do_right(void); int check_wildcard_match(const char *text, const char *pattern); + char *input_tab(char *buf, int place, int *lastWasTab, int *newplace); +char *real_dir_from_tilde(char *buf); void shortcut_init(void); void lowercase(char *src); diff --git a/winio.c b/winio.c index e4a98fba..bdab1952 100644 --- a/winio.c +++ b/winio.c @@ -247,8 +247,11 @@ int nanogetstr(int allowtabs, char *buf, char *def, shortcut s[], int slen, int start_x) { int kbinput = 0, j = 0, x = 0, xend; - int x_left = 0, inputlen, tabbed = 0, shift = 0; + int x_left = 0, inputlen, tabbed = 0; char *inputbuf; +#ifndef DISABLE_TABCOMP + int shift = 0; +#endif inputbuf = nmalloc(strlen(def) + 1); inputbuf[0] = 0; @@ -340,6 +343,7 @@ int nanogetstr(int allowtabs, char *buf, char *def, shortcut s[], int slen, x--; nanoget_repaint(buf, inputbuf, x); break; +#ifndef DISABLE_TABCOMP case NANO_CONTROL_I: if (allowtabs) { shift = 0; @@ -349,6 +353,7 @@ int nanogetstr(int allowtabs, char *buf, char *def, shortcut s[], int slen, nanoget_repaint(buf, inputbuf, x); } break; +#endif case KEY_LEFT: if (x > strlen(buf)) x--;