diff -ruN old/mc-4.5.9/Specfile new/mc-4.5.10/Specfile --- old/mc-4.5.9/Specfile Mon Jan 18 17:44:07 1999 +++ new/mc-4.5.10/Specfile Sun Jan 31 18:55:18 1999 @@ -1,5 +1,5 @@ # Note that this is NOT a relocatable package -%define ver 4.5.9 +%define ver 4.5.10 %define prefix /usr Summary: Midnight Commander visual shell diff -ruN old/mc-4.5.9/VERSION new/mc-4.5.10/VERSION --- old/mc-4.5.9/VERSION Mon Jan 18 17:44:07 1999 +++ new/mc-4.5.10/VERSION Sun Jan 31 18:55:18 1999 @@ -1 +1 @@ -#define VERSION "4.5.9" +#define VERSION "4.5.10" diff -ruN old/mc-4.5.9/aclocal.m4 new/mc-4.5.10/aclocal.m4 --- old/mc-4.5.9/aclocal.m4 Mon Jan 18 17:44:07 1999 +++ new/mc-4.5.10/aclocal.m4 Sun Jan 31 18:55:18 1999 @@ -1,7 +1,7 @@ -dnl aclocal.m4 generated automatically by aclocal 1.3 +dnl aclocal.m4 generated automatically by aclocal 1.4 -dnl Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc. -dnl This Makefile.in is free software; the Free Software Foundation +dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff -ruN old/mc-4.5.9/config.h.in new/mc-4.5.10/config.h.in --- old/mc-4.5.9/config.h.in Mon Jan 18 17:44:07 1999 +++ new/mc-4.5.10/config.h.in Sun Jan 31 18:55:18 1999 @@ -343,6 +343,12 @@ /* Define if you have the setlocale function. */ #undef HAVE_SETLOCALE +/* Define if you have the setreuid function. */ +#undef HAVE_SETREUID + +/* Define if you have the setuid function. */ +#undef HAVE_SETUID + /* Define if you have the sigaction function. */ #undef HAVE_SIGACTION diff -ruN old/mc-4.5.9/configure new/mc-4.5.10/configure --- old/mc-4.5.9/configure Mon Jan 18 17:44:07 1999 +++ new/mc-4.5.10/configure Sun Jan 31 18:55:18 1999 @@ -1,7 +1,7 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated automatically using autoconf version 2.12 +# Generated automatically using autoconf version 2.13 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. # # This configure script is free software; the Free Software Foundation @@ -111,6 +111,7 @@ # Initialize some other variables. subdirs= MFLAGS= MAKEFLAGS= +SHELL=${CONFIG_SHELL-/bin/sh} # Maximum number of lines to put in a shell here document. ac_max_here_lines=12 @@ -394,7 +395,7 @@ verbose=yes ;; -version | --version | --versio | --versi | --vers) - echo "configure generated by autoconf version 2.12" + echo "configure generated by autoconf version 2.13" exit 0 ;; -with-* | --with-*) @@ -564,9 +565,11 @@ # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' cross_compiling=$ac_cv_prog_cc_cross +ac_exeext= +ac_objext=o if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then @@ -583,7 +586,7 @@ PACKAGE=mc -VERSION=4.5.9 +VERSION=4.5.10 cat >> confdefs.h <&6 -echo "configure:610: checking for $ac_word" >&5 +echo "configure:614: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_MC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -614,9 +618,13 @@ /*) ac_cv_path_MC="$MC" # Let the user override the test with a path. ;; + ?:/*) + ac_cv_path_MC="$MC" # Let the user override the test with a dos path. + ;; *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_path_MC="$ac_dir/$ac_word" @@ -641,7 +649,7 @@ echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:645: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:653: 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 @@ -670,15 +678,16 @@ # 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:674: checking for $ac_word" >&5 +echo "configure:682: 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 if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_prog_CC="gcc" @@ -699,16 +708,17 @@ # 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:703: checking for $ac_word" >&5 +echo "configure:712: 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 if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_prog_rejected=no - for ac_dir in $PATH; do + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then @@ -743,25 +753,61 @@ echo "$ac_t""no" 1>&6 fi + if test -z "$CC"; then + case "`uname -s`" in + *win32* | *WIN32*) + # 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:763: 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 + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_CC="cl" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +CC="$ac_cv_prog_CC" +if test -n "$CC"; then + echo "$ac_t""$CC" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + ;; + esac + fi test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:751: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:795: 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. ac_cpp='$CPP $CPPFLAGS' ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' cross_compiling=$ac_cv_prog_cc_cross -cat > conftest.$ac_ext < conftest.$ac_ext << EOF + +#line 806 "configure" #include "confdefs.h" + main(){return(0);} EOF -if { (eval echo configure:765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:811: \"$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 @@ -775,18 +821,24 @@ ac_cv_prog_cc_works=no fi rm -fr conftest* +ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 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:785: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:837: 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:790: checking whether we are using GNU C" >&5 +echo "configure:842: 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 @@ -795,7 +847,7 @@ yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:799: \"$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:851: \"$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 @@ -806,11 +858,15 @@ if test $ac_cv_prog_gcc = yes; then GCC=yes - 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:814: checking whether ${CC-cc} accepts -g" >&5 +else + GCC= +fi + +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:870: 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 @@ -825,20 +881,24 @@ fi echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 - if test "$ac_test_CFLAGS" = set; then - CFLAGS="$ac_save_CFLAGS" - elif test $ac_cv_prog_cc_g = yes; then +if test "$ac_test_CFLAGS" = set; then + CFLAGS="$ac_save_CFLAGS" +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then CFLAGS="-g -O2" else - CFLAGS="-O2" + CFLAGS="-g" fi else - GCC= - test "${CFLAGS+set}" = set || CFLAGS="-g" + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi fi echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:842: checking how to run the C preprocessor" >&5 +echo "configure:902: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -853,14 +913,14 @@ # 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:863: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:923: \"$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 : else @@ -870,14 +930,31 @@ 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:940: \"$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 + : +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + 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:880: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:957: \"$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 : else @@ -890,6 +967,8 @@ rm -f conftest* fi rm -f conftest* +fi +rm -f conftest* ac_cv_prog_CPP="$CPP" fi CPP="$ac_cv_prog_CPP" @@ -901,15 +980,16 @@ # 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:905: checking for $ac_word" >&5 +echo "configure:984: 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 if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_prog_RANLIB="ranlib" @@ -928,7 +1008,7 @@ fi echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:932: checking whether ln -s works" >&5 +echo "configure:1012: checking whether ln -s works" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -953,15 +1033,16 @@ # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:957: checking for $ac_word" >&5 +echo "configure:1037: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_prog_AWK="$ac_prog" @@ -998,7 +1079,7 @@ echo $ac_n "checking whether we are using GNU make""... $ac_c" 1>&6 -echo "configure:1002: checking whether we are using GNU make" >&5 +echo "configure:1083: checking whether we are using GNU make" >&5 set dummy ${MAKE-make}; ac_make=$2 if eval "test \"`echo '$''{'ac_cv_prog_gnu_make'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1024,9 +1105,9 @@ echo $ac_n "checking for AIX""... $ac_c" 1>&6 -echo "configure:1028: checking for AIX" >&5 +echo "configure:1109: checking for AIX" >&5 cat > conftest.$ac_ext <&6 -echo "configure:1053: checking for minix/config.h" >&5 +echo "configure:1134: checking for minix/config.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:1063: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:1144: \"$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* eval "ac_cv_header_$ac_safe=yes" @@ -1097,7 +1178,7 @@ fi echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6 -echo "configure:1101: checking for POSIXized ISC" >&5 +echo "configure:1182: 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 @@ -1118,7 +1199,7 @@ fi echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6 -echo "configure:1122: checking for ${CC-cc} option to accept ANSI C" >&5 +echo "configure:1203: checking for ${CC-cc} option to accept ANSI C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1128,7 +1209,7 @@ do CFLAGS="$ac_save_CFLAGS $ac_arg" cat > conftest.$ac_ext < #if !defined(__STDC__) || __STDC__ != 1 @@ -1142,7 +1223,7 @@ struct s2 {int (*f) (double a);}; ; return 0; } EOF -if { (eval echo configure:1146: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1227: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_prog_cc_stdc="$ac_arg"; break else @@ -1162,19 +1243,19 @@ esac echo $ac_n "checking whether sys/types.h defines makedev""... $ac_c" 1>&6 -echo "configure:1166: checking whether sys/types.h defines makedev" >&5 +echo "configure:1247: checking whether sys/types.h defines makedev" >&5 if eval "test \"`echo '$''{'ac_cv_header_sys_types_h_makedev'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { return makedev(0, 0); ; return 0; } EOF -if { (eval echo configure:1178: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1259: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_header_sys_types_h_makedev=yes else @@ -1192,18 +1273,18 @@ if test $ac_cv_header_sys_types_h_makedev = no; then ac_safe=`echo "sys/mkdev.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for sys/mkdev.h""... $ac_c" 1>&6 -echo "configure:1196: checking for sys/mkdev.h" >&5 +echo "configure:1277: checking for sys/mkdev.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:1206: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:1287: \"$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* eval "ac_cv_header_$ac_safe=yes" @@ -1230,18 +1311,18 @@ if test $ac_cv_header_sys_mkdev_h = no; then ac_safe=`echo "sys/sysmacros.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for sys/sysmacros.h""... $ac_c" 1>&6 -echo "configure:1234: checking for sys/sysmacros.h" >&5 +echo "configure:1315: checking for sys/sysmacros.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:1244: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:1325: \"$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* eval "ac_cv_header_$ac_safe=yes" @@ -1268,12 +1349,12 @@ fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:1272: checking for working const" >&5 +echo "configure:1353: 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:1407: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -1345,7 +1426,7 @@ # Extract the first word of "mv", so it can be a program name with args. set dummy mv; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1349: checking for $ac_word" >&5 +echo "configure:1430: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_MV'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1353,9 +1434,13 @@ /*) ac_cv_path_MV="$MV" # Let the user override the test with a path. ;; + ?:/*) + ac_cv_path_MV="$MV" # Let the user override the test with a dos path. + ;; *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_path_MV="$ac_dir/$ac_word" @@ -1377,7 +1462,7 @@ # Extract the first word of "cp", so it can be a program name with args. set dummy cp; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1381: checking for $ac_word" >&5 +echo "configure:1466: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_CP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1385,9 +1470,13 @@ /*) ac_cv_path_CP="$CP" # Let the user override the test with a path. ;; + ?:/*) + ac_cv_path_CP="$CP" # Let the user override the test with a dos path. + ;; *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_path_CP="$ac_dir/$ac_word" @@ -1409,7 +1498,7 @@ # Extract the first word of "rm", so it can be a program name with args. set dummy rm; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1413: checking for $ac_word" >&5 +echo "configure:1502: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_RM'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1417,9 +1506,13 @@ /*) ac_cv_path_RM="$RM" # Let the user override the test with a path. ;; + ?:/*) + ac_cv_path_RM="$RM" # Let the user override the test with a dos path. + ;; *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_path_RM="$ac_dir/$ac_word" @@ -1441,7 +1534,7 @@ # Extract the first word of "chmod", so it can be a program name with args. set dummy chmod; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1445: checking for $ac_word" >&5 +echo "configure:1538: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_CHMOD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1449,9 +1542,13 @@ /*) ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path. ;; + ?:/*) + ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a dos path. + ;; *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_path_CHMOD="$ac_dir/$ac_word" @@ -1473,7 +1570,7 @@ # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1477: checking for $ac_word" >&5 +echo "configure:1574: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_AR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1481,9 +1578,13 @@ /*) ac_cv_path_AR="$AR" # Let the user override the test with a path. ;; + ?:/*) + ac_cv_path_AR="$AR" # Let the user override the test with a dos path. + ;; *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_path_AR="$ac_dir/$ac_word" @@ -1506,15 +1607,16 @@ # Extract the first word of "uname", so it can be a program name with args. set dummy uname; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1510: checking for $ac_word" >&5 +echo "configure:1611: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_system'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$system"; then ac_cv_prog_system="$system" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_prog_system="`uname`" @@ -1537,15 +1639,16 @@ # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1541: checking for $ac_word" >&5 +echo "configure:1643: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_X11_WWW'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$X11_WWW"; then ac_cv_prog_X11_WWW="$X11_WWW" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_prog_X11_WWW="$ac_prog" @@ -1571,12 +1674,12 @@ ALL_LINGUAS="es fr ru ko it de pl no" echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:1575: checking for ANSI C header files" >&5 +echo "configure:1678: 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 @@ -1584,8 +1687,8 @@ #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1588: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:1691: \"$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* ac_cv_header_stdc=yes @@ -1601,7 +1704,7 @@ 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 @@ -1619,7 +1722,7 @@ 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 @@ -1640,7 +1743,7 @@ : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -1651,7 +1754,7 @@ exit (0); } EOF -if { (eval echo configure:1655: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1758: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -1675,21 +1778,21 @@ fi echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:1679: checking for inline" >&5 +echo "configure:1782: 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:1796: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -1715,12 +1818,12 @@ esac echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:1719: checking for off_t" >&5 +echo "configure:1822: 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 @@ -1729,7 +1832,7 @@ #endif EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then + egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then rm -rf conftest* ac_cv_type_off_t=yes else @@ -1748,12 +1851,12 @@ fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:1752: checking for size_t" >&5 +echo "configure:1855: 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 @@ -1762,7 +1865,7 @@ #endif EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then + egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then rm -rf conftest* ac_cv_type_size_t=yes else @@ -1783,19 +1886,19 @@ # 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:1787: checking for working alloca.h" >&5 +echo "configure:1890: 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() { char *p = alloca(2 * sizeof(int)); ; return 0; } EOF -if { (eval echo configure:1799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1902: \"$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 @@ -1816,25 +1919,30 @@ fi echo $ac_n "checking for alloca""... $ac_c" 1>&6 -echo "configure:1820: checking for alloca" >&5 +echo "configure:1923: 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 < +# ifdef _MSC_VER +# include +# define alloca _alloca # else -# ifdef _AIX - #pragma alloca +# if HAVE_ALLOCA_H +# include # else -# ifndef alloca /* predefined by HP cc +Olibcalls */ +# ifdef _AIX + #pragma alloca +# else +# ifndef alloca /* predefined by HP cc +Olibcalls */ char *alloca (); +# endif # endif # endif # endif @@ -1844,7 +1952,7 @@ char *p = (char *) alloca(1); ; return 0; } EOF -if { (eval echo configure:1848: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1956: \"$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 @@ -1869,19 +1977,19 @@ # that cause trouble. Some versions do not even contain alloca or # contain a buggy version. If you still want to use their alloca, # use ar to extract alloca.o from them instead of compiling alloca.c. - ALLOCA=alloca.o + ALLOCA=alloca.${ac_objext} cat >> confdefs.h <<\EOF #define C_ALLOCA 1 EOF echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 -echo "configure:1880: checking whether alloca needs Cray hooks" >&5 +echo "configure:1988: 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 -echo "configure:1910: checking for $ac_func" >&5 +echo "configure:2018: 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; then +if { (eval echo configure:2046: \"$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 @@ -1961,7 +2069,7 @@ fi echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 -echo "configure:1965: checking stack direction for C alloca" >&5 +echo "configure:2073: 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 @@ -1969,7 +2077,7 @@ ac_cv_c_stack_direction=0 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2100: \"$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 @@ -2013,18 +2121,18 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2017: checking for $ac_hdr" >&5 +echo "configure:2125: 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:2027: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:2135: \"$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* eval "ac_cv_header_$ac_safe=yes" @@ -2052,12 +2160,12 @@ for ac_func in getpagesize do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2056: checking for $ac_func" >&5 +echo "configure:2164: 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; then +if { (eval echo configure:2192: \"$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 @@ -2105,7 +2213,7 @@ done echo $ac_n "checking for working mmap""... $ac_c" 1>&6 -echo "configure:2109: checking for working mmap" >&5 +echo "configure:2217: 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 @@ -2113,7 +2221,7 @@ ac_cv_func_mmap_fixed_mapped=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2365: \"$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 @@ -2281,18 +2389,18 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2285: checking for $ac_hdr" >&5 +echo "configure:2393: 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:2295: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:2403: \"$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* eval "ac_cv_header_$ac_safe=yes" @@ -2321,12 +2429,12 @@ __argz_count __argz_stringify __argz_next do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2325: checking for $ac_func" >&5 +echo "configure:2433: 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; then +if { (eval echo configure:2461: \"$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 @@ -2378,12 +2486,12 @@ for ac_func in stpcpy do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2382: checking for $ac_func" >&5 +echo "configure:2490: 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; then +if { (eval echo configure:2518: \"$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 @@ -2440,19 +2548,19 @@ if test $ac_cv_header_locale_h = yes; then echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6 -echo "configure:2444: checking for LC_MESSAGES" >&5 +echo "configure:2552: 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:2456: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2564: \"$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 @@ -2473,7 +2581,7 @@ fi fi echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6 -echo "configure:2477: checking whether NLS is requested" >&5 +echo "configure:2585: 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" @@ -2493,7 +2601,7 @@ EOF echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6 -echo "configure:2497: checking whether included gettext is requested" >&5 +echo "configure:2605: 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" @@ -2512,18 +2620,18 @@ ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for libintl.h""... $ac_c" 1>&6 -echo "configure:2516: checking for libintl.h" >&5 +echo "configure:2624: 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:2526: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:2634: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" @@ -2539,19 +2647,19 @@ 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:2543: checking for gettext in libc" >&5 +echo "configure:2651: 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:2555: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2663: \"$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 @@ -2567,7 +2675,7 @@ if test "$gt_cv_func_gettext_libc" != "yes"; then echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6 -echo "configure:2571: checking for bindtextdomain in -lintl" >&5 +echo "configure:2679: 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 @@ -2575,7 +2683,7 @@ ac_save_LIBS="$LIBS" LIBS="-lintl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2698: \"$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 @@ -2602,19 +2710,19 @@ 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:2606: checking for gettext in libintl" >&5 +echo "configure:2714: checking for gettext in libintl" >&5 if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2726: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gt_cv_func_gettext_libintl=yes else @@ -2642,7 +2750,7 @@ # 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:2646: checking for $ac_word" >&5 +echo "configure:2754: 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 @@ -2676,12 +2784,12 @@ for ac_func in dcgettext do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2680: checking for $ac_func" >&5 +echo "configure:2788: 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; then +if { (eval echo configure:2816: \"$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 @@ -2731,7 +2839,7 @@ # 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:2735: checking for $ac_word" >&5 +echo "configure:2843: 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 @@ -2739,9 +2847,13 @@ /*) ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. ;; + ?:/*) + ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path. + ;; *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_path_GMSGFMT="$ac_dir/$ac_word" @@ -2763,7 +2875,7 @@ # 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:2767: checking for $ac_word" >&5 +echo "configure:2879: 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 @@ -2795,7 +2907,7 @@ fi cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* CATOBJEXT=.gmo DATADIRNAME=share @@ -2826,7 +2938,7 @@ if test "$CATOBJEXT" = "NONE"; then echo $ac_n "checking whether catgets can be used""... $ac_c" 1>&6 -echo "configure:2830: checking whether catgets can be used" >&5 +echo "configure:2942: 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" @@ -2839,7 +2951,7 @@ if test "$nls_cv_use_catgets" = "yes"; then echo $ac_n "checking for main in -li""... $ac_c" 1>&6 -echo "configure:2843: checking for main in -li" >&5 +echo "configure:2955: 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 @@ -2847,14 +2959,14 @@ ac_save_LIBS="$LIBS" LIBS="-li $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2970: \"$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 @@ -2882,12 +2994,12 @@ fi echo $ac_n "checking for catgets""... $ac_c" 1>&6 -echo "configure:2886: checking for catgets" >&5 +echo "configure:2998: 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; then +if { (eval echo configure:3026: \"$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 @@ -2932,7 +3044,7 @@ # 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:2936: checking for $ac_word" >&5 +echo "configure:3048: 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 @@ -2940,9 +3052,13 @@ /*) ac_cv_path_GENCAT="$GENCAT" # Let the user override the test with a path. ;; + ?:/*) + ac_cv_path_GENCAT="$GENCAT" # Let the user override the test with a dos path. + ;; *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_path_GENCAT="$ac_dir/$ac_word" @@ -2964,7 +3080,7 @@ # 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:2968: checking for $ac_word" >&5 +echo "configure:3084: 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 @@ -2972,9 +3088,13 @@ /*) ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. ;; + ?:/*) + ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path. + ;; *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_path_GMSGFMT="$ac_dir/$ac_word" @@ -2997,7 +3117,7 @@ # 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:3001: checking for $ac_word" >&5 +echo "configure:3121: 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 @@ -3032,7 +3152,7 @@ # 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:3036: checking for $ac_word" >&5 +echo "configure:3156: 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 @@ -3090,7 +3210,7 @@ # 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:3094: checking for $ac_word" >&5 +echo "configure:3214: 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 @@ -3124,7 +3244,7 @@ # 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:3128: checking for $ac_word" >&5 +echo "configure:3248: 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 @@ -3132,9 +3252,13 @@ /*) ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. ;; + ?:/*) + ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path. + ;; *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_path_GMSGFMT="$ac_dir/$ac_word" @@ -3156,7 +3280,7 @@ # 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:3160: checking for $ac_word" >&5 +echo "configure:3284: 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 @@ -3246,7 +3370,7 @@ LINGUAS= else echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6 -echo "configure:3250: checking for catalogs to be installed" >&5 +echo "configure:3374: checking for catalogs to be installed" >&5 NEW_LINGUAS= for lang in ${LINGUAS=$ALL_LINGUAS}; do case "$ALL_LINGUAS" in @@ -3274,18 +3398,18 @@ 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:3278: checking for linux/version.h" >&5 +echo "configure:3402: 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:3288: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:3412: \"$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* eval "ac_cv_header_$ac_safe=yes" @@ -3444,7 +3568,7 @@ # 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:3448: checking for $ac_word" >&5 +echo "configure:3572: 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 @@ -3452,9 +3576,13 @@ /*) ac_cv_path_GLIB_CONFIG="$GLIB_CONFIG" # Let the user override the test with a path. ;; + ?:/*) + ac_cv_path_GLIB_CONFIG="$GLIB_CONFIG" # Let the user override the test with a dos path. + ;; *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_path_GLIB_CONFIG="$ac_dir/$ac_word" @@ -3475,7 +3603,7 @@ min_glib_version=0.99.7 echo $ac_n "checking for GLIB - version >= $min_glib_version""... $ac_c" 1>&6 -echo "configure:3479: checking for GLIB - version >= $min_glib_version" >&5 +echo "configure:3607: checking for GLIB - version >= $min_glib_version" >&5 no_glib="" if test "$GLIB_CONFIG" = "no" ; then no_glib=yes @@ -3498,7 +3626,7 @@ echo $ac_n "cross compiling; assumed OK... $ac_c" else cat > conftest.$ac_ext < @@ -3574,7 +3702,7 @@ } EOF -if { (eval echo configure:3578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -3608,7 +3736,7 @@ CFLAGS="$CFLAGS $GLIB_CFLAGS" LIBS="$LIBS $GLIB_LIBS" cat > conftest.$ac_ext < @@ -3618,7 +3746,7 @@ return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ; return 0; } EOF -if { (eval echo configure:3622: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3750: \"$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" @@ -3696,28 +3824,30 @@ # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # 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:3704: checking for a BSD compatible install" >&5 +echo "configure:3833: 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 else - IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:" + IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" for ac_dir in $PATH; do # Account for people who put trailing slashes in PATH elements. case "$ac_dir/" in /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. - for ac_prog in ginstall installbsd scoinst install; do + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do if test -f $ac_dir/$ac_prog; then if test $ac_prog = install && grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. - # OSF/1 installbsd also uses dspmsg, but is usable. : else ac_cv_path_install="$ac_dir/$ac_prog -c" @@ -3747,24 +3877,26 @@ # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' + test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' for ac_hdr in unistd.h string.h memory.h crypt.h grp.h limits.h malloc.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3757: checking for $ac_hdr" >&5 +echo "configure:3889: 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:3767: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:3899: \"$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* eval "ac_cv_header_$ac_safe=yes" @@ -3793,18 +3925,18 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3797: checking for $ac_hdr" >&5 +echo "configure:3929: 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:3807: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:3939: \"$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* eval "ac_cv_header_$ac_safe=yes" @@ -3835,12 +3967,12 @@ fi echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 -echo "configure:3839: checking for sys/wait.h that is POSIX.1 compatible" >&5 +echo "configure:3971: checking for sys/wait.h that is POSIX.1 compatible" >&5 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3856,7 +3988,7 @@ s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } EOF -if { (eval echo configure:3860: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3992: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_sys_wait_h=yes else @@ -3881,12 +4013,12 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 -echo "configure:3885: checking for $ac_hdr that defines DIR" >&5 +echo "configure:4017: checking for $ac_hdr that defines DIR" >&5 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include <$ac_hdr> @@ -3894,7 +4026,7 @@ DIR *dirp = 0; ; return 0; } EOF -if { (eval echo configure:3898: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4030: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else @@ -3919,7 +4051,7 @@ # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 -echo "configure:3923: checking for opendir in -ldir" >&5 +echo "configure:4055: checking for opendir in -ldir" >&5 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3927,7 +4059,7 @@ ac_save_LIBS="$LIBS" LIBS="-ldir $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4074: \"$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 @@ -3960,7 +4092,7 @@ else echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -echo "configure:3964: checking for opendir in -lx" >&5 +echo "configure:4096: checking for opendir in -lx" >&5 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3968,7 +4100,7 @@ ac_save_LIBS="$LIBS" LIBS="-lx $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4115: \"$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 @@ -4003,7 +4135,7 @@ echo $ac_n "checking filename fits on dirent.d_name""... $ac_c" 1>&6 -echo "configure:4007: checking filename fits on dirent.d_name" >&5 +echo "configure:4139: checking filename fits on dirent.d_name" >&5 if eval "test \"`echo '$''{'ac_cv_dnamesize'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4017,7 +4149,7 @@ else cat > conftest.$ac_ext < @@ -4034,7 +4166,7 @@ EOF -if { (eval echo configure:4038: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_dnamesize="no" @@ -4063,12 +4195,12 @@ echo "$ac_t""$ac_cv_dnamesize" 1>&6 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:4067: checking for ANSI C header files" >&5 +echo "configure:4199: 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 @@ -4076,8 +4208,8 @@ #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4080: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:4212: \"$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* ac_cv_header_stdc=yes @@ -4093,7 +4225,7 @@ 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 @@ -4111,7 +4243,7 @@ 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 @@ -4132,7 +4264,7 @@ : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -4143,7 +4275,7 @@ exit (0); } EOF -if { (eval echo configure:4147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4279: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -4175,12 +4307,12 @@ echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6 -echo "configure:4179: checking for st_blksize in struct stat" >&5 +echo "configure:4311: checking for st_blksize in struct stat" >&5 if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -4188,7 +4320,7 @@ struct stat s; s.st_blksize; ; return 0; } EOF -if { (eval echo configure:4192: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4324: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_st_blksize=yes else @@ -4209,12 +4341,12 @@ fi echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6 -echo "configure:4213: checking for st_blocks in struct stat" >&5 +echo "configure:4345: checking for st_blocks in struct stat" >&5 if eval "test \"`echo '$''{'ac_cv_struct_st_blocks'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -4222,7 +4354,7 @@ struct stat s; s.st_blocks; ; return 0; } EOF -if { (eval echo configure:4226: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4358: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_st_blocks=yes else @@ -4241,16 +4373,16 @@ EOF else - LIBOBJS="$LIBOBJS fileblocks.o" + LIBOBJS="$LIBOBJS fileblocks.${ac_objext}" fi echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6 -echo "configure:4249: checking for st_rdev in struct stat" >&5 +echo "configure:4381: checking for st_rdev in struct stat" >&5 if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -4258,7 +4390,7 @@ struct stat s; s.st_rdev; ; return 0; } EOF -if { (eval echo configure:4262: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4394: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_st_rdev=yes else @@ -4283,12 +4415,12 @@ for ac_func in strerror statfs getwd strcasecmp strncasecmp do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4287: checking for $ac_func" >&5 +echo "configure:4419: 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; then +if { (eval echo configure:4447: \"$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 @@ -4338,12 +4470,12 @@ for ac_func in strdup memmove pwdauth truncate initgroups putenv do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4342: checking for $ac_func" >&5 +echo "configure:4474: 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; then +if { (eval echo configure:4502: \"$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 @@ -4393,12 +4525,12 @@ for ac_func in memset memcpy tcsetattr tcgetattr cfgetospeed do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4397: checking for $ac_func" >&5 +echo "configure:4529: 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; then +if { (eval echo configure:4557: \"$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 @@ -4448,12 +4580,12 @@ for ac_func in sigaction sigemptyset sigprocmask sigaddset do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4452: checking for $ac_func" >&5 +echo "configure:4584: 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; then +if { (eval echo configure:4612: \"$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 @@ -4500,15 +4632,15 @@ fi done -for ac_func in sysconf +for ac_func in sysconf setuid setreuid do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4507: checking for $ac_func" >&5 +echo "configure:4639: 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; then +if { (eval echo configure:4667: \"$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 @@ -4559,7 +4691,7 @@ SHADOWLIB= if test x$system = xLinux; then echo $ac_n "checking for pw_encrypt in -lshadow""... $ac_c" 1>&6 -echo "configure:4563: checking for pw_encrypt in -lshadow" >&5 +echo "configure:4695: checking for pw_encrypt in -lshadow" >&5 ac_lib_var=`echo shadow'_'pw_encrypt | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4567,7 +4699,7 @@ ac_save_LIBS="$LIBS" LIBS="-lshadow $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4714: \"$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 @@ -4599,18 +4731,18 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4603: checking for $ac_hdr" >&5 +echo "configure:4735: 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:4613: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:4745: \"$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* eval "ac_cv_header_$ac_safe=yes" @@ -4642,18 +4774,18 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4646: checking for $ac_hdr" >&5 +echo "configure:4778: 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:4656: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:4788: \"$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* eval "ac_cv_header_$ac_safe=yes" @@ -4700,7 +4832,7 @@ NEED_CRYPT_PROTOTYPE=yes if test x$ac_cv_header_crypt_h = xyes; then cat > conftest.$ac_ext < int main() { return 0; } @@ -4721,7 +4853,7 @@ else if test x$ac_cv_header_unistd_h = xyes; then cat > conftest.$ac_ext < int main() { return 0; } @@ -4752,18 +4884,18 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4756: checking for $ac_hdr" >&5 +echo "configure:4888: 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:4766: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:4898: \"$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* eval "ac_cv_header_$ac_safe=yes" @@ -4793,12 +4925,12 @@ for ac_func in crypt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4797: checking for $ac_func" >&5 +echo "configure:4929: 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; then +if { (eval echo configure:4957: \"$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 @@ -4843,7 +4975,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6 -echo "configure:4847: checking for crypt in -lcrypt" >&5 +echo "configure:4979: checking for crypt in -lcrypt" >&5 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4851,7 +4983,7 @@ ac_save_LIBS="$LIBS" LIBS="-lcrypt $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4998: \"$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 @@ -4882,7 +5014,7 @@ echo "$ac_t""no" 1>&6 echo $ac_n "checking for crypt in -lcrypt_i""... $ac_c" 1>&6 -echo "configure:4886: checking for crypt in -lcrypt_i" >&5 +echo "configure:5018: checking for crypt in -lcrypt_i" >&5 ac_lib_var=`echo crypt_i'_'crypt | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4890,7 +5022,7 @@ ac_save_LIBS="$LIBS" LIBS="-lcrypt_i $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5037: \"$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 @@ -4931,12 +5063,12 @@ for ac_func in grantpt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4935: checking for $ac_func" >&5 +echo "configure:5067: 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; then +if { (eval echo configure:5095: \"$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 @@ -4987,7 +5119,7 @@ : else echo $ac_n "checking for grantpt in -lpt""... $ac_c" 1>&6 -echo "configure:4991: checking for grantpt in -lpt" >&5 +echo "configure:5123: checking for grantpt in -lpt" >&5 ac_lib_var=`echo pt'_'grantpt | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4995,7 +5127,7 @@ ac_save_LIBS="$LIBS" LIBS="-lpt $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5142: \"$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 @@ -5037,7 +5169,7 @@ if test x$GCC = xyes; then echo $ac_n "checking for tolower in -lintl""... $ac_c" 1>&6 -echo "configure:5041: checking for tolower in -lintl" >&5 +echo "configure:5173: checking for tolower in -lintl" >&5 ac_lib_var=`echo intl'_'tolower | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5045,7 +5177,7 @@ ac_save_LIBS="$LIBS" LIBS="-lintl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5192: \"$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 @@ -5088,12 +5220,12 @@ for ac_func in statlstat do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5092: checking for $ac_func" >&5 +echo "configure:5224: 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; then +if { (eval echo configure:5252: \"$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 @@ -5142,9 +5274,9 @@ echo $ac_n "checking for AIX defines""... $ac_c" 1>&6 -echo "configure:5146: checking for AIX defines" >&5 +echo "configure:5278: checking for AIX defines" >&5 cat > conftest.$ac_ext <&6 -echo "configure:5173: checking for getmntent in -lgen" >&5 +echo "configure:5305: checking for getmntent in -lgen" >&5 ac_lib_var=`echo gen'_'getmntent | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5177,7 +5309,7 @@ ac_save_LIBS="$LIBS" LIBS="-lgen $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5324: \"$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 @@ -5214,18 +5346,18 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:5218: checking for $ac_hdr" >&5 +echo "configure:5350: 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:5228: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:5360: \"$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* eval "ac_cv_header_$ac_safe=yes" @@ -5254,18 +5386,18 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:5258: checking for $ac_hdr" >&5 +echo "configure:5390: 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:5268: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:5400: \"$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* eval "ac_cv_header_$ac_safe=yes" @@ -5294,18 +5426,18 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:5298: checking for $ac_hdr" >&5 +echo "configure:5430: 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:5308: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:5440: \"$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* eval "ac_cv_header_$ac_safe=yes" @@ -5333,12 +5465,12 @@ for ac_func in getmntinfo do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5337: checking for $ac_func" >&5 +echo "configure:5469: 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; then +if { (eval echo configure:5497: \"$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 @@ -5388,12 +5520,12 @@ echo $ac_n "checking for d_ino member in directory struct""... $ac_c" 1>&6 -echo "configure:5392: checking for d_ino member in directory struct" >&5 +echo "configure:5524: checking for d_ino member in directory struct" >&5 if eval "test \"`echo '$''{'fu_cv_sys_d_ino_in_dirent'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -5416,7 +5548,7 @@ struct dirent dp; dp.d_ino = 0; ; return 0; } EOF -if { (eval echo configure:5420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5552: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* fu_cv_sys_d_ino_in_dirent=yes else @@ -5443,7 +5575,7 @@ # make sure LIBS contains -lsun (on Irix4) or -lseq (on PTX). # getmntent is in -lsun on Irix 4, -lseq on Dynix/PTX, -lgen on Unixware. echo $ac_n "checking for getmntent in -lsun""... $ac_c" 1>&6 -echo "configure:5447: checking for getmntent in -lsun" >&5 +echo "configure:5579: checking for getmntent in -lsun" >&5 ac_lib_var=`echo sun'_'getmntent | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5451,7 +5583,7 @@ ac_save_LIBS="$LIBS" LIBS="-lsun $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5598: \"$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 @@ -5481,7 +5613,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for getmntent in -lseq""... $ac_c" 1>&6 -echo "configure:5485: checking for getmntent in -lseq" >&5 +echo "configure:5617: checking for getmntent in -lseq" >&5 ac_lib_var=`echo seq'_'getmntent | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5489,7 +5621,7 @@ ac_save_LIBS="$LIBS" LIBS="-lseq $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5636: \"$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 @@ -5519,7 +5651,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for getmntent in -lgen""... $ac_c" 1>&6 -echo "configure:5523: checking for getmntent in -lgen" >&5 +echo "configure:5655: checking for getmntent in -lgen" >&5 ac_lib_var=`echo gen'_'getmntent | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5527,7 +5659,7 @@ ac_save_LIBS="$LIBS" LIBS="-lgen $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5674: \"$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 @@ -5563,12 +5695,12 @@ fi echo $ac_n "checking for getmntent""... $ac_c" 1>&6 -echo "configure:5567: checking for getmntent" >&5 +echo "configure:5699: checking for getmntent" >&5 if eval "test \"`echo '$''{'ac_cv_func_getmntent'+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; then +if { (eval echo configure:5727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_getmntent=yes" else @@ -5622,12 +5754,12 @@ if test -z "$list_mounted_fs"; then # SVR4 echo $ac_n "checking for two-argument getmntent function""... $ac_c" 1>&6 -echo "configure:5626: checking for two-argument getmntent function" >&5 +echo "configure:5758: checking for two-argument getmntent function" >&5 if eval "test \"`echo '$''{'fu_cv_sys_mounted_getmntent2'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -5656,7 +5788,7 @@ if test -z "$list_mounted_fs"; then # 4.3BSD, SunOS, HP-UX, Dynix, Irix echo $ac_n "checking for one-argument getmntent function""... $ac_c" 1>&6 -echo "configure:5660: checking for one-argument getmntent function" >&5 +echo "configure:5792: checking for one-argument getmntent function" >&5 if eval "test \"`echo '$''{'fu_cv_sys_mounted_getmntent1'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5685,12 +5817,12 @@ if test -z "$list_mounted_fs"; then # DEC Alpha running OSF/1. echo $ac_n "checking for getfsstat function""... $ac_c" 1>&6 -echo "configure:5689: checking for getfsstat function" >&5 +echo "configure:5821: checking for getfsstat function" >&5 if eval "test \"`echo '$''{'fu_cv_sys_mounted_getsstat'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -5701,7 +5833,7 @@ numsys = getfsstat ((struct statfs *)0, 0L, MNT_WAIT); ; return 0; } EOF -if { (eval echo configure:5705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:5837: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* fu_cv_sys_mounted_getsstat=yes else @@ -5726,18 +5858,18 @@ if test -z "$list_mounted_fs"; then # AIX. echo $ac_n "checking for mntctl function and struct vmount""... $ac_c" 1>&6 -echo "configure:5730: checking for mntctl function and struct vmount" >&5 +echo "configure:5862: checking for mntctl function and struct vmount" >&5 if eval "test \"`echo '$''{'fu_cv_sys_mounted_vmount'+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:5740: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:5872: \"$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* fu_cv_sys_mounted_vmount=yes @@ -5764,12 +5896,12 @@ if test -z "$list_mounted_fs"; then # SVR3 echo $ac_n "checking for existence of three headers""... $ac_c" 1>&6 -echo "configure:5768: checking for existence of three headers" >&5 +echo "configure:5900: checking for existence of three headers" >&5 if eval "test \"`echo '$''{'fu_cv_sys_mounted_fread_fstyp'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -5777,8 +5909,8 @@ #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5781: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:5913: \"$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* fu_cv_sys_mounted_fread_fstyp=yes @@ -5805,7 +5937,7 @@ if test -z "$list_mounted_fs"; then # 4.4BSD and DEC OSF/1. echo $ac_n "checking for getmntinfo function""... $ac_c" 1>&6 -echo "configure:5809: checking for getmntinfo function" >&5 +echo "configure:5941: checking for getmntinfo function" >&5 if eval "test \"`echo '$''{'fu_cv_sys_mounted_getmntinfo'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5813,7 +5945,7 @@ ok= if test $ac_cv_func_getmntinfo = yes; then cat > conftest.$ac_ext < EOF @@ -5846,20 +5978,20 @@ if test -z "$list_mounted_fs"; then # Ultrix echo $ac_n "checking for getmnt function""... $ac_c" 1>&6 -echo "configure:5850: checking for getmnt function" >&5 +echo "configure:5982: checking for getmnt function" >&5 if eval "test \"`echo '$''{'fu_cv_sys_mounted_getmnt'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5862: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:5994: \"$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* fu_cv_sys_mounted_getmnt=yes @@ -5886,18 +6018,18 @@ if test -z "$list_mounted_fs"; then # SVR2 echo $ac_n "checking whether it is possible to resort to fread on /etc/mnttab""... $ac_c" 1>&6 -echo "configure:5890: checking whether it is possible to resort to fread on /etc/mnttab" >&5 +echo "configure:6022: checking whether it is possible to resort to fread on /etc/mnttab" >&5 if eval "test \"`echo '$''{'fu_cv_sys_mounted_fread'+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:5900: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:6032: \"$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* fu_cv_sys_mounted_fread=yes @@ -5930,7 +6062,7 @@ echo "checking how to get filesystem space usage" 1>&6 -echo "configure:5934: checking how to get filesystem space usage" >&5 +echo "configure:6066: checking how to get filesystem space usage" >&5 space=no # Here we'll compromise a little (and perform only the link test) @@ -5940,12 +6072,12 @@ for ac_func in statvfs do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5944: checking for $ac_func" >&5 +echo "configure:6076: 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; then +if { (eval echo configure:6104: \"$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 @@ -6004,7 +6136,7 @@ if test $space = no; then # DEC Alpha running OSF/1 echo $ac_n "checking for 3-argument statfs function (DEC OSF/1)""... $ac_c" 1>&6 -echo "configure:6008: checking for 3-argument statfs function (DEC OSF/1)" >&5 +echo "configure:6140: checking for 3-argument statfs function (DEC OSF/1)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs3_osf1'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6012,7 +6144,7 @@ fu_cv_sys_stat_statfs3_osf1=no else cat > conftest.$ac_ext < @@ -6025,7 +6157,7 @@ exit (statfs (".", &fsd, sizeof (struct statfs))); } EOF -if { (eval echo configure:6029: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:6161: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then fu_cv_sys_stat_statfs3_osf1=yes else @@ -6052,7 +6184,7 @@ if test $space = no; then # AIX echo $ac_n "checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)""... $ac_c" 1>&6 -echo "configure:6056: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5 +echo "configure:6188: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_bsize'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6060,7 +6192,7 @@ fu_cv_sys_stat_statfs2_bsize=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:6215: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then fu_cv_sys_stat_statfs2_bsize=yes else @@ -6106,7 +6238,7 @@ if test $space = no; then # SVR3 echo $ac_n "checking for four-argument statfs (AIX-3.2.5, SVR3)""... $ac_c" 1>&6 -echo "configure:6110: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5 +echo "configure:6242: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs4'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6114,7 +6246,7 @@ fu_cv_sys_stat_statfs4=no else cat > conftest.$ac_ext < #include @@ -6124,7 +6256,7 @@ exit (statfs (".", &fsd, sizeof fsd, 0)); } EOF -if { (eval echo configure:6128: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:6260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then fu_cv_sys_stat_statfs4=yes else @@ -6151,7 +6283,7 @@ if test $space = no; then # 4.4BSD and NetBSD echo $ac_n "checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)""... $ac_c" 1>&6 -echo "configure:6155: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5 +echo "configure:6287: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_fsize'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6159,7 +6291,7 @@ fu_cv_sys_stat_statfs2_fsize=no else cat > conftest.$ac_ext < #ifdef HAVE_SYS_PARAM_H @@ -6175,7 +6307,7 @@ exit (statfs (".", &fsd)); } EOF -if { (eval echo configure:6179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:6311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then fu_cv_sys_stat_statfs2_fsize=yes else @@ -6202,7 +6334,7 @@ if test $space = no; then # Ultrix echo $ac_n "checking for two-argument statfs with struct fs_data (Ultrix)""... $ac_c" 1>&6 -echo "configure:6206: checking for two-argument statfs with struct fs_data (Ultrix)" >&5 +echo "configure:6338: checking for two-argument statfs with struct fs_data (Ultrix)" >&5 if eval "test \"`echo '$''{'fu_cv_sys_stat_fs_data'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6210,7 +6342,7 @@ fu_cv_sys_stat_fs_data=no else cat > conftest.$ac_ext < @@ -6231,7 +6363,7 @@ exit (statfs (".", &fsd) != 1); } EOF -if { (eval echo configure:6235: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:6367: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then fu_cv_sys_stat_fs_data=yes else @@ -6259,12 +6391,12 @@ echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:6263: checking for mode_t" >&5 +echo "configure:6395: checking for mode_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -6273,7 +6405,7 @@ #endif EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then + egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then rm -rf conftest* ac_cv_type_mode_t=yes else @@ -6292,12 +6424,12 @@ fi echo $ac_n "checking for umode_t""... $ac_c" 1>&6 -echo "configure:6296: checking for umode_t" >&5 +echo "configure:6428: checking for umode_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_umode_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -6306,7 +6438,7 @@ #endif EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "umode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then + egrep "(^|[^a-zA-Z_0-9])umode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then rm -rf conftest* ac_cv_type_umode_t=yes else @@ -6325,12 +6457,12 @@ fi echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:6329: checking for off_t" >&5 +echo "configure:6461: 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 @@ -6339,7 +6471,7 @@ #endif EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then + egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then rm -rf conftest* ac_cv_type_off_t=yes else @@ -6358,12 +6490,12 @@ fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:6362: checking for pid_t" >&5 +echo "configure:6494: checking for pid_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -6372,7 +6504,7 @@ #endif EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then + egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then rm -rf conftest* ac_cv_type_pid_t=yes else @@ -6391,12 +6523,12 @@ fi echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:6395: checking for uid_t in sys/types.h" >&5 +echo "configure:6527: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -6425,12 +6557,12 @@ fi echo $ac_n "checking for nlink_t""... $ac_c" 1>&6 -echo "configure:6429: checking for nlink_t" >&5 +echo "configure:6561: checking for nlink_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_nlink_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -6439,7 +6571,7 @@ #endif EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "nlink_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then + egrep "(^|[^a-zA-Z_0-9])nlink_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then rm -rf conftest* ac_cv_type_nlink_t=yes else @@ -6462,18 +6594,18 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:6466: checking for $ac_hdr" >&5 +echo "configure:6598: 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:6476: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:6608: \"$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* eval "ac_cv_header_$ac_safe=yes" @@ -6501,12 +6633,12 @@ for ac_func in getpagesize do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6505: checking for $ac_func" >&5 +echo "configure:6637: 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; then +if { (eval echo configure:6665: \"$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 @@ -6554,7 +6686,7 @@ done echo $ac_n "checking for working mmap""... $ac_c" 1>&6 -echo "configure:6558: checking for working mmap" >&5 +echo "configure:6690: 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 @@ -6562,7 +6694,7 @@ ac_cv_func_mmap_fixed_mapped=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:6838: \"$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 @@ -6727,19 +6859,19 @@ # 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:6731: checking for working alloca.h" >&5 +echo "configure:6863: 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() { char *p = alloca(2 * sizeof(int)); ; return 0; } EOF -if { (eval echo configure:6743: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6875: \"$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 @@ -6760,25 +6892,30 @@ fi echo $ac_n "checking for alloca""... $ac_c" 1>&6 -echo "configure:6764: checking for alloca" >&5 +echo "configure:6896: 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 < +# ifdef _MSC_VER +# include +# define alloca _alloca # else -# ifdef _AIX - #pragma alloca +# if HAVE_ALLOCA_H +# include # else -# ifndef alloca /* predefined by HP cc +Olibcalls */ +# ifdef _AIX + #pragma alloca +# else +# ifndef alloca /* predefined by HP cc +Olibcalls */ char *alloca (); +# endif # endif # endif # endif @@ -6788,7 +6925,7 @@ char *p = (char *) alloca(1); ; return 0; } EOF -if { (eval echo configure:6792: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:6929: \"$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 @@ -6813,19 +6950,19 @@ # that cause trouble. Some versions do not even contain alloca or # contain a buggy version. If you still want to use their alloca, # use ar to extract alloca.o from them instead of compiling alloca.c. - ALLOCA=alloca.o + ALLOCA=alloca.${ac_objext} cat >> confdefs.h <<\EOF #define C_ALLOCA 1 EOF echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 -echo "configure:6824: checking whether alloca needs Cray hooks" >&5 +echo "configure:6961: 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 -echo "configure:6854: checking for $ac_func" >&5 +echo "configure:6991: 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; then +if { (eval echo configure:7019: \"$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 @@ -6905,7 +7042,7 @@ fi echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 -echo "configure:6909: checking stack direction for C alloca" >&5 +echo "configure:7046: 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 @@ -6913,7 +7050,7 @@ ac_cv_c_stack_direction=0 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:7073: \"$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 @@ -6960,7 +7097,7 @@ # Uses ac_ vars as temps to allow command line to override cache and checks. # --without-x overrides everything else, but does not touch the cache. echo $ac_n "checking for X""... $ac_c" 1>&6 -echo "configure:6964: checking for X" >&5 +echo "configure:7101: checking for X" >&5 # Check whether --with-x or --without-x was given. if test "${with_x+set}" = set; then @@ -7022,13 +7159,13 @@ # First, try using that file with no special directory specified. cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:7031: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:7168: \"$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* # We can compile using X headers with no special include directory. @@ -7096,14 +7233,14 @@ ac_save_LIBS="$LIBS" LIBS="-l$x_direct_test_library $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:7244: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* LIBS="$ac_save_LIBS" # We can link X programs with no special library path. @@ -7209,17 +7346,17 @@ case "`(uname -sr) 2>/dev/null`" in "SunOS 5"*) echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6 -echo "configure:7213: checking whether -R must be followed by a space" >&5 +echo "configure:7350: checking whether -R must be followed by a space" >&5 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:7360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_R_nospace=yes else @@ -7235,14 +7372,14 @@ else LIBS="$ac_xsave_LIBS -R $x_libraries" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:7383: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_R_space=yes else @@ -7274,7 +7411,7 @@ # libraries were built with DECnet support. And karl@cs.umb.edu says # the Alpha needs dnet_stub (dnet does not exist). echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6 -echo "configure:7278: checking for dnet_ntoa in -ldnet" >&5 +echo "configure:7415: checking for dnet_ntoa in -ldnet" >&5 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7282,7 +7419,7 @@ ac_save_LIBS="$LIBS" LIBS="-ldnet $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:7434: \"$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 @@ -7315,7 +7452,7 @@ if test $ac_cv_lib_dnet_dnet_ntoa = no; then echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6 -echo "configure:7319: checking for dnet_ntoa in -ldnet_stub" >&5 +echo "configure:7456: checking for dnet_ntoa in -ldnet_stub" >&5 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7323,7 +7460,7 @@ ac_save_LIBS="$LIBS" LIBS="-ldnet_stub $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:7475: \"$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 @@ -7363,12 +7500,12 @@ # The nsl library prevents programs from opening the X display # on Irix 5.2, according to dickey@clark.net. echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6 -echo "configure:7367: checking for gethostbyname" >&5 +echo "configure:7504: checking for gethostbyname" >&5 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:7532: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_gethostbyname=yes" else @@ -7412,7 +7549,7 @@ if test $ac_cv_func_gethostbyname = no; then echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6 -echo "configure:7416: checking for gethostbyname in -lnsl" >&5 +echo "configure:7553: checking for gethostbyname in -lnsl" >&5 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7420,7 +7557,7 @@ ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:7572: \"$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 @@ -7461,12 +7598,12 @@ # -lsocket must be given before -lnsl if both are needed. # We assume that if connect needs -lnsl, so does gethostbyname. echo $ac_n "checking for connect""... $ac_c" 1>&6 -echo "configure:7465: checking for connect" >&5 +echo "configure:7602: checking for connect" >&5 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:7630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_connect=yes" else @@ -7510,7 +7647,7 @@ if test $ac_cv_func_connect = no; then echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6 -echo "configure:7514: checking for connect in -lsocket" >&5 +echo "configure:7651: checking for connect in -lsocket" >&5 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7518,7 +7655,7 @@ ac_save_LIBS="$LIBS" LIBS="-lsocket $X_EXTRA_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:7670: \"$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 @@ -7553,12 +7690,12 @@ # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX. echo $ac_n "checking for remove""... $ac_c" 1>&6 -echo "configure:7557: checking for remove" >&5 +echo "configure:7694: checking for remove" >&5 if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:7722: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_remove=yes" else @@ -7602,7 +7739,7 @@ if test $ac_cv_func_remove = no; then echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6 -echo "configure:7606: checking for remove in -lposix" >&5 +echo "configure:7743: checking for remove in -lposix" >&5 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7610,7 +7747,7 @@ ac_save_LIBS="$LIBS" LIBS="-lposix $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:7762: \"$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 @@ -7645,12 +7782,12 @@ # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. echo $ac_n "checking for shmat""... $ac_c" 1>&6 -echo "configure:7649: checking for shmat" >&5 +echo "configure:7786: checking for shmat" >&5 if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:7814: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_shmat=yes" else @@ -7694,7 +7831,7 @@ if test $ac_cv_func_shmat = no; then echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6 -echo "configure:7698: checking for shmat in -lipc" >&5 +echo "configure:7835: checking for shmat in -lipc" >&5 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7702,7 +7839,7 @@ ac_save_LIBS="$LIBS" LIBS="-lipc $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:7854: \"$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 @@ -7746,15 +7883,15 @@ # libraries we check for below, so use a different variable. # --interran@uluru.Stanford.EDU, kb@cs.umb.edu. echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6 -echo "configure:7750: checking for IceConnectionNumber in -lICE" >&5 +echo "configure:7887: checking for IceConnectionNumber in -lICE" >&5 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" -LIBS="-lICE $LIBS" +LIBS="-lICE $X_EXTRA_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:7906: \"$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 @@ -7792,7 +7929,7 @@ echo $ac_n "checking for t_accept in -lnsl""... $ac_c" 1>&6 -echo "configure:7796: checking for t_accept in -lnsl" >&5 +echo "configure:7933: checking for t_accept in -lnsl" >&5 ac_lib_var=`echo nsl'_'t_accept | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7800,7 +7937,7 @@ ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:7952: \"$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 @@ -7839,7 +7976,7 @@ fi echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6 -echo "configure:7843: checking for socket in -lsocket" >&5 +echo "configure:7980: checking for socket in -lsocket" >&5 ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7847,7 +7984,7 @@ ac_save_LIBS="$LIBS" LIBS="-lsocket $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:7999: \"$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 @@ -7890,12 +8027,12 @@ for ac_func in socket do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7894: checking for $ac_func" >&5 +echo "configure:8031: 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; then +if { (eval echo configure:8059: \"$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 @@ -7946,7 +8083,7 @@ # socket is not in the default libraries. See if it's in some other. for lib in bsd socket inet; do echo $ac_n "checking for socket in -l$lib""... $ac_c" 1>&6 -echo "configure:7950: checking for socket in -l$lib" >&5 +echo "configure:8087: checking for socket in -l$lib" >&5 ac_lib_var=`echo $lib'_'socket | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7954,7 +8091,7 @@ ac_save_LIBS="$LIBS" LIBS="-l$lib $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:8106: \"$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 @@ -7997,12 +8134,12 @@ have_gethostbyname=no echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6 -echo "configure:8001: checking for gethostbyname" >&5 +echo "configure:8138: checking for gethostbyname" >&5 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:8166: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_gethostbyname=yes" else @@ -8048,7 +8185,7 @@ # gethostbyname is not in the default libraries. See if it's in some other. for lib in bsd socket inet; do echo $ac_n "checking for gethostbyname in -l$lib""... $ac_c" 1>&6 -echo "configure:8052: checking for gethostbyname in -l$lib" >&5 +echo "configure:8189: checking for gethostbyname in -l$lib" >&5 ac_lib_var=`echo $lib'_'gethostbyname | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8056,7 +8193,7 @@ ac_save_LIBS="$LIBS" LIBS="-l$lib $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:8208: \"$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 @@ -8093,12 +8230,12 @@ for ac_func in socketpair do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8097: checking for $ac_func" >&5 +echo "configure:8234: 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; then +if { (eval echo configure:8262: \"$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 @@ -8147,7 +8284,7 @@ echo $ac_n "checking for get_process_stats in -lseq""... $ac_c" 1>&6 -echo "configure:8151: checking for get_process_stats in -lseq" >&5 +echo "configure:8288: checking for get_process_stats in -lseq" >&5 ac_lib_var=`echo seq'_'get_process_stats | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8155,7 +8292,7 @@ ac_save_LIBS="$LIBS" LIBS="-lseq $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:8307: \"$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 @@ -8194,7 +8331,7 @@ echo $ac_n "checking for t_accept in -lnsl""... $ac_c" 1>&6 -echo "configure:8198: checking for t_accept in -lnsl" >&5 +echo "configure:8335: checking for t_accept in -lnsl" >&5 ac_lib_var=`echo nsl'_'t_accept | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8202,7 +8339,7 @@ ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:8354: \"$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 @@ -8241,7 +8378,7 @@ fi echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6 -echo "configure:8245: checking for socket in -lsocket" >&5 +echo "configure:8382: checking for socket in -lsocket" >&5 ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8249,7 +8386,7 @@ ac_save_LIBS="$LIBS" LIBS="-lsocket $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:8401: \"$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 @@ -8292,12 +8429,12 @@ for ac_func in socket do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8296: checking for $ac_func" >&5 +echo "configure:8433: 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; then +if { (eval echo configure:8461: \"$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 @@ -8348,7 +8485,7 @@ # socket is not in the default libraries. See if it's in some other. for lib in bsd socket inet; do echo $ac_n "checking for socket in -l$lib""... $ac_c" 1>&6 -echo "configure:8352: checking for socket in -l$lib" >&5 +echo "configure:8489: checking for socket in -l$lib" >&5 ac_lib_var=`echo $lib'_'socket | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8356,7 +8493,7 @@ ac_save_LIBS="$LIBS" LIBS="-l$lib $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:8508: \"$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 @@ -8399,12 +8536,12 @@ have_gethostbyname=no echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6 -echo "configure:8403: checking for gethostbyname" >&5 +echo "configure:8540: checking for gethostbyname" >&5 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:8568: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_gethostbyname=yes" else @@ -8450,7 +8587,7 @@ # gethostbyname is not in the default libraries. See if it's in some other. for lib in bsd socket inet; do echo $ac_n "checking for gethostbyname in -l$lib""... $ac_c" 1>&6 -echo "configure:8454: checking for gethostbyname in -l$lib" >&5 +echo "configure:8591: checking for gethostbyname in -l$lib" >&5 ac_lib_var=`echo $lib'_'gethostbyname | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8458,7 +8595,7 @@ ac_save_LIBS="$LIBS" LIBS="-l$lib $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:8610: \"$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 @@ -8499,14 +8636,14 @@ av_struct_linger=no echo $ac_n "checking struct linger is available""... $ac_c" 1>&6 -echo "configure:8503: checking struct linger is available" >&5 +echo "configure:8640: checking struct linger is available" >&5 if test "$cross_compiling" = yes; then av_struct_linger=no else cat > conftest.$ac_ext < @@ -8522,7 +8659,7 @@ } EOF -if { (eval echo configure:8526: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:8663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then cat >> confdefs.h <<\EOF @@ -8547,12 +8684,12 @@ for ac_func in pmap_set do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8551: checking for $ac_func" >&5 +echo "configure:8688: 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; then +if { (eval echo configure:8716: \"$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 @@ -8597,7 +8734,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for pmap_set in -lrpc""... $ac_c" 1>&6 -echo "configure:8601: checking for pmap_set in -lrpc" >&5 +echo "configure:8738: checking for pmap_set in -lrpc" >&5 ac_lib_var=`echo rpc'_'pmap_set | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8605,7 +8742,7 @@ ac_save_LIBS="$LIBS" LIBS="-lrpc $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:8757: \"$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 @@ -8648,12 +8785,12 @@ for ac_func in pmap_getport pmap_getmaps rresvport do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8652: checking for $ac_func" >&5 +echo "configure:8789: 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; then +if { (eval echo configure:8817: \"$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 @@ -8704,18 +8841,18 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:8708: checking for $ac_hdr" >&5 +echo "configure:8845: 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:8718: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:8855: \"$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* eval "ac_cv_header_$ac_safe=yes" @@ -8933,7 +9070,7 @@ else echo $ac_n "checking for Gpm_Repeat in -lgpm""... $ac_c" 1>&6 -echo "configure:8937: checking for Gpm_Repeat in -lgpm" >&5 +echo "configure:9074: checking for Gpm_Repeat in -lgpm" >&5 ac_lib_var=`echo gpm'_'Gpm_Repeat | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -8941,7 +9078,7 @@ ac_save_LIBS="$LIBS" LIBS="-lgpm $LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:9093: \"$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 @@ -9091,7 +9228,7 @@ # Extract the first word of "gnome-config", so it can be a program name with args. set dummy gnome-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:9095: checking for $ac_word" >&5 +echo "configure:9232: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GNOME_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9099,9 +9236,13 @@ /*) ac_cv_path_GNOME_CONFIG="$GNOME_CONFIG" # Let the user override the test with a path. ;; + ?:/*) + ac_cv_path_GNOME_CONFIG="$GNOME_CONFIG" # Let the user override the test with a dos path. + ;; *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_path_GNOME_CONFIG="$ac_dir/$ac_word" @@ -9124,7 +9265,7 @@ no_gnome_config="yes" else echo $ac_n "checking if $GNOME_CONFIG works""... $ac_c" 1>&6 -echo "configure:9128: checking if $GNOME_CONFIG works" >&5 +echo "configure:9269: checking if $GNOME_CONFIG works" >&5 if $GNOME_CONFIG --libs-only-l gnome >/dev/null 2>&1; then echo "$ac_t""yes" 1>&6 @@ -9132,7 +9273,7 @@ # Extract the first word of "orbit-config", so it can be a program name with args. set dummy orbit-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:9136: checking for $ac_word" >&5 +echo "configure:9277: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_ORBIT_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9140,9 +9281,13 @@ /*) ac_cv_path_ORBIT_CONFIG="$ORBIT_CONFIG" # Let the user override the test with a path. ;; + ?:/*) + ac_cv_path_ORBIT_CONFIG="$ORBIT_CONFIG" # Let the user override the test with a dos path. + ;; *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_path_ORBIT_CONFIG="$ac_dir/$ac_word" @@ -9164,7 +9309,7 @@ # Extract the first word of "orbit-idl", so it can be a program name with args. set dummy orbit-idl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:9168: checking for $ac_word" >&5 +echo "configure:9313: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_ORBIT_IDL'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9172,9 +9317,13 @@ /*) ac_cv_path_ORBIT_IDL="$ORBIT_IDL" # Let the user override the test with a path. ;; + ?:/*) + ac_cv_path_ORBIT_IDL="$ORBIT_IDL" # Let the user override the test with a dos path. + ;; *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_path_ORBIT_IDL="$ac_dir/$ac_word" @@ -9194,7 +9343,7 @@ fi echo $ac_n "checking for working ORBit environment""... $ac_c" 1>&6 -echo "configure:9198: checking for working ORBit environment" >&5 +echo "configure:9347: checking for working ORBit environment" >&5 if eval "test \"`echo '$''{'gnome_cv_orbit_found'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9230,7 +9379,7 @@ fi echo $ac_n "checking for gnorba libraries""... $ac_c" 1>&6 -echo "configure:9234: checking for gnorba libraries" >&5 +echo "configure:9383: checking for gnorba libraries" >&5 if eval "test \"`echo '$''{'gnome_cv_gnorba_found'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9304,7 +9453,7 @@ if test "$no_gnome_config" = "yes"; then echo $ac_n "checking for gnomeConf.sh file in $gnome_prefix""... $ac_c" 1>&6 -echo "configure:9308: checking for gnomeConf.sh file in $gnome_prefix" >&5 +echo "configure:9457: checking for gnomeConf.sh file in $gnome_prefix" >&5 if test -f $gnome_prefix/gnomeConf.sh; then echo "$ac_t""found" 1>&6 echo "loading gnome configuration from" \ @@ -9338,15 +9487,16 @@ # Extract the first word of "nroff", so it can be a program name with args. set dummy nroff; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:9342: checking for $ac_word" >&5 +echo "configure:9491: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_HAVE_nroff'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$HAVE_nroff"; then ac_cv_prog_HAVE_nroff="$HAVE_nroff" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_prog_HAVE_nroff="true" @@ -9366,7 +9516,7 @@ if $HAVE_nroff; then echo $ac_n "checking for manual formatting macros""... $ac_c" 1>&6 -echo "configure:9370: checking for manual formatting macros" >&5 +echo "configure:9520: checking for manual formatting macros" >&5 if eval "test \"`echo '$''{'ac_cv_mandoc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9390,7 +9540,7 @@ if $HAVE_nroff; then echo $ac_n "checking If nroff accepts -Tascii""... $ac_c" 1>&6 -echo "configure:9394: checking If nroff accepts -Tascii" >&5 +echo "configure:9544: checking If nroff accepts -Tascii" >&5 if eval "test \"`echo '$''{'ac_cv_nroff_tascii'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9414,15 +9564,16 @@ # Extract the first word of "file", so it can be a program name with args. set dummy file; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:9418: checking for $ac_word" >&5 +echo "configure:9568: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_HAVE_FILECMD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$HAVE_FILECMD"; then ac_cv_prog_HAVE_FILECMD="$HAVE_FILECMD" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_prog_HAVE_FILECMD="true" @@ -9442,7 +9593,7 @@ if $HAVE_FILECMD; then echo $ac_n "checking for - option to file command""... $ac_c" 1>&6 -echo "configure:9446: checking for - option to file command" >&5 +echo "configure:9597: checking for - option to file command" >&5 if eval "test \"`echo '$''{'ac_cv_filestdin'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9485,7 +9636,7 @@ echo $ac_n "checking for -L option to file command""... $ac_c" 1>&6 -echo "configure:9489: checking for -L option to file command" >&5 +echo "configure:9640: checking for -L option to file command" >&5 if eval "test \"`echo '$''{'ac_cv_filel'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9511,7 +9662,7 @@ fi echo $ac_n "checking for - option to grep command""... $ac_c" 1>&6 -echo "configure:9515: checking for - option to grep command" >&5 +echo "configure:9666: checking for - option to grep command" >&5 if eval "test \"`echo '$''{'ac_cv_grep_stdin'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9551,7 +9702,7 @@ echo $ac_n "checking for subshell support""... $ac_c" 1>&6 -echo "configure:9555: checking for subshell support" >&5 +echo "configure:9706: checking for subshell support" >&5 # Check whether --with-subshell or --without-subshell was given. if test "${with_subshell+set}" = set; then withval="$with_subshell" @@ -9693,7 +9844,7 @@ slang_term="" slang_use_system_installed_lib=false echo $ac_n "checking for SLang_init_tty in -lslang""... $ac_c" 1>&6 -echo "configure:9697: checking for SLang_init_tty in -lslang" >&5 +echo "configure:9848: checking for SLang_init_tty in -lslang" >&5 ac_lib_var=`echo slang'_'SLang_init_tty | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -9701,7 +9852,7 @@ ac_save_LIBS="$LIBS" LIBS="-lslang $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:9867: \"$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 @@ -9731,18 +9882,18 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:9735: checking for $ac_hdr" >&5 +echo "configure:9886: 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:9745: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:9896: \"$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* eval "ac_cv_header_$ac_safe=yes" @@ -9776,18 +9927,18 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:9780: checking for $ac_hdr" >&5 +echo "configure:9931: 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:9790: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:9941: \"$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* eval "ac_cv_header_$ac_safe=yes" @@ -9856,7 +10007,7 @@ EOF echo $ac_n "checking for tgoto in -ltermcap""... $ac_c" 1>&6 -echo "configure:9860: checking for tgoto in -ltermcap" >&5 +echo "configure:10011: checking for tgoto in -ltermcap" >&5 ac_lib_var=`echo termcap'_'tgoto | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -9864,7 +10015,7 @@ ac_save_LIBS="$LIBS" LIBS="-ltermcap $LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:10030: \"$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 @@ -9939,12 +10090,16 @@ LSLANG="-lslang" screen_manager="SLang (using system-installed library)" echo "$ac_t""Using system installed SLang library" 1>&6 + rm slang/slang.h else MCCPPFLAGS="$MCCPPFLAGS -I\$(slangdir)" LIBSLANG="libmcslang.a" screen_manager="SLang" LSLANG="-lmcslang" + CPPFLAGS="$CPPFLAGS -I../slang" fastdepslang=fastdepslang + rm slang/slang.h + ln -s ../$srcdir/slang/slang-mc.h slang/slang.h fi if $slang_check_lib then @@ -9982,7 +10137,7 @@ EOF echo $ac_n "checking for tgoto in -ltermcap""... $ac_c" 1>&6 -echo "configure:9986: checking for tgoto in -ltermcap" >&5 +echo "configure:10141: checking for tgoto in -ltermcap" >&5 ac_lib_var=`echo termcap'_'tgoto | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -9990,7 +10145,7 @@ ac_save_LIBS="$LIBS" LIBS="-ltermcap $LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:10160: \"$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 @@ -10176,18 +10331,18 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:10180: checking for $ac_hdr" >&5 +echo "configure:10335: 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:10190: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:10345: \"$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* eval "ac_cv_header_$ac_safe=yes" @@ -10239,7 +10394,7 @@ fi else echo $ac_n "checking for ext2fs_close in -lext2fs""... $ac_c" 1>&6 -echo "configure:10243: checking for ext2fs_close in -lext2fs" >&5 +echo "configure:10398: checking for ext2fs_close in -lext2fs" >&5 ac_lib_var=`echo ext2fs'_'ext2fs_close | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -10247,7 +10402,7 @@ ac_save_LIBS="$LIBS" LIBS="-lext2fs -lcom_err $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:10417: \"$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 @@ -10279,18 +10434,18 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:10283: checking for $ac_hdr" >&5 +echo "configure:10438: 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:10293: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:10448: \"$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* eval "ac_cv_header_$ac_safe=yes" @@ -10354,7 +10509,7 @@ if $search_ncurses then echo "checking "location of ncurses.h file"" 1>&6 -echo "configure:10358: checking "location of ncurses.h file"" >&5 +echo "configure:10513: checking "location of ncurses.h file"" >&5 if $search_ncurses @@ -10494,7 +10649,7 @@ if $search_ncurses then cat > conftest.$ac_ext < EOF @@ -10520,7 +10675,7 @@ rm -f conftest* cat > conftest.$ac_ext < @@ -10580,10 +10735,10 @@ else # check for ncurses version, to properly ifdef mouse-fix echo $ac_n "checking for ncurses version""... $ac_c" 1>&6 -echo "configure:10584: checking for ncurses version" >&5 +echo "configure:10739: checking for ncurses version" >&5 ncurses_version=unknown cat > conftest.$ac_ext < @@ -10621,15 +10776,18 @@ esac fi fi + +SAVED_LIBS="$LIBS" +LIBS="$LIBS $LGPM" for ac_func in resizeterm keyok do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:10628: checking for $ac_func" >&5 +echo "configure:10786: 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; then +if { (eval echo configure:10814: \"$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 @@ -10676,6 +10834,7 @@ fi done +LIBS="$SAVED_LIBS" if test "x$screen_manager" = "xunknown"; then cat >> confdefs.h <<\EOF @@ -10692,12 +10851,16 @@ LSLANG="-lslang" screen_manager="SLang (using system-installed library)" echo "$ac_t""Using system installed SLang library" 1>&6 + rm slang/slang.h else MCCPPFLAGS="$MCCPPFLAGS -I\$(slangdir)" LIBSLANG="libmcslang.a" screen_manager="SLang" LSLANG="-lmcslang" + CPPFLAGS="$CPPFLAGS -I../slang" fastdepslang=fastdepslang + rm slang/slang.h + ln -s ../$srcdir/slang/slang-mc.h slang/slang.h fi if $slang_check_lib then @@ -10735,7 +10898,7 @@ EOF echo $ac_n "checking for tgoto in -ltermcap""... $ac_c" 1>&6 -echo "configure:10739: checking for tgoto in -ltermcap" >&5 +echo "configure:10902: checking for tgoto in -ltermcap" >&5 ac_lib_var=`echo termcap'_'tgoto | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -10743,7 +10906,7 @@ ac_save_LIBS="$LIBS" LIBS="-ltermcap $LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:10921: \"$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 @@ -10794,7 +10957,7 @@ install_saver="yes" echo $ac_n "checking for pam_start in -lpam""... $ac_c" 1>&6 -echo "configure:10798: checking for pam_start in -lpam" >&5 +echo "configure:10961: checking for pam_start in -lpam" >&5 ac_lib_var=`echo pam'_'pam_start | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -10802,7 +10965,7 @@ ac_save_LIBS="$LIBS" LIBS="-lpam -ldl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:10980: \"$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 @@ -10856,7 +11019,7 @@ else echo $ac_n "checking for -lXpm""... $ac_c" 1>&6 -echo "configure:10860: checking for -lXpm" >&5 +echo "configure:11023: checking for -lXpm" >&5 if eval "test \"`echo '$''{'ac_cv_has_xpm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10872,7 +11035,7 @@ has_xpm_save_CFLAGS=$CFLAGS CFLAGS="$CFLAGS $X_CFLAGS" cat > conftest.$ac_ext < @@ -10882,7 +11045,7 @@ XpmLibraryVersion(); ; return 0; } EOF -if { (eval echo configure:10886: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:11049: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_has_xpm=yes else @@ -10904,7 +11067,7 @@ echo $ac_n "checking for X11 non-rectangular shape extension""... $ac_c" 1>&6 -echo "configure:10908: checking for X11 non-rectangular shape extension" >&5 +echo "configure:11071: checking for X11 non-rectangular shape extension" >&5 if eval "test \"`echo '$''{'ac_cv_has_shape'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10920,7 +11083,7 @@ has_shape_save_CFLAGS=$CFLAGS CFLAGS="$CFLAGS $X_CFLAGS" cat > conftest.$ac_ext < @@ -10935,7 +11098,7 @@ ; return 0; } EOF -if { (eval echo configure:10939: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:11102: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_has_shape=yes else @@ -10971,7 +11134,7 @@ echo else echo $ac_n "checking for setupterm in -lcurses""... $ac_c" 1>&6 -echo "configure:10975: checking for setupterm in -lcurses" >&5 +echo "configure:11138: checking for setupterm in -lcurses" >&5 ac_lib_var=`echo curses'_'setupterm | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -10979,7 +11142,7 @@ ac_save_LIBS="$LIBS" LIBS="-lcurses $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:11157: \"$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 @@ -11007,7 +11170,7 @@ echo "$ac_t""yes" 1>&6 cat > conftest.$ac_ext < @@ -11020,7 +11183,7 @@ ; return 0; } EOF -if { (eval echo configure:11024: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11187: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* LIBS="$LIBS -lcurses" @@ -11110,7 +11273,7 @@ # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. (set) 2>&1 | - case `(ac_space=' '; set) 2>&1` in + case `(ac_space=' '; set | grep ac_space) 2>&1` in *ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote substitution # turns \\\\ into \\, and sed turns \\ into \). @@ -11177,7 +11340,7 @@ echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; -version | --version | --versio | --versi | --vers | --ver | --ve | --v) - echo "$CONFIG_STATUS generated by autoconf version 2.12" + echo "$CONFIG_STATUS generated by autoconf version 2.13" exit 0 ;; -help | --help | --hel | --he | --h) echo "\$ac_cs_usage"; exit 0 ;; @@ -11224,9 +11387,11 @@ s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF $ac_vpsub $extrasub +s%@SHELL@%$SHELL%g s%@CFLAGS@%$CFLAGS%g s%@CPPFLAGS@%$CPPFLAGS%g s%@CXXFLAGS@%$CXXFLAGS%g +s%@FFLAGS@%$FFLAGS%g s%@DEFS@%$DEFS%g s%@LDFLAGS@%$LDFLAGS%g s%@LIBS@%$LIBS%g @@ -11246,6 +11411,7 @@ s%@infodir@%$infodir%g s%@mandir@%$mandir%g s%@VERSION@%$VERSION%g +s%@PACKAGE@%$PACKAGE%g s%@MC@%$MC%g s%@SET_MAKE@%$SET_MAKE%g s%@CC@%$CC%g @@ -11289,6 +11455,7 @@ s%@GLIB_CFLAGS@%$GLIB_CFLAGS%g s%@GLIB_LIBS@%$GLIB_LIBS%g s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g +s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g s%@INSTALL_DATA@%$INSTALL_DATA%g s%@REGEX_O@%$REGEX_O%g s%@LIBOBJS@%$LIBOBJS%g diff -ruN old/mc-4.5.9/configure.in new/mc-4.5.10/configure.in --- old/mc-4.5.9/configure.in Mon Jan 18 17:44:07 1999 +++ new/mc-4.5.10/configure.in Sun Jan 31 18:55:18 1999 @@ -5,10 +5,11 @@ AC_CONFIG_HEADER(config.h) PACKAGE=mc -VERSION=4.5.9 +VERSION=4.5.10 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE") AC_DEFINE_UNQUOTED(VERSION, "$VERSION") AC_SUBST(VERSION) +AC_SUBST(PACKAGE) dnl This is path where we're looking for headers in addition to /usr/include dnl and whatever cpp defaults to. @@ -169,7 +170,7 @@ AC_CHECK_FUNCS(strdup memmove pwdauth truncate initgroups putenv) AC_CHECK_FUNCS(memset memcpy tcsetattr tcgetattr cfgetospeed) AC_CHECK_FUNCS(sigaction sigemptyset sigprocmask sigaddset) -AC_CHECK_FUNCS(sysconf) +AC_CHECK_FUNCS(sysconf setuid setreuid) SHADOWLIB= if test x$system = xLinux; then @@ -819,12 +820,16 @@ LSLANG="-lslang" screen_manager="SLang (using system-installed library)" AC_MSG_RESULT(Using system installed SLang library) + rm slang/slang.h else MCCPPFLAGS="$MCCPPFLAGS -I\$(slangdir)" LIBSLANG="libmcslang.a" screen_manager="SLang" LSLANG="-lmcslang" + CPPFLAGS="$CPPFLAGS -I../slang" fastdepslang=fastdepslang + rm slang/slang.h + ln -s ../$srcdir/slang/slang-mc.h slang/slang.h fi if $slang_check_lib then @@ -1071,7 +1076,14 @@ esac fi fi + +dnl Ncurses may be linked against libgpm. Change LIBS temporary for +dnl check for resizeterm and keyok. +dnl +SAVED_LIBS="$LIBS" +LIBS="$LIBS $LGPM" AC_CHECK_FUNCS(resizeterm keyok) +LIBS="$SAVED_LIBS" if test "x$screen_manager" = "xunknown"; then AC_WITH_SLANG diff -ruN old/mc-4.5.9/gnome/ChangeLog new/mc-4.5.10/gnome/ChangeLog --- old/mc-4.5.9/gnome/ChangeLog Mon Jan 18 17:44:12 1999 +++ new/mc-4.5.10/gnome/ChangeLog Sun Jan 31 18:55:19 1999 @@ -1,3 +1,318 @@ +1999-01-27 Miguel de Icaza + + * gnome-file-property-dialog.c (icon_sel_callback): Fix the + conditional here. +Mon Feb 1 00:49:18 1999 Timur Bakeyev + + * gscreen.c (panel_configure_file_list): Add central justification, + as we got it (useless, imho :) + +Sun Jan 31 19:42:47 1999 Norbert Warmuth + + * Makefile.in (install_mx): make it work with srcdir != builddir + (gmc.gnorba is located in $srcdir) + +1999-01-29 Miguel de Icaza + + * gdesktop.c (reload_desktop_icons): Move metadata_unlock after + the positioning loop (as we use the metadata there too). + (desktop_icon_info_new): Accept a new parameter: url. + (drop_url): New function. Creates the files that represent urls + on the desktop. + (text_changed_url): New routine to handle url-renames + + Use the metadata "desktop-url" property to figure out if an icon + represents an url. + +1999-01-28 Jonathan Blandford + + * gnome-file-property-dialog.c (create_settings_pane): We only let + you set info if we are a regular file, or a link to a regular file. + + * gdesktop-icon.c (desktop_icon_reshape): Cut-n-paste error fixed + by Quartic. + +1999-01-27 Jonathan Blandford + + * gnome-file-property-dialog.h (struct _GnomeFilePropertyDialog): + Now make open field mandatory and icon selection optional. + * gnome-file-property-dialog.c: as above + + * gpopup.c (panel_action_properties): only allow setting images if + we_can_afford_the_speed. + + * gicon.c: make we_can_afford_the_speed non-static + +1999-01-27 Miguel de Icaza + + * gcorba.c: Provide new code to activate an existing + FileManagerFactory factory. + + installed gmc is now corba-gmc. plain-gmc is still available if + you want it. + +Thu Jan 28 02:15:48 1999 Timur Bakeyev + + * gdialogs.c: fixed "regexp.h" -> "eregexp.h" conversion. + + * oldnd.c: Replaced copy_strings() with g_strconcat(). + +1999-01-26 Federico Mena Quintero + + * gscreen.c (panel_clist_motion): Stop the emission of the + motion_notify_event signal so that it does not reach the clist. + We do not want it to select rows while dragging. + Replaced copy_strings() with g_strconcat(). + + * gdnd.c (gdnd_validate_action): Do not override GDK_ACTION_ASK. + + * gdesktop.c: Updated the TODO list at the top of the file. + +Wed Jan 27 03:14:46 1999 Timur Bakeyev + + * Converted memory managment to Glib - where it wasn't done. Now we + use g_new()/g_malloc()/g_strdup()/g_free() routings. copy_strings() re- + placed by g_strconcat(), and sprintf() by g_snprintf(). Some other, + minor changes. + +1999-01-26 Federico Mena Quintero + + * gscreen.c (panel_setup_drag_scroll): Renamed from + panel_setup_drag_motion(). + (panel_clist_drag_motion): Use gdnd_validate_action(). + (panel_clist_motion): Return immediately if the event window is + not the clist_window. Otherwise, forward the event to + panel_widget_motion(). + + * gdnd.c (gdnd_find_panel_by_drag_context): New public function to + find a panel based on a drag context. This is basically the old + find_panel_owning_window() made public. + (gdnd_drop_on_directory): Test for the source widget being a tree, + and if so, do not use the default behavior for panels. + (gdnd_validate_action): New function to compute the final drag + action given some conditions. This is now used to make dragging + behavior consistent across the desktop and the file panels. + +1999-01-26 Jonathan Blandford + + * gnome-file-property-dialog.c: Many Many Many changes. Now it's + pretty cool. You can set all meta-data but the icon now. Need to + make gmc do the right thing with it, though. + +1999-01-25 Miguel de Icaza + + * gtkdtree.c (gtk_dtree_select_row): This should be also protected + against async notifications. + +1999-01-25 Federico Mena Quintero + + * gscreen.c (panel_create_icon_display): Only use + GTK_DEST_DEFAULT_DROP since we want to do exotic stuff in the + drag_motion handler to validate drops. + (panel_icon_list_drag_motion): Use gdnd_validate_action(). + + * gdnd.c (gdnd_drop_on_directory): Removed hack that prevented the + user from dropping files on the same panel as the source one. + This should not be done here. + + * gdnd.c (get_action): Sensitize the menu items based on the + allowed actions in the drag context. + (actions): Add some underlined accelerators for the action menu. + + * gdesktop.c (icon_drag_motion): Use S_ISDIR() in addition to + fe->f.link_to_dir. + + * gscreen.c (panel_file_list_scrolled): Removed this function, as + it was not used for anything useful. + + * gdnd.c (gdnd_drop_on_directory): Duh. Use context->action, not + context->suggested_action. + +1999-01-24 Miguel de Icaza + + * gtkdtree.c (gtk_dtree_load_path): Keep track of when we are + loading the tree (and thus we do not care about async + notifications to the tree state changes) and when we are done (and + thus, we care about the async treestore structure notifications). + +1999-01-23 Miguel de Icaza + + * gcmd.c (ep_add_callback): Set Window's position to + GTK_WIN_POS_MOUSE. + (gnome_external_panelize): ditto. + (gnome_filter_cmd): ditto. + + * gdialogs.c (file_progress_query_replace_policy): Set Window's + position to GTK_WIN_POS_MOUSE. + (file_progress_real_query_replace): ditto. + (file_mask_dialog): ditto. + + * gdialogs.c: Tag the strings for localization. Remove debugging + messages. + + * gmain.c (gmc_window_setup_from_panel): Helper routine used to + set the GTK_WIN_POS_MOUSE on a window and set the parent with + gnome_dialog_set_parent (iff you have the WPanel * pointer to the + parent). + + * gtools.c (query_dialog): Set the window position to GTK_WIN_POS_MOUSE. + + * gtkdtree.c (gtk_dtree_destroy): Kill the add_entry notification hook. + (gtk_dtree_init): Install a notification function for treentry. + removal. + (entry_added_callback, entry_removed_callback): Implemented. Now + the tree is in sync with the panels and reload will update the + tree correctly. + +1999-01-22 Federico Mena Quintero + + * gdesktop-icon.c (set_text): Update the call to + gnome_icon_text_item_configure() for the new API. + +1999-01-21 Federico Mena Quintero + + * gdesktop.c (desktop_drag_data_received): Do not force links on + the desktop. + + * gscreen.c (panel_create_file_list): Do not use + GTK_DEST_DEFAULT_ALL for the drop site. Only use + GTK_DEST_DEFAULT_DROP, since we need to check motion ourselves. + (panel_clist_drag_motion): Do not allow dropping on the clist buttons. + (panel_clist_button_press): Do not assign the + panel->maybe_drag_start flag if the user clicked outside the clist_window. + + * gdesktop.h: Removed old crud (desktop_icon_t, icon_t). + + * gscreen.c (drag_types, drop_types): Use the constants from gdnd.h. + +1999-01-21 Jonathan Blandford + + * gnome-file-property-dialog.c (apply_uid_group_change): uh, lets + do this in Octal. (: + + * glayout.c: comment out compare panels. + + * gnome-file-property-dialog.h: new file. This is a new widget + for the file-properties dialog. It doesn't handle mode changes + quite right yet, but does everything else beautifully... + + * gnome-file-property-dialog.c: new file + + * gpopup.c (panel_action_properties): use new dialog + (dicon_properties): as above. + +1999-01-21 Federico Mena Quintero + + * gscreen.c (panel_create_file_list): Added GDK_ACTION_ASK to the + destination actions. + (panel_create_icon_display): Likewise. + (panel_create_tree_view): Likewise. + + * gdesktop.c (desktop_drag_motion): If the user explicitly + requested action ASK, then do not make feedback show MOVE. + + * gscreen.c (panel_widget_motion): Pass in all drag actions now + that Gtk handles button 2 by itself. + + * gdesktop.c (icon_event): Also delay the call to select_icon() + until button release if the icon is selected and there are no + modifier keys pressed. This lets us perform drags on + multi-selections easily. + +1999-01-21 Federico Mena Quintero + + * gdesktop.c (setup_icon_dnd_dest): Always specify ACTION_MOVE, + since we want to be able to move the icons around. Connect to the + drag_motion signal. + (dnd_icon_targets): List desktop icons as a target to be able to + move them just a notch in the desktop. + (icon_drag_motion): Decide which action we can use for dropping + stuff on a desktop icon. + (setup_icon_dnd_dest): Always specify all the actions. + (icon_drag_data_received): Allow for icons to be moved just a + notch by accepting drops from icons. + + * gdnd.h: Added #defines for the DnD target type names. + + * gdnd.c (gdnd_init): New public function to intern the target + atom names. + (gdnd_drag_context_has_target): New public function to see if a + drag context has a certain target type. + + * gdesktop.c (setup_desktop_dnd): Do not use + GTK_DEST_DEFAULT_MOVE, and connect to drag_motion. + (desktop_drag_motion): If we are dragging from a desktop icon, + indicate the action as MOVE. Otherwise, force the action to be + LINK unless the user explicitly requested ASK. + (setup_desktop_dnd): Intern the atoms for the drop targets. + +1999-01-20 Miguel de Icaza + + * gscreen.c: Selection code now is simpler and should be easier to + use in the listing modes. + +1999-01-20 Federico Mena Quintero + + * gicon.h (gicon_image_to_name): Added prototype for + gicon_image_to_name(). + + * gicon.c (gicon_get_icon_for_file): + (gicon_get_icon_for_file_speed): Added a "directory" argument. + It is needed because the file_entry structure only contains the + pruned filename, and we need the complete name for the metadata + functions. + + * gdesktop.c (desktop_icon_info_new): Pass the directory to + gicon_get_icon_for_file_speed(). + + * gpageprop.c (item_properties): Build the directory name and pass + it to gicon_get_icon_for_file_speed(). + + * gscreen.c: Do not #include "directory.xpm". Do #include "setup.h". + Removed unused function button_switch_to(). + + * gscreen.c (panel_fill_panel_icons): Pass the directory to + gicon_get_icon_for_file(). + + * gscreen.c (panel_create_tree_view): Allow button 2 to start the + drag as well. + (panel_clist_scrolling_is_desirable): Make both scrolling + thresholds consistent. Also, do not allow scrolling past the + correct limit. + (panel_icon_list_scrolling_is_desirable): Likewise. + (panel_tree_scrolling_is_desirable): Likewise. + (panel_clist_scroll): Do not allow scrolling past the correct limits. + (panel_icon_list_scroll): Likewise. + (panel_tree_scroll): Likewise. + +1999-01-19 Federico Mena Quintero + + * gscreen.c (panel_create_icon_display): Do not set the style of + the icon list. + +1999-01-20 Miguel de Icaza + + * gprefs.c (apply_callback): Update the directory contents after + the settings have changed. + +1999-01-19 Jonathan Blandford + + * gdialogs.c (file_op_context_create_ui): OP_DELETE now has it's + very own dialog. whee. + + * gscreen.c (panel_create_pixmaps): now we use dir-open.xpm + instead of the (apparently) ugly yellow one. + +1999-01-19 Miguel de Icaza + + * gtkdtree.c (gtk_dtree_select_row): Wonder why the code was + returning for the clicks on the root node. + +1999-01-19 Jonathan Blandford + + * gprefs.c: applied a heavily modified patch by Dave Camp + The preference box now works. + 1999-01-18 Miguel de Icaza * gtkdtree.c (gtk_dtree_construct): And the GTK+ people broke the diff -ruN old/mc-4.5.9/gnome/Makefile.in new/mc-4.5.10/gnome/Makefile.in --- old/mc-4.5.9/gnome/Makefile.in Mon Jan 18 17:44:12 1999 +++ new/mc-4.5.10/gnome/Makefile.in Sun Jan 31 18:55:19 1999 @@ -29,7 +29,6 @@ GNOMESRCS = \ gaction.c \ - gblist.c \ gcache.c \ gcliplabel.c \ gcmd.c \ @@ -51,6 +50,7 @@ gpopup.c \ gprefs.c \ gprop.c \ + gnome-file-property-dialog.c \ gscreen.c \ gtools.c \ gtkdtree.c \ @@ -60,7 +60,6 @@ gwidget.c GNOMEHDRS = \ - gblist.h \ gcache.h \ gcliplabel.h \ gcmd.h \ @@ -77,6 +76,7 @@ gpopup.h \ gprefs.h \ gprop.h \ + gnome-file-property-dialog.h \ gscreen.h \ gtkdtree.h \ gtree.h \ @@ -116,13 +116,13 @@ main-corba.o \ gcorba.o \ FileManager-skels.o \ + FileManager-stubs.o \ FileManager-common.o OBJS = \ $(LOBJS) \ $(OOBJS) \ gaction.o \ - gblist.o \ gcache.o \ gcliplabel.o \ gcmd.o \ @@ -142,6 +142,7 @@ gpopup.o \ gprefs.o \ gprop.o \ + gnome-file-property-dialog.o \ gscreen.o \ gtools.o \ gtree.o \ @@ -169,12 +170,13 @@ FileManager-impl.c: FileManager.h -EXTRA_DIST = gnome.TODO layout gmc.gnorba mc.keys.in.in +EXTRA_DIST = gnome.TODO layout gmc.gnorba mc.keys.in.in gimp.image.desktop DISTGNOME = \ Makefile.in ChangeLog $(EXTRA_DIST) $(CORBA_SOURCES) \ - $(PIXMAPS) $(ICONS) $(GNOMESRCS) $(GNOMEHDRS) - + $(PIXMAPS) $(ICONS) $(GNOMESRCS) $(GNOMEHDRS) $(DISTGNOME_NEW) +DISTGNOME_NEW = \ + gimp.image.desktop application.x-gnumeric.desktop .c.o: $(CC) -c $(CPPFLAGS) $(DEFS) $(CFLAGS) $< @@ -187,12 +189,18 @@ (cd ..; CONFIG_FILES=gnome/Makefile CONFIG_HEADERS= ./config.status) mx: checklinks - $(MAKE) gmc + $(MAKE) plain-gmc $(MAKE) corba-gmc - touch mx + @echo ---------------------------------------------------------- + @echo - + @echo - GMC no longer exists here. Use plain-gmc or corba-gmc + @echo - if you are debugging/working on this. + @echo - + @echo ----------------------------------------------------------- + @touch mx -gmc: @LIBVFS@ $(OBJS) $(NORMALOBJS) @LIBSLANG@ libgtkedit.a - $(CC) -o gmc $(NORMALOBJS) $(OBJS) $(LDFLAGS) -L../vfs -L../slang -L../gtkedit $(EXTRALIBS) $(LIBS) +plain-gmc: @LIBVFS@ $(OBJS) $(NORMALOBJS) @LIBSLANG@ libgtkedit.a + $(CC) -o plain-gmc $(NORMALOBJS) $(OBJS) $(LDFLAGS) -L../vfs -L../slang -L../gtkedit $(EXTRALIBS) $(LIBS) corba-gmc: @LIBVFS@ $(OBJS) $(CORBAOBJS) @LIBSLANG@ libgtkedit.a $(CC) -o corba-gmc $(CORBAOBJS) $(OBJS) $(CORBA_LDFLAGS) -L../vfs -L../slang -L../gtkedit $(EXTRALIBS) $(LIBS) @@ -242,7 +250,7 @@ etags $(GNOMESRCS) clean: - $(RMF) gmc corba-gmc *.o core a.out mx @LIBVFS@ libgtkedit.a libmcslang.a + $(RMF) plain-gmc corba-gmc *.o core a.out mx @LIBVFS@ libgtkedit.a libmcslang.a realclean: clean $(RMF) .depend @@ -268,16 +276,16 @@ $(mcsrcdir)/xmkdir $(DESTDIR)$(libdir) $(mcsrcdir)/xmkdir $(DESTDIR)$(bindir) $(mcsrcdir)/xmkdir $(gnewdir) - $(INSTALL_PROGRAM) gmc $(DESTDIR)$(bindir)/$(binprefix)gmc - $(INSTALL_PROGRAM) corba-gmc $(DESTDIR)$(bindir)/$(binprefix)corba-gmc + $(INSTALL_PROGRAM) plain-gmc $(DESTDIR)$(bindir)/$(binprefix)plain-gmc + $(INSTALL_PROGRAM) corba-gmc $(DESTDIR)$(bindir)/$(binprefix)gmc for I in $(ICONS); \ do $(INSTALL_DATA) $(srcdir)/$$I $(DESTDIR)$(icondir)/$$I; done $(INSTALL_DATA) $(srcdir)/layout $(DESTDIR)$(libdir)/layout $(mcsrcdir)/xmkdir $(DESTDIR)$(datadir)/mime-info $(INSTALL_DATA) mc.keys $(DESTDIR)$(datadir)/mime-info $(mcsrcdir)/xmkdir $(DESTDIR)$(corbadir) - $(INSTALL_DATA) gmc.gnorba $(DESTDIR)$(corbadir) - $(INSTALL_DATA) gimp.image.desktop application.x-gnumeric.desktop $(gnewdir) + $(INSTALL_DATA) $(srcdir)/gmc.gnorba $(DESTDIR)$(corbadir) + uninstall: -$(RMF) $(DESTDIR)$(bindir)/$(binprefix)gmc -$(RMF) $(DESTDIR)$(bindir)/$(binprefix)corba-gmc diff -ruN old/mc-4.5.9/gnome/gaction.c new/mc-4.5.10/gnome/gaction.c --- old/mc-4.5.9/gnome/gaction.c Mon Jan 18 17:44:12 1999 +++ new/mc-4.5.10/gnome/gaction.c Sun Jan 31 18:55:19 1999 @@ -1,9 +1,7 @@ #include #include -#include /* atoi */ -#include "fs.h" -#include "mad.h" #include "x.h" +#include "global.h" #include "dir.h" #include "command.h" #include "panel.h" diff -ruN old/mc-4.5.9/gnome/gblist.c new/mc-4.5.10/gnome/gblist.c --- old/mc-4.5.9/gnome/gblist.c Mon Jan 18 17:44:12 1999 +++ new/mc-4.5.10/gnome/gblist.c Wed Dec 31 19:00:00 1969 @@ -1,68 +0,0 @@ -/* - * gblist: Implements a GtkCList derived widget that does not take any action - * on select and unselect calls. - * - * Author: Miguel de Icaza (miguel@kernel.org) - * (C) 1998 the Free Software Foundation. - */ -#include -#include "config.h" -#include "gblist.h" - -static void -blist_select_row (GtkCList *clist, gint row, gint column, GdkEvent *event) -{ - /* nothing */ -} - -static void -blist_unselect_row (GtkCList *clist, gint row, gint column, GdkEvent *event) -{ - /* nothing */ -} - -static void -gtk_blist_class_init (GtkBListClass *klass) -{ - GtkCListClass *clist_class = (GtkCListClass *) klass; - - clist_class->select_row = blist_select_row; - clist_class->unselect_row = blist_unselect_row; -} - -GtkType -gtk_blist_get_type (void) -{ - static GtkType blist_type = 0; - - if (!blist_type){ - GtkTypeInfo blist_info = - { - "GtkBList", - sizeof (GtkBList), - sizeof (GtkBListClass), - (GtkClassInitFunc) gtk_blist_class_init, - (GtkObjectInitFunc) NULL, - (GtkArgSetFunc) NULL, - (GtkArgGetFunc) NULL, - }; - - blist_type = gtk_type_unique (gtk_clist_get_type (), &blist_info); - } - - return blist_type; -} - -GtkWidget * -gtk_blist_new_with_titles (gint columns, gchar * titles[]) -{ - GtkWidget *widget; - - g_return_val_if_fail (titles != NULL, NULL); - - widget = gtk_type_new (gtk_blist_get_type ()); - - gtk_clist_construct (GTK_CLIST (widget), columns, titles); - - return widget; -} diff -ruN old/mc-4.5.9/gnome/gblist.h new/mc-4.5.10/gnome/gblist.h --- old/mc-4.5.9/gnome/gblist.h Mon Jan 18 17:44:12 1999 +++ new/mc-4.5.10/gnome/gblist.h Wed Dec 31 19:00:00 1969 @@ -1,40 +0,0 @@ -#ifndef __MC_BLIST_H__ -#define __MC_BLIST_H__ - -#include -#include -#include -#include -#include -#include -#include -#include - -#ifdef __cplusplus -extern "C" -{ -#endif /* __cplusplus */ - -#define GTK_BLIST(obj) (GTK_CHECK_CAST ((obj), gtk_blist_get_type (), GtkBList)) -#define GTK_BLIST_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), gtk_blist_get_type (), GtkBListClass)) -#define GTK_IS_BLIST(obj) (GTK_CHECK_TYPE ((obj), gtk_blist_get_type ())) - -typedef struct -{ - GtkCList clist; -} GtkBList; - -typedef struct -{ - GtkCListClass parent_class; -} GtkBListClass; - -GtkType gtk_blist_get_type (void); -GtkWidget *gtk_blist_new_with_titles (gint columns, gchar * titles[]); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - - -#endif /* __GTK_CLIST_H__ */ diff -ruN old/mc-4.5.9/gnome/gcmd.c new/mc-4.5.10/gnome/gcmd.c --- old/mc-4.5.9/gnome/gcmd.c Mon Jan 18 17:44:12 1999 +++ new/mc-4.5.10/gnome/gcmd.c Sun Jan 31 18:55:19 1999 @@ -122,7 +122,7 @@ gnome_close_panel (GtkWidget *widget, WPanel *panel) { Dlg_head *h = panel->widget.parent; - + g_print ("closing the panel\n"); if (panel->timer_id){ gtk_timeout_remove (panel->timer_id); panel->timer_id = -1; @@ -205,6 +205,8 @@ sort_box = gnome_dialog_new (_("Sort By"), GNOME_STOCK_BUTTON_OK, GNOME_STOCK_BUTTON_CANCEL, NULL); + gmc_window_setup_from_panel (GNOME_DIALOG (sort_box), panel); + /* we define this up here so we can pass it in to our callback */ cbox1 = gtk_check_button_new_with_label (N_("Ignore case sensitivity.")); hbox = gtk_hbox_new (FALSE, 0); @@ -323,6 +325,7 @@ dlg = gnome_dialog_new (_("Enter name."), GNOME_STOCK_BUTTON_OK, GNOME_STOCK_BUTTON_CANCEL, NULL); + gtk_window_set_position (GTK_WINDOW (dlg), GTK_WIN_POS_MOUSE); entry = gtk_entry_new (); if (text) gtk_entry_set_text (GTK_ENTRY (entry), text); @@ -468,7 +471,8 @@ data->selected = -1; data->ep_dlg = gnome_dialog_new (_("Run Command"), GNOME_STOCK_BUTTON_OK, GNOME_STOCK_BUTTON_CANCEL, NULL); - + gtk_window_set_position (GTK_WINDOW (data->ep_dlg), GTK_WIN_POS_MOUSE); + /* Frame 1 */ frame = gtk_frame_new (_("Preset Commands")); gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (data->ep_dlg)->vbox), @@ -552,6 +556,7 @@ filter_dlg = gnome_dialog_new (_("Set Filter"), GNOME_STOCK_BUTTON_OK, GNOME_STOCK_BUTTON_CANCEL, NULL); + gtk_window_set_position (GTK_WINDOW (filter_dlg), GTK_WIN_POS_MOUSE); if (easy_patterns) { text1 = "mc_filter_globs"; text3 = _("Show all files"); @@ -642,7 +647,7 @@ /* we break out. */ break; execute (command); - free (command); + g_free (command); } #endif g_list_free (later); diff -ruN old/mc-4.5.9/gnome/gcorba.c new/mc-4.5.10/gnome/gcorba.c --- old/mc-4.5.9/gnome/gcorba.c Mon Jan 18 17:44:12 1999 +++ new/mc-4.5.10/gnome/gcorba.c Sun Jan 31 18:55:19 1999 @@ -189,10 +189,46 @@ return CORBA_OBJECT_NIL; } +int +try_to_activate_running_copy (void) +{ + CORBA_Object name_service; + CORBA_Environment ev; + CosNaming_NameComponent nc[3] = {{"GNOME", "subcontext"}, + {"Servers", "subcontext"}, + {"gmc_filemanager_factory", "object"}}; + CosNaming_Name nom = {0, 3, nc, CORBA_FALSE}; + CORBA_Object retval = CORBA_OBJECT_NIL; + + CORBA_exception_init (&ev); + + name_service = gnome_name_service_get(); + if (name_service == CORBA_OBJECT_NIL) + goto out; + + retval = CosNaming_NamingContext_resolve (name_service, &nom, &ev); + if (ev._major == CORBA_USER_EXCEPTION + && strcmp(CORBA_exception_id(&ev), ex_CosNaming_NamingContext_NotFound) == 0){ + retval = CORBA_OBJECT_NIL; + goto out; + } + + if (CORBA_Object_is_nil (retval, &ev)) + goto out; + + GNOME_FileManagerFactory_create_window (retval, home_dir, &ev); + + if (ev._major != CORBA_NO_EXCEPTION) + retval = CORBA_OBJECT_NIL; +out: + CORBA_exception_free (&ev); + CORBA_Object_release (name_service, &ev); + return retval != CORBA_OBJECT_NIL; +} + void -corba_register_server (void) +corba_init (void) { - int v; CORBA_Environment ev; CORBA_exception_init (&ev); @@ -216,6 +252,15 @@ printf ("Can not get the POAmanager"); return; } +} + +void +corba_register_server (void) +{ + CORBA_Environment ev; + int v; + + CORBA_exception_init (&ev); /* * Initialize the Factory Object @@ -225,6 +270,7 @@ &ev); if (ev._major != CORBA_NO_EXCEPTION){ + CORBA_exception_free (&ev); printf ("Can not initialize FileManagerFactory object\n"); return; } @@ -236,11 +282,12 @@ /* Get a refeerence to te object */ filemanagerfactory_server = PortableServer_POA_servant_to_reference ( poa, &poa_filemanagerfactory_servant, &ev); - + v = goad_server_register ( NULL, filemanagerfactory_server, "gmc_filemanager_factory", "server", &ev); + CORBA_exception_free (&ev); if (v != 0) return; diff -ruN old/mc-4.5.9/gnome/gdesktop-icon.c new/mc-4.5.10/gnome/gdesktop-icon.c --- old/mc-4.5.9/gnome/gdesktop-icon.c Mon Jan 18 17:44:12 1999 +++ new/mc-4.5.10/gnome/gdesktop-icon.c Sun Jan 31 18:55:19 1999 @@ -224,7 +224,8 @@ DESKTOP_SNAP_X, DESKTOP_ICON_FONT, text, - TRUE); + TRUE, + FALSE); gtk_signal_handler_unblock (GTK_OBJECT (dicon->text), dicon->w_changed_id); gtk_signal_handler_unblock (GTK_OBJECT (dicon->text), dicon->h_changed_id); @@ -373,7 +374,7 @@ args[1].name = "height"; gtk_object_getv (GTK_OBJECT (dicon->icon), 2, args); icon_width = GTK_VALUE_DOUBLE (args[0]); - icon_height = GTK_VALUE_DOUBLE (args[0]); + icon_height = GTK_VALUE_DOUBLE (args[1]); /* Get size of icon text */ diff -ruN old/mc-4.5.9/gnome/gdesktop.c new/mc-4.5.10/gnome/gdesktop.c --- old/mc-4.5.9/gnome/gdesktop.c Mon Jan 18 17:44:12 1999 +++ new/mc-4.5.10/gnome/gdesktop.c Sun Jan 31 18:55:19 1999 @@ -11,23 +11,10 @@ * * - Put an InputOnly window over icons to be able to select them even if the user clicks on * the transparent area. - * - * - DnD from file windows to icons. - * - * - DnD from icons to desktop (move icon). - * - * - DnD from icons to windows. - * - * - DnD from icons to icons (file->directory or file->executable). - * - * - Popup menus for icons. - * - * - Select icons with rubberband on the root window. - * */ #include -#include "fs.h" +#include "global.h" #include #include #include @@ -84,19 +71,21 @@ /* Drag and drop sources and targets */ static GtkTargetEntry dnd_icon_sources[] = { - { "application/x-mc-desktop-icon", 0, TARGET_MC_DESKTOP_ICON }, - { "text/uri-list", 0, TARGET_URI_LIST }, - { "text/plain", 0, TARGET_TEXT_PLAIN }, - { "_NETSCAPE_URL", 0, TARGET_URL } + { TARGET_MC_DESKTOP_ICON_TYPE, 0, TARGET_MC_DESKTOP_ICON }, + { TARGET_URI_LIST_TYPE, 0, TARGET_URI_LIST }, + { TARGET_TEXT_PLAIN_TYPE, 0, TARGET_TEXT_PLAIN }, + { TARGET_URL_TYPE, 0, TARGET_URL } }; static GtkTargetEntry dnd_icon_targets[] = { - { "text/uri-list", 0, TARGET_URI_LIST } + { TARGET_MC_DESKTOP_ICON_TYPE, 0, TARGET_MC_DESKTOP_ICON }, + { TARGET_URI_LIST_TYPE, 0, TARGET_URI_LIST }, }; static GtkTargetEntry dnd_desktop_targets[] = { - { "application/x-mc-desktop-icon", 0, TARGET_MC_DESKTOP_ICON }, - { "text/uri-list", 0, TARGET_URI_LIST } + { "_NETSCAPE_URL", 0, TARGET_URL }, + { TARGET_MC_DESKTOP_ICON_TYPE, 0, TARGET_MC_DESKTOP_ICON }, + { TARGET_URI_LIST_TYPE, 0, TARGET_URI_LIST } }; static int dnd_icon_nsources = sizeof (dnd_icon_sources) / sizeof (dnd_icon_sources[0]); @@ -110,8 +99,11 @@ static int dnd_press_x, dnd_press_y; /* Whether a call to select_icon() is pending because the initial click on an - * icon had the GDK_CONTROL_MASK in it. */ + * icon needs to be resolved at button release time. Also, we store the + * event->state. + */ static int dnd_select_icon_pending; +static guint dnd_select_icon_pending_state; /* Whether the button release signal on a desktop icon should be stopped due to * the icon being selected by clicking on the text item. @@ -137,7 +129,8 @@ static int click_dragging; -static DesktopIconInfo *desktop_icon_info_new (char *filename, int auto_pos, int xpos, int ypos); +static DesktopIconInfo *desktop_icon_info_new (char *filename, char *url, + int auto_pos, int xpos, int ypos); /* Looks for a free slot in the layout_slots array and returns the coordinates that coorespond to @@ -333,9 +326,16 @@ return NULL; } -/* Reloads the desktop icons efficiently. If there are "new" files for which no - * icons have been created, then icons for them will be created started at the - * specified position -- this is used when dragging new icons to the desktop. +typedef struct { + char *filename; + char *url; +} file_and_url_t; + +/* + * Reloads the desktop icons efficiently. If there are "new" files + * for which no icons have been created, then icons for them will be + * created started at the specified position -- this is used when + * dragging new icons to the desktop. */ static void reload_desktop_icons (int xpos, int ypos) @@ -343,11 +343,11 @@ struct dirent *dirent; DIR *dir; char *full_name; - int have_pos, x, y; + int have_pos, x, y, size; DesktopIconInfo *dii; GSList *need_position_list, *sl; GList *all_icons, *l; - + char *desktop_url; dir = mc_opendir (desktop_directory); if (!dir) { @@ -386,14 +386,26 @@ full_name = g_concat_dir_and_file (desktop_directory, dirent->d_name); have_pos = gmeta_get_icon_pos (full_name, &x, &y); + if (!gnome_metadata_get (full_name, "desktop-url", &size, &desktop_url)) + desktop_url = NULL; + if (have_pos) { - dii = desktop_icon_info_new (dirent->d_name, FALSE, x, y); + dii = desktop_icon_info_new (dirent->d_name, desktop_url, FALSE, x, y); gtk_widget_show (dii->dicon); g_free (full_name); - } else - need_position_list = g_slist_prepend (need_position_list, - g_strdup (dirent->d_name)); + } else { + file_and_url_t *fau; + + fau = g_new (file_and_url_t, 1); + fau->filename = g_strdup (dirent->d_name); + fau->url = g_strdup (desktop_url); + + need_position_list = g_slist_prepend (need_position_list, fau); + } + + if (desktop_url) + g_free (desktop_url); } mc_closedir (dir); @@ -414,8 +426,6 @@ g_list_free (all_icons); - gnome_metadata_unlock (); - /* Now create the icons for all the files that did not have their * position set. This makes auto-placement work correctly without * overlapping icons. @@ -424,13 +434,20 @@ need_position_list = g_slist_reverse (need_position_list); for (sl = need_position_list; sl; sl = sl->next) { - dii = desktop_icon_info_new (sl->data, TRUE, xpos, ypos); + file_and_url_t *fau = sl->data; + + dii = desktop_icon_info_new (fau->filename, fau->url, TRUE, xpos, ypos); gtk_widget_show (dii->dicon); - g_free (sl->data); + + g_free (fau->url); + g_free (fau->filename); + g_free (fau); } g_slist_free (need_position_list); + gnome_metadata_unlock (); + /* Flush events to make the icons paint themselves */ x_flush_events (); } @@ -645,6 +662,24 @@ return retval; } +/* + * Callback when an icon's text changes and the icon reprensents an + * URL + */ +static int +text_changed_url (GnomeIconTextItem *iti, gpointer data) +{ + DesktopIconInfo *dii = data; + char *fullname; + char *new_text; + + fullname = g_concat_dir_and_file (desktop_directory, dii->filename); + new_text = gnome_icon_text_item_get_text (iti); + gnome_metadata_set (fullname, "desktop-url", strlen (new_text)+1, new_text); + + return TRUE; +} + /* Sets up the mouse grab for when a desktop icon is being edited */ static void setup_editing_grab (DesktopIconInfo *dii) @@ -685,6 +720,7 @@ unselect_all (dii); gtk_grab_add (dii->dicon); + setup_editing_grab (dii); gdk_keyboard_grab (GTK_LAYOUT (DESKTOP_ICON (dii->dicon)->canvas)->bin_window, FALSE, GDK_CURRENT_TIME); } @@ -745,6 +781,10 @@ char *filename; file_entry *fe; + if (dii->url){ + gnome_url_show (dii->url); + return; + } filename = g_concat_dir_and_file (desktop_directory, dii->filename); fe = file_entry_from_file (filename); @@ -866,10 +906,13 @@ && (!dii->selected || (event->button.state & GDK_SHIFT_MASK))) icon_select_on_text = TRUE; - if ((event->button.state & GDK_CONTROL_MASK) - && !(event->button.state & GDK_SHIFT_MASK)) + if ((dii->selected + && !(event->button.state & (GDK_CONTROL_MASK | GDK_SHIFT_MASK))) + || ((event->button.state & GDK_CONTROL_MASK) + && !(event->button.state & GDK_SHIFT_MASK))) { dnd_select_icon_pending = TRUE; - else + dnd_select_icon_pending_state = event->button.state; + } else select_icon (dii, event->button.state); retval = TRUE; @@ -906,8 +949,9 @@ } if (dnd_select_icon_pending) { - select_icon (dii, GDK_CONTROL_MASK); + select_icon (dii, dnd_select_icon_pending_state); dnd_select_icon_pending = FALSE; + dnd_select_icon_pending_state = 0; retval = TRUE; } break; @@ -968,9 +1012,10 @@ if (dnd_select_icon_pending) { if (!dii->selected) - select_icon (dii, GDK_CONTROL_MASK); + select_icon (dii, dnd_select_icon_pending_state); dnd_select_icon_pending = FALSE; + dnd_select_icon_pending_state = 0; } /* FIXME: see if it is more than one icon and if so, use a multiple-files icon. */ @@ -1111,6 +1156,132 @@ dii); } +/* + * Callback used when we get a drag_motion event from a desktop icon. We have + * to decide which operation to perform based on the type of the data the user + * is dragging. + */ +static gboolean +icon_drag_motion (GtkWidget *widget, GdkDragContext *context, gint x, gint y, guint time, + gpointer data) +{ + DesktopIconInfo *dii; + char *filename; + file_entry *fe; + GdkDragAction action; + + dii = data; + + filename = g_concat_dir_and_file (desktop_directory, dii->filename); + fe = file_entry_from_file (filename); + g_free (filename); + + action = 0; /* be pessimistic by defaulting to nothing */ + + if (dii->selected + && gdnd_drag_context_has_target (context, TARGET_MC_DESKTOP_ICON) + && (context->actions & GDK_ACTION_MOVE)) + action = GDK_ACTION_MOVE; + else if (gdnd_drag_context_has_target (context, TARGET_URI_LIST)) { + if (S_ISDIR (fe->buf.st_mode) || fe->f.link_to_dir) + action = context->suggested_action; + else if (is_exe (fe->buf.st_mode) + && if_link_is_exe (fe) + && (context->actions & GDK_ACTION_COPY)) + action = GDK_ACTION_COPY; + } + + gdk_drag_status (context, action, time); + return TRUE; +} + +/* + * Returns the desktop icon that started the drag from the specified + * context + */ +static DesktopIconInfo * +find_icon_by_drag_context (GdkDragContext *context) +{ + GtkWidget *source; + int i; + GList *l; + DesktopIconInfo *dii; + + source = gtk_drag_get_source_widget (context); + if (!source) + return NULL; + + source = gtk_widget_get_toplevel (source); + + for (i = 0; i < (layout_cols * layout_rows); i++) + for (l = layout_slots[i].icons; l; l = l->next) { + dii = l->data; + + if (dii->dicon == source) + return dii; + } + + return NULL; +} + +/* + * Performs a drop of desktop icons onto the desktop. It basically + * moves the icons from their original position to the new + * coordinates. + */ +static void +drop_desktop_icons (GdkDragContext *context, GtkSelectionData *data, int x, int y) +{ + DesktopIconInfo *source_dii, *dii; + int dx, dy; + int i; + GList *l; + GSList *sel_icons, *sl; + + /* + * FIXME: this needs to do the right thing (what Windows does) + * when desktop_auto_placement is enabled. + */ + + /* Find the icon that the user is dragging */ + + source_dii = find_icon_by_drag_context (context); + if (!source_dii) { + g_warning ("Eeeeek, could not find the icon that started the drag!"); + return; + } + + /* Compute the distance to move icons */ + + if (desktop_snap_icons) + get_icon_snap_pos (&x, &y); + + dx = x - source_dii->x - dnd_press_x; + dy = y - source_dii->y - dnd_press_y; + + /* Build a list of selected icons */ + + sel_icons = NULL; + + for (i = 0; i < (layout_cols * layout_rows); i++) + for (l = layout_slots[i].icons; l; l = l->next) { + dii = l->data; + if (dii->selected) + sel_icons = g_slist_prepend (sel_icons, l->data); + } + + /* Move the icons */ + + for (sl = sel_icons; sl; sl = sl->next) { + dii = sl->data; + desktop_icon_info_place (dii, FALSE, dii->x + dx, dii->y + dy); + } + + /* Clean up */ + + g_slist_free (sel_icons); +} + /** * drop_on_file_entry */ @@ -1120,7 +1291,8 @@ char *filename; file_entry *fe; int size; - char *buf, *mime_type; + char *buf; + const char *mime_type; filename = g_concat_dir_and_file (desktop_directory, dii->filename); @@ -1209,7 +1381,16 @@ dii = user_data; switch (info) { + case TARGET_MC_DESKTOP_ICON: + if (dii->selected) + drop_desktop_icons (context, data, x + dii->x, y + dii->y); + else + printf ("FIXME: what do drop?\n"); /* FIXME */ + + break; + case TARGET_URI_LIST: + printf ("Wheeeeee!\n"); desktop_icon_drop_uri_list (dii, context, data); break; @@ -1222,41 +1403,17 @@ static void setup_icon_dnd_dest (DesktopIconInfo *dii) { - char *filename; - file_entry *fe; - int actions; - - filename = g_concat_dir_and_file (desktop_directory, dii->filename); - fe = file_entry_from_file (filename); - g_free (filename); - - if (!fe) - return; /* eek */ - - /* See what actions are appropriate for this icon */ - - if (fe->f.link_to_dir) - actions = GDK_ACTION_COPY | GDK_ACTION_MOVE | GDK_ACTION_LINK | GDK_ACTION_ASK; - else if (is_exe (fe->buf.st_mode) && if_link_is_exe (fe)) - actions = GDK_ACTION_COPY; - else - actions = 0; - - file_entry_free (fe); - - if (!actions) - return; - - /* Connect the drop signals */ - gtk_drag_dest_set (DESKTOP_ICON (dii->dicon)->canvas, - GTK_DEST_DEFAULT_MOTION | GTK_DEST_DEFAULT_DROP, + GTK_DEST_DEFAULT_DROP, dnd_icon_targets, dnd_icon_ntargets, - actions); + GDK_ACTION_COPY | GDK_ACTION_MOVE | GDK_ACTION_LINK | GDK_ACTION_ASK); + gtk_signal_connect (GTK_OBJECT (DESKTOP_ICON (dii->dicon)->canvas), "drag_motion", + (GtkSignalFunc) (icon_drag_motion), + dii); gtk_signal_connect (GTK_OBJECT (DESKTOP_ICON (dii->dicon)->canvas), "drag_data_received", - GTK_SIGNAL_FUNC (icon_drag_data_received), + (GtkSignalFunc) icon_drag_data_received, dii); } @@ -1268,18 +1425,19 @@ * not show the icon. */ static DesktopIconInfo * -desktop_icon_info_new (char *filename, int auto_pos, int xpos, int ypos) +desktop_icon_info_new (char *filename, char *url, int auto_pos, int xpos, int ypos) { DesktopIconInfo *dii; file_entry *fe; char *full_name; GdkImlibImage *icon_im; - + GtkSignalFunc text_changed_func; + /* Create the icon structure */ full_name = g_concat_dir_and_file (desktop_directory, filename); fe = file_entry_from_file (full_name); - icon_im = gicon_get_icon_for_file_speed (fe, FALSE); + icon_im = gicon_get_icon_for_file_speed (desktop_directory, fe, FALSE); dii = g_new (DesktopIconInfo, 1); dii->dicon = desktop_icon_new (icon_im, filename); @@ -1288,7 +1446,8 @@ dii->slot = -1; dii->filename = g_strdup (filename); dii->selected = FALSE; - + dii->url = g_strdup (url); + file_entry_free (fe); g_free (full_name); @@ -1318,9 +1477,14 @@ /* Connect to the text item's signals */ + if (dii->url) + text_changed_func = (GtkSignalFunc) text_changed_url; + else + text_changed_func = (GtkSignalFunc) text_changed; + gtk_signal_connect (GTK_OBJECT (DESKTOP_ICON (dii->dicon)->text), "text_changed", - (GtkSignalFunc) text_changed, - dii); + text_changed_func, dii); + gtk_signal_connect (GTK_OBJECT (DESKTOP_ICON (dii->dicon)->text), "editing_started", (GtkSignalFunc) editing_started, dii); @@ -1354,6 +1518,7 @@ gtk_widget_destroy (dii->dicon); remove_from_slot (dii); + g_free (dii->url); g_free (dii->filename); g_free (dii); } @@ -1508,86 +1673,70 @@ return FALSE; } -/* Returns the desktop icon that started the drag from the specified context */ -static DesktopIconInfo * -find_icon_by_drag_context (GdkDragContext *context) -{ - GtkWidget *source; - int i; - GList *l; - DesktopIconInfo *dii; +/* Callback used when we get a drag_motion event from the desktop. We must + * decide what kind of operation can be performed with what the user is + * dragging. + */ +static gboolean +desktop_drag_motion (GtkWidget *widget, GdkDragContext *context, gint x, gint y, guint time, + gpointer data) +{ + GdkDragAction action; + GtkWidget *source_widget; + + action = context->suggested_action; /* this is the default */ + + if (gdnd_drag_context_has_target (context, TARGET_MC_DESKTOP_ICON)) { + if (context->actions & GDK_ACTION_MOVE) + action = GDK_ACTION_MOVE; + } else if (gdnd_drag_context_has_target (context, TARGET_URI_LIST)) { + source_widget = gtk_drag_get_source_widget (context); - source = gtk_drag_get_source_widget (context); - if (!source) - return NULL; - - source = gtk_widget_get_toplevel (source); - - for (i = 0; i < (layout_cols * layout_rows); i++) - for (l = layout_slots[i].icons; l; l = l->next) { - dii = l->data; - - if (dii->dicon == source) - return dii; - } + /* If it comes from ourselves, make move the default unless the + * user is explicitly asking for ASK. + */ + printf ("%s\t%s\t%s\t%s\n", + (context->actions & GDK_ACTION_COPY) ? "copy" : "", + (context->actions & GDK_ACTION_MOVE) ? "move" : "", + (context->actions & GDK_ACTION_LINK) ? "link" : "", + (context->actions & GDK_ACTION_ASK) ? "ask" : ""); + + if (source_widget + && context->suggested_action != GDK_ACTION_ASK + && (context->actions & GDK_ACTION_MOVE)) + action = GDK_ACTION_MOVE; + } else + action = 0; /* we cannot handle that type of data */ - return NULL; + gdk_drag_status (context, action, time); + return TRUE; } /* - * Performs a drop of desktop icons onto the desktop. It basically moves the icons from their - * original position to the new coordinates. + * drop_url: Invoked when we have received an URL from Netscape. + * Install the url on the ~/desktop directory */ static void -drop_desktop_icons (GdkDragContext *context, GtkSelectionData *data, int x, int y) +drop_url (GdkDragContext *context, GtkSelectionData *data, gint x, gint y) { - DesktopIconInfo *source_dii, *dii; - int dx, dy; - int i; - GList *l; - GSList *sel_icons, *sl; + char *template; - /* FIXME: this needs to do the right thing (what Windows does) when desktop_auto_placement - * is enabled. - */ + template = g_concat_dir_and_file (desktop_directory, "urlXXXXXX"); - /* Find the icon that the user is dragging */ + if (mktemp (template)){ + FILE *f; - source_dii = find_icon_by_drag_context (context); - if (!source_dii) { - g_warning ("Eeeeek, could not find the icon that started the drag!"); - return; - } - - /* Compute the distance to move icons */ + f = fopen (template, "w"); + if (f){ + fprintf (f, "URL: %s\n", data->data); + fclose (f); - if (desktop_snap_icons) - get_icon_snap_pos (&x, &y); - - dx = x - source_dii->x - dnd_press_x; - dy = y - source_dii->y - dnd_press_y; - - /* Build a list of selected icons */ - - sel_icons = NULL; - - for (i = 0; i < (layout_cols * layout_rows); i++) - for (l = layout_slots[i].icons; l; l = l->next) { - dii = l->data; - if (dii->selected) - sel_icons = g_slist_prepend (sel_icons, l->data); + gnome_metadata_set (template, "desktop-url", + strlen (data->data)+1, data->data); } - - /* Move the icons */ - - for (sl = sel_icons; sl; sl = sl->next) { - dii = sl->data; - desktop_icon_info_place (dii, FALSE, dii->x + dx, dii->y + dy); } - /* Clean up */ - - g_slist_free (sel_icons); + g_free (template); } /* Callback used when the root window receives a drop */ @@ -1604,27 +1753,23 @@ x += dx; y += dy; + printf ("Drag!!\n"); switch (info) { case TARGET_MC_DESKTOP_ICON: drop_desktop_icons (context, data, x, y); break; case TARGET_URI_LIST: - /* - * Unless the user is dragging with button-2 (ask action) - * drops on the desktop will be symlinks. - * - * I have got enough complaints as it is. - */ - if (context->suggested_action != GDK_ACTION_ASK) - context->suggested_action = GDK_ACTION_LINK; - retval = gdnd_drop_on_directory (context, data, desktop_directory); if (retval) reload_desktop_icons (x, y); - break; + case TARGET_URL: + printf ("Aqui!\n"); + drop_url (context, data, x, y); + break; + default: break; } @@ -1641,13 +1786,16 @@ g_warning ("There is already a process taking drop windows on the desktop\n"); gtk_drag_dest_set (dnd_proxy_window, - GTK_DEST_DEFAULT_MOTION | GTK_DEST_DEFAULT_DROP, + GTK_DEST_DEFAULT_DROP, dnd_desktop_targets, dnd_desktop_ntargets, GDK_ACTION_COPY | GDK_ACTION_MOVE | GDK_ACTION_LINK | GDK_ACTION_ASK); + gtk_signal_connect (GTK_OBJECT (dnd_proxy_window), "drag_motion", + (GtkSignalFunc) desktop_drag_motion, + NULL); gtk_signal_connect (GTK_OBJECT (dnd_proxy_window), "drag_data_received", - GTK_SIGNAL_FUNC (desktop_drag_data_received), + (GtkSignalFunc) desktop_drag_data_received, NULL); } @@ -2139,6 +2287,7 @@ void desktop_init (void) { + gdnd_init (); create_layout_info (); create_desktop_dir (); reload_desktop_icons (0, 0); diff -ruN old/mc-4.5.9/gnome/gdesktop.h new/mc-4.5.10/gnome/gdesktop.h --- old/mc-4.5.9/gnome/gdesktop.h Mon Jan 18 17:44:12 1999 +++ new/mc-4.5.10/gnome/gdesktop.h Sun Jan 31 18:55:19 1999 @@ -9,6 +9,8 @@ #ifndef GDESKTOP_H #define GDESKTOP_H +#include "dir.h" + /* Snap granularity for desktop icons -- maybe these should be calculated in * terms of the font size? @@ -40,6 +42,7 @@ char *filename; /* The file this icon refers to * (relative to the desktop_directory) */ + char *url; /* URL this icon points to */ int selected : 1; /* Is the icon selected? */ int tmp_selected : 1; /* Temp storage for original selection while rubberbanding */ } DesktopIconInfo; @@ -47,22 +50,6 @@ void desktop_icon_info_destroy (DesktopIconInfo *dii); void desktop_icon_info_open (DesktopIconInfo *dii); void desktop_icon_info_delete (DesktopIconInfo *dii); - -typedef enum { - application, - directory, - file -} icon_t; - -/* A structure that describes each icon on the desktop */ -typedef struct { - GnomeDesktopEntry *dentry; - GtkWidget *widget; - icon_t type; - int x, y; - int grid_x, grid_y; - char *pathname; -} desktop_icon_t; file_entry *file_entry_from_file (char *filename); void file_entry_free (file_entry *fe); diff -ruN old/mc-4.5.9/gnome/gdialogs.c new/mc-4.5.10/gnome/gdialogs.c --- old/mc-4.5.9/gnome/gdialogs.c Mon Jan 18 17:44:12 1999 +++ new/mc-4.5.10/gnome/gdialogs.c Sun Jan 31 18:55:19 1999 @@ -1,13 +1,13 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- */ /* New dialogs... */ #include -#include "util.h" #include "panel.h" #include +#include "global.h" #include "file.h" #include "filegui.h" #include "fileopctx.h" -#include "regex.h" +#include "eregex.h" #include "../vfs/vfs.h" enum { @@ -55,13 +55,12 @@ GtkWidget *op_radio; } FileOpContextUI; +static char *gdialog_to_string = N_("To: "); +static char *gdialog_from_string = N_("Copying from: "); +static char *gdialog_deleting_string = N_("Deleting file: "); -#define GDIALOG_TO_STRING "To: " -#define GDIALOG_FROM_STRING "Copying from: " #define GDIALOG_PROGRESS_WIDTH 350 - - /* Callbacks go here... */ static void fmd_check_box_callback (GtkWidget *widget, gpointer data) @@ -93,8 +92,7 @@ while (gdk_string_width (ui->op_source_label->style->font, path + len) > length) len ++; } - path_copy = g_malloc (sizeof (gchar [1 + 3 + strlen (path) - len])); - sprintf (path_copy, "...%s", path + len); + path_copy = g_strdup_printf ("...%s", path + len); return path_copy; } @@ -117,22 +115,22 @@ return FILE_ABORT; if (path == NULL){ - gtk_label_set (GTK_LABEL (ui->op_source_label), ""); + gtk_label_set_text (GTK_LABEL (ui->op_source_label), ""); return FILE_CONT; } if (!from_width){ from_width = gdk_string_width (ui->op_source_label->style->font, - _(GDIALOG_FROM_STRING)); + _(gdialog_from_string)); } path_width = gdk_string_width (ui->op_source_label->style->font, path); if (from_width + path_width < GDIALOG_PROGRESS_WIDTH) - gtk_label_set (GTK_LABEL (ui->op_source_label), path); + gtk_label_set_text (GTK_LABEL (ui->op_source_label), path); else { path_copy = trim_file_name (ui, path, GDIALOG_PROGRESS_WIDTH - from_width, path_width); - gtk_label_set (GTK_LABEL (ui->op_source_label), path_copy); + gtk_label_set_text (GTK_LABEL (ui->op_source_label), path_copy); g_free (path_copy); } @@ -158,19 +156,19 @@ return FILE_ABORT; if (path == NULL){ - gtk_label_set (GTK_LABEL (ui->op_target_label), ""); + gtk_label_set_text (GTK_LABEL (ui->op_target_label), ""); return FILE_CONT; } if (!to_width) to_width = gdk_string_width (ui->op_target_label->style->font, - _(GDIALOG_TO_STRING)); + _(gdialog_to_string)); path_width = gdk_string_width (ui->op_target_label->style->font, path); if (to_width + path_width < GDIALOG_PROGRESS_WIDTH) - gtk_label_set (GTK_LABEL (ui->op_target_label), path); + gtk_label_set_text (GTK_LABEL (ui->op_target_label), path); else { path_copy = trim_file_name (ui, path, GDIALOG_PROGRESS_WIDTH - to_width, path_width); - gtk_label_set (GTK_LABEL (ui->op_target_label), path_copy); + gtk_label_set_text (GTK_LABEL (ui->op_target_label), path_copy); g_free (path_copy); } @@ -180,7 +178,10 @@ FileProgressStatus file_progress_show_deleting (FileOpContext *ctx, char *path) { + static gint deleting_width = 0; FileOpContextUI *ui; + gint path_width; + gchar *path_copy = NULL; g_return_val_if_fail (ctx != NULL, FILE_CONT); g_return_val_if_fail (ctx->ui != NULL, FILE_CONT); @@ -190,8 +191,25 @@ if (ui->aborting) return FILE_ABORT; - /* FIXME */ - g_warning ("memo: file_progress_show_deleting!\npath\t%s\n", path); + if (path == NULL){ + gtk_label_set_text (GTK_LABEL (ui->op_source_label), ""); + return FILE_CONT; + } + + if (!deleting_width){ + deleting_width = gdk_string_width (ui->op_source_label->style->font, + _(gdialog_deleting_string)); + } + path_width = gdk_string_width (ui->op_source_label->style->font, path); + if (deleting_width + path_width < GDIALOG_PROGRESS_WIDTH) + gtk_label_set_text (GTK_LABEL (ui->op_source_label), path); + else { + path_copy = trim_file_name (ui, path, GDIALOG_PROGRESS_WIDTH - deleting_width, + path_width); + + gtk_label_set_text (GTK_LABEL (ui->op_source_label), path_copy); + g_free (path_copy); + } return FILE_CONT; } @@ -210,7 +228,7 @@ return FILE_ABORT; snprintf (count, 9, "%d%%", (gint)(100.0 *(gfloat)done/(gfloat)total)); - gtk_label_set (GTK_LABEL (ui->file_label), count); + gtk_label_set_text (GTK_LABEL (ui->file_label), count); while (gtk_events_pending ()) gtk_main_iteration (); return FILE_CONT; @@ -231,7 +249,7 @@ return FILE_ABORT; snprintf (count, 13, "%d/%d", done, total); - gtk_label_set (GTK_LABEL (ui->count_label), count); + gtk_label_set_text (GTK_LABEL (ui->count_label), count); while (gtk_events_pending ()) gtk_main_iteration (); return FILE_CONT; @@ -284,7 +302,6 @@ status = GPOINTER_TO_INT (gtk_object_get_user_data (GTK_OBJECT (button))); if (GTK_TOGGLE_BUTTON (button)->active) { - g_print ("toggle\n"); if (status == REPLACE_OPTION_MENU) { ui->copy_status = ui->minor_copy_status; } else @@ -320,11 +337,11 @@ if (dialog_needed == FALSE) return FILE_CONT; ui->minor_copy_status = REPLACE_ALWAYS; - g_print ("in file_progress_query_replace_policy\n"); qrp_dlg = gnome_dialog_new (_("Files Exist"), GNOME_STOCK_BUTTON_OK, GNOME_STOCK_BUTTON_CANCEL, NULL); + gtk_window_set_position (GTK_WINDOW (qrp_dlg), GTK_WIN_POS_MOUSE); vbox = gtk_vbox_new (FALSE, GNOME_PAD_SMALL); hbox = gtk_hbox_new (FALSE, GNOME_PAD_SMALL); icon = gnome_stock_pixmap_widget (hbox, GNOME_STOCK_PIXMAP_HELP); @@ -433,6 +450,7 @@ GNOME_STOCK_BUTTON_NO, GNOME_STOCK_BUTTON_CANCEL, NULL); + gtk_window_set_position (GTK_WINDOW (qr_dlg), GTK_WIN_POS_MOUSE); snprintf (msg, sizeof (msg)-1, _("The target file already exists: %s"), destname); label = gtk_label_new (msg); gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_LEFT); @@ -517,6 +535,8 @@ fmd_win = gnome_dialog_new (_("Move"), GNOME_STOCK_BUTTON_OK, GNOME_STOCK_BUTTON_CANCEL, NULL); + gtk_window_set_position (GTK_WINDOW (fmd_win), GTK_WIN_POS_MOUSE); + hbox = gtk_hbox_new (FALSE, GNOME_PAD); notebook = gtk_notebook_new (); gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (fmd_win)->vbox), @@ -631,11 +651,11 @@ umask (i); ctx->umask_kill = i ^ 0777777; } - source_mask = strdup ("*"); + source_mask = g_strdup ("*"); orig_mask = source_mask; if (!dest_dir || !*dest_dir){ if (source_mask) - free (source_mask); + g_free (source_mask); return dest_dir; } @@ -653,7 +673,7 @@ source_mask = convert_pattern (source_mask, match_file, 1); easy_patterns = source_easy_patterns; error = re_compile_pattern (source_mask, strlen (source_mask), &ctx->rx); - free (source_mask); + g_free (source_mask); } else error = re_compile_pattern (source_mask, strlen (source_mask), &ctx->rx); @@ -661,7 +681,7 @@ g_warning ("%s\n",error); if (orig_mask) - free (orig_mask); + g_free (orig_mask); ctx->dest_mask = strrchr (dest_dir, PATH_SEP); if (ctx->dest_mask == NULL) ctx->dest_mask = dest_dir; @@ -674,14 +694,14 @@ (ctx->dive_into_subdirs && ((!only_one && !is_wildcarded (ctx->dest_mask)) || (only_one && !mc_stat (dest_dir, &buf) && S_ISDIR (buf.st_mode))))) - ctx->dest_mask = strdup ("*"); + ctx->dest_mask = g_strdup ("*"); else { - ctx->dest_mask = strdup (ctx->dest_mask); + ctx->dest_mask = g_strdup (ctx->dest_mask); *orig_mask = 0; } if (!*dest_dir){ - free (dest_dir); - dest_dir = strdup ("./"); + g_free (dest_dir); + dest_dir = g_strdup ("./"); } return dest_dir; } @@ -710,42 +730,55 @@ switch (op) { case OP_MOVE: - ui->op_win = gnome_dialog_new ("Move Progress", GNOME_STOCK_BUTTON_CANCEL, NULL); + ui->op_win = gnome_dialog_new (_("Move Progress"), GNOME_STOCK_BUTTON_CANCEL, NULL); break; case OP_COPY: - ui->op_win = gnome_dialog_new ("Copy Progress", GNOME_STOCK_BUTTON_CANCEL, NULL); + ui->op_win = gnome_dialog_new (_("Copy Progress"), GNOME_STOCK_BUTTON_CANCEL, NULL); break; case OP_DELETE: - ui->op_win = gnome_dialog_new ("Delete Progress", GNOME_STOCK_BUTTON_CANCEL, NULL); - gtk_widget_show_all (GNOME_DIALOG (ui->op_win)->vbox); - gtk_widget_show_now (ui->op_win); - return; + ui->op_win = gnome_dialog_new (_("Delete Progress"), GNOME_STOCK_BUTTON_CANCEL, NULL); + break; } + gtk_window_set_position (GTK_WINDOW (ui->op_win), GTK_WIN_POS_MOUSE); gnome_dialog_button_connect (GNOME_DIALOG (ui->op_win), 0, GTK_SIGNAL_FUNC (cancel_cb), ui); - alignment = gtk_alignment_new (0.0, 0.5, 0, 0); - hbox = gtk_hbox_new (FALSE, 0); - gtk_container_add (GTK_CONTAINER (alignment), hbox); - gtk_box_pack_start (GTK_BOX (hbox), gtk_label_new (_(GDIALOG_FROM_STRING)), FALSE, FALSE, 0); - ui->op_source_label = gtk_label_new (""); - - gtk_box_pack_start (GTK_BOX (hbox), ui->op_source_label, FALSE, FALSE, 0); - gtk_box_set_spacing (GTK_BOX (GNOME_DIALOG (ui->op_win)->vbox), GNOME_PAD_SMALL); - gtk_container_set_border_width (GTK_CONTAINER (GNOME_DIALOG (ui->op_win)->vbox), GNOME_PAD); - gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (ui->op_win)->vbox), - alignment, FALSE, FALSE, 0); - - alignment = gtk_alignment_new (0.0, 0.5, 0, 0); - hbox = gtk_hbox_new (FALSE, 0); - gtk_container_add (GTK_CONTAINER (alignment), hbox); - gtk_box_pack_start (GTK_BOX (hbox), gtk_label_new (_(GDIALOG_TO_STRING)), FALSE, FALSE, 0); - ui->op_target_label = gtk_label_new (""); - gtk_box_pack_start (GTK_BOX (hbox), ui->op_target_label, FALSE, FALSE, 0); - gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (ui->op_win)->vbox), - alignment, FALSE, FALSE, 0); + if (op != OP_DELETE) { + alignment = gtk_alignment_new (0.0, 0.5, 0, 0); + hbox = gtk_hbox_new (FALSE, 0); + gtk_container_add (GTK_CONTAINER (alignment), hbox); + gtk_box_pack_start (GTK_BOX (hbox), gtk_label_new (_(gdialog_from_string)), FALSE, FALSE, 0); + ui->op_source_label = gtk_label_new (""); + + gtk_box_pack_start (GTK_BOX (hbox), ui->op_source_label, FALSE, FALSE, 0); + gtk_box_set_spacing (GTK_BOX (GNOME_DIALOG (ui->op_win)->vbox), GNOME_PAD_SMALL); + gtk_container_set_border_width (GTK_CONTAINER (GNOME_DIALOG (ui->op_win)->vbox), GNOME_PAD); + gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (ui->op_win)->vbox), + alignment, FALSE, FALSE, 0); + + alignment = gtk_alignment_new (0.0, 0.5, 0, 0); + hbox = gtk_hbox_new (FALSE, 0); + gtk_container_add (GTK_CONTAINER (alignment), hbox); + gtk_box_pack_start (GTK_BOX (hbox), gtk_label_new (_(gdialog_to_string)), FALSE, FALSE, 0); + ui->op_target_label = gtk_label_new (""); + gtk_box_pack_start (GTK_BOX (hbox), ui->op_target_label, FALSE, FALSE, 0); + gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (ui->op_win)->vbox), + alignment, FALSE, FALSE, 0); + } else { + alignment = gtk_alignment_new (0.0, 0.5, 0, 0); + hbox = gtk_hbox_new (FALSE, 0); + gtk_container_add (GTK_CONTAINER (alignment), hbox); + gtk_box_pack_start (GTK_BOX (hbox), gtk_label_new (_(gdialog_deleting_string)), FALSE, FALSE, 0); + ui->op_source_label = gtk_label_new (""); + + gtk_box_pack_start (GTK_BOX (hbox), ui->op_source_label, FALSE, FALSE, 0); + gtk_box_set_spacing (GTK_BOX (GNOME_DIALOG (ui->op_win)->vbox), GNOME_PAD_SMALL); + gtk_container_set_border_width (GTK_CONTAINER (GNOME_DIALOG (ui->op_win)->vbox), GNOME_PAD); + gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (ui->op_win)->vbox), + alignment, FALSE, FALSE, 0); + } alignment = gtk_alignment_new (0.0, 0.5, 0, 0); hbox = gtk_hbox_new (FALSE, 0); gtk_box_pack_start (GTK_BOX (hbox), gtk_label_new (_("File ")), FALSE, FALSE, 0); @@ -756,7 +789,6 @@ ui->file_label = gtk_label_new (""); gtk_box_pack_start (GTK_BOX (hbox), ui->file_label, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (hbox), gtk_label_new (_(" Done.")), FALSE, FALSE, 0); - gtk_container_add (GTK_CONTAINER (alignment), hbox); gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (ui->op_win)->vbox), diff -ruN old/mc-4.5.9/gnome/gdnd.c new/mc-4.5.10/gnome/gdnd.c --- old/mc-4.5.9/gnome/gdnd.c Mon Jan 18 17:44:12 1999 +++ new/mc-4.5.10/gnome/gdnd.c Sun Jan 31 18:55:19 1999 @@ -19,11 +19,36 @@ #include "gdnd.h" +/* Atoms for the DnD target types */ +GdkAtom dnd_target_atoms[TARGET_NTARGETS]; + + +/** + * gdnd_init: + * + * Initializes the dnd_target_atoms array by interning the DnD target atom names. + **/ +void +gdnd_init (void) +{ + dnd_target_atoms[TARGET_MC_DESKTOP_ICON] = + gdk_atom_intern (TARGET_MC_DESKTOP_ICON_TYPE, FALSE); + + dnd_target_atoms[TARGET_URI_LIST] = + gdk_atom_intern (TARGET_URI_LIST_TYPE, FALSE); + + dnd_target_atoms[TARGET_TEXT_PLAIN] = + gdk_atom_intern (TARGET_TEXT_PLAIN_TYPE, FALSE); + + dnd_target_atoms[TARGET_URL] = + gdk_atom_intern (TARGET_URL_TYPE, FALSE); +} + /* The menu of DnD actions */ static GnomeUIInfo actions[] = { - GNOMEUIINFO_ITEM_NONE (N_("Move here"), NULL, NULL), - GNOMEUIINFO_ITEM_NONE (N_("Copy here"), NULL, NULL), - GNOMEUIINFO_ITEM_NONE (N_("Link here"), NULL, NULL), + GNOMEUIINFO_ITEM_NONE (N_("_Move here"), NULL, NULL), + GNOMEUIINFO_ITEM_NONE (N_("_Copy here"), NULL, NULL), + GNOMEUIINFO_ITEM_NONE (N_("_Link here"), NULL, NULL), GNOMEUIINFO_SEPARATOR, GNOMEUIINFO_ITEM_NONE (N_("Cancel drag"), NULL, NULL), GNOMEUIINFO_END @@ -31,13 +56,22 @@ /* Pops up a menu of actions to perform on dropped files */ static GdkDragAction -get_action (void) +get_action (GdkDragContext *context) { GtkWidget *menu; int a; GdkDragAction action; + /* Create the menu and set the sensitivity of the items based on the + * allowed actions. + */ + menu = gnome_popup_menu_new (actions); + + gtk_widget_set_sensitive (actions[0].widget, (context->actions & GDK_ACTION_MOVE) != 0); + gtk_widget_set_sensitive (actions[1].widget, (context->actions & GDK_ACTION_COPY) != 0); + gtk_widget_set_sensitive (actions[2].widget, (context->actions & GDK_ACTION_LINK) != 0); + a = gnome_popup_menu_do_popup_modal (menu, NULL, NULL, NULL, NULL); switch (a) { @@ -63,56 +97,6 @@ } /* - * Looks for a panel that has the specified window for its list - * display. It is used to figure out if we are receiving a drop from - * a panel on this MC process. If no panel is found, it returns NULL. - */ -static WPanel * -find_panel_owning_window (GdkDragContext *context) -{ - GList *list; - WPanel *panel; - GtkWidget *source_widget, *toplevel_widget; - - source_widget = gtk_drag_get_source_widget (context); - if (!source_widget) - return NULL; - - /* - * We will scan the list of existing WPanels. We - * uniformize the thing by pulling the toplevel - * widget for each WPanel and compare this to the - * toplevel source_widget - */ - toplevel_widget = gtk_widget_get_toplevel (source_widget); - - for (list = containers; list; list = list->next) { - GtkWidget *panel_toplevel_widget; - - panel = ((PanelContainer *) list->data)->panel; - - panel_toplevel_widget = panel->xwindow; - - if (panel->xwindow == toplevel_widget){ - - /* - * Now a WPanel actually contains a number of - * drag sources. If the drag source is the - * Tree, we must report that it was not the - * contents of the WPanel - */ - - if (source_widget == panel->tree) - return NULL; - - return panel; - } - } - - return NULL; -} - -/* * Performs a drop action on the specified panel. Only supports copy * and move operations. The files are moved or copied to the * specified destination directory. @@ -258,31 +242,30 @@ { GdkDragAction action; WPanel *source_panel; + GtkWidget *source_widget; GList *names; - if (context->suggested_action == GDK_ACTION_ASK) { - action = get_action (); + if (context->action == GDK_ACTION_ASK) { + action = get_action (context); if (action == GDK_ACTION_ASK) return FALSE; } else - action = context->suggested_action; + action = context->action; - /* If we are dragging from a file panel, we can display a nicer status display */ - source_panel = find_panel_owning_window (context); + /* If we are dragging from a file panel, we can display a nicer status + * display. But if the drag was from the tree, we cannot do this. + */ + source_panel = gdnd_find_panel_by_drag_context (context, &source_widget); + if (source_widget == source_panel->tree) + source_panel = NULL; - /* Check if the user did not drag the information to the same directory */ - if (source_panel){ - if (strcmp (source_panel->cwd, destdir) == 0) - return FALSE; - } - /* Symlinks do not use file.c */ if (source_panel && action != GDK_ACTION_LINK) perform_action_on_panel (source_panel, action, destdir, - context->suggested_action == GDK_ACTION_ASK); + context->action == GDK_ACTION_ASK); else { names = gnome_uri_list_extract_uris (selection_data->data); @@ -295,4 +278,130 @@ } return TRUE; +} + +/** + * gdnd_drag_context_has_target: + * @context: The context to query for a target type + * @type: The sought target type + * + * Tests whether the specified drag context has a target of the specified type. + * + * Return value: TRUE if the context has the specified target type, FALSE + * otherwise. + **/ +int +gdnd_drag_context_has_target (GdkDragContext *context, TargetType type) +{ + GList *l; + + g_return_val_if_fail (context != NULL, FALSE); + + for (l = context->targets; l; l = l->next) + if (dnd_target_atoms[type] == GPOINTER_TO_INT (l->data)) + return TRUE; + + return FALSE; +} + +/** + * gdnd_find_panel_by_drag_context: + * @context: The context by which to find a panel. + * @source_widget: The source widget is returned here. + * + * Looks in the list of panels for the one that corresponds to the specified + * drag context. + * + * Return value: The sought panel, or NULL if no panel corresponds to the + * context. + **/ +WPanel * +gdnd_find_panel_by_drag_context (GdkDragContext *context, GtkWidget **source_widget) +{ + GtkWidget *source; + GtkWidget *toplevel; + GList *l; + WPanel *panel; + + g_return_val_if_fail (context != NULL, NULL); + + source = gtk_drag_get_source_widget (context); + + if (source_widget) + *source_widget = source; + + if (!source) + return NULL; /* different process */ + + toplevel = gtk_widget_get_toplevel (source); + + for (l = containers; l; l = l->next) { + panel = ((PanelContainer *) l->data)->panel; + + if (panel->xwindow == toplevel) + return panel; + } + + return NULL; +} + +/** + * gdnd_validate_action: + * @context: The drag context for this drag operation. + * @same_process: Whether the drag comes from the same process or not. + * @same_source: If same_process, then whether the source and dest widgets are the same. + * @dest: The destination file entry, or NULL if dropping on empty space. + * @dest_selected: If dest is non-NULL, whether it is selected or not. + * + * Computes the final drag action based on the suggested action of the specified + * context and conditions. + * + * Return value: The computed action, meant to be passed to gdk_drag_action(). + **/ +GdkDragAction +gdnd_validate_action (GdkDragContext *context, int same_process, int same_source, + file_entry *dest_fe, int dest_selected) +{ + int on_directory; + int on_exe; + + if (dest_fe) { + on_directory = dest_fe->f.link_to_dir || S_ISDIR (dest_fe->buf.st_mode); + on_exe = is_exe (dest_fe->buf.st_mode) && if_link_is_exe (dest_fe); + } + + if (dest_fe) { + if (same_source && dest_selected) + return 0; + + if (on_directory) { + if ((same_source || same_process) + && (context->actions & GDK_ACTION_MOVE) + && context->suggested_action != GDK_ACTION_ASK) + return GDK_ACTION_MOVE; + else + return context->suggested_action; + } else if (on_exe) { + if (context->actions & GDK_ACTION_COPY) + return GDK_ACTION_COPY; + } else if (same_source) + return 0; + else if (same_process + && (context->actions & GDK_ACTION_MOVE) + && context->suggested_action != GDK_ACTION_ASK) + return GDK_ACTION_MOVE; + else + return context->suggested_action; + } else { + if (same_source) + return 0; + else if (same_process + && (context->actions & GDK_ACTION_MOVE) + && context->suggested_action != GDK_ACTION_ASK) + return GDK_ACTION_MOVE; + else + return context->suggested_action; + } + + return 0; } diff -ruN old/mc-4.5.9/gnome/gdnd.h new/mc-4.5.10/gnome/gdnd.h --- old/mc-4.5.9/gnome/gdnd.h Mon Jan 18 17:44:12 1999 +++ new/mc-4.5.10/gnome/gdnd.h Sun Jan 31 18:55:19 1999 @@ -10,19 +10,45 @@ #define GDND_H #include +#include "panel.h" /* Standard DnD types */ -enum { +typedef enum { TARGET_MC_DESKTOP_ICON, TARGET_URI_LIST, TARGET_TEXT_PLAIN, - TARGET_URL -}; + TARGET_URL, + TARGET_NTARGETS +} TargetType; +/* DnD target names */ +#define TARGET_MC_DESKTOP_ICON_TYPE "application/x-mc-desktop-icon" +#define TARGET_URI_LIST_TYPE "text/uri-list" +#define TARGET_TEXT_PLAIN_TYPE "text/plain" +#define TARGET_URL_TYPE "_NETSCAPE_URL" + +/* Atoms for the DnD types, indexed per the enum above */ +extern GdkAtom dnd_target_atoms[]; + + +/* Initializes drag and drop by interning the target convenience atoms */ +void gdnd_init (void); /* Drop the list of URIs in the selection data to the specified directory */ int gdnd_drop_on_directory (GdkDragContext *context, GtkSelectionData *selection_data, char *dirname); + +/* Test whether the specified context has a certain target type */ +int gdnd_drag_context_has_target (GdkDragContext *context, TargetType type); + +/* Look for a panel that corresponds to the specified drag context */ +WPanel *gdnd_find_panel_by_drag_context (GdkDragContext *context, GtkWidget **source_widget); + +/* Computes the final drag action based on the suggested actions and the + * specified conditions. + */ +GdkDragAction gdnd_validate_action (GdkDragContext *context, int same_process, int same_source, + file_entry *dest_fe, int dest_selected); #endif diff -ruN old/mc-4.5.9/gnome/gicon.c new/mc-4.5.10/gnome/gicon.c --- old/mc-4.5.9/gnome/gicon.c Mon Jan 18 17:44:12 1999 +++ new/mc-4.5.10/gnome/gicon.c Sun Jan 31 18:55:19 1999 @@ -39,7 +39,7 @@ /* * If true, we choose the icon in a way that might be a bit slow */ -static int we_can_affort_the_speed = 0; +int we_can_afford_the_speed = 0; /** * gicon_init: @@ -173,13 +173,14 @@ * icon for it. Including a lookup in the metadata. */ GdkImlibImage * -gicon_get_icon_for_file_speed (file_entry *fe, gboolean do_quick) +gicon_get_icon_for_file_speed (char *directory, file_entry *fe, gboolean do_quick) { GdkImlibImage *image; int size; char *buf, *mime_type; mode_t mode; + g_return_val_if_fail (directory != NULL, NULL); g_return_val_if_fail (fe != NULL, NULL); if (!gicon_inited) @@ -192,6 +193,19 @@ */ if (S_ISDIR (mode)){ if (fe->buf.st_uid != our_uid){ + { + static int reported; + + if (!reported){ + g_warning ("Getgroups should be used here\n"); + reported = 1; + } + } + + /* FIXME: + * Use getgroups to fetch the list of groups + * to which I belong and test against those + */ if (fe->buf.st_gid != our_gid){ /* @@ -232,30 +246,40 @@ /* * 2. Expensive tests */ - if (!do_quick || we_can_affort_the_speed){ + if (!do_quick || we_can_afford_the_speed) { + char *full_name; + + full_name = g_concat_dir_and_file (directory, fe->fname); + /* * 2.1 Try to fetch the icon as an inline png from the metadata. */ - if (gnome_metadata_get (fe->fname, "icon-inline-png", &size, &buf) == 0){ + if (gnome_metadata_get (full_name, "icon-inline-png", &size, &buf) == 0){ image = gdk_imlib_inlined_png_to_image (buf, size); g_free (buf); - if (image) + if (image) { + g_free (full_name); return image; + } } /* * 2.2. Try to fetch the icon from the metadata. */ - if (gnome_metadata_get (fe->fname, "icon-filename", &size, &buf) == 0){ + if (gnome_metadata_get (full_name, "icon-filename", &size, &buf) == 0){ image = gicon_get_by_filename (buf); g_free (buf); - if (image) + if (image) { + g_free (full_name); return image; + } } + + g_free (full_name); } /* @@ -287,9 +311,9 @@ } GdkImlibImage * -gicon_get_icon_for_file (file_entry *fe) +gicon_get_icon_for_file (char *directory, file_entry *fe) { - return gicon_get_icon_for_file_speed (fe, TRUE); + return gicon_get_icon_for_file_speed (directory, fe, TRUE); } typedef struct { diff -ruN old/mc-4.5.9/gnome/gicon.h new/mc-4.5.10/gnome/gicon.h --- old/mc-4.5.9/gnome/gicon.h Mon Jan 18 17:44:12 1999 +++ new/mc-4.5.10/gnome/gicon.h Sun Jan 31 18:55:19 1999 @@ -1,10 +1,11 @@ #ifndef GNOME_GICON_H #define GNOME_GICON_H -GdkImlibImage *gicon_get_by_filename (char *fname); -GdkImlibImage *gicon_stock_load (char *basename); -GdkImlibImage *gicon_get_icon_for_file (file_entry *fe); -GdkImlibImage *gicon_get_icon_for_file_speed (file_entry *fe, - gboolean do_quick); +GdkImlibImage *gicon_get_by_filename (char *fname); +GdkImlibImage *gicon_stock_load (char *basename); +GdkImlibImage *gicon_get_icon_for_file (char *directory, file_entry *fe); +GdkImlibImage *gicon_get_icon_for_file_speed (char *directory, file_entry *fe, gboolean do_quick); + +char *gicon_image_to_name (GdkImlibImage *image); #endif diff -ruN old/mc-4.5.9/gnome/ginfo.c new/mc-4.5.10/gnome/ginfo.c --- old/mc-4.5.9/gnome/ginfo.c Mon Jan 18 17:44:12 1999 +++ new/mc-4.5.10/gnome/ginfo.c Sun Jan 31 18:55:19 1999 @@ -4,9 +4,8 @@ #include #include -#include #include -#include "fs.h" +#include "global.h" #include "dlg.h" #include "widget.h" #include "info.h" diff -ruN old/mc-4.5.9/gnome/gkey.c new/mc-4.5.10/gnome/gkey.c --- old/mc-4.5.9/gnome/gkey.c Mon Jan 18 17:44:12 1999 +++ new/mc-4.5.10/gnome/gkey.c Sun Jan 31 18:55:19 1999 @@ -7,7 +7,7 @@ */ #include -#include "mad.h" +#include "global.h" #include "x.h" #include "key.h" @@ -46,7 +46,7 @@ { struct trampoline *t; - t = xmalloc (sizeof (struct trampoline), "add_select_channel"); + t = g_new (struct trampoline, 1); t->fn = callback; t->fd = fd; t->fn_closure = info; @@ -74,7 +74,7 @@ if (tclosure){ select_list = g_list_remove (select_list, tclosure); gdk_input_remove (tclosure->tag); - free (tclosure); + g_free (tclosure); } else { fprintf (stderr, "PANIC: could not find closure for %d\n", fd); } diff -ruN old/mc-4.5.9/gnome/glayout.c new/mc-4.5.10/gnome/glayout.c --- old/mc-4.5.9/gnome/glayout.c Mon Jan 18 17:44:12 1999 +++ new/mc-4.5.10/gnome/glayout.c Sun Jan 31 18:55:19 1999 @@ -10,6 +10,7 @@ #include #include #include +#include "global.h" #include "dir.h" #include "panel.h" #include "gscreen.h" @@ -303,7 +304,7 @@ { GNOME_APP_UI_ITEM, N_("_Open"), N_("Opens the selected files"), gnome_open_files }, /* { GNOME_APP_UI_ITEM, N_("Open _FTP site"), N_("Opens an FTP site"), ftplink_cmd },*/ { GNOME_APP_UI_ITEM, N_("_Copy..."), N_("Copy files"), copy_cmd, NULL}, - { GNOME_APP_UI_ITEM, N_("_Delete..."), N_("Delete files from disk"), delete_cmd }, + { GNOME_APP_UI_ITEM, N_("_Delete..."), N_("Delete files from disk"), delete_cmd, NULL, NULL, 0, NULL, 'd', GDK_CONTROL_MASK}, { GNOME_APP_UI_ITEM, N_("_Move..."), N_("Rename or move files"), ren_cmd }, { GNOME_APP_UI_SEPARATOR }, { GNOME_APP_UI_ITEM, N_("C_lose"), N_("Close this panel"), gnome_close_panel, NULL, @@ -313,11 +314,7 @@ }; GnomeUIInfo gnome_panel_edit_menu [] = { - GNOMEUIINFO_MENU_CUT_ITEM(NULL, NULL), - GNOMEUIINFO_MENU_COPY_ITEM(NULL, NULL), - GNOMEUIINFO_MENU_PASTE_ITEM(NULL, NULL), - { GNOME_APP_UI_SEPARATOR }, - { GNOME_APP_UI_ITEM, N_("_Select All"), N_("Select all files in the current Panel"), gnome_select_all_cmd }, + { GNOME_APP_UI_ITEM, N_("Select _All"), N_("Select all files in the current Panel"), gnome_select_all_cmd, NULL, NULL, 0, NULL, 'a', GDK_CONTROL_MASK }, { GNOME_APP_UI_ITEM, N_("_Select Files..."), N_("Select a group of files"), select_cmd }, { GNOME_APP_UI_ITEM, N_("_Invert Selection"), N_("Reverses the list of tagged files"), reverse_selection_cmd }, { GNOME_APP_UI_SEPARATOR }, @@ -348,7 +345,7 @@ { GNOME_APP_UI_ITEM, N_("_Find File..."), N_("Locate files on disk"), find_cmd, NULL, NULL, GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_MENU_JUMP_TO}, - { GNOME_APP_UI_ITEM, N_("_Compare panels..."), N_("Compare two panel contents"), gnome_compare_panels }, +/* { GNOME_APP_UI_ITEM, N_("_Compare panels..."), N_("Compare two panel contents"), gnome_compare_panels },*/ { GNOME_APP_UI_ITEM, N_("_Run Command..."), N_("Runs a command"), run_cmd, NULL, NULL, GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_MENU_OPEN, GDK_F2, 0 }, { GNOME_APP_UI_ITEM, N_("_Run Command in panel..."),N_("Run a command and put the results in a panel"), gnome_external_panelize }, diff -ruN old/mc-4.5.9/gnome/gmain.c new/mc-4.5.10/gnome/gmain.c --- old/mc-4.5.9/gnome/gmain.c Mon Jan 18 17:44:12 1999 +++ new/mc-4.5.10/gnome/gmain.c Sun Jan 31 18:55:19 1999 @@ -420,7 +420,7 @@ if (current_widget == p->filter_w){ in = (WInput *) current_widget; - set_panel_filter_to (p, strdup (in->buffer)); + set_panel_filter_to (p, g_strdup (in->buffer)); return MSG_HANDLED; } @@ -626,3 +626,15 @@ } } +/* + * Configures the GtkWindow/GnomeDialog from a WPanel. + * + * This makes the window centered on the screen and binds it to + * its parent container for better window manager experience + */ +void +gmc_window_setup_from_panel (GnomeDialog *dialog, WPanel *panel) +{ + gtk_window_set_position (GTK_WINDOW (dialog), GTK_WIN_POS_MOUSE); + gnome_dialog_set_parent (dialog, GTK_WINDOW (panel->xwindow)); +} diff -ruN old/mc-4.5.9/gnome/gmain.h new/mc-4.5.10/gnome/gmain.h --- old/mc-4.5.9/gnome/gmain.h Mon Jan 18 17:44:12 1999 +++ new/mc-4.5.10/gnome/gmain.h Sun Jan 31 18:55:19 1999 @@ -41,6 +41,8 @@ void x_show_info (WInfo *info, struct my_statfs *s, struct stat *b); void x_create_info (Dlg_head *h, widget_data parent, WInfo *info); +void gmc_window_setup_from_panel (GnomeDialog *dialog, WPanel *panel); + struct gmc_color_pairs_s { GdkColor *fore, *back; }; diff -ruN old/mc-4.5.9/gnome/gmc.gnorba new/mc-4.5.10/gnome/gmc.gnorba --- old/mc-4.5.9/gnome/gmc.gnorba Mon Jan 18 17:44:12 1999 +++ new/mc-4.5.10/gnome/gmc.gnorba Sun Jan 31 18:55:19 1999 @@ -2,7 +2,7 @@ type=exe repo_id=IDL:GNOME/FileManagerFactory:1.0 IDL:GNOME/GenericFactory:1.0 description=GNOME Midnight Commander -location_info=corba-gmc +location_info=gmc [gmc_filemanager_window] type=factory diff -ruN old/mc-4.5.9/gnome/gmenu.c new/mc-4.5.10/gnome/gmenu.c --- old/mc-4.5.9/gnome/gmenu.c Mon Jan 18 17:44:12 1999 +++ new/mc-4.5.10/gnome/gmenu.c Sun Jan 31 18:55:19 1999 @@ -8,9 +8,8 @@ #include #include -#include +#include "global.h" #include "main.h" -#include "mad.h" #include "menu.h" #include "x.h" @@ -22,7 +21,7 @@ { Menu menu; - menu = (Menu) xmalloc (sizeof (*menu), "create_menu"); + menu = (Menu) g_malloc (sizeof (*menu)); menu->count = count; menu->max_entry_len = 0; menu->entries = entries; @@ -50,7 +49,7 @@ WMenu *menubar_new (int y, int x, int cols, Menu menu [], int items) { - WMenu *menubar = (WMenu *) xmalloc (sizeof (WMenu), "menubar_new"); + WMenu *menubar = g_new (WMenu, 1); GtkWidget *g_menubar; int i, j; diff -ruN old/mc-4.5.9/gnome/gmetadata.c new/mc-4.5.10/gnome/gmetadata.c --- old/mc-4.5.9/gnome/gmetadata.c Mon Jan 18 17:44:12 1999 +++ new/mc-4.5.10/gnome/gmetadata.c Sun Jan 31 18:55:19 1999 @@ -6,8 +6,8 @@ */ #include -#include "fs.h" #include +#include "global.h" #include "gmetadata.h" #include #include "../vfs/vfs.h" @@ -73,7 +73,7 @@ g_return_if_fail (filename != NULL); - sprintf (buf, "%d %d", x, y); + g_snprintf (buf, sizeof (buf), "%d %d", x, y); if (gnome_metadata_set (filename, ICON_POSITION, strlen (buf) + 1, buf) != 0) g_warning ("Error setting the icon position metadata for \"%s\"", filename); diff -ruN old/mc-4.5.9/gnome/gnome-file-property-dialog.c new/mc-4.5.10/gnome/gnome-file-property-dialog.c --- old/mc-4.5.9/gnome/gnome-file-property-dialog.c Wed Dec 31 19:00:00 1969 +++ new/mc-4.5.10/gnome/gnome-file-property-dialog.c Sun Jan 31 18:55:19 1999 @@ -0,0 +1,1189 @@ +/* gnome-file-property-dialog.c + * Copyright (C) 1999 J. Arthur Random + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#include +#include +#include "gnome-file-property-dialog.h" +#include "dir.h" +#include "gdesktop.h" +#include +#include +#include +#include +#include "fileopctx.h" +#include "file.h" +#include "../vfs/vfs.h" +#include "gicon.h" +#include "dialog.h" + +static void gnome_file_property_dialog_init (GnomeFilePropertyDialog *file_property_dialog); +static void gnome_file_property_dialog_class_init (GnomeFilePropertyDialogClass *klass); +static void gnome_file_property_dialog_finalize (GtkObject *object); + +static GnomeDialogClass *parent_class = NULL; + + +GtkType +gnome_file_property_dialog_get_type (void) +{ + static GtkType file_property_dialog_type = 0; + + if (!file_property_dialog_type) + { + static const GtkTypeInfo file_property_dialog_info = + { + "GnomeFilePropertyDialog", + sizeof (GnomeFilePropertyDialog), + sizeof (GnomeFilePropertyDialogClass), + (GtkClassInitFunc) gnome_file_property_dialog_class_init, + (GtkObjectInitFunc) gnome_file_property_dialog_init, + /* reserved_1 */ NULL, + /* reserved_2 */ NULL, + }; + + file_property_dialog_type = gtk_type_unique (gnome_dialog_get_type (), &file_property_dialog_info); + } + + return file_property_dialog_type; +} + +static void +gnome_file_property_dialog_class_init (GnomeFilePropertyDialogClass *klass) +{ + GtkObjectClass *object_class; + + object_class = (GtkObjectClass*) klass; + + parent_class = gtk_type_class (gnome_dialog_get_type ()); + object_class->finalize = gnome_file_property_dialog_finalize; + + +} + +static void +gnome_file_property_dialog_init (GnomeFilePropertyDialog *file_property_dialog) +{ + file_property_dialog->file_name = NULL; + file_property_dialog->file_entry = NULL; + file_property_dialog->group_name = NULL; + file_property_dialog->modifyable = TRUE; + file_property_dialog->user_name = NULL; + file_property_dialog->prop1_label = NULL; + file_property_dialog->prop2_label = NULL; + file_property_dialog->prop1_entry = NULL; + file_property_dialog->prop2_entry = NULL; + file_property_dialog->prop1_cbox = NULL; + file_property_dialog->prop2_cbox = NULL; + file_property_dialog->fm_open = NULL; + file_property_dialog->fm_view = NULL; + file_property_dialog->edit = NULL; + file_property_dialog->drop_target = NULL; + file_property_dialog->im = NULL; +} +static void +gnome_file_property_dialog_finalize (GtkObject *object) +{ + GnomeFilePropertyDialog *gfpd; + + g_return_if_fail (object != NULL); + g_return_if_fail (GNOME_IS_FILE_PROPERTY_DIALOG (object)); + + gfpd = GNOME_FILE_PROPERTY_DIALOG (object); + + if (gfpd->file_name) + g_free (gfpd->file_name); + if (gfpd->im) + gdk_imlib_destroy_image (gfpd->im); + (* GTK_OBJECT_CLASS (parent_class)->finalize) (object); +} + +/* Create the pane */ + +static GtkWidget * +create_general_properties (GnomeFilePropertyDialog *fp_dlg) +{ + GtkWidget *vbox; + GtkWidget *hbox; + GtkWidget *label; + GtkWidget *align; + gchar *direc; + gchar *gen_string; + gchar size[50]; /* this is a HUGE file. (: */ + gchar size2[20]; /* this is a HUGE file. (: */ + file_entry *fe; + GtkWidget *icon; + struct tm *time; + GtkWidget *table; + int n; + + vbox = gtk_vbox_new (FALSE, GNOME_PAD_SMALL); + gtk_container_set_border_width (GTK_CONTAINER (vbox), GNOME_PAD); + + /* first, we set the icon */ + direc = g_strdup (fp_dlg->file_name); + rindex (direc, '/')[0] = '\0'; + fe = file_entry_from_file (fp_dlg->file_name); + fp_dlg->im = gicon_get_icon_for_file (direc, fe); + g_free (direc); + icon = gnome_pixmap_new_from_imlib (fp_dlg->im); + gtk_box_pack_start (GTK_BOX (vbox), icon, FALSE, FALSE, 0); + + /* we set the file part */ + gen_string = g_strconcat (_("Full Name: "), fp_dlg->file_name, NULL); + label = gtk_label_new (gen_string); + gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); + g_free (gen_string); + gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0); + /* if it's a symlink */ + align = gtk_alignment_new (0.0, 0.5, 1.0, 1.0); + hbox = gtk_hbox_new (FALSE, 2); + label = gtk_label_new (_("File Name")); + gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0); + fp_dlg->file_entry = gtk_entry_new (); + gen_string = rindex (fp_dlg->file_name, '/'); + if (gen_string) + gtk_entry_set_text (GTK_ENTRY (fp_dlg->file_entry), gen_string + 1); + else + /* I don't think this should happen anymore, but it can't hurt in + * case this ever gets used outside gmc */ + gtk_entry_set_text (GTK_ENTRY (fp_dlg->file_entry), fp_dlg->file_name); + /* We want to prevent editing of the file if + * the thing is a BLK, CHAR, or we don't own it */ + /* FIXME: We can actually edit it if we're in the same grp of the file. */ + if (fp_dlg->modifyable == FALSE) + gtk_widget_set_sensitive (fp_dlg->file_entry, FALSE); + gtk_box_pack_start (GTK_BOX (hbox), fp_dlg->file_entry, FALSE, FALSE, 0); + gtk_container_add (GTK_CONTAINER (align), hbox); + gtk_box_pack_start (GTK_BOX (vbox), align, FALSE, FALSE, 0); + gtk_box_pack_start (GTK_BOX (vbox), gtk_hseparator_new (), FALSE, FALSE, 8); + + /* File statistics */ + /* File type first */ + if (S_ISREG (fp_dlg->st.st_mode)) { + gen_string = g_strconcat (_("File Type: "), + gnome_mime_type (fp_dlg->file_name), + NULL); + label = gtk_label_new (gen_string); + g_free (gen_string); + } else if (S_ISLNK (fp_dlg->st.st_mode)) { + label = gtk_label_new (_("File Type: Symbolic Link")); + gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); + gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0); + n = mc_readlink (fp_dlg->file_name, size, 49); + if (n < 0) + label = gtk_label_new (_("Target Name: INVALID LINK")); + else { + size[n] = '\0'; + gen_string = g_strconcat (_("Target Name: "), size, NULL); + label = gtk_label_new (gen_string); + g_free (gen_string); + } + }else if (S_ISDIR (fp_dlg->st.st_mode)) + label = gtk_label_new (_("File Type: Directory")); + else if (S_ISCHR (fp_dlg->st.st_mode)) + label = gtk_label_new (_("File Type: Character Device")); + else if (S_ISBLK (fp_dlg->st.st_mode)) + label = gtk_label_new (_("File Type: Block Device")); + else if (S_ISSOCK (fp_dlg->st.st_mode)) + label = gtk_label_new (_("File Type: Socket")); + else if (S_ISFIFO (fp_dlg->st.st_mode)) + label = gtk_label_new (_("File Type: FIFO")); + gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); + gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0); + + /* Now file size */ + if (S_ISDIR (fp_dlg->st.st_mode) + || S_ISREG (fp_dlg->st.st_mode) + || S_ISLNK (fp_dlg->st.st_mode)) { + if ((gint)fp_dlg->st.st_size < 1024) { + snprintf (size, 19, "%d", (gint) fp_dlg->st.st_size); + gen_string = g_strconcat (_("File Size: "), size, _(" bytes"), NULL); + } else if ((gint)fp_dlg->st.st_size < 1024 * 1024) { + snprintf (size, 19, "%.1f", (gfloat) fp_dlg->st.st_size / 1024.0); + snprintf (size2, 19, "%d", (gint) fp_dlg->st.st_size); + gen_string = g_strconcat (_("File Size: "), size, _(" KBytes ("), + size2, _(" bytes)"), NULL); + } else { + snprintf (size, 19, "%.1f", (gfloat) fp_dlg->st.st_size / (1024.0 * 1024.0)); + snprintf (size2, 19, "%d", (gint) fp_dlg->st.st_size); + gen_string = g_strconcat (_("File Size: "), size, _(" MBytes ("), + size2, _(" bytes)"), NULL); + } + label = gtk_label_new (gen_string); + g_free (gen_string); + gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); + gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0); + } else { + label = gtk_label_new (_("File Size: N/A")); + gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); + gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0); + } + + gtk_box_pack_start (GTK_BOX (vbox), gtk_hseparator_new (), FALSE, FALSE, 8); + + /* Time Fields */ + table = gtk_table_new (3, 2, FALSE); + gtk_table_set_row_spacings (GTK_TABLE (table), 2); + gtk_box_pack_start (GTK_BOX (vbox), table, FALSE, FALSE, 0); + label = gtk_label_new (_("File Created on: ")); + gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); + gtk_table_attach_defaults (GTK_TABLE (table), label, 0, 1, 0, 1); + time = gmtime (&(fp_dlg->st.st_ctime)); + strftime (size, 49, "%a, %b %d %Y, %I:%M:%S %p", time); + label = gtk_label_new (size); + gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); + gtk_table_attach_defaults (GTK_TABLE (table), label, 1, 2, 0, 1); + + label = gtk_label_new (_("Last Modified on: ")); + gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); + gtk_table_attach_defaults (GTK_TABLE (table), label, 0, 1, 1, 2); + time = gmtime (&(fp_dlg->st.st_mtime)); + strftime (size, 49, "%a, %b %d %Y, %I:%M:%S %p", time); + label = gtk_label_new (size); + gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); + gtk_table_attach_defaults (GTK_TABLE (table), label, 1, 2, 1, 2); + + label = gtk_label_new (_("Last Accessed on: ")); + gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); + gtk_table_attach_defaults (GTK_TABLE (table), label, 0, 1, 2, 3); + time = gmtime (&(fp_dlg->st.st_atime)); + strftime (size, 49, "%a, %b %d %Y, %I:%M:%S %p", time); + label = gtk_label_new (size); + gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); + gtk_table_attach_defaults (GTK_TABLE (table), label, 1, 2, 2, 3); + return vbox; +} + + + +/* Settings Pane */ +static void +metadata_toggled (GtkWidget *cbox, GnomeFilePropertyDialog *fp_dlg) +{ + if (fp_dlg->changing) + return; + if (cbox == fp_dlg->open_cbox) { + if (GTK_TOGGLE_BUTTON (cbox)->active) { + gtk_widget_set_sensitive (fp_dlg->open_entry, FALSE); + if (fp_dlg->mime_fm_open) + gtk_entry_set_text (GTK_ENTRY (fp_dlg->open_entry), fp_dlg->mime_fm_open); + } else { + gtk_widget_set_sensitive (fp_dlg->open_entry, TRUE); + if (fp_dlg->fm_open) { + gtk_entry_set_text (GTK_ENTRY (fp_dlg->open_entry), fp_dlg->fm_open); + } + } + } else if (cbox == fp_dlg->prop1_cbox) { + if (GTK_TOGGLE_BUTTON (cbox)->active) { + gtk_widget_set_sensitive (fp_dlg->prop1_entry, FALSE); + if (fp_dlg->executable && fp_dlg->mime_drop_target) { + gtk_entry_set_text (GTK_ENTRY (fp_dlg->prop1_entry), fp_dlg->mime_drop_target); + } else if (!fp_dlg->executable && fp_dlg->mime_fm_view) { + gtk_entry_set_text (GTK_ENTRY (fp_dlg->prop1_entry), fp_dlg->mime_fm_view); + } else { + gtk_entry_set_text (GTK_ENTRY (fp_dlg->prop1_entry), ""); + } + } else { + gtk_widget_set_sensitive (fp_dlg->prop1_entry, TRUE); + if (fp_dlg->executable && fp_dlg->drop_target) { + gtk_entry_set_text (GTK_ENTRY (fp_dlg->prop1_entry), fp_dlg->drop_target); + } else if (!fp_dlg->executable && fp_dlg->fm_view) { + gtk_entry_set_text (GTK_ENTRY (fp_dlg->prop1_entry), fp_dlg->fm_view); + } + } + } else { + if (GTK_TOGGLE_BUTTON (cbox)->active) { + gtk_widget_set_sensitive (fp_dlg->prop2_entry, FALSE); + if (fp_dlg->mime_edit) { + gtk_entry_set_text (GTK_ENTRY (fp_dlg->prop2_entry), fp_dlg->mime_edit); + } else { + gtk_entry_set_text (GTK_ENTRY (fp_dlg->prop2_entry), ""); + } + } else { + gtk_widget_set_sensitive (fp_dlg->prop2_entry, TRUE); + if (fp_dlg->edit) { + gtk_entry_set_text (GTK_ENTRY (fp_dlg->prop2_entry), fp_dlg->edit); + } + } + } +} +static void +switch_metadata_box (GnomeFilePropertyDialog *fp_dlg) +{ + if (NULL == fp_dlg->prop1_label) + return; + fp_dlg->changing = TRUE; + if (fp_dlg->executable) { + gtk_label_set_text (GTK_LABEL (fp_dlg->prop1_label), "Drop Action"); + gtk_label_set_text (GTK_LABEL (GTK_BIN (fp_dlg->prop1_cbox)->child), "Use default Drop Action options"); + if (fp_dlg->drop_target) { + gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON (fp_dlg->prop1_cbox), FALSE); + gtk_entry_set_text (GTK_ENTRY (fp_dlg->prop1_entry), fp_dlg->drop_target); + gtk_widget_set_sensitive (fp_dlg->prop1_entry, TRUE); + } else if (fp_dlg->mime_drop_target) { + gtk_entry_set_text (GTK_ENTRY (fp_dlg->prop1_entry), fp_dlg->mime_drop_target); + gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON (fp_dlg->prop1_cbox), TRUE); + gtk_widget_set_sensitive (fp_dlg->prop1_entry, FALSE); + } else { + gtk_entry_set_text (GTK_ENTRY (fp_dlg->prop1_entry), ""); + gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON (fp_dlg->prop1_cbox), TRUE); + gtk_widget_set_sensitive (fp_dlg->prop1_entry, FALSE); + } + } else { + gtk_label_set_text (GTK_LABEL (fp_dlg->prop1_label), "View"); + gtk_label_set_text (GTK_LABEL (GTK_BIN (fp_dlg->prop1_cbox)->child), "Use default View options"); + if (fp_dlg->fm_view) { + gtk_entry_set_text (GTK_ENTRY (fp_dlg->prop1_entry), fp_dlg->fm_view); + gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON (fp_dlg->prop1_cbox), FALSE); + gtk_widget_set_sensitive (fp_dlg->prop1_entry, TRUE); + } else if (fp_dlg->mime_fm_view) { + gtk_entry_set_text (GTK_ENTRY (fp_dlg->prop1_entry), fp_dlg->mime_fm_view); + gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON (fp_dlg->prop1_cbox), TRUE); + gtk_widget_set_sensitive (fp_dlg->prop1_entry, FALSE); + } else { + gtk_entry_set_text (GTK_ENTRY (fp_dlg->prop1_entry), ""); + gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON (fp_dlg->prop1_cbox), TRUE); + gtk_widget_set_sensitive (fp_dlg->prop1_entry, FALSE); + } + } + if (fp_dlg->executable) { + gtk_widget_hide (fp_dlg->prop2_label); + gtk_widget_hide (fp_dlg->prop2_entry); + gtk_widget_hide (fp_dlg->prop2_cbox); + gtk_widget_hide (fp_dlg->prop2_hline); + } else { + gtk_widget_show (fp_dlg->prop2_label); + gtk_widget_show (fp_dlg->prop2_entry); + gtk_widget_show (fp_dlg->prop2_cbox); + gtk_widget_show (fp_dlg->prop2_hline); + } + fp_dlg->changing = FALSE; +} +static GtkWidget * +generate_icon_sel (GnomeFilePropertyDialog *fp_dlg) +{ + GtkWidget *retval; + gchar *icon; + + retval = gnome_icon_entry_new ("gmc_file_icon", "Select an Icon"); + icon = gicon_image_to_name (fp_dlg->im); + if (!icon || !icon[0]) + return retval; + gnome_icon_entry_set_icon (GNOME_ICON_ENTRY (retval), icon); + return retval; +} +static GtkWidget * +generate_actions_box (GnomeFilePropertyDialog *fp_dlg) +{ + GtkWidget *vbox; + GtkWidget *table; + + /* Here's the Logic: */ + /* All tops of files (other then folders) should let us edit "open" */ + /* If we are a file, and an executable, we want to edit our "drop-target" */ + /* Metadata, as it is meaningful to us. */ + /* If we are non-executable, we want to edit our "edit" and "view" fields. */ + /* Sym links want to have the same options as above, but use their Target's */ + /* Executable/set bit in order to determine which one. */ + /* Note, symlinks can set their own metadata, independent from their */ + /* targets. */ + + table = gtk_table_new (8, 2, FALSE); + gtk_container_set_border_width (GTK_CONTAINER (table), GNOME_PAD_SMALL); + + /* we do open first */ + fp_dlg->open_label = gtk_label_new ("Open"); + gtk_misc_set_alignment (GTK_MISC (fp_dlg->open_label), 0.0, 0.5); + gtk_misc_set_padding (GTK_MISC (fp_dlg->open_label), 2, 0); + gtk_table_attach_defaults (GTK_TABLE (table), + fp_dlg->open_label, + 0, 1, 0, 1); + fp_dlg->open_entry = gtk_entry_new (); + gtk_table_attach_defaults (GTK_TABLE (table), + fp_dlg->open_entry, + 1, 2, 0, 1); + fp_dlg->open_cbox = gtk_check_button_new_with_label (_("Use default Open options")); + gtk_signal_connect (GTK_OBJECT (fp_dlg->open_cbox), "toggled", metadata_toggled, fp_dlg); + gtk_table_attach_defaults (GTK_TABLE (table), fp_dlg->open_cbox, 0, 2, 1, 2); + + + vbox = gtk_vbox_new (FALSE, 0); + gtk_box_pack_start (GTK_BOX (vbox), gtk_hseparator_new (), FALSE, FALSE, GNOME_PAD_SMALL); + gtk_table_attach_defaults (GTK_TABLE (table), vbox, 0, 2, 2, 3); + + if (fp_dlg->executable) + fp_dlg->prop1_label = gtk_label_new (_("Drop Action")); + else + fp_dlg->prop1_label = gtk_label_new (_("View")); + gtk_misc_set_alignment (GTK_MISC (fp_dlg->prop1_label), 0.0, 0.5); + gtk_misc_set_padding (GTK_MISC (fp_dlg->prop1_label), 2, 0); + gtk_table_attach_defaults (GTK_TABLE (table), + fp_dlg->prop1_label, + 0, 1, 3, 4); + fp_dlg->prop1_entry = gtk_entry_new (); + gtk_table_attach_defaults (GTK_TABLE (table), + fp_dlg->prop1_entry, + 1, 2, 3, 4); + if (fp_dlg->executable) + fp_dlg->prop1_cbox = gtk_check_button_new_with_label (_("Use default Drop action options")); + else + fp_dlg->prop1_cbox = gtk_check_button_new_with_label (_("Use default View options")); + gtk_signal_connect (GTK_OBJECT (fp_dlg->prop1_cbox), "toggled", metadata_toggled, fp_dlg); + gtk_table_attach_defaults (GTK_TABLE (table), fp_dlg->prop1_cbox, 0, 2, 4, 5); + + vbox = gtk_vbox_new (FALSE, 0); + fp_dlg->prop2_hline = gtk_hseparator_new (); + gtk_box_pack_start (GTK_BOX (vbox), fp_dlg->prop2_hline, FALSE, FALSE, GNOME_PAD_SMALL); + gtk_table_attach_defaults (GTK_TABLE (table), vbox, 0, 2, 5, 6); + + fp_dlg->prop2_label = gtk_label_new (_("Edit")); + gtk_misc_set_alignment (GTK_MISC (fp_dlg->prop2_label), 0.0, 0.5); + gtk_misc_set_padding (GTK_MISC (fp_dlg->prop2_label), 2, 0); + gtk_table_attach_defaults (GTK_TABLE (table), + fp_dlg->prop2_label, + 0, 1, 6, 7); + fp_dlg->prop2_entry = gtk_entry_new (); + gtk_table_attach_defaults (GTK_TABLE (table), + fp_dlg->prop2_entry, + 1, 2, 6, 7); + fp_dlg->prop2_cbox = gtk_check_button_new_with_label (_("Use default Edit options")); + gtk_signal_connect (GTK_OBJECT (fp_dlg->prop2_cbox), "toggled", metadata_toggled, fp_dlg); + gtk_table_attach_defaults (GTK_TABLE (table), fp_dlg->prop2_cbox, 0, 2, 7, 8); + + /* we set the open field */ + fp_dlg->changing = TRUE; + if (fp_dlg->fm_open) { + gtk_entry_set_text (GTK_ENTRY (fp_dlg->open_entry), fp_dlg->fm_open); + gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON (fp_dlg->open_cbox), FALSE); + gtk_widget_set_sensitive (fp_dlg->open_entry, TRUE); + } else if (fp_dlg->mime_fm_open) { + gtk_entry_set_text (GTK_ENTRY (fp_dlg->open_entry), fp_dlg->mime_fm_open); + gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON (fp_dlg->open_cbox), TRUE); + gtk_widget_set_sensitive (fp_dlg->open_entry, FALSE); + } else { + gtk_entry_set_text (GTK_ENTRY (fp_dlg->open_entry), ""); + gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON (fp_dlg->open_cbox), TRUE); + gtk_widget_set_sensitive (fp_dlg->open_entry, FALSE); + } + if (fp_dlg->edit) { + gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON (fp_dlg->prop2_cbox), FALSE); + gtk_entry_set_text (GTK_ENTRY (fp_dlg->prop2_entry), fp_dlg->edit); + gtk_widget_set_sensitive (fp_dlg->prop2_entry, TRUE); + } else if (fp_dlg->mime_edit) { + gtk_entry_set_text (GTK_ENTRY (fp_dlg->prop2_entry), fp_dlg->mime_edit); + gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON (fp_dlg->prop2_cbox), TRUE); + gtk_widget_set_sensitive (fp_dlg->prop2_entry, FALSE); + } else { + gtk_entry_set_text (GTK_ENTRY (fp_dlg->prop2_entry), ""); + gtk_toggle_button_set_active ( GTK_TOGGLE_BUTTON (fp_dlg->prop2_cbox), TRUE); + gtk_widget_set_sensitive (fp_dlg->prop2_entry, FALSE); + } + fp_dlg->changing = FALSE; + + return table; +} +static GtkWidget * +create_settings_pane (GnomeFilePropertyDialog *fp_dlg) +{ + GtkWidget *vbox = NULL; + GtkWidget *hbox; + GtkWidget *vbox2; + GtkWidget *frame; + GtkWidget *align; + GtkWidget *table; + struct stat linkstat; + + vbox = gtk_vbox_new (FALSE, GNOME_PAD_SMALL); + gtk_container_set_border_width (GTK_CONTAINER (vbox), GNOME_PAD); + + if (fp_dlg->can_set_icon) { + + frame = gtk_frame_new (_("Icon")); + vbox2 = gtk_vbox_new (FALSE, 0); + hbox = gtk_hbox_new (FALSE, 0); + align = gtk_alignment_new (0.5, 0.5, 1.0, 1.0); + gtk_box_pack_start (GTK_BOX (vbox), frame, TRUE, TRUE, 0); + fp_dlg->button = generate_icon_sel (fp_dlg); + gtk_container_add (GTK_CONTAINER (frame), vbox2); + gtk_container_set_border_width (GTK_CONTAINER (vbox2), GNOME_PAD_SMALL); + gtk_box_pack_start (GTK_BOX (vbox2), hbox, TRUE, FALSE, 0); + gtk_box_pack_start (GTK_BOX (hbox), align, TRUE, FALSE, 0); + gtk_container_add (GTK_CONTAINER (align), fp_dlg->button); + } + /* Are we a directory or device? If so, we do nothing else. */ + if (S_ISLNK (fp_dlg->st.st_mode)) + mc_stat (fp_dlg->file_name, &linkstat); + + if (!(S_ISREG (fp_dlg->st.st_mode) || (S_ISLNK (fp_dlg->st.st_mode) && !S_ISREG (linkstat.st_mode)))) { + if (!fp_dlg->can_set_icon) { + gtk_widget_unref (vbox); + vbox = NULL; + } + return vbox; + } + + /* We must be a file or a link to a file. */ + frame = gtk_frame_new (_("Actions")); + gtk_box_pack_start (GTK_BOX (vbox), frame, TRUE, TRUE, 0); + table = generate_actions_box (fp_dlg); + gtk_container_add (GTK_CONTAINER (frame), table); + return vbox; +} + +/* Permissions Pane */ +static GtkWidget * +label_new (char *text, double xalign, double yalign) +{ + GtkWidget *label; + + label = gtk_label_new (text); + gtk_misc_set_alignment (GTK_MISC (label), xalign, yalign); + gtk_widget_show (label); + + return label; +} + +static mode_t +perm_get_umode (GnomeFilePropertyDialog *fp_dlg) +{ + mode_t umode; + +#define SETBIT(widget, flag) umode |= GTK_TOGGLE_BUTTON (widget)->active ? flag : 0 + + umode = 0; + + SETBIT (fp_dlg->suid, S_ISUID); + SETBIT (fp_dlg->sgid, S_ISGID); + SETBIT (fp_dlg->svtx, S_ISVTX); + + SETBIT (fp_dlg->rusr, S_IRUSR); + SETBIT (fp_dlg->wusr, S_IWUSR); + SETBIT (fp_dlg->xusr, S_IXUSR); + + SETBIT (fp_dlg->rgrp, S_IRGRP); + SETBIT (fp_dlg->wgrp, S_IWGRP); + SETBIT (fp_dlg->xgrp, S_IXGRP); + + SETBIT (fp_dlg->roth, S_IROTH); + SETBIT (fp_dlg->woth, S_IWOTH); + SETBIT (fp_dlg->xoth, S_IXOTH); + + return umode; + +#undef SETBIT +} + + +static void +perm_set_mode_label (GtkWidget *widget, gpointer data) +{ + GnomeFilePropertyDialog *fp_dlg; + mode_t umode; + char s_mode[5]; + + fp_dlg = GNOME_FILE_PROPERTY_DIALOG (data); + umode = perm_get_umode (fp_dlg); + if (!fp_dlg->executable && (umode & (S_IXUSR | S_IXGRP | S_IXOTH))) { + fp_dlg->executable = TRUE; + switch_metadata_box (fp_dlg); + } else if (fp_dlg->executable && !(umode & (S_IXUSR | S_IXGRP | S_IXOTH))) { + fp_dlg->executable = FALSE; + switch_metadata_box (fp_dlg); + } + + s_mode[0] = '0' + ((umode & (S_ISUID | S_ISGID | S_ISVTX)) >> 9); + s_mode[1] = '0' + ((umode & (S_IRUSR | S_IWUSR | S_IXUSR)) >> 6); + s_mode[2] = '0' + ((umode & (S_IRGRP | S_IWGRP | S_IXGRP)) >> 3); + s_mode[3] = '0' + ((umode & (S_IROTH | S_IWOTH | S_IXOTH)) >> 0); + s_mode[4] = 0; + gtk_label_set_text (GTK_LABEL (fp_dlg->mode_label), s_mode); +} + +static GtkWidget * +perm_check_new (char *text, int state, GnomeFilePropertyDialog *fp_dlg) +{ + GtkWidget *check; + + if (text) + check = gtk_check_button_new_with_label (text); + else + check = gtk_check_button_new (); + + gtk_toggle_button_set_mode (GTK_TOGGLE_BUTTON (check), FALSE); + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (check), state ? TRUE : FALSE); + + gtk_signal_connect (GTK_OBJECT (check), "toggled", + (GtkSignalFunc) perm_set_mode_label, + fp_dlg); + + gtk_widget_show (check); + return check; +} + +#define ATTACH(table, widget, left, right, top, bottom) \ +gtk_table_attach (GTK_TABLE (table), widget, \ + left, right, top, bottom, \ + GTK_FILL | GTK_SHRINK, \ + GTK_FILL | GTK_SHRINK, \ + 0, 0); + +#define PERMSET(name, r, w, x, rmask, wmask, xmask, y) do { \ + r = perm_check_new (NULL, fp_dlg->st.st_mode & rmask, fp_dlg); \ + w = perm_check_new (NULL, fp_dlg->st.st_mode & wmask, fp_dlg); \ + x = perm_check_new (NULL, fp_dlg->st.st_mode & xmask, fp_dlg); \ + \ + ATTACH (table, label_new (name, 0.0, 0.5), 0, 1, y, y + 1); \ + ATTACH (table, r, 1, 2, y, y + 1); \ + ATTACH (table, w, 2, 3, y, y + 1); \ + ATTACH (table, x, 3, 4, y, y + 1); \ +} while (0); + +static GtkWidget * +perm_mode_new (GnomeFilePropertyDialog *fp_dlg) +{ + GtkWidget *frame; + GtkWidget *vbox; + GtkWidget *hbox; + GtkWidget *table; + gchar *mode; + + frame = gtk_frame_new (_("File Permissions")); + + vbox = gtk_vbox_new (FALSE, GNOME_PAD_SMALL); + gtk_container_set_border_width (GTK_CONTAINER (vbox), 6); + gtk_container_add (GTK_CONTAINER (frame), vbox); + gtk_widget_show (vbox); + + hbox = gtk_hbox_new (FALSE, 0); + gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0); + gtk_widget_show (hbox); + + gtk_box_pack_start (GTK_BOX (hbox), label_new (_("Current mode: "), 0.0, 0.5), FALSE, FALSE, 0); + + fp_dlg->mode_label = label_new ("0000", 0.0, 0.5); + gtk_box_pack_start (GTK_BOX (hbox), fp_dlg->mode_label, FALSE, FALSE, 0); + + table = gtk_table_new (4, 5, FALSE); + if (!fp_dlg->modifyable || S_ISLNK (fp_dlg->st.st_mode)) + gtk_widget_set_sensitive (table, FALSE); + gtk_table_set_col_spacings (GTK_TABLE (table), 4); + gtk_table_set_row_spacings (GTK_TABLE (table), 6); + gtk_box_pack_start (GTK_BOX (vbox), table, FALSE, FALSE, 0); + gtk_widget_show (table); + + /* Headings */ + + ATTACH (table, label_new (_("Read"), 0.0, 0.5), 1, 2, 0, 1); + ATTACH (table, label_new (_("Write"), 0.0, 0.5), 2, 3, 0, 1); + ATTACH (table, label_new (_("Exec"), 0.0, 0.5), 3, 4, 0, 1); + ATTACH (table, label_new (_("Special"), 0.0, 0.5), 4, 5, 0, 1); + + /* Permissions */ + + PERMSET (_("User"), fp_dlg->rusr, fp_dlg->wusr, fp_dlg->xusr, S_IRUSR, S_IWUSR, S_IXUSR, 1); + PERMSET (_("Group"), fp_dlg->rgrp, fp_dlg->wgrp, fp_dlg->xgrp, S_IRGRP, S_IWGRP, S_IXGRP, 2); + PERMSET (_("Other"), fp_dlg->roth, fp_dlg->woth, fp_dlg->xoth, S_IROTH, S_IWOTH, S_IXOTH, 3); + + /* Special */ + + fp_dlg->suid = perm_check_new (_("Set UID"), fp_dlg->st.st_mode & S_ISUID, fp_dlg); + fp_dlg->sgid = perm_check_new (_("Set GID"), fp_dlg->st.st_mode & S_ISGID, fp_dlg); + fp_dlg->svtx = perm_check_new (_("Sticky"), fp_dlg->st.st_mode & S_ISVTX, fp_dlg); + + ATTACH (table, fp_dlg->suid, 4, 5, 1, 2); + ATTACH (table, fp_dlg->sgid, 4, 5, 2, 3); + ATTACH (table, fp_dlg->svtx, 4, 5, 3, 4); + + perm_set_mode_label (NULL, fp_dlg); + gtk_label_get (GTK_LABEL (fp_dlg->mode_label), &mode); + fp_dlg->mode_name = g_strdup (mode); + return frame; +} + +#undef ATTACH +#undef PERMSET + +static GtkWidget * +perm_owner_new (GnomeFilePropertyDialog *fp_dlg) +{ + GtkWidget *gentry; + struct passwd *passwd; + + gentry = gtk_entry_new (); + + if (fp_dlg->euid != 0) + gtk_widget_set_sensitive (gentry, FALSE); + passwd = getpwuid (fp_dlg->st.st_uid); + if (passwd) { + fp_dlg->user_name = passwd->pw_name; + gtk_entry_set_text (GTK_ENTRY (gentry), passwd->pw_name); + } else + gtk_entry_set_text (GTK_ENTRY (gentry), ""); + + return gentry; +} +static GtkWidget * +perm_group_new (GnomeFilePropertyDialog *fp_dlg) +{ + GtkWidget *gentry; + struct group *grp; + gchar grpnum [10]; + gboolean grp_flag = FALSE; + gchar *grpname = NULL; + GList *templist; + GList *list = NULL; + + + /* Are we root? Do we own the file? */ + /* In this case we can change it. */ + /* A little bit of this was swiped from kfm. */ + + if ((fp_dlg->euid == 0) || (fp_dlg->st.st_uid == fp_dlg->euid)) { + gentry = gtk_combo_new (); + grp = getgrgid (fp_dlg->st.st_gid); + if (grp->gr_name) + fp_dlg->group_name = g_strdup (grp->gr_name); + else { + g_snprintf (grpnum, 9, "%d", grp->gr_gid); + fp_dlg->group_name = g_strdup (grpnum); + } + + /* we change this, b/c we are able to set the egid, if we aren't in the group already */ + grp = getgrgid (getegid()); + if (grp) { + if (grp->gr_name) + grpname = grp->gr_name; + else { + g_snprintf (grpnum, 9, "%d", grp->gr_gid); + grpname = grpnum; + } + } + if (fp_dlg->euid != 0) + gtk_editable_set_editable (GTK_EDITABLE (GTK_COMBO (gentry)->entry), FALSE); + for (setgrent (); (grp = getgrent ()) != NULL;) { + if (!grp_flag && grpname && !strcmp (grp->gr_name, grpname)) { + list = g_list_insert_sorted (list, g_strdup (grp->gr_name), (GCompareFunc)strcmp); + grp_flag = TRUE; + continue; + } + if (fp_dlg->euid == 0) { + list = g_list_insert_sorted (list, g_strdup (grp->gr_name), (GCompareFunc)strcmp); + } else { + gchar **members = grp->gr_mem; + gchar *member; + while ((member = *members) != 0L) { + if (!strcmp (member, fp_dlg->user_name)) { + list = g_list_insert_sorted (list, g_strdup (grp->gr_name), (GCompareFunc)strcmp); + break; + } + ++members; + } + } + } + endgrent (); + + /* we also might want to add the egid to the list. */ + if (!grp_flag) + list = g_list_insert_sorted (list, g_strdup (grpname), (GCompareFunc)strcmp); + + /* Now we have a list. We should make our option menu. */ + gtk_combo_set_popdown_strings (GTK_COMBO (gentry), list); + for (templist = list; templist; templist = templist->next) { + g_free (templist->data); + } + grp = getgrgid (fp_dlg->st.st_gid); + gtk_entry_set_text (GTK_ENTRY (GTK_COMBO (gentry)->entry), grp->gr_name); + g_list_free (list); + } else { + /* we're neither so we just put an entry down */ + gentry = gtk_entry_new (); + gtk_widget_set_sensitive (gentry, FALSE); + grp = getgrgid (fp_dlg->st.st_gid); + gtk_entry_set_text (GTK_ENTRY (gentry), grp->gr_name); + } + return gentry; +} + +static GtkWidget * +perm_ownership_new (GnomeFilePropertyDialog *fp_dlg) +{ + GtkWidget *frame; + GtkWidget *table; + + frame = gtk_frame_new ("File ownership"); + + table = gtk_table_new (2, 2, FALSE); + gtk_container_set_border_width (GTK_CONTAINER (table), 6); + gtk_table_set_col_spacings (GTK_TABLE (table), 6); + gtk_table_set_row_spacings (GTK_TABLE (table), 4); + gtk_container_add (GTK_CONTAINER (frame), table); + gtk_widget_show (table); + + /* Owner */ + + gtk_table_attach (GTK_TABLE (table), label_new (_("Owner"), 0.0, 0.5), + 0, 1, 0, 1, + GTK_FILL | GTK_SHRINK, GTK_FILL | GTK_SHRINK, + 0, 0); + + fp_dlg->owner_entry = perm_owner_new (fp_dlg); + gtk_table_attach (GTK_TABLE (table), fp_dlg->owner_entry, + 1, 2, 0, 1, + GTK_EXPAND | GTK_FILL | GTK_SHRINK, + GTK_FILL | GTK_SHRINK, + 0, 0); + gtk_widget_show (fp_dlg->owner_entry); + + /* Group */ + + gtk_table_attach (GTK_TABLE (table), label_new (_("Group"), 0.0, 0.5), + 0, 1, 1, 2, + GTK_FILL | GTK_SHRINK, GTK_FILL | GTK_SHRINK, + 0, 0); + + fp_dlg->group_entry = perm_group_new (fp_dlg); + gtk_table_attach (GTK_TABLE (table), fp_dlg->group_entry, + 1, 2, 1, 2, + GTK_EXPAND | GTK_FILL | GTK_SHRINK, + GTK_FILL | GTK_SHRINK, + 0, 0); + gtk_widget_show (fp_dlg->group_entry); + return frame; +} + +static GtkWidget * +create_perm_properties (GnomeFilePropertyDialog *fp_dlg) +{ + GtkWidget *vbox; + + vbox = gtk_vbox_new (FALSE, GNOME_PAD_SMALL); + gtk_container_set_border_width (GTK_CONTAINER (vbox), GNOME_PAD); + gtk_box_pack_start (GTK_BOX (vbox), perm_mode_new (fp_dlg), FALSE, FALSE, 0); + gtk_box_pack_start (GTK_BOX (vbox), perm_ownership_new (fp_dlg), TRUE, TRUE, 0); + return vbox; +} +/* finally the new dialog */ +static void +init_metadata (GnomeFilePropertyDialog *fp_dlg) +{ + gint size; + gchar *mime_type; + gchar link_name[60]; + gint n; + gchar *file_name; + + if (gnome_metadata_get (fp_dlg->file_name, "fm-open", &size, &fp_dlg->fm_open) != 0) + gnome_metadata_get (fp_dlg->file_name, "open", &size, &fp_dlg->fm_open); + if (gnome_metadata_get (fp_dlg->file_name, "fm-view", &size, &fp_dlg->fm_view) != 0) + gnome_metadata_get (fp_dlg->file_name, "view", &size, &fp_dlg->fm_view); + gnome_metadata_get (fp_dlg->file_name, "edit", &size, &fp_dlg->edit); + gnome_metadata_get (fp_dlg->file_name, "drop-target", &size, &fp_dlg->drop_target); + + /* Mime stuff */ + file_name = fp_dlg->file_name; + if (S_ISLNK (fp_dlg->st.st_mode)) { + n = mc_readlink (fp_dlg->file_name, link_name, 59); + if (n > 0) { + link_name[n] = '\0'; + file_name = link_name; + } + } + + mime_type = gnome_mime_type_or_default (file_name, NULL); + if (!mime_type) + return; + fp_dlg->mime_fm_open = gnome_mime_get_value (mime_type, "fm-open"); + if (!fp_dlg->mime_fm_open) + fp_dlg->mime_fm_open = gnome_mime_get_value (mime_type, "open"); + fp_dlg->mime_fm_view = gnome_mime_get_value (mime_type, "fm-view"); + if (!fp_dlg->mime_fm_view) + fp_dlg->mime_fm_view = gnome_mime_get_value (mime_type, "view"); + fp_dlg->mime_edit = gnome_mime_get_value (mime_type, "edit"); + fp_dlg->mime_edit = gnome_mime_get_value (mime_type, "drop-target"); + + gnome_metadata_get (fp_dlg->file_name, "icon-filename", &size, &fp_dlg->icon_filename); + if (fp_dlg->icon_filename) + g_print ("we have an icon-filename:%s:\n", fp_dlg->icon_filename); +} +GtkWidget * +gnome_file_property_dialog_new (gchar *file_name, gboolean can_set_icon) +{ + GnomeFilePropertyDialog *fp_dlg; + GtkWidget *notebook; + GtkWidget *new_page; + gchar *title_string; + + g_return_val_if_fail (file_name != NULL, NULL); + fp_dlg = gtk_type_new (gnome_file_property_dialog_get_type ()); + + /* We set non-gui specific things first */ + if (mc_lstat (file_name, &fp_dlg->st) == -1) { + /* Bad things man, bad things */ + gtk_object_unref (GTK_OBJECT (fp_dlg)); + return NULL; + } + + + if (fp_dlg->st.st_mode & (S_IXUSR | S_IXGRP |S_IXOTH)) { + fp_dlg->executable = TRUE; + } else { + fp_dlg->executable = FALSE; + } + + fp_dlg->file_name = g_strdup (file_name); + fp_dlg->euid = geteuid (); + fp_dlg->can_set_icon = can_set_icon; + if (S_ISCHR (fp_dlg->st.st_mode) || S_ISBLK (fp_dlg->st.st_mode) + || ((fp_dlg->euid != fp_dlg->st.st_uid) && (fp_dlg->euid != 0))) + fp_dlg->modifyable = FALSE; + init_metadata (fp_dlg); + + /* and now, we set up the gui. */ + notebook = gtk_notebook_new (); + gtk_notebook_append_page (GTK_NOTEBOOK (notebook), + create_general_properties (fp_dlg), + gtk_label_new (_("Statistics"))); + new_page = create_settings_pane (fp_dlg); + if (new_page) + gtk_notebook_append_page (GTK_NOTEBOOK (notebook), + new_page, + gtk_label_new (_("Options"))); + gtk_notebook_append_page (GTK_NOTEBOOK (notebook), + create_perm_properties (fp_dlg), + gtk_label_new (_("Permissions"))); + gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (fp_dlg)->vbox), + notebook, TRUE, TRUE, 0); + title_string = g_strconcat (rindex (file_name, '/') + 1, _(" Properties"), NULL); + gtk_window_set_title (GTK_WINDOW (fp_dlg), title_string); + g_free (title_string); + gnome_dialog_append_button ( GNOME_DIALOG(fp_dlg), + GNOME_STOCK_BUTTON_OK); + gnome_dialog_append_button ( GNOME_DIALOG(fp_dlg), + GNOME_STOCK_BUTTON_CANCEL); + gtk_widget_show_all (GNOME_DIALOG (fp_dlg)->vbox); + + /* It's okay to do this now... */ + /* and set the rest of the fields */ + switch_metadata_box (fp_dlg); + + return GTK_WIDGET (fp_dlg); +} +static gint +apply_mode_change (GnomeFilePropertyDialog *fpd) +{ + gchar *new_mode; + gtk_label_get (GTK_LABEL (fpd->mode_label), &new_mode); + if (strcmp (new_mode, fpd->mode_name)) { + mc_chmod (fpd->file_name, (mode_t) strtol(new_mode, (char **)NULL, 8)); + return 1; + } + return 0; +} +static gint +apply_uid_group_change (GnomeFilePropertyDialog *fpd) +{ + uid_t uid; + gid_t gid; + struct passwd *p; + struct group *g; + gchar *new_user_name = NULL; + gchar *new_group_name = NULL; + + uid = fpd->st.st_uid; + gid = fpd->st.st_gid; + + /* we only check if our euid == 0 */ + if (fpd->euid == 0) { + new_user_name = gtk_entry_get_text (GTK_ENTRY (fpd->owner_entry)); + if (new_user_name && strcmp (fpd->user_name, new_user_name)) { + /* now we need to get the new uid */ + p = getpwnam (new_user_name); + if (!p) { + uid = atoi (new_user_name); + if (uid == 0) { + message (1, "Error", _("You entered an invalid username")); + uid = fpd->st.st_uid; + } + } else + uid = p->pw_uid; + } + + } + + /* now we check the group */ + new_group_name = gtk_entry_get_text (GTK_ENTRY (GTK_COMBO (fpd->group_entry)->entry)); + + if (fpd->group_name && new_group_name && strcmp (fpd->group_name, new_group_name)) { + g = getgrnam (new_group_name); + if (!g) { + gid = atoi (new_group_name); + if (gid == 0) { + message (1, "Error", "You entered an invalid group name"); + gid = fpd->st.st_gid; + } + } else + gid = g->gr_gid; + } + if ((uid != fpd->st.st_uid) || (gid != fpd->st.st_gid)) { + mc_chown (fpd->file_name, uid, gid); + return 1; + } + return 0; +} +static gint +apply_name_change (GnomeFilePropertyDialog *fpd) +{ + gchar *new_name; + gchar *base_name; + gchar *full_target; + FileOpContext *ctx; + long count = 0; + double bytes = 0; + + new_name = gtk_entry_get_text (GTK_ENTRY (fpd->file_entry)); + if (!*new_name) { + message (1, "Error", _("You must rename your file to something")); + return 0; + } + /* has it changed? */ + if (strcmp (rindex(fpd->file_name, '/') + 1, new_name)) { + if (strchr (new_name, '/')) { + message (1, "Error", _("You cannot rename a file to something containing a '/' character")); + return 0; + } else { + /* create the files. */ + base_name = g_strdup (fpd->file_name); + rindex (base_name, '/')[0] = '\0'; + full_target = concat_dir_and_file (base_name, new_name); + + ctx = file_op_context_new (); + file_op_context_create_ui (ctx, OP_MOVE, FALSE); + move_file_file (ctx, fpd->file_name, full_target, &count, &bytes); + file_op_context_destroy (ctx); + g_free (full_target); + } + } + return 1; +} +static gint +apply_metadata_change (GnomeFilePropertyDialog *fpd) +{ + gchar *text; + gchar *icon_name; + + if (!GTK_TOGGLE_BUTTON (fpd->open_cbox)->active) { + text = gtk_entry_get_text (GTK_ENTRY (fpd->open_entry)); + if (text && text[0]) + gnome_metadata_set (fpd->file_name, + "fm_open", + strlen (text) + 1, + text); + else + gnome_metadata_remove (fpd->file_name, + "fm_open"); + } else { + if (fpd->fm_open) + gnome_metadata_remove (fpd->file_name, + "fm_open"); + } + if (fpd->executable) { + if (!GTK_TOGGLE_BUTTON (fpd->prop1_cbox)->active) { + text = gtk_entry_get_text (GTK_ENTRY (fpd->prop1_entry)); + if (text && text[0]) + gnome_metadata_set (fpd->file_name, + "drop-target", + strlen (text) + 1, + text); + else + gnome_metadata_remove (fpd->file_name, + "drop-target"); + } else { + if (fpd->drop_target) + gnome_metadata_remove (fpd->file_name, + "drop-target"); + } + } else { + if (!GTK_TOGGLE_BUTTON (fpd->prop1_cbox)->active) { + text = gtk_entry_get_text (GTK_ENTRY (fpd->prop1_entry)); + if (text && text[0]) + gnome_metadata_set (fpd->file_name, + "fm-view", + strlen (text) + 1, + text); + else + gnome_metadata_remove (fpd->file_name, + "fm-view"); + } else { + if (fpd->fm_view) + gnome_metadata_remove (fpd->file_name, + "fm-view"); + } + if (!GTK_TOGGLE_BUTTON (fpd->prop2_cbox)->active) { + text = gtk_entry_get_text (GTK_ENTRY (fpd->prop2_entry)); + if (text && text[0]) + gnome_metadata_set (fpd->file_name, + "edit", + strlen (text) + 1, + text); + else + gnome_metadata_remove (fpd->file_name, + "edit"); + } else { + if (fpd->edit) + gnome_metadata_remove (fpd->file_name, + "edit"); + } + } + if (!fpd->can_set_icon) + return 1; + /* And finally, we set the metadata on the icon filename */ + text = gtk_entry_get_text (GTK_ENTRY (gnome_icon_entry_gtk_entry (GNOME_ICON_ENTRY (fpd->button)))); + icon_name = gicon_image_to_name (fpd->im); + if (text) { + if (strcmp (text, icon_name)) + /* FIXME: We make a big assumption here. If the file doesn't exist, it will + * default to the basic icon. We prolly should check that this is a valid + * file here, but I'm too tired to do it now -- jrb */ + gnome_metadata_set (fpd->file_name, "icon-filename", strlen (text) + 1, text); + else + gnome_metadata_remove (fpd->file_name, "icon-filename"); + } + /* I suppose we should only do this if we know there's been a change -- I'll try to figure it + * out later if it turns out to be important. */ + return 1; +} + +/* This function will apply what changes it can do. It is meant to be used in conjunction + * with a gnome_dialog_run_and_hide. Please note that doing a gnome_dialog_run + * will (obviously) cause greivious bogoness. */ + +gint +gnome_file_property_dialog_make_changes (GnomeFilePropertyDialog *file_property_dialog) +{ + gint retval = 0; + g_return_val_if_fail (file_property_dialog != NULL, 1); + g_return_val_if_fail (GNOME_IS_FILE_PROPERTY_DIALOG (file_property_dialog), 1); + + retval += apply_mode_change (file_property_dialog); + retval += apply_uid_group_change (file_property_dialog); + retval += apply_name_change (file_property_dialog); + retval += apply_metadata_change (file_property_dialog); + + return retval; +} diff -ruN old/mc-4.5.9/gnome/gnome-file-property-dialog.h new/mc-4.5.10/gnome/gnome-file-property-dialog.h --- old/mc-4.5.9/gnome/gnome-file-property-dialog.h Wed Dec 31 19:00:00 1969 +++ new/mc-4.5.10/gnome/gnome-file-property-dialog.h Sun Jan 31 18:55:19 1999 @@ -0,0 +1,103 @@ +/* gnome-file-property-dialog.h + * Copyright (C) 1999 J. Arthur Random + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ +#ifndef __GNOME_FILE_PROPERTY_DIALOG_H__ +#define __GNOME_FILE_PROPERTY_DIALOG_H__ + +#include +#include "gdesktop.h" +#include +#include +#ifdef __cplusplus +extern "C" { +#pragma } +#endif /* __cplusplus */ + +#define GNOME_TYPE_FILE_PROPERTY_DIALOG (gnome_file_property_dialog_get_type ()) +#define GNOME_FILE_PROPERTY_DIALOG(obj) (GTK_CHECK_CAST ((obj), GNOME_TYPE_FILE_PROPERTY_DIALOG, GnomeFilePropertyDialog)) +#define GNOME_FILE_PROPERTY_DIALOG_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GNOME_TYPE_FILE_PROPERTY_DIALOG, GnomeFilePropertyDialogClass)) +#define GNOME_IS_FILE_PROPERTY_DIALOG(obj) (GTK_CHECK_TYPE ((obj), GNOME_TYPE_FILE_PROPERTY_DIALOG)) +#define GNOME_IS_FILE_PROPERTY_DIALOG_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), GNOME_TYPE_FILE_PROPERTY_DIALOG)) + +typedef struct _GnomeFilePropertyDialog GnomeFilePropertyDialog; +typedef struct _GnomeFilePropertyDialogClass GnomeFilePropertyDialogClass; + +struct _GnomeFilePropertyDialog +{ + GnomeDialog parent; + + gchar *file_name; + gchar *user_name; + gchar *group_name; + gchar *mode_name; + + struct stat st; + gboolean executable; + gboolean modifyable; + GtkWidget *file_entry; + + /* Permissions stuff */ + GtkWidget *mode_label; + + GtkWidget *suid, *sgid, *svtx; + GtkWidget *rusr, *wusr, *xusr; + GtkWidget *rgrp, *wgrp, *xgrp; + GtkWidget *roth, *woth, *xoth; + + GtkWidget *owner_entry; + GtkWidget *group_entry; + gint euid; + + /* Settings Stuff */ + GtkWidget *open_label, *open_entry, *open_cbox; + GtkWidget *prop1_label, *prop1_entry, *prop1_cbox; + GtkWidget *prop2_label, *prop2_entry, *prop2_cbox, *prop2_hline; + GtkWidget *button; + + gchar *fm_open; + gchar *fm_view; + gchar *drop_target; + gchar *edit; + gchar *mime_fm_open; + gchar *mime_fm_view; + gchar *mime_drop_target; + gchar *mime_edit; + gchar *icon_filename; + gboolean can_set_icon; + GdkImlibImage *im; + + /* Private Data */ + gboolean changing; +}; +struct _GnomeFilePropertyDialogClass +{ + GnomeDialogClass parent_class; +}; + + +GtkType gnome_file_property_dialog_get_type (void); +GtkWidget *gnome_file_property_dialog_new (gchar *file_name, gboolean can_set_icon); +gint gnome_file_property_dialog_make_changes (GnomeFilePropertyDialog *file_property_dialog); + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + + +#endif /* __GNOME_FILE_PROPERTY_DIALOG_H__ */ + diff -ruN old/mc-4.5.9/gnome/gpageprop.c new/mc-4.5.10/gnome/gpageprop.c --- old/mc-4.5.9/gnome/gpageprop.c Mon Jan 18 17:44:12 1999 +++ new/mc-4.5.10/gnome/gpageprop.c Sun Jan 31 18:55:19 1999 @@ -10,14 +10,12 @@ #include #include -#include /* atoi */ #include #include #include -#include "fs.h" #include "x.h" +#include "global.h" #include "gprop.h" -#include "util.h" #include "dialog.h" #include "file.h" #include "fileopctx.h" @@ -68,8 +66,6 @@ char *new_name; char *base; char *icon_filename; - int size; - struct stat s; int retval = 0; @@ -96,10 +92,16 @@ if (dii) { GdkImlibImage *icon; file_entry *fe; - char *name; - + char *dirname; + char *p; + + p = strrchr (fname, PATH_SEP); + g_assert (p != NULL); + dirname = g_strndup (fname, p - fname); + fe = file_entry_from_file (fname); - icon = gicon_get_icon_for_file_speed (fe, FALSE); + icon = gicon_get_icon_for_file_speed (dirname, fe, FALSE); + g_free (dirname); file_entry_free (fe); icon_filename = gicon_image_to_name (icon); if (icon_filename == NULL) @@ -227,10 +229,10 @@ file_op_context_destroy (ctx); if (dii) { - free (dii->filename); + g_free (dii->filename); dii->filename = full_target; } else - free (full_target); + g_free (full_target); retval |= GPROP_FILENAME; } diff -ruN old/mc-4.5.9/gnome/gpopup.c new/mc-4.5.10/gnome/gpopup.c --- old/mc-4.5.9/gnome/gpopup.c Mon Jan 18 17:44:12 1999 +++ new/mc-4.5.10/gnome/gpopup.c Sun Jan 31 18:55:19 1999 @@ -8,8 +8,8 @@ #include -#include "util.h" #include +#include "global.h" #include "panel.h" #include "cmd.h" #include "dialog.h" @@ -17,10 +17,12 @@ #include "gpageprop.h" #include "gpopup.h" #include "main.h" - +#include "gnome-file-property-dialog.h" #define CLIST_FROM_SW(panel_list) GTK_CLIST (GTK_BIN (panel_list)->child) +extern int we_can_afford_the_speed; + /* Flags for the popup menu entries. They specify to which kinds of files an entry is valid for. */ enum { F_ALL = 1 << 0, /* Applies to all files */ @@ -49,7 +51,7 @@ if (!command) return; execute (command); - free (command); + g_free (command); } static void @@ -82,11 +84,17 @@ static void dicon_properties (GtkWidget *widget, DesktopIconInfo *dii) { - int retval; + int retval = 1; char *path; + GtkWidget *dlg; path = g_strconcat (getenv("HOME"), "/desktop/", dii->filename, NULL); - retval = item_properties (dii->dicon, path, dii); +/* retval = item_properties (dii->dicon, path, dii);*/ + dlg = gnome_file_property_dialog_new (path, TRUE); + gtk_widget_show_all (dlg); + if (gnome_dialog_run (GNOME_DIALOG (dlg)) == 0) + retval = gnome_file_property_dialog_make_changes (GNOME_FILE_PROPERTY_DIALOG (dlg)); + gtk_widget_destroy (dlg); g_free(path); if (retval) reread_cmd (); @@ -102,13 +110,21 @@ static void panel_action_properties (GtkWidget *widget, WPanel *panel) { + gint retval; file_entry *fe = &panel->dir.list [panel->selected]; char *full_name = concat_dir_and_file (panel->cwd, fe->fname); + GtkWidget *dlg; - if (item_properties (GTK_WIDGET (CLIST_FROM_SW (panel->list)), full_name, NULL) != 0) +/* if (item_properties (GTK_WIDGET (CLIST_FROM_SW (panel->list)), full_name, NULL) != 0) + reread_cmd ();*/ + dlg = gnome_file_property_dialog_new (full_name, we_can_afford_the_speed); + gnome_dialog_set_parent (GNOME_DIALOG (dlg), GTK_WINDOW (gtk_widget_get_toplevel (panel->ministatus))); + if (gnome_dialog_run (GNOME_DIALOG (dlg)) == 0) + retval = gnome_file_property_dialog_make_changes (GNOME_FILE_PROPERTY_DIALOG (dlg)); + gtk_widget_destroy (dlg); + g_free (full_name); + if (retval) reread_cmd (); - - free (full_name); } static void diff -ruN old/mc-4.5.9/gnome/gprefs.c new/mc-4.5.10/gnome/gprefs.c --- old/mc-4.5.9/gnome/gprefs.c Mon Jan 18 17:44:12 1999 +++ new/mc-4.5.10/gnome/gprefs.c Sun Jan 31 18:55:19 1999 @@ -26,73 +26,461 @@ /* advanced chown */ /* cd follows links */ /* safe delete */ -static GtkWidget * -file_display_pane (WPanel *panel) + +extern int vfs_timeout; +extern int ftpfs_always_use_proxy; +extern char* ftpfs_anonymous_passwd; +extern int file_op_compute_totals; +extern int we_can_afford_the_speed; +typedef enum +{ + PROPERTY_NONE, + PROPERTY_BOOL, + PROPERTY_STRING, + PROPERTY_INT, + PROPERTY_CUSTOM +} PropertyType_e; + +typedef struct +{ + gchar *label; + PropertyType_e type; + gpointer property_variable; + gpointer extra_data1; + gpointer extra_data2; + + GtkWidget *widget; +} Property; + +typedef struct +{ + gchar *title; + Property *props; +} PrefsPage; + +typedef struct +{ + WPanel *panel; + GtkWidget *prop_box; + PrefsPage *prefs_pages; +} PrefsDlg; + + +#define PROPERTIES_DONE { NULL, PROPERTY_NONE, NULL, NULL, NULL, NULL } +#define PREFSPAGES_DONE { NULL, NULL } + +typedef GtkWidget* (*CustomCreateFunc) (PrefsDlg *dlg, Property *prop); +typedef void (*CustomApplyFunc) (PrefsDlg *dlg, Property *prop); + +static void +gnome_toggle_show_backup (void) +{ + show_backups = !show_backups; +} + +static void +gnome_toggle_show_hidden (void) +{ + show_dot_files = !show_dot_files; +} + +static void +toggle_mix_all_files (void) +{ + mix_all_files = !mix_all_files; +} + +static Property file_display_props [] = +{ + { + N_("Show backup files"), PROPERTY_BOOL, + &show_backups, NULL, NULL, NULL + }, + { + N_("Show hidden files"), PROPERTY_BOOL, + &show_dot_files, NULL, NULL, NULL + }, + { + N_("Mix files and directories"), PROPERTY_BOOL, + &mix_all_files, NULL, NULL, NULL + }, + { + N_("Use shell patterns instead of regular expressions"), PROPERTY_BOOL, + &easy_patterns, NULL, NULL, NULL + }, + PROPERTIES_DONE +}; + +static Property confirmation_props [] = +{ + { + N_("Confirm when deleting file"), PROPERTY_BOOL, + &confirm_delete, NULL, NULL, NULL + }, + { + N_("Confirm when overwriting files"), PROPERTY_BOOL, + &confirm_overwrite, NULL, NULL, NULL + }, + { + N_("Confirm when executing files"), PROPERTY_BOOL, + &confirm_execute, NULL, NULL, NULL + }, + { + N_("Show progress while operations are being performed"), PROPERTY_BOOL, + &verbose, NULL, NULL, NULL + }, + PROPERTIES_DONE +}; + +static Property vfs_props [] = +{ + { + N_("VFS Timeout :"), PROPERTY_INT, + &vfs_timeout, N_("Seconds"), NULL, NULL + }, + { + N_("Anonymous FTP password :"), PROPERTY_STRING, + &ftpfs_anonymous_passwd, NULL, NULL, NULL + }, + { + N_("Always use FTP proxy"), PROPERTY_BOOL, + &ftpfs_always_use_proxy, NULL, NULL, NULL + }, + PROPERTIES_DONE +}; + +static Property caching_and_optimization_props [] = +{ + { + N_("Fast directory reload"), PROPERTY_BOOL, + &fast_reload, NULL, NULL, NULL + }, + { + N_("Compute totals before copying files"), PROPERTY_BOOL, + &file_op_compute_totals, NULL, NULL, NULL + }, + { + N_("FTP directory cache timeout :"), PROPERTY_INT, + &ftpfs_directory_timeout, N_("Seconds"), NULL, NULL + }, + { + N_("Allow customization of icons in panels"), PROPERTY_BOOL, + &we_can_afford_the_speed, NULL, NULL, NULL + }, + PROPERTIES_DONE +}; + +static PrefsPage prefs_pages [] = +{ + { + N_("File display"), + file_display_props + }, + { + N_("Confirmation"), + confirmation_props + }, + { + N_("VFS"), + vfs_props + }, + { + N_("Caching"), + caching_and_optimization_props + }, + PREFSPAGES_DONE +}; + +static void +apply_changes_bool (PrefsDlg *dlg, Property *cur_prop) +{ + GtkWidget *checkbox; + + checkbox = cur_prop->widget; + + if (GTK_TOGGLE_BUTTON (checkbox)->active) + *( (int*) cur_prop->property_variable) = TRUE; + else + *( (int*) cur_prop->property_variable) = FALSE; +} + +static void +apply_changes_string (PrefsDlg *dlg, Property *cur_prop) +{ + GtkWidget *entry; + gchar *text; + + entry = cur_prop->widget; + + text = gtk_entry_get_text (GTK_ENTRY (gnome_entry_gtk_entry (GNOME_ENTRY (entry)))); + + *( (char**) cur_prop->property_variable) = g_strdup (text); +} + +static void +apply_changes_int (PrefsDlg *dlg, Property *cur_prop) +{ + GtkWidget *entry; + gdouble val; + gchar *num; + + entry = cur_prop->widget; + num = gtk_entry_get_text (GTK_ENTRY (gnome_entry_gtk_entry (GNOME_ENTRY (entry)))); + sscanf(num,"%lg",&val); + + *( (int*) cur_prop->property_variable) = (gint) val; +} + +static void +apply_changes_custom (PrefsDlg *dlg, Property *cur_prop) +{ + CustomApplyFunc apply = (CustomApplyFunc) cur_prop->extra_data2; + + apply (dlg, cur_prop); +} + +static void +apply_page_changes (PrefsDlg *dlg, gint pagenum) +{ + Property *props; + Property cur_prop; + gint i; + + props = dlg->prefs_pages [pagenum].props; + i = 0; + cur_prop = props [i]; + while (cur_prop.label != NULL) { + switch (cur_prop.type) { + case PROPERTY_NONE : + g_warning ("Invalid case in gprefs.c:apply_page_changes"); + break; + case PROPERTY_BOOL : + apply_changes_bool (dlg, &cur_prop); + break; + case PROPERTY_STRING : + apply_changes_string (dlg, &cur_prop); + break; + case PROPERTY_INT : + apply_changes_int (dlg, &cur_prop); + break; + case PROPERTY_CUSTOM : + apply_changes_custom (dlg, &cur_prop); + break; + } + cur_prop = props[++i]; + } +} + +static void +apply_callback (GtkWidget *prop_box, gint pagenum, PrefsDlg *dlg) +{ + if (pagenum != -1) { + apply_page_changes (dlg, pagenum); + } else { + /* FIXME: can be optimized. Only if some of the + * boolean flags changed this makes sense + */ + update_panels (UP_RELOAD, UP_KEEPSEL); + save_setup (); + } +} + +static void +changed_callback (GtkWidget *widget, PrefsDlg *dlg) +{ + if (dlg->prop_box) + gnome_property_box_changed (GNOME_PROPERTY_BOX (dlg->prop_box)); +} + +static GtkWidget* +create_prop_bool (PrefsDlg *dlg, Property *prop) +{ + GtkWidget *checkbox; + + checkbox = gtk_check_button_new_with_label (prop->label); + + if (*((int*) prop->property_variable)) { + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (checkbox), + TRUE); + } else { + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (checkbox), + FALSE); + } + + gtk_signal_connect (GTK_OBJECT (checkbox), "clicked", + changed_callback, (gpointer) dlg); + + prop->widget = checkbox; + gtk_widget_show_all (checkbox); + return checkbox; +} + +static GtkWidget* +create_prop_string (PrefsDlg *dlg, Property *prop) +{ + GtkWidget *entry; + GtkWidget *gtk_entry; + GtkWidget *label; + GtkWidget *hbox; + gint max_length; + + hbox = gtk_hbox_new (FALSE, GNOME_PAD_SMALL); + + label = gtk_label_new (prop->label); + gtk_box_pack_start (GTK_BOX (hbox), label, + FALSE, FALSE, 0); + + entry = gnome_entry_new (prop->label); + gtk_entry = gnome_entry_gtk_entry (GNOME_ENTRY (entry)); + + max_length = (int)prop->extra_data1; + if (max_length != 0) { + gtk_entry_set_max_length (GTK_ENTRY (gtk_entry), + max_length); + } + + gtk_entry_set_text (GTK_ENTRY (gtk_entry), + (gchar*) *( (gchar**) prop->property_variable)); + gtk_signal_connect_while_alive (GTK_OBJECT (gtk_entry), + "changed", + GTK_SIGNAL_FUNC (changed_callback), + (gpointer) dlg, + GTK_OBJECT (dlg->prop_box)); + + gtk_box_pack_start (GTK_BOX (hbox), entry, + FALSE, FALSE, 0); + + prop->widget = entry; + gtk_widget_show_all (hbox); + return hbox; +} + +static GtkWidget* +create_prop_int (PrefsDlg *dlg, Property *prop) +{ + GtkWidget *entry; + GtkWidget *label; + GtkWidget *hbox; + gchar buffer [10]; + + hbox = gtk_hbox_new (FALSE, GNOME_PAD_SMALL); + + label = gtk_label_new (prop->label); + gtk_box_pack_start (GTK_BOX (hbox), label, + FALSE, FALSE, 0); + + entry = gnome_entry_new (prop->label); + + snprintf (buffer, 9, "%d", *( (int*) prop->property_variable)); + + gtk_entry_set_text (GTK_ENTRY (gnome_entry_gtk_entry (GNOME_ENTRY (entry))), + buffer); + + gtk_signal_connect_while_alive (GTK_OBJECT (gnome_entry_gtk_entry (GNOME_ENTRY (entry))), + "changed", + GTK_SIGNAL_FUNC (changed_callback), + (gpointer) dlg, + GTK_OBJECT (dlg->prop_box)); + + gtk_box_pack_start (GTK_BOX (hbox), entry, + FALSE, FALSE, 0); + if (prop->extra_data1) { + label = gtk_label_new ((gchar *)prop->extra_data1); + gtk_box_pack_start (GTK_BOX (hbox), label, + FALSE, FALSE, 0); + } + + prop->widget = entry; + gtk_widget_show_all (hbox); + return hbox; +} + +static GtkWidget* +create_prop_custom (PrefsDlg *dlg, Property *prop) { - /* This should configure the file options. */ - /* Show Backup files */ - /* show Hidden files */ - /* mix files and directories */ - /* shell patterns */ - GtkWidget *vbox; + CustomCreateFunc create = (CustomCreateFunc) prop->extra_data1; + + if (!create) + return create_prop_bool (dlg, prop); - vbox = gtk_vbox_new (FALSE, GNOME_PAD_SMALL); - return vbox; + return create (dlg, prop); } -static GtkWidget * -confirmation_pane (WPanel *panel) + +static GtkWidget* +create_prop_widget (PrefsDlg *dlg, Property *prop) { - /* Confirm... */ - /* delete file*/ - /* overwrite */ - /* execute */ - /* Verbose Operations */ - return gtk_frame_new (NULL); + switch (prop->type) { + case PROPERTY_NONE : + g_warning ("Invalid case in gprefs.c - create_prop_widget"); + break; + case PROPERTY_BOOL : + return create_prop_bool (dlg, prop); + case PROPERTY_STRING : + return create_prop_string (dlg, prop); + case PROPERTY_INT : + return create_prop_int (dlg, prop); + case PROPERTY_CUSTOM : + return create_prop_custom (dlg, prop); + break; + } + return NULL; } -static GtkWidget * -custom_view_pane (WPanel *panel) + +static void +create_page (PrefsDlg *dlg, PrefsPage *page) { - return gtk_frame_new (NULL); + GtkWidget *vbox; + GtkWidget *prop_widget; + Property *cur_prop; + gint i; + + vbox = gtk_vbox_new (FALSE, GNOME_PAD_SMALL); + gtk_container_set_border_width (GTK_CONTAINER (vbox), GNOME_PAD_SMALL); + gtk_widget_show (vbox); + i = 0; + cur_prop = &(page->props [i]); + while (cur_prop->label != NULL) { + cur_prop = &(page->props [i]); + prop_widget = create_prop_widget (dlg, cur_prop); + gtk_box_pack_start (GTK_BOX (vbox), prop_widget, + FALSE, FALSE, 0); + i++; + cur_prop = &(page->props [i]); + } + + gnome_property_box_append_page (GNOME_PROPERTY_BOX (dlg->prop_box), + vbox, + gtk_label_new (page->title)); } -static GtkWidget * -vfs_pane (WPanel *panel) + +static void +create_prop_box (PrefsDlg *dlg) { - /* VFS timeout */ - /* Anon ftp password */ - /* Always use ftp proxy: */ - return gtk_frame_new (NULL); -} -static GtkWidget * -caching_and_optimizations_pane (WPanel *panel) -{ - /* Fast dir reload */ - /* Compute totals */ - /* ftpfs directory cache timeout */ - return gtk_frame_new (NULL); + gint i; + PrefsPage *cur_page; + + dlg->prop_box = gnome_property_box_new (); + + i = 0; + cur_page = &(dlg->prefs_pages [i]); + while (cur_page->title != NULL) { + create_page (dlg, cur_page); + i++; + cur_page = &(dlg->prefs_pages [i]); + } + + gtk_signal_connect (GTK_OBJECT (dlg->prop_box), "apply", + GTK_SIGNAL_FUNC (apply_callback), dlg); } void gnome_configure_box (GtkWidget *widget, WPanel *panel) { - GtkWidget *prefs_dlg; + static PrefsDlg dlg; - prefs_dlg = gnome_property_box_new (); - /* do we want a generic page? */ - gnome_property_box_append_page (GNOME_PROPERTY_BOX (prefs_dlg), - file_display_pane (panel), - gtk_label_new (_("File Display"))); - gnome_property_box_append_page (GNOME_PROPERTY_BOX (prefs_dlg), - confirmation_pane (panel), - gtk_label_new (_("Confirmation"))); - gnome_property_box_append_page (GNOME_PROPERTY_BOX (prefs_dlg), - custom_view_pane (panel), - gtk_label_new (_("Custom View"))); - gnome_property_box_append_page (GNOME_PROPERTY_BOX (prefs_dlg), - vfs_pane (panel), - gtk_label_new (_("Caching and Optimizations"))); - gnome_property_box_append_page (GNOME_PROPERTY_BOX (prefs_dlg), - caching_and_optimizations_pane (panel), - gtk_label_new (_("VFS"))); - gtk_widget_show_all (GNOME_PROPERTY_BOX (prefs_dlg)->notebook); - gnome_dialog_run_and_close (GNOME_DIALOG (prefs_dlg)); -} + dlg.panel = panel; + dlg.prefs_pages = prefs_pages; + create_prop_box (&dlg); + + gtk_widget_show (dlg.prop_box); +} diff -ruN old/mc-4.5.9/gnome/gscreen.c new/mc-4.5.10/gnome/gscreen.c --- old/mc-4.5.9/gnome/gscreen.c Mon Jan 18 17:44:12 1999 +++ new/mc-4.5.10/gnome/gscreen.c Sun Jan 31 18:55:19 1999 @@ -10,10 +10,8 @@ #include #include -#include /* atoi */ -#include "fs.h" -#include "mad.h" #include "x.h" +#include "global.h" #include "dir.h" #include "command.h" #include "panel.h" @@ -27,13 +25,13 @@ #include "gscreen.h" #include "dir.h" #include "dialog.h" +#include "setup.h" #include "gdesktop.h" #include "gdnd.h" #include "gtkdtree.h" #include "gpageprop.h" #include "gpopup.h" #include "gcliplabel.h" -#include "gblist.h" #include "gicon.h" #include "../vfs/vfs.h" #include @@ -42,7 +40,7 @@ int tree_panel_visible = -1; /* The pixmaps */ -#include "directory.xpm" +#include "dir-close.xpm" #include "link.xpm" #include "dev.xpm" #include "listing-list.xpm" @@ -61,13 +59,13 @@ GdkBitmap *icon_dev_mask; static GtkTargetEntry drag_types [] = { - { "text/uri-list", 0, TARGET_URI_LIST }, - { "text/plain", 0, TARGET_TEXT_PLAIN }, - { "_NETSCAPE_URL", 0, TARGET_URL } + { TARGET_URI_LIST_TYPE, 0, TARGET_URI_LIST }, + { TARGET_TEXT_PLAIN_TYPE, 0, TARGET_TEXT_PLAIN }, + { TARGET_URL_TYPE, 0, TARGET_URL } }; static GtkTargetEntry drop_types [] = { - { "text/uri-list", 0, TARGET_URI_LIST } + { TARGET_URI_LIST_TYPE, 0, TARGET_URI_LIST } }; #define ELEMENTS(x) (sizeof (x) / sizeof (x[0])) @@ -170,7 +168,7 @@ int i, col, type_col, color; char **texts; - texts = malloc (sizeof (char *) * (items+1)); + texts = g_new (char *, items+1); gtk_clist_freeze (GTK_CLIST (cl)); gtk_clist_clear (GTK_CLIST (cl)); @@ -201,16 +199,21 @@ } gtk_clist_append (cl, texts); - color = file_compute_color (fe->f.marked ? MARKED : NORMAL, fe); + color = file_compute_color (NORMAL, fe); panel_file_list_set_row_colors (cl, i, color); + if (type_col != -1) panel_file_list_set_type_bitmap (cl, i, type_col, color, fe); + + if (fe->f.marked) + gtk_clist_select_row (cl, i, 0); + } /* This is needed as the gtk_clist_append changes selected under us :-( */ panel->selected = selected; select_item (panel); gtk_clist_thaw (GTK_CLIST (cl)); - free (texts); + g_free (texts); } /* @@ -232,7 +235,7 @@ file_entry *fe = &panel->dir.list [i]; int p; - image = gicon_get_icon_for_file (fe); + image = gicon_get_icon_for_file (panel->cwd, fe); p = gnome_icon_list_append_imlib (icons, image, fe->fname); if (fe->f.marked) gnome_icon_list_select_icon (icons, p); @@ -301,18 +304,19 @@ { int color; - color = file_compute_color (value ? MARKED : NORMAL, &panel->dir.list[index]); + color = file_compute_color (NORMAL, &panel->dir.list[index]); panel_file_list_set_row_colors (CLIST_FROM_SW (panel->list), index, color); } void x_select_item (WPanel *panel) { + do_file_mark (panel, panel->selected, 1); + display_mini_info (panel); + if (panel->list_type == list_icons){ GnomeIconList *list = GNOME_ICON_LIST (panel->icons); - do_file_mark (panel, panel->selected, 1); - display_mini_info (panel); gnome_icon_list_select_icon (list, panel->selected); if (list->icon_list){ @@ -323,15 +327,8 @@ gnome_canvas_update_now (GNOME_CANVAS (list)); } else { GtkCList *clist = CLIST_FROM_SW (panel->list); - int color, marked; - - if (panel->dir.list [panel->selected].f.marked) - marked = 1; - else - marked = 0; - color = file_compute_color (marked ? MARKED_SELECTED : SELECTED, &panel->dir.list [panel->selected]); - panel_file_list_set_row_colors (CLIST_FROM_SW (panel->list), panel->selected, color); + gtk_clist_select_row (clist, panel->selected, 0); /* Make it visible */ if (gtk_clist_row_is_visible (clist, panel->selected) != GTK_VISIBILITY_FULL) @@ -342,20 +339,14 @@ void x_unselect_item (WPanel *panel) { - if (panel->list_type == list_icons){ - int selected = panel->selected; - - /* This changes the panel->selected */ + int selected = panel->selected; + + if (panel->list_type == list_icons) gnome_icon_list_unselect_all (GNOME_ICON_LIST (panel->icons), NULL, NULL); - panel->selected = selected; - } else { - int color; - int val; + else + gtk_clist_unselect_all (CLIST_FROM_SW (panel->list)); - val = panel->dir.list [panel->selected].f.marked ? MARKED : NORMAL; - color = file_compute_color (val, &panel->dir.list [panel->selected]); - panel_file_list_set_row_colors (CLIST_FROM_SW (panel->list), panel->selected, color); - } + panel->selected = selected; } void @@ -465,14 +456,6 @@ gtk_clist_thaw (clist); } -static void -internal_select_item (GtkWidget *file_list, WPanel *panel, int row) -{ - unselect_item (panel); - panel->selected = row; - - select_item (panel); -} static int panel_file_list_press_row (GtkWidget *file_list, GdkEvent *event, WPanel *panel) { @@ -489,43 +472,35 @@ static void panel_file_list_select_row (GtkWidget *file_list, int row, int column, GdkEvent *event, WPanel *panel) { - int current_selection = panel->selected; - char *fullname; - - if (!event) { - internal_select_item (file_list, panel, row); - return; - } + panel->selected = row; + do_file_mark (panel, row, 1); + display_mini_info (panel); + execute_hooks (select_file_hook); + + if (!event) + return; + switch (event->type) { + case GDK_BUTTON_PRESS: + if (event->button.button == 3) + gpopup_do_popup ((GdkEventButton *) event, panel, NULL, row, panel->dir.list[row].fname); + break; + case GDK_BUTTON_RELEASE: - gtk_clist_unselect_row (CLIST_FROM_SW (panel->list), row, 0); - internal_select_item (file_list, panel, row); - - switch (event->button.button) { - case 1: - if (!(event->button.state & (GDK_CONTROL_MASK | GDK_SHIFT_MASK))){ - do_file_mark (panel, row, !panel->dir.list[row].f.marked); - } else { - /* if shift-click is pressed */ - do_file_mark_range (panel, row, current_selection); - } - break; + if (event->button.button == 2){ + char *fullname; - case 2: - if (S_ISDIR (panel->dir.list [current_selection].buf.st_mode) || - panel->dir.list [current_selection].f.link_to_dir){ - fullname = concat_dir_and_file (panel->cwd, panel->dir.list [current_selection].fname); + if (S_ISDIR (panel->dir.list [row].buf.st_mode) || + panel->dir.list [row].f.link_to_dir){ + fullname = concat_dir_and_file (panel->cwd, panel->dir.list [row].fname); new_panel_at (fullname); - free (fullname); + g_free (fullname); } - break; } - break; - + case GDK_2BUTTON_PRESS: - gtk_clist_unselect_row (CLIST_FROM_SW (panel->list), row, 0); if (event->button.button == 1) do_enter (panel); break; @@ -535,6 +510,16 @@ } } +static void +panel_file_list_unselect_row (GtkWidget *widget, int row, int columns, GdkEvent *event, WPanel *panel) +{ + do_file_mark (panel, row, 0); + display_mini_info (panel); + if (panel->marked == 0) + panel->selected = 0; +} + + /* Figure out the number of visible lines in the panel */ static void panel_file_list_compute_lines (GtkScrolledWindow *sw, WPanel *panel, int height) @@ -604,7 +589,7 @@ { pixmaps_ready = TRUE; - create_pixmap (directory_xpm, &icon_directory_pixmap, &icon_directory_mask); + create_pixmap (DIRECTORY_CLOSE_XPM, &icon_directory_pixmap, &icon_directory_mask); create_pixmap (link_xpm, &icon_link_pixmap, &icon_link_mask); create_pixmap (dev_xpm, &icon_dev_pixmap, &icon_dev_mask); } @@ -613,7 +598,7 @@ typedef gboolean (*scroll_fn)(gpointer data); static gboolean -panel_setup_drag_motion (WPanel *panel, int x, int y, desirable_fn desirable, scroll_fn scroll) +panel_setup_drag_scroll (WPanel *panel, int x, int y, desirable_fn desirable, scroll_fn scroll) { if (panel->timer_id != -1){ gtk_timeout_remove (panel->timer_id); @@ -632,15 +617,6 @@ } static void -panel_file_list_scrolled (GtkAdjustment *adj, WPanel *panel) -{ - if (!GTK_IS_ADJUSTMENT (adj)) { - fprintf (stderr, "file_list_is_scrolled is called and there are not enough boats!\n"); - exit (1); - } -} - -static void panel_configure_file_list (WPanel *panel, GtkWidget *sw, GtkWidget *file_list) { format_e *format = panel->format; @@ -653,7 +629,7 @@ /* Configure the CList */ - gtk_clist_set_selection_mode (GTK_CLIST (file_list), GTK_SELECTION_SINGLE); + gtk_clist_set_selection_mode (GTK_CLIST (file_list), GTK_SELECTION_EXTENDED); for (i = 0, format = panel->format; format; format = format->next) { GtkJustification just; @@ -662,10 +638,17 @@ continue; /* Set desired justification */ - if (format->just_mode == J_LEFT) - just = GTK_JUSTIFY_LEFT; - else - just = GTK_JUSTIFY_RIGHT; + switch (HIDE_FIT(format->just_mode)){ + case J_LEFT: + just = GTK_JUSTIFY_LEFT; + break; + case J_RIGHT: + just = GTK_JUSTIFY_RIGHT; + break; + case J_CENTER: + just = GTK_JUSTIFY_CENTER; + break; + } gtk_clist_set_column_justification (GTK_CLIST (file_list), i, just); i++; @@ -673,8 +656,6 @@ /* Configure the scrolbars */ adjustment = GTK_OBJECT (gtk_scrolled_window_get_vadjustment (GTK_SCROLLED_WINDOW (sw))); - gtk_signal_connect_after (adjustment, "value_changed", - GTK_SIGNAL_FUNC (panel_file_list_scrolled), panel); } /* @@ -698,7 +679,7 @@ total_len += (filelen + cwdlen + panel->dir.list [i].fnamelen + seplen); total_len++; - data = copy = xmalloc (total_len+1, "build_selected_file_list"); + data = copy = g_malloc (total_len+1); for (i = 0; i < panel->count; i++) if (panel->dir.list [i].f.marked){ strcpy (copy, "file:"); @@ -716,8 +697,8 @@ fullname = concat_dir_and_file (panel->cwd, panel->dir.list [panel->selected].fname); - uri = copy_strings ("file:", fullname, NULL); - free (fullname); + uri = g_strconcat ("file:", fullname, NULL); + g_free (fullname); *file_list_len = strlen (uri) + 1; return uri; @@ -811,7 +792,7 @@ } reload = gdnd_drop_on_directory (context, selection_data, dir); - free (dir); + g_free (dir); if (reload){ update_one_panel_widget (panel, 0, UP_KEEPSEL); @@ -852,7 +833,7 @@ } gdnd_drop_on_directory (context, selection_data, dir); - free (dir); + g_free (dir); update_one_panel_widget (panel, 0, UP_KEEPSEL); panel_update_contents (panel); @@ -911,6 +892,9 @@ static int panel_clist_button_press (GtkWidget *widget, GdkEventButton *event, WPanel *panel) { + if (event->window != GTK_CLIST (widget)->clist_window) + return FALSE; + panel->maybe_start_drag = event->button; panel->click_x = event->x; @@ -931,8 +915,7 @@ { GtkTargetList *list; GdkDragContext *context; - int action; - + if (!panel->maybe_start_drag) return FALSE; @@ -942,12 +925,9 @@ list = gtk_target_list_new (drag_types, ELEMENTS (drag_types)); - if (panel->maybe_start_drag == 2) - action = GDK_ACTION_ASK; - else - action = GDK_ACTION_MOVE | GDK_ACTION_COPY | GDK_ACTION_LINK; - - context = gtk_drag_begin (widget, list, action, + context = gtk_drag_begin (widget, list, + (GDK_ACTION_COPY | GDK_ACTION_MOVE + | GDK_ACTION_LINK | GDK_ACTION_ASK), panel->maybe_start_drag, (GdkEvent *) event); gtk_drag_set_icon_default (context); @@ -976,6 +956,26 @@ panel->dragging = 0; } +/* Wrapper for the motion_notify callback; it ignores motion events from the + * clist if they do not come from the clist_window. + */ +static int +panel_clist_motion (GtkWidget *widget, GdkEventMotion *event, gpointer data) +{ + if (event->window != GTK_CLIST (widget)->clist_window) + return FALSE; + + panel_widget_motion (widget, event, data); + + /* We have to stop the motion event from ever reaching the clist. + * Otherwise it will begin dragging/selecting rows when we don't want + * that. Yes, the clist widget sucks. + */ + + gtk_signal_emit_stop_by_name (GTK_OBJECT (widget), "motion_notify_event"); + return TRUE; +} + /** * panel_clist_scrolling_is_desirable: * @@ -994,8 +994,8 @@ if (va->value > va->lower) return TRUE; } else { - if (y > (GTK_WIDGET (panel->list)->allocation.height-20)){ - if (va->value < va->upper) + if (y > (GTK_WIDGET (panel->list)->allocation.height - 10)){ + if (va->value < va->upper - va->page_size) return TRUE; } } @@ -1014,29 +1014,71 @@ { WPanel *panel = data; GtkAdjustment *va; + double v; va = scrolled_window_get_vadjustment (panel->list); - if (panel->drag_motion_y < 10) - gtk_adjustment_set_value (va, va->value - va->step_increment); - else{ - gtk_adjustment_set_value (va, va->value + va->step_increment); + if (panel->drag_motion_y < 10) { + v = va->value - va->step_increment; + if (v < va->lower) + v = va->lower; + + gtk_adjustment_set_value (va, v); + } else { + v = va->value + va->step_increment; + if (v > va->upper - va->page_size) + v = va->upper - va->page_size; + + gtk_adjustment_set_value (va, v); } + return TRUE; } -/** - * panel_clist_drag_motion: - * - * Invoked when an application dragging over us has the the cursor moved. - * If we are close to the top or bottom, we scroll the window +/* Callback used for drag motion events over the clist. We set up + * auto-scrolling and validate the drop to present the user with the correct + * feedback. */ static gboolean -panel_clist_drag_motion (GtkWidget *widget, GdkDragContext *ctx, int x, int y, guint time, void *data) +panel_clist_drag_motion (GtkWidget *widget, GdkDragContext *context, gint x, gint y, guint time, + gpointer data) { - WPanel *panel = data; - - panel_setup_drag_motion (panel, x, y, panel_clist_scrolling_is_desirable, panel_clist_scroll); + WPanel *panel; + GdkDragAction action; + GtkWidget *source_widget; + gint idx; + file_entry *fe; + + panel = data; + + if (context->dest_window != GTK_CLIST (widget)->clist_window) { + printf ("squick\n"); + gdk_drag_status (context, 0, time); + return TRUE; + } + + /* Set up auto-scrolling */ + + panel_setup_drag_scroll (panel, x, y, + panel_clist_scrolling_is_desirable, + panel_clist_scroll); + + /* Validate the drop */ + + gdnd_find_panel_by_drag_context (context, &source_widget); + + if (!gtk_clist_get_selection_info (GTK_CLIST (widget), x, y, &idx, NULL)) + fe = NULL; + else + fe = &panel->dir.list[idx]; + + action = gdnd_validate_action (context, + source_widget != NULL, + source_widget == widget, + fe, + fe ? fe->f.marked : FALSE); + + gdk_drag_status (context, action, time); return TRUE; } @@ -1074,8 +1116,8 @@ if (va->value > va->lower) return TRUE; } else { - if (y > (GTK_WIDGET (panel->icons)->allocation.height-20)){ - if (va->value < va->upper) + if (y > (GTK_WIDGET (panel->icons)->allocation.height - 10)){ + if (va->value < va->upper - va->page_size) return TRUE; } } @@ -1094,28 +1136,63 @@ { WPanel *panel = data; GtkAdjustment *va; + double v; va = GNOME_ICON_LIST (panel->icons)->adj; - if (panel->drag_motion_y < 10) - gtk_adjustment_set_value (va, va->value - va->step_increment); - else{ - gtk_adjustment_set_value (va, va->value + va->step_increment); + if (panel->drag_motion_y < 10) { + v = va->value - va->step_increment; + if (v < va->lower) + v = va->lower; + + gtk_adjustment_set_value (va, v); + } else { + v = va->value + va->step_increment; + if (v > va->upper - va->page_size) + v = va->upper - va->page_size; + + gtk_adjustment_set_value (va, v); } + return TRUE; } -/** - * panel_icon_list_drag_motion: - * - * Invoked when an application dragging over us has the the cursor moved. - * If we are close to the top or bottom, we scroll the window + +/* Callback used for drag motion events in the icon list. We need to set up + * auto-scrolling and validate the drop to present the user with the correct + * feedback. */ static gboolean -panel_icon_list_drag_motion (GtkWidget *widget, GdkDragContext *ctx, int x, int y, guint time, void *data) +panel_icon_list_drag_motion (GtkWidget *widget, GdkDragContext *context, gint x, gint y, guint time, + gpointer data) { - WPanel *panel = data; - - panel_setup_drag_motion (panel, x, y, panel_icon_list_scrolling_is_desirable, panel_icon_list_scroll); + WPanel *panel; + GdkDragAction action; + GtkWidget *source_widget; + int idx; + file_entry *fe; + + panel = data; + + /* Set up auto-scrolling */ + + panel_setup_drag_scroll (panel, x, y, + panel_icon_list_scrolling_is_desirable, + panel_icon_list_scroll); + + /* Validate the drop */ + + gdnd_find_panel_by_drag_context (context, &source_widget); + + idx = gnome_icon_list_get_icon_at (GNOME_ICON_LIST (widget), x, y); + fe = (idx == -1) ? NULL : &panel->dir.list[idx]; + + action = gdnd_validate_action (context, + source_widget != NULL, + source_widget == widget, + fe, + fe ? fe->f.marked : FALSE); + + gdk_drag_status (context, action, time); return TRUE; } @@ -1156,7 +1233,7 @@ sw = gtk_scrolled_window_new (NULL, NULL); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); - file_list = gtk_blist_new_with_titles (items, titles); + file_list = gtk_clist_new_with_titles (items, titles); gtk_container_add (GTK_CONTAINER (sw), file_list); gtk_widget_show (file_list); @@ -1170,9 +1247,14 @@ gtk_signal_connect (GTK_OBJECT (file_list), "select_row", GTK_SIGNAL_FUNC (panel_file_list_select_row), panel); + gtk_signal_connect (GTK_OBJECT (file_list), "unselect_row", + GTK_SIGNAL_FUNC (panel_file_list_unselect_row), + panel); +#if 0 gtk_signal_connect (GTK_OBJECT (file_list), "button_press_event", GTK_SIGNAL_FUNC (panel_file_list_press_row), panel); +#endif gtk_clist_set_button_actions (GTK_CLIST (file_list), 1, GTK_BUTTON_SELECTS | GTK_BUTTON_DRAGS); gtk_clist_set_button_actions (GTK_CLIST (file_list), 2, GTK_BUTTON_SELECTS); @@ -1180,15 +1262,16 @@ load_dnd_icons (); - gtk_drag_dest_set (GTK_WIDGET (file_list), GTK_DEST_DEFAULT_ALL, + gtk_drag_dest_set (GTK_WIDGET (file_list), + GTK_DEST_DEFAULT_DROP, drop_types, ELEMENTS (drop_types), - GDK_ACTION_COPY | GDK_ACTION_MOVE | GDK_ACTION_LINK); - + GDK_ACTION_COPY | GDK_ACTION_MOVE | GDK_ACTION_LINK | GDK_ACTION_ASK); +#if 0 /* Make directories draggable */ gtk_drag_source_set (GTK_WIDGET (file_list), GDK_BUTTON1_MASK | GDK_BUTTON2_MASK, drag_types, ELEMENTS (drag_types), GDK_ACTION_LINK | GDK_ACTION_MOVE | GDK_ACTION_COPY | GDK_ACTION_ASK); - +#endif gtk_signal_connect (GTK_OBJECT (file_list), "drag_data_get", GTK_SIGNAL_FUNC (panel_drag_data_get), panel); gtk_signal_connect (GTK_OBJECT (file_list), "drag_data_delete", @@ -1217,7 +1300,7 @@ GTK_SIGNAL_FUNC (panel_clist_button_release), panel); gtk_signal_connect (GTK_OBJECT (file_list), "motion_notify_event", - GTK_SIGNAL_FUNC (panel_widget_motion), panel); + GTK_SIGNAL_FUNC (panel_clist_motion), panel); gtk_signal_connect (GTK_OBJECT (file_list), "drag_begin", GTK_SIGNAL_FUNC (panel_drag_begin), panel); gtk_signal_connect (GTK_OBJECT (file_list), "drag_end", @@ -1254,9 +1337,8 @@ panel->dir.list [index].f.link_to_dir){ fullname = concat_dir_and_file (panel->cwd, panel->dir.list [index].fname); new_panel_at (fullname); - free (fullname); + g_free (fullname); } - break; } break; @@ -1286,8 +1368,8 @@ source = panel->dir.list [index].fname; if (mc_rename (source, dest) == 0){ - free (panel->dir.list [index].fname); - panel->dir.list [index].fname = strdup (dest); + g_free (panel->dir.list [index].fname); + panel->dir.list [index].fname = g_strdup (dest); return TRUE; } else return FALSE; @@ -1346,14 +1428,13 @@ panel_create_icon_display (WPanel *panel) { GnomeIconList *ilist; - GtkStyle *style; - ilist = GNOME_ICON_LIST (gnome_icon_list_new (90, NULL, TRUE)); - /* Set the background of the icon list to white */ - style = gtk_style_copy (gtk_widget_get_style (GTK_WIDGET (ilist))); - style->bg [GTK_STATE_NORMAL] = style->bg [GTK_STATE_PRELIGHT]; - gtk_widget_set_style (GTK_WIDGET (ilist), style); - + ilist = GNOME_ICON_LIST ( + gnome_icon_list_new_flags ( + 90, NULL, + GNOME_ICON_LIST_IS_EDITABLE| + GNOME_ICON_LIST_STATIC_TEXT)); + gnome_icon_list_set_separators (ilist, " /-_."); gnome_icon_list_set_row_spacing (ilist, 2); gnome_icon_list_set_col_spacing (ilist, 2); @@ -1378,9 +1459,10 @@ load_imlib_icons (); load_dnd_icons (); - gtk_drag_dest_set (GTK_WIDGET (ilist), GTK_DEST_DEFAULT_ALL, + gtk_drag_dest_set (GTK_WIDGET (ilist), + GTK_DEST_DEFAULT_DROP, drop_types, ELEMENTS (drop_types), - GDK_ACTION_COPY | GDK_ACTION_MOVE | GDK_ACTION_LINK); + GDK_ACTION_COPY | GDK_ACTION_MOVE | GDK_ACTION_LINK | GDK_ACTION_ASK); gtk_signal_connect (GTK_OBJECT (ilist), "drag_data_get", GTK_SIGNAL_FUNC (panel_drag_data_get), @@ -1644,15 +1726,15 @@ link = concat_dir_and_file (panel->cwd, panel->dir.list [panel->selected].fname); len = mc_readlink (link, link_target, MC_MAXPATHLEN); - free (link); + g_free (link); if (len > 0){ link_target [len] = 0; /* FIXME: Links should be handled differently */ - /* str = copy_strings ("-> ", link_target, NULL); */ + /* str = g_strconcat ("-> ", link_target, NULL); */ gnome_appbar_pop (bar); gnome_appbar_push (bar, " "); - /*free (str); */ + /* g_free (str); */ } else { gnome_appbar_pop (bar); gnome_appbar_push (bar, _("")); @@ -1664,12 +1746,12 @@ int len = panel->estimated_total; char *buffer; - buffer = xmalloc (len + 2, "display_mini_info"); + buffer = g_malloc (len + 2); format_file (buffer, panel, panel->selected, panel->estimated_total-2, 0, 1); buffer [len] = 0; gnome_appbar_pop (bar); gnome_appbar_push (bar, buffer); - free (buffer); + g_free (buffer); } if (panel->list_type == list_icons){ if (panel->marked == 0){ @@ -1789,8 +1871,8 @@ if (va->value > va->lower) return TRUE; } else { - if (y > (GTK_WIDGET (dtree)->allocation.height-20)){ - if (va->value < va->upper) + if (y > (GTK_WIDGET (dtree)->allocation.height - 10)){ + if (va->value < va->upper - va->page_size) return TRUE; } } @@ -1877,14 +1959,24 @@ { WPanel *panel = data; GtkAdjustment *va; + double v; va = scrolled_window_get_vadjustment (panel->tree_scrolled_window); - if (panel->drag_motion_y < 10) - gtk_adjustment_set_value (va, va->value - va->step_increment); - else{ - gtk_adjustment_set_value (va, va->value + va->step_increment); + if (panel->drag_motion_y < 10) { + v = va->value - va->step_increment; + if (v < va->lower) + v = va->lower; + + gtk_adjustment_set_value (va, v); + } else { + v = va->value + va->step_increment; + if (v > va->upper - va->page_size) + v = va->upper - va->page_size; + + gtk_adjustment_set_value (va, v); } + return TRUE; } @@ -1901,7 +1993,7 @@ WPanel *panel = data; int r, row, col; - if (panel_setup_drag_motion (panel, x, y, panel_tree_scrolling_is_desirable, panel_tree_scroll)) + if (panel_setup_drag_scroll (panel, x, y, panel_tree_scrolling_is_desirable, panel_tree_scroll)) return TRUE; r = gtk_clist_get_selection_info ( @@ -1983,7 +2075,7 @@ switch (info){ case TARGET_URI_LIST: case TARGET_TEXT_PLAIN: - data = copy_strings ("file:", dtree->drag_dir, NULL); + data = g_strconcat ("file:", dtree->drag_dir, NULL); gtk_selection_data_set ( selection_data, selection_data->target, 8, data, strlen (data)+1); @@ -2012,7 +2104,7 @@ gtk_drag_dest_set (GTK_WIDGET (tree), GTK_DEST_DEFAULT_ALL, drop_types, ELEMENTS (drop_types), - GDK_ACTION_COPY | GDK_ACTION_MOVE | GDK_ACTION_LINK); + GDK_ACTION_COPY | GDK_ACTION_MOVE | GDK_ACTION_LINK | GDK_ACTION_ASK); /* * Drag and drop signals. @@ -2029,9 +2121,9 @@ GTK_SIGNAL_FUNC (panel_tree_drag_data_get), panel); /* Make directories draggable */ - gtk_drag_source_set (GTK_WIDGET (tree), GDK_BUTTON1_MASK, + gtk_drag_source_set (GTK_WIDGET (tree), GDK_BUTTON1_MASK | GDK_BUTTON2_MASK, drag_types, ELEMENTS (drag_types), - GDK_ACTION_LINK | GDK_ACTION_MOVE | GDK_ACTION_COPY | GDK_ACTION_ASK); + GDK_ACTION_LINK | GDK_ACTION_MOVE | GDK_ACTION_COPY | GDK_ACTION_ASK | GDK_ACTION_DEFAULT); /* Mouse is being moved over ourselves */ gtk_signal_connect (GTK_OBJECT (tree), "drag_motion", @@ -2097,19 +2189,6 @@ do_panel_cd (panel, "..", cd_exact); } -static GtkWidget * -button_switch_to (char **icon, GtkSignalFunc fn, void *closure) -{ - GtkWidget *button, *pix; - - button = gtk_button_new (); - pix = gnome_pixmap_new_from_xpm_d (icon); - gtk_container_add (GTK_CONTAINER (button), pix); - gtk_signal_connect (GTK_OBJECT (button), "clicked", fn, closure); - - return button; -} - static void do_switch_to_iconic (GtkWidget *widget, WPanel *panel) { @@ -2170,7 +2249,7 @@ GNOME_APP_PIXMAP_DATA, listing_brief_list_xpm, 0, (GdkModifierType) 0, NULL }, { GNOME_APP_UI_ITEM, N_("Detailed"), N_("Switch view to show detailed file statistics"), do_switch_to_full_listing, NULL, NULL, \ GNOME_APP_PIXMAP_DATA, listing_list_xpm, 0, (GdkModifierType) 0, NULL }, - { GNOME_APP_UI_ITEM, N_("Custom"), N_("Switch view to show custom determined statistics"), do_switch_to_custom_listing, NULL, NULL, \ + { GNOME_APP_UI_ITEM, N_("Custom"), N_("Switch view to show custom determined statistics."), do_switch_to_custom_listing, NULL, NULL, \ GNOME_APP_PIXMAP_DATA, listing_custom_xpm, 0, (GdkModifierType) 0, NULL }, GNOMEUIINFO_END }; @@ -2203,9 +2282,6 @@ static void tree_size_allocate (GtkWidget *widget, GtkAllocation *allocation, WPanel *panel) { - GtkWidget *tree = panel->tree; - GdkFont *tree_font = tree->style->font; - if (allocation->width <= 0){ tree_panel_visible = 0; } else { @@ -2218,7 +2294,7 @@ x_create_panel (Dlg_head *h, widget_data parent, WPanel *panel) { GtkWidget *status_line, *filter, *vbox, *ministatus_box; - GtkWidget *cwd, *back_p, *fwd_p, *up_p; + GtkWidget *cwd; GtkWidget *hbox, *evbox, *dock, *box; GnomeUIBuilderData uibdata; @@ -2316,6 +2392,13 @@ panel->up_b = toolbar[1].widget; panel->fwd_b = toolbar[2].widget; panel_update_marks (panel); + if (panel->list_type == list_brief) + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (viewbar[1].widget), TRUE); + else if (panel->list_type == list_full) + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (viewbar[2].widget), TRUE); + else if (panel->list_type == list_user) + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (viewbar[3].widget), TRUE); + /* * Here we make the view buttons. */ @@ -2328,7 +2411,7 @@ evbox, NULL, NULL); gtk_box_pack_start (GTK_BOX (hbox), gtk_label_new (_("Location:")), FALSE, FALSE, 0); - gtk_box_pack_start (GTK_BOX (hbox), cwd, FALSE, FALSE, 0); + gtk_box_pack_start (GTK_BOX (hbox), cwd, TRUE, TRUE, 0); dock = gnome_dock_item_new ("gmc-toolbar1", GNOME_DOCK_ITEM_BEH_EXCLUSIVE | GNOME_DOCK_ITEM_BEH_NEVER_VERTICAL); gtk_container_add (GTK_CONTAINER(dock),status_line); gnome_dock_add_item (GNOME_DOCK(GNOME_APP (panel->xwindow)->dock), @@ -2470,14 +2553,14 @@ char * get_nth_panel_name (int num) { - static char buffer [20]; + static char buffer [BUF_TINY]; if (!num) return "New Left Panel"; else if (num == 1) return "New Right Panel"; else { - sprintf (buffer, "%ith Panel", num); + g_snprintf (buffer, sizeof (buffer), "%ith Panel", num); return buffer; } } @@ -2490,7 +2573,7 @@ if ((hint = get_random_hint ())){ if (*hint) set_hintbar (hint); - free (hint); + g_free (hint); } else set_hintbar ("The GNOME File Manager " VERSION); diff -ruN old/mc-4.5.9/gnome/gtkdtree.c new/mc-4.5.10/gnome/gtkdtree.c --- old/mc-4.5.9/gnome/gtkdtree.c Mon Jan 18 17:44:12 1999 +++ new/mc-4.5.10/gnome/gtkdtree.c Sun Jan 31 18:55:19 1999 @@ -7,15 +7,14 @@ * */ #include -#include "util.h" #include "treestore.h" #include #include "gtkdtree.h" - #include #include #include #include +#include "global.h" #include "dir-open.xpm" #include "dir-close.xpm" @@ -99,6 +98,24 @@ return NULL; } +static GtkCTreeNode * +gtk_dtree_insert_node (GtkDTree *dtree, GtkCTreeNode *parent, char *text) +{ + GtkCTreeNode *sibling; + char *texts [1]; + + texts [0] = text; + + sibling = gtk_ctree_insert_node ( + GTK_CTREE (dtree), parent, NULL, + texts, TREE_SPACING, + dtree->pixmap_close, + dtree->bitmap_close, + dtree->pixmap_open, + dtree->bitmap_open, + FALSE, FALSE); +} + static gboolean gtk_dtree_load_path (GtkDTree *dtree, char *path, GtkCTreeNode *parent, int level) { @@ -109,30 +126,24 @@ g_assert (parent); g_assert (dtree); + dtree->loading_dir++; dir = tree_store_opendir (path); - if (!dir) + if (!dir){ + dtree->loading_dir--; return FALSE; + } for (; (dirent = tree_store_readdir (dir)) != NULL; ){ GtkCTreeNode *sibling; - char *text [1]; + char *text; - text [0] = x_basename (dirent->name); + text = x_basename (dirent->name); /* Do not insert duplicates */ - sibling = gtk_dtree_contains (dtree, parent, text [0]); + sibling = gtk_dtree_contains (dtree, parent, text); - if (sibling == NULL){ - sibling = gtk_ctree_insert_node ( - GTK_CTREE (dtree), parent, NULL, - text, TREE_SPACING, - dtree->pixmap_close, - dtree->bitmap_close, - dtree->pixmap_open, - dtree->bitmap_open, - FALSE, FALSE); - - } + if (sibling == NULL) + sibling = gtk_dtree_insert_node (dtree, parent, text); if (level) gtk_dtree_load_path (dtree, dirent->name, sibling, level-1); @@ -142,7 +153,8 @@ } tree_store_closedir (dir); - + dtree->loading_dir--; + return TRUE; } @@ -154,12 +166,10 @@ parent_class->tree_select_row (ctree, row, column); - while (row == dtree->root_node) - return; - if (row == dtree->last_node) return; + dtree->loading_dir++; dtree->last_node = row; gtk_clist_freeze (GTK_CLIST (ctree)); @@ -188,7 +198,8 @@ g_free (np); } #endif - + + dtree->loading_dir--; gtk_clist_thaw (GTK_CLIST (ctree)); } @@ -357,11 +368,83 @@ gtk_dtree_select_row (ctree, node, 0); } +/* + * entry_removed_callback: + * + * Called when an entry is removed by the treestore + */ +static void +entry_removed_callback (tree_entry *tree, void *data) +{ + GtkCTreeNode *current_node; + GtkDTree *dtree = data; + char *dirname, *copy, *current ; + + if (dtree->loading_dir) + return; + + copy = dirname = g_strdup (tree->name); + copy++; + current_node = dtree->root_node; + while ((current = strtok (copy, "/")) != NULL){ + current_node = gtk_dtree_lookup_dir (dtree, current_node, current); + if (!current_node) + break; + copy = NULL; + } + if (current == NULL && current_node) + gtk_ctree_remove_node (GTK_CTREE (data), current_node); + + g_free (dirname); +} + +/* + * entry_added_callback: + * + * Callback invoked by the treestore when a tree_entry has been inserted + * into the treestore. We update the gtkdtree with this new information. + */ +static void +entry_added_callback (tree_entry *tree, void *data) +{ + GtkCTreeNode *current_node, *new_node; + GtkDTree *dtree = data; + char *dirname, *copy, *current, *npath, *full_path; + + if (dtree->loading_dir) + return; + + copy = dirname = g_strdup (tree->name); + copy++; + current_node = dtree->root_node; + npath = g_strdup ("/"); + while ((current = strtok (copy, "/")) != NULL){ + full_path = g_concat_dir_and_file (npath, current); + g_free (npath); + npath = full_path; + + new_node = gtk_dtree_lookup_dir (dtree, current_node, current); + if (!new_node){ + GtkCTreeNode *sibling; + + sibling = gtk_dtree_insert_node (dtree, current_node, current); + gtk_dtree_load_path (dtree, full_path, sibling, 1); + break; + } + copy = NULL; + current_node = new_node; + } + g_free (npath); + g_free (dirname); +} + static void gtk_dtree_destroy (GtkObject *object) { GtkDTree *dtree = GTK_DTREE (object); + tree_store_remove_entry_remove_hook (entry_removed_callback); + tree_store_remove_entry_add_hook (entry_added_callback); gdk_pixmap_unref (dtree->pixmap_open); gdk_pixmap_unref (dtree->pixmap_close); gdk_bitmap_unref (dtree->bitmap_open); @@ -508,6 +591,9 @@ dtree->auto_expanded_nodes = NULL; tree_store_dirty_notify = gtk_dtree_dirty_notify; + + tree_store_add_entry_remove_hook (entry_removed_callback, dtree); + tree_store_add_entry_add_hook (entry_added_callback, dtree); } void diff -ruN old/mc-4.5.9/gnome/gtkdtree.h new/mc-4.5.10/gnome/gtkdtree.h --- old/mc-4.5.9/gnome/gtkdtree.h Mon Jan 18 17:44:12 1999 +++ new/mc-4.5.10/gnome/gtkdtree.h Sun Jan 31 18:55:19 1999 @@ -31,7 +31,9 @@ GdkBitmap *bitmap_open; GdkBitmap *bitmap_close; - int internal; + unsigned short internal; + unsigned short loading_dir; + int *show_dot_files; } GtkDTree; typedef struct { diff -ruN old/mc-4.5.9/gnome/gtools.c new/mc-4.5.10/gnome/gtools.c --- old/mc-4.5.9/gnome/gtools.c Mon Jan 18 17:44:12 1999 +++ new/mc-4.5.10/gnome/gtools.c Sun Jan 31 18:55:19 1999 @@ -5,10 +5,10 @@ */ #include #include "myslang.h" -#include "util.h" #include #include #include +#include "global.h" #include "gconf.h" #include "dlg.h" #undef HAVE_LIBGPM @@ -42,7 +42,7 @@ WLabel *label; GtkWidget *dialog; int i, result = -1; - gchar **buttons; + const gchar **buttons; char *stock; GSList *allocated = NULL; @@ -76,7 +76,8 @@ buttons[i] = NULL; dialog = gnome_message_box_newv (text, header, buttons); - + gtk_window_set_position (GTK_WINDOW (dialog), GTK_WIN_POS_MOUSE); + result = gnome_dialog_run_and_close (GNOME_DIALOG (dialog)); g_slist_foreach (allocated, (GFunc) g_free, NULL); diff -ruN old/mc-4.5.9/gnome/gutil.c new/mc-4.5.10/gnome/gutil.c --- old/mc-4.5.9/gnome/gutil.c Mon Jan 18 17:44:12 1999 +++ new/mc-4.5.10/gnome/gutil.c Sun Jan 31 18:55:19 1999 @@ -20,7 +20,6 @@ #include #include -#include #include #ifdef HAVE_UNISTD_H #include @@ -47,7 +46,7 @@ #include #include #include -#include "util.h" +#include "global.h" int my_system_get_child_pid (int flags, const char *shell, const char *command, pid_t *pid) { diff -ruN old/mc-4.5.9/gnome/gview.c new/mc-4.5.10/gnome/gview.c --- old/mc-4.5.9/gnome/gview.c Mon Jan 18 17:44:12 1999 +++ new/mc-4.5.10/gnome/gview.c Sun Jan 31 18:55:19 1999 @@ -90,7 +90,7 @@ p / (view->s.st_size / 100) : p * 100 / view->s.st_size); - sprintf (buffer, "%3d%%", percent); + g_snprintf (buffer, sizeof (buffer), "%3d%%", percent); if (strcmp (buffer, GTK_LABEL (view->gtk_percent)->label)) gtk_label_set (GTK_LABEL (view->gtk_percent), buffer); @@ -116,13 +116,13 @@ char buffer [80]; if (view->hex_mode) - sprintf (buffer, _("Offset 0x%08x"), view->edit_cursor); + g_snprintf (buffer, sizeof (buffer), _("Offset 0x%08x"), view->edit_cursor); else - sprintf (buffer, _("Col %d"), -view->start_col); + g_snprintf (buffer, sizeof (buffer), _("Col %d"), -view->start_col); if (strcmp (buffer, GTK_LABEL (view->gtk_offset)->label)) gtk_label_set (GTK_LABEL (view->gtk_offset), buffer); - sprintf (buffer, _("%s bytes"), size_trunc (view->s.st_size)); + g_snprintf (buffer, sizeof (buffer), _("%s bytes"), size_trunc (view->s.st_size)); if (strcmp (buffer, GTK_LABEL (view->gtk_bytes)->label)) gtk_label_set (GTK_LABEL (view->gtk_bytes), buffer); diff -ruN old/mc-4.5.9/gnome/gwidget.c new/mc-4.5.10/gnome/gwidget.c --- old/mc-4.5.9/gnome/gwidget.c Mon Jan 18 17:44:12 1999 +++ new/mc-4.5.10/gnome/gwidget.c Sun Jan 31 18:55:19 1999 @@ -87,19 +87,19 @@ { char *stock; - if (strcasecmp (text, _("ok")) == 0) + if ( g_strcasecmp (text, _("ok")) == 0) stock = GNOME_STOCK_BUTTON_OK; - else if (strcasecmp (text, _("cancel")) == 0) + else if ( g_strcasecmp (text, _("cancel")) == 0) stock = GNOME_STOCK_BUTTON_CANCEL; - else if (strcasecmp (text, _("help")) == 0) + else if ( g_strcasecmp (text, _("help")) == 0) stock = GNOME_STOCK_BUTTON_HELP; - else if (strcasecmp (text, _("yes")) == 0) + else if ( g_strcasecmp (text, _("yes")) == 0) stock = GNOME_STOCK_BUTTON_YES; - else if (strcasecmp (text, _("no")) == 0) + else if ( g_strcasecmp (text, _("no")) == 0) stock = GNOME_STOCK_BUTTON_NO; - else if (strcasecmp (text, _("exit")) == 0) + else if ( g_strcasecmp (text, _("exit")) == 0) stock = GNOME_STOCK_BUTTON_CLOSE; - else if (strcasecmp (text, _("abort")) == 0) + else if ( g_strcasecmp (text, _("abort")) == 0) stock = GNOME_STOCK_BUTTON_CANCEL; else stock = 0; @@ -551,7 +551,7 @@ char buffer [40]; GtkButton *b; - sprintf (buffer, "F%d %s", i+1, bb->labels [i].text ? bb->labels [i].text : " "); + g_snprintf (buffer, sizeof (buffer), "F%d %s", i+1, bb->labels [i].text ? bb->labels [i].text : " "); b = (GtkButton *) gtk_button_new_with_label (buffer); gtk_signal_connect (GTK_OBJECT (b), "clicked", GTK_SIGNAL_FUNC (buttonbar_clicked), bb); diff -ruN old/mc-4.5.9/gnome/mc.keys.in.in new/mc-4.5.10/gnome/mc.keys.in.in --- old/mc-4.5.9/gnome/mc.keys.in.in Mon Jan 18 17:44:12 1999 +++ new/mc-4.5.10/gnome/mc.keys.in.in Sun Jan 31 18:55:19 1999 @@ -117,13 +117,23 @@ text/html: icon-filename=@icondir@/gnome-text-html.png + open=gnome-moz-remote %f open.netscape.View this file with Netscape=gnome-moz-remote %f application/vcard: icon-filename=@icondir@/calendar.xpm -application/x-url: +x-url/http: icon-filename=@icondir@/gnome-text-url.png + +x-url/http: + open=gnome-moz-remote %f + +x-url/ftp: + fm-open=cd %f + +x-url/news: + open=gnome-moz-remote %f application/x-troff-man: icon-filename=@icondir@/man.xpm diff -ruN old/mc-4.5.9/gtkedit/edit.h new/mc-4.5.10/gtkedit/edit.h --- old/mc-4.5.9/gtkedit/edit.h Mon Jan 18 17:44:10 1999 +++ new/mc-4.5.10/gtkedit/edit.h Sun Jan 31 18:55:18 1999 @@ -79,7 +79,7 @@ # endif # endif -# include "regex.h" +# include #endif @@ -110,7 +110,6 @@ #else # include "src/main.h" /* for char *shell */ -# include "src/mad.h" # include "src/dlg.h" # include "src/widget.h" # include "src/color.h" @@ -123,7 +122,7 @@ # include "src/win.h" # include "vfs/vfs.h" # include "src/menu.h" -# include "src/regex.h" +# include # define WANT_WIDGETS # define WIDGET_COMMAND (WIDGET_USER + 10) diff -ruN old/mc-4.5.9/gtkedit/editmenu.c new/mc-4.5.10/gtkedit/editmenu.c --- old/mc-4.5.9/gtkedit/editmenu.c Mon Jan 18 17:44:10 1999 +++ new/mc-4.5.10/gtkedit/editmenu.c Sun Jan 31 18:55:18 1999 @@ -35,7 +35,7 @@ extern WMenu *edit_menubar; #undef edit_message_dialog -#define edit_message_dialog(w,x,y,h,s) query_dialog (h, s, 0, 1, "&Ok") +#define edit_message_dialog(w,x,y,h,s) query_dialog (h, s, 0, 1, _("&Ok")) #define CFocus(x) static void menu_cmd (int i) @@ -66,14 +66,14 @@ void edit_about_cmd () { - edit_message_dialog (wedit->mainid, 20, 20, " About ", - "\n" + edit_message_dialog (wedit->mainid, 20, 20, _(" About "), + _("\n" " Cooledit v2.1\n" "\n" " Copyright (C) 1996 the Free Software Foundation\n" "\n" " A user friendly text editor written\n" - " for the Midnight Commander.\n" + " for the Midnight Commander.\n") ); } diff -ruN old/mc-4.5.9/gtkedit/gtkedit.c new/mc-4.5.10/gtkedit/gtkedit.c --- old/mc-4.5.9/gtkedit/gtkedit.c Mon Jan 18 17:44:10 1999 +++ new/mc-4.5.10/gtkedit/gtkedit.c Sun Jan 31 18:55:18 1999 @@ -54,13 +54,16 @@ int edit_load_file_from_filename (WEdit *edit, char *exp); static void gtk_edit_set_selection (GtkEditable * editable, gint start, gint end); - guchar gtk_edit_font_width_per_char[256]; int gtk_edit_option_text_line_spacing; int gtk_edit_option_font_ascent; int gtk_edit_option_font_descent; int gtk_edit_option_font_mean_width; int gtk_edit_fixed_font; + +#if defined NEVER_DEFINED_ONLY_A_HACK +const char *txt = _("&Dismiss"); +#endif static void clear_focus_area (GtkEdit *edit, gint area_x, gint area_y, gint area_width, gint area_height) { diff -ruN old/mc-4.5.9/lib/mc.ext.in new/mc-4.5.10/lib/mc.ext.in --- old/mc-4.5.9/lib/mc.ext.in Mon Jan 18 17:44:08 1999 +++ new/mc-4.5.10/lib/mc.ext.in Sun Jan 31 18:55:18 1999 @@ -336,6 +336,11 @@ View=%view{hex} Icon=so.xpm +# GNU Info page +type/Info\ text + Open=info --directory %d -f %p + Icon=info.xpm + # Manual page regex/(([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|n)|\.man)$ Open=nroff @TROFFASCII@ @MANDOC@ %f | %var{PAGER:more} @@ -564,6 +569,10 @@ Open=mpg123 %f View=mpg123 %f Icon=sound.xpm + +regex/\.trpm$ + Open=%cd trpm:%p + View=%view{ascii} rpm -qivl --scripts `basename %p .trpm` # Default target for anything not described above default/* diff -ruN old/mc-4.5.9/new_icons/Makefile.in new/mc-4.5.10/new_icons/Makefile.in --- old/mc-4.5.9/new_icons/Makefile.in Mon Jan 18 17:44:12 1999 +++ new/mc-4.5.10/new_icons/Makefile.in Sun Jan 31 18:55:19 1999 @@ -38,7 +38,10 @@ gnome-video-x-msvideo.png \ gnome-text-html.png \ gnome-http-url.png \ - gnome-image-generic.png + gnome-image-generic.png \ + gnome-application-x-c-header.png \ + gnome-application-x-c-source.png \ + gnome-application-x-cc-source.png all: Binary files old/mc-4.5.9/new_icons/gnome-application-x-c-header.png and new/mc-4.5.10/new_icons/gnome-application-x-c-header.png differ Binary files old/mc-4.5.9/new_icons/gnome-application-x-c-source.png and new/mc-4.5.10/new_icons/gnome-application-x-c-source.png differ Binary files old/mc-4.5.9/new_icons/gnome-application-x-cc-source.png and new/mc-4.5.10/new_icons/gnome-application-x-cc-source.png differ Binary files old/mc-4.5.9/new_icons/gnome-pack-rpm.png and new/mc-4.5.10/new_icons/gnome-pack-rpm.png differ diff -ruN old/mc-4.5.9/po/Makefile.in.in new/mc-4.5.10/po/Makefile.in.in --- old/mc-4.5.9/po/Makefile.in.in Mon Jan 18 17:44:13 1999 +++ new/mc-4.5.10/po/Makefile.in.in Sun Jan 31 18:55:19 1999 @@ -9,8 +9,8 @@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ -prefix = @prefix@ -exec_prefix = @exec_prefix@ +prefix = $(DESTDIR)@prefix@ +exec_prefix = $(DESTDIR)@exec_prefix@ datadir = $(prefix)/@DATADIRNAME@ localedir = $(datadir)/locale gnulocaledir = $(prefix)/share/locale diff -ruN old/mc-4.5.9/po/POTFILES.in new/mc-4.5.10/po/POTFILES.in --- old/mc-4.5.9/po/POTFILES.in Mon Jan 18 17:44:13 1999 +++ new/mc-4.5.10/po/POTFILES.in Sun Jan 31 18:55:19 1999 @@ -6,6 +6,7 @@ gnome/gicon.c gnome/glayout.c gnome/gpopup.c +gnome/gprefs.c gnome/gprop.c gnome/gscreen.c gnome/gtools.c @@ -48,6 +49,7 @@ src/screen.c src/subshell.c src/tree.c +src/treestore.c src/user.c src/util.c src/utilunix.c diff -ruN old/mc-4.5.9/po/cat-id-tbl.c new/mc-4.5.10/po/cat-id-tbl.c --- old/mc-4.5.9/po/cat-id-tbl.c Mon Jan 18 17:44:14 1999 +++ new/mc-4.5.10/po/cat-id-tbl.c Sun Jan 31 18:55:19 1999 @@ -55,925 +55,966 @@ {"Trashcan", 42}, {"Home directory", 43}, {"Could not symlink %s to %s; will not have initial desktop icons.", 44}, - {"Files Exist", 45}, - {"Some of the files you are trying to copy already exist in the destination folder.", 46}, - {"Prompt me before overwriting any file.", 47}, - {"Don't overwrite any files.", 48}, - {"Overwrite:", 49}, - {"Older files.", 50}, - {"Files only if size differs.", 51}, - {"All files.", 52}, - {"File Exists", 53}, - {"The target file already exists: %s", 54}, - {"Replace it?", 55}, - {"Copy", 56}, - {"Move", 57}, - {"Destination", 58}, - {"Find Destination Folder", 59}, - {"Copy as a background process", 60}, - {"Advanced Options", 61}, - {"Preserve symlinks", 62}, - {"Follow links.", 63}, - {"Selecting this will copy the files that symlinks point to instead of just copying the link.", 64}, - {"Preserve file attributes.", 65}, - {"Preserves the permissions and the UID/GID if possible", 66}, - {"Recursively copy subdirectories.", 67}, - {"If set, this will copy the directories recursively", 68}, - {"File ", 69}, - {" is ", 70}, - {" Done.", 71}, - {"Move here", 72}, - {"Copy here", 73}, - {"Link here", 74}, - {"Cancel drag", 75}, + {"To: ", 45}, + {"Copying from: ", 46}, + {"Deleting file: ", 47}, + {"Files Exist", 48}, + {"\ +Some of the files you are trying to copy already exist in the destination \ +folder.", 49}, + {"Prompt me before overwriting any file.", 50}, + {"Don't overwrite any files.", 51}, + {"Overwrite:", 52}, + {"Older files.", 53}, + {"Files only if size differs.", 54}, + {"All files.", 55}, + {"File Exists", 56}, + {"The target file already exists: %s", 57}, + {"Replace it?", 58}, + {"Copy", 59}, + {"Move", 60}, + {"Destination", 61}, + {"Find Destination Folder", 62}, + {"Copy as a background process", 63}, + {"Advanced Options", 64}, + {"Preserve symlinks", 65}, + {"Follow links.", 66}, + {"\ +Selecting this will copy the files that symlinks point to instead of just \ +copying the link.", 67}, + {"Preserve file attributes.", 68}, + {"Preserves the permissions and the UID/GID if possible", 69}, + {"Recursively copy subdirectories.", 70}, + {"If set, this will copy the directories recursively", 71}, + {"Move Progress", 72}, + {"Copy Progress", 73}, + {"Delete Progress", 74}, + {"File ", 75}, + {" is ", 76}, + {" Done.", 77}, + {"_Move here", 78}, + {"_Copy here", 79}, + {"_Link here", 80}, + {"Cancel drag", 81}, {"\ Could not stat %s\n\ -%s", 76}, - {"Error", 77}, - {"Default set of icons not found, check your installation", 78}, - {"Enter command to run", 79}, - {"_Terminal", 80}, - {"Launch a new terminal in the current directory", 81}, - {"_Directory...", 82}, - {"Creates a new directory", 83}, - {"New _Window", 84}, - {"Opens a new window", 85}, - {"_New", 86}, - {"_Open", 87}, - {"Opens the selected files", 88}, - {"_Copy...", 89}, - {"Copy files", 90}, - {"_Delete...", 91}, - {"Delete files from disk", 92}, - {"_Move...", 93}, - {"Rename or move files", 94}, - {"C_lose", 95}, - {"Close this panel", 96}, - {"_Select All", 97}, - {"Select all files in the current Panel", 98}, - {"_Select Files...", 99}, - {"Select a group of files", 100}, - {"_Invert Selection", 101}, - {"Reverses the list of tagged files", 102}, - {"_Rescan Directory", 103}, - {"Rescan the directory contents", 104}, - {"Icon View", 105}, - {"Partial View", 106}, - {"Full View", 107}, - {"Custom View", 108}, - {"_Sort By...", 109}, - {"Confirmation settings", 110}, - {"_Filter View...", 111}, - {"Global option settings", 112}, - {"_Find File...", 113}, - {"Locate files on disk", 114}, - {"_Compare panels...", 115}, - {"Compare two panel contents", 116}, - {"_Run Command...", 117}, - {"Runs a command", 118}, - {"_Run Command in panel...", 119}, - {"Run a command and put the results in a panel", 120}, - {"_Active VFS list...", 121}, - {"List of active virtual file systems", 122}, - {"_Background jobs...", 123}, - {"List of background operations", 124}, - {"_About", 125}, - {"Information on this program", 126}, - {"_File", 127}, - {"_Edit", 128}, - {"_Layout", 129}, - {"_Commands", 130}, - {"_Help", 131}, - {"File/New/Directory...", 132}, - {"Properties", 133}, - {"Open", 134}, - {"Open with", 135}, - {"View", 136}, - {"View unfiltered", 137}, - {"Edit", 138}, - {"Link...", 139}, - {"Symlink...", 140}, - {"Edit symlink...", 141}, - {"Move/rename...", 142}, - {"Copy...", 143}, - {"Delete", 144}, - {"Filename", 145}, - {"Full name: ", 146}, - {"Command", 147}, - {"Command:", 148}, - {"Use terminal", 149}, - {"File mode (permissions)", 150}, - {"Current mode: ", 151}, - {"Read", 152}, - {"Write", 153}, - {"Exec", 154}, - {"Special", 155}, - {"User", 156}, - {"Group", 157}, - {"Other", 158}, - {"Set UID", 159}, - {"Set GID", 160}, - {"Sticky", 161}, - {"", 162}, - {"Owner", 163}, - {"General", 164}, - {"Title", 165}, - {"Icon", 166}, - {"Select icon", 167}, - {"All files", 168}, - {"Archives and compressed files", 169}, - {"RPM/DEB files", 170}, - {"Text/Document files", 171}, - {"HTML and SGML files", 172}, - {"Postscript and PDF files", 173}, - {"Spreadsheet files", 174}, - {"Image files", 175}, - {"Video/animation files", 176}, - {"Audio files", 177}, - {"C program files", 178}, - {"C++ program files", 179}, - {"Objective-C program files", 180}, - {"Scheme program files", 181}, - {"Assembler program files", 182}, - {"Misc. program files", 183}, - {"Font files", 184}, - {"Search: %s", 185}, - {"%s bytes in %d file", 186}, - {"%s bytes in %d files", 187}, - {"", 188}, - {"Filter", 189}, - {"Switch view to an Icon view", 190}, - {"Brief", 191}, - {"Switch view to show just file name and type", 192}, - {"Detailed", 193}, - {"Switch view to show detailed file statistics", 194}, - {"Custom", 195}, - {"Switch view to show custom determined statistics", 196}, - {"Back", 197}, - {"Go to the previously visited directory", 198}, - {"Up", 199}, - {"Go up a level in the directory heirarchy", 200}, - {"Forward", 201}, - {"Go to the next directory", 202}, - {"Home", 203}, - {"Go to your home directory", 204}, - {"Location:", 205}, - {"&Ok", 206}, - {"Offset 0x%08x", 207}, - {"Col %d", 208}, - {"%s bytes", 209}, - {"_Goto line", 210}, - {"Jump to a specified line number", 211}, - {"_Monitor file", 212}, - {"Monitor file growing", 213}, - {"Regexp search", 214}, - {"Regular expression search", 215}, - {"_Wrap", 216}, - {"Wrap the text", 217}, - {"_Formatted", 218}, - {"_Hex", 219}, - {"_Search", 220}, - {"_Mode", 221}, - {"ok", 222}, - {"cancel", 223}, - {"help", 224}, - {"yes", 225}, - {"no", 226}, - {"exit", 227}, - {"abort", 228}, - {" Error ", 229}, - {" Failed trying to open file for reading: ", 230}, - {" Cannot get size/permissions info on file: ", 231}, - {" Not an ordinary file: ", 232}, - {" File is too large: ", 233}, +%s", 82}, + {"Error", 83}, + {"Default set of icons not found, check your installation", 84}, + {"Enter command to run", 85}, + {"_Terminal", 86}, + {"Launch a new terminal in the current directory", 87}, + {"_Directory...", 88}, + {"Creates a new directory", 89}, + {"New _Window", 90}, + {"Opens a new window", 91}, + {"_New", 92}, + {"_Open", 93}, + {"Opens the selected files", 94}, + {"_Copy...", 95}, + {"Copy files", 96}, + {"_Delete...", 97}, + {"Delete files from disk", 98}, + {"_Move...", 99}, + {"Rename or move files", 100}, + {"C_lose", 101}, + {"Close this panel", 102}, + {"Select _All", 103}, + {"Select all files in the current Panel", 104}, + {"_Select Files...", 105}, + {"Select a group of files", 106}, + {"_Invert Selection", 107}, + {"Reverses the list of tagged files", 108}, + {"_Rescan Directory", 109}, + {"Rescan the directory contents", 110}, + {"Icon View", 111}, + {"Partial View", 112}, + {"Full View", 113}, + {"Custom View", 114}, + {"_Sort By...", 115}, + {"Confirmation settings", 116}, + {"_Filter View...", 117}, + {"Global option settings", 118}, + {"_Find File...", 119}, + {"Locate files on disk", 120}, + {"_Run Command...", 121}, + {"Runs a command", 122}, + {"_Run Command in panel...", 123}, + {"Run a command and put the results in a panel", 124}, + {"_Active VFS list...", 125}, + {"List of active virtual file systems", 126}, + {"_Background jobs...", 127}, + {"List of background operations", 128}, + {"_About", 129}, + {"Information on this program", 130}, + {"_File", 131}, + {"_Edit", 132}, + {"_Layout", 133}, + {"_Commands", 134}, + {"_Help", 135}, + {"File/New/Directory...", 136}, + {"Properties", 137}, + {"Open", 138}, + {"Open with", 139}, + {"View", 140}, + {"View unfiltered", 141}, + {"Edit", 142}, + {"Link...", 143}, + {"Symlink...", 144}, + {"Edit symlink...", 145}, + {"Move/rename...", 146}, + {"Copy...", 147}, + {"Delete", 148}, + {"Show backup files", 149}, + {"Show hidden files", 150}, + {"Mix files and directories", 151}, + {"Use shell patterns instead of regular expressions", 152}, + {"Confirm when deleting file", 153}, + {"Confirm when overwriting files", 154}, + {"Confirm when executing files", 155}, + {"Show progress while operations are being performed", 156}, + {"VFS Timeout :", 157}, + {"Seconds", 158}, + {"Anonymous FTP password :", 159}, + {"Always use FTP proxy", 160}, + {"Fast directory reload", 161}, + {"Compute totals before copying files", 162}, + {"FTP directory cache timeout :", 163}, + {"Allow customization of icons in panels", 164}, + {"File display", 165}, + {"Confirmation", 166}, + {"VFS", 167}, + {"Caching", 168}, + {"Filename", 169}, + {"Full name: ", 170}, + {"Command", 171}, + {"Command:", 172}, + {"Use terminal", 173}, + {"File mode (permissions)", 174}, + {"Current mode: ", 175}, + {"Read", 176}, + {"Write", 177}, + {"Exec", 178}, + {"Special", 179}, + {"User", 180}, + {"Group", 181}, + {"Other", 182}, + {"Set UID", 183}, + {"Set GID", 184}, + {"Sticky", 185}, + {"", 186}, + {"Owner", 187}, + {"General", 188}, + {"Title", 189}, + {"Icon", 190}, + {"Select icon", 191}, + {"All files", 192}, + {"Archives and compressed files", 193}, + {"RPM/DEB files", 194}, + {"Text/Document files", 195}, + {"HTML and SGML files", 196}, + {"Postscript and PDF files", 197}, + {"Spreadsheet files", 198}, + {"Image files", 199}, + {"Video/animation files", 200}, + {"Audio files", 201}, + {"C program files", 202}, + {"C++ program files", 203}, + {"Objective-C program files", 204}, + {"Scheme program files", 205}, + {"Assembler program files", 206}, + {"Misc. program files", 207}, + {"Font files", 208}, + {"Search: %s", 209}, + {"%s bytes in %d file", 210}, + {"%s bytes in %d files", 211}, + {"", 212}, + {"Filter", 213}, + {"Switch view to an Icon view", 214}, + {"Brief", 215}, + {"Switch view to show just file name and type", 216}, + {"Detailed", 217}, + {"Switch view to show detailed file statistics", 218}, + {"Custom", 219}, + {"Switch view to show custom determined statistics.", 220}, + {"Back", 221}, + {"Go to the previously visited directory", 222}, + {"Up", 223}, + {"Go up a level in the directory heirarchy", 224}, + {"Forward", 225}, + {"Go to the next directory", 226}, + {"Home", 227}, + {"Go to your home directory", 228}, + {"Location:", 229}, + {"&Ok", 230}, + {"Offset 0x%08x", 231}, + {"Col %d", 232}, + {"%s bytes", 233}, + {"_Goto line", 234}, + {"Jump to a specified line number", 235}, + {"_Monitor file", 236}, + {"Monitor file growing", 237}, + {"Regexp search", 238}, + {"Regular expression search", 239}, + {"_Wrap", 240}, + {"Wrap the text", 241}, + {"_Formatted", 242}, + {"_Hex", 243}, + {"_Search", 244}, + {"_Mode", 245}, + {"ok", 246}, + {"cancel", 247}, + {"help", 248}, + {"yes", 249}, + {"no", 250}, + {"exit", 251}, + {"abort", 252}, + {" Error ", 253}, + {" Failed trying to open file for reading: ", 254}, + {" Cannot get size/permissions info on file: ", 255}, + {" Not an ordinary file: ", 256}, + {" File is too large: ", 257}, {"\ \n\ - Increase edit.h:MAXBUF and recompile the editor. ", 234}, - {" Error allocating memory ", 235}, - {" Save As ", 236}, - {" Warning ", 237}, - {" A file already exists with this name. ", 238}, - {"Overwrite", 239}, - {"Cancel", 240}, - {" Save as ", 241}, - {" Error trying to save file. ", 242}, - {" Delete macro ", 243}, - {" Error trying to open temp file ", 244}, - {" Error trying to open macro file ", 245}, - {"key '%d 0': ", 246}, - {" Error trying to overwrite macro file ", 247}, - {" Macro ", 248}, - {" Press the macro's new hotkey: ", 249}, - {" Save macro ", 250}, - {" Delete Macro ", 251}, - {" Load macro ", 252}, - {" Confirm save file? : ", 253}, - {" Save file ", 254}, - {"Save", 255}, + Increase edit.h:MAXBUF and recompile the editor. ", 258}, + {" Error allocating memory ", 259}, + {" Save As ", 260}, + {" Warning ", 261}, + {" A file already exists with this name. ", 262}, + {"Overwrite", 263}, + {"Cancel", 264}, + {" Save as ", 265}, + {" Error trying to save file. ", 266}, + {" Delete macro ", 267}, + {" Error trying to open temp file ", 268}, + {" Error trying to open macro file ", 269}, + {"key '%d 0': ", 270}, + {" Error trying to overwrite macro file ", 271}, + {" Macro ", 272}, + {" Press the macro's new hotkey: ", 273}, + {" Save macro ", 274}, + {" Delete Macro ", 275}, + {" Load macro ", 276}, + {" Confirm save file? : ", 277}, + {" Save file ", 278}, + {"Save", 279}, {"\ Current text was modified without a file save. \n\ - Continue discards these changes. ", 256}, - {"Continue", 257}, - {" Load ", 258}, - {" Error trying to open file for reading ", 259}, - {" Block is large, you may not be able to undo this action. ", 260}, - {" Continue ", 261}, - {" Cancel ", 262}, - {" Replace with: ", 263}, - {" Replace ", 264}, - {" Search ", 265}, - {" Enter search text : ", 266}, - {" Enter replace text : ", 267}, - {" Enter argument order : ", 268}, - {"Enter the order of replacement of your scanf format specifiers", 269}, - {" Whole words only ", 270}, - {" Case sensitive ", 271}, - {" Regular expression ", 272}, - {"See the regex man page for how to compose a regular expression", 273}, - {" Backwards ", 274}, - {"Warning: Searching backward can be slow", 275}, - {" Prompt on replace ", 276}, - {"Ask before making each replacement", 277}, - {" Replace all ", 278}, - {" Scanf expression ", 279}, - {"Allows entering of a C format string, see the scanf man page", 280}, - {"Begin search, Enter", 281}, - {"Abort this dialog, Esc", 282}, - {"Replace", 283}, - {"Skip", 284}, - {"Replace all", 285}, - {" Invalid regular expression, or scanf expression with to many conversions ", 286}, - {" Error in replacement format string. ", 287}, - {" %ld replacements made. ", 288}, - {" Search string not found. ", 289}, - {" Quit ", 290}, + Continue discards these changes. ", 280}, + {"Continue", 281}, + {" Load ", 282}, + {" Error trying to open file for reading ", 283}, + {" Block is large, you may not be able to undo this action. ", 284}, + {" Continue ", 285}, + {" Cancel ", 286}, + {" Replace with: ", 287}, + {" Replace ", 288}, + {" Search ", 289}, + {" Enter search text : ", 290}, + {" Enter replace text : ", 291}, + {" Enter argument order : ", 292}, + {"Enter the order of replacement of your scanf format specifiers", 293}, + {" Whole words only ", 294}, + {" Case sensitive ", 295}, + {" Regular expression ", 296}, + {"See the regex man page for how to compose a regular expression", 297}, + {" Backwards ", 298}, + {"Warning: Searching backward can be slow", 299}, + {" Prompt on replace ", 300}, + {"Ask before making each replacement", 301}, + {" Replace all ", 302}, + {" Scanf expression ", 303}, + {"Allows entering of a C format string, see the scanf man page", 304}, + {"Begin search, Enter", 305}, + {"Abort this dialog, Esc", 306}, + {"Replace", 307}, + {"Skip", 308}, + {"Replace all", 309}, + {"\ + Invalid regular expression, or scanf expression with to many conversions ", 310}, + {" Error in replacement format string. ", 311}, + {" %ld replacements made. ", 312}, + {" Search string not found. ", 313}, + {" Quit ", 314}, {"\ Current text was modified without a file save. \n\ - Save with exit? ", 291}, - {" File was modified, Save with exit? ", 292}, - {"Cancel quit", 293}, - {" &Cancel quit ", 294}, - {" &Yes ", 295}, - {" &No ", 296}, - {" Copy to clipboard ", 297}, - {" Unable to save to file. ", 298}, - {" Cut to clipboard ", 299}, - {" Goto line ", 300}, - {" Enter line: ", 301}, - {" Save Block ", 302}, - {" Insert File ", 303}, - {" Insert file ", 304}, - {" Error trying to insert file. ", 305}, - {" Sort block ", 306}, - {" You must first highlight a block of text. ", 307}, - {" Run Sort ", 308}, - {" Enter sort options (see manpage) separated by whitespace: ", 309}, - {" Sort ", 310}, - {" Error trying to execute sort command ", 311}, - {" Sort returned non-zero: ", 312}, - {" Process block ", 313}, - {" Error trying to stat file ", 314}, - {" Mail ", 315}, - {" Word wrap ", 316}, - {" Enter line length, 0 for off: ", 317}, - {"&Open/load... C-o", 318}, - {"&New C-n", 319}, - {"&Save F2", 320}, - {"save &As... F12", 321}, - {"&Insert file... F15", 322}, - {"copy to &File... C-f", 323}, - {"a&Bout... ", 324}, - {"&Quit F10", 325}, - {"&New C-x k", 326}, - {"copy to &File... ", 327}, - {"&Toggle Mark F3", 328}, - {"&Mark Columns S-F3", 329}, - {"toggle &Ins/overw Ins", 330}, - {"&Copy F5", 331}, - {"&Move F6", 332}, - {"&Delete F8", 333}, - {"&Undo C-u", 334}, - {"&Beginning C-PgUp", 335}, - {"&End C-PgDn", 336}, - {"&Search... F7", 337}, - {"search &Again F17", 338}, - {"&Replace... F4", 339}, - {"&Goto line... M-l", 340}, - {"insert &Literal... C-q", 341}, - {"&Refresh screen C-l", 342}, - {"&Start record macro C-r", 343}, - {"&Finish record macro... C-r", 344}, - {"&Execute macro... C-a, KEY", 345}, - {"delete macr&O... ", 346}, - {"insert &Date/time ", 347}, - {"format p&Aragraph M-p", 348}, - {"'ispell' s&Pell check C-p", 349}, - {"sor&T... M-t", 350}, - {"'indent' &C Formatter F19", 351}, - {"&Mail... ", 352}, - {"&Execute macro... C-x e, KEY", 353}, - {"'ispell' s&Pell check M-$", 354}, - {"&General... ", 355}, - {"&Save mode...", 356}, - {"&Layout...", 357}, - {" File ", 358}, - {" Edit ", 359}, - {" Sear/Repl ", 360}, - {" Command ", 361}, - {" Options ", 362}, - {"Open...\tC-o", 363}, - {"New\tC-n", 364}, - {"Save\tF2", 365}, - {"Save as...\tF12", 366}, - {"Insert file...\tF15", 367}, - {"Copy to file...\tC-f", 368}, - {"Disk operations", 369}, - {"Toggle mark\tF3", 370}, - {"Toggle mark columns\tC-b", 371}, - {"Toggle insert/overwrite\tIns", 372}, - {"Copy block to cursor\tF5", 373}, - {"Move block to cursor\tF6", 374}, - {"Delete block\tF8/C-Del", 375}, - {"Copy block to clipbrd\tC-Ins", 376}, - {"Cut block to clipbrd\tS-Del", 377}, - {"Paste block from clipbrd\tS-Ins", 378}, - {"Selection history\tM-Ins", 379}, - {"Undo\tC-BackSpace", 380}, - {"Manipulating blocks of text", 381}, - {" Srch/Replce ", 382}, - {"Search...\tF7", 383}, - {"Search again\tF17", 384}, - {"Replace...\tF4", 385}, - {"Replace again\tF14", 386}, - {"Search for and replace text", 387}, - {"Goto line...\tM-l", 388}, - {"Start record macro\tC-r", 389}, - {"Finish record macro...\tC-r", 390}, - {"Execute macro...\tC-a, KEY", 391}, - {"Delete macro...\t", 392}, - {"Insert date/time\tC-d", 393}, - {"Format paragraph\tM-p", 394}, - {"Refresh display\tC-l", 395}, - {"Macros and internal commands", 396}, - {"None", 397}, - {"Dynamic paragraphing", 398}, - {"Type writer wrap", 399}, - {"Wrap mode", 400}, - {"Key emulation", 401}, - {"Error initialising editor.\n", 402}, - {"Help", 403}, - {"Mark", 404}, - {"Replac", 405}, - {"Search", 406}, - {"PullDn", 407}, - {"Quit", 408}, - {"The Quick Brown Fox Jumps Over The Lazy Dog", 409}, - {"gtkedit.c: HOME environment variable not set and no passwd entry - aborting\n", 410}, - {"Open/Load", 411}, - {"Load a different/new file", 412}, - {"New", 413}, - {"Clear the edit buffer", 414}, - {"Save the current edit buffer to filename", 415}, - {"Save As", 416}, - {"Save the current edit buffer as filename", 417}, - {"Insert File", 418}, - {"Insert text from a file", 419}, - {"Copy to file", 420}, - {"copy a block to a file", 421}, - {"Exit", 422}, - {"Quit editor", 423}, - {"Copy selection to clipboard", 424}, - {"Cut", 425}, - {"Cut selection to clipboard", 426}, - {"Paste", 427}, - {"Paste clipboard", 428}, - {"Undo", 429}, - {"Go back in time one key press", 430}, - {"Find", 431}, - {"Find string/regular expression", 432}, - {"Find again", 433}, - {"Repeat most recent search", 434}, - {"Search/Replace", 435}, - {"Find and replace text/regular expressions", 436}, - {"About...", 437}, - {"Info about Mcedit", 438}, - {"File", 439}, - {" Load syntax file ", 440}, - {" File access error ", 441}, - {" Syntax error in file %s on line %d ", 442}, - {"&Cancel", 443}, - {"&Set", 444}, - {"S&kip", 445}, - {"Set &all", 446}, - {"owner", 447}, - {"group", 448}, - {"other", 449}, - {"On", 450}, - {"Flag", 451}, - {"Mode", 452}, - {"%6d of %d", 453}, - {" Chown advanced command ", 454}, + Save with exit? ", 315}, + {" File was modified, Save with exit? ", 316}, + {"Cancel quit", 317}, + {" &Cancel quit ", 318}, + {" &Yes ", 319}, + {" &No ", 320}, + {" Copy to clipboard ", 321}, + {" Unable to save to file. ", 322}, + {" Cut to clipboard ", 323}, + {" Goto line ", 324}, + {" Enter line: ", 325}, + {" Save Block ", 326}, + {" Insert File ", 327}, + {" Insert file ", 328}, + {" Error trying to insert file. ", 329}, + {" Sort block ", 330}, + {" You must first highlight a block of text. ", 331}, + {" Run Sort ", 332}, + {" Enter sort options (see manpage) separated by whitespace: ", 333}, + {" Sort ", 334}, + {" Error trying to execute sort command ", 335}, + {" Sort returned non-zero: ", 336}, + {" Process block ", 337}, + {" Error trying to stat file ", 338}, + {" Mail ", 339}, + {" Word wrap ", 340}, + {" Enter line length, 0 for off: ", 341}, + {" About ", 342}, + {"\ +\n\ + Cooledit v2.1\n\ +\n\ + Copyright (C) 1996 the Free Software Foundation\n\ +\n\ + A user friendly text editor written\n\ + for the Midnight Commander.\n", 343}, + {"&Open/load... C-o", 344}, + {"&New C-n", 345}, + {"&Save F2", 346}, + {"save &As... F12", 347}, + {"&Insert file... F15", 348}, + {"copy to &File... C-f", 349}, + {"a&Bout... ", 350}, + {"&Quit F10", 351}, + {"&New C-x k", 352}, + {"copy to &File... ", 353}, + {"&Toggle Mark F3", 354}, + {"&Mark Columns S-F3", 355}, + {"toggle &Ins/overw Ins", 356}, + {"&Copy F5", 357}, + {"&Move F6", 358}, + {"&Delete F8", 359}, + {"&Undo C-u", 360}, + {"&Beginning C-PgUp", 361}, + {"&End C-PgDn", 362}, + {"&Search... F7", 363}, + {"search &Again F17", 364}, + {"&Replace... F4", 365}, + {"&Goto line... M-l", 366}, + {"insert &Literal... C-q", 367}, + {"&Refresh screen C-l", 368}, + {"&Start record macro C-r", 369}, + {"&Finish record macro... C-r", 370}, + {"&Execute macro... C-a, KEY", 371}, + {"delete macr&O... ", 372}, + {"insert &Date/time ", 373}, + {"format p&Aragraph M-p", 374}, + {"'ispell' s&Pell check C-p", 375}, + {"sor&T... M-t", 376}, + {"'indent' &C Formatter F19", 377}, + {"&Mail... ", 378}, + {"&Execute macro... C-x e, KEY", 379}, + {"'ispell' s&Pell check M-$", 380}, + {"&General... ", 381}, + {"&Save mode...", 382}, + {"&Layout...", 383}, + {" File ", 384}, + {" Edit ", 385}, + {" Sear/Repl ", 386}, + {" Command ", 387}, + {" Options ", 388}, + {"Open...\tC-o", 389}, + {"New\tC-n", 390}, + {"Save\tF2", 391}, + {"Save as...\tF12", 392}, + {"Insert file...\tF15", 393}, + {"Copy to file...\tC-f", 394}, + {"Disk operations", 395}, + {"Toggle mark\tF3", 396}, + {"Toggle mark columns\tC-b", 397}, + {"Toggle insert/overwrite\tIns", 398}, + {"Copy block to cursor\tF5", 399}, + {"Move block to cursor\tF6", 400}, + {"Delete block\tF8/C-Del", 401}, + {"Copy block to clipbrd\tC-Ins", 402}, + {"Cut block to clipbrd\tS-Del", 403}, + {"Paste block from clipbrd\tS-Ins", 404}, + {"Selection history\tM-Ins", 405}, + {"Undo\tC-BackSpace", 406}, + {"Manipulating blocks of text", 407}, + {" Srch/Replce ", 408}, + {"Search...\tF7", 409}, + {"Search again\tF17", 410}, + {"Replace...\tF4", 411}, + {"Replace again\tF14", 412}, + {"Search for and replace text", 413}, + {"Goto line...\tM-l", 414}, + {"Start record macro\tC-r", 415}, + {"Finish record macro...\tC-r", 416}, + {"Execute macro...\tC-a, KEY", 417}, + {"Delete macro...\t", 418}, + {"Insert date/time\tC-d", 419}, + {"Format paragraph\tM-p", 420}, + {"Refresh display\tC-l", 421}, + {"Macros and internal commands", 422}, + {"None", 423}, + {"Dynamic paragraphing", 424}, + {"Type writer wrap", 425}, + {"Wrap mode", 426}, + {"Key emulation", 427}, + {"Error initialising editor.\n", 428}, + {"Help", 429}, + {"Mark", 430}, + {"Replac", 431}, + {"Search", 432}, + {"PullDn", 433}, + {"Quit", 434}, + {"&Dismiss", 435}, + {"The Quick Brown Fox Jumps Over The Lazy Dog", 436}, + {"\ +gtkedit.c: HOME environment variable not set and no passwd entry - aborting\n", 437}, + {"Open/Load", 438}, + {"Load a different/new file", 439}, + {"New", 440}, + {"Clear the edit buffer", 441}, + {"Save the current edit buffer to filename", 442}, + {"Save As", 443}, + {"Save the current edit buffer as filename", 444}, + {"Insert File", 445}, + {"Insert text from a file", 446}, + {"Copy to file", 447}, + {"copy a block to a file", 448}, + {"Exit", 449}, + {"Quit editor", 450}, + {"Copy selection to clipboard", 451}, + {"Cut", 452}, + {"Cut selection to clipboard", 453}, + {"Paste", 454}, + {"Paste clipboard", 455}, + {"Undo", 456}, + {"Go back in time one key press", 457}, + {"Find", 458}, + {"Find string/regular expression", 459}, + {"Find again", 460}, + {"Repeat most recent search", 461}, + {"Search/Replace", 462}, + {"Find and replace text/regular expressions", 463}, + {"About...", 464}, + {"Info about Mcedit", 465}, + {"File", 466}, + {" Load syntax file ", 467}, + {" File access error ", 468}, + {" Syntax error in file %s on line %d ", 469}, + {"&Cancel", 470}, + {"&Set", 471}, + {"S&kip", 472}, + {"Set &all", 473}, + {"owner", 474}, + {"group", 475}, + {"other", 476}, + {"On", 477}, + {"Flag", 478}, + {"Mode", 479}, + {"%6d of %d", 480}, + {" Chown advanced command ", 481}, {"\ Couldn't chmod \"%s\" \n\ - %s ", 455}, + %s ", 482}, {"\ Couldn't chown \"%s\" \n\ - %s ", 456}, - {" Oops... ", 457}, - {" I can't run the Advanced Chown command on an extfs ", 458}, - {" I can't run the Advanced Chown command on a tarfs ", 459}, - {"Background process:", 460}, - {" Background process error ", 461}, - {" Child died unexpectedly ", 462}, - {" Unknown error in child ", 463}, - {" Background protocol error ", 464}, + %s ", 483}, + {" Oops... ", 484}, + {" I can't run the Advanced Chown command on an extfs ", 485}, + {" I can't run the Advanced Chown command on a tarfs ", 486}, + {"Background process:", 487}, + {" Background process error ", 488}, + {" Child died unexpectedly ", 489}, + {" Unknown error in child ", 490}, + {" Background protocol error ", 491}, {"\ Background process sent us a request for more arguments \n\ - than we can handle. \n", 465}, - {" Listing mode ", 466}, - {"&Full file list", 467}, - {"&Brief file list", 468}, - {"&Long file list", 469}, - {"&User defined:", 470}, - {"&Icon view", 471}, - {"user &Mini status", 472}, - {"Listing mode", 473}, - {"&Reverse", 474}, - {"case sensi&tive", 475}, - {"Sort order", 476}, - {" confirm &Exit ", 477}, - {" confirm e&Xecute ", 478}, - {" confirm o&Verwrite ", 479}, - {" confirm &Delete ", 480}, - {" Confirmation ", 481}, - {"Full 8 bits output", 482}, - {"ISO 8859-1", 483}, - {"7 bits", 484}, - {"F&ull 8 bits input", 485}, - {" Display bits ", 486}, - {"&Always use ftp proxy", 487}, - {"sec", 488}, - {"ftpfs directory cache timeout:", 489}, - {"ftp anonymous password:", 490}, - {"Timeout for freeing VFSs:", 491}, - {" Virtual File System Setting ", 492}, - {"Quick cd", 493}, - {"cd", 494}, - {"Symbolic link filename:", 495}, - {"Existing filename (filename symlink will point to):", 496}, - {"Running ", 497}, - {"Stopped", 498}, - {"&Stop", 499}, - {"&Resume", 500}, - {"&Kill", 501}, - {"Background Jobs", 502}, - {"execute/search by others", 503}, - {"write by others", 504}, - {"read by others", 505}, - {"execute/search by group", 506}, - {"write by group", 507}, - {"read by group", 508}, - {"execute/search by owner", 509}, - {"write by owner", 510}, - {"read by owner", 511}, - {"sticky bit", 512}, - {"set group ID on execution", 513}, - {"set user ID on execution", 514}, - {"C&lear marked", 515}, - {"S&et marked", 516}, - {"&Marked all", 517}, - {"Permissions (Octal)", 518}, - {"Owner name", 519}, - {"Group name", 520}, - {" Chmod command ", 521}, - {" Permission ", 522}, - {"Use SPACE to change", 523}, - {"an option, ARROW KEYS", 524}, - {"to move between options", 525}, - {"and T or INS to mark", 526}, - {"Chmod command", 527}, - {" I can't run the Chmod command on an extfs ", 528}, - {"Set &users", 529}, - {"Set &groups", 530}, - {" Name ", 531}, - {" Owner name ", 532}, - {" Group name ", 533}, - {" Size ", 534}, - {" Chown command ", 535}, - {" User name ", 536}, - {"", 537}, - {"", 538}, - {" I can't run the Chown command on an extfs ", 539}, - {" I can't run the Chown command on a tarfs ", 540}, - {" Can not fetch a local copy of %s ", 541}, - {" CD ", 542}, - {"Files tagged, want to cd?", 543}, - {"Could not change directory", 544}, - {" View file ", 545}, - {" Filename:", 546}, - {" Filtered view ", 547}, - {" Filter command and arguments:", 548}, - {"Create a new Directory", 549}, - {" Enter directory name:", 550}, - {" Filter ", 551}, - {" Set expression for filtering filenames", 552}, - {" Select ", 553}, - {" Malformed regular expression ", 554}, - {" Unselect ", 555}, - {"Extension file edit", 556}, - {" Which extension file you want to edit? ", 557}, - {"&User", 558}, - {"&System Wide", 559}, - {"Menu file edit", 560}, - {" Which menu file will you edit? ", 561}, - {"&Local", 562}, - {"&Home", 563}, - {" Compare directories ", 564}, - {" Select compare method: ", 565}, - {"&Quick", 566}, - {"&Size only", 567}, - {"&Thorough", 568}, - {" Both panels should be on the listing view mode to use this command ", 569}, - {" The command history is empty ", 570}, - {" Command history ", 571}, + than we can handle. \n", 492}, + {" Listing mode ", 493}, + {"&Full file list", 494}, + {"&Brief file list", 495}, + {"&Long file list", 496}, + {"&User defined:", 497}, + {"&Icon view", 498}, + {"user &Mini status", 499}, + {"Listing mode", 500}, + {"&Reverse", 501}, + {"case sensi&tive", 502}, + {"Sort order", 503}, + {" confirm &Exit ", 504}, + {" confirm e&Xecute ", 505}, + {" confirm o&Verwrite ", 506}, + {" confirm &Delete ", 507}, + {" Confirmation ", 508}, + {"Full 8 bits output", 509}, + {"ISO 8859-1", 510}, + {"7 bits", 511}, + {"F&ull 8 bits input", 512}, + {" Display bits ", 513}, + {"&Always use ftp proxy", 514}, + {"sec", 515}, + {"ftpfs directory cache timeout:", 516}, + {"ftp anonymous password:", 517}, + {"Timeout for freeing VFSs:", 518}, + {" Virtual File System Setting ", 519}, + {"Quick cd", 520}, + {"cd", 521}, + {"Symbolic link", 522}, + {"Symbolic link filename:", 523}, + {"Existing filename (filename symlink will point to):", 524}, + {"Running ", 525}, + {"Stopped", 526}, + {"&Stop", 527}, + {"&Resume", 528}, + {"&Kill", 529}, + {"Background Jobs", 530}, + {"execute/search by others", 531}, + {"write by others", 532}, + {"read by others", 533}, + {"execute/search by group", 534}, + {"write by group", 535}, + {"read by group", 536}, + {"execute/search by owner", 537}, + {"write by owner", 538}, + {"read by owner", 539}, + {"sticky bit", 540}, + {"set group ID on execution", 541}, + {"set user ID on execution", 542}, + {"C&lear marked", 543}, + {"S&et marked", 544}, + {"&Marked all", 545}, + {"Permissions (Octal)", 546}, + {"Owner name", 547}, + {"Group name", 548}, + {" Chmod command ", 549}, + {" Permission ", 550}, + {"Use SPACE to change", 551}, + {"an option, ARROW KEYS", 552}, + {"to move between options", 553}, + {"and T or INS to mark", 554}, + {"Chmod command", 555}, + {" I can't run the Chmod command on an extfs ", 556}, + {"Set &users", 557}, + {"Set &groups", 558}, + {" Name ", 559}, + {" Owner name ", 560}, + {" Group name ", 561}, + {" Size ", 562}, + {" Chown command ", 563}, + {" User name ", 564}, + {"", 565}, + {"", 566}, + {" I can't run the Chown command on an extfs ", 567}, + {" I can't run the Chown command on a tarfs ", 568}, + {" Can not fetch a local copy of %s ", 569}, + {" CD ", 570}, + {"Files tagged, want to cd?", 571}, + {"Could not change directory", 572}, + {" View file ", 573}, + {" Filename:", 574}, + {" Filtered view ", 575}, + {" Filter command and arguments:", 576}, + {"Create a new Directory", 577}, + {" Enter directory name:", 578}, + {" Filter ", 579}, + {" Set expression for filtering filenames", 580}, + {" Select ", 581}, + {" Malformed regular expression ", 582}, + {" Unselect ", 583}, + {"Extension file edit", 584}, + {" Which extension file you want to edit? ", 585}, + {"&User", 586}, + {"&System Wide", 587}, + {"Menu file edit", 588}, + {" Which menu file will you edit? ", 589}, + {"&Local", 590}, + {"&Home", 591}, + {" Compare directories ", 592}, + {" Select compare method: ", 593}, + {"&Quick", 594}, + {"&Size only", 595}, + {"&Thorough", 596}, + {" Both panels should be on the listing view mode to use this command ", 597}, + {" The command history is empty ", 598}, + {" Command history ", 599}, {"\ Not an xterm or Linux console; \n\ - the panels cannot be toggled. ", 572}, + the panels cannot be toggled. ", 600}, {"\ Type `exit' to return to the Midnight Commander\n\ \r\n\ -\r", 573}, +\r", 601}, {"\ Couldn't stat %s \n\ - %s ", 574}, - {" Link ", 575}, - {" to:", 576}, - {" link: %s ", 577}, - {" symlink: %s ", 578}, - {" Symlink ", 579}, - {" points to:", 580}, - {" Edit symlink ", 581}, - {" edit symlink: %s ", 582}, - {" Link symbolically ", 583}, - {" Relative symlink ", 584}, - {" relative symlink: %s ", 585}, - {" Enter machine name (F1 for details): ", 586}, - {" Could not chdir to %s ", 587}, - {" Link to a remote machine ", 588}, - {" FTP to machine ", 589}, - {" Socket source routing setup ", 590}, - {" Enter host name to use as a source routing hop: ", 591}, - {" Host name ", 592}, - {" Error while looking up IP address ", 593}, - {" Undelete files on an ext2 file system ", 594}, + %s ", 602}, + {" Link ", 603}, + {" to:", 604}, + {" link: %s ", 605}, + {" symlink: %s ", 606}, + {" Symlink ", 607}, + {" points to:", 608}, + {" Edit symlink ", 609}, + {" edit symlink: %s ", 610}, + {" Link symbolically ", 611}, + {" Relative symlink ", 612}, + {" relative symlink: %s ", 613}, + {" Enter machine name (F1 for details): ", 614}, + {" Could not chdir to %s ", 615}, + {" Link to a remote machine ", 616}, + {" FTP to machine ", 617}, + {" Socket source routing setup ", 618}, + {" Enter host name to use as a source routing hop: ", 619}, + {" Host name ", 620}, + {" Error while looking up IP address ", 621}, + {" Undelete files on an ext2 file system ", 622}, {"\ Enter device (without /dev/) to undelete\n\ - files on: (F1 for details)", 595}, - {" Setup saved to ~/", 596}, - {" Setup ", 597}, + files on: (F1 for details)", 623}, + {" Setup saved to ~/", 624}, + {" Setup ", 625}, {"\ Can't chdir to '%s' \n\ - %s ", 598}, - {" You can not execute commands on non-local filesystems", 599}, + %s ", 626}, + {" You can not execute commands on non-local filesystems", 627}, {"\ \n\ \n\ \n\ refresh stack underflow!\n\ \n\ -\n", 600}, - {"&Unsorted", 601}, - {"&Name", 602}, - {"&Extension", 603}, - {"&Modify time", 604}, - {"&Access time", 605}, - {"&Change time", 606}, - {"&Size", 607}, - {"&Inode", 608}, - {"&Type", 609}, - {"&Links", 610}, - {"N&GID", 611}, - {"N&UID", 612}, - {"&Owner", 613}, - {"&Group", 614}, - {"File exists but can not be stat-ed: %s %s", 615}, - {"Unknown", 616}, +\n", 628}, + {"&Unsorted", 629}, + {"&Name", 630}, + {"&Extension", 631}, + {"&Modify time", 632}, + {"&Access time", 633}, + {"&Change time", 634}, + {"&Size", 635}, + {"&Inode", 636}, + {"&Type", 637}, + {"&Links", 638}, + {"N&GID", 639}, + {"N&UID", 640}, + {"&Owner", 641}, + {"&Group", 642}, + {"File exists but can not be stat-ed: %s %s", 643}, + {"Unknown", 644}, {"\ Can't create temporary command file \n\ - %s ", 617}, - {" Parameter ", 618}, - {" Can't execute commands on a Virtual File System directory ", 619}, - {" file error", 620}, - {"Format of the ", 621}, - {" file error ", 622}, - {"Format of the ~/", 623}, + %s ", 645}, + {" Parameter ", 646}, + {" Can't execute commands on a Virtual File System directory ", 647}, + {" file error", 648}, + {"Format of the ", 649}, + {" file error ", 650}, + {"Format of the ~/", 651}, {"\ file has changed\n\ with version 3.0. You may want either to\n\ -copy it from ", 624}, +copy it from ", 652}, {"\ mc.ext or use that\n\ -file as an example of how to write it.\n", 625}, - {"mc.ext will be used for this moment.", 626}, - {" Copy ", 627}, - {" Move ", 628}, - {" Delete ", 629}, - {" Invalid target mask ", 630}, - {" Could not make the hardlink ", 631}, +file as an example of how to write it.\n", 653}, + {"mc.ext will be used for this moment.", 654}, + {" Copy ", 655}, + {" Move ", 656}, + {" Delete ", 657}, + {" Invalid target mask ", 658}, + {" Could not make the hardlink ", 659}, {"\ Cannot read source link \"%s\" \n\ - %s ", 632}, + %s ", 660}, {"\ Cannot make stable symlinks across non-local filesystems: \n\ \n\ - Option Stable Symlinks will be disabled ", 633}, + Option Stable Symlinks will be disabled ", 661}, {"\ Cannot create target symlink \"%s\" \n\ - %s ", 634}, + %s ", 662}, {"\ Cannot overwrite directory \"%s\" \n\ - %s ", 635}, + %s ", 663}, {"\ Cannot stat source file \"%s\" \n\ - %s ", 636}, - {" `%s' and `%s' are the same file. ", 637}, + %s ", 664}, + {" `%s' and `%s' are the same file. ", 665}, {"\ Cannot create special file \"%s\" \n\ - %s ", 638}, + %s ", 666}, {"\ Cannot chown target file \"%s\" \n\ - %s ", 639}, + %s ", 667}, {"\ Cannot chmod target file \"%s\" \n\ - %s ", 640}, + %s ", 668}, {"\ Cannot open source file \"%s\" \n\ - %s ", 641}, - {" Reget failed, about to overwrite file ", 642}, + %s ", 669}, + {" Reget failed, about to overwrite file ", 670}, {"\ Cannot fstat source file \"%s\" \n\ - %s ", 643}, + %s ", 671}, {"\ Cannot create target file \"%s\" \n\ - %s ", 644}, + %s ", 672}, {"\ Cannot fstat target file \"%s\" \n\ - %s ", 645}, + %s ", 673}, {"\ Cannot read source file \"%s\" \n\ - %s ", 646}, + %s ", 674}, {"\ Cannot write target file \"%s\" \n\ - %s ", 647}, - {"(stalled)", 648}, + %s ", 675}, + {"(stalled)", 676}, {"\ Cannot close source file \"%s\" \n\ - %s ", 649}, + %s ", 677}, {"\ Cannot close target file \"%s\" \n\ - %s ", 650}, - {"Incomplete file was retrieved. Keep it?", 651}, - {"&Delete", 652}, - {"&Keep", 653}, + %s ", 678}, + {"Incomplete file was retrieved. Keep it?", 679}, + {"&Delete", 680}, + {"&Keep", 681}, {"\ Cannot stat source directory \"%s\" \n\ - %s ", 654}, + %s ", 682}, {"\ Source directory \"%s\" is not a directory \n\ - %s ", 655}, + %s ", 683}, {"\ Cannot copy cyclic symbolic link \n\ - `%s' ", 656}, + `%s' ", 684}, {"\ Cannot create target directory \"%s\" \n\ - %s ", 657}, + %s ", 685}, {"\ Cannot chown target directory \"%s\" \n\ - %s ", 658}, + %s ", 686}, {"\ Cannot stat file \"%s\" \n\ - %s ", 659}, - {" `%s' and `%s' are the same file ", 660}, - {" Cannot overwrite directory `%s' ", 661}, + %s ", 687}, + {" `%s' and `%s' are the same file ", 688}, + {" Cannot overwrite directory `%s' ", 689}, {"\ Cannot move file \"%s\" to \"%s\" \n\ - %s ", 662}, + %s ", 690}, {"\ Cannot remove file \"%s\" \n\ - %s ", 663}, - {" Cannot overwrite directory \"%s\" %s ", 664}, - {" Cannot overwrite file \"%s\" %s ", 665}, + %s ", 691}, + {" Cannot overwrite directory \"%s\" %s ", 692}, + {" Cannot overwrite file \"%s\" %s ", 693}, {"\ Cannot move directory \"%s\" to \"%s\" \n\ - %s ", 666}, + %s ", 694}, {"\ Cannot delete file \"%s\" \n\ - %s ", 667}, + %s ", 695}, {"\ Cannot remove directory \"%s\" \n\ - %s ", 668}, - {" Internal error: get_file \n", 669}, - {"1Copy", 670}, - {"1Move", 671}, - {"1Delete", 672}, - {"%o %f \"%s\"%m", 673}, - {"%o %d %f%m", 674}, - {"%o %f \"%s\"%e", 675}, - {"%o %d %f%e", 676}, - {"file", 677}, - {"files", 678}, - {"directory", 679}, - {"directories", 680}, - {"files/directories", 681}, - {" with source mask:", 682}, - {" Can't operate on \"..\"! ", 683}, - {"Yes", 684}, - {"No", 685}, - {" Sorry, I could not put the job in background ", 686}, - {" Internal failure ", 687}, - {" Unknown file operation ", 688}, + %s ", 696}, + {" Internal error: get_file \n", 697}, + {"1Copy", 698}, + {"1Move", 699}, + {"1Delete", 700}, + {"%o %f \"%s\"%m", 701}, + {"%o %d %f%m", 702}, + {"%o %f \"%s\"%e", 703}, + {"%o %d %f%e", 704}, + {"file", 705}, + {"files", 706}, + {"directory", 707}, + {"directories", 708}, + {"files/directories", 709}, + {" with source mask:", 710}, + {" Can't operate on \"..\"! ", 711}, + {"Yes", 712}, + {"No", 713}, + {" Sorry, I could not put the job in background ", 714}, + {" Internal failure ", 715}, + {" Unknown file operation ", 716}, {"\ Destination \"%s\" must be a directory \n\ - %s ", 689}, - {"&Skip", 690}, - {"&Retry", 691}, - {"&Abort", 692}, + %s ", 717}, + {"&Skip", 718}, + {"&Retry", 719}, + {"&Abort", 720}, {"\ \n\ Directory not empty. \n\ - Delete it recursively? ", 693}, + Delete it recursively? ", 721}, {"\ \n\ Background process: Directory not empty \n\ - Delete it recursively? ", 694}, - {" Delete: ", 695}, - {"a&ll", 696}, - {"non&E", 697}, - {" Type 'yes' if you REALLY want to delete ", 698}, - {"all the directories ", 699}, - {" Recursive Delete ", 700}, - {" Background process: Recursive Delete ", 701}, - {"Count", 702}, - {"Bytes", 703}, - {"Source", 704}, - {"Target", 705}, - {"Deleting", 706}, - {"Target file \"%s\" already exists!", 707}, - {"if &Size differs", 708}, - {"&Update", 709}, - {"al&L", 710}, - {"Overwrite all targets?", 711}, - {"&Reget", 712}, - {"ap&Pend", 713}, - {"Overwrite this target?", 714}, - {"Target date: %s, size %d", 715}, - {"Source date: %s, size %d", 716}, - {" File exists ", 717}, - {" Background process: File exists ", 718}, - {"preserve &Attributes", 719}, - {"follow &Links", 720}, - {"to:", 721}, - {"&Using shell patterns", 722}, - {"&Background", 723}, - {"&Stable Symlinks", 724}, - {"&Dive into subdir if exists", 725}, + Delete it recursively? ", 722}, + {" Delete: ", 723}, + {"a&ll", 724}, + {"non&E", 725}, + {" Type 'yes' if you REALLY want to delete ", 726}, + {"all the directories ", 727}, + {" Recursive Delete ", 728}, + {" Background process: Recursive Delete ", 729}, + {"Count", 730}, + {"Bytes", 731}, + {"Source", 732}, + {"Target", 733}, + {"Deleting", 734}, + {"Target file \"%s\" already exists!", 735}, + {"if &Size differs", 736}, + {"&Update", 737}, + {"al&L", 738}, + {"Overwrite all targets?", 739}, + {"&Reget", 740}, + {"ap&Pend", 741}, + {"Overwrite this target?", 742}, + {"Target date: %s, size %d", 743}, + {"Source date: %s, size %d", 744}, + {" File exists ", 745}, + {" Background process: File exists ", 746}, + {"preserve &Attributes", 747}, + {"follow &Links", 748}, + {"to:", 749}, + {"&Using shell patterns", 750}, + {"&Background", 751}, + {"&Stable Symlinks", 752}, + {"&Dive into subdir if exists", 753}, {"\ Invalid source pattern `%s' \n\ - %s ", 726}, - {"&Suspend", 727}, - {"Con&tinue", 728}, - {"&Chdir", 729}, - {"&Again", 730}, - {"&Quit", 731}, - {"Pane&lize", 732}, - {"&View - F3", 733}, - {"&Edit - F4", 734}, - {"Start at:", 735}, - {"Filename:", 736}, - {"Content: ", 737}, - {"&Tree", 738}, - {"Find File", 739}, - {"Grepping in %s", 740}, - {" Find/read ", 741}, - {" Problem reading from child ", 742}, - {"Finished", 743}, - {"Searching %s", 744}, - {"Searching", 745}, - {"Find file", 746}, - {"Usage: fixhlp \n", 747}, - {"fixhlp: Cannot open toc for writing", 748}, + %s ", 754}, + {"&Suspend", 755}, + {"Con&tinue", 756}, + {"&Chdir", 757}, + {"&Again", 758}, + {"&Quit", 759}, + {"Pane&lize", 760}, + {"&View - F3", 761}, + {"&Edit - F4", 762}, + {"Start at:", 763}, + {"Filename:", 764}, + {"Content: ", 765}, + {"&Tree", 766}, + {"Find File", 767}, + {"Grepping in %s", 768}, + {" Find/read ", 769}, + {" Problem reading from child ", 770}, + {"Finished", 771}, + {"Searching %s", 772}, + {"Searching", 773}, + {"Find file", 774}, + {"Usage: fixhlp \n", 775}, + {"fixhlp: Cannot open toc for writing", 776}, {"\ -\004[Contents]\n\ +[Contents]\n\ Topics:\n\ -\n", 749}, +\n", 777}, {"\ Help file format error\n\ -\004", 750}, - {" Internal bug: Double start of link area ", 751}, - {" Can't find node [Contents] in help file ", 752}, - {" Help ", 753}, +", 778}, + {" Internal bug: Double start of link area ", 779}, + {" Can't find node [Contents] in help file ", 780}, + {" Help ", 781}, {"\ Can't open file %s \n\ - %s ", 754}, - {" Can't find node %s in help file ", 755}, - {"Index", 756}, - {"Prev", 757}, - {"&Move", 758}, - {"&Remove", 759}, - {"&Append", 760}, - {"&Insert", 761}, - {"New &Entry", 762}, - {"New &Group", 763}, - {"&Up", 764}, - {"&Add current", 765}, - {"Change &To", 766}, - {"Subgroup - press ENTER to see list", 767}, - {"Active VFS directories", 768}, - {"Directory hotlist", 769}, - {" Directory path ", 770}, - {" Directory label ", 771}, - {"Moving ", 772}, - {"New hotlist entry", 773}, - {"Directory label", 774}, - {"Directory path", 775}, - {" New hotlist group ", 776}, - {"Name of new group", 777}, - {"Label for \"%s\":", 778}, - {" Add to hotlist ", 779}, - {" Remove: ", 780}, + %s ", 782}, + {" Can't find node %s in help file ", 783}, + {"Index", 784}, + {"Prev", 785}, + {"&Move", 786}, + {"&Remove", 787}, + {"&Append", 788}, + {"&Insert", 789}, + {"New &Entry", 790}, + {"New &Group", 791}, + {"&Up", 792}, + {"&Add current", 793}, + {"Change &To", 794}, + {"Subgroup - press ENTER to see list", 795}, + {"Active VFS directories", 796}, + {"Directory hotlist", 797}, + {" Directory path ", 798}, + {" Directory label ", 799}, + {"Moving ", 800}, + {"New hotlist entry", 801}, + {"Directory label", 802}, + {"Directory path", 803}, + {" New hotlist group ", 804}, + {"Name of new group", 805}, + {"Label for \"%s\":", 806}, + {" Add to hotlist ", 807}, + {" Remove: ", 808}, {"\ \n\ Group not empty.\n\ - Remove it?", 781}, - {" Top level group ", 782}, - {"Hotlist is now kept in file ~/", 783}, - {"MC will load hotlist from ~/", 784}, - {"and then delete [Hotlist] section there", 785}, - {" Hotlist Load ", 786}, - {"MC was unable to write ~/", 787}, - {" file, your old hotlist entries were not deleted", 788}, - {"You have ~/", 789}, - {" file and [Hotlist] section in ~/", 790}, - {"Your ~/", 791}, - {" most probably was created\n", 792}, + Remove it?", 809}, + {" Top level group ", 810}, + {"Hotlist is now kept in file ~/", 811}, + {"MC will load hotlist from ~/", 812}, + {"and then delete [Hotlist] section there", 813}, + {" Hotlist Load ", 814}, + {"MC was unable to write ~/", 815}, + {" file, your old hotlist entries were not deleted", 816}, + {"You have ~/", 817}, + {" file and [Hotlist] section in ~/", 818}, + {"Your ~/", 819}, + {" most probably was created\n", 820}, {"\ by an earlier development version of MC\n\ -and is more actual than ~/", 793}, +and is more actual than ~/", 821}, {"\ entries\n\ -\n", 794}, +\n", 822}, {"\ You can choose between\n\ \n\ - Remove - remove old hotlist entries from ~/", 795}, + Remove - remove old hotlist entries from ~/", 823}, {"\ Keep - keep your old entries; you will be asked\n\ the same question next time\n\ - Merge - add old entries to hotlist as group \"Entries from ~/", 796}, - {"&Merge", 797}, - {" Entries from ~/", 798}, - {" file your old hotlist entries were not deleted", 799}, - {"Midnight Commander %s", 800}, - {"Free nodes %d (%d%%) of %d", 801}, - {"No node information", 802}, - {"Free space ", 803}, - {" (%d%%) of ", 804}, - {"No space information", 805}, - {"Type: %s ", 806}, - {"non-local vfs", 807}, - {"Device: %s", 808}, - {"Filesystem: %s", 809}, - {"Accessed: %s", 810}, - {"Modified: %s", 811}, - {"Created: %s", 812}, - {"Size: ", 813}, - {" (%d blocks)", 814}, - {"Owner: %s/%s", 815}, - {"Links: %d", 816}, - {"Mode: %s (%04o)", 817}, - {"Location: %Xh:%Xh", 818}, - {"File: %s", 819}, - {"File: None", 820}, - {"&Vertical", 821}, - {"&Horizontal", 822}, - {"&Xterm hintbar", 823}, - {"h&Intbar visible", 824}, - {"&Keybar visible", 825}, - {"command &Prompt", 826}, - {"show &Mini status", 827}, - {"menu&Bar visible", 828}, - {"&Equal split", 829}, - {"pe&Rmissions", 830}, - {"&File types", 831}, - {"&Save", 832}, - {" Layout ", 833}, - {" Panel split ", 834}, - {" Highlight... ", 835}, - {" Other options ", 836}, - {"output lines", 837}, - {"Layout", 838}, - {" Learn keys ", 839}, - {" Teach me a key ", 840}, + Merge - add old entries to hotlist as group \"Entries from ~/", 824}, + {"&Merge", 825}, + {" Entries from ~/", 826}, + {" file your old hotlist entries were not deleted", 827}, + {"Midnight Commander %s", 828}, + {"Free nodes %d (%d%%) of %d", 829}, + {"No node information", 830}, + {"Free space ", 831}, + {" (%d%%) of ", 832}, + {"No space information", 833}, + {"Type: %s ", 834}, + {"non-local vfs", 835}, + {"Device: %s", 836}, + {"Filesystem: %s", 837}, + {"Accessed: %s", 838}, + {"Modified: %s", 839}, + {"Created: %s", 840}, + {"Size: ", 841}, + {" (%d blocks)", 842}, + {"Owner: %s/%s", 843}, + {"Links: %d", 844}, + {"Mode: %s (%04o)", 845}, + {"Location: %Xh:%Xh", 846}, + {"File: %s", 847}, + {"File: None", 848}, + {"&Vertical", 849}, + {"&Horizontal", 850}, + {"&Xterm hintbar", 851}, + {"h&Intbar visible", 852}, + {"&Keybar visible", 853}, + {"command &Prompt", 854}, + {"show &Mini status", 855}, + {"menu&Bar visible", 856}, + {"&Equal split", 857}, + {"pe&Rmissions", 858}, + {"&File types", 859}, + {"&Save", 860}, + {" Layout ", 861}, + {" Panel split ", 862}, + {" Highlight... ", 863}, + {" Other options ", 864}, + {"output lines", 865}, + {"Layout", 866}, + {" Learn keys ", 867}, + {" Teach me a key ", 868}, {"\ Please press the %s\n\ and then wait until this message disappears.\n\ @@ -982,325 +1023,329 @@ next to its button.\n\ \n\ If you want to escape, press a single Escape key\n\ -and wait as well.", 841}, - {" Cannot accept this key ", 842}, - {" You have entered \"%s\"", 843}, - {"OK", 844}, +and wait as well.", 869}, + {" Cannot accept this key ", 870}, + {" You have entered \"%s\"", 871}, + {"OK", 872}, {"\ It seems that all your keys already\n\ -work fine. That's great.", 845}, - {"&Discard", 846}, +work fine. That's great.", 873}, + {"&Discard", 874}, {"\ Great! You have a complete terminal database!\n\ -All your keys work well.", 847}, - {"Learn keys", 848}, - {"Press all the keys mentioned here. After you have done it, check", 849}, - {"which keys are not marked with OK. Press space on the missing", 850}, - {"key, or click with the mouse to define it. Move around with Tab.", 851}, +All your keys work well.", 875}, + {"Learn keys", 876}, + {"Press all the keys mentioned here. After you have done it, check", 877}, + {"which keys are not marked with OK. Press space on the missing", 878}, + {"key, or click with the mouse to define it. Move around with Tab.", 879}, {"\ The Commander can't change to the directory that \n\ the subshell claims you are in. Perhaps you have \n\ deleted your working directory, or given yourself \n\ - extra access permissions with the \"su\" command? ", 852}, - {"Press any key to continue...", 853}, - {" The shell is already running a command ", 854}, - {"&Listing mode...", 855}, - {"&Quick view C-x q", 856}, - {"&Info C-x i", 857}, - {"&Sort order...", 858}, - {"&Filter...", 859}, - {"&Network link...", 860}, - {"FT&P link...", 861}, - {"&Drive... M-d", 862}, - {"&Rescan C-r", 863}, - {"&User menu F2", 864}, - {"&View F3", 865}, - {"Vie&w file... ", 866}, - {"&Filtered view M-!", 867}, - {"&Edit F4", 868}, - {"&Copy F5", 869}, - {"c&Hmod C-x c", 870}, - {"&Link C-x l", 871}, - {"&SymLink C-x s", 872}, - {"edit s&Ymlink C-x C-s", 873}, - {"ch&Own C-x o", 874}, - {"&Advanced chown ", 875}, - {"&Rename/Move F6", 876}, - {"&Mkdir F7", 877}, - {"&Delete F8", 878}, - {"&Quick cd M-c", 879}, - {"select &Group M-+", 880}, - {"u&Nselect group M-\\", 881}, - {"reverse selec&Tion M-*", 882}, - {"e&Xit F10", 883}, - {"&Directory tree", 884}, - {"&Find file M-?", 885}, - {"s&Wap panels C-u", 886}, - {"switch &Panels on/off C-o", 887}, - {"&Compare directories C-x d", 888}, - {"e&Xternal panelize C-x !", 889}, - {"show directory s&Izes", 890}, - {"command &History", 891}, - {"di&Rectory hotlist C-\\", 892}, - {"&Active VFS list C-x a", 893}, - {"&Background jobs C-x j", 894}, - {"&Undelete files (ext2fs only)", 895}, - {"&Listing format edit", 896}, - {"&Extension file edit", 897}, - {"&Menu file edit", 898}, - {"&Configuration...", 899}, - {"c&Onfirmation...", 900}, - {"&Display bits...", 901}, - {"learn &Keys...", 902}, - {"&Virtual FS...", 903}, - {"&Save setup", 904}, - {" &Left ", 905}, - {" &Above ", 906}, - {" &File ", 907}, - {" &Command ", 908}, - {" &Options ", 909}, - {" &Right ", 910}, - {" &Below ", 911}, - {" Information ", 912}, + extra access permissions with the \"su\" command? ", 880}, + {"Press any key to continue...", 881}, + {" The shell is already running a command ", 882}, + {"&Listing mode...", 883}, + {"&Quick view C-x q", 884}, + {"&Info C-x i", 885}, + {"&Sort order...", 886}, + {"&Filter...", 887}, + {"&Network link...", 888}, + {"FT&P link...", 889}, + {"&Drive... M-d", 890}, + {"&Rescan C-r", 891}, + {"&User menu F2", 892}, + {"&View F3", 893}, + {"Vie&w file... ", 894}, + {"&Filtered view M-!", 895}, + {"&Edit F4", 896}, + {"&Copy F5", 897}, + {"c&Hmod C-x c", 898}, + {"&Link C-x l", 899}, + {"&SymLink C-x s", 900}, + {"edit s&Ymlink C-x C-s", 901}, + {"ch&Own C-x o", 902}, + {"&Advanced chown ", 903}, + {"&Rename/Move F6", 904}, + {"&Mkdir F7", 905}, + {"&Delete F8", 906}, + {"&Quick cd M-c", 907}, + {"select &Group M-+", 908}, + {"u&Nselect group M-\\", 909}, + {"reverse selec&Tion M-*", 910}, + {"e&Xit F10", 911}, + {"&Directory tree", 912}, + {"&Find file M-?", 913}, + {"s&Wap panels C-u", 914}, + {"switch &Panels on/off C-o", 915}, + {"&Compare directories C-x d", 916}, + {"e&Xternal panelize C-x !", 917}, + {"show directory s&Izes", 918}, + {"command &History", 919}, + {"di&Rectory hotlist C-\\", 920}, + {"&Active VFS list C-x a", 921}, + {"&Background jobs C-x j", 922}, + {"&Undelete files (ext2fs only)", 923}, + {"&Listing format edit", 924}, + {"&Extension file edit", 925}, + {"&Menu file edit", 926}, + {"&Configuration...", 927}, + {"c&Onfirmation...", 928}, + {"&Display bits...", 929}, + {"learn &Keys...", 930}, + {"&Virtual FS...", 931}, + {"&Save setup", 932}, + {" &Left ", 933}, + {" &Above ", 934}, + {" &File ", 935}, + {" &Command ", 936}, + {" &Options ", 937}, + {" &Right ", 938}, + {" &Below ", 939}, + {" Information ", 940}, {"\ Using the fast reload option may not reflect the exact \n\ directory contents. In this cases you'll need to do a \n\ manual reload of the directory. See the man page for \n\ - the details. ", 913}, - {"Menu", 914}, - {"Thank you for using GNU Midnight Commander", 915}, - {"with mouse support on xterm%s.\n", 916}, - {" and the Linux console", 917}, - {"The TERM environment variable is unset!\n", 918}, - {"Library directory for the Midnight Commander: %s\n", 919}, - {"Option -m is obsolete. Please look at Display Bits... in the Option's menu\n", 920}, - {"Geometry for the window", 921}, - {"GEOMETRY", 922}, - {"No windows opened at startup", 923}, + the details. ", 941}, + {"Menu", 942}, + {"Thank you for using GNU Midnight Commander", 943}, + {"with mouse support on xterm%s.\n", 944}, + {" and the Linux console", 945}, + {"The TERM environment variable is unset!\n", 946}, + {"Library directory for the Midnight Commander: %s\n", 947}, + {"\ +Option -m is obsolete. Please look at Display Bits... in the Option's menu\n", 948}, + {"Geometry for the window", 949}, + {"GEOMETRY", 950}, + {"No windows opened at startup", 951}, + {"Force activation even if a server is already running", 952}, {"\ Couldn't open tty line. You have to run mc without the -P flag.\n\ -On some systems you may want to run # `which mc`\n", 924}, - {" Notice ", 925}, +On some systems you may want to run # `which mc`\n", 953}, + {" Notice ", 954}, {"\ The Midnight Commander configuration files \n\ are now stored in the ~/.mc directory, the \n\ - files have been moved now\n", 926}, - {"safe de&Lete", 927}, - {"cd follows lin&Ks", 928}, - {"advanced cho&Wn", 929}, - {"l&Ynx-like motion", 930}, - {"Animation", 931}, - {"rotatin&G dash", 932}, - {"co&Mplete: show all", 933}, - {"&Use internal view", 934}, - {"use internal ed&It", 935}, - {"auto m&Enus", 936}, - {"&Auto save setup", 937}, - {"shell &Patterns", 938}, - {"Compute &Totals", 939}, - {"&Verbose operation", 940}, - {"&Fast dir reload", 941}, - {"mi&X all files", 942}, - {"&Drop down menus", 943}, - {"ma&Rk moves down", 944}, - {"show &Hidden files", 945}, - {"show &Backup files", 946}, - {"&Never", 947}, - {"on dumb &Terminals", 948}, - {"alwa&Ys", 949}, - {" Configure options ", 950}, - {" Panel options ", 951}, - {" Pause after run... ", 952}, - {"Configure options", 953}, - {"&Add new", 954}, - {" External panelize ", 955}, - {"External panelize", 956}, - {"Other command", 957}, - {" Add to external panelize ", 958}, - {" Enter command label: ", 959}, - {" I can't run external panelize while logged on a non local directory ", 960}, - {"Find *.orig after patching", 961}, - {"Find SUID and SGID programs", 962}, - {"Cannot invoke command.", 963}, - {"Pipe close failed", 964}, - {"Show this help message", 965}, - {"Display brief usage message", 966}, - {"MTime", 967}, - {"Permission", 968}, - {"Perm", 969}, - {"|", 970}, - {"Nl", 971}, - {"GID", 972}, - {"UID", 973}, - {"ATime", 974}, - {"CTime", 975}, - {"Inode", 976}, - {" %s bytes in %d file%s", 977}, - {"Unknow tag on display format: ", 978}, - {" Do you really want to execute? ", 979}, - {" No action taken ", 980}, - {"RenMov", 981}, - {"Mkdir", 982}, + files have been moved now\n", 955}, + {"safe de&Lete", 956}, + {"cd follows lin&Ks", 957}, + {"advanced cho&Wn", 958}, + {"l&Ynx-like motion", 959}, + {"Animation", 960}, + {"rotatin&G dash", 961}, + {"co&Mplete: show all", 962}, + {"&Use internal view", 963}, + {"use internal ed&It", 964}, + {"auto m&Enus", 965}, + {"&Auto save setup", 966}, + {"shell &Patterns", 967}, + {"Compute &Totals", 968}, + {"&Verbose operation", 969}, + {"&Fast dir reload", 970}, + {"mi&X all files", 971}, + {"&Drop down menus", 972}, + {"ma&Rk moves down", 973}, + {"show &Hidden files", 974}, + {"show &Backup files", 975}, + {"&Never", 976}, + {"on dumb &Terminals", 977}, + {"alwa&Ys", 978}, + {" Configure options ", 979}, + {" Panel options ", 980}, + {" Pause after run... ", 981}, + {"Configure options", 982}, + {"&Add new", 983}, + {" External panelize ", 984}, + {"External panelize", 985}, + {"Other command", 986}, + {" Add to external panelize ", 987}, + {" Enter command label: ", 988}, + {" I can't run external panelize while logged on a non local directory ", 989}, + {"Find *.orig after patching", 990}, + {"Find SUID and SGID programs", 991}, + {"Cannot invoke command.", 992}, + {"Pipe close failed", 993}, + {"Show this help message", 994}, + {"Display brief usage message", 995}, + {"MTime", 996}, + {"ATime", 997}, + {"CTime", 998}, + {"Permission", 999}, + {"Perm", 1000}, + {"Nl", 1001}, + {"Inode", 1002}, + {"UID", 1003}, + {"GID", 1004}, + {" %s bytes in %d file%s", 1005}, + {"Unknow tag on display format: ", 1006}, + {" Do you really want to execute? ", 1007}, + {" No action taken ", 1008}, + {"RenMov", 1009}, + {"Mkdir", 1010}, {"\ Can't chdir to %s \n\ - %s ", 983}, - {"Couldn't open named pipe %s\n", 984}, - {" The shell is still active. Quit anyway? ", 985}, - {" There are stopped jobs.", 986}, - {" Quit anyway? ", 987}, - {"Warning: Couldn't change to %s.\n", 988}, + %s ", 1011}, + {"Couldn't open named pipe %s\n", 1012}, + {" The shell is still active. Quit anyway? ", 1013}, + {" There are stopped jobs.", 1014}, + {" Quit anyway? ", 1015}, + {"Warning: Couldn't change to %s.\n", 1016}, {"\ Can't open the %s file for writing:\n\ -%s\n", 989}, - {"Copy \"%s\" directory to:", 990}, - {"Move \"%s\" directory to:", 991}, +%s\n", 1017}, + {"Copy \"%s\" directory to:", 1018}, + {"Move \"%s\" directory to:", 1019}, {"\ Can't stat the destination \n\ - %s ", 992}, - {" The destination isn't a directory ", 993}, - {" Delete %s? ", 994}, - {"Static", 995}, - {"Dynamc", 996}, + %s ", 1020}, + {" The destination isn't a directory ", 1021}, + {" Delete %s? ", 1022}, + {"Static", 1023}, + {"Dynamc", 1024}, {"\ Can't chdir to \"%s\" \n\ - %s ", 997}, - {"Rescan", 998}, - {"Forget", 999}, - {"Rmdir", 1000}, - {" Invalid shell pattern defination \"%c\". ", 1001}, - {" Debug ", 1002}, - {" ERROR: ", 1003}, - {" True: ", 1004}, - {" False: ", 1005}, - {" Warning -- ignoring file ", 1006}, + %s ", 1025}, + {"Rescan", 1026}, + {"Forget", 1027}, + {"Rmdir", 1028}, + {"\ +Can't write to the %s file:\n\ +%s\n", 1029}, + {" Invalid shell pattern defination \"%c\". ", 1030}, + {" Debug ", 1031}, + {" ERROR: ", 1032}, + {" True: ", 1033}, + {" False: ", 1034}, + {" Warning -- ignoring file ", 1035}, {"\ File %s is not owned by root or you or is world writable.\n\ -Using it may compromise your security", 1007}, - {" I can't run programs while logged on a non local directory ", 1008}, - {" User menu ", 1009}, - {"name_trunc: too big", 1010}, - {" Pipe failed ", 1011}, - {" Dup failed ", 1012}, +Using it may compromise your security", 1036}, + {" I can't run programs while logged on a non local directory ", 1037}, + {" User menu ", 1038}, + {"name_trunc: too big", 1039}, + {" Pipe failed ", 1040}, + {" Dup failed ", 1041}, {"\ File: \n\ \n\ - ", 1013}, + ", 1042}, {"\ \n\ \n\ -has been modified, do you want to save the changes?\n", 1014}, - {" Save changes ", 1015}, - {" Can't spawn child program ", 1016}, - {" Empty output from child filter ", 1017}, - {" Could not open file ", 1018}, - {" Can't open file \"", 1019}, +has been modified, do you want to save the changes?\n", 1043}, + {" Save changes ", 1044}, + {" Can't spawn child program ", 1045}, + {" Empty output from child filter ", 1046}, + {" Could not open file ", 1047}, + {" Can't open file \"", 1048}, {"\ Can't stat file \n\ - ", 1020}, - {" Can't view: not a regular file ", 1021}, - {"File: %s", 1022}, - {" [grow]", 1023}, - {" Search string not found ", 1024}, - {" Invalid regular expression ", 1025}, + ", 1049}, + {" Can't view: not a regular file ", 1050}, + {"File: %s", 1051}, + {" [grow]", 1052}, + {" Search string not found ", 1053}, + {" Invalid regular expression ", 1054}, {"\ The current line number is %d.\n\ - Enter the new line number:", 1026}, - {" Enter regexp:", 1027}, - {" Enter search string:", 1028}, - {"Ascii", 1029}, - {"Hex", 1030}, - {"Line", 1031}, - {"RxSrch", 1032}, - {"EdText", 1033}, - {"EdHex", 1034}, - {"UnWrap", 1035}, - {"Wrap", 1036}, - {"HxSrch", 1037}, - {"Raw", 1038}, - {"Parse", 1039}, - {"Unform", 1040}, - {"Format", 1041}, - {"Function key 1", 1042}, - {"Function key 2", 1043}, - {"Function key 3", 1044}, - {"Function key 4", 1045}, - {"Function key 5", 1046}, - {"Function key 6", 1047}, - {"Function key 7", 1048}, - {"Function key 8", 1049}, - {"Function key 9", 1050}, - {"Function key 10", 1051}, - {"Function key 11", 1052}, - {"Function key 12", 1053}, - {"Function key 13", 1054}, - {"Function key 14", 1055}, - {"Function key 15", 1056}, - {"Function key 16", 1057}, - {"Function key 17", 1058}, - {"Function key 18", 1059}, - {"Function key 19", 1060}, - {"Function key 20", 1061}, - {"Backspace key", 1062}, - {"End key", 1063}, - {"Up arrow key", 1064}, - {"Down arrow key", 1065}, - {"Left arrow key", 1066}, - {"Right arrow key", 1067}, - {"Home key", 1068}, - {"Page Down key", 1069}, - {"Page Up key", 1070}, - {"Insert key", 1071}, - {"Delete key", 1072}, - {"Completion/M-tab", 1073}, - {"+ on keypad", 1074}, - {"- on keypad", 1075}, - {"* on keypad", 1076}, - {"Left arrow keypad", 1077}, - {"Right arrow keypad", 1078}, - {"Up arrow keypad", 1079}, - {"Down arrow keypad", 1080}, - {"Home on keypad", 1081}, - {"End on keypad", 1082}, - {"Page Down keypad", 1083}, - {"Page Up keypad", 1084}, - {"Insert on keypad", 1085}, - {"Delete on keypad", 1086}, - {"Enter on keypad", 1087}, - {"Slash on keypad", 1088}, - {"NumLock on keypad", 1089}, - {"Password:", 1090}, - {"Password", 1091}, - {"Ok", 1092}, + Enter the new line number:", 1055}, + {" Enter regexp:", 1056}, + {" Enter search string:", 1057}, + {"Ascii", 1058}, + {"Hex", 1059}, + {"Line", 1060}, + {"RxSrch", 1061}, + {"EdText", 1062}, + {"EdHex", 1063}, + {"UnWrap", 1064}, + {"Wrap", 1065}, + {"HxSrch", 1066}, + {"Raw", 1067}, + {"Parse", 1068}, + {"Unform", 1069}, + {"Format", 1070}, + {"Function key 1", 1071}, + {"Function key 2", 1072}, + {"Function key 3", 1073}, + {"Function key 4", 1074}, + {"Function key 5", 1075}, + {"Function key 6", 1076}, + {"Function key 7", 1077}, + {"Function key 8", 1078}, + {"Function key 9", 1079}, + {"Function key 10", 1080}, + {"Function key 11", 1081}, + {"Function key 12", 1082}, + {"Function key 13", 1083}, + {"Function key 14", 1084}, + {"Function key 15", 1085}, + {"Function key 16", 1086}, + {"Function key 17", 1087}, + {"Function key 18", 1088}, + {"Function key 19", 1089}, + {"Function key 20", 1090}, + {"Backspace key", 1091}, + {"End key", 1092}, + {"Up arrow key", 1093}, + {"Down arrow key", 1094}, + {"Left arrow key", 1095}, + {"Right arrow key", 1096}, + {"Home key", 1097}, + {"Page Down key", 1098}, + {"Page Up key", 1099}, + {"Insert key", 1100}, + {"Delete key", 1101}, + {"Completion/M-tab", 1102}, + {"+ on keypad", 1103}, + {"- on keypad", 1104}, + {"* on keypad", 1105}, + {"Left arrow keypad", 1106}, + {"Right arrow keypad", 1107}, + {"Up arrow keypad", 1108}, + {"Down arrow keypad", 1109}, + {"Home on keypad", 1110}, + {"End on keypad", 1111}, + {"Page Down keypad", 1112}, + {"Page Up keypad", 1113}, + {"Insert on keypad", 1114}, + {"Delete on keypad", 1115}, + {"Enter on keypad", 1116}, + {"Slash on keypad", 1117}, + {"NumLock on keypad", 1118}, + {"Password:", 1119}, + {"Password", 1120}, + {"Ok", 1121}, {"\ Couldn't open %s archive\n\ -%s", 1093}, - {"Inconsistent extfs archive", 1094}, - {"Sorry, we can not do password authenticated connections for now.", 1095}, - {" Could not set source routing (%s)", 1096}, +%s", 1122}, + {"Inconsistent extfs archive", 1123}, + {"Sorry, we can not do password authenticated connections for now.", 1124}, + {" Could not set source routing (%s)", 1125}, {"\ ~/.netrc file has not correct mode.\n\ -Remove password or correct mode.", 1097}, - {" MCFS ", 1098}, - {" The server does not support this version ", 1099}, +Remove password or correct mode.", 1126}, + {" MCFS ", 1127}, + {" The server does not support this version ", 1128}, {"\ The remote server is not running on a system port \n\ you need a password to log in, but the information may \n\ - not be safe on the remote side. Continue? \n", 1100}, - {" Yes ", 1101}, - {" No ", 1102}, - {" The remote server is running on strange port. Giving up.\n", 1103}, - {" MCFS Password required ", 1104}, - {" Invalid password ", 1105}, - {" Too many open connections ", 1106}, + not be safe on the remote side. Continue? \n", 1129}, + {" Yes ", 1130}, + {" No ", 1131}, + {" The remote server is running on strange port. Giving up.\n", 1132}, + {" MCFS Password required ", 1133}, + {" Invalid password ", 1134}, + {" Too many open connections ", 1135}, {"\ Couldn't open tar archive\n\ -%s", 1107}, - {"Unexpected EOF on archive file", 1108}, - {"Inconsistent tar archive", 1109}, +%s", 1136}, + {"Unexpected EOF on archive file", 1137}, + {"Inconsistent tar archive", 1138}, {"\ Hmm,...\n\ %s\n\ -doesn't look like a tar archive.", 1110}, +doesn't look like a tar archive.", 1139}, }; -int _msg_tbl_length = 1110; +int _msg_tbl_length = 1139; Binary files old/mc-4.5.9/po/fr.gmo and new/mc-4.5.10/po/fr.gmo differ diff -ruN old/mc-4.5.9/po/fr.po new/mc-4.5.10/po/fr.po --- old/mc-4.5.9/po/fr.po Mon Jan 18 17:44:13 1999 +++ new/mc-4.5.10/po/fr.po Sun Jan 31 18:55:19 1999 @@ -1,48 +1,48 @@ # mc fr.po # Copyright (C) 1998 Free Software Foundation, Inc. -# Vincent Renardias , 1998. +# Vincent Renardias , 1998, 1999. # msgid "" msgstr "" "Project-Id-Version: mc VERSION\n" -"POT-Creation-Date: 1998-12-21 16:33+0100\n" +"POT-Creation-Date: 1999-01-18 22:45+0100\n" "PO-Revision-Date: 1998-03-27 01:22+0100\n" -"Last-Translator: Vincent Renardias \n" -"Language-Team: Vincent Renardias \n" +"Last-Translator: Vincent Renardias \n" +"Language-Team: Vincent Renardias \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=iso-8859-1\n" "Content-Transfer-Encoding: 8bit\n" #. The file-name is printed after the ':' -#: edit/edit.c:127 edit/edit.c:222 edit/edit.c:229 edit/edit.c:236 -#: edit/edit.c:243 edit/edit.c:249 edit/edit.c:306 edit/edit.c:342 -#: edit/editcmd.c:1932 edit/editwidget.c:947 gnome/dir.c:377 -#: gnome/screen.c:2292 gnome/tree.c:1145 gnome/tree.c:1151 gnome/wtools.c:225 -#: gtkedit/edit.c:127 gtkedit/edit.c:222 gtkedit/edit.c:229 gtkedit/edit.c:236 -#: gtkedit/edit.c:243 gtkedit/edit.c:249 gtkedit/edit.c:306 gtkedit/edit.c:342 -#: gtkedit/editcmd.c:1932 gtkedit/editwidget.c:947 src/dir.c:377 -#: src/screen.c:2292 src/tree.c:1145 src/tree.c:1151 src/wtools.c:225 +#: edit/edit.c:129 edit/edit.c:224 edit/edit.c:231 edit/edit.c:238 +#: edit/edit.c:245 edit/edit.c:251 edit/edit.c:308 edit/edit.c:344 +#: edit/editcmd.c:1932 edit/editwidget.c:947 gnome/dir.c:378 +#: gnome/screen.c:2321 gnome/tree.c:694 gnome/tree.c:700 gnome/wtools.c:225 +#: gtkedit/edit.c:129 gtkedit/edit.c:224 gtkedit/edit.c:231 gtkedit/edit.c:238 +#: gtkedit/edit.c:245 gtkedit/edit.c:251 gtkedit/edit.c:308 gtkedit/edit.c:344 +#: gtkedit/editcmd.c:1932 gtkedit/editwidget.c:947 src/dir.c:378 +#: src/screen.c:2321 src/tree.c:694 src/tree.c:700 src/wtools.c:225 #: vfs/fish.c:226 msgid " Error " msgstr " Erreur " -#: edit/edit.c:127 edit/edit.c:229 gtkedit/edit.c:127 gtkedit/edit.c:229 +#: edit/edit.c:129 edit/edit.c:231 gtkedit/edit.c:129 gtkedit/edit.c:231 msgid " Failed trying to open file for reading: " msgstr " Impossible d'ouvrir le fichier en lecture: " -#: edit/edit.c:236 gtkedit/edit.c:236 +#: edit/edit.c:238 gtkedit/edit.c:238 msgid " Cannot get size/permissions info on file: " msgstr " Impossible d'obtenir taille et permissions du fichier: " -#: edit/edit.c:243 gtkedit/edit.c:243 +#: edit/edit.c:245 gtkedit/edit.c:245 msgid " Not an ordinary file: " msgstr " Ce n'est pas un fichier ordinaire: " -#: edit/edit.c:249 gtkedit/edit.c:249 +#: edit/edit.c:251 gtkedit/edit.c:251 msgid " File is too large: " msgstr " Fichier trop gros: " -#: edit/edit.c:250 gtkedit/edit.c:250 +#: edit/edit.c:252 gtkedit/edit.c:252 msgid "" " \n" " Increase edit.h:MAXBUF and recompile the editor. " @@ -50,7 +50,7 @@ " \n" " Augmentez edit.h:MAXBUF et recompilez l'éditeur. " -#: edit/edit.c:306 edit/edit.c:342 gtkedit/edit.c:306 gtkedit/edit.c:342 +#: edit/edit.c:308 edit/edit.c:344 gtkedit/edit.c:308 gtkedit/edit.c:344 msgid " Error allocating memory " msgstr " Erreur d'allocation mémoire " @@ -82,13 +82,13 @@ #. Warning message with a query to continue or cancel the operation #: edit/editcmd.c:482 edit/editcmd.c:801 edit/editcmd.c:831 edit/editcmd.c:978 -#: edit/editcmd.c:1075 gnome/ext.c:297 gnome/file.c:674 gnome/help.c:321 -#: gnome/main.c:660 gnome/olddnd.c:1608 gnome/screen.c:2050 +#: edit/editcmd.c:1075 gnome/ext.c:297 gnome/file.c:613 gnome/help.c:321 +#: gnome/main.c:667 gnome/olddnd.c:1681 gnome/screen.c:2079 #: gnome/subshell.c:700 gnome/subshell.c:726 gnome/utilunix.c:384 #: gnome/utilunix.c:388 gnome/utilunix.c:454 gtkedit/editcmd.c:482 #: gtkedit/editcmd.c:801 gtkedit/editcmd.c:831 gtkedit/editcmd.c:978 -#: gtkedit/editcmd.c:1075 src/ext.c:297 src/file.c:674 src/help.c:321 -#: src/main.c:660 src/screen.c:2050 src/subshell.c:700 src/subshell.c:726 +#: gtkedit/editcmd.c:1075 src/ext.c:297 src/file.c:613 src/help.c:321 +#: src/main.c:667 src/screen.c:2079 src/subshell.c:700 src/subshell.c:726 #: src/utilunix.c:384 src/utilunix.c:388 src/utilunix.c:454 vfs/mcfs.c:171 msgid " Warning " msgstr " Attention " @@ -113,8 +113,8 @@ msgid " Save as " msgstr " Enregistrer Sous " -#: edit/editcmd.c:501 edit/editcmd.c:2591 gtkedit/editcmd.c:501 -#: gtkedit/editcmd.c:2591 +#: edit/editcmd.c:501 edit/editcmd.c:2594 gtkedit/editcmd.c:501 +#: gtkedit/editcmd.c:2594 msgid " Error trying to save file. " msgstr " Erreur lors de l'enregistrement du fichier. " @@ -388,25 +388,23 @@ msgid "Cancel quit" msgstr "Annuler quitter" -#: edit/editcmd.c:2235 gnome/cmd.c:255 gnome/file.c:1715 gnome/file.c:2101 -#: gnome/filegui.c:496 gnome/gcmd.c:95 gnome/hotlist.c:1029 gnome/main.c:815 -#: gnome/olddnd.c:885 gnome/olddnd.c:1463 gnome/screen.c:2036 -#: gnome/subshell.c:701 gnome/subshell.c:727 gnome/temp-hack.c:74 -#: gnome/tree.c:1205 gnome/view.c:408 gtkedit/editcmd.c:2235 src/cmd.c:255 -#: src/file.c:1715 src/file.c:2101 src/filegui.c:496 src/hotlist.c:1029 -#: src/main.c:815 src/screen.c:2036 src/subshell.c:701 src/subshell.c:727 -#: src/tree.c:1205 src/view.c:408 +#: edit/editcmd.c:2235 gnome/cmd.c:256 gnome/file.c:1798 gnome/file.c:2177 +#: gnome/filegui.c:578 gnome/gcmd.c:108 gnome/hotlist.c:1030 gnome/main.c:822 +#: gnome/olddnd.c:958 gnome/olddnd.c:1536 gnome/screen.c:2065 +#: gnome/subshell.c:701 gnome/subshell.c:727 gnome/tree.c:759 gnome/view.c:408 +#: gtkedit/editcmd.c:2235 src/cmd.c:256 src/file.c:1798 src/file.c:2177 +#: src/filegui.c:578 src/hotlist.c:1030 src/main.c:822 src/screen.c:2065 +#: src/subshell.c:701 src/subshell.c:727 src/tree.c:759 src/view.c:408 msgid "&Yes" msgstr "&Oui" -#: edit/editcmd.c:2235 gnome/cmd.c:255 gnome/file.c:1715 gnome/file.c:2101 -#: gnome/filegui.c:495 gnome/gcmd.c:95 gnome/hotlist.c:1029 gnome/main.c:815 -#: gnome/olddnd.c:885 gnome/olddnd.c:1463 gnome/screen.c:2036 -#: gnome/subshell.c:701 gnome/subshell.c:727 gnome/temp-hack.c:73 -#: gnome/tree.c:1205 gnome/view.c:408 gtkedit/editcmd.c:2235 src/cmd.c:255 -#: src/file.c:1715 src/file.c:2101 src/filegui.c:495 src/hotlist.c:1029 -#: src/main.c:815 src/screen.c:2036 src/subshell.c:701 src/subshell.c:727 -#: src/tree.c:1205 src/view.c:408 +#: edit/editcmd.c:2235 gnome/cmd.c:256 gnome/file.c:1798 gnome/file.c:2177 +#: gnome/filegui.c:577 gnome/gcmd.c:108 gnome/hotlist.c:1030 gnome/main.c:822 +#: gnome/olddnd.c:958 gnome/olddnd.c:1536 gnome/screen.c:2065 +#: gnome/subshell.c:701 gnome/subshell.c:727 gnome/tree.c:759 gnome/view.c:408 +#: gtkedit/editcmd.c:2235 src/cmd.c:256 src/file.c:1798 src/file.c:2177 +#: src/filegui.c:577 src/hotlist.c:1030 src/main.c:822 src/screen.c:2065 +#: src/subshell.c:701 src/subshell.c:727 src/tree.c:759 src/view.c:408 msgid "&No" msgstr "&Non" @@ -439,80 +437,82 @@ msgstr " Couper vers le presse-papiers " #: edit/editcmd.c:2544 edit/editcmd.c:2548 edit/editcmd.c:2553 -#: gnome/view.c:1833 gtkedit/editcmd.c:2544 gtkedit/editcmd.c:2548 -#: gtkedit/editcmd.c:2553 src/view.c:1833 +#: edit/editcmd.c:2556 gnome/view.c:1833 gtkedit/editcmd.c:2544 +#: gtkedit/editcmd.c:2548 gtkedit/editcmd.c:2553 gtkedit/editcmd.c:2556 +#: src/view.c:1833 msgid " Goto line " msgstr " Aller à la ligne " #: edit/editcmd.c:2544 edit/editcmd.c:2548 edit/editcmd.c:2553 -#: gtkedit/editcmd.c:2544 gtkedit/editcmd.c:2548 gtkedit/editcmd.c:2553 +#: edit/editcmd.c:2556 gtkedit/editcmd.c:2544 gtkedit/editcmd.c:2548 +#: gtkedit/editcmd.c:2553 gtkedit/editcmd.c:2556 msgid " Enter line: " msgstr " Entrez la ligne: " -#: edit/editcmd.c:2574 edit/editcmd.c:2591 gtkedit/editcmd.c:2574 -#: gtkedit/editcmd.c:2591 +#: edit/editcmd.c:2577 edit/editcmd.c:2594 gtkedit/editcmd.c:2577 +#: gtkedit/editcmd.c:2594 msgid " Save Block " msgstr " Sauver le Block " -#: edit/editcmd.c:2625 gtkedit/editcmd.c:2625 +#: edit/editcmd.c:2628 gtkedit/editcmd.c:2628 msgid " Insert File " msgstr " Insérer Fichier " -#: edit/editcmd.c:2640 gtkedit/editcmd.c:2640 +#: edit/editcmd.c:2643 gtkedit/editcmd.c:2643 msgid " Insert file " msgstr " Insérer fichier " -#: edit/editcmd.c:2640 gtkedit/editcmd.c:2640 +#: edit/editcmd.c:2643 gtkedit/editcmd.c:2643 msgid " Error trying to insert file. " msgstr " Erreur en essayant d'insérer le fichier. " #. Not essential to translate -#: edit/editcmd.c:2660 gtkedit/editcmd.c:2660 +#: edit/editcmd.c:2663 gtkedit/editcmd.c:2663 msgid " Sort block " msgstr " Trier block " #. Not essential to translate -#: edit/editcmd.c:2660 edit/editcmd.c:2714 gtkedit/editcmd.c:2660 -#: gtkedit/editcmd.c:2714 +#: edit/editcmd.c:2663 edit/editcmd.c:2717 gtkedit/editcmd.c:2663 +#: gtkedit/editcmd.c:2717 msgid " You must first highlight a block of text. " msgstr " You devez d'abord sélectionner un bloc de texte. " -#: edit/editcmd.c:2667 gtkedit/editcmd.c:2667 +#: edit/editcmd.c:2670 gtkedit/editcmd.c:2670 msgid " Run Sort " msgstr " Trier " #. Not essential to translate -#: edit/editcmd.c:2669 gtkedit/editcmd.c:2669 +#: edit/editcmd.c:2672 gtkedit/editcmd.c:2672 msgid " Enter sort options (see manpage) separated by whitespace: " msgstr " Entrez les options de tri (cf: sort(1)) séparées par des espaces: " -#: edit/editcmd.c:2680 edit/editcmd.c:2686 gtkedit/editcmd.c:2680 -#: gtkedit/editcmd.c:2686 +#: edit/editcmd.c:2683 edit/editcmd.c:2689 gtkedit/editcmd.c:2683 +#: gtkedit/editcmd.c:2689 msgid " Sort " msgstr " Trier " #. Not essential to translate -#: edit/editcmd.c:2682 gtkedit/editcmd.c:2682 +#: edit/editcmd.c:2685 gtkedit/editcmd.c:2685 msgid " Error trying to execute sort command " msgstr " Erreur lors de l'exécution de la commande de tri " #. Not essential to translate -#: edit/editcmd.c:2688 gtkedit/editcmd.c:2688 +#: edit/editcmd.c:2691 gtkedit/editcmd.c:2691 msgid " Sort returned non-zero: " msgstr " Le code de retour du tri est non nul: " #. Not essential to translate -#: edit/editcmd.c:2712 edit/editcmd.c:2742 gtkedit/editcmd.c:2712 -#: gtkedit/editcmd.c:2742 +#: edit/editcmd.c:2715 edit/editcmd.c:2745 gtkedit/editcmd.c:2715 +#: gtkedit/editcmd.c:2745 msgid " Process block " msgstr " Process block " #. Not essential to translate -#: edit/editcmd.c:2744 gtkedit/editcmd.c:2744 +#: edit/editcmd.c:2747 gtkedit/editcmd.c:2747 msgid " Error trying to stat file " msgstr " Error trying to stat file " -#: edit/editcmd.c:2814 gtkedit/editcmd.c:2814 +#: edit/editcmd.c:2817 gtkedit/editcmd.c:2817 msgid " Mail " msgstr " Mail " @@ -711,8 +711,8 @@ msgid "&Save mode..." msgstr "Mode &Sauvegarde..." -#: edit/editmenu.c:246 edit/editmenu.c:255 gnome/main.c:1312 -#: gtkedit/editmenu.c:246 gtkedit/editmenu.c:255 src/main.c:1312 +#: edit/editmenu.c:246 edit/editmenu.c:255 gnome/main.c:1304 +#: gtkedit/editmenu.c:246 gtkedit/editmenu.c:255 src/main.c:1304 msgid "&Layout..." msgstr "Présentation..." @@ -912,10 +912,10 @@ msgstr "Erreur lors de l'initialisation de l'éditeur.\n" #: edit/editwidget.c:1060 edit/gtkedit.c:1365 gnome/help.c:809 -#: gnome/main.c:1678 gnome/screen.c:2270 gnome/screen.c:2300 gnome/tree.c:1478 +#: gnome/main.c:1670 gnome/screen.c:2299 gnome/screen.c:2329 gnome/tree.c:1022 #: gnome/view.c:1963 gtkedit/editwidget.c:1060 gtkedit/gtkedit.c:1365 -#: src/help.c:809 src/main.c:1678 src/screen.c:2270 src/screen.c:2300 -#: src/tree.c:1478 src/view.c:1963 +#: src/help.c:809 src/main.c:1670 src/screen.c:2299 src/screen.c:2329 +#: src/tree.c:1022 src/view.c:1963 msgid "Help" msgstr "Aide" @@ -927,35 +927,36 @@ msgid "Replac" msgstr "Remplacer" -#: edit/editwidget.c:1064 edit/gtkedit.c:1315 gnome/olddnd.c:576 -#: gnome/screen.c:2274 gnome/screen.c:2304 gnome/tree.c:1484 -#: gtkedit/editwidget.c:1064 gtkedit/gtkedit.c:1315 src/screen.c:2274 -#: src/screen.c:2304 src/tree.c:1484 +#: edit/editwidget.c:1064 edit/gtkedit.c:1315 gnome/gdialogs.c:514 +#: gnome/olddnd.c:649 gnome/screen.c:2303 gnome/screen.c:2333 +#: gnome/tree.c:1028 gtkedit/editwidget.c:1064 gtkedit/gtkedit.c:1315 +#: src/screen.c:2303 src/screen.c:2333 src/tree.c:1028 msgid "Copy" msgstr "Copier" -#: edit/editwidget.c:1065 gnome/olddnd.c:582 gtkedit/editwidget.c:1065 +#: edit/editwidget.c:1065 gnome/gdialogs.c:517 gnome/olddnd.c:655 +#: gtkedit/editwidget.c:1065 msgid "Move" msgstr "Déplacer" -#: edit/editwidget.c:1066 gnome/gview.c:300 gnome/gview.c:330 -#: gnome/view.c:1976 gtkedit/editwidget.c:1066 src/view.c:1976 +#: edit/editwidget.c:1066 gnome/view.c:1976 gtkedit/editwidget.c:1066 +#: src/view.c:1976 msgid "Search" msgstr "Chercher" -#: edit/editwidget.c:1067 gnome/gpopup.c:204 gnome/gpopup.c:214 -#: gnome/olddnd.c:884 gnome/screen.c:2277 gnome/screen.c:2307 -#: gtkedit/editwidget.c:1067 src/screen.c:2277 src/screen.c:2307 +#: edit/editwidget.c:1067 gnome/gpopup.c:220 gnome/gpopup.c:232 +#: gnome/olddnd.c:957 gnome/screen.c:2306 gnome/screen.c:2336 +#: gtkedit/editwidget.c:1067 src/screen.c:2306 src/screen.c:2336 msgid "Delete" msgstr "Effacer" -#: edit/editwidget.c:1069 gnome/main.c:1680 gtkedit/editwidget.c:1069 -#: src/main.c:1680 +#: edit/editwidget.c:1069 gnome/main.c:1672 gtkedit/editwidget.c:1069 +#: src/main.c:1672 msgid "PullDn" msgstr "Menu" -#: edit/editwidget.c:1070 gnome/help.c:821 gnome/main.c:1681 gnome/view.c:1965 -#: gnome/view.c:1985 gtkedit/editwidget.c:1070 src/help.c:821 src/main.c:1681 +#: edit/editwidget.c:1070 gnome/help.c:821 gnome/main.c:1673 gnome/view.c:1965 +#: gnome/view.c:1985 gtkedit/editwidget.c:1070 src/help.c:821 src/main.c:1673 #: src/view.c:1965 src/view.c:1985 msgid "Quit" msgstr "Quiter" @@ -1084,14 +1085,14 @@ msgid "Info about Mcedit" msgstr "Information sur Mcedit" -#: edit/gtkedit.c:1362 gnome/filegui.c:361 gnome/gview.c:329 -#: gtkedit/gtkedit.c:1362 src/filegui.c:361 +#: edit/gtkedit.c:1362 gnome/filegui.c:409 gtkedit/gtkedit.c:1362 +#: src/filegui.c:409 msgid "File" msgstr "Fichier" -#: edit/gtkedit.c:1363 gnome/gpopup.c:191 gnome/screen.c:2273 -#: gnome/screen.c:2303 gnome/view.c:1972 gtkedit/gtkedit.c:1363 -#: src/screen.c:2273 src/screen.c:2303 src/view.c:1972 +#: edit/gtkedit.c:1363 gnome/gpopup.c:207 gnome/screen.c:2302 +#: gnome/screen.c:2332 gnome/view.c:1972 gtkedit/gtkedit.c:1363 +#: src/screen.c:2302 src/screen.c:2332 src/view.c:1972 msgid "Edit" msgstr "Editer" @@ -1109,18 +1110,18 @@ msgid " Syntax error in file %s on line %d " msgstr " Erreur de syntaxe dans le fichier %s à la ligne %d " -#: gnome/achown.c:73 gnome/boxes.c:142 gnome/boxes.c:282 gnome/boxes.c:379 -#: gnome/boxes.c:467 gnome/boxes.c:653 gnome/boxes.c:776 gnome/boxes.c:830 -#: gnome/chmod.c:115 gnome/chown.c:81 gnome/cmd.c:868 gnome/filegui.c:707 -#: gnome/find.c:154 gnome/hotlist.c:140 gnome/hotlist.c:812 -#: gnome/hotlist.c:905 gnome/layout.c:373 gnome/learn.c:61 gnome/option.c:144 +#: gnome/achown.c:73 gnome/boxes.c:143 gnome/boxes.c:283 gnome/boxes.c:380 +#: gnome/boxes.c:468 gnome/boxes.c:648 gnome/boxes.c:731 gnome/boxes.c:785 +#: gnome/chmod.c:115 gnome/chown.c:81 gnome/cmd.c:859 gnome/filegui.c:795 +#: gnome/find.c:156 gnome/hotlist.c:141 gnome/hotlist.c:813 +#: gnome/hotlist.c:906 gnome/layout.c:373 gnome/learn.c:61 gnome/option.c:145 #: gnome/panelize.c:90 gnome/view.c:408 gnome/wtools.c:114 gnome/wtools.c:389 -#: gnome/wtools.c:562 gnome/wtools.c:643 src/achown.c:73 src/boxes.c:142 -#: src/boxes.c:282 src/boxes.c:379 src/boxes.c:467 src/boxes.c:653 -#: src/boxes.c:776 src/boxes.c:830 src/chmod.c:115 src/chown.c:81 -#: src/cmd.c:868 src/filegui.c:707 src/find.c:154 src/hotlist.c:140 -#: src/hotlist.c:812 src/hotlist.c:905 src/layout.c:373 src/learn.c:61 -#: src/option.c:144 src/panelize.c:90 src/view.c:408 src/wtools.c:114 +#: gnome/wtools.c:562 gnome/wtools.c:643 src/achown.c:73 src/boxes.c:143 +#: src/boxes.c:283 src/boxes.c:380 src/boxes.c:468 src/boxes.c:648 +#: src/boxes.c:731 src/boxes.c:785 src/chmod.c:115 src/chown.c:81 +#: src/cmd.c:859 src/filegui.c:795 src/find.c:156 src/hotlist.c:141 +#: src/hotlist.c:813 src/hotlist.c:906 src/layout.c:373 src/learn.c:61 +#: src/option.c:145 src/panelize.c:90 src/view.c:408 src/wtools.c:114 #: src/wtools.c:389 src/wtools.c:562 src/wtools.c:643 msgid "&Cancel" msgstr "&Annuler" @@ -1159,7 +1160,7 @@ msgid "Flag" msgstr "Drapeau" -#: gnome/achown.c:380 gnome/gview.c:331 src/achown.c:380 +#: gnome/achown.c:380 src/achown.c:380 msgid "Mode" msgstr "Mode" @@ -1209,202 +1210,190 @@ msgid " I can't run the Advanced Chown command on a tarfs " msgstr " Je ne peut pas utiliser le Chown Avancé sur un tarfs " -#: gnome/background.c:181 src/background.c:181 +#: gnome/background.c:180 src/background.c:180 msgid "Background process:" msgstr "Tâche de fond:" -#: gnome/background.c:286 gnome/file.c:2044 src/background.c:286 -#: src/file.c:2044 +#: gnome/background.c:286 gnome/file.c:2120 src/background.c:286 +#: src/file.c:2120 msgid " Background process error " msgstr " Erreur de tâche de fond " -#: gnome/background.c:291 src/background.c:291 +#: gnome/background.c:293 src/background.c:293 msgid " Child died unexpectedly " msgstr " Terminaison inattendue du processus fils" -#: gnome/background.c:293 src/background.c:293 +#: gnome/background.c:295 src/background.c:295 msgid " Unknown error in child " msgstr " Erreur inconnue dans le processus fils " -#: gnome/background.c:308 src/background.c:308 +#: gnome/background.c:310 src/background.c:310 msgid " Background protocol error " -msgstr "" +msgstr " Erreur de protocole de fond " -#: gnome/background.c:309 src/background.c:309 +#: gnome/background.c:311 src/background.c:311 msgid "" " Background process sent us a request for more arguments \n" " than we can handle. \n" msgstr "Une tâche de fond a passé plus de paramétres que je peux gérer. \n" -#: gnome/boxes.c:66 src/boxes.c:66 +#: gnome/boxes.c:67 src/boxes.c:67 msgid " Listing mode " msgstr " Mode de listage " -#: gnome/boxes.c:71 src/boxes.c:71 +#: gnome/boxes.c:72 src/boxes.c:72 msgid "&Full file list" msgstr "liste des &Fichiers compléte" -#: gnome/boxes.c:72 src/boxes.c:72 +#: gnome/boxes.c:73 src/boxes.c:73 msgid "&Brief file list" msgstr "liste des fichiers &Bréve" -#: gnome/boxes.c:73 src/boxes.c:73 +#: gnome/boxes.c:74 src/boxes.c:74 msgid "&Long file list" msgstr "&Liste des fichiers longue" -#: gnome/boxes.c:74 src/boxes.c:74 +#: gnome/boxes.c:75 src/boxes.c:75 msgid "&User defined:" msgstr "défini par l'&Utilisateur:" -#: gnome/boxes.c:75 src/boxes.c:75 +#: gnome/boxes.c:76 src/boxes.c:76 msgid "&Icon view" msgstr "Vue par &Icones" -#: gnome/boxes.c:140 src/boxes.c:140 +#: gnome/boxes.c:141 src/boxes.c:141 msgid "user &Mini status" msgstr "" -#: gnome/boxes.c:141 gnome/boxes.c:281 gnome/boxes.c:381 gnome/boxes.c:469 -#: gnome/boxes.c:655 gnome/boxes.c:777 gnome/boxes.c:832 gnome/boxes.c:943 -#: gnome/filegui.c:724 gnome/find.c:154 gnome/gtools.c:131 gnome/layout.c:372 -#: gnome/option.c:143 gnome/wtools.c:292 gnome/wtools.c:564 src/boxes.c:141 -#: src/boxes.c:281 src/boxes.c:381 src/boxes.c:469 src/boxes.c:655 -#: src/boxes.c:777 src/boxes.c:832 src/boxes.c:943 src/filegui.c:724 -#: src/find.c:154 src/layout.c:372 src/option.c:143 src/wtools.c:292 +#: gnome/boxes.c:142 gnome/boxes.c:282 gnome/boxes.c:382 gnome/boxes.c:470 +#: gnome/boxes.c:650 gnome/boxes.c:732 gnome/boxes.c:787 gnome/boxes.c:898 +#: gnome/filegui.c:812 gnome/find.c:156 gnome/gtools.c:103 gnome/layout.c:372 +#: gnome/option.c:144 gnome/wtools.c:292 gnome/wtools.c:564 src/boxes.c:142 +#: src/boxes.c:282 src/boxes.c:382 src/boxes.c:470 src/boxes.c:650 +#: src/boxes.c:732 src/boxes.c:787 src/boxes.c:898 src/filegui.c:812 +#: src/find.c:156 src/layout.c:372 src/option.c:144 src/wtools.c:292 #: src/wtools.c:564 msgid "&Ok" msgstr "&Ok" -#: gnome/boxes.c:189 src/boxes.c:189 +#: gnome/boxes.c:190 src/boxes.c:190 msgid "Listing mode" msgstr "Mode de listage" -#: gnome/boxes.c:283 src/boxes.c:283 +#: gnome/boxes.c:284 src/boxes.c:284 msgid "&Reverse" msgstr "Inve&Rse" -#: gnome/boxes.c:284 src/boxes.c:284 +#: gnome/boxes.c:285 src/boxes.c:285 msgid "case sensi&tive" msgstr "respec&t de la case " -#: gnome/boxes.c:285 src/boxes.c:285 +#: gnome/boxes.c:286 src/boxes.c:286 msgid "Sort order" msgstr "Ordre de tri" -#: gnome/boxes.c:384 src/boxes.c:384 +#: gnome/boxes.c:385 src/boxes.c:385 msgid " confirm &Exit " msgstr " confirm&Er Quitter " -#: gnome/boxes.c:386 src/boxes.c:386 +#: gnome/boxes.c:387 src/boxes.c:387 msgid " confirm e&Xecute " msgstr " confirmer e&Xécuter " -#: gnome/boxes.c:388 src/boxes.c:388 +#: gnome/boxes.c:389 src/boxes.c:389 msgid " confirm o&Verwrite " msgstr " confirmer recou&Vrir " -#: gnome/boxes.c:390 src/boxes.c:390 +#: gnome/boxes.c:391 src/boxes.c:391 msgid " confirm &Delete " msgstr " confirmer &Délétion " -#: gnome/boxes.c:396 src/boxes.c:396 +#: gnome/boxes.c:397 src/boxes.c:397 msgid " Confirmation " msgstr " Confirmation " -#: gnome/boxes.c:464 src/boxes.c:464 +#: gnome/boxes.c:465 src/boxes.c:465 msgid "Full 8 bits output" msgstr "Sortie 8 bits" -#: gnome/boxes.c:464 src/boxes.c:464 +#: gnome/boxes.c:465 src/boxes.c:465 msgid "ISO 8859-1" msgstr "ISO 8859-1" -#: gnome/boxes.c:464 src/boxes.c:464 +#: gnome/boxes.c:465 src/boxes.c:465 msgid "7 bits" msgstr "7 bits" -#: gnome/boxes.c:471 src/boxes.c:471 +#: gnome/boxes.c:472 src/boxes.c:472 msgid "F&ull 8 bits input" msgstr "" -#: gnome/boxes.c:479 src/boxes.c:479 +#: gnome/boxes.c:480 src/boxes.c:480 msgid " Display bits " msgstr "" -#: gnome/boxes.c:650 src/boxes.c:650 -msgid "Always to memory" -msgstr "Toujours vers la mémoire" - -#: gnome/boxes.c:650 src/boxes.c:650 -msgid "If size less than:" -msgstr "Si la taille est inférieure à:" - -#: gnome/boxes.c:660 src/boxes.c:660 +#: gnome/boxes.c:655 src/boxes.c:655 msgid "&Always use ftp proxy" msgstr "&Toujours utiliser la proxy ftp" -#: gnome/boxes.c:662 src/boxes.c:662 +#: gnome/boxes.c:657 src/boxes.c:657 msgid "sec" msgstr "sec" -#: gnome/boxes.c:666 src/boxes.c:666 +#: gnome/boxes.c:661 src/boxes.c:661 msgid "ftpfs directory cache timeout:" msgstr "délai d'expiration du cache pour ftpfs" -#: gnome/boxes.c:670 src/boxes.c:670 +#: gnome/boxes.c:665 src/boxes.c:665 msgid "ftp anonymous password:" msgstr "mot de passe pour ftp anonyme:" -#: gnome/boxes.c:677 src/boxes.c:677 -msgid "Gzipped tar archive extract:" -msgstr "Extraire archives Tar Gzipées:" - -#: gnome/boxes.c:683 src/boxes.c:683 +#: gnome/boxes.c:672 src/boxes.c:672 msgid "Timeout for freeing VFSs:" msgstr "Délai pour libérer les SFVs:" -#: gnome/boxes.c:689 src/boxes.c:689 +#: gnome/boxes.c:678 src/boxes.c:678 msgid " Virtual File System Setting " msgstr " Configuration du Système de Fichier Virtuel " -#: gnome/boxes.c:789 src/boxes.c:789 +#: gnome/boxes.c:744 src/boxes.c:744 msgid "Quick cd" msgstr "Cd rapide" #. want cd like completion -#: gnome/boxes.c:794 src/boxes.c:794 +#: gnome/boxes.c:749 src/boxes.c:749 msgid "cd" msgstr "cd" -#: gnome/boxes.c:850 src/boxes.c:850 +#: gnome/boxes.c:805 src/boxes.c:805 msgid "Symbolic link filename:" msgstr "Nom du lien symbolique:" -#: gnome/boxes.c:852 src/boxes.c:852 +#: gnome/boxes.c:807 src/boxes.c:807 msgid "Existing filename (filename symlink will point to):" msgstr "Fichier existant (vers lequel le lien va pointer):" -#: gnome/boxes.c:881 src/boxes.c:881 +#: gnome/boxes.c:836 src/boxes.c:836 msgid "Running " msgstr "En cours " -#: gnome/boxes.c:882 gnome/find.c:667 src/boxes.c:882 src/find.c:667 +#: gnome/boxes.c:837 gnome/find.c:676 src/boxes.c:837 src/find.c:676 msgid "Stopped" msgstr "Stoppé" -#: gnome/boxes.c:940 src/boxes.c:940 +#: gnome/boxes.c:895 src/boxes.c:895 msgid "&Stop" msgstr "&Stopper" -#: gnome/boxes.c:941 src/boxes.c:941 +#: gnome/boxes.c:896 src/boxes.c:896 msgid "&Resume" msgstr "&Reprendre" -#: gnome/boxes.c:942 src/boxes.c:942 +#: gnome/boxes.c:897 src/boxes.c:897 msgid "&Kill" msgstr "&Kill" -#: gnome/boxes.c:981 src/boxes.c:981 +#: gnome/boxes.c:936 src/boxes.c:936 msgid "Background Jobs" msgstr "Tâches de fond" @@ -1468,7 +1457,8 @@ msgid "&Marked all" msgstr "Tous &Marqués" -#: gnome/chmod.c:151 gnome/screen.c:423 src/chmod.c:151 src/screen.c:423 +#: gnome/chmod.c:151 gnome/gcmd.c:217 gnome/screen.c:442 src/chmod.c:151 +#: src/screen.c:442 msgid "Name" msgstr "Nom" @@ -1565,140 +1555,140 @@ msgid " I can't run the Chown command on a tarfs " msgstr " je ne peux pas utiliser la commande Chown sur un tarfs " -#: gnome/cmd.c:204 src/cmd.c:204 +#: gnome/cmd.c:205 src/cmd.c:205 #, c-format msgid " Can not fetch a local copy of %s " msgstr " Impossible de récupérer une copie locale de %s" -#: gnome/cmd.c:254 src/cmd.c:254 +#: gnome/cmd.c:255 src/cmd.c:255 msgid " CD " msgstr " CD " -#: gnome/cmd.c:254 src/cmd.c:254 +#: gnome/cmd.c:255 src/cmd.c:255 msgid "Files tagged, want to cd?" msgstr "Fichiers marqués, voulez-vous changer de répertoire?" -#: gnome/cmd.c:260 gnome/cmd.c:727 gnome/cmd.c:741 src/cmd.c:260 src/cmd.c:727 -#: src/cmd.c:741 +#: gnome/cmd.c:261 gnome/cmd.c:718 gnome/cmd.c:732 src/cmd.c:261 src/cmd.c:718 +#: src/cmd.c:732 msgid "Could not change directory" msgstr " Impossible de changer de répertoire" -#: gnome/cmd.c:289 src/cmd.c:289 +#: gnome/cmd.c:290 src/cmd.c:290 msgid " View file " msgstr " Voir fichier " -#: gnome/cmd.c:289 src/cmd.c:289 +#: gnome/cmd.c:290 src/cmd.c:290 msgid " Filename:" msgstr " Nom du Fichier:" -#: gnome/cmd.c:306 src/cmd.c:306 +#: gnome/cmd.c:307 src/cmd.c:307 msgid " Filtered view " msgstr " Vue filtrée " -#: gnome/cmd.c:306 src/cmd.c:306 +#: gnome/cmd.c:307 src/cmd.c:307 msgid " Filter command and arguments:" msgstr " Filtre commande et arguments:" -#: gnome/cmd.c:391 src/cmd.c:391 -msgid " Mkdir " -msgstr " Mkdir " +#: gnome/cmd.c:393 src/cmd.c:393 +msgid "Create a new Directory" +msgstr "Créér un nouveau Répertoire" -#: gnome/cmd.c:391 src/cmd.c:391 +#: gnome/cmd.c:393 src/cmd.c:393 msgid " Enter directory name:" msgstr " Entrez le nom du répertoire:" -#: gnome/cmd.c:446 src/cmd.c:446 +#: gnome/cmd.c:454 src/cmd.c:454 msgid " Filter " msgstr " Filtre " -#: gnome/cmd.c:446 src/cmd.c:446 +#: gnome/cmd.c:454 src/cmd.c:454 msgid " Set expression for filtering filenames" msgstr " Expression pour filtrer les noms de fichier" -#: gnome/cmd.c:530 src/cmd.c:530 +#: gnome/cmd.c:520 src/cmd.c:520 msgid " Select " msgstr " Sélectionner " -#: gnome/cmd.c:558 gnome/cmd.c:609 src/cmd.c:558 src/cmd.c:609 +#: gnome/cmd.c:548 gnome/cmd.c:599 src/cmd.c:548 src/cmd.c:599 msgid " Malformed regular expression " msgstr " Expression régulière malformée " -#: gnome/cmd.c:582 src/cmd.c:582 +#: gnome/cmd.c:572 src/cmd.c:572 msgid " Unselect " msgstr " Désélectionner " -#: gnome/cmd.c:654 src/cmd.c:654 +#: gnome/cmd.c:645 src/cmd.c:645 msgid "Extension file edit" msgstr "Editer les extentions de fichiers" -#: gnome/cmd.c:655 src/cmd.c:655 +#: gnome/cmd.c:646 src/cmd.c:646 msgid " Which extension file you want to edit? " msgstr " Quelles extentions de fichier voulez-vous éditer? " -#: gnome/cmd.c:656 src/cmd.c:656 +#: gnome/cmd.c:647 src/cmd.c:647 msgid "&User" msgstr "&Utilisateur" -#: gnome/cmd.c:656 gnome/cmd.c:682 src/cmd.c:656 src/cmd.c:682 +#: gnome/cmd.c:647 gnome/cmd.c:673 src/cmd.c:647 src/cmd.c:673 msgid "&System Wide" msgstr "&pour le Système" -#: gnome/cmd.c:679 src/cmd.c:679 +#: gnome/cmd.c:670 src/cmd.c:670 msgid "Menu file edit" msgstr "Menu édition fichier" -#: gnome/cmd.c:680 src/cmd.c:680 +#: gnome/cmd.c:671 src/cmd.c:671 msgid " Which menu file will you edit? " msgstr " Quel fichier de menu voulez-vous éditer? " -#: gnome/cmd.c:682 src/cmd.c:682 +#: gnome/cmd.c:673 src/cmd.c:673 msgid "&Local" msgstr "&Local" -#: gnome/cmd.c:682 src/cmd.c:682 +#: gnome/cmd.c:673 src/cmd.c:673 msgid "&Home" msgstr "&Home" -#: gnome/cmd.c:867 src/cmd.c:867 +#: gnome/cmd.c:858 src/cmd.c:858 msgid " Compare directories " msgstr " Comparer répertoires " -#: gnome/cmd.c:867 src/cmd.c:867 +#: gnome/cmd.c:858 src/cmd.c:858 msgid " Select compare method: " msgstr " Sélectionner la méthode de comparaison: " -#: gnome/cmd.c:868 src/cmd.c:868 +#: gnome/cmd.c:859 src/cmd.c:859 msgid "&Quick" msgstr "&Rapide" -#: gnome/cmd.c:868 src/cmd.c:868 +#: gnome/cmd.c:859 src/cmd.c:859 msgid "&Size only" msgstr "Taille &Seulement" -#: gnome/cmd.c:868 src/cmd.c:868 +#: gnome/cmd.c:859 src/cmd.c:859 msgid "&Thorough" msgstr "" -#: gnome/cmd.c:878 src/cmd.c:878 +#: gnome/cmd.c:869 src/cmd.c:869 msgid " Both panels should be on the listing view mode to use this command " msgstr "" " Les deux panels doivent être en mode liste pour utiliser cette commande " -#: gnome/cmd.c:892 src/cmd.c:892 +#: gnome/cmd.c:883 src/cmd.c:883 msgid " The command history is empty " msgstr " L'historique des commandes est vide " -#: gnome/cmd.c:898 src/cmd.c:898 +#: gnome/cmd.c:889 src/cmd.c:889 msgid " Command history " msgstr " Historique des commandes " -#: gnome/cmd.c:940 src/cmd.c:940 +#: gnome/cmd.c:931 src/cmd.c:931 msgid "" " Not an xterm or Linux console; \n" " the panels cannot be toggled. " msgstr "" -#: gnome/cmd.c:979 src/cmd.c:979 +#: gnome/cmd.c:970 src/cmd.c:970 msgid "" "Type `exit' to return to the Midnight Commander\n" "\r\n" @@ -1708,7 +1698,7 @@ "\r\n" "\r" -#: gnome/cmd.c:1032 src/cmd.c:1032 +#: gnome/cmd.c:1023 src/cmd.c:1023 #, c-format msgid "" " Couldn't stat %s \n" @@ -1717,121 +1707,103 @@ " Impossible d'ouvrir %s \n" " %s " -#: gnome/cmd.c:1041 gnome/cmd.c:1043 src/cmd.c:1041 src/cmd.c:1043 +#: gnome/cmd.c:1032 gnome/cmd.c:1034 src/cmd.c:1032 src/cmd.c:1034 msgid " Link " msgstr " Lien " -#: gnome/cmd.c:1042 gnome/cmd.c:1147 gnome/file.c:2229 src/cmd.c:1042 -#: src/cmd.c:1147 src/file.c:2229 +#: gnome/cmd.c:1033 gnome/cmd.c:1138 gnome/file.c:1628 src/cmd.c:1033 +#: src/cmd.c:1138 src/file.c:1628 msgid " to:" msgstr " vers:" -#: gnome/cmd.c:1053 src/cmd.c:1053 +#: gnome/cmd.c:1044 src/cmd.c:1044 #, c-format msgid " link: %s " msgstr " lien: %s " -#: gnome/cmd.c:1086 src/cmd.c:1086 +#: gnome/cmd.c:1077 src/cmd.c:1077 #, c-format msgid " symlink: %s " msgstr " lien symbolique: %s " -#: gnome/cmd.c:1112 src/cmd.c:1112 +#: gnome/cmd.c:1103 src/cmd.c:1103 msgid " Symlink " msgstr " Lien Symbolique " -#: gnome/cmd.c:1112 src/cmd.c:1112 +#: gnome/cmd.c:1103 src/cmd.c:1103 msgid " points to:" msgstr " pointant vers:" -#: gnome/cmd.c:1117 src/cmd.c:1117 +#: gnome/cmd.c:1108 src/cmd.c:1108 msgid " Edit symlink " msgstr " Editer le lien symbolique " -#: gnome/cmd.c:1123 src/cmd.c:1123 +#: gnome/cmd.c:1114 src/cmd.c:1114 #, c-format msgid " edit symlink: %s " msgstr " editer le lien symbolique: %s " -#: gnome/cmd.c:1147 src/cmd.c:1147 +#: gnome/cmd.c:1138 src/cmd.c:1138 msgid " Link symbolically " msgstr " Lier symboliquement " -#: gnome/cmd.c:1148 src/cmd.c:1148 +#: gnome/cmd.c:1139 src/cmd.c:1139 msgid " Relative symlink " msgstr " Lien symbolique relatif " -#: gnome/cmd.c:1159 src/cmd.c:1159 +#: gnome/cmd.c:1150 src/cmd.c:1150 #, c-format msgid " relative symlink: %s " msgstr " lien symbolique relatif: %s " -#: gnome/cmd.c:1262 src/cmd.c:1262 +#: gnome/cmd.c:1253 src/cmd.c:1253 msgid " Enter machine name (F1 for details): " msgstr " Entrez le nom de la machine (F1 pour les détails): " -#: gnome/cmd.c:1286 src/cmd.c:1286 +#: gnome/cmd.c:1277 src/cmd.c:1277 #, c-format msgid " Could not chdir to %s " msgstr " Impossible d'aller dans %s " -#: gnome/cmd.c:1293 src/cmd.c:1293 +#: gnome/cmd.c:1284 src/cmd.c:1284 msgid " Link to a remote machine " msgstr " Lien vers une machine distante " -#: gnome/cmd.c:1299 src/cmd.c:1299 +#: gnome/cmd.c:1290 src/cmd.c:1290 msgid " FTP to machine " msgstr " FTP vers machine " -#: gnome/cmd.c:1309 src/cmd.c:1309 +#: gnome/cmd.c:1300 src/cmd.c:1300 msgid " Socket source routing setup " msgstr "" -#: gnome/cmd.c:1310 src/cmd.c:1310 +#: gnome/cmd.c:1301 src/cmd.c:1301 msgid " Enter host name to use as a source routing hop: " msgstr "" -#: gnome/cmd.c:1317 src/cmd.c:1317 +#: gnome/cmd.c:1308 src/cmd.c:1308 msgid " Host name " msgstr " Nom de l'Hote " -#: gnome/cmd.c:1317 src/cmd.c:1317 +#: gnome/cmd.c:1308 src/cmd.c:1308 msgid " Error while looking up IP address " msgstr " Erreur lors de la recherche de l'adresse IP " -#: gnome/cmd.c:1328 src/cmd.c:1328 +#: gnome/cmd.c:1319 src/cmd.c:1319 msgid " Undelete files on an ext2 file system " msgstr "" -#: gnome/cmd.c:1329 src/cmd.c:1329 +#: gnome/cmd.c:1320 src/cmd.c:1320 msgid "" " Enter device (without /dev/) to undelete\n" " files on: (F1 for details)" msgstr "" -#: gnome/cmd.c:1371 src/cmd.c:1371 -#, fuzzy -msgid "You can not scan disk usage on non-local filesystem. Sorry." -msgstr "" -" Impossible d'exécuter une commande sur un système de fichiers non local" - -#: gnome/cmd.c:1429 src/cmd.c:1429 -msgid "Show directory sizes" -msgstr "Afficher la taille des répertoires" - -#: gnome/cmd.c:1429 gnome/panelize.c:466 src/cmd.c:1429 src/panelize.c:466 -msgid "Pipe close failed" -msgstr "Echec de fermeture de tube" - -#: gnome/cmd.c:1442 src/cmd.c:1442 -msgid "Cannot invoke du command." -msgstr "Inpossible d'invoquer la commande \"du\"." - -#: gnome/cmd.c:1453 src/cmd.c:1453 +#: gnome/cmd.c:1370 src/cmd.c:1370 msgid " Setup saved to ~/" msgstr " Configuration sauvée dans ~/" -#: gnome/cmd.c:1458 src/cmd.c:1458 +#: gnome/cmd.c:1375 src/cmd.c:1375 msgid " Setup " msgstr " Configuration " @@ -1922,12 +1894,12 @@ msgid "&Group" msgstr "&Groupe" -#: gnome/dir.c:377 src/dir.c:377 +#: gnome/dir.c:378 src/dir.c:378 #, c-format msgid "File exists but can not be stat-ed: %s %s" msgstr "" -#: gnome/dir.c:632 src/dir.c:632 +#: gnome/dir.c:636 src/dir.c:636 msgid "Unknown" msgstr "Inconnu" @@ -1983,27 +1955,27 @@ msgid "mc.ext will be used for this moment." msgstr "mc.ext sera utilisé pour l'instant." -#: gnome/file.c:225 gnome/tree.c:1104 src/file.c:225 src/tree.c:1104 +#: gnome/file.c:161 gnome/tree.c:651 src/file.c:161 src/tree.c:651 msgid " Copy " msgstr " Copier " -#: gnome/file.c:226 gnome/tree.c:1140 src/file.c:226 src/tree.c:1140 +#: gnome/file.c:162 gnome/tree.c:689 src/file.c:162 src/tree.c:689 msgid " Move " msgstr " Déplacer " -#: gnome/file.c:227 gnome/tree.c:1205 src/file.c:227 src/tree.c:1205 +#: gnome/file.c:163 gnome/tree.c:759 src/file.c:163 src/tree.c:759 msgid " Delete " msgstr " Effacer " -#: gnome/file.c:310 src/file.c:310 +#: gnome/file.c:251 src/file.c:251 msgid " Invalid target mask " msgstr " Masque de cible invalid " -#: gnome/file.c:408 src/file.c:408 +#: gnome/file.c:349 src/file.c:349 msgid " Could not make the hardlink " msgstr " Impossible de créér le lien " -#: gnome/file.c:451 src/file.c:451 +#: gnome/file.c:391 src/file.c:391 #, c-format msgid "" " Cannot read source link \"%s\" \n" @@ -2013,7 +1985,7 @@ " \n" " %s " -#: gnome/file.c:461 src/file.c:461 +#: gnome/file.c:401 src/file.c:401 msgid "" " Cannot make stable symlinks across non-local filesystems: \n" "\n" @@ -2023,7 +1995,7 @@ "fichiers non-locaux: \n" " L'option Liens Symboliques Stables sera désactivée " -#: gnome/file.c:510 src/file.c:510 +#: gnome/file.c:449 src/file.c:449 #, c-format msgid "" " Cannot create target symlink \"%s\" \n" @@ -2032,7 +2004,7 @@ " Impossible de créér le lien symbolique cible \"%s\" \n" " %s " -#: gnome/file.c:571 src/file.c:571 +#: gnome/file.c:517 src/file.c:517 #, c-format msgid "" " Cannot overwrite directory \"%s\" \n" @@ -2041,7 +2013,7 @@ " Impossible d'écraser le répertoire \"%s\" \n" " %s " -#: gnome/file.c:581 src/file.c:581 +#: gnome/file.c:526 src/file.c:526 #, c-format msgid "" " Cannot stat source file \"%s\" \n" @@ -2050,12 +2022,12 @@ " Impossible d'ouvrir le fichier source \"%s\" \n" " %s " -#: gnome/file.c:595 src/file.c:595 +#: gnome/file.c:539 src/file.c:539 #, c-format msgid " `%s' and `%s' are the same file. " msgstr " Les fichiers `%s' et `%s' sont identiques. " -#: gnome/file.c:631 src/file.c:631 +#: gnome/file.c:572 src/file.c:572 #, c-format msgid "" " Cannot create special file \"%s\" \n" @@ -2064,7 +2036,7 @@ " Impossible d'ouvrir le fichier spécial \"%s\" \n" " %s " -#: gnome/file.c:641 gnome/file.c:865 src/file.c:641 src/file.c:865 +#: gnome/file.c:581 gnome/file.c:801 src/file.c:581 src/file.c:801 #, c-format msgid "" " Cannot chown target file \"%s\" \n" @@ -2073,7 +2045,7 @@ " Impossible d'exécuter chown sur le fichier cible \"%s\" \n" " %s " -#: gnome/file.c:650 gnome/file.c:881 src/file.c:650 src/file.c:881 +#: gnome/file.c:590 gnome/file.c:816 src/file.c:590 src/file.c:816 #, c-format msgid "" " Cannot chmod target file \"%s\" \n" @@ -2082,7 +2054,7 @@ " Impossible d'exécuter chmod sur le fichier cible \"%s\" \n" " %s " -#: gnome/file.c:664 src/file.c:664 +#: gnome/file.c:603 src/file.c:603 #, c-format msgid "" " Cannot open source file \"%s\" \n" @@ -2091,11 +2063,11 @@ " Impossible d'ouvrir le fichier source \"%s\" \n" " %s " -#: gnome/file.c:674 src/file.c:674 +#: gnome/file.c:613 src/file.c:613 msgid " Reget failed, about to overwrite file " msgstr "" -#: gnome/file.c:681 src/file.c:681 +#: gnome/file.c:619 src/file.c:619 #, c-format msgid "" " Cannot fstat source file \"%s\" \n" @@ -2104,7 +2076,7 @@ " Impossible d'exécuter fstat sur le fichier source \"%s\" \n" " %s " -#: gnome/file.c:703 src/file.c:703 +#: gnome/file.c:640 src/file.c:640 #, c-format msgid "" " Cannot create target file \"%s\" \n" @@ -2113,7 +2085,7 @@ " Impossible de créér le fichier cible \"%s\" \n" " %s " -#: gnome/file.c:718 src/file.c:718 +#: gnome/file.c:654 src/file.c:654 #, c-format msgid "" " Cannot fstat target file \"%s\" \n" @@ -2122,7 +2094,7 @@ " Impossible d'exécuter fstat sur le fichier cible \"%s\" \n" " %s " -#: gnome/file.c:749 src/file.c:749 +#: gnome/file.c:685 src/file.c:685 #, c-format msgid "" " Cannot read source file \"%s\" \n" @@ -2131,7 +2103,7 @@ " Impossible de lire le fichier source \"%s\" \n" " %s " -#: gnome/file.c:779 src/file.c:779 +#: gnome/file.c:715 src/file.c:715 #, c-format msgid "" " Cannot write target file \"%s\" \n" @@ -2140,11 +2112,11 @@ " Impossible d'écrire le fichier cible \"%s\" \n" " %s " -#: gnome/file.c:797 src/file.c:797 +#: gnome/file.c:734 src/file.c:734 msgid "(stalled)" msgstr "(ca rame à donf)" -#: gnome/file.c:836 src/file.c:836 +#: gnome/file.c:772 src/file.c:772 #, c-format msgid "" " Cannot close source file \"%s\" \n" @@ -2153,7 +2125,7 @@ " Impossible de fermer le fichier source \"%s\" \n" " %s " -#: gnome/file.c:846 src/file.c:846 +#: gnome/file.c:781 src/file.c:781 #, c-format msgid "" " Cannot close target file \"%s\" \n" @@ -2162,19 +2134,19 @@ " Impossible de fermer le fichier cible \"%s\" \n" " %s " -#: gnome/file.c:856 src/file.c:856 +#: gnome/file.c:791 src/file.c:791 msgid "Incomplete file was retrieved. Keep it?" msgstr "" -#: gnome/file.c:856 src/file.c:856 +#: gnome/file.c:792 src/file.c:792 msgid "&Delete" msgstr "&Effacer" -#: gnome/file.c:856 gnome/hotlist.c:1437 src/file.c:856 src/hotlist.c:1437 +#: gnome/file.c:792 gnome/hotlist.c:1438 src/file.c:792 src/hotlist.c:1438 msgid "&Keep" msgstr "" -#: gnome/file.c:925 src/file.c:925 +#: gnome/file.c:861 src/file.c:861 #, c-format msgid "" " Cannot stat source directory \"%s\" \n" @@ -2183,7 +2155,7 @@ " Impossible de lire le répertoire source \"%s\" \n" " %s " -#: gnome/file.c:948 src/file.c:948 +#: gnome/file.c:884 src/file.c:884 #, c-format msgid "" " Source directory \"%s\" is not a directory \n" @@ -2191,7 +2163,7 @@ msgstr " Le répertoire source \"%s\" n'en est pas un %s " #. we found a cyclic symbolic link -#: gnome/file.c:956 src/file.c:956 +#: gnome/file.c:892 src/file.c:892 #, c-format msgid "" " Cannot copy cyclic symbolic link \n" @@ -2200,7 +2172,7 @@ " Impossible de copier un lien symbolique cyclique \n" " `%s' " -#: gnome/file.c:1009 src/file.c:1009 +#: gnome/file.c:945 src/file.c:945 #, c-format msgid "" " Cannot create target directory \"%s\" \n" @@ -2209,7 +2181,7 @@ " Impossible de créér le répertoire cible \"%s\" \n" " %s " -#: gnome/file.c:1028 src/file.c:1028 +#: gnome/file.c:963 src/file.c:963 #, c-format msgid "" " Cannot chown target directory \"%s\" \n" @@ -2219,7 +2191,7 @@ " %s " #. Source doesn't exist -#: gnome/file.c:1140 src/file.c:1140 +#: gnome/file.c:1073 src/file.c:1073 #, c-format msgid "" " Cannot stat file \"%s\" \n" @@ -2228,17 +2200,17 @@ " Impossible d'ouvrir \"%s\" \n" " %s " -#: gnome/file.c:1162 src/file.c:1162 +#: gnome/file.c:1095 src/file.c:1095 #, c-format msgid " `%s' and `%s' are the same file " msgstr " `%s' et `%s' sont le même fichier " -#: gnome/file.c:1169 src/file.c:1169 +#: gnome/file.c:1102 src/file.c:1102 #, c-format msgid " Cannot overwrite directory `%s' " msgstr " Impossible d'écraser le répertoire `%s' " -#: gnome/file.c:1202 src/file.c:1202 +#: gnome/file.c:1135 src/file.c:1135 #, c-format msgid "" " Cannot move file \"%s\" to \"%s\" \n" @@ -2247,7 +2219,7 @@ " Impossible de déplacer le fichier \"%s\" vers \"%s\" \n" " %s " -#: gnome/file.c:1222 src/file.c:1222 +#: gnome/file.c:1155 src/file.c:1155 #, c-format msgid "" " Cannot remove file \"%s\" \n" @@ -2256,17 +2228,17 @@ " Impossible de supprimer le fichier \"%s\" \n" " %s " -#: gnome/file.c:1271 src/file.c:1271 +#: gnome/file.c:1205 src/file.c:1205 #, c-format msgid " Cannot overwrite directory \"%s\" %s " msgstr " Impossible d'écraser le répertoire \"%s\" %s " -#: gnome/file.c:1273 src/file.c:1273 +#: gnome/file.c:1207 src/file.c:1207 #, c-format msgid " Cannot overwrite file \"%s\" %s " msgstr " Impossible d'écraser le fichier \"%s\" %s " -#: gnome/file.c:1296 src/file.c:1296 +#: gnome/file.c:1230 src/file.c:1230 #, c-format msgid "" " Cannot move directory \"%s\" to \"%s\" \n" @@ -2275,7 +2247,7 @@ " Impossible de déplacer le répertoire \"%s\" dans \"%s\" \n" " %s " -#: gnome/file.c:1352 src/file.c:1352 +#: gnome/file.c:1293 src/file.c:1293 #, c-format msgid "" " Cannot delete file \"%s\" \n" @@ -2284,8 +2256,8 @@ " Impossible de supprimer \"%s\" \n" " %s " -#: gnome/file.c:1405 gnome/file.c:1472 gnome/file.c:1501 src/file.c:1405 -#: src/file.c:1472 src/file.c:1501 +#: gnome/file.c:1351 gnome/file.c:1418 gnome/file.c:1447 src/file.c:1351 +#: src/file.c:1418 src/file.c:1447 #, c-format msgid "" " Cannot remove directory \"%s\" \n" @@ -2294,257 +2266,261 @@ " Impossible de supprimer le répertoire \"%s\" \n" " %s " -#: gnome/file.c:1537 src/file.c:1537 +#: gnome/file.c:1483 src/file.c:1483 msgid " Internal error: get_file \n" msgstr " Erreur interne: get_file\n" -#: gnome/file.c:1700 src/file.c:1700 +#. +#. * This array introduced to avoid translation problems. The former (op_names) +#. * is assumed to be nouns, suitable in dialog box titles; this one should +#. * contain whatever is used in prompt itself (i.e. in russian, it's verb). +#. * Notice first symbol - it is to fool gettext and force these strings to +#. * be different for it. First symbol is skipped while building a prompt. +#. * (I don't use spaces around the words, because someday they could be +#. * dropped, when widgets get smarter) +#. +#: gnome/file.c:1604 src/file.c:1604 +msgid "1Copy" +msgstr "1Copier" + +#: gnome/file.c:1604 src/file.c:1604 +msgid "1Move" +msgstr "1Déplacer" + +#: gnome/file.c:1604 src/file.c:1604 +msgid "1Delete" +msgstr "1Effacer" + +#: gnome/file.c:1619 src/file.c:1619 +#, c-format +msgid "%o %f \"%s\"%m" +msgstr "" + +#: gnome/file.c:1620 src/file.c:1620 +#, c-format +msgid "%o %d %f%m" +msgstr "" + +#: gnome/file.c:1622 src/file.c:1622 +#, c-format +msgid "%o %f \"%s\"%e" +msgstr "" + +#: gnome/file.c:1623 src/file.c:1623 +#, c-format +msgid "%o %d %f%e" +msgstr "" + +#: gnome/file.c:1627 src/file.c:1627 +msgid "file" +msgstr "fichier" + +#: gnome/file.c:1627 src/file.c:1627 +msgid "files" +msgstr "fichiers" + +#: gnome/file.c:1627 src/file.c:1627 +msgid "directory" +msgstr "répertoire" + +#: gnome/file.c:1627 src/file.c:1627 +msgid "directories" +msgstr "répertoires" + +#: gnome/file.c:1628 src/file.c:1628 +msgid "files/directories" +msgstr "fichiers/répertoires" + +#: gnome/file.c:1628 src/file.c:1628 +msgid " with source mask:" +msgstr "" + +#: gnome/file.c:1776 src/file.c:1776 msgid " Can't operate on \"..\"! " msgstr " Impossible d'opérer sur \"..\"! " -#: gnome/file.c:1761 src/file.c:1761 +#: gnome/file.c:1795 src/file.c:1795 +msgid "Yes" +msgstr "Oui" + +#: gnome/file.c:1795 src/file.c:1795 +msgid "No" +msgstr "Non" + +#: gnome/file.c:1848 src/file.c:1848 msgid " Sorry, I could not put the job in background " msgstr " Désolé, je ne peux pas passer la tâche en tâche de fond " -#: gnome/file.c:1850 gnome/file.c:1943 src/file.c:1850 src/file.c:1943 +#: gnome/file.c:1931 gnome/file.c:2036 src/file.c:1931 src/file.c:2036 msgid " Internal failure " msgstr " Erreur interne " -#: gnome/file.c:1850 gnome/file.c:1944 src/file.c:1850 src/file.c:1944 +#: gnome/file.c:1931 gnome/file.c:2036 src/file.c:1931 src/file.c:2036 msgid " Unknown file operation " msgstr " Opération sur fichier inconnue " -#: gnome/file.c:1866 src/file.c:1866 +#: gnome/file.c:1950 src/file.c:1950 #, c-format msgid "" " Destination \"%s\" must be a directory \n" " %s " msgstr " La destination \"%s\" doit être un répertoire %s " -#: gnome/file.c:2045 gnome/filegui.c:248 src/file.c:2045 src/filegui.c:248 +#: gnome/file.c:2121 gnome/filegui.c:268 src/file.c:2121 src/filegui.c:268 msgid "&Skip" msgstr "&Suivant" -#: gnome/file.c:2045 src/file.c:2045 +#: gnome/file.c:2121 src/file.c:2121 msgid "&Retry" msgstr "&Re-essayer" -#: gnome/file.c:2045 gnome/file.c:2103 gnome/filegui.c:245 gnome/filegui.c:485 -#: gnome/temp-hack.c:63 src/file.c:2045 src/file.c:2103 src/filegui.c:245 -#: src/filegui.c:485 +#: gnome/file.c:2121 gnome/file.c:2179 gnome/filegui.c:265 gnome/filegui.c:567 +#: src/file.c:2121 src/file.c:2179 src/filegui.c:265 src/filegui.c:567 msgid "&Abort" msgstr "&Interrompre" -#: gnome/file.c:2094 src/file.c:2094 +#: gnome/file.c:2170 src/file.c:2170 msgid "" "\n" " Directory not empty. \n" " Delete it recursively? " msgstr "" -#: gnome/file.c:2095 src/file.c:2095 +#: gnome/file.c:2171 src/file.c:2171 msgid "" "\n" " Background process: Directory not empty \n" " Delete it recursively? " msgstr "" -#: gnome/file.c:2102 src/file.c:2102 +#: gnome/file.c:2178 src/file.c:2178 msgid "a&ll" msgstr "" -#: gnome/file.c:2102 gnome/filegui.c:488 gnome/temp-hack.c:66 src/file.c:2102 -#: src/filegui.c:488 +#: gnome/file.c:2178 gnome/filegui.c:570 src/file.c:2178 src/filegui.c:570 msgid "non&E" msgstr "" -#: gnome/file.c:2112 src/file.c:2112 +#: gnome/file.c:2188 src/file.c:2188 msgid " Type 'yes' if you REALLY want to delete " msgstr " Tapez 'yes' si vous voulez vraiment effacer " -#: gnome/file.c:2114 src/file.c:2114 +#: gnome/file.c:2190 src/file.c:2190 msgid "all the directories " msgstr "tous les répertoires " -#: gnome/file.c:2116 src/file.c:2116 +#: gnome/file.c:2192 src/file.c:2192 msgid " Recursive Delete " msgstr " Délétion Récursive " -#: gnome/file.c:2117 src/file.c:2117 +#: gnome/file.c:2193 src/file.c:2193 msgid " Background process: Recursive Delete " msgstr " Tâche de fond: Délétion Récursive " -#. -#. Cause emacs to enter folding mode for this file: -#. Local variables: -#. end: -#. -#. -#. * This array introduced to avoid translation problems. The former (op_names) -#. * is assumed to be nouns, suitable in dialog box titles; this one should -#. * contain whatever is used in prompt itself (i.e. in russian, it's verb). -#. * Notice first symbol - it is to fool gettext and force these strings to -#. * be different for it. First symbol is skipped while building a prompt. -#. * (I don't use spaces around the words, because someday they could be -#. * dropped, when widgets get smarter) -#. -#: gnome/file.c:2205 src/file.c:2205 -msgid "1Copy" -msgstr "1Copier" - -#: gnome/file.c:2205 src/file.c:2205 -msgid "1Move" -msgstr "1Déplacer" - -#: gnome/file.c:2205 src/file.c:2205 -msgid "1Delete" -msgstr "1Effacer" - -#: gnome/file.c:2220 src/file.c:2220 -#, c-format -msgid "%o %f \"%s\"%m" -msgstr "" - -#: gnome/file.c:2221 src/file.c:2221 -#, c-format -msgid "%o %d %f%m" -msgstr "" - -#: gnome/file.c:2223 src/file.c:2223 -#, c-format -msgid "%o %f \"%s\"%e" -msgstr "" - -#: gnome/file.c:2224 src/file.c:2224 -#, c-format -msgid "%o %d %f%e" -msgstr "" - -#: gnome/file.c:2228 src/file.c:2228 -msgid "file" -msgstr "fichier" - -#: gnome/file.c:2228 src/file.c:2228 -msgid "files" -msgstr "fichiers" - -#: gnome/file.c:2228 src/file.c:2228 -msgid "directory" -msgstr "répertoire" - -#: gnome/file.c:2228 src/file.c:2228 -msgid "directories" -msgstr "répertoires" - -#: gnome/file.c:2229 src/file.c:2229 -msgid "files/directories" -msgstr "fichiers/répertoires" - -#: gnome/file.c:2229 src/file.c:2229 -msgid " with source mask:" -msgstr "" - -#: gnome/filegui.c:375 src/filegui.c:375 +#: gnome/filegui.c:430 src/filegui.c:430 msgid "Count" msgstr "Compter" -#: gnome/filegui.c:387 src/filegui.c:387 +#: gnome/filegui.c:449 src/filegui.c:449 msgid "Bytes" msgstr "Octets" -#: gnome/filegui.c:416 src/filegui.c:416 +#: gnome/filegui.c:484 src/filegui.c:484 msgid "Source" msgstr "Source" -#: gnome/filegui.c:430 src/filegui.c:430 +#: gnome/filegui.c:505 src/filegui.c:505 msgid "Target" msgstr "Cible" -#: gnome/filegui.c:443 src/filegui.c:443 +#: gnome/filegui.c:525 src/filegui.c:525 msgid "Deleting" msgstr "Effacement" -#: gnome/filegui.c:483 gnome/temp-hack.c:61 src/filegui.c:483 +#: gnome/filegui.c:565 src/filegui.c:565 #, c-format msgid "Target file \"%s\" already exists!" msgstr "Le fichier cible \"%s\" existe déjà!" -#: gnome/filegui.c:486 gnome/temp-hack.c:64 src/filegui.c:486 +#: gnome/filegui.c:568 src/filegui.c:568 msgid "if &Size differs" msgstr "&Si la taille différe" -#: gnome/filegui.c:489 gnome/temp-hack.c:67 src/filegui.c:489 +#: gnome/filegui.c:571 src/filegui.c:571 msgid "&Update" msgstr "" -#: gnome/filegui.c:490 gnome/temp-hack.c:68 src/filegui.c:490 +#: gnome/filegui.c:572 src/filegui.c:572 msgid "al&L" msgstr "" -#: gnome/filegui.c:491 gnome/temp-hack.c:69 src/filegui.c:491 +#: gnome/filegui.c:573 src/filegui.c:573 msgid "Overwrite all targets?" msgstr "" -#: gnome/filegui.c:493 gnome/temp-hack.c:71 src/filegui.c:493 +#: gnome/filegui.c:575 src/filegui.c:575 msgid "&Reget" msgstr "" -#: gnome/filegui.c:494 gnome/temp-hack.c:72 src/filegui.c:494 +#: gnome/filegui.c:576 src/filegui.c:576 msgid "ap&Pend" msgstr "" -#: gnome/filegui.c:497 gnome/temp-hack.c:75 src/filegui.c:497 +#: gnome/filegui.c:579 src/filegui.c:579 msgid "Overwrite this target?" msgstr "" -#: gnome/filegui.c:499 gnome/temp-hack.c:77 src/filegui.c:499 +#: gnome/filegui.c:581 src/filegui.c:581 #, c-format msgid "Target date: %s, size %d" msgstr "" -#: gnome/filegui.c:501 gnome/temp-hack.c:79 src/filegui.c:501 +#: gnome/filegui.c:583 src/filegui.c:583 #, c-format msgid "Source date: %s, size %d" msgstr "" -#: gnome/filegui.c:589 gnome/temp-hack.c:167 src/filegui.c:589 +#: gnome/filegui.c:667 src/filegui.c:667 msgid " File exists " msgstr " Le fichier existe " -#: gnome/filegui.c:589 gnome/temp-hack.c:167 src/filegui.c:589 +#: gnome/filegui.c:668 src/filegui.c:668 msgid " Background process: File exists " msgstr "" #. follow symlinks and preserve Attributes must be the first -#: gnome/filegui.c:683 src/filegui.c:683 +#: gnome/filegui.c:778 src/filegui.c:778 msgid "preserve &Attributes" msgstr "preserver les &Attributs" -#: gnome/filegui.c:685 src/filegui.c:685 +#. &op_preserve +#: gnome/filegui.c:780 src/filegui.c:780 msgid "follow &Links" msgstr "suivre les &Liens" -#: gnome/filegui.c:694 src/filegui.c:694 +#. &file_mask_op_follow_links +#: gnome/filegui.c:782 src/filegui.c:782 msgid "to:" msgstr "vers:" -#: gnome/filegui.c:695 src/filegui.c:695 +#: gnome/filegui.c:783 src/filegui.c:783 msgid "&Using shell patterns" msgstr "&Utiliser les \"shell patterns\"" -#: gnome/filegui.c:716 src/filegui.c:716 +#: gnome/filegui.c:804 src/filegui.c:804 msgid "&Background" msgstr "&Fond" -#: gnome/filegui.c:725 src/filegui.c:725 +#: gnome/filegui.c:813 src/filegui.c:813 msgid "&Stable Symlinks" msgstr "Lien Symboliques &Stables" -#: gnome/filegui.c:727 src/filegui.c:727 +#. &file_mask_stable_symlinks +#: gnome/filegui.c:815 src/filegui.c:815 msgid "&Dive into subdir if exists" msgstr "&Plonger dans le sous-répertoire s'il existe" -#: gnome/filegui.c:875 src/filegui.c:875 +#: gnome/filegui.c:974 src/filegui.c:974 #, c-format msgid "" "Invalid source pattern `%s' \n" @@ -2583,54 +2559,54 @@ msgid "&Edit - F4" msgstr "&Editer - F4" -#: gnome/find.c:153 src/find.c:153 +#: gnome/find.c:155 src/find.c:155 msgid "Start at:" msgstr "Commencer à:" -#: gnome/find.c:153 src/find.c:153 +#: gnome/find.c:155 src/find.c:155 msgid "Filename:" msgstr "Nom du Fichier:" -#: gnome/find.c:153 src/find.c:153 +#: gnome/find.c:155 src/find.c:155 msgid "Content: " msgstr "Contenu: " -#: gnome/find.c:154 gnome/main.c:1207 gnome/main.c:1228 src/find.c:154 -#: src/main.c:1207 src/main.c:1228 +#: gnome/find.c:156 gnome/main.c:1201 gnome/main.c:1222 src/find.c:156 +#: src/main.c:1201 src/main.c:1222 msgid "&Tree" msgstr "&Arbre" -#: gnome/find.c:206 src/find.c:206 +#: gnome/find.c:208 src/find.c:208 msgid "Find File" msgstr "Trouver Fichier" -#: gnome/find.c:433 src/find.c:433 +#: gnome/find.c:435 src/find.c:435 #, c-format msgid "Grepping in %s" msgstr "Recherche dans %s" -#: gnome/find.c:471 src/find.c:471 +#: gnome/find.c:473 src/find.c:473 msgid " Find/read " msgstr " Trouver/lire " -#: gnome/find.c:471 src/find.c:471 +#: gnome/find.c:473 src/find.c:473 msgid " Problem reading from child " msgstr "" -#: gnome/find.c:515 src/find.c:515 +#: gnome/find.c:520 src/find.c:520 msgid "Finished" msgstr "Terminé" -#: gnome/find.c:535 gnome/view.c:1450 src/find.c:535 src/view.c:1450 +#: gnome/find.c:544 gnome/view.c:1450 src/find.c:544 src/view.c:1450 #, c-format msgid "Searching %s" msgstr "Recherche de %s" -#: gnome/find.c:667 gnome/find.c:784 src/find.c:667 src/find.c:784 +#: gnome/find.c:676 gnome/find.c:793 src/find.c:676 src/find.c:793 msgid "Searching" msgstr "" -#: gnome/find.c:759 src/find.c:759 +#: gnome/find.c:768 src/find.c:768 msgid "Find file" msgstr "Trouver fichier" @@ -2652,122 +2628,284 @@ " Index:\n" "\n" -#: gnome/gcmd.c:43 +#: gnome/gcmd.c:56 msgid " There is no other panel to compare contents to " msgstr " Il n'y a pas d'autre panel pour faire une comparaison " -#: gnome/gcmd.c:78 gnome/gmc-window.c:68 +#: gnome/gcmd.c:91 msgid "GNU Midnight Commander" msgstr "GNU Midnight Commander" -#: gnome/gcmd.c:81 gnome/gmc-window.c:71 +#: gnome/gcmd.c:94 msgid "The GNOME edition of the Midnight Commander file manager." msgstr "L'édition GNOME du gestionnaire de fichiers Midnight Comander." -#: gnome/gcmd.c:93 gnome/main.c:813 gnome/olddnd.c:1461 gnome/screen.c:2034 -#: src/main.c:813 src/screen.c:2034 +#: gnome/gcmd.c:106 gnome/main.c:820 gnome/olddnd.c:1534 gnome/screen.c:2063 +#: src/main.c:820 src/screen.c:2063 msgid " The Midnight Commander " msgstr " Midnight Commander " -#: gnome/gcmd.c:94 gnome/main.c:814 src/main.c:814 +#: gnome/gcmd.c:107 gnome/main.c:821 src/main.c:821 msgid " Do you really want to quit the Midnight Commander? " msgstr " Voulez-vous vraiment quitter Midnight Commander? " -#: gnome/gdesktop.c:326 gnome/gdesktop.c:1229 +#: gnome/gcmd.c:206 +msgid "Sort By" +msgstr "Trier Par" + +#. we define this up here so we can pass it in to our callback +#: gnome/gcmd.c:209 +msgid "Ignore case sensitivity." +msgstr "Ignorer la case." + +#: gnome/gcmd.c:224 +msgid "File Type" +msgstr "Type de Fichier" + +#: gnome/gcmd.c:230 gnome/screen.c:443 gnome/screen.c:446 src/screen.c:443 +#: src/screen.c:446 +msgid "Size" +msgstr "Taille" + +#: gnome/gcmd.c:236 +msgid "Time Last Accessed" +msgstr "" + +#: gnome/gcmd.c:242 +msgid "Time Last Modified" +msgstr "" + +#: gnome/gcmd.c:248 +msgid "Time Last Changed" +msgstr "" + +#: gnome/gcmd.c:262 +msgid "Reverse the order." +msgstr "" + +#: gnome/gcmd.c:324 +msgid "Enter name." +msgstr "Entrez le nom." + +#: gnome/gcmd.c:329 +msgid "Enter label for command:" +msgstr "" + +#: gnome/gcmd.c:424 +msgid "Find all core files" +msgstr "Trouver tous les fichiers core" + +#: gnome/gcmd.c:427 gnome/panelize.c:354 src/panelize.c:354 +msgid "Find rejects after patching" +msgstr "" + +#: gnome/gcmd.c:469 +msgid "Run Command" +msgstr "Exécuter Commande" + +#. Frame 1 +#: gnome/gcmd.c:473 +#, fuzzy +msgid "Preset Commands" +msgstr " Commande " + +#: gnome/gcmd.c:490 +msgid "Add" +msgstr "Ajouter" + +#: gnome/gcmd.c:494 +msgid "Remove" +msgstr "Supprimer" + +#. Frame 2 +#: gnome/gcmd.c:502 +msgid "Run this Command" +msgstr "Exécuter cette Commande" + +#: gnome/gcmd.c:509 +msgid "Command: " +msgstr "Commande: " + +#: gnome/gcmd.c:553 +#, fuzzy +msgid "Set Filter" +msgstr " Filtre " + +#: gnome/gcmd.c:557 gnome/gcmd.c:598 gnome/gcmd.c:603 gnome/gcmd.c:607 +#: gnome/gscreen.c:2337 +msgid "Show all files" +msgstr "Montrer tous les fichiers" + +#: gnome/gcmd.c:564 +msgid "." +msgstr "" + +#: gnome/gcmd.c:580 +msgid "" +"Enter a filter here for files in the panel view.\n" +"\n" +"For example:\n" +"*.gif will show just gif images" +msgstr "" + +#: gnome/gcmd.c:582 +msgid "Enter a Regular Expression to filter files in the panel view." +msgstr "" + +#: gnome/gcmd.c:639 gnome/gpopup.c:47 +msgid " Open with..." +msgstr " Ouvrir avec..." + +#: gnome/gcmd.c:640 gnome/gpopup.c:48 gnome/olddnd.c:1546 +msgid "Enter extra arguments:" +msgstr "Entrez les arguments supplémentaires:" + +#: gnome/gdesktop.c:350 gnome/gdesktop.c:1387 msgid "Warning" msgstr "Avertissement" -#: gnome/gdesktop.c:327 +#: gnome/gdesktop.c:351 #, c-format msgid "Could not open %s; will not have initial desktop icons" msgstr "" -#: gnome/gdesktop.c:1195 +#: gnome/gdesktop.c:1353 msgid "Trashcan" msgstr "" #. Create the link to the user's home directory so that he will have an icon -#: gnome/gdesktop.c:1225 +#: gnome/gdesktop.c:1383 msgid "Home directory" msgstr "Répertoire 'Home'" -#: gnome/gdesktop.c:1230 +#: gnome/gdesktop.c:1388 #, c-format msgid "Could not symlink %s to %s; will not have initial desktop icons." msgstr "" -#: gnome/gdialogs.c:214 -#, fuzzy +#: gnome/gdialogs.c:324 +msgid "Files Exist" +msgstr "Des fichier existent" + +#: gnome/gdialogs.c:335 +msgid "" +"Some of the files you are trying to copy already exist in the destination " +"folder." +msgstr "" + +#: gnome/gdialogs.c:344 +msgid "Prompt me before overwriting any file." +msgstr "" + +#: gnome/gdialogs.c:351 +msgid "Don't overwrite any files." +msgstr "N'écraser aucun fichier." + +#: gnome/gdialogs.c:363 +msgid "Overwrite:" +msgstr "Ecraser:" + +#: gnome/gdialogs.c:370 +msgid "Older files." +msgstr "Anciens fichiers." + +#: gnome/gdialogs.c:376 +msgid "Files only if size differs." +msgstr "Fichiers seulement si la taille différe." + +#: gnome/gdialogs.c:382 +msgid "All files." +msgstr "Tous les fichiers." + +#: gnome/gdialogs.c:431 +msgid "File Exists" +msgstr "Le fichier existe" + +#: gnome/gdialogs.c:436 +#, c-format +msgid "The target file already exists: %s" +msgstr "Le fichier cible existe déjà: %s" + +#: gnome/gdialogs.c:443 +msgid "Replace it?" +msgstr "Le remplacer?" + +#: gnome/gdialogs.c:532 msgid "Destination" -msgstr "Animation" +msgstr "Destination" -#: gnome/gdialogs.c:218 +#: gnome/gdialogs.c:536 msgid "Find Destination Folder" -msgstr "" +msgstr "Trouver le Répertoire de Destination" -#: gnome/gdialogs.c:223 -#, fuzzy +#: gnome/gdialogs.c:541 msgid "Copy as a background process" -msgstr "Tâche de fond:" +msgstr "Copier en tâche de fond" -#: gnome/gdialogs.c:243 -#, fuzzy +#: gnome/gdialogs.c:561 msgid "Advanced Options" -msgstr "Options du panel" +msgstr "Options Avancées" -#: gnome/gdialogs.c:247 -#, fuzzy +#: gnome/gdialogs.c:565 msgid "Preserve symlinks" -msgstr " lien symbolique relatif: %s " +msgstr "Préserver les liens symboliques" -#: gnome/gdialogs.c:257 -#, fuzzy +#: gnome/gdialogs.c:575 msgid "Follow links." -msgstr "suivre les &Liens" +msgstr "Suivre les liens." -#: gnome/gdialogs.c:264 -#, fuzzy +#: gnome/gdialogs.c:580 +msgid "" +"Selecting this will copy the files that symlinks point to instead of just " +"copying the link." +msgstr "" + +#: gnome/gdialogs.c:584 msgid "Preserve file attributes." -msgstr "preserver les &Attributs" +msgstr "Préserver les attributs de fichiers." -#: gnome/gdialogs.c:272 -#, fuzzy +#: gnome/gdialogs.c:588 +msgid "Preserves the permissions and the UID/GID if possible" +msgstr "Préserve les permissions et UID/GID si possible" + +#: gnome/gdialogs.c:593 msgid "Recursively copy subdirectories." -msgstr "Répertoires VFS actifs" +msgstr "Copie récursive des sous-répertoires." -#: gnome/gdialogs.c:409 -#, fuzzy +#: gnome/gdialogs.c:597 +msgid "If set, this will copy the directories recursively" +msgstr "" + +#: gnome/gdialogs.c:751 msgid "File " -msgstr " Fichier " +msgstr "Fichier " -#: gnome/gdialogs.c:413 -#, fuzzy +#: gnome/gdialogs.c:755 msgid " is " -msgstr " Oui " +msgstr " est " -#: gnome/gdialogs.c:416 -#, fuzzy +#: gnome/gdialogs.c:758 msgid " Done." -msgstr "Aucun" +msgstr " Terminé." -#: gnome/gdnd.c:23 +#: gnome/gdnd.c:24 msgid "Move here" msgstr "Déplacer ici" -#: gnome/gdnd.c:24 +#: gnome/gdnd.c:25 msgid "Copy here" msgstr "Copier ici" -#: gnome/gdnd.c:25 +#: gnome/gdnd.c:26 msgid "Link here" msgstr "Lier ici" -#: gnome/gdnd.c:27 +#: gnome/gdnd.c:28 msgid "Cancel drag" msgstr "" #. FIXME: this error message sucks -#: gnome/gdnd.c:205 +#: gnome/gdnd.c:207 #, c-format msgid "" "Could not stat %s\n" @@ -2776,7 +2914,7 @@ " Impossible d'ouvrir %s\n" " %s " -#: gnome/gicon.c:83 gnome/gtools.c:48 +#: gnome/gicon.c:83 gnome/gtools.c:50 msgid "Error" msgstr "Erreur" @@ -2784,357 +2922,292 @@ msgid "Default set of icons not found, check your installation" msgstr "" -#: gnome/glayout.c:268 -msgid "_New window" +#: gnome/glayout.c:273 +msgid "Enter command to run" +msgstr "Entrer la commande à exécuter" + +#: gnome/glayout.c:283 +msgid "_Terminal" +msgstr "_Terminal" + +#: gnome/glayout.c:283 +msgid "Launch a new terminal in the current directory" +msgstr "" + +#. If this ever changes, make sure you update create_new_menu accordingly. +#: gnome/glayout.c:285 +msgid "_Directory..." +msgstr "_Répertoire..." + +#: gnome/glayout.c:285 +msgid "Creates a new directory" +msgstr "Créé un nouveau répertoire" + +#: gnome/glayout.c:291 +msgid "New _Window" msgstr "_Nouvelle fenêtre" -#: gnome/glayout.c:268 +#: gnome/glayout.c:291 msgid "Opens a new window" msgstr "Ouvre une nouvelle fenêtre" -#: gnome/glayout.c:269 -msgid "New _Terminal" -msgstr "Nouveau _Terminal" - -#: gnome/glayout.c:269 -msgid "Opens a terminal" -msgstr "Ouvre un terminal" +#. We want to make a new menu entry here... +#. For example: +#. New-> +#. Command Prompt +#. Gimp Image +#. Gnumeric Spreadsheet +#. Text Document +#. etc... +#: gnome/glayout.c:301 +msgid "_New" +msgstr "_Nouveau" + +#: gnome/glayout.c:303 +msgid "_Open" +msgstr "_Ouvrir" + +#: gnome/glayout.c:303 +msgid "Opens the selected files" +msgstr "Ouvre les fichiers sélectionnés" -#: gnome/glayout.c:271 +#. { GNOME_APP_UI_ITEM, N_("Open _FTP site"), N_("Opens an FTP site"), ftplink_cmd }, +#: gnome/glayout.c:305 msgid "_Copy..." msgstr "_Copier..." -#: gnome/glayout.c:271 +#: gnome/glayout.c:305 msgid "Copy files" msgstr "Copier les fichiers" -#: gnome/glayout.c:272 -msgid "Rename/_Move..." -msgstr "Reno_mer/Déplacer..." - -#: gnome/glayout.c:272 -msgid "Rename or move files" -msgstr "Renommer ou déplacer fichiers" - -#: gnome/glayout.c:273 -msgid "New di_rectory..." -msgstr "Nouveau _répertoire..." - -#: gnome/glayout.c:273 -msgid "Creates a new folder" -msgstr "Créér un nouveau répertoire" - -#: gnome/glayout.c:274 +#: gnome/glayout.c:306 msgid "_Delete..." msgstr "_Effacer..." -#: gnome/glayout.c:274 +#: gnome/glayout.c:306 msgid "Delete files from disk" msgstr "Effacer les fichiers du disque" -#: gnome/glayout.c:276 gnome/gmc-window.c:120 -msgid "_View" -msgstr "_Voir" +#: gnome/glayout.c:307 +msgid "_Move..." +msgstr "_Déplacer..." + +#: gnome/glayout.c:307 +msgid "Rename or move files" +msgstr "Renommer ou déplacer fichiers" -#: gnome/glayout.c:276 -msgid "View file" -msgstr "Voir fichier" +#: gnome/glayout.c:309 +msgid "C_lose" +msgstr "_Fermer" -#: gnome/glayout.c:277 -msgid "View r_aw" -msgstr "_Voir" +#: gnome/glayout.c:309 +msgid "Close this panel" +msgstr "Fermer de panel" -#: gnome/glayout.c:277 -msgid "View the file without further processing" -msgstr "" +#: gnome/glayout.c:320 +msgid "_Select All" +msgstr "Tout _Sélectionner" + +#: gnome/glayout.c:320 +msgid "Select all files in the current Panel" +msgstr "Sélectionner tous les fichier du panel courant" -#: gnome/glayout.c:279 -msgid "_Select group by pattern..." -msgstr "_Sélectionner groupe par motif..." +#: gnome/glayout.c:321 +msgid "_Select Files..." +msgstr "_Sélectionner Fichiers..." -#: gnome/glayout.c:279 +#: gnome/glayout.c:321 msgid "Select a group of files" msgstr "Sélectionner un groupe de fichiers" -#: gnome/glayout.c:280 -msgid "_Unselect group by pattern..." -msgstr "_Désélectionner groupe par motif..." - -#: gnome/glayout.c:280 -msgid "Un-selects a group of marked files" -msgstr "Désélectionner un groupe de fichiers marqués" - -#: gnome/glayout.c:281 -msgid "R_everse selection" -msgstr "Inv_erser la sélection" +#: gnome/glayout.c:322 +msgid "_Invert Selection" +msgstr "_Inverser la Sélection" -#: gnome/glayout.c:281 +#: gnome/glayout.c:322 msgid "Reverses the list of tagged files" msgstr "" -#: gnome/glayout.c:283 -msgid "C_lose" -msgstr "_Fermer" +#: gnome/glayout.c:324 +msgid "_Rescan Directory" +msgstr "_Rafraichir Répertoire" -#: gnome/glayout.c:283 -msgid "Close this panel" -msgstr "Fermer de panel" - -#: gnome/glayout.c:285 gnome/gmc-window.c:88 -msgid "E_xit" -msgstr "_Quiter" - -#: gnome/glayout.c:285 -msgid "Exit program" -msgstr "Quitter" - -#: gnome/glayout.c:292 -msgid "_Display mode..." -msgstr "Mode _d'affichage..." - -#: gnome/glayout.c:292 -msgid "Set the display mode for the panel" -msgstr "Configurer le mode d'affichage pour le panel" - -#: gnome/glayout.c:293 -msgid "_Sort order..." -msgstr "Ordre de _tri..." - -#: gnome/glayout.c:293 -msgid "Changes the sort order of the files" -msgstr "Changer l'ordre de tri des fichiers" - -#: gnome/glayout.c:294 -msgid "_Filter..." -msgstr "_Filtre.." - -#: gnome/glayout.c:294 -msgid "Set a filter for the files" -msgstr "Définir un filtre pour les fichiers" - -#: gnome/glayout.c:295 -msgid "_Rescan" -msgstr "_Rafraichir" - -#: gnome/glayout.c:295 +#: gnome/glayout.c:324 msgid "Rescan the directory contents" msgstr "Raffraichir le contenu du répertoire" -#: gnome/glayout.c:298 -msgid "_Network link..." -msgstr "_Lien Réseau..." - -#: gnome/glayout.c:298 -msgid "Connect to a remote machine" -msgstr "Connection à une machine distante" - -#: gnome/glayout.c:299 -msgid "FT_P link..." -msgstr "Lien FT_P..." - -#: gnome/glayout.c:299 -msgid "Connect to a remote machine with FTP" -msgstr "Connection à une machine distante par FTP" - -#: gnome/glayout.c:305 -msgid "_Confirmation..." -msgstr "_Confirmation..." +#: gnome/glayout.c:331 +msgid "Icon View" +msgstr "Vue par Icones" + +#: gnome/glayout.c:332 +msgid "Partial View" +msgstr "Vue Partielle" + +#: gnome/glayout.c:333 +msgid "Full View" +msgstr "Vue Compléte" + +#: gnome/glayout.c:334 gnome/gprefs.c:88 +msgid "Custom View" +msgstr "Vue Personalisée" + +#: gnome/glayout.c:340 +msgid "_Sort By..." +msgstr "_Trier Par..." -#: gnome/glayout.c:305 +#: gnome/glayout.c:340 msgid "Confirmation settings" msgstr "Paramétres de confirmation" -#: gnome/glayout.c:306 -msgid "_Options..." -msgstr "_Options..." +#: gnome/glayout.c:341 +msgid "_Filter View..." +msgstr "_Vue Filtrée.." -#: gnome/glayout.c:306 +#: gnome/glayout.c:341 msgid "Global option settings" -msgstr "Configuration globale" - -#: gnome/glayout.c:309 -msgid "_Virtual FS..." -msgstr "SF _Virtuel..." - -#: gnome/glayout.c:309 -msgid "Virtual File System settings" -msgstr "Configuration du Système de Fichiers Virtuel" +msgstr "Configuration globale" -#: gnome/glayout.c:312 -msgid "_Save setup" -msgstr "_Enregistrer la configuration" - -#: gnome/glayout.c:317 -msgid "_Find..." -msgstr "_Chercher..." +#: gnome/glayout.c:348 +msgid "_Find File..." +msgstr "_Trouver Fichier..." -#: gnome/glayout.c:317 +#: gnome/glayout.c:348 msgid "Locate files on disk" msgstr "Localiser des fichiers" -#: gnome/glayout.c:318 -msgid "_Hotlist..." -msgstr "_Hotlist..." - -#: gnome/glayout.c:318 -msgid "List of favorite sites" -msgstr "Liste des sites favoris" - -#: gnome/glayout.c:319 +#: gnome/glayout.c:351 msgid "_Compare panels..." msgstr "_Comparer panels..." -#: gnome/glayout.c:319 -msgid "Compare panel contents" +#: gnome/glayout.c:351 +msgid "Compare two panel contents" msgstr "Comparer le contenu des panels" -#: gnome/glayout.c:320 -msgid "_External panelize..." +#: gnome/glayout.c:352 +msgid "_Run Command..." +msgstr "_Exécuter Commande..." + +#: gnome/glayout.c:352 +msgid "Runs a command" +msgstr "Exécuter une commande" + +#: gnome/glayout.c:354 +#, fuzzy +msgid "_Run Command in panel..." +msgstr "_Comparer panels..." + +#: gnome/glayout.c:354 +msgid "Run a command and put the results in a panel" msgstr "" -#: gnome/glayout.c:322 +#: gnome/glayout.c:357 msgid "_Active VFS list..." msgstr "Liste des VFS _actifs..." -#: gnome/glayout.c:322 +#: gnome/glayout.c:357 msgid "List of active virtual file systems" msgstr "Liste des systèmes de fichiers virtuels actifs" -#: gnome/glayout.c:325 -msgid "_Undelete files (ext2fs only)..." -msgstr "Réc_upération de fichiers (ext2fs seulement)..." - -#: gnome/glayout.c:325 -msgid "Recover deleted files" -msgstr "Récupération de fichiers effacés" - -#: gnome/glayout.c:328 +#: gnome/glayout.c:364 msgid "_Background jobs..." msgstr "_Taches de fond..." -#: gnome/glayout.c:328 +#: gnome/glayout.c:364 msgid "List of background operations" msgstr "Liste des opérations en tache de fond" -#: gnome/glayout.c:335 -msgid "_Arrange icons" -msgstr "Ré-org_aniser les icones" - -#: gnome/glayout.c:335 -msgid "Arranges the icons on the desktop" -msgstr "Ré-organiser les icones sur le bureau" - -#: gnome/glayout.c:342 +#. GNOMEUIINFO_HELP ("midnight-commander"), +#: gnome/glayout.c:372 msgid "_About" msgstr "_A Propos" -#: gnome/glayout.c:342 +#: gnome/glayout.c:372 msgid "Information on this program" msgstr "Informations sur ce programme" -#: gnome/glayout.c:349 gnome/gmc-window.c:119 +#: gnome/glayout.c:378 gnome/gview.c:323 msgid "_File" msgstr "_Fichier" -#: gnome/glayout.c:350 -msgid "_Window" -msgstr "_Fenêtre" +#: gnome/glayout.c:379 +msgid "_Edit" +msgstr "_Editer" + +#: gnome/glayout.c:380 +msgid "_Layout" +msgstr "_Présentation" -#: gnome/glayout.c:351 +#: gnome/glayout.c:381 msgid "_Commands" msgstr "_Commandes" -#: gnome/glayout.c:352 -msgid "_Options" -msgstr "_Options" - -#: gnome/glayout.c:353 -msgid "_Desktop" -msgstr "_Bureau" - -#: gnome/glayout.c:354 gnome/gmc-window.c:121 +#: gnome/glayout.c:382 msgid "_Help" msgstr "_Aide" -#: gnome/gmc-window.c:69 -msgid "Copyright (C) 1998 The Free Software Foundation" -msgstr "" - -#: gnome/gmc-window.c:81 -msgid "Open _new window" -msgstr "Ouvre une _nouvelle fenêtre" - -#: gnome/gmc-window.c:86 -#, fuzzy -msgid "_Close this window" -msgstr "Fermer de panel" - -#: gnome/gmc-window.c:95 -msgid "_Listing view" -msgstr "Mode de _listage" - -#: gnome/gmc-window.c:96 -msgid "_Icon view" -msgstr "Vue par _Icones" - -#: gnome/gmc-window.c:102 -#, fuzzy -msgid "Display _tree view" -msgstr " Vue filtrée " - -#: gnome/gmc-window.c:112 -msgid "_About the Midnight Commander..." -msgstr "_A Propos de Midnight Commander..." - -#: gnome/gpopup.c:48 -msgid " Open with..." -msgstr " Ouvrir avec..." - -#: gnome/gpopup.c:49 gnome/olddnd.c:1473 -msgid "Enter extra arguments:" -msgstr "Entrez les arguments supplémentaires:" +#: gnome/glayout.c:477 +msgid "File/New/Directory..." +msgstr "Fichier/Nouveau/Répertoire..." -#: gnome/gpopup.c:179 gnome/gpopup.c:181 +#: gnome/gpopup.c:199 gnome/gpopup.c:200 msgid "Properties" msgstr "Propriétés" -#: gnome/gpopup.c:184 gnome/gpopup.c:186 +#: gnome/gpopup.c:202 gnome/gpopup.c:203 msgid "Open" msgstr "Ouvrir" -#: gnome/gpopup.c:188 +#: gnome/gpopup.c:204 msgid "Open with" msgstr "Ouvrir avec" -#: gnome/gpopup.c:189 gnome/screen.c:2272 gnome/screen.c:2302 -#: src/screen.c:2272 src/screen.c:2302 +#: gnome/gpopup.c:205 gnome/screen.c:2301 gnome/screen.c:2331 +#: src/screen.c:2301 src/screen.c:2331 msgid "View" msgstr "Voir" -#: gnome/gpopup.c:190 +#: gnome/gpopup.c:206 msgid "View unfiltered" msgstr "Vue non filtrée" -#: gnome/gpopup.c:193 +#: gnome/gpopup.c:209 msgid "Link..." msgstr "Lien..." -#: gnome/gpopup.c:194 +#: gnome/gpopup.c:210 msgid "Symlink..." msgstr "Lien Symbolique..." -#: gnome/gpopup.c:195 +#: gnome/gpopup.c:211 msgid "Edit symlink..." msgstr "Editer lien symbolique..." -#: gnome/gpopup.c:202 gnome/gpopup.c:212 +#: gnome/gpopup.c:218 gnome/gpopup.c:229 msgid "Move/rename..." -msgstr "" +msgstr "Déplacer/renommer..." -#: gnome/gpopup.c:203 gnome/gpopup.c:213 +#: gnome/gpopup.c:219 gnome/gpopup.c:230 msgid "Copy..." msgstr "Copier..." +#: gnome/gprefs.c:82 +#, fuzzy +msgid "File Display" +msgstr "Fichier: %s " + +#: gnome/gprefs.c:85 +msgid "Confirmation" +msgstr "Confirmation" + +#: gnome/gprefs.c:91 +msgid "Caching and Optimizations" +msgstr "" + +#: gnome/gprefs.c:94 +msgid "VFS" +msgstr "SVF" + #: gnome/gprop.c:58 gnome/gprop.c:75 msgid "Filename" msgstr "NomDuFichier" @@ -3186,7 +3259,7 @@ msgstr "Utilisateur" #. Group -#: gnome/gprop.c:280 gnome/gprop.c:405 gnome/screen.c:435 src/screen.c:435 +#: gnome/gprop.c:280 gnome/gprop.c:405 gnome/screen.c:454 src/screen.c:454 msgid "Group" msgstr "Groupe" @@ -3212,7 +3285,7 @@ msgstr "" #. Owner -#: gnome/gprop.c:390 gnome/screen.c:434 src/screen.c:434 +#: gnome/gprop.c:390 gnome/screen.c:453 src/screen.c:453 msgid "Owner" msgstr "Propriétaire" @@ -3232,101 +3305,100 @@ msgid "Select icon" msgstr "Sélectionnez une icone" -#: gnome/gscreen.c:1331 +#: gnome/gscreen.c:1461 msgid "All files" msgstr "Tous les fichiers" -#: gnome/gscreen.c:1333 +#: gnome/gscreen.c:1463 msgid "Archives and compressed files" msgstr "Archives et fichiers compressés" -#: gnome/gscreen.c:1335 +#: gnome/gscreen.c:1465 msgid "RPM/DEB files" msgstr "Fichiers RPM/DEB" -#: gnome/gscreen.c:1337 +#: gnome/gscreen.c:1467 msgid "Text/Document files" msgstr "Documents textes" -#: gnome/gscreen.c:1339 +#: gnome/gscreen.c:1469 msgid "HTML and SGML files" msgstr "Fichiers HTML et SGML" -#: gnome/gscreen.c:1341 +#: gnome/gscreen.c:1471 msgid "Postscript and PDF files" msgstr "Fichiers Postscript et PDF" -#: gnome/gscreen.c:1343 +#: gnome/gscreen.c:1473 msgid "Spreadsheet files" msgstr "Fichiers de tableurs" -#: gnome/gscreen.c:1345 +#: gnome/gscreen.c:1475 msgid "Image files" msgstr "Fichiers images" -#: gnome/gscreen.c:1348 +#: gnome/gscreen.c:1478 msgid "Video/animation files" msgstr "Fichiers animation/video" -#: gnome/gscreen.c:1350 +#: gnome/gscreen.c:1480 msgid "Audio files" msgstr "Fichier audio" -#: gnome/gscreen.c:1352 +#: gnome/gscreen.c:1482 msgid "C program files" msgstr "Fichiers programmes C" -#: gnome/gscreen.c:1354 +#: gnome/gscreen.c:1484 msgid "C++ program files" msgstr "Fichiers programmes C++" -#: gnome/gscreen.c:1356 +#: gnome/gscreen.c:1486 msgid "Objective-C program files" msgstr "Fichiers programmes Objective-C" -#: gnome/gscreen.c:1358 +#: gnome/gscreen.c:1488 msgid "Scheme program files" msgstr "Fichiers programmes Scheme" -#: gnome/gscreen.c:1360 +#: gnome/gscreen.c:1490 msgid "Assembler program files" msgstr "Fichiers programmes assembleur" -#: gnome/gscreen.c:1362 +#: gnome/gscreen.c:1492 msgid "Misc. program files" msgstr "Fichiers programmes divers" -#: gnome/gscreen.c:1364 +#: gnome/gscreen.c:1494 msgid "Font files" msgstr "Fichiers polices" -#: gnome/gscreen.c:1491 -#, fuzzy, c-format +#: gnome/gscreen.c:1621 +#, c-format msgid "Search: %s" -msgstr "Rechercher: " +msgstr "Rechercher: %s" -#: gnome/gscreen.c:1500 -#, fuzzy, c-format +#: gnome/gscreen.c:1631 +#, c-format msgid "%s bytes in %d file" -msgstr " %s octets dans %d fichier%s" +msgstr " %s octets dans %d fichier" -#: gnome/gscreen.c:1500 -#, fuzzy, c-format +#: gnome/gscreen.c:1631 +#, c-format msgid "%s bytes in %d files" -msgstr " %s octets dans %d fichier%s" +msgstr " %s octets dans %d fichiers" -#: gnome/gscreen.c:1523 gnome/screen.c:672 src/screen.c:672 +#: gnome/gscreen.c:1657 gnome/screen.c:691 src/screen.c:691 msgid "" msgstr "" -#: gnome/gscreen.c:1574 +#: gnome/gscreen.c:1711 msgid "Filter" msgstr "Filtre" -#: gnome/gscreen.c:2083 -#, fuzzy +#: gnome/gscreen.c:2292 msgid "Location:" -msgstr "Emplacement: %Xh:%Xh" +msgstr "Emplacement: " #: gnome/gview.c:119 gnome/view.c:687 src/view.c:687 #, c-format @@ -3344,92 +3416,79 @@ msgstr "%s octets" #: gnome/gview.c:289 -msgid "Goto line" -msgstr "Aller à la ligne" +msgid "_Goto line" +msgstr "_Aller à la ligne" #: gnome/gview.c:290 msgid "Jump to a specified line number" msgstr "Aller au numéro de ligne spécifié" #: gnome/gview.c:292 -msgid "Monitor file" -msgstr "" +#, fuzzy +msgid "_Monitor file" +msgstr "Fichiers polices" #: gnome/gview.c:292 msgid "Monitor file growing" msgstr "" -#: gnome/gview.c:293 -#, fuzzy -msgid "Close" -msgstr "_Fermer" - -#: gnome/gview.c:294 -#, fuzzy -msgid "Close the viewer" -msgstr "_Fermer ce panel" - -#: gnome/gview.c:301 -msgid "String search" -msgstr "Chercher une chaine" - -#: gnome/gview.c:303 +#: gnome/gview.c:299 msgid "Regexp search" msgstr "Recherche une expression régulière" -#: gnome/gview.c:304 +#: gnome/gview.c:300 msgid "Regular expression search" msgstr "Recherche d'une expression régulière" -#: gnome/gview.c:307 -msgid "Search again..." -msgstr "Chercher à nouveau..." - -#: gnome/gview.c:308 -msgid "Continue searching" -msgstr "Continuer à chercher" - -#: gnome/gview.c:315 gnome/view.c:1973 src/view.c:1973 -msgid "Wrap" -msgstr "Césure" +#: gnome/gview.c:309 +msgid "_Wrap" +msgstr "_Césure" -#: gnome/gview.c:315 +#: gnome/gview.c:309 msgid "Wrap the text" msgstr "" -#: gnome/gview.c:321 -msgid "Formatted" -msgstr "Formaté" +#: gnome/gview.c:315 +msgid "_Formatted" +msgstr "_Formaté" -#: gnome/gview.c:323 gnome/view.c:1966 src/view.c:1966 -msgid "Hex" -msgstr "Héxa" +#: gnome/gview.c:317 +msgid "_Hex" +msgstr "_Héxa" + +#: gnome/gview.c:324 +msgid "_Search" +msgstr "_Rechercher" + +#: gnome/gview.c:325 +msgid "_Mode" +msgstr "_Mode" -#: gnome/gwidget.c:92 +#: gnome/gwidget.c:90 msgid "ok" msgstr "ok" -#: gnome/gwidget.c:94 +#: gnome/gwidget.c:92 msgid "cancel" msgstr "annuler" -#: gnome/gwidget.c:96 +#: gnome/gwidget.c:94 msgid "help" msgstr "aide" -#: gnome/gwidget.c:98 +#: gnome/gwidget.c:96 msgid "yes" msgstr "oui" -#: gnome/gwidget.c:100 +#: gnome/gwidget.c:98 msgid "no" msgstr "non" -#: gnome/gwidget.c:102 +#: gnome/gwidget.c:100 msgid "exit" msgstr "quitter" -#: gnome/gwidget.c:104 +#: gnome/gwidget.c:102 msgid "abort" msgstr "arréter" @@ -3437,7 +3496,8 @@ msgid "" " Help file format error\n" "" -msgstr "" +msgstr " Erreur de format de fichier d'Aide\n" +"" #: gnome/help.c:321 src/help.c:321 msgid " Internal bug: Double start of link area " @@ -3473,105 +3533,105 @@ msgid "Prev" msgstr "Précédent" -#: gnome/hotlist.c:134 src/hotlist.c:134 +#: gnome/hotlist.c:135 src/hotlist.c:135 msgid "&Move" msgstr "Déplacer" -#: gnome/hotlist.c:135 gnome/hotlist.c:1437 gnome/panelize.c:92 -#: gnome/wtools.c:386 src/hotlist.c:135 src/hotlist.c:1437 src/panelize.c:92 +#: gnome/hotlist.c:136 gnome/hotlist.c:1438 gnome/panelize.c:92 +#: gnome/wtools.c:386 src/hotlist.c:136 src/hotlist.c:1438 src/panelize.c:92 #: src/wtools.c:386 msgid "&Remove" msgstr "Supp&Rimer" -#: gnome/hotlist.c:136 gnome/hotlist.c:816 gnome/hotlist.c:909 -#: src/hotlist.c:136 src/hotlist.c:816 src/hotlist.c:909 +#: gnome/hotlist.c:137 gnome/hotlist.c:817 gnome/hotlist.c:910 +#: src/hotlist.c:137 src/hotlist.c:817 src/hotlist.c:910 msgid "&Append" msgstr "&Ajouter" -#: gnome/hotlist.c:137 gnome/hotlist.c:814 gnome/hotlist.c:907 -#: src/hotlist.c:137 src/hotlist.c:814 src/hotlist.c:907 +#: gnome/hotlist.c:138 gnome/hotlist.c:815 gnome/hotlist.c:908 +#: src/hotlist.c:138 src/hotlist.c:815 src/hotlist.c:908 msgid "&Insert" msgstr "&Insérer" -#: gnome/hotlist.c:138 src/hotlist.c:138 +#: gnome/hotlist.c:139 src/hotlist.c:139 msgid "New &Entry" msgstr "Nouvelle &Entrée" -#: gnome/hotlist.c:139 src/hotlist.c:139 +#: gnome/hotlist.c:140 src/hotlist.c:140 msgid "New &Group" msgstr "Nouveau &Groupe" -#: gnome/hotlist.c:141 src/hotlist.c:141 +#: gnome/hotlist.c:142 src/hotlist.c:142 msgid "&Up" -msgstr "" +msgstr "&Haut" -#: gnome/hotlist.c:142 src/hotlist.c:142 +#: gnome/hotlist.c:143 src/hotlist.c:143 msgid "&Add current" -msgstr "" +msgstr "&Ajouter courant" -#: gnome/hotlist.c:143 src/hotlist.c:143 +#: gnome/hotlist.c:144 src/hotlist.c:144 msgid "Change &To" msgstr "" -#: gnome/hotlist.c:203 src/hotlist.c:203 +#: gnome/hotlist.c:204 src/hotlist.c:204 msgid "Subgroup - press ENTER to see list" msgstr "Sous-groupe - tapez ENTREE pour voir la liste" -#: gnome/hotlist.c:622 src/hotlist.c:622 +#: gnome/hotlist.c:623 src/hotlist.c:623 msgid "Active VFS directories" msgstr "Répertoires VFS actifs" -#: gnome/hotlist.c:622 src/hotlist.c:622 +#: gnome/hotlist.c:623 src/hotlist.c:623 msgid "Directory hotlist" msgstr "Répertoire hotlist" -#: gnome/hotlist.c:641 src/hotlist.c:641 +#: gnome/hotlist.c:642 src/hotlist.c:642 msgid " Directory path " msgstr " Chemin du répertoire " #. This one holds the displayed pathname -#: gnome/hotlist.c:644 gnome/hotlist.c:691 src/hotlist.c:644 src/hotlist.c:691 +#: gnome/hotlist.c:645 gnome/hotlist.c:692 src/hotlist.c:645 src/hotlist.c:692 msgid " Directory label " msgstr " Label du répertoire " -#: gnome/hotlist.c:665 src/hotlist.c:665 +#: gnome/hotlist.c:666 src/hotlist.c:666 msgid "Moving " msgstr "Déplacer " -#: gnome/hotlist.c:886 src/hotlist.c:886 +#: gnome/hotlist.c:887 src/hotlist.c:887 msgid "New hotlist entry" msgstr "Nouvelle entrée hotlist" -#: gnome/hotlist.c:886 src/hotlist.c:886 +#: gnome/hotlist.c:887 src/hotlist.c:887 msgid "Directory label" msgstr "Label du répertoire" -#: gnome/hotlist.c:886 src/hotlist.c:886 +#: gnome/hotlist.c:887 src/hotlist.c:887 msgid "Directory path" msgstr "Chemin du répertoire" -#: gnome/hotlist.c:966 src/hotlist.c:966 +#: gnome/hotlist.c:967 src/hotlist.c:967 msgid " New hotlist group " msgstr " Nouveau groupe hotlist " -#: gnome/hotlist.c:966 src/hotlist.c:966 +#: gnome/hotlist.c:967 src/hotlist.c:967 msgid "Name of new group" msgstr "Nom du nouveau groupe" -#: gnome/hotlist.c:981 src/hotlist.c:981 +#: gnome/hotlist.c:982 src/hotlist.c:982 #, c-format msgid "Label for \"%s\":" msgstr "Label pour \"%s\":" -#: gnome/hotlist.c:986 src/hotlist.c:986 +#: gnome/hotlist.c:987 src/hotlist.c:987 msgid " Add to hotlist " msgstr " Ajouter à la hotlist " -#: gnome/hotlist.c:1023 src/hotlist.c:1023 +#: gnome/hotlist.c:1024 src/hotlist.c:1024 msgid " Remove: " msgstr " Enlever: " -#: gnome/hotlist.c:1027 src/hotlist.c:1027 +#: gnome/hotlist.c:1028 src/hotlist.c:1028 msgid "" "\n" " Group not empty.\n" @@ -3581,60 +3641,61 @@ " Groupe non-vide.\n" " L'enlever quand-même?" -#: gnome/hotlist.c:1372 src/hotlist.c:1372 +#: gnome/hotlist.c:1373 src/hotlist.c:1373 msgid " Top level group " msgstr "" -#: gnome/hotlist.c:1388 src/hotlist.c:1388 +#: gnome/hotlist.c:1389 src/hotlist.c:1389 msgid "Hotlist is now kept in file ~/" msgstr "La hotlist est maintenant conservée dans le fichier ~/" -#: gnome/hotlist.c:1390 src/hotlist.c:1390 +#: gnome/hotlist.c:1391 src/hotlist.c:1391 msgid "MC will load hotlist from ~/" msgstr "MC chargera la hotlist à partir de ~/" -#: gnome/hotlist.c:1392 src/hotlist.c:1392 +#: gnome/hotlist.c:1393 src/hotlist.c:1393 msgid "and then delete [Hotlist] section there" msgstr "et effacera la section [Hotlist] la-bas" -#: gnome/hotlist.c:1394 gnome/hotlist.c:1413 gnome/hotlist.c:1436 -#: gnome/hotlist.c:1461 src/hotlist.c:1394 src/hotlist.c:1413 -#: src/hotlist.c:1436 src/hotlist.c:1461 +#: gnome/hotlist.c:1395 gnome/hotlist.c:1414 gnome/hotlist.c:1437 +#: gnome/hotlist.c:1462 src/hotlist.c:1395 src/hotlist.c:1414 +#: src/hotlist.c:1437 src/hotlist.c:1462 msgid " Hotlist Load " msgstr " Charger la Hotlist " -#: gnome/hotlist.c:1410 gnome/hotlist.c:1458 src/hotlist.c:1410 -#: src/hotlist.c:1458 +#: gnome/hotlist.c:1411 gnome/hotlist.c:1459 src/hotlist.c:1411 +#: src/hotlist.c:1459 msgid "MC was unable to write ~/" msgstr "MC n'a pas pu écrire le fichier ~/" -#: gnome/hotlist.c:1411 src/hotlist.c:1411 +#: gnome/hotlist.c:1412 src/hotlist.c:1412 msgid " file, your old hotlist entries were not deleted" msgstr ", les entrées de votre ancienne hotlist ont été conservées" -#: gnome/hotlist.c:1425 src/hotlist.c:1425 +#: gnome/hotlist.c:1426 src/hotlist.c:1426 msgid "You have ~/" -msgstr "" +msgstr "Vous avez ~/" -#: gnome/hotlist.c:1425 src/hotlist.c:1425 +#: gnome/hotlist.c:1426 src/hotlist.c:1426 msgid " file and [Hotlist] section in ~/" msgstr "" -#: gnome/hotlist.c:1426 src/hotlist.c:1426 +#: gnome/hotlist.c:1427 src/hotlist.c:1427 msgid "Your ~/" -msgstr "" +msgstr "Votre ~/" -#: gnome/hotlist.c:1426 src/hotlist.c:1426 +#: gnome/hotlist.c:1427 src/hotlist.c:1427 msgid " most probably was created\n" -msgstr "" +msgstr " a probablement été créé\n" -#: gnome/hotlist.c:1427 src/hotlist.c:1427 +#: gnome/hotlist.c:1428 src/hotlist.c:1428 msgid "" "by an earlier development version of MC\n" "and is more actual than ~/" -msgstr "" +msgstr "par une ancienne version de développement de MC\n" +"et est plus récent que ~/" -#: gnome/hotlist.c:1428 src/hotlist.c:1428 +#: gnome/hotlist.c:1429 src/hotlist.c:1429 msgid "" " entries\n" "\n" @@ -3642,136 +3703,136 @@ "entrées\n" "\n" -#: gnome/hotlist.c:1429 src/hotlist.c:1429 +#: gnome/hotlist.c:1430 src/hotlist.c:1430 msgid "" "You can choose between\n" "\n" " Remove - remove old hotlist entries from ~/" msgstr "" -#: gnome/hotlist.c:1431 src/hotlist.c:1431 +#: gnome/hotlist.c:1432 src/hotlist.c:1432 msgid "" " Keep - keep your old entries; you will be asked\n" " the same question next time\n" " Merge - add old entries to hotlist as group \"Entries from ~/" msgstr "" -#: gnome/hotlist.c:1437 src/hotlist.c:1437 +#: gnome/hotlist.c:1438 src/hotlist.c:1438 msgid "&Merge" msgstr "" -#: gnome/hotlist.c:1449 src/hotlist.c:1449 +#: gnome/hotlist.c:1450 src/hotlist.c:1450 msgid " Entries from ~/" -msgstr "" +msgstr " Entrées de ~/" -#: gnome/hotlist.c:1459 src/hotlist.c:1459 +#: gnome/hotlist.c:1460 src/hotlist.c:1460 msgid " file your old hotlist entries were not deleted" msgstr "" -#: gnome/info.c:81 src/info.c:81 +#: gnome/info.c:82 src/info.c:82 #, c-format msgid "Midnight Commander %s" msgstr "Midnight Commander %s" -#: gnome/info.c:113 src/info.c:113 +#: gnome/info.c:114 src/info.c:114 msgid "Free nodes %d (%d%%) of %d" -msgstr "" +msgstr "%d I-noeuds libres (%d%%) sur %d" -#: gnome/info.c:119 src/info.c:119 +#: gnome/info.c:120 src/info.c:120 msgid "No node information" -msgstr "" +msgstr "Pas d'information sur les I-noeuds" -#: gnome/info.c:124 src/info.c:124 +#: gnome/info.c:125 src/info.c:125 msgid "Free space " msgstr "Espace libre" -#: gnome/info.c:126 src/info.c:126 +#: gnome/info.c:127 src/info.c:127 msgid " (%d%%) of " -msgstr "" +msgstr " (%d%%) de " -#: gnome/info.c:130 src/info.c:130 +#: gnome/info.c:131 src/info.c:131 msgid "No space information" -msgstr "" +msgstr "Pas d'information sur l'espace" -#: gnome/info.c:134 src/info.c:134 +#: gnome/info.c:135 src/info.c:135 #, c-format msgid "Type: %s " -msgstr "" +msgstr "Type: %s " -#: gnome/info.c:134 src/info.c:134 +#: gnome/info.c:135 src/info.c:135 msgid "non-local vfs" -msgstr "" +msgstr "svf non-local" -#: gnome/info.c:140 src/info.c:140 +#: gnome/info.c:141 src/info.c:141 #, c-format msgid "Device: %s" -msgstr "" +msgstr "Périphérique: %s" -#: gnome/info.c:144 src/info.c:144 +#: gnome/info.c:145 src/info.c:145 #, c-format msgid "Filesystem: %s" msgstr "Système de fichier: %s" -#: gnome/info.c:149 src/info.c:149 +#: gnome/info.c:150 src/info.c:150 #, c-format msgid "Accessed: %s" -msgstr "" +msgstr "Accédé: %s" -#: gnome/info.c:153 src/info.c:153 +#: gnome/info.c:154 src/info.c:154 #, c-format msgid "Modified: %s" -msgstr "" +msgstr "Modifié: %s" -#: gnome/info.c:157 src/info.c:157 +#: gnome/info.c:158 src/info.c:158 #, c-format msgid "Created: %s" -msgstr "" +msgstr "Créé: %s" -#: gnome/info.c:170 src/info.c:170 +#: gnome/info.c:171 src/info.c:171 msgid "Size: " msgstr "Taille: " -#: gnome/info.c:173 src/info.c:173 +#: gnome/info.c:174 src/info.c:174 #, c-format msgid " (%d blocks)" msgstr " (%d blocks)" -#: gnome/info.c:179 src/info.c:179 +#: gnome/info.c:180 src/info.c:180 #, c-format msgid "Owner: %s/%s" msgstr "Propriétaire: %s/%s" -#: gnome/info.c:184 src/info.c:184 +#: gnome/info.c:185 src/info.c:185 #, c-format msgid "Links: %d" msgstr "Liens: %d" -#: gnome/info.c:188 src/info.c:188 +#: gnome/info.c:189 src/info.c:189 #, c-format msgid "Mode: %s (%04o)" msgstr "Mode: %s (%04o)" -#: gnome/info.c:193 src/info.c:193 +#: gnome/info.c:194 src/info.c:194 #, c-format msgid "Location: %Xh:%Xh" msgstr "Emplacement: %Xh:%Xh" -#: gnome/info.c:199 src/info.c:199 +#: gnome/info.c:200 src/info.c:200 #, c-format msgid "File: %s" msgstr "Fichier: %s" -#: gnome/info.c:203 src/info.c:203 +#: gnome/info.c:204 src/info.c:204 msgid "File: None" msgstr "Fichier: Aucun" #: gnome/layout.c:161 src/layout.c:161 msgid "&Vertical" -msgstr "" +msgstr "&Vertical" #: gnome/layout.c:162 src/layout.c:162 msgid "&Horizontal" -msgstr "" +msgstr "&Horizontal" #: gnome/layout.c:172 src/layout.c:172 msgid "&Xterm hintbar" @@ -3807,10 +3868,10 @@ #: gnome/layout.c:180 src/layout.c:180 msgid "&File types" -msgstr "" +msgstr "Types de &fichiers" -#: gnome/layout.c:374 gnome/learn.c:62 gnome/learn.c:181 gnome/option.c:145 -#: src/layout.c:374 src/learn.c:62 src/learn.c:181 src/option.c:145 +#: gnome/layout.c:374 gnome/learn.c:62 gnome/learn.c:181 gnome/option.c:146 +#: src/layout.c:374 src/learn.c:62 src/learn.c:181 src/option.c:146 msgid "&Save" msgstr "&Sauver" @@ -3827,7 +3888,7 @@ msgid " Highlight... " msgstr "" -#: gnome/layout.c:385 gnome/option.c:156 src/layout.c:385 src/option.c:156 +#: gnome/layout.c:385 gnome/option.c:157 src/layout.c:385 src/option.c:157 msgid " Other options " msgstr " Autres options " @@ -3905,7 +3966,7 @@ msgid "key, or click with the mouse to define it. Move around with Tab." msgstr "" -#: gnome/main.c:661 src/main.c:661 +#: gnome/main.c:668 src/main.c:668 msgid "" " The Commander can't change to the directory that \n" " the subshell claims you are in. Perhaps you have \n" @@ -3913,247 +3974,247 @@ " extra access permissions with the \"su\" command? " msgstr "" -#: gnome/main.c:736 src/main.c:736 +#: gnome/main.c:743 src/main.c:743 msgid "Press any key to continue..." msgstr "Appuyez sur une touche..." -#: gnome/main.c:786 src/main.c:786 +#: gnome/main.c:793 src/main.c:793 msgid " The shell is already running a command " -msgstr "" +msgstr " Le shell est déjà en train d'exécuter une commande " -#: gnome/main.c:1204 gnome/main.c:1225 src/main.c:1204 src/main.c:1225 +#: gnome/main.c:1198 gnome/main.c:1219 src/main.c:1198 src/main.c:1219 msgid "&Listing mode..." msgstr "Mode de &Listage..." -#: gnome/main.c:1205 gnome/main.c:1226 src/main.c:1205 src/main.c:1226 +#: gnome/main.c:1199 gnome/main.c:1220 src/main.c:1199 src/main.c:1220 msgid "&Quick view C-x q" msgstr "" -#: gnome/main.c:1206 gnome/main.c:1227 src/main.c:1206 src/main.c:1227 +#: gnome/main.c:1200 gnome/main.c:1221 src/main.c:1200 src/main.c:1221 msgid "&Info C-x i" msgstr "&Info C-x i" -#: gnome/main.c:1209 gnome/main.c:1230 src/main.c:1209 src/main.c:1230 +#: gnome/main.c:1203 gnome/main.c:1224 src/main.c:1203 src/main.c:1224 msgid "&Sort order..." msgstr "Ordre de tri..." -#: gnome/main.c:1211 gnome/main.c:1232 src/main.c:1211 src/main.c:1232 +#: gnome/main.c:1205 gnome/main.c:1226 src/main.c:1205 src/main.c:1226 msgid "&Filter..." msgstr "&Filtre..." -#: gnome/main.c:1214 gnome/main.c:1235 src/main.c:1214 src/main.c:1235 +#: gnome/main.c:1208 gnome/main.c:1229 src/main.c:1208 src/main.c:1229 msgid "&Network link..." msgstr "Lien Réseau..." -#: gnome/main.c:1215 gnome/main.c:1236 src/main.c:1215 src/main.c:1236 +#: gnome/main.c:1209 gnome/main.c:1230 src/main.c:1209 src/main.c:1230 msgid "FT&P link..." msgstr "Lien FT&P..." -#: gnome/main.c:1219 gnome/main.c:1240 src/main.c:1219 src/main.c:1240 +#: gnome/main.c:1213 gnome/main.c:1234 src/main.c:1213 src/main.c:1234 msgid "&Drive... M-d" msgstr "Lecteur... M-d" -#: gnome/main.c:1221 gnome/main.c:1242 src/main.c:1221 src/main.c:1242 +#: gnome/main.c:1215 gnome/main.c:1236 src/main.c:1215 src/main.c:1236 msgid "&Rescan C-r" msgstr "&Rescanner C-r" -#: gnome/main.c:1246 src/main.c:1246 +#: gnome/main.c:1240 src/main.c:1240 msgid "&User menu F2" msgstr "Menu &Utilisateur F2" -#: gnome/main.c:1247 src/main.c:1247 +#: gnome/main.c:1241 src/main.c:1241 msgid "&View F3" msgstr "&Vue F3" -#: gnome/main.c:1248 src/main.c:1248 +#: gnome/main.c:1242 src/main.c:1242 msgid "Vie&w file... " msgstr "Voi&r fichier... " -#: gnome/main.c:1249 src/main.c:1249 +#: gnome/main.c:1243 src/main.c:1243 msgid "&Filtered view M-!" msgstr "Vue &Filtrée M-!" -#: gnome/main.c:1250 src/main.c:1250 +#: gnome/main.c:1244 src/main.c:1244 msgid "&Edit F4" msgstr "&Editer F4" -#: gnome/main.c:1251 src/main.c:1251 +#: gnome/main.c:1245 src/main.c:1245 msgid "&Copy F5" msgstr "&Copier F5" -#: gnome/main.c:1252 src/main.c:1252 +#: gnome/main.c:1246 src/main.c:1246 msgid "c&Hmod C-x c" msgstr "c&Hmod C-x c" -#: gnome/main.c:1254 src/main.c:1254 +#: gnome/main.c:1248 src/main.c:1248 msgid "&Link C-x l" msgstr "&Lien C-x l" -#: gnome/main.c:1255 src/main.c:1255 +#: gnome/main.c:1249 src/main.c:1249 msgid "&SymLink C-x s" msgstr "Lien&Symb C-x s" -#: gnome/main.c:1256 src/main.c:1256 +#: gnome/main.c:1250 src/main.c:1250 msgid "edit s&Ymlink C-x C-s" msgstr "editer liens&Ymb C-x C-s" -#: gnome/main.c:1257 src/main.c:1257 +#: gnome/main.c:1251 src/main.c:1251 msgid "ch&Own C-x o" msgstr "ch&Own C-x o" -#: gnome/main.c:1258 src/main.c:1258 +#: gnome/main.c:1252 src/main.c:1252 msgid "&Advanced chown " msgstr "chown &Avancé " -#: gnome/main.c:1260 src/main.c:1260 +#: gnome/main.c:1254 src/main.c:1254 msgid "&Rename/Move F6" msgstr "&Renommer/Déplacer F6" -#: gnome/main.c:1261 src/main.c:1261 +#: gnome/main.c:1255 src/main.c:1255 msgid "&Mkdir F7" msgstr "&Mkdir F7" -#: gnome/main.c:1262 src/main.c:1262 +#: gnome/main.c:1256 src/main.c:1256 msgid "&Delete F8" msgstr "&Supprimer F8" -#: gnome/main.c:1263 src/main.c:1263 +#: gnome/main.c:1257 src/main.c:1257 msgid "&Quick cd M-c" msgstr "" -#: gnome/main.c:1265 src/main.c:1265 +#: gnome/main.c:1259 src/main.c:1259 msgid "select &Group M-+" msgstr "sélectionner &Groupe M-+" -#: gnome/main.c:1266 src/main.c:1266 +#: gnome/main.c:1260 src/main.c:1260 msgid "u&Nselect group M-\\" msgstr "désélectio&Nner groupe M-\\" -#: gnome/main.c:1267 src/main.c:1267 +#: gnome/main.c:1261 src/main.c:1261 msgid "reverse selec&Tion M-*" msgstr "sélec&Tion inversée M-*" -#: gnome/main.c:1269 src/main.c:1269 +#: gnome/main.c:1263 src/main.c:1263 msgid "e&Xit F10" msgstr "Q&uitter F10" -#: gnome/main.c:1279 src/main.c:1279 +#: gnome/main.c:1273 src/main.c:1273 msgid "&Directory tree" msgstr "&Arborescence des répertoires" -#: gnome/main.c:1281 src/main.c:1281 +#: gnome/main.c:1275 src/main.c:1275 msgid "&Find file M-?" msgstr "Rechercher &Fichier M-?" -#: gnome/main.c:1282 src/main.c:1282 +#: gnome/main.c:1276 src/main.c:1276 msgid "s&Wap panels C-u" msgstr "&Echanger panels C-u" -#: gnome/main.c:1283 src/main.c:1283 +#: gnome/main.c:1277 src/main.c:1277 msgid "switch &Panels on/off C-o" msgstr "" -#: gnome/main.c:1284 src/main.c:1284 +#: gnome/main.c:1278 src/main.c:1278 msgid "&Compare directories C-x d" msgstr "&Comparer répertoires C-x d" -#: gnome/main.c:1285 src/main.c:1285 +#: gnome/main.c:1279 src/main.c:1279 msgid "e&Xternal panelize C-x !" msgstr "" -#: gnome/main.c:1287 src/main.c:1287 +#: gnome/main.c:1280 src/main.c:1280 msgid "show directory s&Izes" msgstr "aff&Icher la taille des répertoires" -#: gnome/main.c:1290 src/main.c:1290 +#: gnome/main.c:1282 src/main.c:1282 msgid "command &History" msgstr "&Historique des commandes " -#: gnome/main.c:1291 src/main.c:1291 +#: gnome/main.c:1283 src/main.c:1283 msgid "di&Rectory hotlist C-\\" msgstr "&Répertoire hotlist C-\\" -#: gnome/main.c:1293 src/main.c:1293 +#: gnome/main.c:1285 src/main.c:1285 msgid "&Active VFS list C-x a" msgstr "" -#: gnome/main.c:1296 src/main.c:1296 +#: gnome/main.c:1288 src/main.c:1288 msgid "&Background jobs C-x j" msgstr "Taches de fond C-x j" -#: gnome/main.c:1300 src/main.c:1300 +#: gnome/main.c:1292 src/main.c:1292 msgid "&Undelete files (ext2fs only)" msgstr "" -#: gnome/main.c:1303 src/main.c:1303 +#: gnome/main.c:1295 src/main.c:1295 msgid "&Listing format edit" msgstr "" -#: gnome/main.c:1305 src/main.c:1305 +#: gnome/main.c:1297 src/main.c:1297 msgid "&Extension file edit" msgstr "" -#: gnome/main.c:1306 src/main.c:1306 +#: gnome/main.c:1298 src/main.c:1298 msgid "&Menu file edit" msgstr "" -#: gnome/main.c:1311 src/main.c:1311 +#: gnome/main.c:1303 src/main.c:1303 msgid "&Configuration..." msgstr "&Configuration..." -#: gnome/main.c:1313 src/main.c:1313 +#: gnome/main.c:1305 src/main.c:1305 msgid "c&Onfirmation..." msgstr "c&Onfirmation..." -#: gnome/main.c:1314 src/main.c:1314 +#: gnome/main.c:1306 src/main.c:1306 msgid "&Display bits..." msgstr "" -#: gnome/main.c:1316 src/main.c:1316 +#: gnome/main.c:1308 src/main.c:1308 msgid "learn &Keys..." msgstr "" -#: gnome/main.c:1319 src/main.c:1319 +#: gnome/main.c:1311 src/main.c:1311 msgid "&Virtual FS..." msgstr "SF &Virtuel..." -#: gnome/main.c:1322 src/main.c:1322 +#: gnome/main.c:1314 src/main.c:1314 msgid "&Save setup" msgstr "enregi&Strer la configuration" -#: gnome/main.c:1338 gnome/main.c:1340 src/main.c:1338 src/main.c:1340 +#: gnome/main.c:1330 gnome/main.c:1332 src/main.c:1330 src/main.c:1332 msgid " &Left " msgstr " &Gauche " -#: gnome/main.c:1340 src/main.c:1340 +#: gnome/main.c:1332 src/main.c:1332 msgid " &Above " msgstr " &Au dessus " -#: gnome/main.c:1343 src/main.c:1343 +#: gnome/main.c:1335 src/main.c:1335 msgid " &File " msgstr " &Fichier " -#: gnome/main.c:1344 src/main.c:1344 +#: gnome/main.c:1336 src/main.c:1336 msgid " &Command " msgstr " &Commande " -#: gnome/main.c:1345 src/main.c:1345 +#: gnome/main.c:1337 src/main.c:1337 msgid " &Options " msgstr " &Options " -#: gnome/main.c:1347 gnome/main.c:1349 src/main.c:1347 src/main.c:1349 +#: gnome/main.c:1339 gnome/main.c:1341 src/main.c:1339 src/main.c:1341 msgid " &Right " msgstr " &Droite " -#: gnome/main.c:1349 src/main.c:1349 +#: gnome/main.c:1341 src/main.c:1341 msgid " &Below " msgstr " &En dessous " -#: gnome/main.c:1404 src/main.c:1404 +#: gnome/main.c:1396 src/main.c:1396 msgid " Information " msgstr " Information " -#: gnome/main.c:1405 src/main.c:1405 +#: gnome/main.c:1397 src/main.c:1397 msgid "" " Using the fast reload option may not reflect the exact \n" " directory contents. In this cases you'll need to do a \n" @@ -4161,61 +4222,61 @@ " the details. " msgstr "" -#: gnome/main.c:1679 gnome/screen.c:2271 gnome/screen.c:2301 src/main.c:1679 -#: src/screen.c:2271 src/screen.c:2301 +#: gnome/main.c:1671 gnome/screen.c:2300 gnome/screen.c:2330 src/main.c:1671 +#: src/screen.c:2300 src/screen.c:2330 msgid "Menu" msgstr "Menu" -#: gnome/main.c:1884 src/main.c:1884 +#: gnome/main.c:1876 src/main.c:1876 msgid "Thank you for using GNU Midnight Commander" -msgstr "" +msgstr "Merci d'utiliser GNU Midnight Commander" -#: gnome/main.c:2237 src/main.c:2237 +#: gnome/main.c:2229 src/main.c:2229 #, c-format msgid "with mouse support on xterm%s.\n" -msgstr "" +msgstr "avec support de la souris pour xterm%s.\n" -#: gnome/main.c:2238 src/main.c:2238 +#: gnome/main.c:2230 src/main.c:2230 msgid " and the Linux console" -msgstr "" +msgstr " et la console Linux" -#: gnome/main.c:2333 src/main.c:2333 +#: gnome/main.c:2325 src/main.c:2325 msgid "The TERM environment variable is unset!\n" -msgstr "" +msgstr "La variable d'environnement TERM n'est pas positionnée!\n" -#: gnome/main.c:2535 src/main.c:2535 +#: gnome/main.c:2527 src/main.c:2527 #, c-format msgid "Library directory for the Midnight Commander: %s\n" -msgstr "" +msgstr "Répertoire bibliothèque pour Midnight Commander: %s\n" -#: gnome/main.c:2540 src/main.c:2540 +#: gnome/main.c:2532 src/main.c:2532 msgid "" "Option -m is obsolete. Please look at Display Bits... in the Option's menu\n" msgstr "" -#: gnome/main.c:2649 src/main.c:2649 +#: gnome/main.c:2655 src/main.c:2655 msgid "Geometry for the window" -msgstr "" +msgstr "Géométrie de la fenêtre" -#: gnome/main.c:2649 src/main.c:2649 +#: gnome/main.c:2655 src/main.c:2655 msgid "GEOMETRY" -msgstr "" +msgstr "GEOMETRIE" -#: gnome/main.c:2650 src/main.c:2650 +#: gnome/main.c:2656 src/main.c:2656 msgid "No windows opened at startup" -msgstr "" +msgstr "Pas de fenêtre ouverte au lancement" -#: gnome/main.c:2870 src/main.c:2870 +#: gnome/main.c:2925 src/main.c:2925 msgid "" "Couldn't open tty line. You have to run mc without the -P flag.\n" "On some systems you may want to run # `which mc`\n" msgstr "" -#: gnome/main.c:2957 src/main.c:2957 +#: gnome/main.c:2999 src/main.c:2999 msgid " Notice " msgstr " Note " -#: gnome/main.c:2958 src/main.c:2958 +#: gnome/main.c:3000 src/main.c:3000 msgid "" " The Midnight Commander configuration files \n" " are now stored in the ~/.mc directory, the \n" @@ -4223,34 +4284,34 @@ msgstr "" #. Not yet implemented the Link bits, so better to not show what we dont have -#: gnome/olddnd.c:589 +#: gnome/olddnd.c:662 msgid "Link" msgstr "Lien" -#: gnome/olddnd.c:883 +#: gnome/olddnd.c:956 msgid "Do you want to delete " msgstr "Voulez-vous vraiment effacer " -#: gnome/olddnd.c:1462 gnome/screen.c:2035 src/screen.c:2035 +#: gnome/olddnd.c:1535 gnome/screen.c:2064 src/screen.c:2064 msgid " Do you really want to execute? " msgstr " Voulez-vous vraiment éxécuter? " -#: gnome/olddnd.c:1472 +#: gnome/olddnd.c:1545 msgid "Open with..." msgstr "Ouvrir avec..." -#: gnome/olddnd.c:1608 +#: gnome/olddnd.c:1681 #, c-format msgid " Could not open %s directory" msgstr " Impossible d'ouvrir le répertoire %s" #: gnome/option.c:75 src/option.c:75 msgid "safe de&Lete" -msgstr "" +msgstr "Dé&létion sécurisée" #: gnome/option.c:76 src/option.c:76 msgid "cd follows lin&Ks" -msgstr "" +msgstr "cd &suit les liens" #: gnome/option.c:77 src/option.c:77 msgid "advanced cho&Wn" @@ -4258,14 +4319,14 @@ #: gnome/option.c:78 src/option.c:78 msgid "l&Ynx-like motion" -msgstr "" +msgstr "Mouvement l&Ynx-like" #: gnome/option.c:80 src/option.c:80 msgid "Animation" msgstr "Animation" #: gnome/option.c:82 src/option.c:82 -msgid "ro&Tating dash" +msgid "rotatin&G dash" msgstr "&Trait tournant" #: gnome/option.c:84 src/option.c:84 @@ -4293,59 +4354,63 @@ msgstr "" #: gnome/option.c:90 src/option.c:90 -msgid "&Verbose operation" +msgid "Compute &Totals" msgstr "" #: gnome/option.c:91 src/option.c:91 -msgid "&Fast dir reload" +msgid "&Verbose operation" msgstr "" #: gnome/option.c:92 src/option.c:92 -msgid "mi&X all files" +msgid "&Fast dir reload" msgstr "" #: gnome/option.c:93 src/option.c:93 -msgid "&Drop down menus" +msgid "mi&X all files" msgstr "" #: gnome/option.c:94 src/option.c:94 -msgid "ma&Rk moves down" +msgid "&Drop down menus" msgstr "" #: gnome/option.c:95 src/option.c:95 -msgid "show &Hidden files" +msgid "ma&Rk moves down" msgstr "" #: gnome/option.c:96 src/option.c:96 +msgid "show &Hidden files" +msgstr "" + +#: gnome/option.c:97 src/option.c:97 msgid "show &Backup files" msgstr "" -#: gnome/option.c:103 src/option.c:103 +#: gnome/option.c:104 src/option.c:104 msgid "&Never" msgstr "&Jamais" -#: gnome/option.c:104 src/option.c:104 +#: gnome/option.c:105 src/option.c:105 msgid "on dumb &Terminals" -msgstr "" +msgstr "sur &Terminaux stupides" -#: gnome/option.c:105 src/option.c:105 +#: gnome/option.c:106 src/option.c:106 msgid "alwa&Ys" msgstr "&Toujours" #. Similar code is in layout.c (init_layout()) -#: gnome/option.c:153 src/option.c:153 +#: gnome/option.c:154 src/option.c:154 msgid " Configure options " msgstr " Configurer les options " -#: gnome/option.c:154 src/option.c:154 +#: gnome/option.c:155 src/option.c:155 msgid " Panel options " msgstr " Options du panel " -#: gnome/option.c:155 src/option.c:155 +#: gnome/option.c:156 src/option.c:156 msgid " Pause after run... " -msgstr "" +msgstr " Pause après l'exécution..." -#: gnome/option.c:207 src/option.c:207 +#: gnome/option.c:208 src/option.c:208 msgid "Configure options" msgstr "Configurer les options" @@ -4380,98 +4445,94 @@ msgid " I can't run external panelize while logged on a non local directory " msgstr "" -#: gnome/panelize.c:354 src/panelize.c:354 -msgid "Find rejects after patching" -msgstr "" - #: gnome/panelize.c:355 src/panelize.c:355 msgid "Find *.orig after patching" -msgstr "" +msgstr "Rechercher les *.orig aprés le patch" #: gnome/panelize.c:356 src/panelize.c:356 msgid "Find SUID and SGID programs" -msgstr "" +msgstr "Rechercher les programmes SUID et SGID" #: gnome/panelize.c:407 src/panelize.c:407 msgid "Cannot invoke command." msgstr "Impossible d'invoquer la commande." +#: gnome/panelize.c:466 src/panelize.c:466 +msgid "Pipe close failed" +msgstr "Echec de fermeture de tube" + #: gnome/popthelp.c:31 src/popthelp.c:31 msgid "Show this help message" -msgstr "" +msgstr "Affiche ce message d'aide" #: gnome/popthelp.c:32 src/popthelp.c:32 msgid "Display brief usage message" -msgstr "" +msgstr "Affiche ce bref message d'aide" -#: gnome/screen.c:424 gnome/screen.c:427 src/screen.c:424 src/screen.c:427 -msgid "Size" -msgstr "Taille" - -#: gnome/screen.c:426 src/screen.c:426 +#: gnome/screen.c:445 src/screen.c:445 msgid "MTime" -msgstr "" +msgstr "MTime" -#: gnome/screen.c:428 src/screen.c:428 +#: gnome/screen.c:447 src/screen.c:447 msgid "Permission" msgstr "Permission" -#: gnome/screen.c:429 src/screen.c:429 +#: gnome/screen.c:448 src/screen.c:448 msgid "Perm" -msgstr "" +msgstr "Perm" -#: gnome/screen.c:430 src/screen.c:430 +#: gnome/screen.c:449 src/screen.c:449 msgid "|" -msgstr "" +msgstr "|" -#: gnome/screen.c:431 src/screen.c:431 +#: gnome/screen.c:450 src/screen.c:450 msgid "Nl" msgstr "" -#: gnome/screen.c:432 src/screen.c:432 +#: gnome/screen.c:451 src/screen.c:451 msgid "GID" -msgstr "" +msgstr "GID" -#: gnome/screen.c:433 src/screen.c:433 +#: gnome/screen.c:452 src/screen.c:452 msgid "UID" -msgstr "" +msgstr "UID" -#: gnome/screen.c:436 src/screen.c:436 +#: gnome/screen.c:455 src/screen.c:455 msgid "ATime" -msgstr "" +msgstr "ATime" -#: gnome/screen.c:437 src/screen.c:437 +#: gnome/screen.c:456 src/screen.c:456 msgid "CTime" -msgstr "" +msgstr "CTime" -#: gnome/screen.c:441 src/screen.c:441 +#: gnome/screen.c:460 src/screen.c:460 msgid "Inode" msgstr "Inode" -#: gnome/screen.c:645 src/screen.c:645 +#: gnome/screen.c:664 src/screen.c:664 #, c-format msgid " %s bytes in %d file%s" msgstr " %s octets dans %d fichier%s" -#: gnome/screen.c:1298 src/screen.c:1298 +#: gnome/screen.c:1304 src/screen.c:1304 msgid "Unknow tag on display format: " msgstr "" -#: gnome/screen.c:2050 src/screen.c:2050 +#: gnome/screen.c:2079 src/screen.c:2079 msgid " No action taken " -msgstr "" +msgstr " Aucune action effectée " -#: gnome/screen.c:2275 gnome/screen.c:2305 gnome/tree.c:1486 src/screen.c:2275 -#: src/screen.c:2305 src/tree.c:1486 +#: gnome/screen.c:2304 gnome/screen.c:2334 gnome/tree.c:1030 src/screen.c:2304 +#: src/screen.c:2334 src/tree.c:1030 msgid "RenMov" msgstr "" -#: gnome/screen.c:2276 gnome/screen.c:2306 gnome/tree.c:1490 src/screen.c:2276 -#: src/screen.c:2306 src/tree.c:1490 +#: gnome/screen.c:2305 gnome/screen.c:2335 gnome/tree.c:1034 src/screen.c:2305 +#: src/screen.c:2335 src/tree.c:1034 msgid "Mkdir" msgstr "Mkdir" -#: gnome/screen.c:2292 src/screen.c:2292 +#: gnome/screen.c:2321 src/screen.c:2321 #, c-format msgid "" " Can't chdir to %s \n" @@ -4483,7 +4544,7 @@ #: gnome/subshell.c:287 src/subshell.c:287 #, c-format msgid "Couldn't open named pipe %s\n" -msgstr "" +msgstr "Impossible d'ouvrir le fichier nommé %s\n" #: gnome/subshell.c:700 src/subshell.c:700 msgid " The shell is still active. Quit anyway? " @@ -4502,55 +4563,50 @@ msgid "Warning: Couldn't change to %s.\n" msgstr "" -#: gnome/tree.c:620 src/tree.c:620 +#: gnome/tree.c:204 src/tree.c:204 #, c-format msgid "" "Can't open the %s file for writing:\n" "%s\n" -msgstr "" - -#: gnome/tree.c:633 src/tree.c:633 -#, c-format -msgid "" -"Can't write to the %s file:\n" +msgstr "Impossible d'ouvrir le fichier %s en écriture:\n" "%s\n" -msgstr "" -#: gnome/tree.c:1102 src/tree.c:1102 +#: gnome/tree.c:649 src/tree.c:649 #, c-format msgid "Copy \"%s\" directory to:" msgstr "Copier le répertoire \"%s\" dans:" -#: gnome/tree.c:1138 src/tree.c:1138 +#: gnome/tree.c:687 src/tree.c:687 #, c-format msgid "Move \"%s\" directory to:" msgstr "Déplacer le pépertoire \"%s\" dans:" -#: gnome/tree.c:1145 src/tree.c:1145 +#: gnome/tree.c:694 src/tree.c:694 #, c-format msgid "" " Can't stat the destination \n" " %s " -msgstr "" +msgstr "Impossible d'accéder à la destination \n" +" %s " -#: gnome/tree.c:1151 src/tree.c:1151 +#: gnome/tree.c:700 src/tree.c:700 msgid " The destination isn't a directory " msgstr " La destination n'est pas un répertoire " -#: gnome/tree.c:1204 src/tree.c:1204 +#: gnome/tree.c:758 src/tree.c:758 #, c-format msgid " Delete %s? " msgstr " Effacer %s? " -#: gnome/tree.c:1246 src/tree.c:1246 +#: gnome/tree.c:790 src/tree.c:790 msgid "Static" msgstr "Statique" -#: gnome/tree.c:1246 src/tree.c:1246 +#: gnome/tree.c:790 src/tree.c:790 msgid "Dynamc" msgstr "Dynamique" -#: gnome/tree.c:1336 src/tree.c:1336 +#: gnome/tree.c:880 src/tree.c:880 #, c-format msgid "" " Can't chdir to \"%s\" \n" @@ -4559,18 +4615,25 @@ " Impossible d'aller dans le répertoire \"%s\" \n" " %s " -#: gnome/tree.c:1480 src/tree.c:1480 +#: gnome/tree.c:1024 src/tree.c:1024 msgid "Rescan" msgstr "Rafraichir" -#: gnome/tree.c:1482 src/tree.c:1482 +#: gnome/tree.c:1026 src/tree.c:1026 msgid "Forget" msgstr "Oublier" -#: gnome/tree.c:1495 src/tree.c:1495 +#: gnome/tree.c:1039 src/tree.c:1039 msgid "Rmdir" msgstr "Rmdir" +#: gnome/treestore.c:357 src/treestore.c:357 +#, c-format +msgid "" +"Can't write to the %s file:\n" +"%s\n" +msgstr "Impossible d'écrire dans le fichier %s:\n" + #: gnome/user.c:265 src/user.c:265 #, c-format msgid " Invalid shell pattern defination \"%c\". " @@ -4594,14 +4657,15 @@ #: gnome/user.c:610 src/user.c:610 msgid " Warning -- ignoring file " -msgstr "" +msgstr " Avertissement -- fichier ignoré " #: gnome/user.c:611 src/user.c:611 #, c-format msgid "" "File %s is not owned by root or you or is world writable.\n" "Using it may compromise your security" -msgstr "" +msgstr "Le fichier %s n'appartient ni à vous ni à root ou tout le monde peux y écrire.\n" +"Son utilisation peux compromettre votre sécurité" #: gnome/user.c:629 src/user.c:629 msgid " I can't run programs while logged on a non local directory " @@ -4612,7 +4676,7 @@ msgid " User menu " msgstr " Menu utilisateur " -#: gnome/util.c:235 src/util.c:235 +#: gnome/util.c:239 src/util.c:239 msgid "name_trunc: too big" msgstr "name_trunc: trop gros" @@ -4669,12 +4733,12 @@ " Can't stat file \n" " " msgstr "" -" Impossible d'ouvrir %s \n" -" %s " +" Impossible d'ouvrir le fichier\n" +" " #: gnome/view.c:492 src/view.c:492 msgid " Can't view: not a regular file " -msgstr "" +msgstr " Visualisation impossible: ce n'est pas un fichier normal " #: gnome/view.c:682 src/view.c:682 #, c-format @@ -4683,7 +4747,7 @@ #: gnome/view.c:698 src/view.c:698 msgid " [grow]" -msgstr "" +msgstr " [augm.]" #: gnome/view.c:1540 gnome/view.c:1662 src/view.c:1540 src/view.c:1662 msgid " Search string not found " @@ -4714,6 +4778,10 @@ msgid "Ascii" msgstr "Ascii" +#: gnome/view.c:1966 src/view.c:1966 +msgid "Hex" +msgstr "Héxa" + #: gnome/view.c:1967 src/view.c:1967 msgid "Line" msgstr "Ligne" @@ -4734,9 +4802,13 @@ msgid "UnWrap" msgstr "" +#: gnome/view.c:1973 src/view.c:1973 +msgid "Wrap" +msgstr "Césure" + #: gnome/view.c:1976 src/view.c:1976 msgid "HxSrch" -msgstr "" +msgstr "RechHx" #: gnome/view.c:1979 src/view.c:1979 msgid "Raw" @@ -4949,7 +5021,7 @@ msgid "NumLock on keypad" msgstr "NumLock sur pavé numérique" -#: gnome/wtools.c:590 src/wtools.c:590 vfs/vfs.c:1706 +#: gnome/wtools.c:590 src/wtools.c:590 vfs/vfs.c:1776 msgid "Password:" msgstr "Mot de passe:" @@ -4976,14 +5048,14 @@ #: vfs/fish.c:226 msgid "Sorry, we can not do password authenticated connections for now." -msgstr "" +msgstr "Désolé, nous ne pouvons pas faire de connexions authentifiées par mot de passe pour l'instant." -#: vfs/ftpfs.c:461 +#: vfs/ftpfs.c:466 #, c-format msgid " Could not set source routing (%s)" msgstr " Impossible d'utiliser le routage par la source (%s)" -#: vfs/ftpfs.c:1863 vfs/ftpfs.c:1878 +#: vfs/ftpfs.c:1878 vfs/ftpfs.c:1893 msgid "" "~/.netrc file has not correct mode.\n" "Remove password or correct mode." @@ -5029,11 +5101,11 @@ msgid " Invalid password " msgstr " Mot de passe incorrect " -#: vfs/mcfs.c:322 +#: vfs/mcfs.c:323 msgid " Too many open connections " msgstr " Trop de connexions ouvertes " -#: vfs/tar.c:90 vfs/tar.c:107 +#: vfs/tar.c:83 vfs/tar.c:100 #, c-format msgid "" "Couldn't open tar archive\n" @@ -5042,16 +5114,15 @@ "Impossible d'ouvrir l'archive tar\n" "%s" -#: vfs/tar.c:277 +#: vfs/tar.c:283 msgid "Unexpected EOF on archive file" msgstr "Fin de fichier inattendue sur le fichier archive." -#: vfs/tar.c:332 vfs/tar.c:339 +#: vfs/tar.c:338 vfs/tar.c:345 msgid "Inconsistent tar archive" msgstr "Archive tar inconsistante." -#. Error on first record -#: vfs/tar.c:398 +#: vfs/tar.c:411 #, c-format msgid "" "Hmm,...\n" @@ -5062,11 +5133,3 @@ "%s\n" "ne ressemble pas à une archive tar." -#~ msgid "Rename/move..." -#~ msgstr "Renomer/déplacer..." - -#~ msgid "Delete..." -#~ msgstr "Effacer..." - -#~ msgid "Other options" -#~ msgstr "Autres options" diff -ruN old/mc-4.5.9/po/mc.pot new/mc-4.5.10/po/mc.pot --- old/mc-4.5.9/po/mc.pot Mon Jan 18 17:44:14 1999 +++ new/mc-4.5.10/po/mc.pot Sun Jan 31 18:55:19 1999 @@ -1,10 +1,18 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR Free Software Foundation, Inc. +# FIRST AUTHOR , YEAR. +# +#, fuzzy msgid "" msgstr "" -"Date: 1999-01-18 16:40:50-0600\n" -"From: Miguel de Icaza,computo,622-4680 \n" -"Content-Type: text/plain; charset=\n" -"Xgettext-Options: --default-domain=mc --directory=.. --add-comments --keyword=_ --keyword=N_ --files-from=./POTFILES.in\n" -"Files: edit/edit_key_translator.c gnome/gcmd.c gnome/gdesktop.c gnome/gdialogs.c gnome/gdnd.c gnome/gicon.c gnome/glayout.c gnome/gpopup.c gnome/gprop.c gnome/gscreen.c gnome/gtools.c gnome/gview.c gnome/gwidget.c gtkedit/edit.c gtkedit/edit.h gtkedit/editcmd.c gtkedit/editmenu.c gtkedit/editoptions.c gtkedit/editwidget.c gtkedit/gtkedit.c gtkedit/syntax.c src/achown.c src/background.c src/boxes.c src/chmod.c src/chown.c src/cmd.c src/command.c src/dialog.c src/dir.c src/ext.c src/file.c src/filegui.c src/find.c src/fixhlp.c src/help.c src/hotlist.c src/i18n.h src/info.c src/layout.c src/learn.c src/main.c src/menu.c src/option.c src/panelize.c src/popthelp.c src/poptint.h src/screen.c src/subshell.c src/tree.c src/user.c src/util.c src/utilunix.c src/view.c src/win.c src/wtools.c vfs/extfs.c vfs/fish.c vfs/ftpfs.c vfs/mcfs.c vfs/tar.c vfs/vfs.c\n" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 1999-01-31 17:54-0600\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: ENCODING\n" #: edit/edit_key_translator.c:121 msgid " Emacs key: " @@ -39,19 +47,25 @@ msgid "The GNOME edition of the Midnight Commander file manager." msgstr "" -#: gnome/gcmd.c:106 src/main.c:820 src/screen.c:2064 +#: gnome/gcmd.c:106 src/main.c:818 src/screen.c:2048 msgid " The Midnight Commander " msgstr "" -#: gnome/gcmd.c:107 src/main.c:821 +#: gnome/gcmd.c:107 src/main.c:819 msgid " Do you really want to quit the Midnight Commander? " msgstr "" -#: gnome/gcmd.c:108 gtkedit/editcmd.c:2235 src/cmd.c:256 src/file.c:1798 src/file.c:2177 src/filegui.c:578 src/hotlist.c:1030 src/main.c:822 src/screen.c:2066 src/subshell.c:701 src/subshell.c:727 src/tree.c:759 src/view.c:408 +#: gnome/gcmd.c:108 gtkedit/editcmd.c:2235 src/cmd.c:251 src/file.c:1791 +#: src/file.c:2171 src/filegui.c:573 src/hotlist.c:1035 src/main.c:820 +#: src/screen.c:2050 src/subshell.c:701 src/subshell.c:727 src/tree.c:755 +#: src/view.c:404 msgid "&Yes" msgstr "" -#: gnome/gcmd.c:108 gtkedit/editcmd.c:2235 src/cmd.c:256 src/file.c:1798 src/file.c:2177 src/filegui.c:577 src/hotlist.c:1030 src/main.c:822 src/screen.c:2066 src/subshell.c:701 src/subshell.c:727 src/tree.c:759 src/view.c:408 +#: gnome/gcmd.c:108 gtkedit/editcmd.c:2235 src/cmd.c:251 src/file.c:1791 +#: src/file.c:2171 src/filegui.c:572 src/hotlist.c:1035 src/main.c:820 +#: src/screen.c:2050 src/subshell.c:701 src/subshell.c:727 src/tree.c:755 +#: src/view.c:404 msgid "&No" msgstr "" @@ -60,92 +74,94 @@ msgstr "" #. we define this up here so we can pass it in to our callback -#: gnome/gcmd.c:209 +#: gnome/gcmd.c:211 msgid "Ignore case sensitivity." msgstr "" -#: gnome/gcmd.c:217 src/chmod.c:151 src/screen.c:443 +#: gnome/gcmd.c:219 src/chmod.c:150 src/screen.c:425 msgid "Name" msgstr "" -#: gnome/gcmd.c:224 +#: gnome/gcmd.c:226 msgid "File Type" msgstr "" -#: gnome/gcmd.c:230 src/screen.c:444 src/screen.c:447 +#: gnome/gcmd.c:232 src/screen.c:426 src/screen.c:427 msgid "Size" msgstr "" -#: gnome/gcmd.c:236 +#: gnome/gcmd.c:238 msgid "Time Last Accessed" msgstr "" -#: gnome/gcmd.c:242 +#: gnome/gcmd.c:244 msgid "Time Last Modified" msgstr "" -#: gnome/gcmd.c:248 +#: gnome/gcmd.c:250 msgid "Time Last Changed" msgstr "" -#: gnome/gcmd.c:262 +#: gnome/gcmd.c:264 msgid "Reverse the order." msgstr "" -#: gnome/gcmd.c:324 +#: gnome/gcmd.c:326 msgid "Enter name." msgstr "" -#: gnome/gcmd.c:329 +#: gnome/gcmd.c:332 msgid "Enter label for command:" msgstr "" -#: gnome/gcmd.c:424 +#: gnome/gcmd.c:427 msgid "Find all core files" msgstr "" -#: gnome/gcmd.c:427 src/panelize.c:354 +#: gnome/gcmd.c:430 src/panelize.c:350 msgid "Find rejects after patching" msgstr "" -#: gnome/gcmd.c:469 +#: gnome/gcmd.c:472 msgid "Run Command" msgstr "" #. Frame 1 -#: gnome/gcmd.c:473 +#: gnome/gcmd.c:477 msgid "Preset Commands" msgstr "" -#: gnome/gcmd.c:490 +#: gnome/gcmd.c:494 msgid "Add" msgstr "" -#: gnome/gcmd.c:494 +#: gnome/gcmd.c:498 msgid "Remove" msgstr "" -#: gnome/gcmd.c:502 +#. Frame 2 +#: gnome/gcmd.c:506 msgid "Run this Command" msgstr "" -#: gnome/gcmd.c:509 +#: gnome/gcmd.c:513 msgid "Command: " msgstr "" -#: gnome/gcmd.c:553 +#: gnome/gcmd.c:557 msgid "Set Filter" msgstr "" -#: gnome/gcmd.c:557 gnome/gcmd.c:598 gnome/gcmd.c:603 gnome/gcmd.c:607 gnome/gscreen.c:2381 +#: gnome/gcmd.c:562 gnome/gcmd.c:603 gnome/gcmd.c:608 gnome/gcmd.c:612 +#: gnome/gscreen.c:2464 msgid "Show all files" msgstr "" -#: gnome/gcmd.c:564 +#: gnome/gcmd.c:569 msgid "." msgstr "" -#: gnome/gcmd.c:580 +#: gnome/gcmd.c:585 msgid "" "Enter a filter here for files in the panel view.\n" "\n" @@ -153,167 +169,198 @@ "*.gif will show just gif images" msgstr "" -#: gnome/gcmd.c:582 +#: gnome/gcmd.c:587 msgid "Enter a Regular Expression to filter files in the panel view." msgstr "" -#: gnome/gcmd.c:639 gnome/gpopup.c:47 +#: gnome/gcmd.c:644 gnome/gpopup.c:49 msgid " Open with..." msgstr "" -#: gnome/gcmd.c:640 gnome/gpopup.c:48 +#: gnome/gcmd.c:645 gnome/gpopup.c:50 msgid "Enter extra arguments:" msgstr "" -#: gnome/gdesktop.c:355 gnome/gdesktop.c:1412 +#: gnome/gdesktop.c:355 gnome/gdesktop.c:1577 msgid "Warning" msgstr "" #: gnome/gdesktop.c:356 +#, c-format msgid "Could not open %s; will not have initial desktop icons" msgstr "" -#: gnome/gdesktop.c:1378 +#: gnome/gdesktop.c:1543 msgid "Trashcan" msgstr "" #. Create the link to the user's home directory so that he will have an icon -#: gnome/gdesktop.c:1408 +#: gnome/gdesktop.c:1573 msgid "Home directory" msgstr "" -#: gnome/gdesktop.c:1413 +#: gnome/gdesktop.c:1578 +#, c-format msgid "Could not symlink %s to %s; will not have initial desktop icons." msgstr "" -#: gnome/gdialogs.c:324 +#: gnome/gdialogs.c:58 +msgid "To: " +msgstr "" + +#: gnome/gdialogs.c:59 +msgid "Copying from: " +msgstr "" + +#: gnome/gdialogs.c:60 +msgid "Deleting file: " +msgstr "" + +#: gnome/gdialogs.c:340 msgid "Files Exist" msgstr "" -#: gnome/gdialogs.c:335 -msgid "Some of the files you are trying to copy already exist in the destination folder." +#: gnome/gdialogs.c:352 +msgid "" +"Some of the files you are trying to copy already exist in the destination " +"folder." msgstr "" -#: gnome/gdialogs.c:344 +#: gnome/gdialogs.c:361 msgid "Prompt me before overwriting any file." msgstr "" -#: gnome/gdialogs.c:351 +#: gnome/gdialogs.c:368 msgid "Don't overwrite any files." msgstr "" -#: gnome/gdialogs.c:363 +#: gnome/gdialogs.c:380 msgid "Overwrite:" msgstr "" -#: gnome/gdialogs.c:370 +#: gnome/gdialogs.c:387 msgid "Older files." msgstr "" -#: gnome/gdialogs.c:376 +#: gnome/gdialogs.c:393 msgid "Files only if size differs." msgstr "" -#: gnome/gdialogs.c:382 +#: gnome/gdialogs.c:399 msgid "All files." msgstr "" -#. so what's the situation? Do we prompt or don't we prompt. -#: gnome/gdialogs.c:431 +#: gnome/gdialogs.c:448 msgid "File Exists" msgstr "" -#: gnome/gdialogs.c:436 +#: gnome/gdialogs.c:454 +#, c-format msgid "The target file already exists: %s" msgstr "" -#: gnome/gdialogs.c:443 +#: gnome/gdialogs.c:461 msgid "Replace it?" msgstr "" -#. mapping operations into names -#: gnome/gdialogs.c:514 gtkedit/editwidget.c:1064 gtkedit/gtkedit.c:1315 src/file.c:129 src/file.c:791 src/screen.c:2304 src/screen.c:2334 src/tree.c:1028 +#: gnome/gdialogs.c:532 gtkedit/editwidget.c:1064 gtkedit/gtkedit.c:1318 +#: src/file.c:784 src/screen.c:2288 src/screen.c:2318 src/tree.c:1024 msgid "Copy" msgstr "" -#: gnome/gdialogs.c:517 gtkedit/editwidget.c:1065 src/file.c:129 +#: gnome/gdialogs.c:535 gtkedit/editwidget.c:1065 msgid "Move" msgstr "" -#: gnome/gdialogs.c:532 +#: gnome/gdialogs.c:552 msgid "Destination" msgstr "" -#: gnome/gdialogs.c:536 +#: gnome/gdialogs.c:556 msgid "Find Destination Folder" msgstr "" -#: gnome/gdialogs.c:541 +#: gnome/gdialogs.c:561 msgid "Copy as a background process" msgstr "" -#: gnome/gdialogs.c:561 +#: gnome/gdialogs.c:581 msgid "Advanced Options" msgstr "" -#: gnome/gdialogs.c:565 +#: gnome/gdialogs.c:585 msgid "Preserve symlinks" msgstr "" -#: gnome/gdialogs.c:575 +#: gnome/gdialogs.c:595 msgid "Follow links." msgstr "" -#: gnome/gdialogs.c:580 -msgid "Selecting this will copy the files that symlinks point to instead of just copying the link." +#: gnome/gdialogs.c:600 +msgid "" +"Selecting this will copy the files that symlinks point to instead of just " +"copying the link." msgstr "" -#: gnome/gdialogs.c:584 +#: gnome/gdialogs.c:604 msgid "Preserve file attributes." msgstr "" -#: gnome/gdialogs.c:588 +#: gnome/gdialogs.c:608 msgid "Preserves the permissions and the UID/GID if possible" msgstr "" -#: gnome/gdialogs.c:593 +#: gnome/gdialogs.c:613 msgid "Recursively copy subdirectories." msgstr "" -#: gnome/gdialogs.c:597 +#: gnome/gdialogs.c:617 msgid "If set, this will copy the directories recursively" msgstr "" -#: gnome/gdialogs.c:751 +#: gnome/gdialogs.c:733 +msgid "Move Progress" +msgstr "" + +#: gnome/gdialogs.c:736 +msgid "Copy Progress" +msgstr "" + +#: gnome/gdialogs.c:739 +msgid "Delete Progress" +msgstr "" + +#: gnome/gdialogs.c:784 msgid "File " msgstr "" -#: gnome/gdialogs.c:755 +#: gnome/gdialogs.c:788 msgid " is " msgstr "" -#: gnome/gdialogs.c:758 +#: gnome/gdialogs.c:791 msgid " Done." msgstr "" -#: gnome/gdnd.c:24 -msgid "Move here" +#: gnome/gdnd.c:49 +msgid "_Move here" msgstr "" -#: gnome/gdnd.c:25 -msgid "Copy here" +#: gnome/gdnd.c:50 +msgid "_Copy here" msgstr "" -#: gnome/gdnd.c:26 -msgid "Link here" +#: gnome/gdnd.c:51 +msgid "_Link here" msgstr "" -#: gnome/gdnd.c:28 +#: gnome/gdnd.c:53 msgid "Cancel drag" msgstr "" #. FIXME: this error message sucks -#: gnome/gdnd.c:207 +#: gnome/gdnd.c:191 +#, c-format msgid "" "Could not stat %s\n" "%s" @@ -327,274 +374,356 @@ msgid "Default set of icons not found, check your installation" msgstr "" -#: gnome/glayout.c:273 +#: gnome/glayout.c:274 msgid "Enter command to run" msgstr "" -#: gnome/glayout.c:283 +#: gnome/glayout.c:284 msgid "_Terminal" msgstr "" -#: gnome/glayout.c:283 +#: gnome/glayout.c:284 msgid "Launch a new terminal in the current directory" msgstr "" -#: gnome/glayout.c:285 +#. If this ever changes, make sure you update create_new_menu accordingly. +#: gnome/glayout.c:286 msgid "_Directory..." msgstr "" -#: gnome/glayout.c:285 +#: gnome/glayout.c:286 msgid "Creates a new directory" msgstr "" -#: gnome/glayout.c:291 +#: gnome/glayout.c:292 msgid "New _Window" msgstr "" -#: gnome/glayout.c:291 +#: gnome/glayout.c:292 msgid "Opens a new window" msgstr "" +#. We want to make a new menu entry here... +#. For example: +#. New-> +#. Command Prompt +#. Gimp Image +#. Gnumeric Spreadsheet +#. Text Document #. etc... -#: gnome/glayout.c:301 +#: gnome/glayout.c:302 msgid "_New" msgstr "" -#: gnome/glayout.c:303 +#: gnome/glayout.c:304 msgid "_Open" msgstr "" -#: gnome/glayout.c:303 +#: gnome/glayout.c:304 msgid "Opens the selected files" msgstr "" #. { GNOME_APP_UI_ITEM, N_("Open _FTP site"), N_("Opens an FTP site"), ftplink_cmd }, -#: gnome/glayout.c:305 +#: gnome/glayout.c:306 msgid "_Copy..." msgstr "" -#: gnome/glayout.c:305 +#: gnome/glayout.c:306 msgid "Copy files" msgstr "" -#: gnome/glayout.c:306 +#: gnome/glayout.c:307 msgid "_Delete..." msgstr "" -#: gnome/glayout.c:306 +#: gnome/glayout.c:307 msgid "Delete files from disk" msgstr "" -#: gnome/glayout.c:307 +#: gnome/glayout.c:308 msgid "_Move..." msgstr "" -#: gnome/glayout.c:307 +#: gnome/glayout.c:308 msgid "Rename or move files" msgstr "" -#: gnome/glayout.c:309 +#: gnome/glayout.c:310 msgid "C_lose" msgstr "" -#: gnome/glayout.c:309 +#: gnome/glayout.c:310 msgid "Close this panel" msgstr "" -#: gnome/glayout.c:320 -msgid "_Select All" +#: gnome/glayout.c:317 +msgid "Select _All" msgstr "" -#: gnome/glayout.c:320 +#: gnome/glayout.c:317 msgid "Select all files in the current Panel" msgstr "" -#: gnome/glayout.c:321 +#: gnome/glayout.c:318 msgid "_Select Files..." msgstr "" -#: gnome/glayout.c:321 +#: gnome/glayout.c:318 msgid "Select a group of files" msgstr "" -#: gnome/glayout.c:322 +#: gnome/glayout.c:319 msgid "_Invert Selection" msgstr "" -#: gnome/glayout.c:322 +#: gnome/glayout.c:319 msgid "Reverses the list of tagged files" msgstr "" -#: gnome/glayout.c:324 +#: gnome/glayout.c:321 msgid "_Rescan Directory" msgstr "" -#: gnome/glayout.c:324 +#: gnome/glayout.c:321 msgid "Rescan the directory contents" msgstr "" -#: gnome/glayout.c:331 +#: gnome/glayout.c:328 msgid "Icon View" msgstr "" -#: gnome/glayout.c:332 +#: gnome/glayout.c:329 msgid "Partial View" msgstr "" -#: gnome/glayout.c:333 +#: gnome/glayout.c:330 msgid "Full View" msgstr "" -#: gnome/glayout.c:334 +#: gnome/glayout.c:331 msgid "Custom View" msgstr "" -#: gnome/glayout.c:340 +#: gnome/glayout.c:337 msgid "_Sort By..." msgstr "" -#: gnome/glayout.c:340 +#: gnome/glayout.c:337 msgid "Confirmation settings" msgstr "" -#: gnome/glayout.c:341 +#: gnome/glayout.c:338 msgid "_Filter View..." msgstr "" -#: gnome/glayout.c:341 +#: gnome/glayout.c:338 msgid "Global option settings" msgstr "" -#: gnome/glayout.c:348 +#: gnome/glayout.c:345 msgid "_Find File..." msgstr "" -#: gnome/glayout.c:348 +#: gnome/glayout.c:345 msgid "Locate files on disk" msgstr "" -#: gnome/glayout.c:351 -msgid "_Compare panels..." -msgstr "" - -#: gnome/glayout.c:351 -msgid "Compare two panel contents" -msgstr "" - -#: gnome/glayout.c:352 +#. { GNOME_APP_UI_ITEM, N_("_Compare panels..."), N_("Compare two panel contents"), gnome_compare_panels }, +#: gnome/glayout.c:349 msgid "_Run Command..." msgstr "" -#: gnome/glayout.c:352 +#: gnome/glayout.c:349 msgid "Runs a command" msgstr "" -#: gnome/glayout.c:354 +#: gnome/glayout.c:351 msgid "_Run Command in panel..." msgstr "" -#: gnome/glayout.c:354 +#: gnome/glayout.c:351 msgid "Run a command and put the results in a panel" msgstr "" -#: gnome/glayout.c:357 +#: gnome/glayout.c:354 msgid "_Active VFS list..." msgstr "" -#: gnome/glayout.c:357 +#: gnome/glayout.c:354 msgid "List of active virtual file systems" msgstr "" -#. does this do anything? -#. { GNOME_APP_UI_ITEM, N_("_Undelete files (ext2fs only)..."), N_("Recover deleted files"), undelete_cmd }, -#: gnome/glayout.c:364 +#: gnome/glayout.c:361 msgid "_Background jobs..." msgstr "" -#: gnome/glayout.c:364 +#: gnome/glayout.c:361 msgid "List of background operations" msgstr "" -#: gnome/glayout.c:372 +#. GNOMEUIINFO_HELP ("midnight-commander"), +#: gnome/glayout.c:369 msgid "_About" msgstr "" -#: gnome/glayout.c:372 +#: gnome/glayout.c:369 msgid "Information on this program" msgstr "" -#: gnome/glayout.c:378 gnome/gview.c:323 +#: gnome/glayout.c:375 gnome/gview.c:323 msgid "_File" msgstr "" -#: gnome/glayout.c:379 +#: gnome/glayout.c:376 msgid "_Edit" msgstr "" -#: gnome/glayout.c:380 +#: gnome/glayout.c:377 msgid "_Layout" msgstr "" -#: gnome/glayout.c:381 +#: gnome/glayout.c:378 msgid "_Commands" msgstr "" -#: gnome/glayout.c:382 +#: gnome/glayout.c:379 msgid "_Help" msgstr "" -#: gnome/glayout.c:477 +#: gnome/glayout.c:474 msgid "File/New/Directory..." msgstr "" -#: gnome/gpopup.c:199 gnome/gpopup.c:200 +#: gnome/gpopup.c:215 gnome/gpopup.c:216 msgid "Properties" msgstr "" -#: gnome/gpopup.c:202 gnome/gpopup.c:203 +#: gnome/gpopup.c:218 gnome/gpopup.c:219 msgid "Open" msgstr "" -#: gnome/gpopup.c:204 +#: gnome/gpopup.c:220 msgid "Open with" msgstr "" -#: gnome/gpopup.c:205 src/screen.c:2302 src/screen.c:2332 +#: gnome/gpopup.c:221 src/screen.c:2286 src/screen.c:2316 msgid "View" msgstr "" -#: gnome/gpopup.c:206 +#: gnome/gpopup.c:222 msgid "View unfiltered" msgstr "" -#: gnome/gpopup.c:207 gtkedit/gtkedit.c:1363 src/screen.c:2303 src/screen.c:2333 src/view.c:1972 +#: gnome/gpopup.c:223 gtkedit/gtkedit.c:1366 src/screen.c:2287 +#: src/screen.c:2317 src/view.c:1968 msgid "Edit" msgstr "" -#: gnome/gpopup.c:209 +#: gnome/gpopup.c:225 msgid "Link..." msgstr "" -#: gnome/gpopup.c:210 +#: gnome/gpopup.c:226 msgid "Symlink..." msgstr "" -#: gnome/gpopup.c:211 +#: gnome/gpopup.c:227 msgid "Edit symlink..." msgstr "" -#: gnome/gpopup.c:218 gnome/gpopup.c:229 +#: gnome/gpopup.c:234 gnome/gpopup.c:245 msgid "Move/rename..." msgstr "" -#: gnome/gpopup.c:219 gnome/gpopup.c:230 +#: gnome/gpopup.c:235 gnome/gpopup.c:246 msgid "Copy..." msgstr "" -#: gnome/gpopup.c:220 gnome/gpopup.c:232 gtkedit/editwidget.c:1067 src/file.c:129 src/screen.c:2307 src/screen.c:2337 +#: gnome/gpopup.c:236 gnome/gpopup.c:248 gtkedit/editwidget.c:1067 +#: src/screen.c:2291 src/screen.c:2321 msgid "Delete" msgstr "" +#: gnome/gprefs.c:96 +msgid "Show backup files" +msgstr "" + +#: gnome/gprefs.c:100 +msgid "Show hidden files" +msgstr "" + +#: gnome/gprefs.c:104 +msgid "Mix files and directories" +msgstr "" + +#: gnome/gprefs.c:108 +msgid "Use shell patterns instead of regular expressions" +msgstr "" + +#: gnome/gprefs.c:117 +msgid "Confirm when deleting file" +msgstr "" + +#: gnome/gprefs.c:121 +msgid "Confirm when overwriting files" +msgstr "" + +#: gnome/gprefs.c:125 +msgid "Confirm when executing files" +msgstr "" + +#: gnome/gprefs.c:129 +msgid "Show progress while operations are being performed" +msgstr "" + +#: gnome/gprefs.c:138 +msgid "VFS Timeout :" +msgstr "" + +#: gnome/gprefs.c:139 gnome/gprefs.c:164 +msgid "Seconds" +msgstr "" + +#: gnome/gprefs.c:142 +msgid "Anonymous FTP password :" +msgstr "" + +#: gnome/gprefs.c:146 +msgid "Always use FTP proxy" +msgstr "" + +#: gnome/gprefs.c:155 +msgid "Fast directory reload" +msgstr "" + +#: gnome/gprefs.c:159 +msgid "Compute totals before copying files" +msgstr "" + +#: gnome/gprefs.c:163 +msgid "FTP directory cache timeout :" +msgstr "" + +#: gnome/gprefs.c:167 +msgid "Allow customization of icons in panels" +msgstr "" + +#: gnome/gprefs.c:176 +msgid "File display" +msgstr "" + +#: gnome/gprefs.c:180 +msgid "Confirmation" +msgstr "" + +#: gnome/gprefs.c:184 +msgid "VFS" +msgstr "" + +#: gnome/gprefs.c:188 +msgid "Caching" +msgstr "" + #: gnome/gprop.c:58 gnome/gprop.c:75 msgid "Filename" msgstr "" @@ -603,7 +732,7 @@ msgid "Full name: " msgstr "" -#: gnome/gprop.c:109 src/panelize.c:209 +#: gnome/gprop.c:109 src/panelize.c:205 msgid "Command" msgstr "" @@ -623,6 +752,7 @@ msgid "Current mode: " msgstr "" +#. Headings #: gnome/gprop.c:272 msgid "Read" msgstr "" @@ -639,11 +769,13 @@ msgid "Special" msgstr "" +#. Permissions #: gnome/gprop.c:279 msgid "User" msgstr "" -#: gnome/gprop.c:280 gnome/gprop.c:405 src/screen.c:455 +#. Group +#: gnome/gprop.c:280 gnome/gprop.c:405 src/screen.c:439 msgid "Group" msgstr "" @@ -651,6 +783,7 @@ msgid "Other" msgstr "" +#. Special #: gnome/gprop.c:285 msgid "Set UID" msgstr "" @@ -667,7 +800,8 @@ msgid "" msgstr "" -#: gnome/gprop.c:390 src/screen.c:454 +#. Owner +#: gnome/gprop.c:390 src/screen.c:438 msgid "Owner" msgstr "" @@ -679,7 +813,7 @@ msgid "Title" msgstr "" -#: gnome/gprop.c:521 gnome/gscreen.c:2167 +#: gnome/gprop.c:521 gnome/gscreen.c:2246 msgid "Icon" msgstr "" @@ -687,172 +821,180 @@ msgid "Select icon" msgstr "" -#: gnome/gscreen.c:1462 +#: gnome/gscreen.c:1544 msgid "All files" msgstr "" -#: gnome/gscreen.c:1464 +#: gnome/gscreen.c:1546 msgid "Archives and compressed files" msgstr "" -#: gnome/gscreen.c:1466 +#: gnome/gscreen.c:1548 msgid "RPM/DEB files" msgstr "" -#: gnome/gscreen.c:1468 +#: gnome/gscreen.c:1550 msgid "Text/Document files" msgstr "" -#: gnome/gscreen.c:1470 +#: gnome/gscreen.c:1552 msgid "HTML and SGML files" msgstr "" -#: gnome/gscreen.c:1472 +#: gnome/gscreen.c:1554 msgid "Postscript and PDF files" msgstr "" -#: gnome/gscreen.c:1474 +#: gnome/gscreen.c:1556 msgid "Spreadsheet files" msgstr "" -#: gnome/gscreen.c:1476 +#: gnome/gscreen.c:1558 msgid "Image files" msgstr "" -#: gnome/gscreen.c:1479 +#: gnome/gscreen.c:1561 msgid "Video/animation files" msgstr "" -#: gnome/gscreen.c:1481 +#: gnome/gscreen.c:1563 msgid "Audio files" msgstr "" -#: gnome/gscreen.c:1483 +#: gnome/gscreen.c:1565 msgid "C program files" msgstr "" -#: gnome/gscreen.c:1485 +#: gnome/gscreen.c:1567 msgid "C++ program files" msgstr "" -#: gnome/gscreen.c:1487 +#: gnome/gscreen.c:1569 msgid "Objective-C program files" msgstr "" -#: gnome/gscreen.c:1489 +#: gnome/gscreen.c:1571 msgid "Scheme program files" msgstr "" -#: gnome/gscreen.c:1491 +#: gnome/gscreen.c:1573 msgid "Assembler program files" msgstr "" -#: gnome/gscreen.c:1493 +#: gnome/gscreen.c:1575 msgid "Misc. program files" msgstr "" -#: gnome/gscreen.c:1495 +#: gnome/gscreen.c:1577 msgid "Font files" msgstr "" -#: gnome/gscreen.c:1622 +#: gnome/gscreen.c:1704 +#, c-format msgid "Search: %s" msgstr "" -#: gnome/gscreen.c:1632 +#: gnome/gscreen.c:1714 +#, c-format msgid "%s bytes in %d file" msgstr "" -#: gnome/gscreen.c:1632 +#: gnome/gscreen.c:1714 +#, c-format msgid "%s bytes in %d files" msgstr "" -#: gnome/gscreen.c:1658 src/screen.c:692 +#: gnome/gscreen.c:1740 src/screen.c:677 msgid "" msgstr "" -#: gnome/gscreen.c:1712 +#: gnome/gscreen.c:1794 msgid "Filter" msgstr "" -#: gnome/gscreen.c:2167 +#: gnome/gscreen.c:2246 msgid "Switch view to an Icon view" msgstr "" -#: gnome/gscreen.c:2169 +#: gnome/gscreen.c:2248 msgid "Brief" msgstr "" -#: gnome/gscreen.c:2169 +#: gnome/gscreen.c:2248 msgid "Switch view to show just file name and type" msgstr "" -#: gnome/gscreen.c:2171 +#: gnome/gscreen.c:2250 msgid "Detailed" msgstr "" -#: gnome/gscreen.c:2171 +#: gnome/gscreen.c:2250 msgid "Switch view to show detailed file statistics" msgstr "" -#: gnome/gscreen.c:2173 +#: gnome/gscreen.c:2252 msgid "Custom" msgstr "" -#: gnome/gscreen.c:2173 -msgid "Switch view to show custom determined statistics" +#: gnome/gscreen.c:2252 +msgid "Switch view to show custom determined statistics." msgstr "" -#: gnome/gscreen.c:2178 +#: gnome/gscreen.c:2257 msgid "Back" msgstr "" -#: gnome/gscreen.c:2178 +#: gnome/gscreen.c:2257 msgid "Go to the previously visited directory" msgstr "" -#: gnome/gscreen.c:2180 +#: gnome/gscreen.c:2259 msgid "Up" msgstr "" -#: gnome/gscreen.c:2180 +#: gnome/gscreen.c:2259 msgid "Go up a level in the directory heirarchy" msgstr "" -#: gnome/gscreen.c:2182 +#: gnome/gscreen.c:2261 msgid "Forward" msgstr "" -#: gnome/gscreen.c:2182 +#: gnome/gscreen.c:2261 msgid "Go to the next directory" msgstr "" -#: gnome/gscreen.c:2185 +#: gnome/gscreen.c:2264 msgid "Home" msgstr "" -#: gnome/gscreen.c:2185 +#: gnome/gscreen.c:2264 msgid "Go to your home directory" msgstr "" -#: gnome/gscreen.c:2330 +#: gnome/gscreen.c:2413 msgid "Location:" msgstr "" -#. WITH_BACKGROUND -#: gnome/gtools.c:103 src/boxes.c:142 src/boxes.c:282 src/boxes.c:382 src/boxes.c:470 src/boxes.c:650 src/boxes.c:732 src/boxes.c:787 src/boxes.c:898 src/filegui.c:812 src/find.c:156 src/layout.c:372 src/option.c:144 src/wtools.c:292 src/wtools.c:564 +#: gnome/gtools.c:104 src/boxes.c:138 src/boxes.c:278 src/boxes.c:378 +#: src/boxes.c:466 src/boxes.c:646 src/boxes.c:728 src/boxes.c:783 +#: src/boxes.c:894 src/filegui.c:807 src/find.c:151 src/layout.c:369 +#: src/option.c:144 src/wtools.c:289 src/wtools.c:561 msgid "&Ok" msgstr "" -#: gnome/gview.c:119 src/view.c:687 +#: gnome/gview.c:119 src/view.c:683 +#, c-format msgid "Offset 0x%08x" msgstr "" -#: gnome/gview.c:121 src/view.c:689 +#: gnome/gview.c:121 src/view.c:685 +#, c-format msgid "Col %d" msgstr "" -#: gnome/gview.c:125 src/view.c:693 +#: gnome/gview.c:125 src/view.c:689 +#, c-format msgid "%s bytes" msgstr "" @@ -888,7 +1030,6 @@ msgid "Wrap the text" msgstr "" -#. Can not use this one yet, as it destroys the viewer, need to fix that #: gnome/gview.c:315 msgid "_Formatted" msgstr "" @@ -917,11 +1058,11 @@ msgid "help" msgstr "" -#: gnome/gwidget.c:96 src/file.c:2196 +#: gnome/gwidget.c:96 src/file.c:2190 msgid "yes" msgstr "" -#: gnome/gwidget.c:98 src/file.c:2194 +#: gnome/gwidget.c:98 src/file.c:2188 msgid "no" msgstr "" @@ -934,7 +1075,11 @@ msgstr "" #. The file-name is printed after the ':' -#: gtkedit/edit.c:129 gtkedit/edit.c:224 gtkedit/edit.c:231 gtkedit/edit.c:238 gtkedit/edit.c:245 gtkedit/edit.c:251 gtkedit/edit.c:308 gtkedit/edit.c:344 gtkedit/editcmd.c:1932 gtkedit/editwidget.c:947 src/dir.c:378 src/screen.c:2322 src/tree.c:694 src/tree.c:700 src/wtools.c:225 vfs/fish.c:226 +#: gtkedit/edit.c:129 gtkedit/edit.c:224 gtkedit/edit.c:231 gtkedit/edit.c:238 +#: gtkedit/edit.c:245 gtkedit/edit.c:251 gtkedit/edit.c:308 gtkedit/edit.c:344 +#: gtkedit/editcmd.c:1932 gtkedit/editwidget.c:947 src/dir.c:375 +#: src/screen.c:2306 src/tree.c:692 src/tree.c:698 src/wtools.c:222 +#: vfs/fish.c:224 msgid " Error " msgstr "" @@ -968,8 +1113,12 @@ msgid " Save As " msgstr "" -#. the file exists -#: gtkedit/editcmd.c:482 gtkedit/editcmd.c:801 gtkedit/editcmd.c:831 gtkedit/editcmd.c:978 gtkedit/editcmd.c:1075 src/ext.c:297 src/file.c:613 src/help.c:321 src/main.c:667 src/screen.c:2080 src/subshell.c:700 src/subshell.c:726 src/utilunix.c:384 src/utilunix.c:388 src/utilunix.c:454 vfs/mcfs.c:171 +#. Warning message with a query to continue or cancel the operation +#: gtkedit/editcmd.c:482 gtkedit/editcmd.c:801 gtkedit/editcmd.c:831 +#: gtkedit/editcmd.c:978 gtkedit/editcmd.c:1075 src/ext.c:294 src/file.c:606 +#: src/help.c:318 src/main.c:665 src/screen.c:2064 src/subshell.c:700 +#: src/subshell.c:726 src/utilunix.c:382 src/utilunix.c:386 src/utilunix.c:452 +#: vfs/mcfs.c:169 msgid " Warning " msgstr "" @@ -982,7 +1131,8 @@ msgid "Overwrite" msgstr "" -#: gtkedit/editcmd.c:485 gtkedit/editcmd.c:774 gtkedit/editcmd.c:801 gtkedit/editcmd.c:831 gtkedit/editcmd.c:978 gtkedit/editcmd.c:1565 +#: gtkedit/editcmd.c:485 gtkedit/editcmd.c:774 gtkedit/editcmd.c:801 +#: gtkedit/editcmd.c:831 gtkedit/editcmd.c:978 gtkedit/editcmd.c:1565 msgid "Cancel" msgstr "" @@ -1009,7 +1159,9 @@ msgid " Error trying to open macro file " msgstr "" -#: gtkedit/editcmd.c:632 gtkedit/editcmd.c:640 gtkedit/editcmd.c:676 gtkedit/editcmd.c:731 +#: gtkedit/editcmd.c:632 gtkedit/editcmd.c:640 gtkedit/editcmd.c:676 +#: gtkedit/editcmd.c:731 +#, c-format msgid "key '%d 0': " msgstr "" @@ -1017,6 +1169,7 @@ msgid " Error trying to overwrite macro file " msgstr "" +#. This heads the 'Macro' dialog box #: gtkedit/editcmd.c:668 msgid " Macro " msgstr "" @@ -1035,6 +1188,7 @@ msgid " Delete Macro " msgstr "" +#. This heads the 'Load Macro' dialog box #: gtkedit/editcmd.c:755 msgid " Load macro " msgstr "" @@ -1048,7 +1202,8 @@ msgid " Save file " msgstr "" -#: gtkedit/editcmd.c:774 gtkedit/editwidget.c:1061 gtkedit/gtkedit.c:1293 src/view.c:1968 +#: gtkedit/editcmd.c:774 gtkedit/editwidget.c:1061 gtkedit/gtkedit.c:1296 +#: src/view.c:1964 msgid "Save" msgstr "" @@ -1062,6 +1217,7 @@ msgid "Continue" msgstr "" +#. Heads the 'Load' file dialog box #: gtkedit/editcmd.c:820 gtkedit/editcmd.c:834 msgid " Load " msgstr "" @@ -1082,18 +1238,26 @@ msgid " Cancel " msgstr "" +#. This is for the confirm replace dialog box. The replaced string comes after the ':' #: gtkedit/editcmd.c:1136 gtkedit/editcmd.c:1563 msgid " Replace with: " msgstr "" -#: gtkedit/editcmd.c:1140 gtkedit/editcmd.c:1217 gtkedit/editcmd.c:1467 gtkedit/editcmd.c:1561 gtkedit/editcmd.c:2094 gtkedit/editcmd.c:2125 gtkedit/editcmd.c:2127 +#. Heads the 'Replace' dialog box +#: gtkedit/editcmd.c:1140 gtkedit/editcmd.c:1217 gtkedit/editcmd.c:1467 +#: gtkedit/editcmd.c:1561 gtkedit/editcmd.c:2094 gtkedit/editcmd.c:2125 +#: gtkedit/editcmd.c:2127 msgid " Replace " msgstr "" -#: gtkedit/editcmd.c:1285 gtkedit/editcmd.c:1461 gtkedit/editcmd.c:2196 src/view.c:1450 src/view.c:1540 src/view.c:1662 src/view.c:1861 src/view.c:1893 +#. Heads the 'Search' dialog box +#: gtkedit/editcmd.c:1285 gtkedit/editcmd.c:1461 gtkedit/editcmd.c:2196 +#: src/view.c:1446 src/view.c:1536 src/view.c:1658 src/view.c:1857 +#: src/view.c:1889 msgid " Search " msgstr "" +#. An input line comes after the ':' #: gtkedit/editcmd.c:1335 msgid " Enter search text : " msgstr "" @@ -1106,10 +1270,12 @@ msgid " Enter argument order : " msgstr "" +#. Tool hint #: gtkedit/editcmd.c:1350 gtkedit/editcmd.c:1351 msgid "Enter the order of replacement of your scanf format specifiers" msgstr "" +#. The following are check boxes #: gtkedit/editcmd.c:1356 msgid " Whole words only " msgstr "" @@ -1130,6 +1296,7 @@ msgid " Backwards " msgstr "" +#. Tool hint #: gtkedit/editcmd.c:1371 gtkedit/editcmd.c:1372 msgid "Warning: Searching backward can be slow" msgstr "" @@ -1180,7 +1347,8 @@ msgstr "" #: gtkedit/editcmd.c:1932 -msgid " Invalid regular expression, or scanf expression with to many conversions " +msgid "" +" Invalid regular expression, or scanf expression with to many conversions " msgstr "" #. "Invalid regexp string or scanf string" @@ -1189,6 +1357,7 @@ msgstr "" #: gtkedit/editcmd.c:2124 +#, c-format msgid " %ld replacements made. " msgstr "" @@ -1196,6 +1365,7 @@ msgid " Search string not found. " msgstr "" +#. Confirm 'Quit' dialog box #: gtkedit/editcmd.c:2220 gtkedit/editcmd.c:2235 gtkedit/editcmd.c:2238 msgid " Quit " msgstr "" @@ -1230,7 +1400,8 @@ msgid " Copy to clipboard " msgstr "" -#: gtkedit/editcmd.c:2434 gtkedit/editcmd.c:2456 gtkedit/editcmd.c:2509 gtkedit/editcmd.c:2522 +#: gtkedit/editcmd.c:2434 gtkedit/editcmd.c:2456 gtkedit/editcmd.c:2509 +#: gtkedit/editcmd.c:2522 msgid " Unable to save to file. " msgstr "" @@ -1238,11 +1409,13 @@ msgid " Cut to clipboard " msgstr "" -#: gtkedit/editcmd.c:2544 gtkedit/editcmd.c:2548 gtkedit/editcmd.c:2553 gtkedit/editcmd.c:2556 src/view.c:1833 +#: gtkedit/editcmd.c:2544 gtkedit/editcmd.c:2548 gtkedit/editcmd.c:2553 +#: gtkedit/editcmd.c:2556 src/view.c:1829 msgid " Goto line " msgstr "" -#: gtkedit/editcmd.c:2544 gtkedit/editcmd.c:2548 gtkedit/editcmd.c:2553 gtkedit/editcmd.c:2556 +#: gtkedit/editcmd.c:2544 gtkedit/editcmd.c:2548 gtkedit/editcmd.c:2553 +#: gtkedit/editcmd.c:2556 msgid " Enter line: " msgstr "" @@ -1250,7 +1423,6 @@ msgid " Save Block " msgstr "" -#. returns 1 on success #: gtkedit/editcmd.c:2628 msgid " Insert File " msgstr "" @@ -1263,6 +1435,7 @@ msgid " Error trying to insert file. " msgstr "" +#. Not essential to translate #: gtkedit/editcmd.c:2663 msgid " Sort block " msgstr "" @@ -1276,6 +1449,7 @@ msgid " Run Sort " msgstr "" +#. Not essential to translate #: gtkedit/editcmd.c:2672 msgid " Enter sort options (see manpage) separated by whitespace: " msgstr "" @@ -1317,6 +1491,21 @@ msgid " Enter line length, 0 for off: " msgstr "" +#: gtkedit/editmenu.c:69 +msgid " About " +msgstr "" + +#: gtkedit/editmenu.c:70 +msgid "" +"\n" +" Cooledit v2.1\n" +"\n" +" Copyright (C) 1996 the Free Software Foundation\n" +"\n" +" A user friendly text editor written\n" +" for the Midnight Commander.\n" +msgstr "" + #: gtkedit/editmenu.c:118 gtkedit/editmenu.c:134 msgid "&Open/load... C-o" msgstr "" @@ -1473,11 +1662,13 @@ msgid "&Save mode..." msgstr "" -#: gtkedit/editmenu.c:246 gtkedit/editmenu.c:255 src/main.c:1304 +#: gtkedit/editmenu.c:246 gtkedit/editmenu.c:255 src/main.c:1300 msgid "&Layout..." msgstr "" -#: gtkedit/editmenu.c:265 gtkedit/editmenu.c:274 gtkedit/editmenu.c:391 src/chmod.c:165 src/chown.c:132 +#. The following are menu options. Do not change the key bindings (eg. C-o) and preserve '\t' +#: gtkedit/editmenu.c:265 gtkedit/editmenu.c:274 gtkedit/editmenu.c:391 +#: src/chmod.c:164 src/chown.c:130 msgid " File " msgstr "" @@ -1664,7 +1855,9 @@ msgid "Error initialising editor.\n" msgstr "" -#: gtkedit/editwidget.c:1060 gtkedit/gtkedit.c:1365 src/help.c:809 src/main.c:1670 src/screen.c:2300 src/screen.c:2330 src/tree.c:1022 src/view.c:1963 +#: gtkedit/editwidget.c:1060 gtkedit/gtkedit.c:1368 src/help.c:806 +#: src/main.c:1666 src/screen.c:2284 src/screen.c:2314 src/tree.c:1018 +#: src/view.c:1959 msgid "Help" msgstr "" @@ -1676,139 +1869,145 @@ msgid "Replac" msgstr "" -#: gtkedit/editwidget.c:1066 src/view.c:1976 +#: gtkedit/editwidget.c:1066 src/view.c:1972 msgid "Search" msgstr "" -#: gtkedit/editwidget.c:1069 src/main.c:1672 +#: gtkedit/editwidget.c:1069 src/main.c:1668 msgid "PullDn" msgstr "" -#: gtkedit/editwidget.c:1070 src/help.c:821 src/main.c:1673 src/view.c:1965 src/view.c:1985 +#: gtkedit/editwidget.c:1070 src/help.c:818 src/main.c:1669 src/view.c:1961 +#: src/view.c:1981 msgid "Quit" msgstr "" -#: gtkedit/gtkedit.c:107 +#: gtkedit/gtkedit.c:65 +msgid "&Dismiss" +msgstr "" + +#: gtkedit/gtkedit.c:110 msgid "The Quick Brown Fox Jumps Over The Lazy Dog" msgstr "" -#: gtkedit/gtkedit.c:798 -msgid "gtkedit.c: HOME environment variable not set and no passwd entry - aborting\n" +#: gtkedit/gtkedit.c:801 +msgid "" +"gtkedit.c: HOME environment variable not set and no passwd entry - aborting\n" msgstr "" -#: gtkedit/gtkedit.c:1286 +#: gtkedit/gtkedit.c:1289 msgid "Open/Load" msgstr "" -#: gtkedit/gtkedit.c:1286 +#: gtkedit/gtkedit.c:1289 msgid "Load a different/new file" msgstr "" -#: gtkedit/gtkedit.c:1289 +#: gtkedit/gtkedit.c:1292 msgid "New" msgstr "" -#: gtkedit/gtkedit.c:1289 +#: gtkedit/gtkedit.c:1292 msgid "Clear the edit buffer" msgstr "" -#: gtkedit/gtkedit.c:1293 +#: gtkedit/gtkedit.c:1296 msgid "Save the current edit buffer to filename" msgstr "" -#: gtkedit/gtkedit.c:1296 +#: gtkedit/gtkedit.c:1299 msgid "Save As" msgstr "" -#: gtkedit/gtkedit.c:1296 +#: gtkedit/gtkedit.c:1299 msgid "Save the current edit buffer as filename" msgstr "" -#: gtkedit/gtkedit.c:1300 +#: gtkedit/gtkedit.c:1303 msgid "Insert File" msgstr "" -#: gtkedit/gtkedit.c:1300 +#: gtkedit/gtkedit.c:1303 msgid "Insert text from a file" msgstr "" -#: gtkedit/gtkedit.c:1303 +#: gtkedit/gtkedit.c:1306 msgid "Copy to file" msgstr "" -#: gtkedit/gtkedit.c:1303 +#: gtkedit/gtkedit.c:1306 msgid "copy a block to a file" msgstr "" -#: gtkedit/gtkedit.c:1307 +#: gtkedit/gtkedit.c:1310 msgid "Exit" msgstr "" -#: gtkedit/gtkedit.c:1307 +#: gtkedit/gtkedit.c:1310 msgid "Quit editor" msgstr "" -#: gtkedit/gtkedit.c:1315 +#: gtkedit/gtkedit.c:1318 msgid "Copy selection to clipboard" msgstr "" -#: gtkedit/gtkedit.c:1318 +#: gtkedit/gtkedit.c:1321 msgid "Cut" msgstr "" -#: gtkedit/gtkedit.c:1318 +#: gtkedit/gtkedit.c:1321 msgid "Cut selection to clipboard" msgstr "" -#: gtkedit/gtkedit.c:1321 +#: gtkedit/gtkedit.c:1324 msgid "Paste" msgstr "" -#: gtkedit/gtkedit.c:1321 +#: gtkedit/gtkedit.c:1324 msgid "Paste clipboard" msgstr "" -#: gtkedit/gtkedit.c:1325 +#: gtkedit/gtkedit.c:1328 msgid "Undo" msgstr "" -#: gtkedit/gtkedit.c:1325 +#: gtkedit/gtkedit.c:1328 msgid "Go back in time one key press" msgstr "" -#: gtkedit/gtkedit.c:1333 +#: gtkedit/gtkedit.c:1336 msgid "Find" msgstr "" -#: gtkedit/gtkedit.c:1333 +#: gtkedit/gtkedit.c:1336 msgid "Find string/regular expression" msgstr "" -#: gtkedit/gtkedit.c:1336 +#: gtkedit/gtkedit.c:1339 msgid "Find again" msgstr "" -#: gtkedit/gtkedit.c:1336 +#: gtkedit/gtkedit.c:1339 msgid "Repeat most recent search" msgstr "" -#: gtkedit/gtkedit.c:1339 gtkedit/gtkedit.c:1364 +#: gtkedit/gtkedit.c:1342 gtkedit/gtkedit.c:1367 msgid "Search/Replace" msgstr "" -#: gtkedit/gtkedit.c:1339 +#: gtkedit/gtkedit.c:1342 msgid "Find and replace text/regular expressions" msgstr "" -#: gtkedit/gtkedit.c:1348 +#: gtkedit/gtkedit.c:1351 msgid "About..." msgstr "" -#: gtkedit/gtkedit.c:1348 +#: gtkedit/gtkedit.c:1351 msgid "Info about Mcedit" msgstr "" -#: gtkedit/gtkedit.c:1362 src/filegui.c:409 +#: gtkedit/gtkedit.c:1365 src/filegui.c:404 msgid "File" msgstr "" @@ -1821,658 +2020,682 @@ msgstr "" #: gtkedit/syntax.c:3186 +#, c-format msgid " Syntax error in file %s on line %d " msgstr "" -#: src/achown.c:73 src/boxes.c:143 src/boxes.c:283 src/boxes.c:380 src/boxes.c:468 src/boxes.c:648 src/boxes.c:731 src/boxes.c:785 src/chmod.c:115 src/chown.c:81 src/cmd.c:861 src/filegui.c:795 src/find.c:156 src/hotlist.c:141 src/hotlist.c:813 src/hotlist.c:906 src/layout.c:373 src/learn.c:61 src/option.c:145 src/panelize.c:90 src/view.c:408 src/wtools.c:114 src/wtools.c:389 src/wtools.c:562 src/wtools.c:643 +#: src/achown.c:71 src/boxes.c:139 src/boxes.c:279 src/boxes.c:376 +#: src/boxes.c:464 src/boxes.c:644 src/boxes.c:727 src/boxes.c:781 +#: src/chmod.c:114 src/chown.c:79 src/cmd.c:856 src/filegui.c:790 +#: src/find.c:151 src/hotlist.c:138 src/hotlist.c:814 src/hotlist.c:911 +#: src/layout.c:370 src/learn.c:59 src/option.c:145 src/panelize.c:86 +#: src/view.c:404 src/wtools.c:111 src/wtools.c:386 src/wtools.c:559 +#: src/wtools.c:640 msgid "&Cancel" msgstr "" -#: src/achown.c:74 src/chmod.c:116 src/chown.c:82 +#: src/achown.c:72 src/chmod.c:115 src/chown.c:80 msgid "&Set" msgstr "" -#: src/achown.c:75 +#: src/achown.c:73 msgid "S&kip" msgstr "" -#: src/achown.c:76 src/chmod.c:120 src/chown.c:85 +#: src/achown.c:74 src/chmod.c:119 src/chown.c:83 msgid "Set &all" msgstr "" -#: src/achown.c:364 src/achown.c:371 +#: src/achown.c:362 src/achown.c:369 msgid "owner" msgstr "" -#: src/achown.c:366 src/achown.c:373 +#: src/achown.c:364 src/achown.c:371 msgid "group" msgstr "" -#: src/achown.c:368 +#: src/achown.c:366 msgid "other" msgstr "" -#: src/achown.c:376 +#: src/achown.c:374 msgid "On" msgstr "" -#: src/achown.c:378 +#: src/achown.c:376 msgid "Flag" msgstr "" -#: src/achown.c:380 +#: src/achown.c:378 msgid "Mode" msgstr "" -#: src/achown.c:385 +#: src/achown.c:383 +#, c-format msgid "%6d of %d" msgstr "" -#: src/achown.c:393 +#: src/achown.c:391 msgid " Chown advanced command " msgstr "" -#: src/achown.c:631 src/achown.c:647 src/achown.c:710 src/chmod.c:286 src/chmod.c:371 +#: src/achown.c:629 src/achown.c:645 src/achown.c:708 src/chmod.c:285 +#: src/chmod.c:370 +#, c-format msgid "" " Couldn't chmod \"%s\" \n" " %s " msgstr "" -#. call mc_chown only, if mc_chmod didn't fail -#: src/achown.c:636 src/achown.c:651 src/achown.c:714 src/chown.c:225 src/chown.c:347 +#: src/achown.c:634 src/achown.c:649 src/achown.c:712 src/chown.c:223 +#: src/chown.c:345 +#, c-format msgid "" " Couldn't chown \"%s\" \n" " %s " msgstr "" -#: src/achown.c:668 src/achown.c:672 src/chmod.c:321 src/chmod.c:325 src/chown.c:262 src/chown.c:266 src/panelize.c:304 src/user.c:628 +#: src/achown.c:666 src/achown.c:670 src/chmod.c:320 src/chmod.c:324 +#: src/chown.c:260 src/chown.c:264 src/panelize.c:300 src/user.c:624 msgid " Oops... " msgstr "" -#: src/achown.c:669 +#: src/achown.c:667 msgid " I can't run the Advanced Chown command on an extfs " msgstr "" -#: src/achown.c:673 +#: src/achown.c:671 msgid " I can't run the Advanced Chown command on a tarfs " msgstr "" -#: src/background.c:180 +#: src/background.c:178 msgid "Background process:" msgstr "" -#: src/background.c:286 src/file.c:2120 +#: src/background.c:284 src/file.c:2113 msgid " Background process error " msgstr "" -#: src/background.c:293 +#: src/background.c:291 msgid " Child died unexpectedly " msgstr "" -#: src/background.c:295 +#: src/background.c:293 msgid " Unknown error in child " msgstr "" -#: src/background.c:310 +#: src/background.c:308 msgid " Background protocol error " msgstr "" -#: src/background.c:311 +#: src/background.c:309 msgid "" " Background process sent us a request for more arguments \n" " than we can handle. \n" msgstr "" -#: src/boxes.c:67 +#: src/boxes.c:63 msgid " Listing mode " msgstr "" -#: src/boxes.c:72 +#: src/boxes.c:68 msgid "&Full file list" msgstr "" -#: src/boxes.c:73 +#: src/boxes.c:69 msgid "&Brief file list" msgstr "" -#: src/boxes.c:74 +#: src/boxes.c:70 msgid "&Long file list" msgstr "" -#: src/boxes.c:75 +#: src/boxes.c:71 msgid "&User defined:" msgstr "" -#: src/boxes.c:76 +#: src/boxes.c:72 msgid "&Icon view" msgstr "" -#: src/boxes.c:141 +#: src/boxes.c:137 msgid "user &Mini status" msgstr "" -#: src/boxes.c:190 +#: src/boxes.c:186 msgid "Listing mode" msgstr "" -#: src/boxes.c:284 +#: src/boxes.c:280 msgid "&Reverse" msgstr "" -#: src/boxes.c:285 +#: src/boxes.c:281 msgid "case sensi&tive" msgstr "" -#: src/boxes.c:286 +#: src/boxes.c:282 msgid "Sort order" msgstr "" -#: src/boxes.c:385 +#: src/boxes.c:381 msgid " confirm &Exit " msgstr "" -#: src/boxes.c:387 +#: src/boxes.c:383 msgid " confirm e&Xecute " msgstr "" -#: src/boxes.c:389 +#: src/boxes.c:385 msgid " confirm o&Verwrite " msgstr "" -#: src/boxes.c:391 +#: src/boxes.c:387 msgid " confirm &Delete " msgstr "" -#: src/boxes.c:397 +#: src/boxes.c:393 msgid " Confirmation " msgstr "" -#: src/boxes.c:465 +#: src/boxes.c:461 msgid "Full 8 bits output" msgstr "" -#: src/boxes.c:465 +#: src/boxes.c:461 msgid "ISO 8859-1" msgstr "" -#: src/boxes.c:465 +#: src/boxes.c:461 msgid "7 bits" msgstr "" -#: src/boxes.c:472 +#: src/boxes.c:468 msgid "F&ull 8 bits input" msgstr "" -#: src/boxes.c:480 +#: src/boxes.c:476 msgid " Display bits " msgstr "" -#: src/boxes.c:655 +#: src/boxes.c:651 msgid "&Always use ftp proxy" msgstr "" -#: src/boxes.c:657 +#: src/boxes.c:653 msgid "sec" msgstr "" -#: src/boxes.c:661 +#: src/boxes.c:657 msgid "ftpfs directory cache timeout:" msgstr "" -#: src/boxes.c:665 +#: src/boxes.c:661 msgid "ftp anonymous password:" msgstr "" -#: src/boxes.c:672 +#: src/boxes.c:668 msgid "Timeout for freeing VFSs:" msgstr "" -#: src/boxes.c:678 +#: src/boxes.c:674 msgid " Virtual File System Setting " msgstr "" -#: src/boxes.c:744 +#: src/boxes.c:740 msgid "Quick cd" msgstr "" #. want cd like completion -#: src/boxes.c:749 +#: src/boxes.c:745 msgid "cd" msgstr "" -#: src/boxes.c:805 +#: src/boxes.c:796 +msgid "Symbolic link" +msgstr "" + +#: src/boxes.c:801 msgid "Symbolic link filename:" msgstr "" -#: src/boxes.c:807 +#: src/boxes.c:803 msgid "Existing filename (filename symlink will point to):" msgstr "" -#: src/boxes.c:836 +#: src/boxes.c:832 msgid "Running " msgstr "" -#: src/boxes.c:837 src/find.c:676 +#: src/boxes.c:833 src/find.c:671 msgid "Stopped" msgstr "" -#: src/boxes.c:895 +#: src/boxes.c:891 msgid "&Stop" msgstr "" -#: src/boxes.c:896 +#: src/boxes.c:892 msgid "&Resume" msgstr "" -#: src/boxes.c:897 +#: src/boxes.c:893 msgid "&Kill" msgstr "" -#: src/boxes.c:936 +#: src/boxes.c:932 msgid "Background Jobs" msgstr "" -#: src/chmod.c:96 +#: src/chmod.c:95 msgid "execute/search by others" msgstr "" -#: src/chmod.c:97 +#: src/chmod.c:96 msgid "write by others" msgstr "" -#: src/chmod.c:98 +#: src/chmod.c:97 msgid "read by others" msgstr "" -#: src/chmod.c:99 +#: src/chmod.c:98 msgid "execute/search by group" msgstr "" -#: src/chmod.c:100 +#: src/chmod.c:99 msgid "write by group" msgstr "" -#: src/chmod.c:101 +#: src/chmod.c:100 msgid "read by group" msgstr "" -#: src/chmod.c:102 +#: src/chmod.c:101 msgid "execute/search by owner" msgstr "" -#: src/chmod.c:103 +#: src/chmod.c:102 msgid "write by owner" msgstr "" -#: src/chmod.c:104 +#: src/chmod.c:103 msgid "read by owner" msgstr "" -#: src/chmod.c:105 +#: src/chmod.c:104 msgid "sticky bit" msgstr "" -#: src/chmod.c:106 +#: src/chmod.c:105 msgid "set group ID on execution" msgstr "" -#: src/chmod.c:107 +#: src/chmod.c:106 msgid "set user ID on execution" msgstr "" -#: src/chmod.c:117 +#: src/chmod.c:116 msgid "C&lear marked" msgstr "" -#: src/chmod.c:118 +#: src/chmod.c:117 msgid "S&et marked" msgstr "" -#: src/chmod.c:119 +#: src/chmod.c:118 msgid "&Marked all" msgstr "" -#: src/chmod.c:153 +#: src/chmod.c:152 msgid "Permissions (Octal)" msgstr "" -#: src/chmod.c:155 +#: src/chmod.c:154 msgid "Owner name" msgstr "" -#: src/chmod.c:157 +#: src/chmod.c:156 msgid "Group name" msgstr "" -#: src/chmod.c:161 +#: src/chmod.c:160 msgid " Chmod command " msgstr "" -#: src/chmod.c:163 src/chown.c:122 +#: src/chmod.c:162 src/chown.c:120 msgid " Permission " msgstr "" -#: src/chmod.c:170 +#: src/chmod.c:169 msgid "Use SPACE to change" msgstr "" -#: src/chmod.c:172 +#: src/chmod.c:171 msgid "an option, ARROW KEYS" msgstr "" -#: src/chmod.c:174 +#: src/chmod.c:173 msgid "to move between options" msgstr "" -#: src/chmod.c:176 +#: src/chmod.c:175 msgid "and T or INS to mark" msgstr "" -#: src/chmod.c:234 +#: src/chmod.c:233 msgid "Chmod command" msgstr "" -#: src/chmod.c:322 +#: src/chmod.c:321 msgid " I can't run the Chmod command on an extfs " msgstr "" -#: src/chown.c:83 +#: src/chown.c:81 msgid "Set &users" msgstr "" -#: src/chown.c:84 +#: src/chown.c:82 msgid "Set &groups" msgstr "" -#: src/chown.c:114 +#: src/chown.c:112 msgid " Name " msgstr "" -#: src/chown.c:116 +#: src/chown.c:114 msgid " Owner name " msgstr "" -#: src/chown.c:118 src/chown.c:130 +#: src/chown.c:116 src/chown.c:128 msgid " Group name " msgstr "" -#: src/chown.c:120 +#: src/chown.c:118 msgid " Size " msgstr "" -#: src/chown.c:126 +#: src/chown.c:124 msgid " Chown command " msgstr "" -#: src/chown.c:128 +#: src/chown.c:126 msgid " User name " msgstr "" -#: src/chown.c:194 +#: src/chown.c:192 msgid "" msgstr "" #. add fields for unknown names (numbers) -#: src/chown.c:195 +#: src/chown.c:193 msgid "" msgstr "" -#: src/chown.c:263 +#: src/chown.c:261 msgid " I can't run the Chown command on an extfs " msgstr "" -#: src/chown.c:267 +#: src/chown.c:265 msgid " I can't run the Chown command on a tarfs " msgstr "" -#: src/cmd.c:205 +#: src/cmd.c:200 +#, c-format msgid " Can not fetch a local copy of %s " msgstr "" -#: src/cmd.c:255 +#: src/cmd.c:250 msgid " CD " msgstr "" -#: src/cmd.c:255 +#: src/cmd.c:250 msgid "Files tagged, want to cd?" msgstr "" -#: src/cmd.c:261 src/cmd.c:720 src/cmd.c:734 +#: src/cmd.c:256 src/cmd.c:715 src/cmd.c:729 msgid "Could not change directory" msgstr "" -#: src/cmd.c:290 +#: src/cmd.c:285 msgid " View file " msgstr "" -#: src/cmd.c:290 +#: src/cmd.c:285 msgid " Filename:" msgstr "" -#: src/cmd.c:307 +#: src/cmd.c:302 msgid " Filtered view " msgstr "" -#: src/cmd.c:307 +#: src/cmd.c:302 msgid " Filter command and arguments:" msgstr "" -#: src/cmd.c:395 +#: src/cmd.c:390 msgid "Create a new Directory" msgstr "" -#: src/cmd.c:395 +#: src/cmd.c:390 msgid " Enter directory name:" msgstr "" -#: src/cmd.c:456 +#: src/cmd.c:451 msgid " Filter " msgstr "" -#: src/cmd.c:456 +#: src/cmd.c:451 msgid " Set expression for filtering filenames" msgstr "" -#: src/cmd.c:522 +#: src/cmd.c:517 msgid " Select " msgstr "" -#: src/cmd.c:550 src/cmd.c:601 +#: src/cmd.c:545 src/cmd.c:596 msgid " Malformed regular expression " msgstr "" -#: src/cmd.c:574 +#: src/cmd.c:569 msgid " Unselect " msgstr "" -#: src/cmd.c:647 +#: src/cmd.c:642 msgid "Extension file edit" msgstr "" -#: src/cmd.c:648 +#: src/cmd.c:643 msgid " Which extension file you want to edit? " msgstr "" -#: src/cmd.c:649 +#: src/cmd.c:644 msgid "&User" msgstr "" -#: src/cmd.c:649 src/cmd.c:675 +#: src/cmd.c:644 src/cmd.c:670 msgid "&System Wide" msgstr "" -#: src/cmd.c:672 +#: src/cmd.c:667 msgid "Menu file edit" msgstr "" -#: src/cmd.c:673 +#: src/cmd.c:668 msgid " Which menu file will you edit? " msgstr "" -#: src/cmd.c:675 +#: src/cmd.c:670 msgid "&Local" msgstr "" -#: src/cmd.c:675 +#: src/cmd.c:670 msgid "&Home" msgstr "" -#: src/cmd.c:860 +#: src/cmd.c:855 msgid " Compare directories " msgstr "" -#: src/cmd.c:860 +#: src/cmd.c:855 msgid " Select compare method: " msgstr "" -#: src/cmd.c:861 +#: src/cmd.c:856 msgid "&Quick" msgstr "" -#: src/cmd.c:861 +#: src/cmd.c:856 msgid "&Size only" msgstr "" -#: src/cmd.c:861 +#: src/cmd.c:856 msgid "&Thorough" msgstr "" -#: src/cmd.c:871 +#: src/cmd.c:866 msgid " Both panels should be on the listing view mode to use this command " msgstr "" -#: src/cmd.c:885 +#: src/cmd.c:880 msgid " The command history is empty " msgstr "" -#: src/cmd.c:891 +#: src/cmd.c:886 msgid " Command history " msgstr "" -#: src/cmd.c:933 +#: src/cmd.c:928 msgid "" " Not an xterm or Linux console; \n" " the panels cannot be toggled. " msgstr "" -#: src/cmd.c:972 +#: src/cmd.c:967 msgid "" "Type `exit' to return to the Midnight Commander\n" "\r\n" "\r" msgstr "" -#: src/cmd.c:1025 +#: src/cmd.c:1020 +#, c-format msgid "" " Couldn't stat %s \n" " %s " msgstr "" -#: src/cmd.c:1034 src/cmd.c:1036 +#: src/cmd.c:1029 src/cmd.c:1031 msgid " Link " msgstr "" -#: src/cmd.c:1035 src/cmd.c:1140 src/file.c:1628 +#: src/cmd.c:1030 src/cmd.c:1135 src/file.c:1621 msgid " to:" msgstr "" -#: src/cmd.c:1046 +#: src/cmd.c:1041 +#, c-format msgid " link: %s " msgstr "" -#: src/cmd.c:1079 +#: src/cmd.c:1074 +#, c-format msgid " symlink: %s " msgstr "" -#: src/cmd.c:1105 +#: src/cmd.c:1100 msgid " Symlink " msgstr "" -#: src/cmd.c:1105 +#: src/cmd.c:1100 msgid " points to:" msgstr "" -#: src/cmd.c:1110 +#: src/cmd.c:1105 msgid " Edit symlink " msgstr "" -#: src/cmd.c:1116 +#: src/cmd.c:1111 +#, c-format msgid " edit symlink: %s " msgstr "" -#: src/cmd.c:1140 +#: src/cmd.c:1135 msgid " Link symbolically " msgstr "" -#: src/cmd.c:1141 +#: src/cmd.c:1136 msgid " Relative symlink " msgstr "" -#: src/cmd.c:1152 +#: src/cmd.c:1147 +#, c-format msgid " relative symlink: %s " msgstr "" -#: src/cmd.c:1255 +#: src/cmd.c:1250 msgid " Enter machine name (F1 for details): " msgstr "" -#: src/cmd.c:1279 +#: src/cmd.c:1274 +#, c-format msgid " Could not chdir to %s " msgstr "" -#: src/cmd.c:1286 +#: src/cmd.c:1281 msgid " Link to a remote machine " msgstr "" -#: src/cmd.c:1292 +#: src/cmd.c:1287 msgid " FTP to machine " msgstr "" -#: src/cmd.c:1302 +#: src/cmd.c:1297 msgid " Socket source routing setup " msgstr "" -#: src/cmd.c:1303 +#: src/cmd.c:1298 msgid " Enter host name to use as a source routing hop: " msgstr "" -#: src/cmd.c:1310 +#: src/cmd.c:1305 msgid " Host name " msgstr "" -#: src/cmd.c:1310 +#: src/cmd.c:1305 msgid " Error while looking up IP address " msgstr "" -#: src/cmd.c:1321 +#: src/cmd.c:1316 msgid " Undelete files on an ext2 file system " msgstr "" -#: src/cmd.c:1322 +#: src/cmd.c:1317 msgid "" " Enter device (without /dev/) to undelete\n" " files on: (F1 for details)" msgstr "" -#: src/cmd.c:1372 +#: src/cmd.c:1367 msgid " Setup saved to ~/" msgstr "" -#: src/cmd.c:1377 +#: src/cmd.c:1372 msgid " Setup " msgstr "" -#: src/command.c:173 +#: src/command.c:170 +#, c-format msgid "" " Can't chdir to '%s' \n" " %s " msgstr "" -#: src/command.c:201 +#: src/command.c:198 msgid " You can not execute commands on non-local filesystems" msgstr "" -#: src/dialog.c:59 +#: src/dialog.c:56 msgid "" "\n" "\n" @@ -2482,346 +2705,377 @@ "\n" msgstr "" -#: src/dir.c:56 +#: src/dir.c:53 msgid "&Unsorted" msgstr "" -#: src/dir.c:57 +#: src/dir.c:54 msgid "&Name" msgstr "" -#: src/dir.c:58 +#: src/dir.c:55 msgid "&Extension" msgstr "" -#: src/dir.c:59 +#: src/dir.c:56 msgid "&Modify time" msgstr "" -#: src/dir.c:60 +#: src/dir.c:57 msgid "&Access time" msgstr "" -#: src/dir.c:61 +#: src/dir.c:58 msgid "&Change time" msgstr "" -#: src/dir.c:62 +#: src/dir.c:59 msgid "&Size" msgstr "" -#: src/dir.c:63 +#: src/dir.c:60 msgid "&Inode" msgstr "" #. New sort orders -#: src/dir.c:66 +#: src/dir.c:63 msgid "&Type" msgstr "" -#: src/dir.c:67 +#: src/dir.c:64 msgid "&Links" msgstr "" -#: src/dir.c:68 +#: src/dir.c:65 msgid "N&GID" msgstr "" -#: src/dir.c:69 +#: src/dir.c:66 msgid "N&UID" msgstr "" -#: src/dir.c:70 +#: src/dir.c:67 msgid "&Owner" msgstr "" -#: src/dir.c:71 +#: src/dir.c:68 msgid "&Group" msgstr "" -#: src/dir.c:378 +#: src/dir.c:375 +#, c-format msgid "File exists but can not be stat-ed: %s %s" msgstr "" -#: src/dir.c:636 +#: src/dir.c:633 msgid "Unknown" msgstr "" -#: src/ext.c:141 src/user.c:511 +#: src/ext.c:137 src/user.c:507 +#, c-format msgid "" " Can't create temporary command file \n" " %s " msgstr "" -#: src/ext.c:154 src/user.c:538 +#: src/ext.c:151 src/user.c:534 msgid " Parameter " msgstr "" -#: src/ext.c:297 +#: src/ext.c:294 msgid " Can't execute commands on a Virtual File System directory " msgstr "" -#: src/ext.c:394 +#: src/ext.c:391 msgid " file error" msgstr "" -#: src/ext.c:395 +#: src/ext.c:392 msgid "Format of the " msgstr "" -#: src/ext.c:413 +#: src/ext.c:410 msgid " file error " msgstr "" -#: src/ext.c:414 +#: src/ext.c:411 msgid "Format of the ~/" msgstr "" -#: src/ext.c:414 +#: src/ext.c:411 msgid "" " file has changed\n" "with version 3.0. You may want either to\n" "copy it from " msgstr "" -#: src/ext.c:416 +#: src/ext.c:413 msgid "" "mc.ext or use that\n" "file as an example of how to write it.\n" msgstr "" -#: src/ext.c:418 +#: src/ext.c:415 msgid "mc.ext will be used for this moment." msgstr "" -#: src/file.c:161 src/tree.c:651 +#: src/file.c:154 src/tree.c:649 msgid " Copy " msgstr "" -#: src/file.c:162 src/tree.c:689 +#: src/file.c:155 src/tree.c:687 msgid " Move " msgstr "" -#: src/file.c:163 src/tree.c:759 +#: src/file.c:156 src/tree.c:755 msgid " Delete " msgstr "" -#: src/file.c:251 +#: src/file.c:244 msgid " Invalid target mask " msgstr "" -#: src/file.c:349 +#: src/file.c:342 msgid " Could not make the hardlink " msgstr "" -#: src/file.c:391 +#: src/file.c:384 +#, c-format msgid "" " Cannot read source link \"%s\" \n" " %s " msgstr "" -#: src/file.c:401 +#: src/file.c:394 msgid "" " Cannot make stable symlinks across non-local filesystems: \n" "\n" " Option Stable Symlinks will be disabled " msgstr "" -#: src/file.c:449 +#: src/file.c:442 +#, c-format msgid "" " Cannot create target symlink \"%s\" \n" " %s " msgstr "" -#: src/file.c:517 +#: src/file.c:510 +#, c-format msgid "" " Cannot overwrite directory \"%s\" \n" " %s " msgstr "" -#: src/file.c:526 +#: src/file.c:519 +#, c-format msgid "" " Cannot stat source file \"%s\" \n" " %s " msgstr "" -#: src/file.c:539 +#: src/file.c:532 +#, c-format msgid " `%s' and `%s' are the same file. " msgstr "" -#: src/file.c:572 +#: src/file.c:565 +#, c-format msgid "" " Cannot create special file \"%s\" \n" " %s " msgstr "" -#: src/file.c:581 src/file.c:801 +#: src/file.c:574 src/file.c:794 +#, c-format msgid "" " Cannot chown target file \"%s\" \n" " %s " msgstr "" -#: src/file.c:590 src/file.c:816 +#: src/file.c:583 src/file.c:809 +#, c-format msgid "" " Cannot chmod target file \"%s\" \n" " %s " msgstr "" -#: src/file.c:603 +#: src/file.c:596 +#, c-format msgid "" " Cannot open source file \"%s\" \n" " %s " msgstr "" -#: src/file.c:613 +#: src/file.c:606 msgid " Reget failed, about to overwrite file " msgstr "" -#: src/file.c:619 +#: src/file.c:612 +#, c-format msgid "" " Cannot fstat source file \"%s\" \n" " %s " msgstr "" -#: src/file.c:640 +#: src/file.c:633 +#, c-format msgid "" " Cannot create target file \"%s\" \n" " %s " msgstr "" -#. Find out the optimal buffer size. -#: src/file.c:654 +#: src/file.c:647 +#, c-format msgid "" " Cannot fstat target file \"%s\" \n" " %s " msgstr "" -#: src/file.c:685 +#: src/file.c:678 +#, c-format msgid "" " Cannot read source file \"%s\" \n" " %s " msgstr "" -#: src/file.c:715 +#: src/file.c:708 +#, c-format msgid "" " Cannot write target file \"%s\" \n" " %s " msgstr "" -#: src/file.c:734 +#: src/file.c:727 msgid "(stalled)" msgstr "" -#: src/file.c:772 +#: src/file.c:765 +#, c-format msgid "" " Cannot close source file \"%s\" \n" " %s " msgstr "" -#: src/file.c:781 +#: src/file.c:774 +#, c-format msgid "" " Cannot close target file \"%s\" \n" " %s " msgstr "" -#: src/file.c:791 +#: src/file.c:784 msgid "Incomplete file was retrieved. Keep it?" msgstr "" -#: src/file.c:792 +#: src/file.c:785 msgid "&Delete" msgstr "" -#: src/file.c:792 src/hotlist.c:1438 +#: src/file.c:785 src/hotlist.c:1443 msgid "&Keep" msgstr "" -#: src/file.c:861 +#: src/file.c:854 +#, c-format msgid "" " Cannot stat source directory \"%s\" \n" " %s " msgstr "" -#: src/file.c:884 +#: src/file.c:877 +#, c-format msgid "" " Source directory \"%s\" is not a directory \n" " %s " msgstr "" #. we found a cyclic symbolic link -#: src/file.c:892 +#: src/file.c:885 +#, c-format msgid "" " Cannot copy cyclic symbolic link \n" " `%s' " msgstr "" -#: src/file.c:945 +#: src/file.c:938 +#, c-format msgid "" " Cannot create target directory \"%s\" \n" " %s " msgstr "" -#: src/file.c:963 +#: src/file.c:956 +#, c-format msgid "" " Cannot chown target directory \"%s\" \n" " %s " msgstr "" #. Source doesn't exist -#: src/file.c:1073 +#: src/file.c:1066 +#, c-format msgid "" " Cannot stat file \"%s\" \n" " %s " msgstr "" -#: src/file.c:1095 +#: src/file.c:1088 +#, c-format msgid " `%s' and `%s' are the same file " msgstr "" -#. OS2_NT -#: src/file.c:1102 +#: src/file.c:1095 +#, c-format msgid " Cannot overwrite directory `%s' " msgstr "" -#: src/file.c:1135 +#: src/file.c:1128 +#, c-format msgid "" " Cannot move file \"%s\" to \"%s\" \n" " %s " msgstr "" -#: src/file.c:1155 +#: src/file.c:1148 +#, c-format msgid "" " Cannot remove file \"%s\" \n" " %s " msgstr "" -#: src/file.c:1205 +#: src/file.c:1198 +#, c-format msgid " Cannot overwrite directory \"%s\" %s " msgstr "" -#: src/file.c:1207 +#: src/file.c:1200 +#, c-format msgid " Cannot overwrite file \"%s\" %s " msgstr "" -#: src/file.c:1230 +#: src/file.c:1223 +#, c-format msgid "" " Cannot move directory \"%s\" to \"%s\" \n" " %s " msgstr "" -#: src/file.c:1293 +#: src/file.c:1286 +#, c-format msgid "" " Cannot delete file \"%s\" \n" " %s " msgstr "" -#: src/file.c:1351 src/file.c:1418 src/file.c:1447 +#: src/file.c:1344 src/file.c:1411 src/file.c:1440 +#, c-format msgid "" " Cannot remove directory \"%s\" \n" " %s " msgstr "" -#: src/file.c:1483 +#: src/file.c:1476 msgid " Internal error: get_file \n" msgstr "" @@ -2834,728 +3088,755 @@ #. * (I don't use spaces around the words, because someday they could be #. * dropped, when widgets get smarter) #. -#: src/file.c:1604 +#: src/file.c:1597 msgid "1Copy" msgstr "" -#: src/file.c:1604 +#: src/file.c:1597 msgid "1Move" msgstr "" -#: src/file.c:1604 +#: src/file.c:1597 msgid "1Delete" msgstr "" -#: src/file.c:1619 +#: src/file.c:1612 +#, c-format msgid "%o %f \"%s\"%m" msgstr "" -#: src/file.c:1620 +#: src/file.c:1613 +#, c-format msgid "%o %d %f%m" msgstr "" -#: src/file.c:1622 +#: src/file.c:1615 +#, c-format msgid "%o %f \"%s\"%e" msgstr "" -#: src/file.c:1623 +#: src/file.c:1616 +#, c-format msgid "%o %d %f%e" msgstr "" -#: src/file.c:1627 +#: src/file.c:1620 msgid "file" msgstr "" -#: src/file.c:1627 +#: src/file.c:1620 msgid "files" msgstr "" -#: src/file.c:1627 +#: src/file.c:1620 msgid "directory" msgstr "" -#: src/file.c:1627 +#: src/file.c:1620 msgid "directories" msgstr "" -#: src/file.c:1628 +#: src/file.c:1621 msgid "files/directories" msgstr "" -#: src/file.c:1628 +#: src/file.c:1621 msgid " with source mask:" msgstr "" -#: src/file.c:1776 +#: src/file.c:1769 msgid " Can't operate on \"..\"! " msgstr "" -#: src/file.c:1795 +#: src/file.c:1788 msgid "Yes" msgstr "" -#: src/file.c:1795 +#: src/file.c:1788 msgid "No" msgstr "" -#: src/file.c:1848 +#: src/file.c:1841 msgid " Sorry, I could not put the job in background " msgstr "" -#: src/file.c:1931 src/file.c:2036 +#: src/file.c:1924 src/file.c:2029 msgid " Internal failure " msgstr "" -#: src/file.c:1931 src/file.c:2036 +#: src/file.c:1924 src/file.c:2029 msgid " Unknown file operation " msgstr "" -#: src/file.c:1950 +#: src/file.c:1943 +#, c-format msgid "" " Destination \"%s\" must be a directory \n" " %s " msgstr "" -#: src/file.c:2121 src/filegui.c:268 +#: src/file.c:2114 src/filegui.c:263 msgid "&Skip" msgstr "" -#: src/file.c:2121 +#: src/file.c:2114 msgid "&Retry" msgstr "" -#: src/file.c:2121 src/file.c:2179 src/filegui.c:265 src/filegui.c:567 +#: src/file.c:2114 src/file.c:2173 src/filegui.c:260 src/filegui.c:562 msgid "&Abort" msgstr "" -#: src/file.c:2170 +#: src/file.c:2164 msgid "" "\n" " Directory not empty. \n" " Delete it recursively? " msgstr "" -#: src/file.c:2171 +#: src/file.c:2165 msgid "" "\n" " Background process: Directory not empty \n" " Delete it recursively? " msgstr "" -#: src/file.c:2172 +#: src/file.c:2166 msgid " Delete: " msgstr "" -#: src/file.c:2178 +#: src/file.c:2172 msgid "a&ll" msgstr "" -#: src/file.c:2178 src/filegui.c:570 +#: src/file.c:2172 src/filegui.c:565 msgid "non&E" msgstr "" -#: src/file.c:2188 +#: src/file.c:2182 msgid " Type 'yes' if you REALLY want to delete " msgstr "" -#: src/file.c:2190 +#: src/file.c:2184 msgid "all the directories " msgstr "" -#: src/file.c:2192 +#: src/file.c:2186 msgid " Recursive Delete " msgstr "" -#: src/file.c:2193 +#: src/file.c:2187 msgid " Background process: Recursive Delete " msgstr "" -#: src/filegui.c:430 +#: src/filegui.c:425 msgid "Count" msgstr "" -#: src/filegui.c:449 +#: src/filegui.c:444 msgid "Bytes" msgstr "" -#. WITH_FULL_PATHS -#: src/filegui.c:484 +#: src/filegui.c:479 msgid "Source" msgstr "" -#: src/filegui.c:505 +#: src/filegui.c:500 msgid "Target" msgstr "" -#: src/filegui.c:525 +#: src/filegui.c:520 msgid "Deleting" msgstr "" -#: src/filegui.c:565 +#: src/filegui.c:560 +#, c-format msgid "Target file \"%s\" already exists!" msgstr "" -#: src/filegui.c:568 +#: src/filegui.c:563 msgid "if &Size differs" msgstr "" -#: src/filegui.c:571 +#: src/filegui.c:566 msgid "&Update" msgstr "" -#: src/filegui.c:572 +#: src/filegui.c:567 msgid "al&L" msgstr "" -#: src/filegui.c:573 +#: src/filegui.c:568 msgid "Overwrite all targets?" msgstr "" -#: src/filegui.c:575 +#: src/filegui.c:570 msgid "&Reget" msgstr "" -#: src/filegui.c:576 +#: src/filegui.c:571 msgid "ap&Pend" msgstr "" -#: src/filegui.c:579 +#: src/filegui.c:574 msgid "Overwrite this target?" msgstr "" -#: src/filegui.c:581 +#: src/filegui.c:576 +#, c-format msgid "Target date: %s, size %d" msgstr "" -#: src/filegui.c:583 +#: src/filegui.c:578 +#, c-format msgid "Source date: %s, size %d" msgstr "" -#: src/filegui.c:667 +#: src/filegui.c:662 msgid " File exists " msgstr "" -#: src/filegui.c:668 +#: src/filegui.c:663 msgid " Background process: File exists " msgstr "" #. follow symlinks and preserve Attributes must be the first -#: src/filegui.c:778 +#: src/filegui.c:773 msgid "preserve &Attributes" msgstr "" -#: src/filegui.c:780 +#. &op_preserve +#: src/filegui.c:775 msgid "follow &Links" msgstr "" #. &file_mask_op_follow_links -#: src/filegui.c:782 +#: src/filegui.c:777 msgid "to:" msgstr "" -#: src/filegui.c:783 +#: src/filegui.c:778 msgid "&Using shell patterns" msgstr "" -#: src/filegui.c:804 +#: src/filegui.c:799 msgid "&Background" msgstr "" -#: src/filegui.c:813 +#: src/filegui.c:808 msgid "&Stable Symlinks" msgstr "" #. &file_mask_stable_symlinks -#: src/filegui.c:815 +#: src/filegui.c:810 msgid "&Dive into subdir if exists" msgstr "" -#: src/filegui.c:974 +#: src/filegui.c:969 +#, c-format msgid "" "Invalid source pattern `%s' \n" " %s " msgstr "" -#: src/find.c:120 +#: src/find.c:115 msgid "&Suspend" msgstr "" -#: src/find.c:121 +#: src/find.c:116 msgid "Con&tinue" msgstr "" -#: src/find.c:122 +#: src/find.c:117 msgid "&Chdir" msgstr "" -#: src/find.c:123 +#: src/find.c:118 msgid "&Again" msgstr "" -#: src/find.c:124 +#: src/find.c:119 msgid "&Quit" msgstr "" -#: src/find.c:125 src/panelize.c:93 +#: src/find.c:120 src/panelize.c:89 msgid "Pane&lize" msgstr "" -#: src/find.c:126 +#: src/find.c:121 msgid "&View - F3" msgstr "" -#: src/find.c:127 +#: src/find.c:122 msgid "&Edit - F4" msgstr "" -#: src/find.c:155 +#: src/find.c:150 msgid "Start at:" msgstr "" -#: src/find.c:155 +#: src/find.c:150 msgid "Filename:" msgstr "" -#: src/find.c:155 +#: src/find.c:150 msgid "Content: " msgstr "" -#: src/find.c:156 src/main.c:1201 src/main.c:1222 +#: src/find.c:151 src/main.c:1197 src/main.c:1218 msgid "&Tree" msgstr "" -#: src/find.c:208 +#: src/find.c:203 msgid "Find File" msgstr "" -#: src/find.c:435 +#: src/find.c:430 +#, c-format msgid "Grepping in %s" msgstr "" -#: src/find.c:473 +#: src/find.c:468 msgid " Find/read " msgstr "" -#: src/find.c:473 +#: src/find.c:468 msgid " Problem reading from child " msgstr "" -#: src/find.c:520 +#: src/find.c:515 msgid "Finished" msgstr "" -#: src/find.c:544 src/view.c:1450 +#: src/find.c:539 src/view.c:1446 +#, c-format msgid "Searching %s" msgstr "" -#: src/find.c:676 src/find.c:793 +#: src/find.c:671 src/find.c:788 msgid "Searching" msgstr "" -#: src/find.c:768 +#: src/find.c:763 msgid "Find file" msgstr "" -#. Validity check for arguments -#: src/fixhlp.c:173 +#: src/fixhlp.c:171 msgid "Usage: fixhlp \n" msgstr "" -#: src/fixhlp.c:178 +#: src/fixhlp.c:176 msgid "fixhlp: Cannot open toc for writing" msgstr "" -#: src/fixhlp.c:181 +#: src/fixhlp.c:179 msgid "" -"\004[Contents]\n" +"[Contents]\n" " Topics:\n" "\n" msgstr "" -#: src/help.c:282 +#: src/help.c:279 msgid "" " Help file format error\n" -"\004" +"" msgstr "" -#: src/help.c:321 +#: src/help.c:318 msgid " Internal bug: Double start of link area " msgstr "" -#: src/help.c:575 +#: src/help.c:572 msgid " Can't find node [Contents] in help file " msgstr "" -#: src/help.c:744 +#: src/help.c:741 msgid " Help " msgstr "" -#: src/help.c:769 src/user.c:644 +#: src/help.c:766 src/user.c:640 +#, c-format msgid "" " Can't open file %s \n" " %s " msgstr "" -#: src/help.c:774 +#: src/help.c:771 +#, c-format msgid " Can't find node %s in help file " msgstr "" -#: src/help.c:811 +#: src/help.c:808 msgid "Index" msgstr "" -#: src/help.c:813 +#: src/help.c:810 msgid "Prev" msgstr "" -#: src/hotlist.c:135 +#: src/hotlist.c:132 msgid "&Move" msgstr "" -#: src/hotlist.c:136 src/hotlist.c:1438 src/panelize.c:92 src/wtools.c:386 +#: src/hotlist.c:133 src/hotlist.c:1443 src/panelize.c:88 src/wtools.c:383 msgid "&Remove" msgstr "" -#: src/hotlist.c:137 src/hotlist.c:817 src/hotlist.c:910 +#: src/hotlist.c:134 src/hotlist.c:818 src/hotlist.c:915 msgid "&Append" msgstr "" -#: src/hotlist.c:138 src/hotlist.c:815 src/hotlist.c:908 +#: src/hotlist.c:135 src/hotlist.c:816 src/hotlist.c:913 msgid "&Insert" msgstr "" -#: src/hotlist.c:139 +#: src/hotlist.c:136 msgid "New &Entry" msgstr "" -#: src/hotlist.c:140 +#: src/hotlist.c:137 msgid "New &Group" msgstr "" -#: src/hotlist.c:142 +#: src/hotlist.c:139 msgid "&Up" msgstr "" -#: src/hotlist.c:143 +#: src/hotlist.c:140 msgid "&Add current" msgstr "" -#: src/hotlist.c:144 +#: src/hotlist.c:141 msgid "Change &To" msgstr "" -#: src/hotlist.c:204 +#: src/hotlist.c:201 msgid "Subgroup - press ENTER to see list" msgstr "" -#: src/hotlist.c:623 +#: src/hotlist.c:620 msgid "Active VFS directories" msgstr "" -#: src/hotlist.c:623 +#: src/hotlist.c:620 msgid "Directory hotlist" msgstr "" -#: src/hotlist.c:642 +#: src/hotlist.c:639 msgid " Directory path " msgstr "" #. This one holds the displayed pathname -#: src/hotlist.c:645 src/hotlist.c:692 +#: src/hotlist.c:642 src/hotlist.c:689 msgid " Directory label " msgstr "" -#: src/hotlist.c:666 +#: src/hotlist.c:663 msgid "Moving " msgstr "" -#: src/hotlist.c:887 +#: src/hotlist.c:892 msgid "New hotlist entry" msgstr "" -#: src/hotlist.c:887 +#: src/hotlist.c:892 msgid "Directory label" msgstr "" -#: src/hotlist.c:887 +#: src/hotlist.c:892 msgid "Directory path" msgstr "" -#: src/hotlist.c:967 +#: src/hotlist.c:973 msgid " New hotlist group " msgstr "" -#: src/hotlist.c:967 +#: src/hotlist.c:973 msgid "Name of new group" msgstr "" -#: src/hotlist.c:982 +#: src/hotlist.c:988 +#, c-format msgid "Label for \"%s\":" msgstr "" -#: src/hotlist.c:987 +#: src/hotlist.c:992 msgid " Add to hotlist " msgstr "" -#: src/hotlist.c:1024 +#: src/hotlist.c:1029 msgid " Remove: " msgstr "" -#: src/hotlist.c:1028 +#: src/hotlist.c:1033 msgid "" "\n" " Group not empty.\n" " Remove it?" msgstr "" -#: src/hotlist.c:1373 +#: src/hotlist.c:1378 msgid " Top level group " msgstr "" -#: src/hotlist.c:1389 +#: src/hotlist.c:1394 msgid "Hotlist is now kept in file ~/" msgstr "" -#: src/hotlist.c:1391 +#: src/hotlist.c:1396 msgid "MC will load hotlist from ~/" msgstr "" -#: src/hotlist.c:1393 +#: src/hotlist.c:1398 msgid "and then delete [Hotlist] section there" msgstr "" -#: src/hotlist.c:1395 src/hotlist.c:1414 src/hotlist.c:1437 src/hotlist.c:1462 +#: src/hotlist.c:1400 src/hotlist.c:1419 src/hotlist.c:1442 src/hotlist.c:1467 msgid " Hotlist Load " msgstr "" -#: src/hotlist.c:1411 src/hotlist.c:1459 +#: src/hotlist.c:1416 src/hotlist.c:1464 msgid "MC was unable to write ~/" msgstr "" -#: src/hotlist.c:1412 +#: src/hotlist.c:1417 msgid " file, your old hotlist entries were not deleted" msgstr "" -#: src/hotlist.c:1426 +#: src/hotlist.c:1431 msgid "You have ~/" msgstr "" -#: src/hotlist.c:1426 +#: src/hotlist.c:1431 msgid " file and [Hotlist] section in ~/" msgstr "" -#: src/hotlist.c:1427 +#: src/hotlist.c:1432 msgid "Your ~/" msgstr "" -#: src/hotlist.c:1427 +#: src/hotlist.c:1432 msgid " most probably was created\n" msgstr "" -#: src/hotlist.c:1428 +#: src/hotlist.c:1433 msgid "" "by an earlier development version of MC\n" "and is more actual than ~/" msgstr "" -#: src/hotlist.c:1429 +#: src/hotlist.c:1434 msgid "" " entries\n" "\n" msgstr "" -#: src/hotlist.c:1430 +#: src/hotlist.c:1435 msgid "" "You can choose between\n" "\n" " Remove - remove old hotlist entries from ~/" msgstr "" -#: src/hotlist.c:1432 +#: src/hotlist.c:1437 msgid "" " Keep - keep your old entries; you will be asked\n" " the same question next time\n" " Merge - add old entries to hotlist as group \"Entries from ~/" msgstr "" -#: src/hotlist.c:1438 +#: src/hotlist.c:1443 msgid "&Merge" msgstr "" -#: src/hotlist.c:1450 +#: src/hotlist.c:1455 msgid " Entries from ~/" msgstr "" -#: src/hotlist.c:1460 +#: src/hotlist.c:1465 msgid " file your old hotlist entries were not deleted" msgstr "" -#: src/info.c:82 +#: src/info.c:80 +#, c-format msgid "Midnight Commander %s" msgstr "" -#: src/info.c:114 +#: src/info.c:112 msgid "Free nodes %d (%d%%) of %d" msgstr "" -#: src/info.c:120 +#: src/info.c:118 msgid "No node information" msgstr "" -#: src/info.c:125 +#: src/info.c:123 msgid "Free space " msgstr "" -#: src/info.c:127 +#: src/info.c:125 msgid " (%d%%) of " msgstr "" -#: src/info.c:131 +#: src/info.c:129 msgid "No space information" msgstr "" -#: src/info.c:135 +#: src/info.c:133 +#, c-format msgid "Type: %s " msgstr "" -#: src/info.c:135 +#: src/info.c:133 msgid "non-local vfs" msgstr "" -#: src/info.c:141 +#: src/info.c:139 +#, c-format msgid "Device: %s" msgstr "" -#: src/info.c:145 +#: src/info.c:143 +#, c-format msgid "Filesystem: %s" msgstr "" -#: src/info.c:150 +#: src/info.c:148 +#, c-format msgid "Accessed: %s" msgstr "" -#: src/info.c:154 +#: src/info.c:152 +#, c-format msgid "Modified: %s" msgstr "" -#: src/info.c:158 +#: src/info.c:156 +#, c-format msgid "Created: %s" msgstr "" -#: src/info.c:171 +#: src/info.c:169 msgid "Size: " msgstr "" -#: src/info.c:174 +#: src/info.c:172 +#, c-format msgid " (%d blocks)" msgstr "" -#: src/info.c:180 +#: src/info.c:178 +#, c-format msgid "Owner: %s/%s" msgstr "" -#: src/info.c:185 +#: src/info.c:183 +#, c-format msgid "Links: %d" msgstr "" -#: src/info.c:189 +#: src/info.c:187 +#, c-format msgid "Mode: %s (%04o)" msgstr "" -#: src/info.c:194 +#: src/info.c:192 +#, c-format msgid "Location: %Xh:%Xh" msgstr "" -#: src/info.c:200 +#: src/info.c:198 +#, c-format msgid "File: %s" msgstr "" -#: src/info.c:204 +#: src/info.c:202 msgid "File: None" msgstr "" -#: src/layout.c:161 +#: src/layout.c:158 msgid "&Vertical" msgstr "" -#: src/layout.c:162 +#: src/layout.c:159 msgid "&Horizontal" msgstr "" -#: src/layout.c:172 +#: src/layout.c:169 msgid "&Xterm hintbar" msgstr "" -#: src/layout.c:173 +#: src/layout.c:170 msgid "h&Intbar visible" msgstr "" -#: src/layout.c:174 +#: src/layout.c:171 msgid "&Keybar visible" msgstr "" -#: src/layout.c:175 +#: src/layout.c:172 msgid "command &Prompt" msgstr "" -#: src/layout.c:176 +#: src/layout.c:173 msgid "show &Mini status" msgstr "" -#: src/layout.c:177 +#: src/layout.c:174 msgid "menu&Bar visible" msgstr "" -#: src/layout.c:178 +#: src/layout.c:175 msgid "&Equal split" msgstr "" -#: src/layout.c:179 +#: src/layout.c:176 msgid "pe&Rmissions" msgstr "" -#: src/layout.c:180 +#: src/layout.c:177 msgid "&File types" msgstr "" -#: src/layout.c:374 src/learn.c:62 src/learn.c:181 src/option.c:146 +#: src/layout.c:371 src/learn.c:60 src/learn.c:179 src/option.c:146 msgid "&Save" msgstr "" #. length of line with '<' '>' buttons -#: src/layout.c:382 +#: src/layout.c:379 msgid " Layout " msgstr "" -#: src/layout.c:383 +#: src/layout.c:380 msgid " Panel split " msgstr "" -#: src/layout.c:384 +#: src/layout.c:381 msgid " Highlight... " msgstr "" -#: src/layout.c:385 src/option.c:157 +#: src/layout.c:382 src/option.c:157 msgid " Other options " msgstr "" -#: src/layout.c:386 +#: src/layout.c:383 msgid "output lines" msgstr "" -#: src/layout.c:453 +#: src/layout.c:450 msgid "Layout" msgstr "" -#: src/learn.c:76 +#: src/learn.c:74 msgid " Learn keys " msgstr "" -#: src/learn.c:95 +#: src/learn.c:93 msgid " Teach me a key " msgstr "" -#: src/learn.c:96 +#: src/learn.c:94 +#, c-format msgid "" "Please press the %s\n" "and then wait until this message disappears.\n" @@ -3567,51 +3848,52 @@ "and wait as well." msgstr "" -#: src/learn.c:124 +#: src/learn.c:122 msgid " Cannot accept this key " msgstr "" -#: src/learn.c:125 +#: src/learn.c:123 +#, c-format msgid " You have entered \"%s\"" msgstr "" -#: src/learn.c:172 +#: src/learn.c:170 msgid "OK" msgstr "" -#: src/learn.c:179 +#: src/learn.c:177 msgid "" "It seems that all your keys already\n" "work fine. That's great." msgstr "" -#: src/learn.c:181 +#: src/learn.c:179 msgid "&Discard" msgstr "" -#: src/learn.c:185 +#: src/learn.c:183 msgid "" "Great! You have a complete terminal database!\n" "All your keys work well." msgstr "" -#: src/learn.c:269 +#: src/learn.c:267 msgid "Learn keys" msgstr "" -#: src/learn.c:302 +#: src/learn.c:300 msgid "Press all the keys mentioned here. After you have done it, check" msgstr "" -#: src/learn.c:304 +#: src/learn.c:302 msgid "which keys are not marked with OK. Press space on the missing" msgstr "" -#: src/learn.c:306 +#: src/learn.c:304 msgid "key, or click with the mouse to define it. Move around with Tab." msgstr "" -#: src/main.c:668 +#: src/main.c:666 msgid "" " The Commander can't change to the directory that \n" " the subshell claims you are in. Perhaps you have \n" @@ -3619,252 +3901,247 @@ " extra access permissions with the \"su\" command? " msgstr "" -#: src/main.c:743 +#: src/main.c:741 msgid "Press any key to continue..." msgstr "" -#: src/main.c:793 +#: src/main.c:791 msgid " The shell is already running a command " msgstr "" -#: src/main.c:1198 src/main.c:1219 +#: src/main.c:1194 src/main.c:1215 msgid "&Listing mode..." msgstr "" -#: src/main.c:1199 src/main.c:1220 +#: src/main.c:1195 src/main.c:1216 msgid "&Quick view C-x q" msgstr "" -#: src/main.c:1200 src/main.c:1221 +#: src/main.c:1196 src/main.c:1217 msgid "&Info C-x i" msgstr "" -#: src/main.c:1203 src/main.c:1224 +#: src/main.c:1199 src/main.c:1220 msgid "&Sort order..." msgstr "" -#: src/main.c:1205 src/main.c:1226 +#: src/main.c:1201 src/main.c:1222 msgid "&Filter..." msgstr "" -#: src/main.c:1208 src/main.c:1229 +#: src/main.c:1204 src/main.c:1225 msgid "&Network link..." msgstr "" -#: src/main.c:1209 src/main.c:1230 +#: src/main.c:1205 src/main.c:1226 msgid "FT&P link..." msgstr "" -#: src/main.c:1213 src/main.c:1234 +#: src/main.c:1209 src/main.c:1230 msgid "&Drive... M-d" msgstr "" -#: src/main.c:1215 src/main.c:1236 +#: src/main.c:1211 src/main.c:1232 msgid "&Rescan C-r" msgstr "" -#: src/main.c:1240 +#: src/main.c:1236 msgid "&User menu F2" msgstr "" -#: src/main.c:1241 +#: src/main.c:1237 msgid "&View F3" msgstr "" -#: src/main.c:1242 +#: src/main.c:1238 msgid "Vie&w file... " msgstr "" -#: src/main.c:1243 +#: src/main.c:1239 msgid "&Filtered view M-!" msgstr "" -#: src/main.c:1244 +#: src/main.c:1240 msgid "&Edit F4" msgstr "" -#: src/main.c:1245 +#: src/main.c:1241 msgid "&Copy F5" msgstr "" -#: src/main.c:1246 +#: src/main.c:1242 msgid "c&Hmod C-x c" msgstr "" -#: src/main.c:1248 +#: src/main.c:1244 msgid "&Link C-x l" msgstr "" -#: src/main.c:1249 +#: src/main.c:1245 msgid "&SymLink C-x s" msgstr "" -#: src/main.c:1250 +#: src/main.c:1246 msgid "edit s&Ymlink C-x C-s" msgstr "" -#: src/main.c:1251 +#: src/main.c:1247 msgid "ch&Own C-x o" msgstr "" -#: src/main.c:1252 +#: src/main.c:1248 msgid "&Advanced chown " msgstr "" -#: src/main.c:1254 +#: src/main.c:1250 msgid "&Rename/Move F6" msgstr "" -#: src/main.c:1255 +#: src/main.c:1251 msgid "&Mkdir F7" msgstr "" -#: src/main.c:1256 +#: src/main.c:1252 msgid "&Delete F8" msgstr "" -#: src/main.c:1257 +#: src/main.c:1253 msgid "&Quick cd M-c" msgstr "" -#: src/main.c:1259 +#: src/main.c:1255 msgid "select &Group M-+" msgstr "" -#: src/main.c:1260 +#: src/main.c:1256 msgid "u&Nselect group M-\\" msgstr "" -#: src/main.c:1261 +#: src/main.c:1257 msgid "reverse selec&Tion M-*" msgstr "" -#: src/main.c:1263 +#: src/main.c:1259 msgid "e&Xit F10" msgstr "" -#. I know, I'm lazy, but the tree widget when it's not running -#. * as a panel still has some problems, I have not yet finished -#. * the WTree widget port, sorry. -#. -#: src/main.c:1273 +#: src/main.c:1269 msgid "&Directory tree" msgstr "" -#: src/main.c:1275 +#: src/main.c:1271 msgid "&Find file M-?" msgstr "" -#: src/main.c:1276 +#: src/main.c:1272 msgid "s&Wap panels C-u" msgstr "" -#: src/main.c:1277 +#: src/main.c:1273 msgid "switch &Panels on/off C-o" msgstr "" -#: src/main.c:1278 +#: src/main.c:1274 msgid "&Compare directories C-x d" msgstr "" -#: src/main.c:1279 +#: src/main.c:1275 msgid "e&Xternal panelize C-x !" msgstr "" -#: src/main.c:1280 +#: src/main.c:1276 msgid "show directory s&Izes" msgstr "" -#: src/main.c:1282 +#: src/main.c:1278 msgid "command &History" msgstr "" -#: src/main.c:1283 +#: src/main.c:1279 msgid "di&Rectory hotlist C-\\" msgstr "" -#: src/main.c:1285 +#: src/main.c:1281 msgid "&Active VFS list C-x a" msgstr "" -#: src/main.c:1288 +#: src/main.c:1284 msgid "&Background jobs C-x j" msgstr "" -#: src/main.c:1292 +#: src/main.c:1288 msgid "&Undelete files (ext2fs only)" msgstr "" -#: src/main.c:1295 +#: src/main.c:1291 msgid "&Listing format edit" msgstr "" -#: src/main.c:1297 +#: src/main.c:1293 msgid "&Extension file edit" msgstr "" -#: src/main.c:1298 +#: src/main.c:1294 msgid "&Menu file edit" msgstr "" -#. Must keep in sync with the constants in menu_cmd -#: src/main.c:1303 +#: src/main.c:1299 msgid "&Configuration..." msgstr "" -#: src/main.c:1305 +#: src/main.c:1301 msgid "c&Onfirmation..." msgstr "" -#: src/main.c:1306 +#: src/main.c:1302 msgid "&Display bits..." msgstr "" -#: src/main.c:1308 +#: src/main.c:1304 msgid "learn &Keys..." msgstr "" -#: src/main.c:1311 +#: src/main.c:1307 msgid "&Virtual FS..." msgstr "" -#: src/main.c:1314 +#: src/main.c:1310 msgid "&Save setup" msgstr "" -#: src/main.c:1330 src/main.c:1332 +#: src/main.c:1326 src/main.c:1328 msgid " &Left " msgstr "" -#: src/main.c:1332 +#: src/main.c:1328 msgid " &Above " msgstr "" -#: src/main.c:1335 +#: src/main.c:1331 msgid " &File " msgstr "" -#: src/main.c:1336 +#: src/main.c:1332 msgid " &Command " msgstr "" -#: src/main.c:1337 +#: src/main.c:1333 msgid " &Options " msgstr "" -#: src/main.c:1339 src/main.c:1341 +#: src/main.c:1335 src/main.c:1337 msgid " &Right " msgstr "" -#: src/main.c:1341 +#: src/main.c:1337 msgid " &Below " msgstr "" -#: src/main.c:1396 +#: src/main.c:1392 msgid " Information " msgstr "" -#: src/main.c:1397 +#: src/main.c:1393 msgid "" " Using the fast reload option may not reflect the exact \n" " directory contents. In this cases you'll need to do a \n" @@ -3872,57 +4149,64 @@ " the details. " msgstr "" -#: src/main.c:1671 src/screen.c:2301 src/screen.c:2331 +#: src/main.c:1667 src/screen.c:2285 src/screen.c:2315 msgid "Menu" msgstr "" -#: src/main.c:1876 +#: src/main.c:1872 msgid "Thank you for using GNU Midnight Commander" msgstr "" -#: src/main.c:2229 +#: src/main.c:2225 +#, c-format msgid "with mouse support on xterm%s.\n" msgstr "" -#: src/main.c:2230 +#: src/main.c:2226 msgid " and the Linux console" msgstr "" -#: src/main.c:2325 +#: src/main.c:2321 msgid "The TERM environment variable is unset!\n" msgstr "" -#: src/main.c:2527 +#: src/main.c:2526 +#, c-format msgid "Library directory for the Midnight Commander: %s\n" msgstr "" -#: src/main.c:2532 -msgid "Option -m is obsolete. Please look at Display Bits... in the Option's menu\n" +#: src/main.c:2537 +msgid "" +"Option -m is obsolete. Please look at Display Bits... in the Option's menu\n" msgstr "" -#: src/main.c:2655 +#: src/main.c:2664 msgid "Geometry for the window" msgstr "" -#: src/main.c:2655 +#: src/main.c:2664 msgid "GEOMETRY" msgstr "" -#: src/main.c:2656 +#: src/main.c:2665 msgid "No windows opened at startup" msgstr "" -#: src/main.c:2925 +#: src/main.c:2666 +msgid "Force activation even if a server is already running" +msgstr "" + +#: src/main.c:2938 msgid "" "Couldn't open tty line. You have to run mc without the -P flag.\n" "On some systems you may want to run # `which mc`\n" msgstr "" -#: src/main.c:2999 +#: src/main.c:3012 msgid " Notice " msgstr "" -#: src/main.c:3000 +#: src/main.c:3013 msgid "" " The Midnight Commander configuration files \n" " are now stored in the ~/.mc directory, the \n" @@ -4021,6 +4305,7 @@ msgid "alwa&Ys" msgstr "" +#. Similar code is in layout.c (init_layout()) #: src/option.c:154 msgid " Configure options " msgstr "" @@ -4037,49 +4322,47 @@ msgid "Configure options" msgstr "" -#: src/panelize.c:91 +#: src/panelize.c:87 msgid "&Add new" msgstr "" -#: src/panelize.c:103 +#: src/panelize.c:99 msgid " External panelize " msgstr "" -#. SCO_FLAVOR -#. SCO_FLAVOR -#: src/panelize.c:198 src/panelize.c:466 +#: src/panelize.c:194 src/panelize.c:462 msgid "External panelize" msgstr "" -#: src/panelize.c:223 src/panelize.c:280 src/panelize.c:351 src/panelize.c:372 +#: src/panelize.c:219 src/panelize.c:276 src/panelize.c:347 src/panelize.c:368 msgid "Other command" msgstr "" -#: src/panelize.c:264 +#: src/panelize.c:260 msgid " Add to external panelize " msgstr "" -#: src/panelize.c:265 +#: src/panelize.c:261 msgid " Enter command label: " msgstr "" -#: src/panelize.c:305 +#: src/panelize.c:301 msgid " I can't run external panelize while logged on a non local directory " msgstr "" -#: src/panelize.c:355 +#: src/panelize.c:351 msgid "Find *.orig after patching" msgstr "" -#: src/panelize.c:356 +#: src/panelize.c:352 msgid "Find SUID and SGID programs" msgstr "" -#: src/panelize.c:407 +#: src/panelize.c:403 msgid "Cannot invoke command." msgstr "" -#: src/panelize.c:466 +#: src/panelize.c:462 msgid "Pipe close failed" msgstr "" @@ -4091,78 +4374,76 @@ msgid "Display brief usage message" msgstr "" -#: src/screen.c:446 +#: src/screen.c:429 msgid "MTime" msgstr "" -#: src/screen.c:448 -msgid "Permission" -msgstr "" - -#: src/screen.c:449 -msgid "Perm" +#: src/screen.c:430 +msgid "ATime" msgstr "" -#: src/screen.c:450 -msgid "|" +#: src/screen.c:431 +msgid "CTime" msgstr "" -#: src/screen.c:451 -msgid "Nl" +#: src/screen.c:432 +msgid "Permission" msgstr "" -#: src/screen.c:452 -msgid "GID" +#: src/screen.c:433 +msgid "Perm" msgstr "" -#: src/screen.c:453 -msgid "UID" +#: src/screen.c:434 +msgid "Nl" msgstr "" -#: src/screen.c:456 -msgid "ATime" +#: src/screen.c:435 +msgid "Inode" msgstr "" -#: src/screen.c:457 -msgid "CTime" +#: src/screen.c:436 +msgid "UID" msgstr "" -#: src/screen.c:461 -msgid "Inode" +#: src/screen.c:437 +msgid "GID" msgstr "" -#: src/screen.c:665 +#: src/screen.c:650 +#, c-format msgid " %s bytes in %d file%s" msgstr "" -#: src/screen.c:1305 +#: src/screen.c:1289 msgid "Unknow tag on display format: " msgstr "" -#: src/screen.c:2065 +#: src/screen.c:2049 msgid " Do you really want to execute? " msgstr "" -#: src/screen.c:2080 +#: src/screen.c:2064 msgid " No action taken " msgstr "" -#: src/screen.c:2305 src/screen.c:2335 src/tree.c:1030 +#: src/screen.c:2289 src/screen.c:2319 src/tree.c:1026 msgid "RenMov" msgstr "" -#. FIXME: mkdir is currently defunct -#: src/screen.c:2306 src/screen.c:2336 src/tree.c:1034 +#: src/screen.c:2290 src/screen.c:2320 src/tree.c:1030 msgid "Mkdir" msgstr "" -#: src/screen.c:2322 +#: src/screen.c:2306 +#, c-format msgid "" " Can't chdir to %s \n" " %s " msgstr "" #: src/subshell.c:287 +#, c-format msgid "Couldn't open named pipe %s\n" msgstr "" @@ -4179,526 +4460,547 @@ msgstr "" #: src/subshell.c:780 +#, c-format msgid "Warning: Couldn't change to %s.\n" msgstr "" -#: src/tree.c:204 +#: src/tree.c:202 +#, c-format msgid "" "Can't open the %s file for writing:\n" "%s\n" msgstr "" -#: src/tree.c:649 +#: src/tree.c:647 +#, c-format msgid "Copy \"%s\" directory to:" msgstr "" -#: src/tree.c:687 +#: src/tree.c:685 +#, c-format msgid "Move \"%s\" directory to:" msgstr "" -#: src/tree.c:694 +#: src/tree.c:692 +#, c-format msgid "" " Can't stat the destination \n" " %s " msgstr "" -#: src/tree.c:700 +#: src/tree.c:698 msgid " The destination isn't a directory " msgstr "" -#: src/tree.c:758 +#: src/tree.c:754 +#, c-format msgid " Delete %s? " msgstr "" -#: src/tree.c:790 +#: src/tree.c:786 msgid "Static" msgstr "" -#: src/tree.c:790 +#: src/tree.c:786 msgid "Dynamc" msgstr "" -#: src/tree.c:880 +#: src/tree.c:876 +#, c-format msgid "" " Can't chdir to \"%s\" \n" " %s " msgstr "" -#: src/tree.c:1024 +#: src/tree.c:1020 msgid "Rescan" msgstr "" -#: src/tree.c:1026 +#: src/tree.c:1022 msgid "Forget" msgstr "" -#: src/tree.c:1039 +#: src/tree.c:1035 msgid "Rmdir" msgstr "" -#: src/user.c:265 +#: src/treestore.c:354 +#, c-format +msgid "" +"Can't write to the %s file:\n" +"%s\n" +msgstr "" + +#: src/user.c:261 +#, c-format msgid " Invalid shell pattern defination \"%c\". " msgstr "" -#: src/user.c:398 +#: src/user.c:394 msgid " Debug " msgstr "" -#. Save the result of the condition -#: src/user.c:407 +#: src/user.c:403 msgid " ERROR: " msgstr "" -#: src/user.c:411 +#: src/user.c:407 msgid " True: " msgstr "" -#: src/user.c:413 +#: src/user.c:409 msgid " False: " msgstr "" -#: src/user.c:610 +#: src/user.c:606 msgid " Warning -- ignoring file " msgstr "" -#: src/user.c:611 +#: src/user.c:607 +#, c-format msgid "" "File %s is not owned by root or you or is world writable.\n" "Using it may compromise your security" msgstr "" -#: src/user.c:629 +#: src/user.c:625 msgid " I can't run programs while logged on a non local directory " msgstr "" #. Create listbox -#: src/user.c:716 +#: src/user.c:712 msgid " User menu " msgstr "" -#: src/util.c:239 +#: src/util.c:220 msgid "name_trunc: too big" msgstr "" -#: src/utilunix.c:384 +#: src/utilunix.c:382 msgid " Pipe failed " msgstr "" -#: src/utilunix.c:388 +#: src/utilunix.c:386 msgid " Dup failed " msgstr "" -#: src/view.c:405 +#: src/view.c:401 msgid "" "File: \n" "\n" " " msgstr "" -#: src/view.c:406 +#: src/view.c:402 msgid "" "\n" "\n" "has been modified, do you want to save the changes?\n" msgstr "" -#: src/view.c:408 +#: src/view.c:404 msgid " Save changes " msgstr "" -#: src/view.c:450 +#: src/view.c:446 msgid " Can't spawn child program " msgstr "" -#: src/view.c:459 +#: src/view.c:455 msgid " Empty output from child filter " msgstr "" -#: src/view.c:464 +#: src/view.c:460 msgid " Could not open file " msgstr "" -#: src/view.c:479 +#: src/view.c:475 msgid " Can't open file \"" msgstr "" -#: src/view.c:486 +#: src/view.c:482 msgid "" " Can't stat file \n" " " msgstr "" -#: src/view.c:492 +#: src/view.c:488 msgid " Can't view: not a regular file " msgstr "" -#: src/view.c:682 +#: src/view.c:678 +#, c-format msgid "File: %s" msgstr "" -#: src/view.c:698 +#: src/view.c:694 msgid " [grow]" msgstr "" -#: src/view.c:1540 src/view.c:1662 +#: src/view.c:1536 src/view.c:1658 msgid " Search string not found " msgstr "" -#: src/view.c:1701 +#: src/view.c:1697 msgid " Invalid regular expression " msgstr "" -#: src/view.c:1831 +#: src/view.c:1827 +#, c-format msgid "" " The current line number is %d.\n" " Enter the new line number:" msgstr "" -#: src/view.c:1861 +#: src/view.c:1857 msgid " Enter regexp:" msgstr "" -#: src/view.c:1893 +#: src/view.c:1889 msgid " Enter search string:" msgstr "" -#: src/view.c:1966 +#: src/view.c:1962 msgid "Ascii" msgstr "" -#: src/view.c:1966 +#: src/view.c:1962 msgid "Hex" msgstr "" -#: src/view.c:1967 +#: src/view.c:1963 msgid "Line" msgstr "" -#: src/view.c:1968 +#: src/view.c:1964 msgid "RxSrch" msgstr "" -#: src/view.c:1971 +#: src/view.c:1967 msgid "EdText" msgstr "" -#: src/view.c:1971 +#: src/view.c:1967 msgid "EdHex" msgstr "" -#: src/view.c:1973 +#: src/view.c:1969 msgid "UnWrap" msgstr "" -#: src/view.c:1973 +#: src/view.c:1969 msgid "Wrap" msgstr "" -#: src/view.c:1976 +#: src/view.c:1972 msgid "HxSrch" msgstr "" -#: src/view.c:1979 +#: src/view.c:1975 msgid "Raw" msgstr "" -#: src/view.c:1979 +#: src/view.c:1975 msgid "Parse" msgstr "" -#: src/view.c:1983 +#: src/view.c:1979 msgid "Unform" msgstr "" -#: src/view.c:1983 +#: src/view.c:1979 msgid "Format" msgstr "" #. KEY_F(0) is not here, since we are mapping it to f10, so there is no reason #. to define f0 as well. Also, it makes Learn keys a bunch of problems :( -#: src/win.c:228 +#: src/win.c:224 msgid "Function key 1" msgstr "" -#: src/win.c:229 +#: src/win.c:225 msgid "Function key 2" msgstr "" -#: src/win.c:230 +#: src/win.c:226 msgid "Function key 3" msgstr "" -#: src/win.c:231 +#: src/win.c:227 msgid "Function key 4" msgstr "" -#: src/win.c:232 +#: src/win.c:228 msgid "Function key 5" msgstr "" -#: src/win.c:233 +#: src/win.c:229 msgid "Function key 6" msgstr "" -#: src/win.c:234 +#: src/win.c:230 msgid "Function key 7" msgstr "" -#: src/win.c:235 +#: src/win.c:231 msgid "Function key 8" msgstr "" -#: src/win.c:236 +#: src/win.c:232 msgid "Function key 9" msgstr "" -#: src/win.c:237 +#: src/win.c:233 msgid "Function key 10" msgstr "" -#: src/win.c:238 +#: src/win.c:234 msgid "Function key 11" msgstr "" -#: src/win.c:239 +#: src/win.c:235 msgid "Function key 12" msgstr "" -#: src/win.c:240 +#: src/win.c:236 msgid "Function key 13" msgstr "" -#: src/win.c:241 +#: src/win.c:237 msgid "Function key 14" msgstr "" -#: src/win.c:242 +#: src/win.c:238 msgid "Function key 15" msgstr "" -#: src/win.c:243 +#: src/win.c:239 msgid "Function key 16" msgstr "" -#: src/win.c:244 +#: src/win.c:240 msgid "Function key 17" msgstr "" -#: src/win.c:245 +#: src/win.c:241 msgid "Function key 18" msgstr "" -#: src/win.c:246 +#: src/win.c:242 msgid "Function key 19" msgstr "" -#: src/win.c:247 +#: src/win.c:243 msgid "Function key 20" msgstr "" -#: src/win.c:248 +#: src/win.c:244 msgid "Backspace key" msgstr "" -#: src/win.c:249 +#: src/win.c:245 msgid "End key" msgstr "" -#: src/win.c:250 +#: src/win.c:246 msgid "Up arrow key" msgstr "" -#: src/win.c:251 +#: src/win.c:247 msgid "Down arrow key" msgstr "" -#: src/win.c:252 +#: src/win.c:248 msgid "Left arrow key" msgstr "" -#: src/win.c:253 +#: src/win.c:249 msgid "Right arrow key" msgstr "" -#: src/win.c:254 +#: src/win.c:250 msgid "Home key" msgstr "" -#: src/win.c:255 +#: src/win.c:251 msgid "Page Down key" msgstr "" -#: src/win.c:256 +#: src/win.c:252 msgid "Page Up key" msgstr "" -#: src/win.c:257 +#: src/win.c:253 msgid "Insert key" msgstr "" -#: src/win.c:258 +#: src/win.c:254 msgid "Delete key" msgstr "" -#: src/win.c:259 +#: src/win.c:255 msgid "Completion/M-tab" msgstr "" -#: src/win.c:260 +#: src/win.c:256 msgid "+ on keypad" msgstr "" -#: src/win.c:261 +#: src/win.c:257 msgid "- on keypad" msgstr "" -#: src/win.c:262 +#: src/win.c:258 msgid "* on keypad" msgstr "" #. From here on, these won't be shown in Learn keys (no space) -#: src/win.c:264 +#: src/win.c:260 msgid "Left arrow keypad" msgstr "" -#: src/win.c:265 +#: src/win.c:261 msgid "Right arrow keypad" msgstr "" -#: src/win.c:266 +#: src/win.c:262 msgid "Up arrow keypad" msgstr "" -#: src/win.c:267 +#: src/win.c:263 msgid "Down arrow keypad" msgstr "" -#: src/win.c:268 +#: src/win.c:264 msgid "Home on keypad" msgstr "" -#: src/win.c:269 +#: src/win.c:265 msgid "End on keypad" msgstr "" -#: src/win.c:270 +#: src/win.c:266 msgid "Page Down keypad" msgstr "" -#: src/win.c:271 +#: src/win.c:267 msgid "Page Up keypad" msgstr "" -#: src/win.c:272 +#: src/win.c:268 msgid "Insert on keypad" msgstr "" -#: src/win.c:273 +#: src/win.c:269 msgid "Delete on keypad" msgstr "" -#: src/win.c:274 +#: src/win.c:270 msgid "Enter on keypad" msgstr "" -#: src/win.c:275 +#: src/win.c:271 msgid "Slash on keypad" msgstr "" -#: src/win.c:276 +#: src/win.c:272 msgid "NumLock on keypad" msgstr "" -#: src/wtools.c:590 vfs/vfs.c:1776 +#: src/wtools.c:587 vfs/vfs.c:1757 msgid "Password:" msgstr "" -#: src/wtools.c:590 +#: src/wtools.c:587 msgid "Password" msgstr "" -#: src/wtools.c:645 +#: src/wtools.c:642 msgid "Ok" msgstr "" -#: vfs/extfs.c:274 +#: vfs/extfs.c:266 +#, c-format msgid "" "Couldn't open %s archive\n" "%s" msgstr "" -#: vfs/extfs.c:306 vfs/extfs.c:326 +#: vfs/extfs.c:298 vfs/extfs.c:318 msgid "Inconsistent extfs archive" msgstr "" -#: vfs/fish.c:226 +#: vfs/fish.c:224 msgid "Sorry, we can not do password authenticated connections for now." msgstr "" -#: vfs/ftpfs.c:466 +#: vfs/ftpfs.c:521 +#, c-format msgid " Could not set source routing (%s)" msgstr "" -#: vfs/ftpfs.c:1878 vfs/ftpfs.c:1893 +#: vfs/ftpfs.c:1988 vfs/ftpfs.c:2003 msgid "" "~/.netrc file has not correct mode.\n" "Remove password or correct mode." msgstr "" -#: vfs/mcfs.c:155 +#: vfs/mcfs.c:153 msgid " MCFS " msgstr "" -#: vfs/mcfs.c:155 +#: vfs/mcfs.c:153 msgid " The server does not support this version " msgstr "" -#: vfs/mcfs.c:172 +#: vfs/mcfs.c:170 msgid "" " The remote server is not running on a system port \n" " you need a password to log in, but the information may \n" " not be safe on the remote side. Continue? \n" msgstr "" -#: vfs/mcfs.c:175 +#: vfs/mcfs.c:173 msgid " Yes " msgstr "" -#: vfs/mcfs.c:175 +#: vfs/mcfs.c:173 msgid " No " msgstr "" -#: vfs/mcfs.c:177 +#: vfs/mcfs.c:175 msgid " The remote server is running on strange port. Giving up.\n" msgstr "" -#: vfs/mcfs.c:189 +#: vfs/mcfs.c:187 msgid " MCFS Password required " msgstr "" -#: vfs/mcfs.c:203 +#: vfs/mcfs.c:201 msgid " Invalid password " msgstr "" -#: vfs/mcfs.c:323 +#: vfs/mcfs.c:321 msgid " Too many open connections " msgstr "" -#: vfs/tar.c:83 vfs/tar.c:100 +#: vfs/tar.c:84 vfs/tar.c:101 +#, c-format msgid "" "Couldn't open tar archive\n" "%s" msgstr "" -#: vfs/tar.c:283 +#: vfs/tar.c:284 msgid "Unexpected EOF on archive file" msgstr "" -#: vfs/tar.c:338 vfs/tar.c:345 +#: vfs/tar.c:339 vfs/tar.c:346 msgid "Inconsistent tar archive" msgstr "" -#: vfs/tar.c:411 +#: vfs/tar.c:412 +#, c-format msgid "" "Hmm,...\n" "%s\n" diff -ruN old/mc-4.5.9/slang/Makefile.in new/mc-4.5.10/slang/Makefile.in --- old/mc-4.5.9/slang/Makefile.in Mon Jan 18 17:44:09 1999 +++ new/mc-4.5.10/slang/Makefile.in Sun Jan 31 18:55:18 1999 @@ -15,7 +15,7 @@ slmemset.c sltermin.c sltoken.c slsignal.c \ slvideo.c slw32tty.c slos2tty.c -SLANGHDRS = slang.h _slang.h sl-feat.h jdmacros.h +SLANGHDRS = slang-mc.h _slang.h sl-feat.h jdmacros.h SLANGOBJS = sldisply.o slerr.o slsmg.o slutty.o \ slgetkey.o slmemcpy.o slmemset.o sltermin.o \ @@ -51,7 +51,7 @@ etags $(SLANGSRCS) clean: - $(RMF) *.o core a.out libmcslang.a + $(RMF) *.o core a.out libmcslang.a slang.h realclean: clean $(RMF) .depend diff -ruN old/mc-4.5.9/slang/slang-mc.h new/mc-4.5.10/slang/slang-mc.h --- old/mc-4.5.9/slang/slang-mc.h Wed Dec 31 19:00:00 1969 +++ new/mc-4.5.10/slang/slang-mc.h Sun Jan 31 18:55:18 1999 @@ -0,0 +1,1285 @@ +#ifndef DAVIS_SLANG_H_ +#define DAVIS_SLANG_H_ +/* -*- mode: C; mode: fold; -*- */ +/* Copyright (c) 1992, 1995 John E. Davis + * All rights reserved. + * + * You may distribute under the terms of either the GNU General Public + * License or the Perl Artistic License. + */ +#define SLANG_VERSION 9938 +/*{{{ System Dependent Macros and Typedefs */ + +#if defined(__WATCOMC__) && !defined(__QNX__) +# ifndef msdos +# define msdos +# endif +# ifndef DOS386 +# define DOS386 +# endif +# ifndef FLOAT_TYPE +# define FLOAT_TYPE +# endif +# ifndef pc_system +# define pc_system +# endif +#endif /* __watcomc__ */ + +#ifdef unix +# ifndef __unix__ +# define __unix__ 1 +# endif +#endif + +#ifndef __GO32__ +# ifdef __unix__ +# define REAL_UNIX_SYSTEM +# endif +#endif + +/* Set of the various defines for pc systems. This includes OS/2 */ +#ifdef __MSDOS__ +# ifndef msdos +# define msdos +# endif +# ifndef pc_system +# define pc_system +# endif +#endif + +#ifdef __GO32__ +# ifndef pc_system +# define pc_system +# endif +# ifdef REAL_UNIX_SYSTEM +# undef REAL_UNIX_SYSTEM +# endif +#endif + +#if defined(__EMX__) && defined(OS2) +# ifndef pc_system +# define pc_system +# endif +# ifndef __os2__ +# define __os2__ +# define NEEDS_LOCAL_DIRENT_H +# endif +#endif + +#ifdef __cplusplus +extern "C" { +#endif +#if 0 +} +#endif +/* ---------------------------- Generic Macros ----------------------------- */ + +/* __SC__ is defined for Symantec C++ + DOS386 is defined for -mx memory model, 32 bit DOS extender. */ + +#ifdef VOID +# undef VOID +#endif + +#if defined(msdos) && !defined(DOS386) & !defined(__WIN32__) && !defined(__GO32__) +# ifdef __SC__ +# include +# endif + typedef void *VOID_STAR; +# define VOID void +# include +#else +# if defined (__cplusplus) || defined(__STDC__) + typedef void *VOID_STAR; +# define VOID void +# else + typedef unsigned char *VOID_STAR; +# define VOID unsigned char +# endif +#endif + +#if 1 + typedef int (*FVOID_STAR)(void); +#else +# define FVOID_STAR VOID_STAR +#endif + +#if defined(msdos) && !defined(DOS386) && !defined(__GO32__) && !defined(__WIN32__) +# define SLFREE(buf) farfree((void far *)(buf)) +# define SLMALLOC(x) farmalloc((unsigned long) (x)) +# define SLREALLOC(buf, n) farrealloc((void far *) (buf), (unsigned long) (n)) +# define SLCALLOC(n, m) farcalloc((unsigned long) (n), (unsigned long) (m)) +#else +# if defined(VMS) && !defined(__DECC) +# define SLFREE VAXC$FREE_OPT +# define SLMALLOC VAXC$MALLOC_OPT +# define SLREALLOC VAXC$REALLOC_OPT +# define SLCALLOC VAXC$CALLOC_OPT +# else +# define SLFREE(x) free((char *)(x)) +# define SLMALLOC malloc +# if defined(__cplusplus) && !defined(__BEOS__) +# define SLREALLOC(p,n) realloc((malloc_t) (p), (n)) +# else +# define SLREALLOC realloc +# endif +# define SLCALLOC calloc +# endif +#endif + +#ifdef SL_MALLOC_DEBUG +# undef SLMALLOC +# undef SLCALLOC +# undef SLREALLOC +# undef SLFREE +# define SLMALLOC(x) SLdebug_malloc((unsigned long) (x)) +# define SLFREE(x) SLdebug_free((unsigned char *)(x)) +# define SLCALLOC(n, m) SLdebug_calloc((unsigned long) (n), (unsigned long)(m)) +# define SLREALLOC(p, x) SLdebug_realloc((unsigned char *)(p), (unsigned long)(x)) +#endif /* SL_MALLOC_DEBUG */ + + extern unsigned char *SLdebug_malloc (unsigned long); + extern unsigned char *SLdebug_calloc (unsigned long, unsigned long); + extern unsigned char *SLdebug_realloc (unsigned char *, unsigned long); + extern void SLdebug_free (unsigned char *); + extern void SLmalloc_dump_statistics (void); + extern char *SLstrcpy(register char *, register char *); + extern int SLstrcmp(register char *, register char *); + extern char *SLstrncpy(char *, register char *, register int); + + extern void SLmemset (char *, char, int); + extern char *SLmemchr (register char *, register char, register int); + extern char *SLmemcpy (char *, char *, int); + extern int SLmemcmp (char *, char *, int); + +#ifdef float64 +# undef float64 +#endif + +#ifndef FLOAT64_TYPEDEFED +# define FLOAT64_TYPEDEFED + typedef double float64; +#endif + + +/*}}}*/ + +/*{{{ Interpreter Typedefs */ + +#define SLANG_MAX_NAME_LEN 30 +/* maximum length of an identifier */ +/* first char in identifiers is the hash */ + + /* Note that long is used for addresses instead of void *. The reason for + * this is that I have a gut feeling that sizeof (long) > sizeof(void *) + * on some machines. This is certainly the case for MSDOS where addresses + * can be 16 bit. + */ +typedef struct SLang_Name_Type + { +#ifdef SLANG_STATS + int n; /* number of times referenced */ +#endif + char name[SLANG_MAX_NAME_LEN + 2]; /* [0] is hash */ + + unsigned char sub_type; + +/* Values for main_type may be as follows. The particlular values are + * for compatability. + */ +#define SLANG_LVARIABLE 0x01 +#define SLANG_INTRINSIC 0x06 +#define SLANG_FUNCTION 0x07 +#define SLANG_GVARIABLE 0x0D +#define SLANG_IVARIABLE 0x0E /* intrinsic variables */ +/* Note!!! For Macro MAKE_VARIABLE below to work, SLANG_IVARIABLE Must + be 1 less than SLANG_RVARIABLE!!! */ +#define SLANG_RVARIABLE 0x0F /* read only variable */ + unsigned char main_type; + long addr; + } +SLang_Name_Type; + + +typedef struct SLang_Load_Type +{ + long name; /* file name, string address, ... */ + long handle; /* FILE *, string address, etc... */ + + char *ptr; /* input pointer to next line in object + * to be read. + */ + /* Things below here are used by S-Lang. */ + int type; /* 'F' = file, 'S' = String, etc.. */ + char *buf; /* buffer for file, etc... */ + char *(*read)(struct SLang_Load_Type *); /* function to call to read obj */ + int n; /* line number, etc... */ + char token[256]; /* token to be parsed */ + int ofs; /* offset from buf where last read + * took place + */ + int top_level; /* 1 if at top level of parsing */ +} SLang_Load_Type; + +#if defined(ultrix) && !defined(__GNUC__) +# ifndef NO_PROTOTYPES +# define NO_PROTOTYPES +# endif +#endif + +#ifndef NO_PROTOTYPES +# define _PROTO(x) x +#else +# define _PROTO(x) () +#endif + +typedef struct SL_OOBinary_Type +{ + unsigned char sub_type; /* partner type for binary op */ + + /* The function take the binary op as first argument, the operand types + * form the second and third parameters and the last two parameters are + * pointers to the objects themselves. It is up to the function to push + * the result on the stack. It must return 1 if it handled the operation + * return zero if the operation is not defined. + */ + int (*binary_function)_PROTO((int, unsigned char, unsigned char, + VOID_STAR, VOID_STAR)); + + struct SL_OOBinary_Type *next; +} +SL_OOBinary_Type; + +typedef struct +{ + /* Methods */ + void (*destroy)_PROTO((VOID_STAR)); + /* called to delete/free the object */ + char *(*string)_PROTO((VOID_STAR)); + /* returns a string representation of the object */ + int (*unary_function)_PROTO((int, unsigned char, VOID_STAR)); + /* unary operation function */ + SL_OOBinary_Type *binary_ops; + + int (*copy_function)_PROTO((unsigned char, VOID_STAR)); + /* This function is called do make a copy of the object */ +} SLang_Class_Type; + +extern SLang_Class_Type *SLang_Registered_Types[256]; + +typedef struct +{ + unsigned char main_type; /* SLANG_RVARIABLE, etc.. */ + unsigned char sub_type; /* int, string, etc... */ + long *obj; /* address of user structure */ + + /* Everything below is considered private */ + unsigned int count; /* number of references */ +} +SLuser_Object_Type; + + +/*}}}*/ +/*{{{ Interpreter Function Prototypes */ + + extern volatile int SLang_Error; + /* Non zero if error occurs. Must be reset to zero to continue. */ + + extern int SLang_Traceback; + /* If non-zero, dump an S-Lang traceback upon error. Available as + _traceback in S-Lang. */ + + extern char *SLang_User_Prompt; + /* Prompt to use when reading from stdin */ + extern int SLang_Version; + + extern void (*SLang_Error_Routine)(char *); + /* Pointer to application dependent error messaging routine. By default, + messages are displayed on stderr. */ + + extern void (*SLang_Exit_Error_Hook)(char *); + extern void SLang_exit_error (char *); + extern void (*SLang_Dump_Routine)(char *); + /* Called if S-Lang traceback is enabled as well as other debugging + routines (e.g., trace). By default, these messages go to stderr. */ + + extern void (*SLang_Interrupt)(void); + /* function to call whenever inner interpreter is entered. This is + a good place to set SLang_Error to USER_BREAK. */ + + extern void (*SLang_User_Clear_Error)(void); + /* function that gets called when '_clear_error' is called. */ + extern int (*SLang_User_Open_Slang_Object)(SLang_Load_Type *); + extern int (*SLang_User_Close_Slang_Object)(SLang_Load_Type *); + /* user defined loading routines. */ + + + /* If non null, these call C functions before and after a slang function. */ + extern void (*SLang_Enter_Function)(char *); + extern void (*SLang_Exit_Function)(char *); + + +/* Functions: */ + + extern int init_SLang(void); + /* This function is mandatory and must be called by all applications */ + extern int init_SLfiles(void); + /* called if fputs, fgets, etc are need in S-Lang */ + extern int init_SLmath(void); + /* called if math functions sin, cos, etc... are needed. */ + + extern int init_SLunix(void); + /* unix system functions chmod, stat, etc... */ + + extern int init_SLmatrix(void); + + extern int SLang_add_table(SLang_Name_Type *, char *); + /* add application dependent function table p1 to S-Lang. A name p2 less + * than 32 characters must also be supplied. + * Returns 0 upon failure or 1 upon success. */ + + extern int SLang_add_global_variable (char *); + extern int SLang_load_object(SLang_Load_Type *); + extern int SLang_load_file(char *); + /* Load a file of S-Lang code for interpreting. If the parameter is + NULL, input comes from stdin. */ + + extern void SLang_restart(int); + /* should be called if an error occurs. If the passed integer is + * non-zero, items are popped off the stack; otherwise, the stack is + * left intact. Any time the stack is believed to be trashed, this routine + * should be called with a non-zero argument (e.g., if setjmp/longjmp is + * called). */ + + extern void SLang_byte_compile_file(char *, int *); + /* takes a file of S-Lang code and ``byte-compiles'' it for faster + * loading. The new filename is equivalent to the old except that a `c' is + * appended to the name. (e.g., init.sl --> init.slc). If the second + * parameter is non-zero, preprocess the file only. + */ + + extern void SLang_autoload(char *, char *); + /* Automatically load S-Lang function p1 from file p2. This function + is also available via S-Lang */ + + extern char *SLang_load_string(char *); + /* Like SLang_load_file except input is from a null terminated string. */ + + extern void SLang_do_pop(void); + /* pops item off stack and frees any memory associated with it */ + + extern int SLang_pop_integer(int *); + /* pops integer *p0 from the stack. Returns 0 upon success and non-zero + * if the stack is empty or a type mismatch occurs, setting SLang_Error. + */ + + extern int SLpop_string (char **); + extern int SLang_pop_string(char **, int *); + /* pops string *p0 from stack. If *p1 is non-zero, the string must be + * freed after its use. DO NOT FREE p0 if *p1 IS ZERO! Returns 0 upon + * success */ + + extern int SLang_pop_float(float64 *, int *, int *); + /* Pops float *p1 from stack. If *p3 is non-zero, *p1 was derived + from the integer *p2. Returns zero upon success. */ + + extern SLuser_Object_Type *SLang_pop_user_object (unsigned char); + extern void SLang_free_user_object (SLuser_Object_Type *); + extern void SLang_free_intrinsic_user_object (SLuser_Object_Type *); + /* This is like SLang_free_user_object but is meant to free those + * that have been declared as intrinsic variables by the application. + * Normally an application would never need to call this. + */ + + extern void SLang_push_user_object (SLuser_Object_Type *); + extern SLuser_Object_Type *SLang_create_user_object (unsigned char); + + extern int SLang_add_unary_op (unsigned char, FVOID_STAR); + extern int SLang_add_binary_op (unsigned char, unsigned char, FVOID_STAR); + extern int SLang_register_class (unsigned char, FVOID_STAR, FVOID_STAR); + extern int SLang_add_copy_operation (unsigned char, FVOID_STAR); + + extern long *SLang_pop_pointer(unsigned char *, unsigned char *, int *); + /* Returns a pointer to object of type *p1,*p2 on top of stack. + If *p3 is non-zero, the Object must be freed after use. */ + + + extern void SLang_push_float(float64); + /* Push Float onto stack */ + + extern void SLang_push_string(char *); + /* Push string p1 onto stack */ + + extern void SLang_push_integer(int); + /* push integer p1 on stack */ + + extern void SLang_push_malloced_string(char *); + /* The normal SLang_push_string mallocs space for the string. This one + does not. DO NOT FREE IT IF YOU USE THIS ROUTINE */ + + extern int SLang_is_defined(char *); + /* Return non-zero is p1 is defined otherwise returns 0. */ + + extern int SLang_run_hooks(char *, char *, char *); + /* calls S-Lang function p1 pushing strings p2 and p3 onto the stack + * first. If either string is NULL, it is not pushed. If p1 is not + * defined, 0 is returned. */ + + extern int SLang_execute_function(char *); + /* Call S-Lang function p1. Returns 0 if the function is not defined + * and 1 if it is. + */ + + extern char *SLang_find_name(char *); + /* Return a pointer to p1 in table if it is defined. Returns NULL + * otherwise. This is useful when one wants to avoid redundant strings. + */ + + extern char *SLang_rpn_interpret(char *); + /* Interpret string as reverse polish notation */ + + extern void SLang_doerror(char *); + /* set SLang_Error and display p1 as error message */ + + extern SLuser_Object_Type *SLang_add_array(char *, long *, + int, int, int, int, + unsigned char, unsigned char); + /* This function has not been tested thoroughly yet. Its purpose is to + * allow a S-Lang procedure to access a C array. For example, suppose that + * you have an array of 100 ints defined as: + * + * int c_array[100]; + * + * By calling something like: + * + * SLang_add_array ("array_name", (long *) c_array, 1, 100, 0, 0, + * 'i', SLANG_IVARIABLE); + * + * the array can be accessed by the name 'array_name'. This function + * returns -1 upon failure. The 3rd argument specifies the dimension + * of the array, the 4th, and 5th arguments specify how many elements + * there are in the x,y, and z directions. The last argument must + * be one of: + * + * SLANG_IVARIABLE: indicates array is writable + * SLANG_RVARIABLE: indicates array is read only + * + * Returns NULL upon failure. + */ + + +extern int SLang_free_array_handle (int); +/* This routine may be called by application to free array handle created by + * the application. Returns 0 upon success, -1 if the handle is invalid and + * -2 if the handle is not associated with a C array. + */ + + extern char *SLang_extract_list_element(char *, int *, int*); + extern void SLexpand_escaped_string (register char *, register char *, + register char *); + +extern SLang_Name_Type *SLang_get_function (char *); +/* The parameter is the name of a user defined S-Lang function. This + * routine returns NULL if the function does not exist or it returns the + * a pointer to it in an internal S-Lang table. This pointer can be used + * by 'SLexecute_function' to call the function directly from C. + */ + +extern void SLexecute_function(SLang_Name_Type *); +/* This function allows an application to call a S-Lang function from within + * the C program. The parameter must be non-NULL and must have been + * previously obtained by a call to 'SLang_get_function'. + */ +extern void SLroll_stack (int *); +/* If argument *p is positive, the top |*p| objects on the stack are rolled + * up. If negative, the stack is rolled down. + */ + +extern void SLmake_lut (unsigned char *, unsigned char *, unsigned char); + + extern int SLang_guess_type (char *); + + +/*}}}*/ + +/*{{{ Misc Functions */ + +extern char *SLmake_string (char *); +extern char *SLmake_nstring (char *, unsigned int); +/* Returns a null terminated string made from the first n characters of the + * string. + */ + +extern char *SLcurrent_time_string (void); + +extern int SLatoi(unsigned char *); + +extern int SLang_extract_token(char **, char *, int); +/* returns 0 upon failure and non-zero upon success. The first parameter + * is a pointer to the input stream which this function will bump along. + * The second parameter is the buffer where the token is placed. The third + * parameter is used internally by the S-Lang library and should be 0 for + * user applications. + */ + +/*}}}*/ + +/*{{{ SLang getkey interface Functions */ + +#ifdef REAL_UNIX_SYSTEM +extern int SLang_TT_Baud_Rate; +extern int SLang_TT_Read_FD; +#endif + +extern int SLang_init_tty (int, int, int); +/* Initializes the tty for single character input. If the first parameter *p1 + * is in the range 0-255, it will be used for the abort character; + * otherwise, (unix only) if it is -1, the abort character will be the one + * used by the terminal. If the second parameter p2 is non-zero, flow + * control is enabled. If the last parmeter p3 is zero, output processing + * is NOT turned on. A value of zero is required for the screen management + * routines. Returns 0 upon success. In addition, if SLang_TT_Baud_Rate == + * 0 when this function is called, SLang will attempt to determine the + * terminals baud rate. As far as the SLang library is concerned, if + * SLang_TT_Baud_Rate is less than or equal to zero, the baud rate is + * effectively infinite. + */ + +extern void SLang_reset_tty (void); +/* Resets tty to what it was prior to a call to SLang_init_tty */ +#ifdef REAL_UNIX_SYSTEM +extern void SLtty_set_suspend_state (int); + /* If non-zero argument, terminal driver will be told to react to the + * suspend character. If 0, it will not. + */ +extern int (*SLang_getkey_intr_hook) (void); +#endif + +#define SLANG_GETKEY_ERROR 0xFFFF +extern unsigned int SLang_getkey (void); +/* reads a single key from the tty. If the read fails, 0xFFFF is returned. */ + +extern void SLang_ungetkey_string (unsigned char *, unsigned int); +extern void SLang_buffer_keystring (unsigned char *, unsigned int); +extern void SLang_ungetkey (unsigned char); +extern void SLang_flush_input (void); +extern int SLang_input_pending (int); +extern int SLang_Abort_Char; +/* The value of the character (0-255) used to trigger SIGINT */ +extern int SLang_Ignore_User_Abort; +/* If non-zero, pressing the abort character will not result in USER_BREAK + * SLang_Error. */ + +extern void SLang_set_abort_signal (void (*)(int)); +/* If SIGINT is generated, the function p1 will be called. If p1 is NULL + * the SLang_default signal handler is called. This sets SLang_Error to + * USER_BREAK. I suspect most users will simply want to pass NULL. + */ + +extern volatile int SLKeyBoard_Quit; + +#ifdef VMS +/* If this function returns -1, ^Y will be added to input buffer. */ +extern int (*SLtty_VMS_Ctrl_Y_Hook) (void); +#endif +/*}}}*/ + +/*{{{ SLang Keymap routines */ + +typedef struct SLKeymap_Function_Type + { + char *name; + int (*f)(void); + } +SLKeymap_Function_Type; + +typedef struct SLang_Key_Type + { + unsigned char str[13]; /* key sequence */ +#define SLKEY_F_INTERPRET 0x01 +#define SLKEY_F_INTRINSIC 0x02 +#define SLKEY_F_KEYSYM 0x03 + unsigned char type; /* type of function */ +#ifdef SLKEYMAP_OBSOLETE + VOID_STAR f; /* function to invoke */ +#else + union + { + char *s; + FVOID_STAR f; + unsigned int keysym; + } + f; +#endif + struct SLang_Key_Type *next; /* */ + } +SLang_Key_Type; + +#define MAX_KEYMAP_NAME_LEN 8 +typedef struct SLKeyMap_List_Type +{ + char name[MAX_KEYMAP_NAME_LEN + 1]; + SLang_Key_Type *keymap; + SLKeymap_Function_Type *functions; /* intrinsic functions */ +} +SLKeyMap_List_Type; + +/* This is arbitrary but I have got to start somewhere */ +#ifdef msdos +#define SLANG_MAX_KEYMAPS 10 +#else +#define SLANG_MAX_KEYMAPS 30 +#endif + +extern SLKeyMap_List_Type SLKeyMap_List[SLANG_MAX_KEYMAPS]; /* these better be inited to 0! */ + + +extern char *SLang_process_keystring(char *); + +#ifdef SLKEYMAP_OBSOLETE +extern int SLang_define_key1(char *, VOID_STAR, unsigned int, SLKeyMap_List_Type *); +/* define key p1 in keymap p4 to invoke function p2. If type p3 is given by + * SLKEY_F_INTRINSIC, p2 is an intrinsic function, else it is a string to be + * passed to the interpreter for evaluation. The return value is important. + * It returns 0 upon success, -1 upon malloc error, and -2 if the key is + * inconsistent. SLang_Error is set upon error. */ +#else +extern int SLkm_define_key (char *, FVOID_STAR, SLKeyMap_List_Type *); +#endif + +extern int SLang_define_key(char *, char *, SLKeyMap_List_Type *); +/* Like define_key1 except that p2 is a string that is to be associated with + * a function in the functions field of p3. This routine calls define_key1. + */ + +extern int SLkm_define_keysym (char *, unsigned int, SLKeyMap_List_Type *); + +extern void SLang_undefine_key(char *, SLKeyMap_List_Type *); + +extern SLKeyMap_List_Type *SLang_create_keymap(char *, SLKeyMap_List_Type *); +/* create and returns a pointer to a new keymap named p1 created by copying + * keymap p2. If p2 is NULL, it is up to the calling routine to initialize + * the keymap. + */ + +extern char *SLang_make_keystring(unsigned char *); + +extern SLang_Key_Type *SLang_do_key(SLKeyMap_List_Type *, int (*)(void)); +/* read a key using keymap p1 with getkey function p2 */ + +extern +#ifdef SLKEYMAP_OBSOLETE + VOID_STAR +#else + FVOID_STAR +#endif + SLang_find_key_function(char *, SLKeyMap_List_Type *); + +extern SLKeyMap_List_Type *SLang_find_keymap(char *); + +extern int SLang_Last_Key_Char; +extern int SLang_Key_TimeOut_Flag; + + +/*}}}*/ + +/*{{{ SLang Readline Interface */ + +typedef struct SLang_Read_Line_Type +{ + struct SLang_Read_Line_Type *prev, *next; + unsigned char *buf; + int buf_len; /* number of chars in the buffer */ + int num; /* num and misc are application specific*/ + int misc; +} SLang_Read_Line_Type; + +/* Maximum size of display */ +#define SLRL_DISPLAY_BUFFER_SIZE 256 + +typedef struct +{ + SLang_Read_Line_Type *root, *tail, *last; + unsigned char *buf; /* edit buffer */ + int buf_len; /* sizeof buffer */ + int point; /* current editing point */ + int tab; /* tab width */ + int len; /* current line size */ + + /* display variables */ + int edit_width; /* length of display field */ + int curs_pos; /* current column */ + int start_column; /* column offset of display */ + int dhscroll; /* amount to use for horiz scroll */ + char *prompt; + + FVOID_STAR last_fun; /* last function executed by rl */ + + /* These two contain an image of what is on the display */ + unsigned char upd_buf1[SLRL_DISPLAY_BUFFER_SIZE]; + unsigned char upd_buf2[SLRL_DISPLAY_BUFFER_SIZE]; + unsigned char *old_upd, *new_upd; /* pointers to previous two buffers */ + int new_upd_len, old_upd_len; /* length of output buffers */ + + SLKeyMap_List_Type *keymap; + + /* tty variables */ + unsigned int flags; /* */ +#define SL_RLINE_NO_ECHO 1 +#define SL_RLINE_USE_ANSI 2 + unsigned int (*getkey)(void); /* getkey function -- required */ + void (*tt_goto_column)(int); + void (*tt_insert)(char); + void (*update_hook)(unsigned char *, int, int); + /* The update hook is called with a pointer to a buffer p1 that contains + * an image of what the update hook is suppoed to produce. The length + * of the buffer is p2 and after the update, the cursor is to be placed + * in column p3. + */ +} SLang_RLine_Info_Type; + +extern int SLang_RL_EOF_Char; + +extern SLang_Read_Line_Type * SLang_rline_save_line (SLang_RLine_Info_Type *); +extern int SLang_init_readline (SLang_RLine_Info_Type *); +extern int SLang_read_line (SLang_RLine_Info_Type *); +extern int SLang_rline_insert (char *); +extern void SLrline_redraw (SLang_RLine_Info_Type *); +extern int SLang_Rline_Quit; + +/*}}}*/ + +/*{{{ Low Level Screen Output Interface */ + +extern unsigned long SLtt_Num_Chars_Output; +extern int SLtt_Baud_Rate; + +typedef unsigned long SLtt_Char_Type; + +#define SLTT_BOLD_MASK 0x01000000 +#define SLTT_BLINK_MASK 0x02000000 +#define SLTT_ULINE_MASK 0x04000000 +#define SLTT_REV_MASK 0x08000000 +#define SLTT_ALTC_MASK 0x10000000 + +extern int SLtt_Screen_Rows; +extern int SLtt_Screen_Cols; +extern int SLtt_Term_Cannot_Insert; +extern int SLtt_Term_Cannot_Scroll; +extern int SLtt_Use_Ansi_Colors; +extern int SLtt_Ignore_Beep; +#if defined(REAL_UNIX_SYSTEM) +extern int SLtt_Force_Keypad_Init; +#endif + +#ifndef __GO32__ +#if defined(VMS) || defined(REAL_UNIX_SYSTEM) +extern int SLtt_Blink_Mode; +extern int SLtt_Use_Blink_For_ACS; +extern int SLtt_Newline_Ok; +extern int SLtt_Has_Alt_Charset; +extern int SLtt_Has_Status_Line; /* if 0, NO. If > 0, YES, IF -1, ?? */ +# ifndef VMS +extern int SLtt_Try_Termcap; +# endif +#endif +#endif + +#ifdef msdos +extern int SLtt_Msdos_Cheap_Video; +#endif + + +extern int SLtt_flush_output (void); +extern void SLtt_set_scroll_region(int, int); +extern void SLtt_reset_scroll_region(void); +extern void SLtt_reverse_video (int); +extern void SLtt_bold_video (void); +extern void SLtt_begin_insert(void); +extern void SLtt_end_insert(void); +extern void SLtt_del_eol(void); +extern void SLtt_goto_rc (int, int); +extern void SLtt_delete_nlines(int); +extern void SLtt_delete_char(void); +extern void SLtt_erase_line(void); +extern void SLtt_normal_video(void); +extern void SLtt_cls(void); +extern void SLtt_beep(void); +extern void SLtt_reverse_index(int); +extern void SLtt_smart_puts(unsigned short *, unsigned short *, int, int); +extern void SLtt_write_string (char *); +extern void SLtt_putchar(char); +extern void SLtt_init_video (void); +extern void SLtt_reset_video (void); +extern void SLtt_get_terminfo(void); +extern void SLtt_get_screen_size (void); +extern int SLtt_set_cursor_visibility (int); + +#if defined(VMS) || defined(REAL_UNIX_SYSTEM) +extern void SLtt_enable_cursor_keys(void); +extern void SLtt_set_term_vtxxx(int *); +extern void SLtt_set_color_esc (int, char *); +extern void SLtt_wide_width(void); +extern void SLtt_narrow_width(void); +extern int SLtt_set_mouse_mode (int, int); +extern void SLtt_set_alt_char_set (int); +extern int SLtt_write_to_status_line (char *, int); +extern void SLtt_disable_status_line (void); +# ifdef REAL_UNIX_SYSTEM + extern char *SLtt_tgetstr (char *); + extern int SLtt_tgetnum (char *); + extern int SLtt_tgetflag (char *); + extern char *SLtt_tigetent (char *); + extern char *SLtt_tigetstr (char *, char **); + extern int SLtt_tigetnum (char *, char **); +# endif +#endif + +extern SLtt_Char_Type SLtt_get_color_object (int); +extern void SLtt_set_color_object (int, SLtt_Char_Type); +extern void SLtt_set_color (int, char *, char *, char *); +extern void SLtt_set_mono (int, char *, SLtt_Char_Type); +extern void SLtt_add_color_attribute (int, SLtt_Char_Type); +extern void SLtt_set_color_fgbg (int, SLtt_Char_Type, SLtt_Char_Type); + +/*}}}*/ + +/*{{{ SLang Preprocessor Interface */ + +typedef struct +{ + int this_level; + int exec_level; + int prev_exec_level; + char preprocess_char; + char comment_char; + unsigned char flags; +#define SLPREP_BLANK_LINES_OK 1 +#define SLPREP_COMMENT_LINES_OK 2 +} +SLPreprocess_Type; + +extern int SLprep_open_prep (SLPreprocess_Type *); +extern void SLprep_close_prep (SLPreprocess_Type *); +extern int SLprep_line_ok (char *, SLPreprocess_Type *); + extern int SLdefine_for_ifdef (char *); + /* Adds a string to the SLang #ifdef preparsing defines. SLang already + defines MSDOS, UNIX, and VMS on the appropriate system. */ +extern int (*SLprep_exists_hook) (char *, char); + + +/*}}}*/ + +/*{{{ SLsmg Screen Management Functions */ + +#include +extern void SLsmg_fill_region (int, int, int, int, unsigned char); +#ifndef pc_system +extern void SLsmg_set_char_set (int); +extern int SLsmg_Scroll_Hash_Border; +#endif +extern void SLsmg_suspend_smg (void); +extern void SLsmg_resume_smg (void); +extern void SLsmg_erase_eol (void); +extern void SLsmg_gotorc (int, int); +extern void SLsmg_erase_eos (void); +extern void SLsmg_reverse_video (void); +extern void SLsmg_set_color (int); +extern void SLsmg_normal_video (void); +extern void SLsmg_printf (char *, ...); +extern void SLsmg_vprintf (char *, va_list); +extern void SLsmg_write_string (char *); +extern void SLsmg_write_nstring (char *, int); +extern void SLsmg_write_char (char); +extern void SLsmg_write_nchars (char *, int); +extern void SLsmg_write_wrapped_string (char *, int, int, int, int, int); +extern void SLsmg_cls (void); +extern void SLsmg_refresh (void); +extern void SLsmg_touch_lines (int, int); +extern int SLsmg_init_smg (void); +extern void SLsmg_reset_smg (void); +extern unsigned short SLsmg_char_at(void); +extern void SLsmg_set_screen_start (int *, int *); +extern void SLsmg_draw_hline (int); +extern void SLsmg_draw_vline (int); +extern void SLsmg_draw_object (int, int, unsigned char); +extern void SLsmg_draw_box (int, int, int, int); +extern int SLsmg_get_column(void); +extern int SLsmg_get_row(void); +extern void SLsmg_forward (int); +extern void SLsmg_write_color_chars (unsigned short *, unsigned int); +extern unsigned int SLsmg_read_raw (unsigned short *, unsigned int); +extern unsigned int SLsmg_write_raw (unsigned short *, unsigned int); + +extern int SLsmg_Display_Eight_Bit; +extern int SLsmg_Tab_Width; +extern int SLsmg_Newline_Moves; +extern int SLsmg_Backspace_Moves; + +#ifdef pc_system +# define SLSMG_HLINE_CHAR 0xC4 +# define SLSMG_VLINE_CHAR 0xB3 +# define SLSMG_ULCORN_CHAR 0xDA +# define SLSMG_URCORN_CHAR 0xBF +# define SLSMG_LLCORN_CHAR 0xC0 +# define SLSMG_LRCORN_CHAR 0xD9 +# define SLSMG_RTEE_CHAR 0xB4 +# define SLSMG_LTEE_CHAR 0xC3 +# define SLSMG_UTEE_CHAR 0xC2 +# define SLSMG_DTEE_CHAR 0xC1 +# define SLSMG_PLUS_CHAR 0xC5 +/* There are several to choose from: 0xB0, 0xB1, and 0xB2 */ +# define SLSMG_CKBRD_CHAR 0xB0 +#else +# define SLSMG_HLINE_CHAR 'q' +# define SLSMG_VLINE_CHAR 'x' +# define SLSMG_ULCORN_CHAR 'l' +# define SLSMG_URCORN_CHAR 'k' +# define SLSMG_LLCORN_CHAR 'm' +# define SLSMG_LRCORN_CHAR 'j' +# define SLSMG_CKBRD_CHAR 'a' +# define SLSMG_RTEE_CHAR 'u' +# define SLSMG_LTEE_CHAR 't' +# define SLSMG_UTEE_CHAR 'w' +# define SLSMG_DTEE_CHAR 'v' +# define SLSMG_PLUS_CHAR 'n' +#endif + +#ifndef pc_system +# define SLSMG_COLOR_BLACK 0x000000 +# define SLSMG_COLOR_RED 0x000001 +# define SLSMG_COLOR_GREEN 0x000002 +# define SLSMG_COLOR_BROWN 0x000003 +# define SLSMG_COLOR_BLUE 0x000004 +# define SLSMG_COLOR_MAGENTA 0x000005 +# define SLSMG_COLOR_CYAN 0x000006 +# define SLSMG_COLOR_LGRAY 0x000007 +# define SLSMG_COLOR_GRAY 0x000008 +# define SLSMG_COLOR_BRIGHT_RED 0x000009 +# define SLSMG_COLOR_BRIGHT_GREEN 0x00000A +# define SLSMG_COLOR_BRIGHT_BROWN 0x00000B +# define SLSMG_COLOR_BRIGHT_BLUE 0x00000C +# define SLSMG_COLOR_BRIGHT_CYAN 0x00000D +# define SLSMG_COLOR_BRIGHT_MAGENTA 0x00000E +# define SLSMG_COLOR_BRIGHT_WHITE 0x00000F +#endif + +/*}}}*/ + +/*{{{ SLang Keypad Interface */ + +#define SL_KEY_ERR 0xFFFF + +#define SL_KEY_UP 0x101 +#define SL_KEY_DOWN 0x102 +#define SL_KEY_LEFT 0x103 +#define SL_KEY_RIGHT 0x104 +#define SL_KEY_PPAGE 0x105 +#define SL_KEY_NPAGE 0x106 +#define SL_KEY_HOME 0x107 +#define SL_KEY_END 0x108 +#define SL_KEY_A1 0x109 +#define SL_KEY_A3 0x10A +#define SL_KEY_B2 0x10B +#define SL_KEY_C1 0x10C +#define SL_KEY_C3 0x10D +#define SL_KEY_REDO 0x10E +#define SL_KEY_UNDO 0x10F +#define SL_KEY_BACKSPACE 0x110 +#define SL_KEY_ENTER 0x111 +#define SL_KEY_IC 0x112 +#define SL_KEY_DELETE 0x113 + +#define SL_KEY_F0 0x200 +#define SL_KEY_F(X) (SL_KEY_F0 + X) + +/* I do not intend to use keysymps > 0x1000. Applications can use those. */ +/* Returns 0 upon success or -1 upon error. */ +int SLkp_define_keysym (char *, unsigned int); + +/* This function must be called AFTER SLtt_get_terminfo and not before. */ +extern int SLkp_init (void); + +/* This function uses SLang_getkey and assumes that what ever initialization + * is required for SLang_getkey has been performed. + */ +extern int SLkp_getkey (void); + +/*}}}*/ + +/*{{{ SLang Scroll Interface */ + +typedef struct _SLscroll_Type +{ + struct _SLscroll_Type *next; + struct _SLscroll_Type *prev; + unsigned int flags; +} +SLscroll_Type; + +typedef struct +{ + unsigned int flags; + SLscroll_Type *top_window_line; /* list element at top of window */ + SLscroll_Type *bot_window_line; /* list element at bottom of window */ + SLscroll_Type *current_line; /* current list element */ + SLscroll_Type *lines; /* first list element */ + unsigned int nrows; /* number of rows in window */ + unsigned int hidden_mask; /* applied to flags in SLscroll_Type */ + unsigned int line_num; /* current line number (visible) */ + unsigned int num_lines; /* total number of lines (visible) */ + unsigned int window_row; /* row of current_line in window */ + unsigned int border; /* number of rows that form scroll border */ + int cannot_scroll; /* should window scroll or recenter */ +} +SLscroll_Window_Type; + +extern int SLscroll_find_top (SLscroll_Window_Type *); +extern int SLscroll_find_line_num (SLscroll_Window_Type *); +extern unsigned int SLscroll_next_n (SLscroll_Window_Type *, unsigned int); +extern unsigned int SLscroll_prev_n (SLscroll_Window_Type *, unsigned int); +extern int SLscroll_pageup (SLscroll_Window_Type *); +extern int SLscroll_pagedown (SLscroll_Window_Type *); + +/*}}}*/ + +/*{{{ Signal Routines */ + +typedef void SLSig_Fun_Type (int); +extern SLSig_Fun_Type *SLsignal (int, SLSig_Fun_Type *); +extern SLSig_Fun_Type *SLsignal_intr (int, SLSig_Fun_Type *); +#ifndef pc_system +extern int SLsig_block_signals (void); +extern int SLsig_unblock_signals (void); +#endif +/*}}}*/ + +/*{{{ Interpreter Macro Definitions */ + +/* This value is a main_type just like the other main_types defined + * near the definition of SLang_Name_Type. Applications should avoid using + * this so if you do not understands its role, do not use it. + */ +#define SLANG_DATA 0x30 /* real objects which may be destroyed */ + +/* Subtypes */ + +/* The definitions here are for objects that may be on the run-time stack. + * They are actually sub_types of literal and data main_types. + */ +#define VOID_TYPE 1 +#define INT_TYPE 2 +#ifdef FLOAT_TYPE +# undef FLOAT_TYPE +# define FLOAT_TYPE 3 +#endif +#define CHAR_TYPE 4 +#define INTP_TYPE 5 +/* An object of INTP_TYPE should never really occur on the stack. Rather, + * the integer to which it refers will be there instead. It is defined here + * because it is a valid type for MAKE_VARIABLE. + */ + +#define SLANG_OBJ_TYPE 6 +/* SLANG_OBJ_TYPE refers to an object on the stack that is a pointer to + * some other object. + */ + +#if 0 +/* This is not ready yet. */ +# define SLANG_NOOP 9 +#endif + +/* Everything above string should correspond to a pointer in the object + * structure. See do_binary (slang.c) for exploitation of this fact. + */ +#define STRING_TYPE 10 +/* Array type MUST be the smallest number for SLuser_Object_Type structs */ +#define ARRAY_TYPE 20 +/* I am reserving values greater than or equal to user applications. The + * first 99 are used for S-Lang. + */ + + +/* Binary and Unary Subtypes */ +/* Since the application can define new types and can overload the binary + * and unary operators, these definitions must be present in this file. + */ +#define SLANG_PLUS 1 +#define SLANG_MINUS 2 +#define SLANG_TIMES 3 +#define SLANG_DIVIDE 4 +#define SLANG_EQ 5 +#define SLANG_NE 6 +#define SLANG_GT 7 +#define SLANG_GE 8 +#define SLANG_LT 9 +#define SLANG_LE 10 + +/* UNARY subtypes (may be overloaded) */ +#define SLANG_ABS 11 +#define SLANG_SIGN 12 +#define SLANG_SQR 13 +#define SLANG_MUL2 14 +#define SLANG_CHS 15 + +/* error codes, severe errors are less than 0 */ +#define SL_INVALID_PARM -6 +#define SL_MALLOC_ERROR -5 +#define INTERNAL_ERROR -4 +#define UNKNOWN_ERROR -3 +#define STACK_OVERFLOW -1 +#define STACK_UNDERFLOW -2 +#define INTRINSIC_ERROR 1 +/* Intrinsic error is an error generated by intrinsic functions */ +#define USER_BREAK 2 +#define UNDEFINED_NAME 3 +#define SYNTAX_ERROR 4 +#define DUPLICATE_DEFINITION 5 +#define TYPE_MISMATCH 6 +#define READONLY_ERROR 7 +#define DIVIDE_ERROR 8 +/* object could not be opened */ +#define SL_OBJ_NOPEN 9 +/* unknown object */ +#define SL_OBJ_UNKNOWN 10 + +extern char *SLang_Error_Message; + +extern void SLadd_name(char *, long, unsigned char, unsigned char); +extern void SLadd_at_handler (long *, char *); + +#define SLANG_MAKE_ARGS(out, in) ((unsigned char)(out) | ((unsigned short) (in) << 4)) + +#ifdef SLANG_STATS + +#define MAKE_INTRINSIC(n, f, out, in) \ + {0, n, (out | (in << 4)), SLANG_INTRINSIC, (long) f} + +#define MAKE_VARIABLE(n, v, t, r) \ + {0, n, t, (SLANG_IVARIABLE + r), (long) v} + +#else +#define MAKE_INTRINSIC(n, f, out, in) \ + {n, (out | (in << 4)), SLANG_INTRINSIC, (long) f} + +#define MAKE_VARIABLE(n, v, t, r) \ + {n, t, (SLANG_IVARIABLE + r), (long) v} +#endif + +#define SLANG_END_TABLE MAKE_INTRINSIC("", 0, 0, 0) + + +/*}}}*/ + +/*{{{ Upper/Lowercase Functions */ + +extern void SLang_define_case(int *, int *); +extern void SLang_init_case_tables (void); + +extern unsigned char Chg_UCase_Lut[256]; +extern unsigned char Chg_LCase_Lut[256]; +#define UPPER_CASE(x) (Chg_UCase_Lut[(unsigned char) (x)]) +#define LOWER_CASE(x) (Chg_LCase_Lut[(unsigned char) (x)]) +#define CHANGE_CASE(x) (((x) == Chg_LCase_Lut[(unsigned char) (x)]) ?\ + Chg_UCase_Lut[(unsigned char) (x)] : Chg_LCase_Lut[(unsigned char) (x)]) + + +/*}}}*/ + +/*{{{ Regular Expression Interface */ + +typedef struct +{ + unsigned char *pat; /* regular expression pattern */ + unsigned char *buf; /* buffer for compiled regexp */ + unsigned int buf_len; /* length of buffer */ + int case_sensitive; /* 1 if match is case sensitive */ + int must_match; /* 1 if line must contain substring */ + int must_match_bol; /* true if it must match beginning of line */ + unsigned char must_match_str[16]; /* 15 char null term substring */ + int osearch; /* 1 if ordinary search suffices */ + unsigned int min_length; /* minimum length the match must be */ + int beg_matches[10]; /* offset of start of \( */ + unsigned int end_matches[10]; /* length of nth submatch + * Note that the entire match corresponds + * to \0 + */ + int offset; /* offset to be added to beg_matches */ +} SLRegexp_Type; + +extern unsigned char *SLang_regexp_match(unsigned char *, + unsigned int, + SLRegexp_Type *); +extern int SLang_regexp_compile (SLRegexp_Type *); +extern char *SLregexp_quote_string (char *, char *, unsigned int); + + +/*}}}*/ + +/*{{{ SLang Command Interface */ + +#define SLCMD_MAX_ARGS 10 +struct _SLcmd_Cmd_Type; /* Pre-declaration is needed below */ +typedef struct +{ + struct _SLcmd_Cmd_Type *table; + int argc; + char *string_args[SLCMD_MAX_ARGS]; + int int_args[SLCMD_MAX_ARGS]; + float64 float_args[SLCMD_MAX_ARGS]; + unsigned char arg_type[SLCMD_MAX_ARGS]; +} SLcmd_Cmd_Table_Type; + + +typedef struct _SLcmd_Cmd_Type +{ + int (*cmdfun)(int, SLcmd_Cmd_Table_Type *); + char cmd[32]; + char arg_type[SLCMD_MAX_ARGS]; +} SLcmd_Cmd_Type; + +extern int SLcmd_execute_string (char *, SLcmd_Cmd_Table_Type *); + +/*}}}*/ + +/*{{{ SLang Search Interface */ + +typedef struct +{ + int cs; /* case sensitive */ + unsigned char key[256]; + int ind[256]; + int key_len; + int dir; +} SLsearch_Type; + +extern int SLsearch_init (char *, int, int, SLsearch_Type *); +/* This routine must first be called before any search can take place. + * The second parameter specifies the direction of the search: greater than + * zero for a forwrd search and less than zero for a backward search. The + * third parameter specifies whether the search is case sensitive or not. + * The last parameter is a pointer to a structure that is filled by this + * function and it is this structure that must be passed to SLsearch. + */ + +unsigned char *SLsearch (unsigned char *, unsigned char *, SLsearch_Type *); +/* To use this routine, you must first call 'SLsearch_init'. Then the first + * two parameters p1 and p2 serve to define the region over which the search + * is to take place. The third parameter is the structure that was previously + * initialized by SLsearch_init. + * + * The routine returns a pointer to the match if found otherwise it returns + * NULL. + */ + +/*}}}*/ + +#if 0 +{ +#endif +#ifdef __cplusplus +} +#endif + +#endif /* _DAVIS_SLANG_H_ */ diff -ruN old/mc-4.5.9/slang/slang.h new/mc-4.5.10/slang/slang.h --- old/mc-4.5.9/slang/slang.h Mon Jan 18 17:44:10 1999 +++ new/mc-4.5.10/slang/slang.h Wed Dec 31 19:00:00 1969 @@ -1,1285 +0,0 @@ -#ifndef DAVIS_SLANG_H_ -#define DAVIS_SLANG_H_ -/* -*- mode: C; mode: fold; -*- */ -/* Copyright (c) 1992, 1995 John E. Davis - * All rights reserved. - * - * You may distribute under the terms of either the GNU General Public - * License or the Perl Artistic License. - */ -#define SLANG_VERSION 9938 -/*{{{ System Dependent Macros and Typedefs */ - -#if defined(__WATCOMC__) && !defined(__QNX__) -# ifndef msdos -# define msdos -# endif -# ifndef DOS386 -# define DOS386 -# endif -# ifndef FLOAT_TYPE -# define FLOAT_TYPE -# endif -# ifndef pc_system -# define pc_system -# endif -#endif /* __watcomc__ */ - -#ifdef unix -# ifndef __unix__ -# define __unix__ 1 -# endif -#endif - -#ifndef __GO32__ -# ifdef __unix__ -# define REAL_UNIX_SYSTEM -# endif -#endif - -/* Set of the various defines for pc systems. This includes OS/2 */ -#ifdef __MSDOS__ -# ifndef msdos -# define msdos -# endif -# ifndef pc_system -# define pc_system -# endif -#endif - -#ifdef __GO32__ -# ifndef pc_system -# define pc_system -# endif -# ifdef REAL_UNIX_SYSTEM -# undef REAL_UNIX_SYSTEM -# endif -#endif - -#if defined(__EMX__) && defined(OS2) -# ifndef pc_system -# define pc_system -# endif -# ifndef __os2__ -# define __os2__ -# define NEEDS_LOCAL_DIRENT_H -# endif -#endif - -#ifdef __cplusplus -extern "C" { -#endif -#if 0 -} -#endif -/* ---------------------------- Generic Macros ----------------------------- */ - -/* __SC__ is defined for Symantec C++ - DOS386 is defined for -mx memory model, 32 bit DOS extender. */ - -#ifdef VOID -# undef VOID -#endif - -#if defined(msdos) && !defined(DOS386) & !defined(__WIN32__) && !defined(__GO32__) -# ifdef __SC__ -# include -# endif - typedef void *VOID_STAR; -# define VOID void -# include -#else -# if defined (__cplusplus) || defined(__STDC__) - typedef void *VOID_STAR; -# define VOID void -# else - typedef unsigned char *VOID_STAR; -# define VOID unsigned char -# endif -#endif - -#if 1 - typedef int (*FVOID_STAR)(void); -#else -# define FVOID_STAR VOID_STAR -#endif - -#if defined(msdos) && !defined(DOS386) && !defined(__GO32__) && !defined(__WIN32__) -# define SLFREE(buf) farfree((void far *)(buf)) -# define SLMALLOC(x) farmalloc((unsigned long) (x)) -# define SLREALLOC(buf, n) farrealloc((void far *) (buf), (unsigned long) (n)) -# define SLCALLOC(n, m) farcalloc((unsigned long) (n), (unsigned long) (m)) -#else -# if defined(VMS) && !defined(__DECC) -# define SLFREE VAXC$FREE_OPT -# define SLMALLOC VAXC$MALLOC_OPT -# define SLREALLOC VAXC$REALLOC_OPT -# define SLCALLOC VAXC$CALLOC_OPT -# else -# define SLFREE(x) free((char *)(x)) -# define SLMALLOC malloc -# if defined(__cplusplus) && !defined(__BEOS__) -# define SLREALLOC(p,n) realloc((malloc_t) (p), (n)) -# else -# define SLREALLOC realloc -# endif -# define SLCALLOC calloc -# endif -#endif - -#ifdef SL_MALLOC_DEBUG -# undef SLMALLOC -# undef SLCALLOC -# undef SLREALLOC -# undef SLFREE -# define SLMALLOC(x) SLdebug_malloc((unsigned long) (x)) -# define SLFREE(x) SLdebug_free((unsigned char *)(x)) -# define SLCALLOC(n, m) SLdebug_calloc((unsigned long) (n), (unsigned long)(m)) -# define SLREALLOC(p, x) SLdebug_realloc((unsigned char *)(p), (unsigned long)(x)) -#endif /* SL_MALLOC_DEBUG */ - - extern unsigned char *SLdebug_malloc (unsigned long); - extern unsigned char *SLdebug_calloc (unsigned long, unsigned long); - extern unsigned char *SLdebug_realloc (unsigned char *, unsigned long); - extern void SLdebug_free (unsigned char *); - extern void SLmalloc_dump_statistics (void); - extern char *SLstrcpy(register char *, register char *); - extern int SLstrcmp(register char *, register char *); - extern char *SLstrncpy(char *, register char *, register int); - - extern void SLmemset (char *, char, int); - extern char *SLmemchr (register char *, register char, register int); - extern char *SLmemcpy (char *, char *, int); - extern int SLmemcmp (char *, char *, int); - -#ifdef float64 -# undef float64 -#endif - -#ifndef FLOAT64_TYPEDEFED -# define FLOAT64_TYPEDEFED - typedef double float64; -#endif - - -/*}}}*/ - -/*{{{ Interpreter Typedefs */ - -#define SLANG_MAX_NAME_LEN 30 -/* maximum length of an identifier */ -/* first char in identifiers is the hash */ - - /* Note that long is used for addresses instead of void *. The reason for - * this is that I have a gut feeling that sizeof (long) > sizeof(void *) - * on some machines. This is certainly the case for MSDOS where addresses - * can be 16 bit. - */ -typedef struct SLang_Name_Type - { -#ifdef SLANG_STATS - int n; /* number of times referenced */ -#endif - char name[SLANG_MAX_NAME_LEN + 2]; /* [0] is hash */ - - unsigned char sub_type; - -/* Values for main_type may be as follows. The particlular values are - * for compatability. - */ -#define SLANG_LVARIABLE 0x01 -#define SLANG_INTRINSIC 0x06 -#define SLANG_FUNCTION 0x07 -#define SLANG_GVARIABLE 0x0D -#define SLANG_IVARIABLE 0x0E /* intrinsic variables */ -/* Note!!! For Macro MAKE_VARIABLE below to work, SLANG_IVARIABLE Must - be 1 less than SLANG_RVARIABLE!!! */ -#define SLANG_RVARIABLE 0x0F /* read only variable */ - unsigned char main_type; - long addr; - } -SLang_Name_Type; - - -typedef struct SLang_Load_Type -{ - long name; /* file name, string address, ... */ - long handle; /* FILE *, string address, etc... */ - - char *ptr; /* input pointer to next line in object - * to be read. - */ - /* Things below here are used by S-Lang. */ - int type; /* 'F' = file, 'S' = String, etc.. */ - char *buf; /* buffer for file, etc... */ - char *(*read)(struct SLang_Load_Type *); /* function to call to read obj */ - int n; /* line number, etc... */ - char token[256]; /* token to be parsed */ - int ofs; /* offset from buf where last read - * took place - */ - int top_level; /* 1 if at top level of parsing */ -} SLang_Load_Type; - -#if defined(ultrix) && !defined(__GNUC__) -# ifndef NO_PROTOTYPES -# define NO_PROTOTYPES -# endif -#endif - -#ifndef NO_PROTOTYPES -# define _PROTO(x) x -#else -# define _PROTO(x) () -#endif - -typedef struct SL_OOBinary_Type -{ - unsigned char sub_type; /* partner type for binary op */ - - /* The function take the binary op as first argument, the operand types - * form the second and third parameters and the last two parameters are - * pointers to the objects themselves. It is up to the function to push - * the result on the stack. It must return 1 if it handled the operation - * return zero if the operation is not defined. - */ - int (*binary_function)_PROTO((int, unsigned char, unsigned char, - VOID_STAR, VOID_STAR)); - - struct SL_OOBinary_Type *next; -} -SL_OOBinary_Type; - -typedef struct -{ - /* Methods */ - void (*destroy)_PROTO((VOID_STAR)); - /* called to delete/free the object */ - char *(*string)_PROTO((VOID_STAR)); - /* returns a string representation of the object */ - int (*unary_function)_PROTO((int, unsigned char, VOID_STAR)); - /* unary operation function */ - SL_OOBinary_Type *binary_ops; - - int (*copy_function)_PROTO((unsigned char, VOID_STAR)); - /* This function is called do make a copy of the object */ -} SLang_Class_Type; - -extern SLang_Class_Type *SLang_Registered_Types[256]; - -typedef struct -{ - unsigned char main_type; /* SLANG_RVARIABLE, etc.. */ - unsigned char sub_type; /* int, string, etc... */ - long *obj; /* address of user structure */ - - /* Everything below is considered private */ - unsigned int count; /* number of references */ -} -SLuser_Object_Type; - - -/*}}}*/ -/*{{{ Interpreter Function Prototypes */ - - extern volatile int SLang_Error; - /* Non zero if error occurs. Must be reset to zero to continue. */ - - extern int SLang_Traceback; - /* If non-zero, dump an S-Lang traceback upon error. Available as - _traceback in S-Lang. */ - - extern char *SLang_User_Prompt; - /* Prompt to use when reading from stdin */ - extern int SLang_Version; - - extern void (*SLang_Error_Routine)(char *); - /* Pointer to application dependent error messaging routine. By default, - messages are displayed on stderr. */ - - extern void (*SLang_Exit_Error_Hook)(char *); - extern void SLang_exit_error (char *); - extern void (*SLang_Dump_Routine)(char *); - /* Called if S-Lang traceback is enabled as well as other debugging - routines (e.g., trace). By default, these messages go to stderr. */ - - extern void (*SLang_Interrupt)(void); - /* function to call whenever inner interpreter is entered. This is - a good place to set SLang_Error to USER_BREAK. */ - - extern void (*SLang_User_Clear_Error)(void); - /* function that gets called when '_clear_error' is called. */ - extern int (*SLang_User_Open_Slang_Object)(SLang_Load_Type *); - extern int (*SLang_User_Close_Slang_Object)(SLang_Load_Type *); - /* user defined loading routines. */ - - - /* If non null, these call C functions before and after a slang function. */ - extern void (*SLang_Enter_Function)(char *); - extern void (*SLang_Exit_Function)(char *); - - -/* Functions: */ - - extern int init_SLang(void); - /* This function is mandatory and must be called by all applications */ - extern int init_SLfiles(void); - /* called if fputs, fgets, etc are need in S-Lang */ - extern int init_SLmath(void); - /* called if math functions sin, cos, etc... are needed. */ - - extern int init_SLunix(void); - /* unix system functions chmod, stat, etc... */ - - extern int init_SLmatrix(void); - - extern int SLang_add_table(SLang_Name_Type *, char *); - /* add application dependent function table p1 to S-Lang. A name p2 less - * than 32 characters must also be supplied. - * Returns 0 upon failure or 1 upon success. */ - - extern int SLang_add_global_variable (char *); - extern int SLang_load_object(SLang_Load_Type *); - extern int SLang_load_file(char *); - /* Load a file of S-Lang code for interpreting. If the parameter is - NULL, input comes from stdin. */ - - extern void SLang_restart(int); - /* should be called if an error occurs. If the passed integer is - * non-zero, items are popped off the stack; otherwise, the stack is - * left intact. Any time the stack is believed to be trashed, this routine - * should be called with a non-zero argument (e.g., if setjmp/longjmp is - * called). */ - - extern void SLang_byte_compile_file(char *, int *); - /* takes a file of S-Lang code and ``byte-compiles'' it for faster - * loading. The new filename is equivalent to the old except that a `c' is - * appended to the name. (e.g., init.sl --> init.slc). If the second - * parameter is non-zero, preprocess the file only. - */ - - extern void SLang_autoload(char *, char *); - /* Automatically load S-Lang function p1 from file p2. This function - is also available via S-Lang */ - - extern char *SLang_load_string(char *); - /* Like SLang_load_file except input is from a null terminated string. */ - - extern void SLang_do_pop(void); - /* pops item off stack and frees any memory associated with it */ - - extern int SLang_pop_integer(int *); - /* pops integer *p0 from the stack. Returns 0 upon success and non-zero - * if the stack is empty or a type mismatch occurs, setting SLang_Error. - */ - - extern int SLpop_string (char **); - extern int SLang_pop_string(char **, int *); - /* pops string *p0 from stack. If *p1 is non-zero, the string must be - * freed after its use. DO NOT FREE p0 if *p1 IS ZERO! Returns 0 upon - * success */ - - extern int SLang_pop_float(float64 *, int *, int *); - /* Pops float *p1 from stack. If *p3 is non-zero, *p1 was derived - from the integer *p2. Returns zero upon success. */ - - extern SLuser_Object_Type *SLang_pop_user_object (unsigned char); - extern void SLang_free_user_object (SLuser_Object_Type *); - extern void SLang_free_intrinsic_user_object (SLuser_Object_Type *); - /* This is like SLang_free_user_object but is meant to free those - * that have been declared as intrinsic variables by the application. - * Normally an application would never need to call this. - */ - - extern void SLang_push_user_object (SLuser_Object_Type *); - extern SLuser_Object_Type *SLang_create_user_object (unsigned char); - - extern int SLang_add_unary_op (unsigned char, FVOID_STAR); - extern int SLang_add_binary_op (unsigned char, unsigned char, FVOID_STAR); - extern int SLang_register_class (unsigned char, FVOID_STAR, FVOID_STAR); - extern int SLang_add_copy_operation (unsigned char, FVOID_STAR); - - extern long *SLang_pop_pointer(unsigned char *, unsigned char *, int *); - /* Returns a pointer to object of type *p1,*p2 on top of stack. - If *p3 is non-zero, the Object must be freed after use. */ - - - extern void SLang_push_float(float64); - /* Push Float onto stack */ - - extern void SLang_push_string(char *); - /* Push string p1 onto stack */ - - extern void SLang_push_integer(int); - /* push integer p1 on stack */ - - extern void SLang_push_malloced_string(char *); - /* The normal SLang_push_string mallocs space for the string. This one - does not. DO NOT FREE IT IF YOU USE THIS ROUTINE */ - - extern int SLang_is_defined(char *); - /* Return non-zero is p1 is defined otherwise returns 0. */ - - extern int SLang_run_hooks(char *, char *, char *); - /* calls S-Lang function p1 pushing strings p2 and p3 onto the stack - * first. If either string is NULL, it is not pushed. If p1 is not - * defined, 0 is returned. */ - - extern int SLang_execute_function(char *); - /* Call S-Lang function p1. Returns 0 if the function is not defined - * and 1 if it is. - */ - - extern char *SLang_find_name(char *); - /* Return a pointer to p1 in table if it is defined. Returns NULL - * otherwise. This is useful when one wants to avoid redundant strings. - */ - - extern char *SLang_rpn_interpret(char *); - /* Interpret string as reverse polish notation */ - - extern void SLang_doerror(char *); - /* set SLang_Error and display p1 as error message */ - - extern SLuser_Object_Type *SLang_add_array(char *, long *, - int, int, int, int, - unsigned char, unsigned char); - /* This function has not been tested thoroughly yet. Its purpose is to - * allow a S-Lang procedure to access a C array. For example, suppose that - * you have an array of 100 ints defined as: - * - * int c_array[100]; - * - * By calling something like: - * - * SLang_add_array ("array_name", (long *) c_array, 1, 100, 0, 0, - * 'i', SLANG_IVARIABLE); - * - * the array can be accessed by the name 'array_name'. This function - * returns -1 upon failure. The 3rd argument specifies the dimension - * of the array, the 4th, and 5th arguments specify how many elements - * there are in the x,y, and z directions. The last argument must - * be one of: - * - * SLANG_IVARIABLE: indicates array is writable - * SLANG_RVARIABLE: indicates array is read only - * - * Returns NULL upon failure. - */ - - -extern int SLang_free_array_handle (int); -/* This routine may be called by application to free array handle created by - * the application. Returns 0 upon success, -1 if the handle is invalid and - * -2 if the handle is not associated with a C array. - */ - - extern char *SLang_extract_list_element(char *, int *, int*); - extern void SLexpand_escaped_string (register char *, register char *, - register char *); - -extern SLang_Name_Type *SLang_get_function (char *); -/* The parameter is the name of a user defined S-Lang function. This - * routine returns NULL if the function does not exist or it returns the - * a pointer to it in an internal S-Lang table. This pointer can be used - * by 'SLexecute_function' to call the function directly from C. - */ - -extern void SLexecute_function(SLang_Name_Type *); -/* This function allows an application to call a S-Lang function from within - * the C program. The parameter must be non-NULL and must have been - * previously obtained by a call to 'SLang_get_function'. - */ -extern void SLroll_stack (int *); -/* If argument *p is positive, the top |*p| objects on the stack are rolled - * up. If negative, the stack is rolled down. - */ - -extern void SLmake_lut (unsigned char *, unsigned char *, unsigned char); - - extern int SLang_guess_type (char *); - - -/*}}}*/ - -/*{{{ Misc Functions */ - -extern char *SLmake_string (char *); -extern char *SLmake_nstring (char *, unsigned int); -/* Returns a null terminated string made from the first n characters of the - * string. - */ - -extern char *SLcurrent_time_string (void); - -extern int SLatoi(unsigned char *); - -extern int SLang_extract_token(char **, char *, int); -/* returns 0 upon failure and non-zero upon success. The first parameter - * is a pointer to the input stream which this function will bump along. - * The second parameter is the buffer where the token is placed. The third - * parameter is used internally by the S-Lang library and should be 0 for - * user applications. - */ - -/*}}}*/ - -/*{{{ SLang getkey interface Functions */ - -#ifdef REAL_UNIX_SYSTEM -extern int SLang_TT_Baud_Rate; -extern int SLang_TT_Read_FD; -#endif - -extern int SLang_init_tty (int, int, int); -/* Initializes the tty for single character input. If the first parameter *p1 - * is in the range 0-255, it will be used for the abort character; - * otherwise, (unix only) if it is -1, the abort character will be the one - * used by the terminal. If the second parameter p2 is non-zero, flow - * control is enabled. If the last parmeter p3 is zero, output processing - * is NOT turned on. A value of zero is required for the screen management - * routines. Returns 0 upon success. In addition, if SLang_TT_Baud_Rate == - * 0 when this function is called, SLang will attempt to determine the - * terminals baud rate. As far as the SLang library is concerned, if - * SLang_TT_Baud_Rate is less than or equal to zero, the baud rate is - * effectively infinite. - */ - -extern void SLang_reset_tty (void); -/* Resets tty to what it was prior to a call to SLang_init_tty */ -#ifdef REAL_UNIX_SYSTEM -extern void SLtty_set_suspend_state (int); - /* If non-zero argument, terminal driver will be told to react to the - * suspend character. If 0, it will not. - */ -extern int (*SLang_getkey_intr_hook) (void); -#endif - -#define SLANG_GETKEY_ERROR 0xFFFF -extern unsigned int SLang_getkey (void); -/* reads a single key from the tty. If the read fails, 0xFFFF is returned. */ - -extern void SLang_ungetkey_string (unsigned char *, unsigned int); -extern void SLang_buffer_keystring (unsigned char *, unsigned int); -extern void SLang_ungetkey (unsigned char); -extern void SLang_flush_input (void); -extern int SLang_input_pending (int); -extern int SLang_Abort_Char; -/* The value of the character (0-255) used to trigger SIGINT */ -extern int SLang_Ignore_User_Abort; -/* If non-zero, pressing the abort character will not result in USER_BREAK - * SLang_Error. */ - -extern void SLang_set_abort_signal (void (*)(int)); -/* If SIGINT is generated, the function p1 will be called. If p1 is NULL - * the SLang_default signal handler is called. This sets SLang_Error to - * USER_BREAK. I suspect most users will simply want to pass NULL. - */ - -extern volatile int SLKeyBoard_Quit; - -#ifdef VMS -/* If this function returns -1, ^Y will be added to input buffer. */ -extern int (*SLtty_VMS_Ctrl_Y_Hook) (void); -#endif -/*}}}*/ - -/*{{{ SLang Keymap routines */ - -typedef struct SLKeymap_Function_Type - { - char *name; - int (*f)(void); - } -SLKeymap_Function_Type; - -typedef struct SLang_Key_Type - { - unsigned char str[13]; /* key sequence */ -#define SLKEY_F_INTERPRET 0x01 -#define SLKEY_F_INTRINSIC 0x02 -#define SLKEY_F_KEYSYM 0x03 - unsigned char type; /* type of function */ -#ifdef SLKEYMAP_OBSOLETE - VOID_STAR f; /* function to invoke */ -#else - union - { - char *s; - FVOID_STAR f; - unsigned int keysym; - } - f; -#endif - struct SLang_Key_Type *next; /* */ - } -SLang_Key_Type; - -#define MAX_KEYMAP_NAME_LEN 8 -typedef struct SLKeyMap_List_Type -{ - char name[MAX_KEYMAP_NAME_LEN + 1]; - SLang_Key_Type *keymap; - SLKeymap_Function_Type *functions; /* intrinsic functions */ -} -SLKeyMap_List_Type; - -/* This is arbitrary but I have got to start somewhere */ -#ifdef msdos -#define SLANG_MAX_KEYMAPS 10 -#else -#define SLANG_MAX_KEYMAPS 30 -#endif - -extern SLKeyMap_List_Type SLKeyMap_List[SLANG_MAX_KEYMAPS]; /* these better be inited to 0! */ - - -extern char *SLang_process_keystring(char *); - -#ifdef SLKEYMAP_OBSOLETE -extern int SLang_define_key1(char *, VOID_STAR, unsigned int, SLKeyMap_List_Type *); -/* define key p1 in keymap p4 to invoke function p2. If type p3 is given by - * SLKEY_F_INTRINSIC, p2 is an intrinsic function, else it is a string to be - * passed to the interpreter for evaluation. The return value is important. - * It returns 0 upon success, -1 upon malloc error, and -2 if the key is - * inconsistent. SLang_Error is set upon error. */ -#else -extern int SLkm_define_key (char *, FVOID_STAR, SLKeyMap_List_Type *); -#endif - -extern int SLang_define_key(char *, char *, SLKeyMap_List_Type *); -/* Like define_key1 except that p2 is a string that is to be associated with - * a function in the functions field of p3. This routine calls define_key1. - */ - -extern int SLkm_define_keysym (char *, unsigned int, SLKeyMap_List_Type *); - -extern void SLang_undefine_key(char *, SLKeyMap_List_Type *); - -extern SLKeyMap_List_Type *SLang_create_keymap(char *, SLKeyMap_List_Type *); -/* create and returns a pointer to a new keymap named p1 created by copying - * keymap p2. If p2 is NULL, it is up to the calling routine to initialize - * the keymap. - */ - -extern char *SLang_make_keystring(unsigned char *); - -extern SLang_Key_Type *SLang_do_key(SLKeyMap_List_Type *, int (*)(void)); -/* read a key using keymap p1 with getkey function p2 */ - -extern -#ifdef SLKEYMAP_OBSOLETE - VOID_STAR -#else - FVOID_STAR -#endif - SLang_find_key_function(char *, SLKeyMap_List_Type *); - -extern SLKeyMap_List_Type *SLang_find_keymap(char *); - -extern int SLang_Last_Key_Char; -extern int SLang_Key_TimeOut_Flag; - - -/*}}}*/ - -/*{{{ SLang Readline Interface */ - -typedef struct SLang_Read_Line_Type -{ - struct SLang_Read_Line_Type *prev, *next; - unsigned char *buf; - int buf_len; /* number of chars in the buffer */ - int num; /* num and misc are application specific*/ - int misc; -} SLang_Read_Line_Type; - -/* Maximum size of display */ -#define SLRL_DISPLAY_BUFFER_SIZE 256 - -typedef struct -{ - SLang_Read_Line_Type *root, *tail, *last; - unsigned char *buf; /* edit buffer */ - int buf_len; /* sizeof buffer */ - int point; /* current editing point */ - int tab; /* tab width */ - int len; /* current line size */ - - /* display variables */ - int edit_width; /* length of display field */ - int curs_pos; /* current column */ - int start_column; /* column offset of display */ - int dhscroll; /* amount to use for horiz scroll */ - char *prompt; - - FVOID_STAR last_fun; /* last function executed by rl */ - - /* These two contain an image of what is on the display */ - unsigned char upd_buf1[SLRL_DISPLAY_BUFFER_SIZE]; - unsigned char upd_buf2[SLRL_DISPLAY_BUFFER_SIZE]; - unsigned char *old_upd, *new_upd; /* pointers to previous two buffers */ - int new_upd_len, old_upd_len; /* length of output buffers */ - - SLKeyMap_List_Type *keymap; - - /* tty variables */ - unsigned int flags; /* */ -#define SL_RLINE_NO_ECHO 1 -#define SL_RLINE_USE_ANSI 2 - unsigned int (*getkey)(void); /* getkey function -- required */ - void (*tt_goto_column)(int); - void (*tt_insert)(char); - void (*update_hook)(unsigned char *, int, int); - /* The update hook is called with a pointer to a buffer p1 that contains - * an image of what the update hook is suppoed to produce. The length - * of the buffer is p2 and after the update, the cursor is to be placed - * in column p3. - */ -} SLang_RLine_Info_Type; - -extern int SLang_RL_EOF_Char; - -extern SLang_Read_Line_Type * SLang_rline_save_line (SLang_RLine_Info_Type *); -extern int SLang_init_readline (SLang_RLine_Info_Type *); -extern int SLang_read_line (SLang_RLine_Info_Type *); -extern int SLang_rline_insert (char *); -extern void SLrline_redraw (SLang_RLine_Info_Type *); -extern int SLang_Rline_Quit; - -/*}}}*/ - -/*{{{ Low Level Screen Output Interface */ - -extern unsigned long SLtt_Num_Chars_Output; -extern int SLtt_Baud_Rate; - -typedef unsigned long SLtt_Char_Type; - -#define SLTT_BOLD_MASK 0x01000000 -#define SLTT_BLINK_MASK 0x02000000 -#define SLTT_ULINE_MASK 0x04000000 -#define SLTT_REV_MASK 0x08000000 -#define SLTT_ALTC_MASK 0x10000000 - -extern int SLtt_Screen_Rows; -extern int SLtt_Screen_Cols; -extern int SLtt_Term_Cannot_Insert; -extern int SLtt_Term_Cannot_Scroll; -extern int SLtt_Use_Ansi_Colors; -extern int SLtt_Ignore_Beep; -#if defined(REAL_UNIX_SYSTEM) -extern int SLtt_Force_Keypad_Init; -#endif - -#ifndef __GO32__ -#if defined(VMS) || defined(REAL_UNIX_SYSTEM) -extern int SLtt_Blink_Mode; -extern int SLtt_Use_Blink_For_ACS; -extern int SLtt_Newline_Ok; -extern int SLtt_Has_Alt_Charset; -extern int SLtt_Has_Status_Line; /* if 0, NO. If > 0, YES, IF -1, ?? */ -# ifndef VMS -extern int SLtt_Try_Termcap; -# endif -#endif -#endif - -#ifdef msdos -extern int SLtt_Msdos_Cheap_Video; -#endif - - -extern int SLtt_flush_output (void); -extern void SLtt_set_scroll_region(int, int); -extern void SLtt_reset_scroll_region(void); -extern void SLtt_reverse_video (int); -extern void SLtt_bold_video (void); -extern void SLtt_begin_insert(void); -extern void SLtt_end_insert(void); -extern void SLtt_del_eol(void); -extern void SLtt_goto_rc (int, int); -extern void SLtt_delete_nlines(int); -extern void SLtt_delete_char(void); -extern void SLtt_erase_line(void); -extern void SLtt_normal_video(void); -extern void SLtt_cls(void); -extern void SLtt_beep(void); -extern void SLtt_reverse_index(int); -extern void SLtt_smart_puts(unsigned short *, unsigned short *, int, int); -extern void SLtt_write_string (char *); -extern void SLtt_putchar(char); -extern void SLtt_init_video (void); -extern void SLtt_reset_video (void); -extern void SLtt_get_terminfo(void); -extern void SLtt_get_screen_size (void); -extern int SLtt_set_cursor_visibility (int); - -#if defined(VMS) || defined(REAL_UNIX_SYSTEM) -extern void SLtt_enable_cursor_keys(void); -extern void SLtt_set_term_vtxxx(int *); -extern void SLtt_set_color_esc (int, char *); -extern void SLtt_wide_width(void); -extern void SLtt_narrow_width(void); -extern int SLtt_set_mouse_mode (int, int); -extern void SLtt_set_alt_char_set (int); -extern int SLtt_write_to_status_line (char *, int); -extern void SLtt_disable_status_line (void); -# ifdef REAL_UNIX_SYSTEM - extern char *SLtt_tgetstr (char *); - extern int SLtt_tgetnum (char *); - extern int SLtt_tgetflag (char *); - extern char *SLtt_tigetent (char *); - extern char *SLtt_tigetstr (char *, char **); - extern int SLtt_tigetnum (char *, char **); -# endif -#endif - -extern SLtt_Char_Type SLtt_get_color_object (int); -extern void SLtt_set_color_object (int, SLtt_Char_Type); -extern void SLtt_set_color (int, char *, char *, char *); -extern void SLtt_set_mono (int, char *, SLtt_Char_Type); -extern void SLtt_add_color_attribute (int, SLtt_Char_Type); -extern void SLtt_set_color_fgbg (int, SLtt_Char_Type, SLtt_Char_Type); - -/*}}}*/ - -/*{{{ SLang Preprocessor Interface */ - -typedef struct -{ - int this_level; - int exec_level; - int prev_exec_level; - char preprocess_char; - char comment_char; - unsigned char flags; -#define SLPREP_BLANK_LINES_OK 1 -#define SLPREP_COMMENT_LINES_OK 2 -} -SLPreprocess_Type; - -extern int SLprep_open_prep (SLPreprocess_Type *); -extern void SLprep_close_prep (SLPreprocess_Type *); -extern int SLprep_line_ok (char *, SLPreprocess_Type *); - extern int SLdefine_for_ifdef (char *); - /* Adds a string to the SLang #ifdef preparsing defines. SLang already - defines MSDOS, UNIX, and VMS on the appropriate system. */ -extern int (*SLprep_exists_hook) (char *, char); - - -/*}}}*/ - -/*{{{ SLsmg Screen Management Functions */ - -#include -extern void SLsmg_fill_region (int, int, int, int, unsigned char); -#ifndef pc_system -extern void SLsmg_set_char_set (int); -extern int SLsmg_Scroll_Hash_Border; -#endif -extern void SLsmg_suspend_smg (void); -extern void SLsmg_resume_smg (void); -extern void SLsmg_erase_eol (void); -extern void SLsmg_gotorc (int, int); -extern void SLsmg_erase_eos (void); -extern void SLsmg_reverse_video (void); -extern void SLsmg_set_color (int); -extern void SLsmg_normal_video (void); -extern void SLsmg_printf (char *, ...); -extern void SLsmg_vprintf (char *, va_list); -extern void SLsmg_write_string (char *); -extern void SLsmg_write_nstring (char *, int); -extern void SLsmg_write_char (char); -extern void SLsmg_write_nchars (char *, int); -extern void SLsmg_write_wrapped_string (char *, int, int, int, int, int); -extern void SLsmg_cls (void); -extern void SLsmg_refresh (void); -extern void SLsmg_touch_lines (int, int); -extern int SLsmg_init_smg (void); -extern void SLsmg_reset_smg (void); -extern unsigned short SLsmg_char_at(void); -extern void SLsmg_set_screen_start (int *, int *); -extern void SLsmg_draw_hline (int); -extern void SLsmg_draw_vline (int); -extern void SLsmg_draw_object (int, int, unsigned char); -extern void SLsmg_draw_box (int, int, int, int); -extern int SLsmg_get_column(void); -extern int SLsmg_get_row(void); -extern void SLsmg_forward (int); -extern void SLsmg_write_color_chars (unsigned short *, unsigned int); -extern unsigned int SLsmg_read_raw (unsigned short *, unsigned int); -extern unsigned int SLsmg_write_raw (unsigned short *, unsigned int); - -extern int SLsmg_Display_Eight_Bit; -extern int SLsmg_Tab_Width; -extern int SLsmg_Newline_Moves; -extern int SLsmg_Backspace_Moves; - -#ifdef pc_system -# define SLSMG_HLINE_CHAR 0xC4 -# define SLSMG_VLINE_CHAR 0xB3 -# define SLSMG_ULCORN_CHAR 0xDA -# define SLSMG_URCORN_CHAR 0xBF -# define SLSMG_LLCORN_CHAR 0xC0 -# define SLSMG_LRCORN_CHAR 0xD9 -# define SLSMG_RTEE_CHAR 0xB4 -# define SLSMG_LTEE_CHAR 0xC3 -# define SLSMG_UTEE_CHAR 0xC2 -# define SLSMG_DTEE_CHAR 0xC1 -# define SLSMG_PLUS_CHAR 0xC5 -/* There are several to choose from: 0xB0, 0xB1, and 0xB2 */ -# define SLSMG_CKBRD_CHAR 0xB0 -#else -# define SLSMG_HLINE_CHAR 'q' -# define SLSMG_VLINE_CHAR 'x' -# define SLSMG_ULCORN_CHAR 'l' -# define SLSMG_URCORN_CHAR 'k' -# define SLSMG_LLCORN_CHAR 'm' -# define SLSMG_LRCORN_CHAR 'j' -# define SLSMG_CKBRD_CHAR 'a' -# define SLSMG_RTEE_CHAR 'u' -# define SLSMG_LTEE_CHAR 't' -# define SLSMG_UTEE_CHAR 'w' -# define SLSMG_DTEE_CHAR 'v' -# define SLSMG_PLUS_CHAR 'n' -#endif - -#ifndef pc_system -# define SLSMG_COLOR_BLACK 0x000000 -# define SLSMG_COLOR_RED 0x000001 -# define SLSMG_COLOR_GREEN 0x000002 -# define SLSMG_COLOR_BROWN 0x000003 -# define SLSMG_COLOR_BLUE 0x000004 -# define SLSMG_COLOR_MAGENTA 0x000005 -# define SLSMG_COLOR_CYAN 0x000006 -# define SLSMG_COLOR_LGRAY 0x000007 -# define SLSMG_COLOR_GRAY 0x000008 -# define SLSMG_COLOR_BRIGHT_RED 0x000009 -# define SLSMG_COLOR_BRIGHT_GREEN 0x00000A -# define SLSMG_COLOR_BRIGHT_BROWN 0x00000B -# define SLSMG_COLOR_BRIGHT_BLUE 0x00000C -# define SLSMG_COLOR_BRIGHT_CYAN 0x00000D -# define SLSMG_COLOR_BRIGHT_MAGENTA 0x00000E -# define SLSMG_COLOR_BRIGHT_WHITE 0x00000F -#endif - -/*}}}*/ - -/*{{{ SLang Keypad Interface */ - -#define SL_KEY_ERR 0xFFFF - -#define SL_KEY_UP 0x101 -#define SL_KEY_DOWN 0x102 -#define SL_KEY_LEFT 0x103 -#define SL_KEY_RIGHT 0x104 -#define SL_KEY_PPAGE 0x105 -#define SL_KEY_NPAGE 0x106 -#define SL_KEY_HOME 0x107 -#define SL_KEY_END 0x108 -#define SL_KEY_A1 0x109 -#define SL_KEY_A3 0x10A -#define SL_KEY_B2 0x10B -#define SL_KEY_C1 0x10C -#define SL_KEY_C3 0x10D -#define SL_KEY_REDO 0x10E -#define SL_KEY_UNDO 0x10F -#define SL_KEY_BACKSPACE 0x110 -#define SL_KEY_ENTER 0x111 -#define SL_KEY_IC 0x112 -#define SL_KEY_DELETE 0x113 - -#define SL_KEY_F0 0x200 -#define SL_KEY_F(X) (SL_KEY_F0 + X) - -/* I do not intend to use keysymps > 0x1000. Applications can use those. */ -/* Returns 0 upon success or -1 upon error. */ -int SLkp_define_keysym (char *, unsigned int); - -/* This function must be called AFTER SLtt_get_terminfo and not before. */ -extern int SLkp_init (void); - -/* This function uses SLang_getkey and assumes that what ever initialization - * is required for SLang_getkey has been performed. - */ -extern int SLkp_getkey (void); - -/*}}}*/ - -/*{{{ SLang Scroll Interface */ - -typedef struct _SLscroll_Type -{ - struct _SLscroll_Type *next; - struct _SLscroll_Type *prev; - unsigned int flags; -} -SLscroll_Type; - -typedef struct -{ - unsigned int flags; - SLscroll_Type *top_window_line; /* list element at top of window */ - SLscroll_Type *bot_window_line; /* list element at bottom of window */ - SLscroll_Type *current_line; /* current list element */ - SLscroll_Type *lines; /* first list element */ - unsigned int nrows; /* number of rows in window */ - unsigned int hidden_mask; /* applied to flags in SLscroll_Type */ - unsigned int line_num; /* current line number (visible) */ - unsigned int num_lines; /* total number of lines (visible) */ - unsigned int window_row; /* row of current_line in window */ - unsigned int border; /* number of rows that form scroll border */ - int cannot_scroll; /* should window scroll or recenter */ -} -SLscroll_Window_Type; - -extern int SLscroll_find_top (SLscroll_Window_Type *); -extern int SLscroll_find_line_num (SLscroll_Window_Type *); -extern unsigned int SLscroll_next_n (SLscroll_Window_Type *, unsigned int); -extern unsigned int SLscroll_prev_n (SLscroll_Window_Type *, unsigned int); -extern int SLscroll_pageup (SLscroll_Window_Type *); -extern int SLscroll_pagedown (SLscroll_Window_Type *); - -/*}}}*/ - -/*{{{ Signal Routines */ - -typedef void SLSig_Fun_Type (int); -extern SLSig_Fun_Type *SLsignal (int, SLSig_Fun_Type *); -extern SLSig_Fun_Type *SLsignal_intr (int, SLSig_Fun_Type *); -#ifndef pc_system -extern int SLsig_block_signals (void); -extern int SLsig_unblock_signals (void); -#endif -/*}}}*/ - -/*{{{ Interpreter Macro Definitions */ - -/* This value is a main_type just like the other main_types defined - * near the definition of SLang_Name_Type. Applications should avoid using - * this so if you do not understands its role, do not use it. - */ -#define SLANG_DATA 0x30 /* real objects which may be destroyed */ - -/* Subtypes */ - -/* The definitions here are for objects that may be on the run-time stack. - * They are actually sub_types of literal and data main_types. - */ -#define VOID_TYPE 1 -#define INT_TYPE 2 -#ifdef FLOAT_TYPE -# undef FLOAT_TYPE -# define FLOAT_TYPE 3 -#endif -#define CHAR_TYPE 4 -#define INTP_TYPE 5 -/* An object of INTP_TYPE should never really occur on the stack. Rather, - * the integer to which it refers will be there instead. It is defined here - * because it is a valid type for MAKE_VARIABLE. - */ - -#define SLANG_OBJ_TYPE 6 -/* SLANG_OBJ_TYPE refers to an object on the stack that is a pointer to - * some other object. - */ - -#if 0 -/* This is not ready yet. */ -# define SLANG_NOOP 9 -#endif - -/* Everything above string should correspond to a pointer in the object - * structure. See do_binary (slang.c) for exploitation of this fact. - */ -#define STRING_TYPE 10 -/* Array type MUST be the smallest number for SLuser_Object_Type structs */ -#define ARRAY_TYPE 20 -/* I am reserving values greater than or equal to user applications. The - * first 99 are used for S-Lang. - */ - - -/* Binary and Unary Subtypes */ -/* Since the application can define new types and can overload the binary - * and unary operators, these definitions must be present in this file. - */ -#define SLANG_PLUS 1 -#define SLANG_MINUS 2 -#define SLANG_TIMES 3 -#define SLANG_DIVIDE 4 -#define SLANG_EQ 5 -#define SLANG_NE 6 -#define SLANG_GT 7 -#define SLANG_GE 8 -#define SLANG_LT 9 -#define SLANG_LE 10 - -/* UNARY subtypes (may be overloaded) */ -#define SLANG_ABS 11 -#define SLANG_SIGN 12 -#define SLANG_SQR 13 -#define SLANG_MUL2 14 -#define SLANG_CHS 15 - -/* error codes, severe errors are less than 0 */ -#define SL_INVALID_PARM -6 -#define SL_MALLOC_ERROR -5 -#define INTERNAL_ERROR -4 -#define UNKNOWN_ERROR -3 -#define STACK_OVERFLOW -1 -#define STACK_UNDERFLOW -2 -#define INTRINSIC_ERROR 1 -/* Intrinsic error is an error generated by intrinsic functions */ -#define USER_BREAK 2 -#define UNDEFINED_NAME 3 -#define SYNTAX_ERROR 4 -#define DUPLICATE_DEFINITION 5 -#define TYPE_MISMATCH 6 -#define READONLY_ERROR 7 -#define DIVIDE_ERROR 8 -/* object could not be opened */ -#define SL_OBJ_NOPEN 9 -/* unknown object */ -#define SL_OBJ_UNKNOWN 10 - -extern char *SLang_Error_Message; - -extern void SLadd_name(char *, long, unsigned char, unsigned char); -extern void SLadd_at_handler (long *, char *); - -#define SLANG_MAKE_ARGS(out, in) ((unsigned char)(out) | ((unsigned short) (in) << 4)) - -#ifdef SLANG_STATS - -#define MAKE_INTRINSIC(n, f, out, in) \ - {0, n, (out | (in << 4)), SLANG_INTRINSIC, (long) f} - -#define MAKE_VARIABLE(n, v, t, r) \ - {0, n, t, (SLANG_IVARIABLE + r), (long) v} - -#else -#define MAKE_INTRINSIC(n, f, out, in) \ - {n, (out | (in << 4)), SLANG_INTRINSIC, (long) f} - -#define MAKE_VARIABLE(n, v, t, r) \ - {n, t, (SLANG_IVARIABLE + r), (long) v} -#endif - -#define SLANG_END_TABLE MAKE_INTRINSIC("", 0, 0, 0) - - -/*}}}*/ - -/*{{{ Upper/Lowercase Functions */ - -extern void SLang_define_case(int *, int *); -extern void SLang_init_case_tables (void); - -extern unsigned char Chg_UCase_Lut[256]; -extern unsigned char Chg_LCase_Lut[256]; -#define UPPER_CASE(x) (Chg_UCase_Lut[(unsigned char) (x)]) -#define LOWER_CASE(x) (Chg_LCase_Lut[(unsigned char) (x)]) -#define CHANGE_CASE(x) (((x) == Chg_LCase_Lut[(unsigned char) (x)]) ?\ - Chg_UCase_Lut[(unsigned char) (x)] : Chg_LCase_Lut[(unsigned char) (x)]) - - -/*}}}*/ - -/*{{{ Regular Expression Interface */ - -typedef struct -{ - unsigned char *pat; /* regular expression pattern */ - unsigned char *buf; /* buffer for compiled regexp */ - unsigned int buf_len; /* length of buffer */ - int case_sensitive; /* 1 if match is case sensitive */ - int must_match; /* 1 if line must contain substring */ - int must_match_bol; /* true if it must match beginning of line */ - unsigned char must_match_str[16]; /* 15 char null term substring */ - int osearch; /* 1 if ordinary search suffices */ - unsigned int min_length; /* minimum length the match must be */ - int beg_matches[10]; /* offset of start of \( */ - unsigned int end_matches[10]; /* length of nth submatch - * Note that the entire match corresponds - * to \0 - */ - int offset; /* offset to be added to beg_matches */ -} SLRegexp_Type; - -extern unsigned char *SLang_regexp_match(unsigned char *, - unsigned int, - SLRegexp_Type *); -extern int SLang_regexp_compile (SLRegexp_Type *); -extern char *SLregexp_quote_string (char *, char *, unsigned int); - - -/*}}}*/ - -/*{{{ SLang Command Interface */ - -#define SLCMD_MAX_ARGS 10 -struct _SLcmd_Cmd_Type; /* Pre-declaration is needed below */ -typedef struct -{ - struct _SLcmd_Cmd_Type *table; - int argc; - char *string_args[SLCMD_MAX_ARGS]; - int int_args[SLCMD_MAX_ARGS]; - float64 float_args[SLCMD_MAX_ARGS]; - unsigned char arg_type[SLCMD_MAX_ARGS]; -} SLcmd_Cmd_Table_Type; - - -typedef struct _SLcmd_Cmd_Type -{ - int (*cmdfun)(int, SLcmd_Cmd_Table_Type *); - char cmd[32]; - char arg_type[SLCMD_MAX_ARGS]; -} SLcmd_Cmd_Type; - -extern int SLcmd_execute_string (char *, SLcmd_Cmd_Table_Type *); - -/*}}}*/ - -/*{{{ SLang Search Interface */ - -typedef struct -{ - int cs; /* case sensitive */ - unsigned char key[256]; - int ind[256]; - int key_len; - int dir; -} SLsearch_Type; - -extern int SLsearch_init (char *, int, int, SLsearch_Type *); -/* This routine must first be called before any search can take place. - * The second parameter specifies the direction of the search: greater than - * zero for a forwrd search and less than zero for a backward search. The - * third parameter specifies whether the search is case sensitive or not. - * The last parameter is a pointer to a structure that is filled by this - * function and it is this structure that must be passed to SLsearch. - */ - -unsigned char *SLsearch (unsigned char *, unsigned char *, SLsearch_Type *); -/* To use this routine, you must first call 'SLsearch_init'. Then the first - * two parameters p1 and p2 serve to define the region over which the search - * is to take place. The third parameter is the structure that was previously - * initialized by SLsearch_init. - * - * The routine returns a pointer to the match if found otherwise it returns - * NULL. - */ - -/*}}}*/ - -#if 0 -{ -#endif -#ifdef __cplusplus -} -#endif - -#endif /* _DAVIS_SLANG_H_ */ diff -ruN old/mc-4.5.9/src/ChangeLog new/mc-4.5.10/src/ChangeLog --- old/mc-4.5.9/src/ChangeLog Mon Jan 18 17:44:11 1999 +++ new/mc-4.5.10/src/ChangeLog Sun Jan 31 18:55:19 1999 @@ -1,3 +1,123 @@ +Mon Feb 1 00:43:15 1999 Timur Bakeyev + + * screen.c (to_buffer): Code of the function rewritten, as a side + effect added J_CENTER (who needs this?). Also, justification flags + got twins with _FIT suffix, which tries to fit name in the field with- + out truncation (uses name_trunc()). This unifies behaviour of CList + variants and text-bases widgets. + + * screen.c: Remove HAVE_GNOME wrappers around string_file_[name|owner| + group]() - not necessary, to_buffer() doing this work. + +Sun Jan 31 19:49:00 1999 Norbert Warmuth + + * hotlist.c (add_new_entry_input, add_new_group_input): Make the + quick_widget arrays static and various changes needed because they + are now static. add_widgets_i18n recalculates button positions + which get lost when the quick_widget arrays are non static. + + * screen.c (to_buffer): nul terminate string when using strncpy + + * setup.c: Save and restore new option ftpfs_first_cd_then_ls. + +1999-01-31 Federico Mena Quintero + + * file.c (panel_operate_generate_prompt): Removed the cmd_buf + argument, since it is a global variable anyway (this function is + only called once from file.c, and the global cmd_buf was being + passed in). + (panel_operate): Do not pass cmd_buf to + panel_operate_generate_prompt(). + Thanks to Alexander Savelyev for noticing this. + +1999-01-30 Miguel de Icaza + + * achown.c (XTRACT): Add missing call to _(). + +1999-01-26 Federico Mena Quintero + + * panel.h: Fixup #includes. + +1999-01-26 Miguel de Icaza + + * cons.saver.c: Removed glib from the suid app + +Wed Jan 27 03:17:44 1999 Timur Bakeyev + + * Converted memory managment to Glib. Now we use g_new()/g_malloc()/ + g_strdup()/g_free() routings. Also, copy_strings() replaced by + g_strconcat(), strcasecmp() -> g_strcasecmp(),and sprintf() by + g_snprintf(). + + * Some sequences of malloc()/sprintf() changed to g_strdup_printf(). + + * mad.[ch]: Modified, to work with new GLib's memory managment. Fixed + a missing #undef for tempnam, which caused dead loop. Add several new + functions to emulate GLib memory managment. + + *main.c, mad.[ch]: Add a new switch "-M", which allows to redirect MAD + messages to the file. + + * util.[ch], utilunix.c: Modified, deleted our variants of strcasecmp() + and strdup() - we have g_ equivalences. Remove get_full_name() - it is + similar to concat_dir_and_file(). Some other tricks with g_* functions. + + * global.h: Modified, extended. Now it is main memory mangment include - + i.e. all inclusions of , , , "fs.h", "mem.h", + "util.h" and "mad.h" done there. This elimanates problem with proper or- + der of #include's. + + * All around the source - changed order of #include's, most of them gone + to global.h (see above), minor changes, like "0" -> NULL in string func- + tions. + +1999-01-25 Alexander Savelyev + + * ext.c (exec_extension): Always use /bin/sh. Not the user + shell. + +1999-01-23 Miguel de Icaza + + * treestore.c (tree_store_remove_entry_remove_hook): Missing + function. To remove a notification hook. + (tree_store_notify_add, tree_store_add_entry_add_hook, + tree_store_remove_entry_add_hook): New functions to notify of + additions to the treestore. + + * tree.c (tree_destroy): Remove the callback hook when we go + away. + +1999-01-21 Miguel de Icaza + + * option.c (init_configure): One line patch from Alexander + Savelyev to transalate all strings. + +1999-01-18 Pavel Machek + + * file.c: Killed operation_names: they seemed same to op_names to + me, and compilation failed on them (initializer element is not a + constant). Maybe miguel tagged too many strings for localization? + :-). + + * ext.c: we use /tmp in "creative" way: creating there file and + then executing it. I do not see how it is needed. Marked with FIXME. + +Thu Jan 21 01:11:24 1999 Timur Bakeyev + + * mad.[ch], util.[ch]: commit changes, that allow coexist (temporary) + GLib'ed VFS and not still converted MC itself. + +1999-01-20 Federico Mena Quintero + + * treestore.c (tree_store_start_check): Use mc_stat(), not stat(). + (tree_store_rescan): Use mc_lstat(), not lstat(). + +Tue Jan 19 05:28:04 1999 Timur Bakeyev + + * ext.c, filenot.c, main.c, screen.c, treestore.c: add missed #include's + and moved glib.h so, it follows "fs.h", but preceed "util.h" and "mad.h". + There were conflicts during compilation with MAD and GLibed vfs. + Mon Jan 18 21:23:29 1999 Paul Sheer * cmd.c: update_panels (UP_OPTIMIZE, UP_KEEPSEL); instead diff -ruN old/mc-4.5.9/src/Makefile.in new/mc-4.5.10/src/Makefile.in --- old/mc-4.5.9/src/Makefile.in Mon Jan 18 17:44:11 1999 +++ new/mc-4.5.10/src/Makefile.in Sun Jan 31 18:55:19 1999 @@ -32,7 +32,7 @@ help.h profile.h dlg.h option.h tree.h info.h \ widget.h chmod.h cons.saver.h mad.h wtools.h chown.h \ subshell.h view.h setup.h key.h ext.h boxes.h \ - hotlist.h layout.h fsusage.h mountlist.h regex.h complete.h \ + hotlist.h layout.h fsusage.h mountlist.h eregex.h complete.h \ myslang.h command.h cmd.h tty.h fs.h panelize.h achown.h \ learn.h listmode.h features.inc background.h \ x.h textconf.h i18n.h findme.h popt.h filegui.h keys.h xtty.h \ diff -ruN old/mc-4.5.9/src/achown.c new/mc-4.5.10/src/achown.c --- old/mc-4.5.9/src/achown.c Mon Jan 18 17:44:10 1999 +++ new/mc-4.5.10/src/achown.c Sun Jan 31 18:55:18 1999 @@ -28,11 +28,9 @@ #endif #include #include -#include /* For malloc() */ #include /* For errno on SunOS systems */ -#include "mad.h" #include "tty.h" -#include "util.h" /* Needed for the externs */ +#include "global.h" #include "win.h" #include "color.h" #include "dlg.h" @@ -562,7 +560,7 @@ { int i; - sf_stat = (struct stat *) malloc (sizeof (struct stat)); + sf_stat = g_new (struct stat, 1); do_refresh (); end_chown = need_update = current_file = 0; single_set = (cpanel->marked < 2) ? 2 : 0; @@ -574,7 +572,7 @@ "[Chown-advanced]", "achown", DLG_CENTER); #define XTRACT(i) BY+chown_advanced_but[i].y, BX+chown_advanced_but[i].x, \ - chown_advanced_but[i].ret_cmd, chown_advanced_but[i].flags, chown_advanced_but[i].text, \ + chown_advanced_but[i].ret_cmd, chown_advanced_but[i].flags, _(chown_advanced_but[i].text), \ 0, 0, NULL for (i = 0; i < BUTTONS - 5; i++) @@ -597,7 +595,7 @@ static void chown_advanced_done (void) { - free (sf_stat); + g_free (sf_stat); if (need_update) update_panels (UP_OPTIMIZE, UP_KEEPSEL); repaint_screen (); diff -ruN old/mc-4.5.9/src/background.c new/mc-4.5.10/src/background.c --- old/mc-4.5.9/src/background.c Mon Jan 18 17:44:11 1999 +++ new/mc-4.5.10/src/background.c Sun Jan 31 18:55:18 1999 @@ -33,11 +33,11 @@ #endif #include #include -#include #include #include #include #include "tty.h" +#include "global.h" #include "dlg.h" #include "widget.h" #include "wtools.h" @@ -49,12 +49,10 @@ #ifdef USE_NETCODE # include #endif -#include "util.h" #include "dialog.h" #include "fileopctx.h" -#include "mad.h" #include "key.h" /* For add_select_channel(), delete_select_channel() */ -#include "regex.h" +#include "eregex.h" #include "file.h" #include "filegui.h" @@ -84,7 +82,7 @@ { TaskList *new; - new = xmalloc (sizeof (TaskList), "note_task_running"); + new = g_new (TaskList, 1); new->pid = pid; new->info = info; new->state = Task_Running; @@ -107,8 +105,8 @@ prev->next = p->next; else task_list = p->next; - free (p->info); - free (p); + g_free (p->info); + g_free (p); break; } prev = p; @@ -177,7 +175,7 @@ static char * background_title (char *str) { - char *result = copy_strings (_("Background process:"), str, NULL); + char *result = g_strconcat (_("Background process:"), str, NULL); return result; } @@ -196,7 +194,7 @@ message (*flags, title, str1); if (title != full_title) - free (full_title); + g_free (full_title); } static void @@ -212,7 +210,7 @@ message (*flags, title, str1, str2); if (title != full_title) - free (full_title); + g_free (full_title); } static void @@ -228,7 +226,7 @@ message (*flags, title, str1, str2, str3); if (title != full_title) - free (full_title); + g_free (full_title); } /* }}} */ @@ -320,7 +318,7 @@ int size; read (fd, &size, sizeof (size)); - data [i] = xmalloc (size+1, "RPC Arguments"); + data [i] = g_malloc (size+1); read (fd, data [i], size); data [i][size] = 0; /* NULL terminate the blocks (they could be strings) */ @@ -398,7 +396,7 @@ write (fd, &len, sizeof (len)); if (len){ write (fd, resstr, len); - free (resstr); + g_free (resstr); } } else { len = 0; @@ -406,7 +404,7 @@ } } for (i = 0; i < argc; i++) - free (data [i]); + g_free (data [i]); do_refresh (); mc_refresh (); @@ -486,7 +484,7 @@ read (parent_fd, &i, sizeof (int)); if (!i) return NULL; - str = xmalloc (i + 1, "parent_return"); + str = g_malloc (i + 1); read (parent_fd, str, i); str [i] = 0; return str; @@ -579,12 +577,9 @@ void message_1s1d (int flags, char *title, char *str, int d) { - char *p; - - p = xmalloc (strlen (str) + 30, "1s1d"); - sprintf (p, str, d); + char *p = g_strdup_printf (str, d); message_1s (flags, title, p); - free (p); + g_free (p); } /* }}} */ diff -ruN old/mc-4.5.9/src/boxes.c new/mc-4.5.10/src/boxes.c --- old/mc-4.5.9/src/boxes.c Mon Jan 18 17:44:10 1999 +++ new/mc-4.5.10/src/boxes.c Sun Jan 31 18:55:18 1999 @@ -23,16 +23,12 @@ #include "tty.h" #include #include -#include #include #include #include -#include #include #include #include "global.h" -#include "mad.h" /* The great mad */ -#include "util.h" /* Required by panel.h */ #include "win.h" /* Our window tools */ #include "color.h" /* Color definitions */ #include "dlg.h" /* The nice dialog manager */ @@ -227,19 +223,19 @@ if (!panel) { p = get_nth_panel_name (num); - panel = (WPanel *) xmalloc (sizeof (WPanel), "temporary panel"); + panel = g_new (WPanel, 1); panel->list_type = list_full; - panel->user_format = strdup (DEFAULT_USER_FORMAT); + panel->user_format = g_strdup (DEFAULT_USER_FORMAT); panel->user_mini_status = 0; for (i = 0; i < LIST_TYPES; i++) - panel->user_status_format[i] = strdup (DEFAULT_USER_FORMAT); - section = copy_strings ("Temporal:", p, 0); + panel->user_status_format[i] = g_strdup (DEFAULT_USER_FORMAT); + section = g_strconcat ("Temporal:", p, NULL); if (!profile_has_section (section, profile_name)) { - free (section); - section = strdup (p); + g_free (section); + section = g_strdup (p); } panel_load_setup (panel, section); - free (section); + g_free (section); } current_mode = panel->list_type; @@ -251,16 +247,16 @@ result = -1; if (section) { - free (panel->user_format); + g_free (panel->user_format); for (i = 0; i < LIST_TYPES; i++) - free (panel->user_status_format [i]); - free (panel); + g_free (panel->user_status_format [i]); + g_free (panel); } if (dd->ret_value != B_CANCEL){ result = my_radio->sel; - *userp = strdup (user->buffer); - *minip = strdup (status->buffer); + *userp = g_strdup (user->buffer); + *minip = g_strdup (status->buffer); *use_msformat = check_status->state & C_BOOL; } destroy_dlg (dd); @@ -595,7 +591,7 @@ run_dlg (dlg); if (dlg->ret_value == B_ENTER) - val = strdup (mytree->selected_ptr->name); + val = g_strdup (mytree->selected_ptr->name); else val = 0; @@ -686,16 +682,16 @@ void configure_vfs (void) { - char buffer2[15]; + char buffer2[BUF_TINY]; #if defined(USE_NETCODE) - char buffer3[15]; + char buffer3[BUF_TINY]; #endif - sprintf (buffer2, "%i", vfs_timeout); + g_snprintf (buffer2, sizeof (buffer2), "%i", vfs_timeout); confvfs_widgets [3 + VFS_WIDGETBASE].text = buffer2; #if defined(USE_NETCODE) ret_use_netrc = use_netrc; - sprintf(buffer3, "%i", ftpfs_directory_timeout); + g_snprintf(buffer3, sizeof (buffer3), "%i", ftpfs_directory_timeout); confvfs_widgets[5].text = buffer3; confvfs_widgets[7].text = ftpfs_anonymous_passwd; confvfs_widgets[2].text = ftpfs_proxy_host ? ftpfs_proxy_host : ""; @@ -703,18 +699,18 @@ if (quick_dialog (&confvfs_dlg) != B_CANCEL) { vfs_timeout = atoi (ret_timeout); - free (ret_timeout); + g_free (ret_timeout); if (vfs_timeout < 0 || vfs_timeout > 10000) vfs_timeout = 10; #if defined(USE_NETCODE) - free(ftpfs_anonymous_passwd); + g_free (ftpfs_anonymous_passwd); ftpfs_anonymous_passwd = ret_passwd; if (ftpfs_proxy_host) - free(ftpfs_proxy_host); + g_free (ftpfs_proxy_host); ftpfs_proxy_host = ret_ftp_proxy; ftpfs_directory_timeout = atoi(ret_directory_timeout); use_netrc = ret_use_netrc; - free(ret_directory_timeout); + g_free (ret_directory_timeout); #endif } } @@ -797,7 +793,7 @@ Quick_input.xlen = 64; Quick_input.ylen = 8; - Quick_input.title = "Symbolic link"; + Quick_input.title = _("Symbolic link"); Quick_input.help = "[File Menu]"; Quick_input.class = "quick_symlink"; Quick_input.i18n = 0; @@ -840,9 +836,9 @@ while (tl){ char *s; - s = copy_strings (state_str [tl->state], " ", tl->info, NULL); + s = g_strconcat (state_str [tl->state], " ", tl->info, NULL); listbox_add_item (bg_list, LISTBOX_APPEND_AT_END, 0, s, (void *) tl); - free (s); + g_free (s); tl = tl->next; } } diff -ruN old/mc-4.5.9/src/chmod.c new/mc-4.5.10/src/chmod.c --- old/mc-4.5.9/src/chmod.c Mon Jan 18 17:44:10 1999 +++ new/mc-4.5.10/src/chmod.c Sun Jan 31 18:55:18 1999 @@ -30,8 +30,7 @@ # include #endif #include "tty.h" -#include "mad.h" -#include "util.h" +#include "global.h" #include "win.h" #include "color.h" #include "dlg.h" @@ -179,13 +178,13 @@ static int chmod_callback (Dlg_head *h, int Par, int Msg) { - char buffer [10]; + char buffer [BUF_TINY]; switch (Msg) { case DLG_ACTION: if (Par >= BUTTONS - single_set * 2){ c_stat ^= check_perm[Par - BUTTONS + single_set * 2].mode; - sprintf (buffer, "%o", c_stat); + g_snprintf (buffer, sizeof (buffer), "%o", c_stat); label_set_text (statl, buffer); chmod_toggle_select (); mode_change = 1; @@ -308,7 +307,7 @@ void chmod_cmd (void) { - char buffer [10]; + char buffer [BUF_TINY]; char *fname; int i; struct stat sf_stat; @@ -357,7 +356,7 @@ add_widget (ch_dlg, label_new (FY+6, FX+2, c_fown, NULL)); c_fgrp = name_trunc (get_group (sf_stat.st_gid), 21); add_widget (ch_dlg, label_new (FY+8, FX+2, c_fgrp, NULL)); - sprintf (buffer, "%o", c_stat); + g_snprintf (buffer, sizeof (buffer), "%o", c_stat); statl = label_new (FY+4, FX+2, buffer, NULL); add_widget (ch_dlg, statl); diff -ruN old/mc-4.5.9/src/chown.c new/mc-4.5.10/src/chown.c --- old/mc-4.5.9/src/chown.c Mon Jan 18 17:44:10 1999 +++ new/mc-4.5.10/src/chown.c Sun Jan 31 18:55:18 1999 @@ -19,7 +19,6 @@ #include #include #include -#include /* For malloc() */ #include /* For errno on SunOS systems */ #include @@ -32,8 +31,7 @@ #endif #include "tty.h" -#include "mad.h" -#include "util.h" /* Needed for the externs */ +#include "global.h" #include "win.h" #include "color.h" #include "dlg.h" @@ -78,11 +76,11 @@ int ret_cmd, flags, y, x; char *text; } chown_but[BUTTONS] = { - { B_CANCEL, NORMAL_BUTTON, 0, 54, N_("&Cancel") }, - { B_ENTER, DEFPUSH_BUTTON, 0, 44, N_("&Set") }, - { B_SETUSR, NORMAL_BUTTON, 0, 30, N_("Set &users") }, - { B_SETGRP, NORMAL_BUTTON, 0, 15, N_("Set &groups") }, - { B_SETALL, NORMAL_BUTTON, 0, 3, N_("Set &all") }, + { B_CANCEL, NORMAL_BUTTON, 0, 53, N_("&Cancel") }, + { B_ENTER, DEFPUSH_BUTTON, 0, 40, N_("&Set") }, + { B_SETUSR, NORMAL_BUTTON, 0, 25, N_("Set &users") }, + { B_SETGRP, NORMAL_BUTTON, 0, 11, N_("Set &groups") }, + { B_SETALL, NORMAL_BUTTON, 0, 0, N_("Set &all") }, }; #define LABELS 5 @@ -111,25 +109,25 @@ attrset (COLOR_NORMAL); dlg_move (ch_dlg, TY + 1, TX + 1); - addstr (N_(" Name ")); + addstr (_(" Name ")); dlg_move (ch_dlg, TY + 3, TX + 1); - addstr (N_(" Owner name ")); + addstr (_(" Owner name ")); dlg_move (ch_dlg, TY + 5, TX + 1); - addstr (N_(" Group name ")); + addstr (_(" Group name ")); dlg_move (ch_dlg, TY + 7, TX + 1); - addstr (N_(" Size ")); + addstr (_(" Size ")); dlg_move (ch_dlg, TY + 9, TX + 1); - addstr (N_(" Permission ")); + addstr (_(" Permission ")); attrset (COLOR_HOT_NORMAL); dlg_move (ch_dlg, 1, 28); - addstr (N_(" Chown command ")); + addstr (_(" Chown command ")); dlg_move (ch_dlg, UY, UX + 1); - addstr (N_(" User name ")); + addstr (_(" User name ")); dlg_move (ch_dlg, GY, GX + 1); - addstr (N_(" Group name ")); + addstr (_(" Group name ")); dlg_move (ch_dlg, TY, TX + 1); - addstr (N_(" File ")); + addstr (_(" File ")); } #endif @@ -253,7 +251,7 @@ WLEntry *fe; uid_t new_user; gid_t new_group; - char buffer [15]; + char buffer [BUF_TINY]; #if 0 /* Please no */ @@ -296,7 +294,7 @@ chown_label (0, name_trunc (fname, 15)); chown_label (1, name_trunc (get_owner (sf_stat.st_uid), 15)); chown_label (2, name_trunc (get_group (sf_stat.st_gid), 15)); - sprintf (buffer, "%d", c_fsize); + g_snprintf (buffer, sizeof (buffer), "%d", c_fsize); chown_label (3, buffer); chown_label (4, string_perm (sf_stat.st_mode)); diff -ruN old/mc-4.5.9/src/cmd.c new/mc-4.5.10/src/cmd.c --- old/mc-4.5.9/src/cmd.c Mon Jan 18 17:44:11 1999 +++ new/mc-4.5.10/src/cmd.c Sun Jan 31 18:55:18 1999 @@ -29,12 +29,10 @@ #endif #include "tty.h" #include -#include /* getenv (), rand */ #include #include #include #include -#include #include #include /* open, O_RDWR */ #include @@ -50,9 +48,8 @@ #ifdef HAVE_MMAP # include #endif -#include "mad.h" +#include "global.h" #include "dir.h" -#include "util.h" #include "panel.h" #include "cmd.h" /* Our definitions */ #include "view.h" /* view() */ @@ -64,7 +61,6 @@ #include "tree.h" #include "subshell.h" /* use_subshell */ #include "cons.saver.h" -#include "global.h" #include "dlg.h" /* required by wtools.h */ #include "widget.h" /* required by wtools.h */ #include "wtools.h" /* listbox */ @@ -75,7 +71,6 @@ #include "view.h" /* view */ #include "key.h" /* get_key_code */ #include "help.h" /* interactive_display */ -#include "fs.h" #include "boxes.h" /* cd_dialog */ #include "color.h" #include "user.h" @@ -173,7 +168,7 @@ return move_dir; } if (internal){ - char view_entry [32]; + char view_entry [BUF_TINY]; #ifdef HAVE_GNOME if (!gmc_view (filename, start_line)){ @@ -181,7 +176,7 @@ } #else if (start_line != 0) - sprintf (view_entry, "View:%d", start_line); + g_snprintf (view_entry, sizeof (view_entry), "View:%d", start_line); else strcpy (view_entry, "View"); @@ -291,7 +286,7 @@ if (!filename) return; view_file (filename, 0, use_internal_view); - free (filename); + g_free (filename); } void view_simple_cmd (WPanel *panel) @@ -311,7 +306,7 @@ view (command, "", 0, 0); - free (command); + g_free (command); } void filtered_view_cmd_cpanel (void) @@ -398,20 +393,20 @@ return; if (dir [0] && (dir [0] == '/' || dir [0] == '~')) - tempdir = strdup (dir); + tempdir = g_strdup (dir); else tempdir = concat_dir_and_file (panel->cwd, dir); - free (dir); + g_free (dir); save_cwds_stat (); if (my_mkdir (tempdir, 0777) == 0){ update_panels (UP_OPTIMIZE, tempdir); repaint_screen (); select_item (cpanel); - free (tempdir); + g_free (tempdir); return; } - free (tempdir); + g_free (tempdir); message (1, MSG_ERROR, " %s ", unix_error_string (errno)); } @@ -434,13 +429,13 @@ set_panel_filter_to (WPanel *p, char *allocated_filter_string) { if (p->filter){ - free (p->filter); + g_free (p->filter); p->filter = 0; } if (!(allocated_filter_string [0] == '*' && allocated_filter_string [1] == 0)) p->filter = allocated_filter_string; else - free (allocated_filter_string); + g_free (allocated_filter_string); reread_cmd (); x_filter_changed (p); } @@ -548,7 +543,7 @@ c = regexp_match (reg_exp_t, panel->dir.list [i].fname, match_file); if (c == -1){ message (1, MSG_ERROR, _(" Malformed regular expression ")); - free (reg_exp); + g_free (reg_exp); return; } if (c){ @@ -556,7 +551,7 @@ } } paint_panel (panel); - free (reg_exp); + g_free (reg_exp); } void select_cmd (void) @@ -599,7 +594,7 @@ c = regexp_match (reg_exp_t, panel->dir.list [i].fname, match_file); if (c == -1){ message (1, MSG_ERROR, _(" Malformed regular expression ")); - free (reg_exp); + g_free (reg_exp); return; } if (c){ @@ -607,7 +602,7 @@ } } paint_panel (panel); - free (reg_exp); + g_free (reg_exp); } void unselect_cmd (void) @@ -654,11 +649,11 @@ buffer = concat_dir_and_file (home_dir, MC_USER_EXT); check_for_default (extdir, buffer); do_edit (buffer); - free (buffer); + g_free (buffer); } else if (dir == 1) do_edit (extdir); - free (extdir); + g_free (extdir); flush_extension_file (); } @@ -679,7 +674,7 @@ switch (dir){ case 0: - buffer = strdup (MC_LOCAL_MENU); + buffer = g_strdup (MC_LOCAL_MENU); check_for_default (menufile, buffer); break; @@ -693,14 +688,14 @@ break; default: - free (menufile); + g_free (menufile); return; } do_edit (buffer); if (dir == 0) chmod(buffer, 0600); - free (buffer); - free (menufile); + g_free (buffer); + g_free (menufile); } void quick_chdir_cmd (void) @@ -718,7 +713,7 @@ #endif if (!do_cd (target, cd_exact)) message (1, MSG_ERROR, _("Could not change directory") ); - free (target); + g_free (target); } #ifdef USE_VFS @@ -732,7 +727,7 @@ if (!do_cd (target, cd_exact)) message (1, MSG_ERROR, _("Could not change directory") ); - free (target); + g_free (target); } #endif @@ -843,12 +838,12 @@ } /* Thorough compare on, do byte-by-byte comparison */ - src_name = get_full_name (panel->cwd, source->fname); - dst_name = get_full_name (other->cwd, target->fname); + src_name = concat_dir_and_file (panel->cwd, source->fname); + dst_name = concat_dir_and_file (other->cwd, target->fname); if (compare_files (src_name, dst_name, source->buf.st_size)) do_file_mark (panel, i, 1); - free (src_name); - free (dst_name); + g_free (src_name); + g_free (dst_name); } } /* for (i ...) */ } @@ -901,7 +896,7 @@ else current = listbox->list->current->data; destroy_dlg (listbox->dlg); - free (listbox); + g_free (listbox); if (!current) return; @@ -1031,14 +1026,14 @@ } if (!symbolic_link){ - src = copy_strings (_(" Link "), name_trunc (fname, 46), + src = g_strconcat (_(" Link "), name_trunc (fname, 46), _(" to:"), NULL); dest = input_expand_dialog (_(" Link "), src, ""); - free (src); + g_free (src); if (!dest) return; if (!*dest) { - free (dest); + g_free (dest); return; } save_cwds_stat (); @@ -1067,9 +1062,9 @@ #endif if (!dest || !*dest) { if (src) - free (src); + g_free (src); if (dest) - free (dest); + g_free (dest); return; } if (src){ @@ -1079,10 +1074,10 @@ message (1, MSG_ERROR, _(" symlink: %s "), unix_error_string (errno)); } - free (src); + g_free (src); } } - free (dest); + g_free (dest); update_panels (UP_OPTIMIZE, UP_KEEPSEL); repaint_screen (); } @@ -1102,7 +1097,7 @@ if (S_ISLNK (selection (cpanel)->buf.st_mode)) { char buffer [MC_MAXPATHLEN], *p = selection (cpanel)->fname; int i; - char *dest, *q = copy_strings (_(" Symlink "), name_trunc (p, 32), _(" points to:"), NULL); + char *dest, *q = g_strconcat (_(" Symlink "), name_trunc (p, 32), _(" points to:"), NULL); i = readlink (p, buffer, MC_MAXPATHLEN); if (i > 0) { @@ -1118,10 +1113,10 @@ update_panels (UP_OPTIMIZE, UP_KEEPSEL); repaint_screen (); } - free (dest); + g_free (dest); } } - free (q); + g_free (q); } } @@ -1137,7 +1132,7 @@ p = concat_dir_and_file (cpanel->cwd, selection (cpanel)->fname); r = concat_dir_and_file (opanel->cwd, selection (cpanel)->fname); - q = copy_strings (_(" Link symbolically "), name_trunc (p, 32), _(" to:"), NULL); + q = g_strconcat (_(" Link symbolically "), name_trunc (p, 32), _(" to:"), NULL); dest = input_expand_dialog (_(" Relative symlink "), q, r); if (dest) { if (*dest) { @@ -1153,15 +1148,15 @@ unix_error_string (errno)); update_panels (UP_OPTIMIZE, UP_KEEPSEL); repaint_screen (); - free (s); + g_free (s); } } } - free (dest); + g_free (dest); } - free (q); - free (p); - free (r); + g_free (q); + g_free (p); + g_free (r); } #endif @@ -1169,7 +1164,7 @@ { char *hlpfile = concat_dir_and_file (mc_home, "mc.hlp"); interactive_display (hlpfile, "[main]"); - free (hlpfile); + g_free (hlpfile); } void view_panel_cmd (void) @@ -1203,7 +1198,7 @@ time (&now); if ((now - last) < 60) - return strdup (""); + return g_strdup (""); last = now; #else static int last_sec; @@ -1211,13 +1206,13 @@ gettimeofday (&tv, NULL); if (!(tv.tv_sec> last_sec+60)) - return strdup (""); + return g_strdup (""); last_sec = tv.tv_sec; #endif hintfile = concat_dir_and_file (mc_home, MC_HINT); data = load_file (hintfile); - free (hintfile); + g_free (hintfile); if (!data) return 0; @@ -1239,8 +1234,8 @@ eol = strchr (&data [start], '\n'); if (eol) *eol = 0; - result = strdup (&data [start]); - free (data); + result = g_strdup (&data [start]); + g_free (data); return result; } @@ -1269,16 +1264,16 @@ return; if (strncmp (prefix, machine, strlen (prefix)) == 0) - cd_path = copy_strings (machine, to_home ? "/~/" : NULL, NULL); + cd_path = g_strconcat (machine, to_home ? "/~/" : NULL, NULL); else - cd_path = copy_strings (prefix, machine, to_home ? "/~/" : NULL, NULL); + cd_path = g_strconcat (prefix, machine, to_home ? "/~/" : NULL, NULL); if (do_panel_cd (MENU_PANEL, cd_path, 0)) directory_history_add (MENU_PANEL, (MENU_PANEL)->cwd); else message (1, MSG_ERROR, N_(" Could not chdir to %s "), cd_path); - free (cd_path); - free (machine); + g_free (cd_path); + g_free (machine); } void netlink_cmd (void) @@ -1330,13 +1325,13 @@ char *p = cd_dialog (); if (p && *p) { - char *q = copy_strings ("cd ", p, NULL); + char *q = g_strconcat ("cd ", p, NULL); do_cd_command (q); - free (q); + g_free (q); } if (p) - free (p); + g_free (p); } void @@ -1369,14 +1364,14 @@ save_setup (); sync_profiles (); - str = copy_strings ( _(" Setup saved to ~/"), PROFILE_NAME, NULL); + str = g_strconcat ( _(" Setup saved to ~/"), PROFILE_NAME, NULL); #ifdef HAVE_GNOME set_hintbar (str); #else message (0, _(" Setup "), str); #endif - free (str); + g_free (str); } void @@ -1388,29 +1383,29 @@ p->list_type = view_type; if (view_type == list_user || use_msformat){ - free (p->user_format); + g_free (p->user_format); p->user_format = user; - free (p->user_status_format [view_type]); + g_free (p->user_status_format [view_type]); p->user_status_format [view_type] = status; err = set_panel_formats (p); if (err){ if (err & 0x01){ - free (p->user_format); - p->user_format = strdup (DEFAULT_USER_FORMAT); + g_free (p->user_format); + p->user_format = g_strdup (DEFAULT_USER_FORMAT); } if (err & 0x02){ - free (p->user_status_format [view_type]); - p->user_status_format [view_type] = strdup (DEFAULT_USER_FORMAT); + g_free (p->user_status_format [view_type]); + p->user_status_format [view_type] = g_strdup (DEFAULT_USER_FORMAT); } } } else { - free (user); - free (status); + g_free (user); + g_free (status); } set_panel_formats (p); diff -ruN old/mc-4.5.9/src/color.c new/mc-4.5.10/src/color.c --- old/mc-4.5.9/src/color.c Mon Jan 18 17:44:10 1999 +++ new/mc-4.5.10/src/color.c Sun Jan 31 18:55:18 1999 @@ -18,14 +18,13 @@ #include #include "tty.h" #include -#include #include -#include "mad.h" +#include "global.h" #include "setup.h" /* For the externs */ #include "color.h" #include "x.h" -/* "$Id: color.c,v 1.12 1999/01/10 08:55:50 unammx Exp $" */ +/* "$Id: color.c,v 1.13 1999/01/27 01:08:41 timur Exp $" */ /* To avoid excessive calls to ncurses' has_colors () */ int hascolors = 0; @@ -200,7 +199,7 @@ if (!the_color_string) return; - p = color_string = strdup (the_color_string); + p = color_string = g_strdup (the_color_string); while (color_string && *color_string){ while (*color_string == ' ' || *color_string == '\t') color_string++; @@ -226,7 +225,7 @@ color_string++; } } - free (p); + g_free (p); } static void configure_colors (void) diff -ruN old/mc-4.5.9/src/command.c new/mc-4.5.10/src/command.c --- old/mc-4.5.9/src/command.c Mon Jan 18 17:44:11 1999 +++ new/mc-4.5.10/src/command.c Sun Jan 31 18:55:18 1999 @@ -24,16 +24,12 @@ #include #include #include "tty.h" -#include "fs.h" -#include #include -#include -#include "mad.h" +#include "global.h" /* home_dir */ #include "dlg.h" #include "widget.h" #include "command.h" #include "complete.h" /* completion constants */ -#include "global.h" /* home_dir */ #include "dialog.h" /* message () */ #include "dir.h" /* required by panel.h */ #include "panel.h" /* view_tree enum. Also, needed by main.h */ @@ -61,8 +57,9 @@ { char *p; int result; - char *q = xmalloc (MC_MAXPATHLEN + 10, "examine_cd"), *r, *s, *t, c; + char *q, *r, *s, *t, c; + q = g_malloc (MC_MAXPATHLEN + 10); /* Variable expansion */ for (p = path, r = q; *p && r < q + MC_MAXPATHLEN; ) { if (*p != '$' || (p [1] == '[' || p [1] == '(')) @@ -118,13 +115,13 @@ if (*p) { r = concat_dir_and_file (p, q); result = do_cd (r, cd_parse_command); - free (r); + g_free (r); } *s = c; p = s + 1; } } - free (q); + g_free (q); return result; } @@ -166,7 +163,7 @@ char *new; new = concat_dir_and_file (old, cmd+3); sync_tree (new); - free (new); + g_free (new); } } else if (!examine_cd (&cmd [3])) { @@ -202,16 +199,16 @@ return MSG_NOT_HANDLED; } - command = xmalloc (strlen (cmd) + 1, "main, enter"); + command = g_malloc (strlen (cmd) + 1); command [0] = 0; for (i = j = 0; i < strlen (cmd); i ++){ if (cmd [i] == '%'){ i ++; s = expand_format (cmd [i], 1); - command = realloc (command, strlen (command) + strlen (s) + command = g_realloc (command, strlen (command) + strlen (s) + strlen (cmd) - i + 1); strcat (command, s); - free (s); + g_free (s); j = strlen (command); } else { command [j] = cmd [i]; @@ -223,7 +220,7 @@ current_dlg = 0; new_input (input_w (cmdline)); execute (command); - free (command); + g_free (command); #ifdef HAVE_SUBSHELL_SUPPORT if (quit & SUBSHELL_EXIT){ @@ -259,11 +256,11 @@ WCommand *command_new (int y, int x, int cols) { WInput *in; - WCommand *cmd = xmalloc (sizeof (WCommand), "command_new"); + WCommand *cmd = g_new (WCommand, 1); in = input_new (y, x, DEFAULT_COLOR, cols, "", "cmdline"); cmd->input = *in; - free (in); + g_free (in); /* Add our hooks */ cmd->old_callback = (callback_fn) cmd->input.widget.callback; diff -ruN old/mc-4.5.9/src/complete.c new/mc-4.5.10/src/complete.c --- old/mc-4.5.9/src/complete.c Mon Jan 18 17:44:11 1999 +++ new/mc-4.5.10/src/complete.c Sun Jan 31 18:55:18 1999 @@ -22,9 +22,7 @@ #include #include "tty.h" #include -#include #include -#include #ifdef HAVE_UNISTD_H # include #endif @@ -60,8 +58,6 @@ #endif #include "global.h" -#include "mad.h" -#include "util.h" #include "win.h" #include "color.h" #include "dlg.h" @@ -97,16 +93,16 @@ char *temp; if (dirname) - free (dirname); + g_free (dirname); if (filename) - free (filename); + g_free (filename); if (users_dirname) - free (users_dirname); + g_free (users_dirname); - filename = strdup (text); + filename = g_strdup (text); if (!*text) text = "."; - dirname = strdup (text); + dirname = g_strdup (text); temp = strrchr (dirname, PATH_SEP); @@ -120,19 +116,19 @@ /* We aren't done yet. We also support the "~user" syntax. */ /* Save the version of the directory that the user typed. */ - users_dirname = strdup (dirname); + users_dirname = g_strdup (dirname); { char *temp_dirname; temp_dirname = tilde_expand (dirname); if (!temp_dirname){ - free (dirname); - free (users_dirname); - free (filename); + g_free (dirname); + g_free (users_dirname); + g_free (filename); dirname = users_dirname = filename = NULL; return NULL; } - free (dirname); + g_free (dirname); dirname = temp_dirname; canonicalize_pathname (dirname); /* Here we should do something with variable expansion @@ -161,7 +157,7 @@ } isdir = 1; isexec = 0; { - char *tmp = xmalloc (3 + strlen (dirname) + NLENGTH (entry), "Filename completion"); + char *tmp = g_malloc (3 + strlen (dirname) + NLENGTH (entry)); struct stat tempstat; strcpy (tmp, dirname); @@ -182,7 +178,7 @@ isexec = 1; } } - free (tmp); + g_free (tmp); } switch (look_for_executables) { @@ -204,15 +200,15 @@ directory = NULL; } if (dirname){ - free (dirname); + g_free (dirname); dirname = NULL; } if (filename){ - free (filename); + g_free (filename); filename = NULL; } if (users_dirname){ - free (users_dirname); + g_free (users_dirname); users_dirname = NULL; } return NULL; @@ -221,7 +217,7 @@ if (users_dirname && (users_dirname[0] != '.' || users_dirname[1])){ int dirlen = strlen (users_dirname); - temp = xmalloc (3 + dirlen + NLENGTH (entry), "Filename completion"); + temp = g_malloc (3 + dirlen + NLENGTH (entry)); strcpy (temp, users_dirname); /* We need a `/' at the end. */ if (users_dirname[dirlen - 1] != PATH_SEP){ @@ -230,7 +226,7 @@ } strcat (temp, entry->d_name); } else { - temp = xmalloc (2 + NLENGTH (entry), "Filename completion"); + temp = g_malloc (2 + NLENGTH (entry)); strcpy (temp, entry->d_name); } if (isdir) @@ -270,7 +266,7 @@ endpwent (); return NULL; } else { - char *temp = xmalloc (3 + strlen (entry->pw_name), "Username completion"); + char *temp = g_malloc (3 + strlen (entry->pw_name)); *temp = '~'; strcpy (temp + 1, entry->pw_name); @@ -307,7 +303,7 @@ if (!*env_p) return NULL; else { - char *temp = xmalloc (2 + 2 * isbrace + p - *env_p, "Variable completion"); + char *temp = g_malloc (2 + 2 * isbrace + p - *env_p); *temp = '$'; if (isbrace) @@ -373,7 +369,7 @@ for (start = i; buffer[i] && !cr_whitespace (buffer[i]); i++); if (i - start == 0) continue; - name = (char *) xmalloc (i - start + 1, "Hostname completion"); + name = (char *) g_malloc (i - start + 1); strncpy (name, buffer + start, i - start); name [i - start] = 0; { @@ -382,7 +378,7 @@ if (hosts_p - hosts >= hosts_alloclen){ int j = hosts_p - hosts; - hosts = realloc ((void *)hosts, ((hosts_alloclen += 30) + 1) * sizeof (char *)); + hosts = g_realloc ((void *)hosts, ((hosts_alloclen += 30) + 1) * sizeof (char *)); hosts_p = hosts + j; } for (host_p = hosts; host_p < hosts_p; host_p++) @@ -392,7 +388,7 @@ *(hosts_p++) = name; *hosts_p = NULL; } else - free (name); + g_free (name); } } } @@ -410,10 +406,10 @@ if (hosts != NULL){ for (host_p = hosts; *host_p; host_p++) - free (*host_p); - free (hosts); + g_free (*host_p); + g_free (hosts); } - hosts = (char **) xmalloc (((hosts_alloclen = 30) + 1) * sizeof (char *), "Hostname completion"); + hosts = g_new (char *, (hosts_alloclen = 30) + 1); *hosts = NULL; hosts_p = hosts; fetch_hosts ((p = getenv ("HOSTFILE")) ? p : "/etc/hosts"); @@ -432,12 +428,12 @@ if (!*host_p){ for (host_p = hosts; *host_p; host_p++) - free (*host_p); - free (hosts); + g_free (*host_p); + g_free (hosts); hosts = NULL; return NULL; } else { - char *temp = xmalloc (2 + strlen (*host_p), "Hostname completion"); + char *temp = g_malloc (2 + strlen (*host_p)); if (textstart) *temp = '@'; @@ -491,7 +487,7 @@ if (!p) path = NULL; else { - path = xmalloc (strlen (p) + 2, "Command completion"); + path = g_malloc (strlen (p) + 2); strcpy (path, p); path [strlen (p) + 1] = 0; p = strchr (path, PATH_ENV_SEP); @@ -515,7 +511,7 @@ case 0: /* Reserved words */ while (*words){ if (!strncmp (*words, text, text_len)) - return strdup (*(words++)); + return g_strdup (*(words++)); words++; } phase++; @@ -523,7 +519,7 @@ case 1: /* Builtin commands */ while (*words){ if (!strncmp (*words, text, text_len)) - return strdup (*(words++)); + return g_strdup (*(words++)); words++; } phase++; @@ -540,23 +536,23 @@ break; expanded = tilde_expand (cur_path); if (!expanded){ - free (path); + g_free (path); path = NULL; return NULL; } p = canonicalize_pathname (expanded); - cur_word = xmalloc (strlen (p) + 2 + text_len, "Command completion"); + cur_word = g_malloc (strlen (p) + 2 + text_len); strcpy (cur_word, p); if (cur_word [strlen (cur_word) - 1] != PATH_SEP) strcat (cur_word, PATH_SEP_STR); strcat (cur_word, text); - free (p); + g_free (p); cur_path = strchr (cur_path, 0) + 1; init_state = state; } found = filename_completion_function (cur_word, state - init_state); if (!found){ - free (cur_word); + g_free (cur_word); cur_word = NULL; } } @@ -565,13 +561,13 @@ if (!found){ look_for_executables = 0; if (path) - free (path); + g_free (path); return NULL; } if ((p = strrchr (found, PATH_SEP)) != NULL){ p++; - p = strdup (p); - free (found); + p = g_strdup (p); + g_free (found); return p; } return found; @@ -598,7 +594,7 @@ int match_list_size; /* The list of matches. */ - char **match_list = (char **) xmalloc (((match_list_size = 30) + 1) * sizeof (char *), "completion match list"); + char **match_list = g_new (char *, (match_list_size = 30) + 1); /* Number of matches actually found. */ int matches = 0; @@ -610,7 +606,7 @@ while ((string = (*entry_function) (text, matches)) != NULL){ if (matches + 1 == match_list_size) - match_list = (char **) realloc (match_list, ((match_list_size += 30) + 1) * sizeof (char *)); + match_list = (char **) g_realloc (match_list, ((match_list_size += 30) + 1) * sizeof (char *)); match_list[++matches] = string; match_list[matches + 1] = NULL; } @@ -644,7 +640,7 @@ if (c1 != c2) break; if (!c1 && !match_list [j][si]){ /* Two equal strings */ - free (match_list [j]); + g_free (match_list [j]); j++; if (j > matches) break; @@ -656,12 +652,12 @@ } matches = i; match_list [matches + 1] = NULL; - match_list[0] = xmalloc (low + 1, "Completion matching list"); + match_list[0] = g_malloc (low + 1); strncpy (match_list[0], match_list[1], low); match_list[0][low] = 0; } } else { /* There were no matches. */ - free (match_list); + g_free (match_list); match_list = NULL; } return match_list; @@ -695,7 +691,7 @@ ignore_filenames = 0; c = text [*end]; text [*end] = 0; - word = strdup (text + *start); + word = g_strdup (text + *start); text [*end] = c; /* Determine if this could be a command word. It is if it appears at @@ -804,7 +800,7 @@ ignore_filenames = 1; matches = completion_matches (r, filename_completion_function); ignore_filenames = 0; - free (r); + g_free (r); } *s = c; cdpath = s + 1; @@ -814,7 +810,7 @@ } if (word) - free (word); + g_free (word); return matches; } @@ -826,8 +822,8 @@ if (!in->completions) return; for (p=in->completions; *p; p++) - free (*p); - free (in->completions); + g_free (*p); + g_free (in->completions); in->completions = NULL; } @@ -840,7 +836,7 @@ len = min (len, strlen (text)) + start - end; if (strlen (in->buffer) + len >= in->current_max_len){ /* Expand the buffer */ - char *narea = realloc(in->buffer, in->current_max_len + len + in->field_len); + char *narea = g_realloc (in->buffer, in->current_max_len + len + in->field_len); if (narea){ in->buffer = narea; in->current_max_len += len + in->field_len; diff -ruN old/mc-4.5.9/src/cons.handler.c new/mc-4.5.10/src/cons.handler.c --- old/mc-4.5.9/src/cons.handler.c Mon Jan 18 17:44:10 1999 +++ new/mc-4.5.10/src/cons.handler.c Sun Jan 31 18:55:18 1999 @@ -252,7 +252,7 @@ } if (screen != NULL) { - free(screen); + g_free (screen); } console_flag = 0; } @@ -340,7 +340,7 @@ height = vi.mv_rsz; width = vi.mv_csz; - screen = (unsigned short*) xmalloc(height * width * 2,"console_init"); + screen = (unsigned short*) g_malloc (height * width * 2); if (screen == NULL) { console_shutdown(); diff -ruN old/mc-4.5.9/src/cons.saver.c new/mc-4.5.10/src/cons.saver.c --- old/mc-4.5.9/src/cons.saver.c Mon Jan 18 17:44:11 1999 +++ new/mc-4.5.10/src/cons.saver.c Sun Jan 31 18:55:19 1999 @@ -58,7 +58,7 @@ static char *buffer = NULL; static int buffer_size = 0; static int columns, rows; -static char vcs_name [40]; +static char vcs_name [128]; static int vcs_fd; static void dwrite (int fd, char *buffer) @@ -86,10 +86,10 @@ inline void tty_cursormove(int y, int x) { - char buffer [20]; + char buffer [128]; /* Standard ANSI escape sequence for cursor positioning */ - sprintf (buffer,"\33[%d;%dH", y + 1, x + 1); + snprintf (buffer, sizeof (buffer), "\33[%d;%dH", y + 1, x + 1); dwrite (console_fd, buffer); } @@ -167,7 +167,7 @@ !isdigit(tty_name[len - 1])) return "Doesn't look like console"; - sprintf (vcs_name, "/dev/vcsa%s", tty_name + xlen - 1); + snprintf (vcs_name, sizeof (vcs_name), "/dev/vcsa%s", tty_name + xlen - 1); vcs_fd = check_file (vcs_name, 0, &msg); console_fd = check_file (tty_name, 1, &msg); diff -ruN old/mc-4.5.9/src/dialog.c new/mc-4.5.10/src/dialog.c --- old/mc-4.5.9/src/dialog.c Mon Jan 18 17:44:10 1999 +++ new/mc-4.5.10/src/dialog.c Sun Jan 31 18:55:18 1999 @@ -18,14 +18,11 @@ #include #include "tty.h" #include -#include /* For free() */ #include #include #include -#include "x.h" -#include "mad.h" #include "global.h" -#include "util.h" +#include "x.h" #include "dialog.h" #include "color.h" #include "win.h" @@ -35,7 +32,7 @@ #include "dlg.h" /* draw_box, yes I know, it's silly */ #include "fileopctx.h" -/* "$Id: dialog.c,v 1.5 1999/01/14 01:11:09 unammx Exp $" */ +/* "$Id: dialog.c,v 1.7 1999/01/27 19:54:13 unammx Exp $" */ Refresh *refresh_list = 0; @@ -43,7 +40,7 @@ { Refresh *new; - new = xmalloc (sizeof (Refresh), "push_refresh"); + new = g_new (Refresh, 1); new->next = (struct Refresh *) refresh_list; new->refresh_fn = new_refresh; new->parameter = parameter; @@ -60,7 +57,7 @@ else { old = refresh_list; refresh_list = refresh_list->next; - free (old); + g_free (old); } } diff -ruN old/mc-4.5.9/src/dir.c new/mc-4.5.10/src/dir.c --- old/mc-4.5.9/src/dir.c Mon Jan 18 17:44:10 1999 +++ new/mc-4.5.10/src/dir.c Sun Jan 31 18:55:18 1999 @@ -18,22 +18,19 @@ #include #define DIR_H_INCLUDE_HANDLE_DIRENT #include "tty.h" -#include "fs.h" #include #include #include #include #include #include "x.h" -#include "mad.h" #include "global.h" #include "dir.h" -#include "util.h" #include "dialog.h" #include "tree.h" #include "../vfs/vfs.h" -/* "$Id: dir.c,v 1.11 1999/01/12 05:55:19 unammx Exp $" */ +/* "$Id: dir.c,v 1.12 1999/01/27 01:08:47 timur Exp $" */ /* If true show files starting with a dot */ int show_dot_files = 1; @@ -71,7 +68,7 @@ { N_("&Group"), sort_group } }; -#define string_sortcomp(a,b) (case_sensitive ? strcmp (a,b) : strcasecmp (a,b)) +#define string_sortcomp(a,b) (case_sensitive ? strcmp (a,b) : g_strcasecmp (a,b)) int unsorted (const file_entry *a, const file_entry *b) @@ -293,7 +290,7 @@ int i; for (i = 0; i < count; i++){ - free (list->list [i].fname); + g_free (list->list [i].fname); list->list [i].fname = 0; } } @@ -307,7 +304,7 @@ /* Need to grow the *list? */ if (index == list->size) { - list->list = realloc (list->list, sizeof (file_entry) * + list->list = g_realloc (list->list, sizeof (file_entry) * (list->size + RESIZE_STEPS)); if (!list->list) return 0; @@ -315,7 +312,7 @@ } (list->list) [index].fnamelen = 2; - (list->list) [index].fname = strdup (".."); + (list->list) [index].fname = g_strdup (".."); (list->list) [index].f.link_to_dir = 0; (list->list) [index].f.stalled_link = 0; (list->list) [index].f.dir_size_computed = 0; @@ -329,16 +326,16 @@ strcat (buffer, PATH_SEP_STR ".."); p = vfs_canon (buffer); if (mc_stat (p, &((list->list) [index].buf)) != -1){ - free (p); + g_free (p); break; } i = 1; if (!strcmp (p, PATH_SEP_STR)){ - free (p); + g_free (p); return 1; } strcpy (buffer, p); - free (p); + g_free (p); } /* Commented out to preserve a usable '..'. What's the purpose of this @@ -398,7 +395,7 @@ /* Need to grow the *list? */ if (next_free == list->size){ - list->list = realloc (list->list, sizeof (file_entry) * + list->list = g_realloc (list->list, sizeof (file_entry) * (list->size + RESIZE_STEPS)); if (!list->list) return -1; @@ -437,7 +434,7 @@ /* Need to grow the *list? */ if (next_free == list->size){ - list->list = realloc (list->list, sizeof (file_entry) * + list->list = g_realloc (list->list, sizeof (file_entry) * (list->size + RESIZE_STEPS)); if (!list->list) return -1; @@ -469,7 +466,7 @@ if (status == -1) return next_free; list->list [next_free].fnamelen = NLENGTH (dp); - list->list [next_free].fname = strdup (dp->d_name); + list->list [next_free].fname = g_strdup (dp->d_name); list->list [next_free].f.marked = 0; list->list [next_free].f.link_to_dir = link_to_dir; list->list [next_free].f.stalled_link = stalled_link; @@ -525,13 +522,13 @@ for (i = 0; i < dir_copy.size; i++) { if (dir_copy.list [i].fname) - free (dir_copy.list [i].fname); + g_free (dir_copy.list [i].fname); } - free (dir_copy.list); + g_free (dir_copy.list); dir_copy.list = 0; } - dir_copy.list = xmalloc (sizeof (file_entry) * size, "alloc_dir_copy"); + dir_copy.list = g_new (file_entry, size); for (i = 0; i < size; i++) dir_copy.list [i].fname = 0; @@ -601,7 +598,7 @@ list->list [next_free].f.marked = 0; list->list [next_free].fnamelen = tmp_len; - list->list [next_free].fname = strdup (dp->d_name); + list->list [next_free].fname = g_strdup (dp->d_name); list->list [next_free].f.link_to_dir = link_to_dir; list->list [next_free].f.stalled_link = stalled_link; list->list [next_free].f.dir_size_computed = 0; @@ -641,7 +638,7 @@ int i; for (i = 0; i < SORT_TYPES; i++) - if (strcasecmp (sort_orders [i].sort_name, sname) == 0) + if ( g_strcasecmp (sort_orders [i].sort_name, sname) == 0) return (sortfn *) sort_orders [i].sort_fn; /* default case */ diff -ruN old/mc-4.5.9/src/dir.h new/mc-4.5.10/src/dir.h --- old/mc-4.5.9/src/dir.h Mon Jan 18 17:44:10 1999 +++ new/mc-4.5.10/src/dir.h Sun Jan 31 18:55:18 1999 @@ -4,6 +4,7 @@ #define MIN_FILES 128 #define RESIZE_STEPS 128 +#include typedef struct { /* File attributes */ diff -ruN old/mc-4.5.9/src/dlg.c new/mc-4.5.10/src/dlg.c --- old/mc-4.5.9/src/dlg.c Mon Jan 18 17:44:10 1999 +++ new/mc-4.5.10/src/dlg.c Sun Jan 31 18:55:18 1999 @@ -17,18 +17,15 @@ */ #include -/* "$Id: dlg.c,v 1.23 1998/12/02 23:44:22 unammx Exp $" */ +/* "$Id: dlg.c,v 1.24 1999/01/27 01:08:49 timur Exp $" */ #include #include -#include #include #include "tty.h" #include -#include "mad.h" +#include "global.h" #include "x.h" -#include "util.h" #include "menu.h" -#include "global.h" #include "win.h" #include "color.h" #include "mouse.h" @@ -236,7 +233,7 @@ if ((flags & DLG_TRYUP) && (y1 > 3)) y1 -= 2; - new_d = (Dlg_head *) malloc (sizeof (Dlg_head)); + new_d = g_new (Dlg_head, 1); new_d->current = NULL; new_d->count = 0; new_d->direction = DIR_FORWARD; @@ -292,7 +289,7 @@ if (where->running){ Widget_Item *point = where->current; - where->current = (Widget_Item *) malloc (sizeof (Widget_Item)); + where->current = g_new (Widget_Item, 1); if (point){ where->current->next = point->next; @@ -308,7 +305,7 @@ } } else { back = where->current; - where->current = (Widget_Item *) malloc (sizeof (Widget_Item)); + where->current = g_new (Widget_Item, 1); if (back){ back->prev = where->current; where->current->next = back; @@ -358,7 +355,7 @@ h->current = 0; } h->count--; - free (p); + g_free (p); return 1; } p = p->next; @@ -371,7 +368,7 @@ send_message (w->parent, w, WIDGET_DESTROY, 0); if (w->destroy) w->destroy (w); - free (w); + g_free (w); return 1; } @@ -613,7 +610,7 @@ case KEY_F(1): hlpfile = concat_dir_and_file (mc_home, "mc.hlp"); interactive_display (hlpfile, h->help_ctx); - free (hlpfile); + g_free (hlpfile); do_refresh (); break; @@ -920,14 +917,14 @@ if (c->widget->destroy) c->widget->destroy (c->widget); c = c->next; - free (h->current->widget); - free (h->current); + g_free (h->current->widget); + g_free (h->current); h->current = c; } if (h->title) - free (h->title); + g_free (h->title); x_destroy_dlg (h); - free (h); + g_free (h); #ifndef HAVE_X if (refresh_list) @@ -1024,7 +1021,7 @@ void x_set_dialog_title (Dlg_head *h, char *title) { - h->title = strdup(title); + h->title = g_strdup (title); } #endif diff -ruN old/mc-4.5.9/src/dlg.h new/mc-4.5.10/src/dlg.h --- old/mc-4.5.9/src/dlg.h Mon Jan 18 17:44:10 1999 +++ new/mc-4.5.10/src/dlg.h Sun Jan 31 18:55:18 1999 @@ -1,7 +1,6 @@ #ifndef MC_DLG_H #define MC_DLG_H #include "mouse.h" -#include "util.h" /* Color constants */ #define FOCUSC h->color[1] @@ -257,7 +256,6 @@ #endif extern Dlg_head *current_dlg; -extern Hook *idle_hook; int send_message (Dlg_head *h, Widget *w, int msg, int par); int send_message_to (Dlg_head *h, Widget *w, int msg, int par); diff -ruN old/mc-4.5.9/src/eregex.h new/mc-4.5.10/src/eregex.h --- old/mc-4.5.9/src/eregex.h Wed Dec 31 19:00:00 1969 +++ new/mc-4.5.10/src/eregex.h Sun Jan 31 18:55:18 1999 @@ -0,0 +1,498 @@ +/* Definitions for data structures and routines for the regular + expression library, version 0.12. + + Copyright (C) 1985, 89, 90, 91, 92, 93, 95 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ + +#ifndef __REGEXP_LIBRARY_H__ +#define __REGEXP_LIBRARY_H__ + +/* POSIX says that must be included (by the caller) before + . */ + +#if !defined (_POSIX_C_SOURCE) && !defined (_POSIX_SOURCE) && defined (VMS) +/* VMS doesn't have `size_t' in , even though POSIX says it + should be there. */ +#include +#endif + + +/* The following bits are used to determine the regexp syntax we + recognize. The set/not-set meanings are chosen so that Emacs syntax + remains the value 0. The bits are given in alphabetical order, and + the definitions shifted by one from the previous bit; thus, when we + add or remove a bit, only one other definition need change. */ +typedef unsigned reg_syntax_t; + +/* If this bit is not set, then \ inside a bracket expression is literal. + If set, then such a \ quotes the following character. */ +#define RE_BACKSLASH_ESCAPE_IN_LISTS (1) + +/* If this bit is not set, then + and ? are operators, and \+ and \? are + literals. + If set, then \+ and \? are operators and + and ? are literals. */ +#define RE_BK_PLUS_QM (RE_BACKSLASH_ESCAPE_IN_LISTS << 1) + +/* If this bit is set, then character classes are supported. They are: + [:alpha:], [:upper:], [:lower:], [:digit:], [:alnum:], [:xdigit:], + [:space:], [:print:], [:punct:], [:graph:], and [:cntrl:]. + If not set, then character classes are not supported. */ +#define RE_CHAR_CLASSES (RE_BK_PLUS_QM << 1) + +/* If this bit is set, then ^ and $ are always anchors (outside bracket + expressions, of course). + If this bit is not set, then it depends: + ^ is an anchor if it is at the beginning of a regular + expression or after an open-group or an alternation operator; + $ is an anchor if it is at the end of a regular expression, or + before a close-group or an alternation operator. + + This bit could be (re)combined with RE_CONTEXT_INDEP_OPS, because + POSIX draft 11.2 says that * etc. in leading positions is undefined. + We already implemented a previous draft which made those constructs + invalid, though, so we haven't changed the code back. */ +#define RE_CONTEXT_INDEP_ANCHORS (RE_CHAR_CLASSES << 1) + +/* If this bit is set, then special characters are always special + regardless of where they are in the pattern. + If this bit is not set, then special characters are special only in + some contexts; otherwise they are ordinary. Specifically, + * + ? and intervals are only special when not after the beginning, + open-group, or alternation operator. */ +#define RE_CONTEXT_INDEP_OPS (RE_CONTEXT_INDEP_ANCHORS << 1) + +/* If this bit is set, then *, +, ?, and { cannot be first in an re or + immediately after an alternation or begin-group operator. */ +#define RE_CONTEXT_INVALID_OPS (RE_CONTEXT_INDEP_OPS << 1) + +/* If this bit is set, then . matches newline. + If not set, then it doesn't. */ +#define RE_DOT_NEWLINE (RE_CONTEXT_INVALID_OPS << 1) + +/* If this bit is set, then . doesn't match NUL. + If not set, then it does. */ +#define RE_DOT_NOT_NULL (RE_DOT_NEWLINE << 1) + +/* If this bit is set, nonmatching lists [^...] do not match newline. + If not set, they do. */ +#define RE_HAT_LISTS_NOT_NEWLINE (RE_DOT_NOT_NULL << 1) + +/* If this bit is set, either \{...\} or {...} defines an + interval, depending on RE_NO_BK_BRACES. + If not set, \{, \}, {, and } are literals. */ +#define RE_INTERVALS (RE_HAT_LISTS_NOT_NEWLINE << 1) + +/* If this bit is set, +, ? and | aren't recognized as operators. + If not set, they are. */ +#define RE_LIMITED_OPS (RE_INTERVALS << 1) + +/* If this bit is set, newline is an alternation operator. + If not set, newline is literal. */ +#define RE_NEWLINE_ALT (RE_LIMITED_OPS << 1) + +/* If this bit is set, then `{...}' defines an interval, and \{ and \} + are literals. + If not set, then `\{...\}' defines an interval. */ +#define RE_NO_BK_BRACES (RE_NEWLINE_ALT << 1) + +/* If this bit is set, (...) defines a group, and \( and \) are literals. + If not set, \(...\) defines a group, and ( and ) are literals. */ +#define RE_NO_BK_PARENS (RE_NO_BK_BRACES << 1) + +/* If this bit is set, then \ matches . + If not set, then \ is a back-reference. */ +#define RE_NO_BK_REFS (RE_NO_BK_PARENS << 1) + +/* If this bit is set, then | is an alternation operator, and \| is literal. + If not set, then \| is an alternation operator, and | is literal. */ +#define RE_NO_BK_VBAR (RE_NO_BK_REFS << 1) + +/* If this bit is set, then an ending range point collating higher + than the starting range point, as in [z-a], is invalid. + If not set, then when ending range point collates higher than the + starting range point, the range is ignored. */ +#define RE_NO_EMPTY_RANGES (RE_NO_BK_VBAR << 1) + +/* If this bit is set, then an unmatched ) is ordinary. + If not set, then an unmatched ) is invalid. */ +#define RE_UNMATCHED_RIGHT_PAREN_ORD (RE_NO_EMPTY_RANGES << 1) + +/* If this bit is set, succeed as soon as we match the whole pattern, + without further backtracking. */ +#define RE_NO_POSIX_BACKTRACKING (RE_UNMATCHED_RIGHT_PAREN_ORD << 1) + +/* This global variable defines the particular regexp syntax to use (for + some interfaces). When a regexp is compiled, the syntax used is + stored in the pattern buffer, so changing this does not affect + already-compiled regexps. */ +extern reg_syntax_t re_syntax_options; + +/* Define combinations of the above bits for the standard possibilities. + (The [[[ comments delimit what gets put into the Texinfo file, so + don't delete them!) */ +/* [[[begin syntaxes]]] */ +#define RE_SYNTAX_EMACS 0 + +#define RE_SYNTAX_AWK \ + (RE_BACKSLASH_ESCAPE_IN_LISTS | RE_DOT_NOT_NULL \ + | RE_NO_BK_PARENS | RE_NO_BK_REFS \ + | RE_NO_BK_VBAR | RE_NO_EMPTY_RANGES \ + | RE_UNMATCHED_RIGHT_PAREN_ORD) + +#define RE_SYNTAX_POSIX_AWK \ + (RE_SYNTAX_POSIX_EXTENDED | RE_BACKSLASH_ESCAPE_IN_LISTS) + +#define RE_SYNTAX_GREP \ + (RE_BK_PLUS_QM | RE_CHAR_CLASSES \ + | RE_HAT_LISTS_NOT_NEWLINE | RE_INTERVALS \ + | RE_NEWLINE_ALT) + +#define RE_SYNTAX_EGREP \ + (RE_CHAR_CLASSES | RE_CONTEXT_INDEP_ANCHORS \ + | RE_CONTEXT_INDEP_OPS | RE_HAT_LISTS_NOT_NEWLINE \ + | RE_NEWLINE_ALT | RE_NO_BK_PARENS \ + | RE_NO_BK_VBAR) + +#define RE_SYNTAX_POSIX_EGREP \ + (RE_SYNTAX_EGREP | RE_INTERVALS | RE_NO_BK_BRACES) + +/* P1003.2/D11.2, section 4.20.7.1, lines 5078ff. */ +#define RE_SYNTAX_ED RE_SYNTAX_POSIX_BASIC + +#define RE_SYNTAX_SED RE_SYNTAX_POSIX_BASIC + +/* Syntax bits common to both basic and extended POSIX regex syntax. */ +#define _RE_SYNTAX_POSIX_COMMON \ + (RE_CHAR_CLASSES | RE_DOT_NEWLINE | RE_DOT_NOT_NULL \ + | RE_INTERVALS | RE_NO_EMPTY_RANGES) + +#define RE_SYNTAX_POSIX_BASIC \ + (_RE_SYNTAX_POSIX_COMMON | RE_BK_PLUS_QM) + +/* Differs from ..._POSIX_BASIC only in that RE_BK_PLUS_QM becomes + RE_LIMITED_OPS, i.e., \? \+ \| are not recognized. Actually, this + isn't minimal, since other operators, such as \`, aren't disabled. */ +#define RE_SYNTAX_POSIX_MINIMAL_BASIC \ + (_RE_SYNTAX_POSIX_COMMON | RE_LIMITED_OPS) + +#define RE_SYNTAX_POSIX_EXTENDED \ + (_RE_SYNTAX_POSIX_COMMON | RE_CONTEXT_INDEP_ANCHORS \ + | RE_CONTEXT_INDEP_OPS | RE_NO_BK_BRACES \ + | RE_NO_BK_PARENS | RE_NO_BK_VBAR \ + | RE_UNMATCHED_RIGHT_PAREN_ORD) + +/* Differs from ..._POSIX_EXTENDED in that RE_CONTEXT_INVALID_OPS + replaces RE_CONTEXT_INDEP_OPS and RE_NO_BK_REFS is added. */ +#define RE_SYNTAX_POSIX_MINIMAL_EXTENDED \ + (_RE_SYNTAX_POSIX_COMMON | RE_CONTEXT_INDEP_ANCHORS \ + | RE_CONTEXT_INVALID_OPS | RE_NO_BK_BRACES \ + | RE_NO_BK_PARENS | RE_NO_BK_REFS \ + | RE_NO_BK_VBAR | RE_UNMATCHED_RIGHT_PAREN_ORD) +/* [[[end syntaxes]]] */ + +/* Maximum number of duplicates an interval can allow. Some systems + (erroneously) define this in other header files, but we want our + value, so remove any previous define. */ +#ifdef RE_DUP_MAX +#undef RE_DUP_MAX +#endif +#define RE_DUP_MAX ((1 << 15) - 1) + + +/* POSIX `cflags' bits (i.e., information for `regcomp'). */ + +/* If this bit is set, then use extended regular expression syntax. + If not set, then use basic regular expression syntax. */ +#define REG_EXTENDED 1 + +/* If this bit is set, then ignore case when matching. + If not set, then case is significant. */ +#define REG_ICASE (REG_EXTENDED << 1) + +/* If this bit is set, then anchors do not match at newline + characters in the string. + If not set, then anchors do match at newlines. */ +#define REG_NEWLINE (REG_ICASE << 1) + +/* If this bit is set, then report only success or fail in regexec. + If not set, then returns differ between not matching and errors. */ +#define REG_NOSUB (REG_NEWLINE << 1) + + +/* POSIX `eflags' bits (i.e., information for regexec). */ + +/* If this bit is set, then the beginning-of-line operator doesn't match + the beginning of the string (presumably because it's not the + beginning of a line). + If not set, then the beginning-of-line operator does match the + beginning of the string. */ +#define REG_NOTBOL 1 + +/* Like REG_NOTBOL, except for the end-of-line. */ +#define REG_NOTEOL (1 << 1) + + +/* If any error codes are removed, changed, or added, update the + `re_error_msg' table in regex.c. */ +typedef enum +{ + REG_NOERROR = 0, /* Success. */ + REG_NOMATCH, /* Didn't find a match (for regexec). */ + + /* POSIX regcomp return error codes. (In the order listed in the + standard.) */ + REG_BADPAT, /* Invalid pattern. */ + REG_ECOLLATE, /* Not implemented. */ + REG_ECTYPE, /* Invalid character class name. */ + REG_EESCAPE, /* Trailing backslash. */ + REG_ESUBREG, /* Invalid back reference. */ + REG_EBRACK, /* Unmatched left bracket. */ + REG_EPAREN, /* Parenthesis imbalance. */ + REG_EBRACE, /* Unmatched \{. */ + REG_BADBR, /* Invalid contents of \{\}. */ + REG_ERANGE, /* Invalid range end. */ + REG_ESPACE, /* Ran out of memory. */ + REG_BADRPT, /* No preceding re for repetition op. */ + + /* Error codes we've added. */ + REG_EEND, /* Premature end. */ + REG_ESIZE, /* Compiled pattern bigger than 2^16 bytes. */ + REG_ERPAREN /* Unmatched ) or \); not returned from regcomp. */ +} reg_errcode_t; + +/* This data structure represents a compiled pattern. Before calling + the pattern compiler, the fields `buffer', `allocated', `fastmap', + `translate', and `no_sub' can be set. After the pattern has been + compiled, the `re_nsub' field is available. All other fields are + private to the regex routines. */ + +struct re_pattern_buffer +{ +/* [[[begin pattern_buffer]]] */ + /* Space that holds the compiled pattern. It is declared as + `unsigned char *' because its elements are + sometimes used as array indexes. */ + unsigned char *buffer; + + /* Number of bytes to which `buffer' points. */ + unsigned long allocated; + + /* Number of bytes actually used in `buffer'. */ + unsigned long used; + + /* Syntax setting with which the pattern was compiled. */ + reg_syntax_t syntax; + + /* Pointer to a fastmap, if any, otherwise zero. re_search uses + the fastmap, if there is one, to skip over impossible + starting points for matches. */ + char *fastmap; + + /* Either a translate table to apply to all characters before + comparing them, or zero for no translation. The translation + is applied to a pattern when it is compiled and to a string + when it is matched. */ + char *translate; + + /* Number of subexpressions found by the compiler. */ + size_t re_nsub; + + /* Zero if this pattern cannot match the empty string, one else. + Well, in truth it's used only in `re_search_2', to see + whether or not we should use the fastmap, so we don't set + this absolutely perfectly; see `re_compile_fastmap' (the + `duplicate' case). */ + unsigned can_be_null : 1; + + /* If REGS_UNALLOCATED, allocate space in the `regs' structure + for `max (RE_NREGS, re_nsub + 1)' groups. + If REGS_REALLOCATE, reallocate space if necessary. + If REGS_FIXED, use what's there. */ +#define REGS_UNALLOCATED 0 +#define REGS_REALLOCATE 1 +#define REGS_FIXED 2 + unsigned regs_allocated : 2; + + /* Set to zero when `regex_compile' compiles a pattern; set to one + by `re_compile_fastmap' if it updates the fastmap. */ + unsigned fastmap_accurate : 1; + + /* If set, `re_match_2' does not return information about + subexpressions. */ + unsigned no_sub : 1; + + /* If set, a beginning-of-line anchor doesn't match at the + beginning of the string. */ + unsigned not_bol : 1; + + /* Similarly for an end-of-line anchor. */ + unsigned not_eol : 1; + + /* If true, an anchor at a newline matches. */ + unsigned newline_anchor : 1; + +/* [[[end pattern_buffer]]] */ +}; + +#if 0 +typedef struct re_pattern_buffer regex_t; +#endif + + +/* Type for byte offsets within the string. POSIX mandates this. */ +typedef int regoff_t; + + +/* This is the structure we store register match data in. See + regex.texinfo for a full description of what registers match. */ +struct re_registers +{ + unsigned num_regs; + regoff_t *start; + regoff_t *end; +}; + + +/* If `regs_allocated' is REGS_UNALLOCATED in the pattern buffer, + `re_match_2' returns information about at least this many registers + the first time a `regs' structure is passed. */ +#ifndef RE_NREGS +#define RE_NREGS 30 +#endif + +#if 0 +/* POSIX specification for registers. Aside from the different names than + `re_registers', POSIX uses an array of structures, instead of a + structure of arrays. */ +typedef struct +{ + regoff_t rm_so; /* Byte offset from string's start to substring's start. */ + regoff_t rm_eo; /* Byte offset from string's start to substring's end. */ +} regmatch_t; +#endif + + +/* Declarations for routines. */ + +/* To avoid duplicating every routine declaration -- once with a + prototype (if we are ANSI), and once without (if we aren't) -- we + use the following macro to declare argument types. This + unfortunately clutters up the declarations a bit, but I think it's + worth it. */ + +#if __STDC__ + +#define _RE_ARGS(args) args + +#else /* not __STDC__ */ + +#define _RE_ARGS(args) () + +#endif /* not __STDC__ */ + +/* Sets the current default syntax to SYNTAX, and return the old syntax. + You can also simply assign to the `re_syntax_options' variable. */ +extern reg_syntax_t re_set_syntax _RE_ARGS ((reg_syntax_t syntax)); + +/* Compile the regular expression PATTERN, with length LENGTH + and syntax given by the global `re_syntax_options', into the buffer + BUFFER. Return NULL if successful, and an error string if not. */ +extern const char *re_compile_pattern + _RE_ARGS ((const char *pattern, int length, + struct re_pattern_buffer *buffer)); + + +/* Compile a fastmap for the compiled pattern in BUFFER; used to + accelerate searches. Return 0 if successful and -2 if was an + internal error. */ +extern int re_compile_fastmap _RE_ARGS ((struct re_pattern_buffer *buffer)); + + +/* Search in the string STRING (with length LENGTH) for the pattern + compiled into BUFFER. Start searching at position START, for RANGE + characters. Return the starting position of the match, -1 for no + match, or -2 for an internal error. Also return register + information in REGS (if REGS and BUFFER->no_sub are nonzero). */ +extern int re_search + _RE_ARGS ((struct re_pattern_buffer *buffer, const char *string, + int length, int start, int range, struct re_registers *regs)); + + +/* Like `re_search', but search in the concatenation of STRING1 and + STRING2. Also, stop searching at index START + STOP. */ +extern int re_search_2 + _RE_ARGS ((struct re_pattern_buffer *buffer, const char *string1, + int length1, const char *string2, int length2, + int start, int range, struct re_registers *regs, int stop)); + + +/* Like `re_search', but return how many characters in STRING the regexp + in BUFFER matched, starting at position START. */ +extern int re_match + _RE_ARGS ((struct re_pattern_buffer *buffer, const char *string, + int length, int start, struct re_registers *regs)); + + +/* Relates to `re_match' as `re_search_2' relates to `re_search'. */ +extern int re_match_2 + _RE_ARGS ((struct re_pattern_buffer *buffer, const char *string1, + int length1, const char *string2, int length2, + int start, struct re_registers *regs, int stop)); + + +/* Set REGS to hold NUM_REGS registers, storing them in STARTS and + ENDS. Subsequent matches using BUFFER and REGS will use this memory + for recording register information. STARTS and ENDS must be + allocated with malloc, and must each be at least `NUM_REGS * sizeof + (regoff_t)' bytes long. + + If NUM_REGS == 0, then subsequent matches should allocate their own + register data. + + Unless this function is called, the first search or match using + PATTERN_BUFFER will allocate its own register data, without + freeing the old data. */ +extern void re_set_registers + _RE_ARGS ((struct re_pattern_buffer *buffer, struct re_registers *regs, + unsigned num_regs, regoff_t *starts, regoff_t *ends)); + +#ifdef _REGEX_RE_COMP +/* 4.2 bsd compatibility. */ +extern char *re_comp _RE_ARGS ((const char *)); +extern int re_exec _RE_ARGS ((const char *)); +#endif + +#if 0 +/* POSIX compatibility. */ +extern int regcomp _RE_ARGS ((regex_t *preg, const char *pattern, int cflags)); +extern int regexec + _RE_ARGS ((const regex_t *preg, const char *string, size_t nmatch, + regmatch_t pmatch[], int eflags)); +extern size_t regerror + _RE_ARGS ((int errcode, const regex_t *preg, char *errbuf, + size_t errbuf_size)); +extern void regfree _RE_ARGS ((regex_t *preg)); +#endif + +#endif /* not __REGEXP_LIBRARY_H__ */ + +/* +Local variables: +make-backup-files: t +version-control: t +trim-versions-without-asking: nil +End: +*/ diff -ruN old/mc-4.5.9/src/ext.c new/mc-4.5.10/src/ext.c --- old/mc-4.5.9/src/ext.c Mon Jan 18 17:44:10 1999 +++ new/mc-4.5.10/src/ext.c Sun Jan 31 18:55:18 1999 @@ -21,7 +21,6 @@ #include #include #include -#include #ifdef NEEDS_IO_H # include #endif @@ -31,16 +30,13 @@ # include #endif #include -#include #include #include -#include "mad.h" + +#include "global.h" #include "user.h" #include "main.h" -#include "fs.h" -#include "util.h" #include "dialog.h" -#include "global.h" #include "ext.h" #include "view.h" #include "main.h" @@ -52,7 +48,6 @@ #ifdef SCO_FLAVOR #include #endif /* SCO_FLAVOR */ -#include /* If set, we execute the file command to check the file type */ int use_file_to_check_type = 1; @@ -67,7 +62,7 @@ flush_extension_file (void) { if (data){ - free (data); + g_free (data); data = NULL; } @@ -89,13 +84,13 @@ temp_len = strlen (temp); current_len += temp_len + 2; - result = realloc (result, current_len); + result = g_realloc (result, current_len); if (!tail) tail = result; strcpy (tail, temp); strcat (tail, " "); tail += temp_len + 1; - free (temp); + g_free (temp); } return result; @@ -135,15 +130,17 @@ /* Note: this has to be done after the getlocalcopy call, * since it uses tmpnam as well */ - file_name = strdup (tmpnam (NULL)); + file_name = g_strdup (tmpnam (NULL)); + /* #warning FIXME: this is ugly */ if ((cmd_file_fd = open (file_name, O_RDWR | O_CREAT | O_TRUNC | O_EXCL, 0600)) == -1){ message (1, MSG_ERROR, _(" Can't create temporary command file \n %s "), unix_error_string (errno)); return; } cmd_file = fdopen (cmd_file_fd, "w"); - fprintf (cmd_file, "#!%s\n", shell); + /* FIXME: This is a hack, that makes us sure, we are using the right syntax */ + fprintf (cmd_file, "#!/bin/sh\n"); prompt [0] = 0; for (;*data && *data != '\n'; data++){ @@ -159,12 +156,12 @@ if (localcopy) { mc_ungetlocalcopy (filename, localcopy, 0); } - free (file_name); + g_free (file_name); return; } fputs (parameter, cmd_file); written_nonspace = 1; - free (parameter); + g_free (parameter); } else { int len = strlen (prompt); @@ -192,7 +189,7 @@ data += i - 1; } else if ((i = check_format_var (data, &v)) > 0 && v){ fputs (v, cmd_file); - free (v); + g_free (v); data += i; } else { char *text; @@ -203,7 +200,7 @@ if (localcopy == NULL) { fclose(cmd_file); unlink(file_name); - free(file_name); + g_free (file_name); return; } mc_stat (localcopy, &mystat); @@ -222,7 +219,7 @@ strcpy (p, text); p = strchr (p, 0); } - free (text); + g_free (text); written_nonspace = 1; } } @@ -304,7 +301,7 @@ mc_stat (localcopy, &mystat); mc_ungetlocalcopy (filename, localcopy, localmtime != mystat.st_mtime); } - free (file_name); + g_free (file_name); } #ifdef FILE_L @@ -377,13 +374,13 @@ check_stock_mc_ext: extension_file = concat_dir_and_file (mc_home, MC_LIB_EXT); if ((data = load_file (extension_file)) == NULL) { - free (buffer); + g_free (buffer); return 0; } if (!strstr (data, "default/")) { if (!strstr (data, "regex/") && !strstr (data, "shell/") && !strstr (data, "type/")) { - free (data); + g_free (data); data = NULL; if (extension_file == buffer) { home_error = 1; @@ -391,18 +388,18 @@ } else { char *msg; char *msg2; - msg = copy_strings(" ", mc_home, MC_LIB_EXT, _(" file error"), NULL); - msg2 = copy_strings(_("Format of the "), + msg = g_strconcat (" ", mc_home, MC_LIB_EXT, _(" file error"), NULL); + msg2 = g_strconcat (_("Format of the "), mc_home, ("mc.ext file has changed\n\ with version 3.0. It seems that installation\n\ failed. Please fetch a fresh new copy from the\n\ Midnight Commander package or in case you don't\n\ -have any, get it from ftp://ftp.nuclecu.unam.mx."), 0); +have any, get it from ftp://ftp.nuclecu.unam.mx."), NULL); message (1, msg, msg2); - free (msg); - free (msg2); - free (buffer); + g_free (msg); + g_free (msg2); + g_free (buffer); return 0; } } @@ -410,22 +407,22 @@ if (home_error) { char *msg; char *msg2; - msg = copy_strings(" ~/", MC_USER_EXT, _(" file error "), NULL); - msg2 = copy_strings(_("Format of the ~/"), MC_USER_EXT, _(" file has changed\n\ + msg = g_strconcat (" ~/", MC_USER_EXT, _(" file error "), NULL); + msg2 = g_strconcat (_("Format of the ~/"), MC_USER_EXT, _(" file has changed\n\ with version 3.0. You may want either to\n\ copy it from "), mc_home, _("mc.ext or use that\n\ file as an example of how to write it.\n\ -"), mc_home, _("mc.ext will be used for this moment."), 0); +"), mc_home, _("mc.ext will be used for this moment."), NULL); message (1, msg, msg2); - free (msg); - free (msg2); + g_free (msg); + g_free (msg2); } - free (buffer); + g_free (buffer); } mc_stat (filename, &mystat); if (regex_command_title){ - free (regex_command_title); + g_free (regex_command_title); regex_command_title = NULL; } old_patterns = easy_patterns; @@ -495,11 +492,11 @@ if (islocal) { char *tmp = name_quote (filename, 0); char *command = - copy_strings (FILE_CMD, tmp, NULL); + g_strconcat (FILE_CMD, tmp, NULL); FILE *f = popen (command, "r"); - free (tmp); - free (command); + g_free (tmp); + g_free (command); if (f != NULL) { hasread = (fgets (content_string, 2047, f) != NULL); @@ -614,7 +611,7 @@ static char *q; if (to_return == NULL) { - to_return = xmalloc (512, "Action list"); + to_return = g_malloc (512); q = to_return; } else *(q++) = '='; /* Mark separator */ @@ -627,12 +624,12 @@ *r = c; c = *q; *q = 0; - to_return = strdup (r + 1); + to_return = g_strdup (r + 1); } else if (!strcmp (p, "Title") && regex_command_title == NULL) { *r = c; c = *q; *q = 0; - regex_command_title = strdup (r + 1); + regex_command_title = g_strdup (r + 1); } else { *r = c; c = *q; @@ -654,10 +651,10 @@ * we get filename as a pointer from cpanel->dir). */ if (p < q) { - char *filename_copy = strdup (filename); + char *filename_copy = g_strdup (filename); exec_extension (filename_copy, r + 1, drops, move_dir, view_at_line_number); - free (filename_copy); + g_free (filename_copy); to_return = "Success"; } diff -ruN old/mc-4.5.9/src/file.c new/mc-4.5.10/src/file.c --- old/mc-4.5.9/src/file.c Mon Jan 18 17:44:10 1999 +++ new/mc-4.5.10/src/file.c Sun Jan 31 18:55:18 1999 @@ -64,11 +64,9 @@ #ifdef NEEDS_IO_H # include #endif - #include #include "tty.h" #include -#include #include #ifdef HAVE_UNISTD_H # include @@ -81,9 +79,7 @@ #endif /* SCO_FLAVOR */ #include #include -#include "mad.h" -#include "regex.h" -#include "util.h" +#include "eregex.h" #include "dialog.h" #include "global.h" #include "setup.h" @@ -111,7 +107,7 @@ /* }}} */ -/* rcsid [] = "$Id: file.c,v 1.42 1999/01/18 17:53:11 unammx Exp $" */ +/* rcsid [] = "$Id: file.c,v 1.46 1999/01/31 19:15:49 unammx Exp $" */ int verbose = 1; @@ -125,9 +121,6 @@ /* If on, it gets a little scrict with dangerous operations */ int know_not_what_am_i_doing = 0; -/* mapping operations into names */ -char *operation_names [] = { N_("Copy"), N_("Move"), N_("Delete") }; - /* This is a hard link cache */ struct link { struct link *next; @@ -269,7 +262,7 @@ static char * transform_source (FileOpContext *ctx, char *source) { - char *s = strdup (source); + char *s = g_strdup (source); char *q; /* We remove \n from the filename since regex routines would use \n as an anchor */ @@ -279,7 +272,7 @@ *q = ' '; } q = do_transform_source (ctx, s); - free (s); + g_free (s); return q; } @@ -290,7 +283,7 @@ for (lp = *linklist; lp != NULL; lp = lp2){ lp2 = lp -> next; - free (lp); + g_free (lp); } *linklist = NULL; } @@ -349,8 +342,8 @@ message_1s (1, MSG_ERROR, _(" Could not make the hardlink ")); return 0; } - lp = (struct link *) xmalloc (sizeof (struct link) + strlen (src_name) - + strlen (dst_name) + 1, "Hardlink cache"); + lp = (struct link *) g_malloc (sizeof (struct link) + strlen (src_name) + + strlen (dst_name) + 1); if (lp){ lp->vfs = my_vfs; lp->ino = ino; @@ -407,30 +400,30 @@ if (ctx->stable_symlinks && *link_target != PATH_SEP) { char *p, *q, *r, *s; - p = strdup (src_path); + p = g_strdup (src_path); r = strrchr (p, PATH_SEP); if (r){ r[1] = 0; if (*dst_path == PATH_SEP) - q = strdup (dst_path); + q = g_strdup (dst_path); else - q = copy_strings (p, dst_path, 0); + q = g_strconcat (p, dst_path, NULL); r = strrchr (q, PATH_SEP); if (r){ r[1] = 0; - s = copy_strings (p, link_target, NULL); + s = g_strconcat (p, link_target, NULL); strcpy (link_target, s); - free (s); + g_free (s); s = diff_two_paths (q, link_target); if (s){ strcpy (link_target, s); - free (s); + g_free (s); } } - free (q); + g_free (q); } - free (p); + g_free (p); } retry_dst_symlink: if (mc_symlink (link_target, dst_path) == 0) @@ -486,8 +479,8 @@ uid_t src_uid; gid_t src_gid; #endif - char *buf = 0; - int buf_size = 8*1024; + char *buf = NULL; + int buf_size = BUF_8K; int src_desc, dest_desc = 0; int n_read, n_written; int src_mode; /* The mode of the source file */ @@ -656,7 +649,7 @@ continue; goto ret; } - buf = (char *) xmalloc (buf_size, "copy_file_file"); + buf = (char *) g_malloc (buf_size); ctx->eta_secs = 0.0; ctx->bps = 0; @@ -766,7 +759,7 @@ ret: if (buf) - free (buf); + g_free (buf); while ((resources & 1) && mc_close (src_desc) < 0){ temp_status = file_error (_(" Cannot close source file \"%s\" \n %s "), src_path); @@ -893,7 +886,7 @@ return FILE_SKIP; } - lp = xmalloc (sizeof (struct link), "parent_dirs"); + lp = g_new (struct link, 1); lp->vfs = vfs_type (s); lp->ino = cbuf.st_ino; lp->dev = cbuf.st_dev; @@ -906,11 +899,11 @@ if (move_over){ if (mc_rename (s, d) == 0){ - free (parent_dirs); + g_free (parent_dirs); return FILE_CONT; } } - dest_dir = copy_strings (d, 0); + dest_dir = g_strdup (d); } else { /* * If the destination directory exists, we want to copy the whole @@ -936,7 +929,7 @@ } else #endif { - dest_dir = copy_strings (d, 0); + dest_dir = g_strdup (d); goto dont_mkdir; } } @@ -948,7 +941,7 @@ goto ret; } - lp = xmalloc (sizeof (struct link), "dest_dirs"); + lp = g_new (struct link, 1); mc_stat (dest_dir, &buf); lp->vfs = vfs_type (dest_dir); lp->ino = buf.st_ino; @@ -997,17 +990,17 @@ */ return_status = copy_dir_dir (ctx, path, mdpath, 0, 0, delete, parent_dirs, progress_count, progress_bytes); - free (mdpath); + g_free (mdpath); } else { dest_file = concat_dir_and_file (dest_dir, x_basename (path)); return_status = copy_file_file (ctx, path, dest_file, 1, progress_count, progress_bytes, 0); - free (dest_file); + g_free (dest_file); } if (delete && return_status == FILE_CONT){ if (ctx->erase_at_end){ static struct link *tail; - lp = xmalloc (sizeof (struct link) + strlen (path), "erase_list"); + lp = g_malloc (sizeof (struct link) + strlen (path)); strcpy (lp->name, path); lp->st_mode = buf.st_mode; lp->next = 0; @@ -1029,9 +1022,9 @@ * next should be freed: .ado */ if (!next) - free (next); + g_free (next); #endif - free (path); + g_free (path); } mc_closedir (reading); @@ -1046,8 +1039,8 @@ #endif ret: - free (dest_dir); - free (parent_dirs); + g_free (dest_dir); + g_free (parent_dirs); return return_status; } @@ -1183,9 +1176,9 @@ mc_stat (s, &sbuf); if (mc_stat (d, &dbuf)) - destdir = copy_strings (d, 0); /* destination doesn't exist */ + destdir = g_strdup (d); /* destination doesn't exist */ else if (!ctx->dive_into_subdirs){ - destdir = copy_strings (d, 0); + destdir = g_strdup (d); move_over = 1; } else destdir = concat_dir_and_file (d, x_basename (s)); @@ -1208,7 +1201,7 @@ if (return_status == FILE_RETRY) goto retry_dst_stat; } - free (destdir); + g_free (destdir); return return_status; } @@ -1254,17 +1247,17 @@ return_status = erase_file (ctx, erase_list->name, 0, 0, 0); lp = erase_list; erase_list = erase_list->next; - free (lp); + g_free (lp); } } erase_dir_iff_empty (ctx, s); ret: - free (destdir); + g_free (destdir); for ( ; erase_list; ){ lp = erase_list; erase_list = erase_list->next; - free (lp); + g_free (lp); } return return_status; } @@ -1325,7 +1318,7 @@ continue; path = concat_dir_and_file (s, next->d_name); if (mc_lstat (path, &buf)){ - free (path); + g_free (path); return 1; } if (S_ISDIR (buf.st_mode)) @@ -1333,11 +1326,11 @@ != FILE_CONT); else return_status = erase_file (ctx, path, progress_count, progress_bytes, 0); - free (path); + g_free (path); /* .ado: OS/2 returns a block of memory DIR to next and must be freed */ #ifdef __os2__ if (!next) - free (next); + g_free (next); #endif } mc_closedir (reading); @@ -1528,7 +1521,7 @@ res = mc_lstat (fullname, &s); if (res != 0){ - free (fullname); + g_free (fullname); continue; } @@ -1544,7 +1537,7 @@ (*ret_marked)++; *ret_total += s.st_size; } - free (fullname); + g_free (fullname); } mc_closedir (dir); @@ -1584,7 +1577,7 @@ *ret_marked += subdir_count; *ret_total += subdir_bytes; - free (dir_name); + g_free (dir_name); } else { (*ret_marked)++; *ret_total += s->st_size; @@ -1629,12 +1622,12 @@ }; static char * -panel_operate_generate_prompt (char* cmd_buf, WPanel* panel, int operation, int only_one, +panel_operate_generate_prompt (WPanel* panel, int operation, int only_one, struct stat* src_stat) { register char *sp, *cp; register int i; - char format_string [200]; + char format_string [BUF_MEDIUM]; char *dp = format_string; char* source = NULL; @@ -1711,11 +1704,11 @@ if (only_one) { i = fmd_xlen - strlen(format_string) - 4; - sprintf (cmd_buf, format_string, name_trunc (source, i)); + g_snprintf (cmd_buf, sizeof (cmd_buf), format_string, name_trunc (source, i)); } else { - sprintf (cmd_buf, format_string, panel->marked); + g_snprintf (cmd_buf, sizeof (cmd_buf), format_string, panel->marked); i = strlen (cmd_buf) + 6 - fmd_xlen; if (i > 0) { @@ -1784,7 +1777,7 @@ } /* Generate confirmation prompt */ - source = panel_operate_generate_prompt (cmd_buf, panel, operation, only_one, &src_stat); + source = panel_operate_generate_prompt (panel, operation, only_one, &src_stat); /* Show confirmation dialog */ if (operation == OP_DELETE && confirm_delete){ @@ -1802,7 +1795,7 @@ return 0; } } else if (operation != OP_DELETE){ - ctx->rx.buffer = (char *) xmalloc (MC_MAXPATHLEN, "mask copying"); + ctx->rx.buffer = (char *) g_malloc (MC_MAXPATHLEN); ctx->rx.allocated = MC_MAXPATHLEN; ctx->rx.translate = 0; @@ -1818,23 +1811,23 @@ dest = file_mask_dialog (ctx, operation, cmd_buf, dest_dir, only_one, &do_bg); if (!dest){ - free (ctx->rx.buffer); + g_free (ctx->rx.buffer); file_op_context_destroy (ctx); return 0; } if (!*dest){ - free (ctx->rx.buffer); + g_free (ctx->rx.buffer); file_op_context_destroy (ctx); - free (dest); + g_free (dest); return 0; } } else { char *all = "^\\(.*\\)$"; re_compile_pattern (all, strlen (all), &ctx->rx); - ctx->dest_mask = strdup ("*"); + ctx->dest_mask = g_strdup ("*"); do_bg = FALSE; - dest = strdup (thedefault); + dest = g_strdup (thedefault); } } @@ -1843,7 +1836,7 @@ if (do_bg){ int v; - v = do_background (ctx, copy_strings (_(operation_names [operation]), ": ", panel->cwd, 0)); + v = do_background (ctx, g_strconcat (op_names [operation], ": ", panel->cwd, NULL)); if (v == -1){ message (1, MSG_ERROR, _(" Sorry, I could not put the job in background ")); } @@ -1864,11 +1857,11 @@ invalid data. */ if (dest) { if (mc_setctl (dest, MCCTL_WANT_STALE_DATA, NULL)) - save_dest = strdup(dest); + save_dest = g_strdup (dest); } if (panel->cwd) { if (mc_setctl (panel->cwd, MCCTL_WANT_STALE_DATA, NULL)) - save_cwd = strdup(panel->cwd); + save_cwd = g_strdup (panel->cwd); } ftpfs_hint_reread (0); @@ -1900,8 +1893,8 @@ if (temp == NULL){ value = transform_error; } else { - temp = get_full_name (dest, temp); - free (dest); + temp = concat_dir_and_file (dest, temp); + g_free (dest); dest = temp; temp = 0; @@ -1991,7 +1984,7 @@ #ifdef WITH_FULL_PATHS if (source_with_path) - free (source_with_path); + g_free (source_with_path); source_with_path = concat_dir_and_file (panel->cwd, source); #endif @@ -2002,13 +1995,13 @@ value = erase_file (ctx, source_with_path, &count, &bytes, 1); } else { if (temp) - free (temp); + g_free (temp); temp = transform_source (ctx, source_with_path); if (temp == NULL) value = transform_error; else { - temp = get_full_name (dest, temp); + temp = concat_dir_and_file (dest, temp); switch (operation){ case OP_COPY: @@ -2063,11 +2056,11 @@ if (save_cwd) { mc_setctl (save_cwd, MCCTL_NO_STALE_DATA, NULL); - free(save_cwd); + g_free (save_cwd); } if (save_dest) { mc_setctl (save_dest, MCCTL_NO_STALE_DATA, NULL); - free(save_dest); + g_free (save_dest); } ftpfs_hint_reread (1); @@ -2075,22 +2068,22 @@ free_linklist (&dest_dirs); #if WITH_FULL_PATHS if (source_with_path) - free (source_with_path); + g_free (source_with_path); #endif if (dest) - free (dest); + g_free (dest); if (temp) - free (temp); + g_free (temp); if (ctx->rx.buffer) { - free (ctx->rx.buffer); + g_free (ctx->rx.buffer); ctx->rx.buffer = NULL; } if (ctx->dest_mask) { - free (ctx->dest_mask); + g_free (ctx->dest_mask); ctx->dest_mask = NULL; } @@ -2139,7 +2132,7 @@ int file_error (char *format, char *file) { - sprintf (cmd_buf, format, + g_snprintf (cmd_buf, sizeof (cmd_buf), format, name_trunc (file, 30), unix_error_string (errno)); return do_file_error (cmd_buf); @@ -2155,7 +2148,8 @@ strcpy (nfile1, name_trunc (file1, 15)); strcpy (nfile2, name_trunc (file2, 15)); - sprintf (cmd_buf, format, nfile1, nfile2, unix_error_string (errno)); + g_snprintf (cmd_buf, sizeof (cmd_buf), format, nfile1, nfile2, + unix_error_string (errno)); return do_file_error (cmd_buf); } @@ -2169,7 +2163,7 @@ char *msg = mode == Foreground ? _("\n Directory not empty. \n Delete it recursively? ") : _("\n Background process: Directory not empty \n Delete it recursively? "); - text = copy_strings (_(" Delete: "), name_trunc (s, 30), " ", 0); + text = g_strconcat (_(" Delete: "), name_trunc (s, 30), " ", NULL); if (know_not_what_am_i_doing) query_set_sel (1); @@ -2180,14 +2174,14 @@ if (ctx->recursive_result != RECURSIVE_ABORT) do_refresh (); - free (text); + g_free (text); if (know_not_what_am_i_doing){ if (ctx->recursive_result == RECURSIVE_YES || ctx->recursive_result == RECURSIVE_ALWAYS){ - text = copy_strings ( + text = g_strconcat ( _(" Type 'yes' if you REALLY want to delete "), ctx->recursive_result == RECURSIVE_YES - ? name_trunc (s, 19) : _("all the directories "), " ", 0); + ? name_trunc (s, 19) : _("all the directories "), " ", NULL); confirm = input_dialog ( mode == Foreground ? _(" Recursive Delete ") : _(" Background process: Recursive Delete "), @@ -2195,8 +2189,8 @@ do_refresh (); if (!confirm || strcmp (confirm, _("yes"))) ctx->recursive_result = RECURSIVE_NEVER; - free (confirm); - free (text); + g_free (confirm); + g_free (text); } } } diff -ruN old/mc-4.5.9/src/filegui.c new/mc-4.5.10/src/filegui.c --- old/mc-4.5.9/src/filegui.c Mon Jan 18 17:44:11 1999 +++ new/mc-4.5.10/src/filegui.c Sun Jan 31 18:55:18 1999 @@ -70,7 +70,6 @@ #include #include "tty.h" #include -#include #include #ifdef HAVE_UNISTD_H # include @@ -83,22 +82,18 @@ #endif /* SCO_FLAVOR */ #include #include -#include -#include "mad.h" -#include "regex.h" +#include "eregex.h" +#include "global.h" #include "setup.h" -#include "util.h" #include "dialog.h" -#include "global.h" /* Needed by query_replace */ #include "color.h" #include "win.h" #include "dlg.h" -#include "widget.h" #define WANT_WIDGETS +#include "widget.h" /* Note the sequence */ #include "main.h" /* WANT_WIDGETS-> we get the the_hint def */ #include "layout.h" -#include "widget.h" #include "wtools.h" /* Needed for current_panel, other_panel and WTree */ @@ -351,7 +346,7 @@ file_eta_show (FileOpContext *ctx) { int eta_hours, eta_mins, eta_s; - char eta_buffer [30]; + char eta_buffer [BUF_TINY]; FileOpContextUI *ui; ui = ctx->ui; @@ -363,7 +358,7 @@ eta_hours = ctx->eta_secs / (60 * 60); eta_mins = (ctx->eta_secs - (eta_hours * 60 * 60)) / 60; eta_s = ctx->eta_secs - (eta_hours * 60 * 60 + eta_mins * 60); - sprintf (eta_buffer, "ETA %d:%02d.%02d", eta_hours, eta_mins, eta_s); + g_snprintf (eta_buffer, sizeof (eta_buffer), "ETA %d:%02d.%02d", eta_hours, eta_mins, eta_s); } else *eta_buffer = 0; @@ -373,7 +368,7 @@ static void file_bps_show (FileOpContext *ctx) { - char bps_buffer [30]; + char bps_buffer [BUF_TINY]; FileOpContextUI *ui; ui = ctx->ui; @@ -382,11 +377,11 @@ return; if (ctx->bps > 1024*1024) { - sprintf (bps_buffer, "%.2f MB/s", ctx->bps / (1024*1024.0)); + g_snprintf (bps_buffer, sizeof (bps_buffer), "%.2f MB/s", ctx->bps / (1024*1024.0)); } else if (ctx->bps > 1024){ - sprintf (bps_buffer, "%.2f KB/s", ctx->bps / 1024.0); + g_snprintf (bps_buffer, sizeof (bps_buffer), "%.2f KB/s", ctx->bps / 1024.0); } else if (ctx->bps > 1){ - sprintf (bps_buffer, "%ld B/s", ctx->bps); + g_snprintf (bps_buffer, sizeof (bps_buffer), "%ld B/s", ctx->bps); } else *bps_buffer = 0; @@ -591,7 +586,7 @@ rd_widgets [i].layout) #define ADD_RD_LABEL(ui,i,p1,p2)\ - sprintf (buffer, rd_widgets [i].text, p1, p2);\ + g_snprintf (buffer, sizeof (buffer), rd_widgets [i].text, p1, p2);\ add_widgetl (ui->replace_dlg,\ label_new (rd_widgets [i].ypos, rd_widgets [i].xpos, buffer, rd_widgets [i].tkname),\ rd_widgets [i].layout) @@ -600,7 +595,7 @@ init_replace (FileOpContext *ctx, enum OperationMode mode) { FileOpContextUI *ui; - char buffer [128]; + char buffer [BUF_SMALL]; static int rd_xlen = 60, rd_trunc = X_TRUNC; #ifdef ENABLE_NLS @@ -957,7 +952,7 @@ orig_mask = source_mask; if (!dest_dir || !*dest_dir){ if (source_mask) - free (source_mask); + g_free (source_mask); return dest_dir; } if (source_easy_patterns){ @@ -966,7 +961,7 @@ source_mask = convert_pattern (source_mask, match_file, 1); easy_patterns = source_easy_patterns; error = re_compile_pattern (source_mask, strlen (source_mask), &ctx->rx); - free (source_mask); + g_free (source_mask); } else error = re_compile_pattern (source_mask, strlen (source_mask), &ctx->rx); @@ -974,11 +969,11 @@ message_3s (1, MSG_ERROR, _("Invalid source pattern `%s' \n %s "), orig_mask, error); if (orig_mask) - free (orig_mask); + g_free (orig_mask); goto ask_file_mask; } if (orig_mask) - free (orig_mask); + g_free (orig_mask); ctx->dest_mask = strrchr (dest_dir, PATH_SEP); if (ctx->dest_mask == NULL) ctx->dest_mask = dest_dir; @@ -990,14 +985,14 @@ (ctx->dive_into_subdirs && ((!only_one && !is_wildcarded (ctx->dest_mask)) || (only_one && !mc_stat (dest_dir, &buf) && S_ISDIR (buf.st_mode))))) - ctx->dest_mask = strdup ("*"); + ctx->dest_mask = g_strdup ("*"); else { - ctx->dest_mask = strdup (ctx->dest_mask); + ctx->dest_mask = g_strdup (ctx->dest_mask); *orig_mask = 0; } if (!*dest_dir){ - free (dest_dir); - dest_dir = strdup ("./"); + g_free (dest_dir); + dest_dir = g_strdup ("./"); } if (val == B_USER) *do_background = 1; diff -ruN old/mc-4.5.9/src/filenot.c new/mc-4.5.10/src/filenot.c --- old/mc-4.5.9/src/filenot.c Mon Jan 18 17:44:11 1999 +++ new/mc-4.5.10/src/filenot.c Sun Jan 31 18:55:18 1999 @@ -10,9 +10,8 @@ #include #include -#include -#include "util.h" #include +#include "global.h" #include "../vfs/vfs.h" static char *get_absolute_name (char *file) @@ -20,9 +19,9 @@ char dir [MC_MAXPATHLEN]; if (file [0] == PATH_SEP) - return strdup (file); + return g_strdup (file); mc_get_current_wd (dir, MC_MAXPATHLEN); - return get_full_name (dir, file); + return concat_dir_and_file (dir, file); } static int @@ -47,12 +46,12 @@ p = concat_dir_and_file (s, ".."); q = vfs_canon (p); - free (p); + g_free (p); if (!(result = my_mkdir_rec (q, mode))) result = mc_mkdir (s, mode); - free (q); + g_free (q); return result; } @@ -71,7 +70,7 @@ char *p = vfs_canon (s); result = my_mkdir_rec (p, mode); - free (p); + g_free (p); } if (result == 0){ s = get_absolute_name (s); @@ -80,7 +79,7 @@ tree_add_entry (tree, s); #endif - free (s); + g_free (s); } return result; } @@ -101,7 +100,7 @@ tree_remove_entry (tree, s); #endif - free (s); + g_free (s); } return result; } diff -ruN old/mc-4.5.9/src/fileopctx.h new/mc-4.5.10/src/fileopctx.h --- old/mc-4.5.9/src/fileopctx.h Mon Jan 18 17:44:10 1999 +++ new/mc-4.5.10/src/fileopctx.h Sun Jan 31 18:55:18 1999 @@ -11,7 +11,7 @@ #include #include -#include "regex.h" +#include "eregex.h" /* This structure describes a context for file operations. It is used to update diff -ruN old/mc-4.5.9/src/find.c new/mc-4.5.10/src/find.c --- old/mc-4.5.9/src/find.c Mon Jan 18 17:44:10 1999 +++ new/mc-4.5.10/src/find.c Sun Jan 31 18:55:18 1999 @@ -25,16 +25,11 @@ #ifdef NEEDS_IO_H # include #endif -#include "fs.h" -#include /* For free() */ #include #include -#include #include #include #include "global.h" -#include "mad.h" -#include "util.h" #include "win.h" #include "color.h" #include "global.h" @@ -196,11 +191,11 @@ find_par_start: if (!in_start_dir) - in_start_dir = strdup ("."); + in_start_dir = g_strdup ("."); if (!in_start_name) - in_start_name = strdup (easy_patterns ? "*" : "."); + in_start_name = g_strdup (easy_patterns ? "*" : "."); if (!in_contents) - in_contents = strdup (""); + in_contents = g_strdup (""); find_dlg = create_dlg (0, 0, FIND_Y, FIND_X, dialog_colors, common_dialog_callback, "[Find File]", "findfile", @@ -238,16 +233,16 @@ #ifndef HAVE_GNOME case B_TREE: - temp_dir = strdup (in_start->buffer); + temp_dir = g_strdup (in_start->buffer); destroy_dlg (find_dlg); - free (in_start_dir); + g_free (in_start_dir); if (strcmp (temp_dir, ".") == 0){ - free (temp_dir); - temp_dir = strdup (cpanel->cwd); + g_free (temp_dir); + temp_dir = g_strdup (cpanel->cwd); } in_start_dir = tree (temp_dir); if (in_start_dir) - free (temp_dir); + g_free (temp_dir); else in_start_dir = temp_dir; /* Warning: Dreadful goto */ @@ -257,20 +252,20 @@ default: return_value = 1; - *start_dir = strdup (in_start->buffer); - *pattern = strdup (in_name->buffer); + *start_dir = g_strdup (in_start->buffer); + *pattern = g_strdup (in_name->buffer); - free (in_contents); + g_free (in_contents); if (in_with->buffer [0]){ - *content = strdup (in_with->buffer); - in_contents = strdup (*content); + *content = g_strdup (in_with->buffer); + in_contents = g_strdup (*content); } else *content = in_contents = NULL; - free (in_start_dir); - in_start_dir = strdup (*start_dir); - free (in_start_name); - in_start_name = strdup (*pattern); + g_free (in_start_dir); + in_start_dir = g_strdup (*start_dir); + g_free (in_start_name); + in_start_name = g_strdup (*pattern); } destroy_dlg (find_dlg); @@ -283,8 +278,8 @@ { dir_stack *new; - new = xmalloc (sizeof (dir_stack), "find: push_directory"); - new->name = strdup (dir); + new = g_new (dir_stack, 1); + new->name = g_strdup (dir); new->prev = dir_stack_base; dir_stack_base = new; } @@ -298,7 +293,7 @@ if (dir_stack_base){ name = dir_stack_base->name; next = dir_stack_base->prev; - free (dir_stack_base); + g_free (dir_stack_base); dir_stack_base = next; return name; } else @@ -324,18 +319,18 @@ if (old_dir){ if (strcmp (old_dir, dir)){ - free (old_dir); - old_dir = strdup (dir); + g_free (old_dir); + old_dir = g_strdup (dir); dirname = listbox_add_item (find_list, 0, 0, dir, 0); } } else { - old_dir = strdup (dir); + old_dir = g_strdup (dir); dirname = listbox_add_item (find_list, 0, 0, dir, 0); } - tmp_name = copy_strings (" ", file, 0); + tmp_name = g_strconcat (" ", file, NULL); listbox_add_item (find_list, 0, 0, tmp_name, dirname); - free (tmp_name); + g_free (tmp_name); } static void @@ -393,7 +388,7 @@ search_content (Dlg_head *h, char *directory, char *filename) { struct stat s; - char buffer [128]; + char buffer [BUF_SMALL]; char *fname, *p; int file_fd, pipe, ignoring; char c; @@ -401,19 +396,19 @@ pid_t pid; static char *egrep_path; - fname = get_full_name (directory, filename); + fname = concat_dir_and_file (directory, filename); if (mc_stat (fname, &s) != 0 && !S_ISREG (s.st_mode)){ - free (fname); + g_free (fname); return; } if (!S_ISREG (s.st_mode)){ - free (fname); + g_free (fname); return; } file_fd = mc_open (fname, O_RDONLY); - free (fname); + g_free (fname); if (file_fd == -1) return; @@ -432,7 +427,7 @@ return; } - sprintf (buffer, _("Grepping in %s"), name_trunc (filename, FIND2_X_USE)); + g_snprintf (buffer, sizeof (buffer), _("Grepping in %s"), name_trunc (filename, FIND2_X_USE)); label_set_text (status_label, buffer); mc_refresh (); @@ -458,9 +453,9 @@ *p = 0; ignoring = 1; - the_name = copy_strings (buffer, ":", filename, NULL); + the_name = g_strconcat (buffer, ":", filename, NULL); find_add_match (h, directory, the_name); - free (the_name); + g_free (the_name); } else { if (p - buffer < (sizeof (buffer)-1) && ISASCII (c) && isdigit (c)) *p++ = c; @@ -523,12 +518,12 @@ } if (find_ignore_dirs){ int found; - char *temp_dir = copy_strings (":", tmp, ":", 0); + char *temp_dir = g_strconcat (":", tmp, ":", NULL); found = strstr (find_ignore_dirs, temp_dir) != 0; - free (temp_dir); + g_free (temp_dir); if (found) - free (tmp); + g_free (tmp); else break; } else @@ -536,12 +531,12 @@ } strcpy (directory, tmp); - free (tmp); + g_free (tmp); if (verbose){ - char buffer [50]; + char buffer [BUF_SMALL]; - sprintf (buffer, _("Searching %s"), name_trunc (directory, FIND2_X_USE)); + g_snprintf (buffer, sizeof (buffer), _("Searching %s"), name_trunc (directory, FIND2_X_USE)); label_set_text (status_label, buffer); } dirp = mc_opendir (directory); @@ -561,7 +556,7 @@ return; } - tmp_name = get_full_name (directory, dp->d_name); + tmp_name = concat_dir_and_file (directory, dp->d_name); if (subdirs_left){ mc_lstat (tmp_name, &tmp_stat); @@ -578,7 +573,7 @@ find_add_match (h, directory, dp->d_name); } - free (tmp_name); + g_free (tmp_name); dp = mc_readdir (dirp); /* Displays the nice dot */ @@ -624,17 +619,17 @@ line = 0; } if (dir [0] == '.' && dir [1] == 0) - fullname = strdup (filename); + fullname = g_strdup (filename); else if (dir [0] == '.' && dir [1] == PATH_SEP) - fullname = get_full_name (dir+2, filename); + fullname = concat_dir_and_file (dir+2, filename); else - fullname = get_full_name (dir, filename); + fullname = concat_dir_and_file (dir, filename); if (edit) do_edit_at_line (fullname, line); else view_file_at_line (fullname, unparsed_view, use_internal_view, line); - free (fullname); + g_free (fullname); return MSG_HANDLED; } @@ -701,7 +696,7 @@ char *dir; if (old_dir){ - free (old_dir); + g_free (old_dir); old_dir = 0; } count = 0; @@ -709,7 +704,7 @@ /* Remove all the items in the stack */ while ((dir = pop_directory ()) != NULL) - free (dir); + g_free (dir); } static int @@ -810,14 +805,14 @@ /* Remove all the items in the stack */ while ((dir = pop_directory ()) != NULL) - free (dir); + g_free (dir); listbox_get_current (find_list, &file_tmp, &dir_tmp); if (dir_tmp) - *dirname = strdup (dir_tmp); + *dirname = g_strdup (dir_tmp); if (file_tmp) - *filename = strdup (file_tmp); + *filename = g_strdup (file_tmp); if (return_value == B_PANELIZE && *filename){ int status, link_to_dir, stalled_link; int next_free = 0; @@ -839,26 +834,26 @@ continue; dir = entry->data; if (dir [0] == '.' && dir [1] == 0) - name = strdup (filename); + name = g_strdup (filename); else if (dir [0] == '.' && dir [1] == PATH_SEP) - name = get_full_name (dir + 2, filename); + name = concat_dir_and_file (dir + 2, filename); else - name = get_full_name (dir, filename); + name = concat_dir_and_file (dir, filename); status = handle_path (list, name, &buf, next_free, &link_to_dir, &stalled_link); if (status == 0) { - free (name); + g_free (name); continue; } if (status == -1) { - free (name); + g_free (name); break; } /* don't add files more than once to the panel */ if (content_pattern && next_free > 0){ if (strcmp (list->list [next_free-1].fname, name) == 0) { - free (name); + g_free (name); continue; } } @@ -896,7 +891,7 @@ destroy_dlg (find_dlg); do_search (0); /* force do_search to release resources */ if (old_dir){ - free (old_dir); + g_free (old_dir); old_dir = 0; } return return_value; @@ -917,8 +912,8 @@ dirname = filename = NULL; is_start = 0; v = find_file (start_dir, pattern, content, &dirname, &filename); - free (start_dir); - free (pattern); + g_free (start_dir); + g_free (pattern); if (v == B_ENTER){ if (dirname || filename){ @@ -933,16 +928,16 @@ select_item (cpanel); } if (dirname) - free (dirname); + g_free (dirname); if (filename) - free (filename); + g_free (filename); break; } if (content) - free (content); + g_free (content); dir_and_file_set = dirname && filename; - if (dirname) free (dirname); - if (filename) free (filename); + if (dirname) g_free (dirname); + if (filename) g_free (filename); if (v == B_CANCEL) break; diff -ruN old/mc-4.5.9/src/fixhlp.c new/mc-4.5.10/src/fixhlp.c --- old/mc-4.5.9/src/fixhlp.c Mon Jan 18 17:44:11 1999 +++ new/mc-4.5.10/src/fixhlp.c Sun Jan 31 18:55:19 1999 @@ -23,8 +23,6 @@ #include #include "help.h" -#define BUFFER_SIZE 256 - static int width; /* Output width in characters */ static int col = 0; /* Current output column */ static FILE *toc_file; /* TOC file */ @@ -152,7 +150,7 @@ void printf_string (char *format, ...) { va_list args; - char buffer [BUFFER_SIZE]; + char buffer [BUF_LARGE]; va_start (args, format); vsprintf (buffer, format, args); @@ -163,7 +161,7 @@ int main (int argc, char **argv) { int len; /* Length of input line */ - char buffer [BUFFER_SIZE]; /* Input line */ + char buffer [BUF_LARGE]; /* Input line */ int i, j; char *p; int ignore_newline = 0; @@ -183,7 +181,7 @@ /* Repeat for each input line */ while (!feof (stdin)){ /* Read a line */ - if (!fgets (buffer, BUFFER_SIZE, stdin)){ + if (!fgets (buffer, sizeof(buffer), stdin)){ break; } in_row ++; diff -ruN old/mc-4.5.9/src/global.h new/mc-4.5.10/src/global.h --- old/mc-4.5.9/src/global.h Mon Jan 18 17:44:10 1999 +++ new/mc-4.5.10/src/global.h Sun Jan 31 18:55:18 1999 @@ -1,6 +1,13 @@ #ifndef __GLOBAL_H #define __GLOBAL_H +#include /* for free() and other usefull routins */ +#include "fs.h" +#include +#include "mem.h" +#include "util.h" +#include "mad.h" + extern char *home_dir; #ifdef min @@ -11,14 +18,21 @@ #undef max #endif -#define min(x,y) (x>y ? y: x) -#define max(x,y) (x>y ? x: y) +#define min(x, y) ((x) > (y) ? (y) : (x)) +#define max(x, y) ((x) > (y) ? (x) : (y)) -void refresh_screen (void *); +/* Just for keeping Your's brains from invention a proper size of the buffer :-) */ +#define BUF_10K 10240L +#define BUF_8K 8192L +#define BUF_4K 4096L +#define BUF_1K 1024L -#ifndef HAVE_STRDUP -char *strdup (const char *); -#endif +#define BUF_LARGE BUF_1K +#define BUF_MEDIUM 512 +#define BUF_SMALL 128 +#define BUF_TINY 64 + +void refresh_screen (void *); /* AIX compiler doesn't understand '\e' */ #define ESC_CHAR '\033' diff -ruN old/mc-4.5.9/src/help.c new/mc-4.5.10/src/help.c --- old/mc-4.5.9/src/help.c Mon Jan 18 17:44:10 1999 +++ new/mc-4.5.10/src/help.c Sun Jan 31 18:55:18 1999 @@ -41,14 +41,11 @@ #include #include #include -#include #include -#include "mad.h" +#include "global.h" #include "color.h" -#include "util.h" #include "dialog.h" #include "win.h" -#include "global.h" #include "mouse.h" #include "key.h" /* For mi_getch() */ #include "help.h" @@ -65,7 +62,7 @@ #define HISTORY_SIZE 20 #define HELP_WINDOW_WIDTH 62 -/* "$Id: help.c,v 1.8 1999/01/10 08:55:58 unammx Exp $" */ +/* "$Id: help.c,v 1.9 1999/01/27 01:09:01 timur Exp $" */ static char *data; /* Pointer to the loaded data file */ static int help_lines = 18; /* Lines in help viewer */ @@ -321,7 +318,7 @@ message (0, _(" Warning "), _(" Internal bug: Double start of link area ")); /* Allocate memory for a new link area */ - new = (Link_Area*) xmalloc (sizeof (Link_Area), "Help, link_area"); + new = g_new (Link_Area, 1); new->next = link_area; link_area = new; @@ -353,7 +350,7 @@ while (link_area){ current = link_area; link_area = current -> next; - free (current); + g_free (current); } inside_link_area = 0; } @@ -602,7 +599,7 @@ static Widget *mousedispatch_new (int y, int x, int yl, int xl) { - Widget *w = xmalloc (sizeof (Widget), "disp_new"); + Widget *w = g_new (Widget, 1); init_widget (w, y, x, yl, xl, (callback_fn) md_callback, 0, (mouse_h) help_event, NULL); @@ -756,7 +753,7 @@ interactive_display_finish (void) { clear_link_areas (); - free (data); + g_free (data); } void diff -ruN old/mc-4.5.9/src/hotlist.c new/mc-4.5.10/src/hotlist.c --- old/mc-4.5.9/src/hotlist.c Mon Jan 18 17:44:10 1999 +++ new/mc-4.5.10/src/hotlist.c Sun Jan 31 18:55:18 1999 @@ -32,7 +32,6 @@ #endif #include #include -#include /* For malloc() */ #include #include #include @@ -49,8 +48,7 @@ # include #endif #include "tty.h" -#include "mad.h" -#include "util.h" /* Needed for the externs */ +#include "global.h" #include "win.h" #include "color.h" #include "dlg.h" @@ -66,7 +64,6 @@ #include "panel.h" /* Needed for the externs */ #include "file.h" #include "main.h" -#include "global.h" #include "hotlist.h" #include "key.h" #include "command.h" @@ -163,7 +160,7 @@ { struct hotlist *hl; - hl = xmalloc (sizeof (struct hotlist), "new-hotlist"); + hl = g_new (struct hotlist, 1); hl->type = 0; hl->directory = hl->label = 0; @@ -204,12 +201,12 @@ text = _("Subgroup - press ENTER to see list"); #ifndef HAVE_X - p = copy_strings (" ", current_group->label, " ", (char *)0); + p = g_strconcat (" ", current_group->label, " ", NULL); if (!hotlist_state.moving) label_set_text (pname_group, name_trunc (p, dlg->cols - (UX*2+4))); else label_set_text (movelist_group, name_trunc (p, dlg->cols - (UX*2+4))); - free (p); + g_free (p); #endif } else { text = list->current->text; @@ -227,8 +224,8 @@ int i; \ \ if ((i = strlen (current->label) + 3) > buflen) { \ - free (buf); \ - buf = xmalloc (buflen = 1024 * (i/1024 + 1), "fill_listbox"); \ + g_free (buf); \ + buf = g_malloc (buflen = 1024 * (i/1024 + 1)); \ } \ buf[0] = '\0'; \ } while (0) @@ -240,7 +237,7 @@ static int buflen; if (!buf) - buf = xmalloc (buflen = 1024, "fill_listbox"); + buf = g_malloc (buflen = 1024); buf[0] = '\0'; while (current){ @@ -456,9 +453,9 @@ if (l_hotlist->current->data) { struct hotlist *hlp = (struct hotlist*) l_hotlist->current->data; if (hlp->type == HL_TYPE_ENTRY) { - char *tmp = copy_strings( "cd ", hlp->directory, NULL); + char *tmp = g_strconcat ( "cd ", hlp->directory, NULL); stuff (input_w (cmdline), tmp, 0); - free (tmp); + g_free (tmp); dlg_stop (h); h->ret_value = B_CANCEL; return 1; @@ -663,7 +660,7 @@ static void init_movelist (int list_type, struct hotlist *item) { int i; - char *hdr = copy_strings (_("Moving "), item->label, 0); + char *hdr = g_strconcat (_("Moving "), item->label, NULL); int movelist_cols = init_i18n_stuff (list_type, COLS - 6); do_refresh (); @@ -673,7 +670,7 @@ "movelist", DLG_CENTER|DLG_GRID); x_set_dialog_title (movelist_dlg, hdr); - free (hdr); + g_free (hdr); #define XTRACT(i) BY-4+hotlist_but[i].y, BX+hotlist_but[i].x, hotlist_but[i].ret_cmd, hotlist_but[i].flags, hotlist_but[i].text, hotlist_button_callback, 0, hotlist_but[i].tkname @@ -714,7 +711,7 @@ static char * find_group_section (struct hotlist *grp) { - return copy_strings (grp->directory, ".Group", (char *)0); + return g_strconcat (grp->directory, ".Group", NULL); } @@ -768,10 +765,10 @@ if (hotlist_state.running && type != HL_TYPE_COMMENT) { if (type == HL_TYPE_GROUP) { - char *lbl = copy_strings ("->", new->label, (char *)0); + char *lbl = g_strconcat ("->", new->label, NULL); listbox_add_item (l_hotlist, pos, 0, lbl, new); - free (lbl); + g_free (lbl); } else listbox_add_item (l_hotlist, pos, 0, new->label, new); listbox_select_entry (l_hotlist, l_hotlist->current); @@ -808,18 +805,26 @@ static int add_new_entry_input (char *header, char *text1, char *text2, char *help, char **r1, char **r2) { +#define RELATIVE_Y_BUTTONS 4 +#define RELATIVE_Y_LABEL_PTH 3 +#define RELATIVE_Y_INPUT_PTH 4 + QuickDialog Quick_input; - QuickWidget quick_widgets [] = { - { quick_button, 55, 80, 4, 0, N_("&Cancel"), 0, B_CANCEL, 0, 0, - XV_WLAY_DONTCARE, "button-cancel" }, - { quick_button, 30, 80, 4, 0, N_("&Insert"), 0, B_INSERT, 0, 0, - XV_WLAY_DONTCARE, "button-insert" }, - { quick_button, 10, 80, 4, 0, N_("&Append"), 0, B_APPEND, 0, 0, - XV_WLAY_DONTCARE, "button-append" }, - { quick_input, 4, 80, 4, 0, "",58, 0, 0, 0, XV_WLAY_BELOWCLOSE, "input-pth" }, - { quick_label, 3, 80, 3, 0, 0, 0, 0, 0, 0, XV_WLAY_DONTCARE, "label-pth" }, - { quick_input, 4, 80, 3, 0, "", 58, 0, 0, 0, XV_WLAY_BELOWCLOSE, "input-lbl" }, - { quick_label, 3, 80, 2, 0, 0, 0, 0, 0, 0, XV_WLAY_DONTCARE, "label-lbl" }, + static QuickWidget quick_widgets [] = { + { quick_button, 55, 80, RELATIVE_Y_BUTTONS, 0, N_("&Cancel"), 0, B_CANCEL, + 0, 0, XV_WLAY_DONTCARE, "button-cancel" }, + { quick_button, 30, 80, RELATIVE_Y_BUTTONS, 0, N_("&Insert"), 0, B_INSERT, + 0, 0, XV_WLAY_DONTCARE, "button-insert" }, + { quick_button, 10, 80, RELATIVE_Y_BUTTONS, 0, N_("&Append"), 0, B_APPEND, + 0, 0, XV_WLAY_DONTCARE, "button-append" }, + { quick_input, 4, 80, RELATIVE_Y_INPUT_PTH, 0, "",58, 0, + 0, 0, XV_WLAY_BELOWCLOSE, "input-pth" }, + { quick_label, RELATIVE_Y_LABEL_PTH, 80, 3, 0, 0, 0, 0, + 0, 0, XV_WLAY_DONTCARE, "label-pth" }, + { quick_input, 4, 80, 3, 0, "", 58, 0, + 0, 0, XV_WLAY_BELOWCLOSE, "input-lbl" }, + { quick_label, 3, 80, 2, 0, 0, 0, 0, + 0, 0, XV_WLAY_DONTCARE, "label-lbl" }, { 0 } }; int len; @@ -858,11 +863,11 @@ quick_widgets [i].y_divisions = lines1+lines2+7; Quick_input.ylen = lines1 + lines2 + 7; - quick_widgets [0].relative_y += (lines1 + lines2); - quick_widgets [1].relative_y += (lines1 + lines2); - quick_widgets [2].relative_y += (lines1 + lines2); - quick_widgets [3].relative_y += (lines1); - quick_widgets [4].relative_y += (lines1); + quick_widgets [0].relative_y = RELATIVE_Y_BUTTONS + (lines1 + lines2); + quick_widgets [1].relative_y = RELATIVE_Y_BUTTONS + (lines1 + lines2); + quick_widgets [2].relative_y = RELATIVE_Y_BUTTONS + (lines1 + lines2); + quick_widgets [3].relative_y = RELATIVE_Y_INPUT_PTH + (lines1); + quick_widgets [4].relative_y = RELATIVE_Y_LABEL_PTH + (lines1); quick_widgets [5].str_result = &my_str1; quick_widgets [3].str_result = &my_str2; @@ -891,9 +896,9 @@ return; if (ret == B_ENTER || ret == B_APPEND) - add2hotlist (strdup (title), strdup (url), HL_TYPE_ENTRY, 2); + add2hotlist (g_strdup (title),g_strdup (url), HL_TYPE_ENTRY, 2); else - add2hotlist (strdup (title), strdup (url), HL_TYPE_ENTRY, 1); + add2hotlist (g_strdup (title),g_strdup (url), HL_TYPE_ENTRY, 1); hotlist_state.modified = 1; } @@ -902,7 +907,7 @@ { int ret; QuickDialog Quick_input; - QuickWidget quick_widgets [] = { + static QuickWidget quick_widgets [] = { { quick_button, 55, 80, 1, 0, N_("&Cancel"), 0, B_CANCEL, 0, 0, XV_WLAY_DONTCARE, "button-cancel" }, { quick_button, 30, 80, 1, 0, N_("&Insert"), 0, B_INSERT, 0, 0, @@ -912,7 +917,8 @@ { quick_input, 4, 80, 0, 0, "", 58, 0, 0, 0, XV_WLAY_BELOWCLOSE, "input" }, { quick_label, 3, 80, 2, 0, 0, 0, 0, 0, 0, XV_WLAY_DONTCARE, "label" }, { 0 } }; - + int relative_y[] = {1, 1, 1, 0, 2}; /* the relative_x component from the + quick_widgets variable above */ int len; int i; int lines; @@ -946,7 +952,7 @@ Quick_input.ylen = lines + 6; for (i = 0; i < 4; i++) - quick_widgets [i].relative_y += 2 + lines; + quick_widgets [i].relative_y = relative_y[i] + 2 + lines; quick_widgets [3].str_result = &my_str; quick_widgets [3].text = ""; @@ -979,17 +985,16 @@ void add2hotlist_cmd (void) { char *prompt, *label; - char* cp = _("Label for \"%s\":"); - int l = strlen(cp); + char *cp = _("Label for \"%s\":"); + int l = strlen (cp); - prompt = xmalloc (strlen (cpanel->cwd) + l, "add2hotlist_cmd"); - sprintf (prompt, cp, name_trunc (cpanel->cwd, COLS-2*UX-(l+8))); + prompt = g_strdup_printf (cp, name_trunc (cpanel->cwd, COLS-2*UX-(l+8))); label = input_dialog (_(" Add to hotlist "), prompt, cpanel->cwd); - free (prompt); + g_free (prompt); if (!label || !*label) return; - add2hotlist (label, strdup (cpanel->cwd), HL_TYPE_ENTRY, 0); + add2hotlist (label,g_strdup (cpanel->cwd), HL_TYPE_ENTRY, 0); hotlist_state.modified = 1; } @@ -1004,10 +1009,10 @@ remove_group (current); if (current->label) - free (current->label); + g_free (current->label); if (current->directory) - free (current->directory); - free (current); + g_free (current->directory); + g_free (current); current = next; } @@ -1021,14 +1026,14 @@ char *header; int result; - header = copy_strings (_(" Remove: "), + header = g_strconcat (_(" Remove: "), name_trunc (entry->label, 30), " ", - 0); + NULL); result = query_dialog (header, _("\n Group not empty.\n Remove it?"), D_ERROR, 2, _("&No"), _("&Yes")); - free (header); + g_free (header); if (!result) return; @@ -1040,10 +1045,10 @@ unlink_entry (entry); if (entry->label) - free (entry->label); + g_free (entry->label); if (entry->directory) - free (entry->directory); - free (entry); + g_free (entry->directory); + g_free (entry); /* now remove list entry from screen */ listbox_remove_current (l_hotlist, 1); hotlist_state.modified = 1; @@ -1073,9 +1078,9 @@ case B_ENTER: if (l_hotlist->current->data) { struct hotlist *hlp = (struct hotlist*) l_hotlist->current->data; - target = strdup (hlp->directory); + target = g_strdup (hlp->directory); } else - target = strdup (l_hotlist->current->text); + target = g_strdup (l_hotlist->current->text); break; } @@ -1099,15 +1104,15 @@ while (profile_keys){ profile_keys = profile_iterator_next (profile_keys, &key, &value); - add2hotlist (strdup (value), strdup (key), HL_TYPE_GROUP, 0); + add2hotlist (g_strdup (value), g_strdup (key), HL_TYPE_GROUP, 0); } - free (group_section); + g_free (group_section); profile_keys = profile_init_iterator (grp->directory, profile_name); while (profile_keys){ profile_keys = profile_iterator_next (profile_keys, &key, &value); - add2hotlist (strdup (value), strdup (key), HL_TYPE_ENTRY, 0); + add2hotlist (g_strdup (value),g_strdup (key), HL_TYPE_ENTRY, 0); } for (current = grp->head; current; current = current->next) @@ -1149,8 +1154,8 @@ #define CHECK_BUF() \ do { \ if (tkn_length == tkn_buf_length) \ - tkn_buf = tkn_buf ? (realloc (tkn_buf, tkn_buf_length += 1024)) \ - : (malloc (tkn_buf_length = 1024)); \ + tkn_buf = tkn_buf ? ( g_realloc (tkn_buf, tkn_buf_length += 1024)) \ + : ( g_malloc (tkn_buf_length = 1024)); \ } while (0) tkn_length = 0; @@ -1249,22 +1254,22 @@ switch (tkn) { case TKN_GROUP: CHECK_TOKEN(TKN_STRING); - new_grp = add2hotlist (strdup (tkn_buf), 0, HL_TYPE_GROUP, 0); + new_grp = add2hotlist (g_strdup (tkn_buf), 0, HL_TYPE_GROUP, 0); SKIP_TO_EOL; hot_load_group (new_grp); current_group = grp; break; case TKN_ENTRY: CHECK_TOKEN(TKN_STRING); - label = strdup (tkn_buf); + label = g_strdup (tkn_buf); CHECK_TOKEN(TKN_URL); CHECK_TOKEN(TKN_STRING); - url = strdup (tkn_buf); + url = g_strdup (tkn_buf); add2hotlist (label, url, HL_TYPE_ENTRY, 0); SKIP_TO_EOL; break; case TKN_COMMENT: - label = strdup (tkn_buf); + label = g_strdup (tkn_buf); add2hotlist (label, 0, HL_TYPE_COMMENT, 0); break; case TKN_EOF: @@ -1297,22 +1302,22 @@ switch (tkn) { case TKN_GROUP: CHECK_TOKEN(TKN_STRING); - new_grp = add2hotlist (strdup (tkn_buf), 0, HL_TYPE_GROUP, 0); + new_grp = add2hotlist (g_strdup (tkn_buf), 0, HL_TYPE_GROUP, 0); SKIP_TO_EOL; hot_load_group (new_grp); current_group = grp; break; case TKN_ENTRY: CHECK_TOKEN(TKN_STRING); - label = strdup (tkn_buf); + label = g_strdup (tkn_buf); CHECK_TOKEN(TKN_URL); CHECK_TOKEN(TKN_STRING); - url = strdup (tkn_buf); + url = g_strdup (tkn_buf); add2hotlist (label, url, HL_TYPE_ENTRY, 0); SKIP_TO_EOL; break; case TKN_COMMENT: - label = strdup (tkn_buf); + label = g_strdup (tkn_buf); add2hotlist (label, 0, HL_TYPE_COMMENT, 0); break; case TKN_EOL: @@ -1333,7 +1338,7 @@ void *profile_keys; char *key, *value; - grp_section = copy_strings (section, ".Group", (char *)0); + grp_section = g_strconcat (section, ".Group", NULL); if (profile_has_section (section, profile_name)) profile_clean_section (section, profile_name); if (profile_has_section (grp_section, profile_name)) { @@ -1345,7 +1350,7 @@ } profile_clean_section (grp_section, profile_name); } - free (grp_section); + g_free (grp_section); } @@ -1370,30 +1375,30 @@ hotlist = new_hotlist (); hotlist->type = HL_TYPE_GROUP; - hotlist->label = strdup (_(" Top level group ")); + hotlist->label = g_strdup (_(" Top level group ")); hotlist->up = hotlist; /* * compatibility :-( */ - hotlist->directory = strdup ("Hotlist"); + hotlist->directory = g_strdup ("Hotlist"); - grp_section = copy_strings ("Hotlist", ".Group", (char *)0); + grp_section = g_strconcat ("Hotlist", ".Group", NULL); has_old_list = profile_has_section ("Hotlist", profile_name) || profile_has_section (grp_section, profile_name); - free (grp_section); + g_free (grp_section); if ((hotlist_file = fopen (hotlist_file_name, "r")) == 0) { int result; char *msg; - msg = copy_strings (_("Hotlist is now kept in file ~/"), + msg = g_strconcat (_("Hotlist is now kept in file ~/"), HOTLIST_FILENAME, "\n", _("MC will load hotlist from ~/"), PROFILE_NAME, "\n", _("and then delete [Hotlist] section there"), NULL); message (0, _(" Hotlist Load "), msg); - free (msg); + g_free (msg); load_group (hotlist); hotlist_state.loaded = 1; @@ -1408,11 +1413,11 @@ } else { char *msg; - msg = copy_strings (_("MC was unable to write ~/"), HOTLIST_FILENAME, + msg = g_strconcat (_("MC was unable to write ~/"), HOTLIST_FILENAME, _(" file, your old hotlist entries were not deleted"), NULL); message (D_ERROR, _(" Hotlist Load "), msg); - free (msg); + g_free (msg); } } else { hot_load_file (hotlist); @@ -1422,7 +1427,7 @@ int result; char *msg; - msg = copy_strings ( + msg = g_strconcat ( _("You have ~/"), HOTLIST_FILENAME, _(" file and [Hotlist] section in ~/"), PROFILE_NAME, "\n", _("Your ~/"), HOTLIST_FILENAME, _(" most probably was created\n"), _("by an earlier development version of MC\nand is more actual than ~/"), @@ -1447,7 +1452,7 @@ old = new_hotlist (); old->type = HL_TYPE_GROUP; - old->label = copy_strings (_(" Entries from ~/"), PROFILE_NAME, NULL); + old->label = g_strconcat (_(" Entries from ~/"), PROFILE_NAME, NULL); old->up = hotlist; old->head = hotlist->head; old->next = grp; @@ -1456,11 +1461,11 @@ if (!save_hotlist ()){ char *str; - str = copy_strings (_("MC was unable to write ~/"), HOTLIST_FILENAME, + str = g_strconcat (_("MC was unable to write ~/"), HOTLIST_FILENAME, _(" file your old hotlist entries were not deleted"), NULL); message (D_ERROR, _(" Hotlist Load "), str); - free (str); + g_free (str); } else remove_old_list = 1; hotlist_state.modified = 0; @@ -1493,7 +1498,7 @@ current->label, profile_name); } - free (group_section); + g_free (group_section); for (current = grp->head; current && current->type == HL_TYPE_GROUP; @@ -1576,7 +1581,7 @@ struct stat stat_buf; if (!hotlist_state.readonly && hotlist_state.modified && hotlist_file_name) { - char *fbak = copy_strings (hotlist_file_name, ".bak", 0); + char *fbak = g_strconcat (hotlist_file_name, ".bak", NULL); rename (hotlist_file_name, fbak); if ((hotlist_file = fopen (hotlist_file_name, "w")) != 0) { @@ -1593,7 +1598,7 @@ hotlist_state.modified = 0; } else rename (fbak, hotlist_file_name); - free (fbak); + g_free (fbak); } return saved; @@ -1607,20 +1612,20 @@ if (hotlist){ if (hotlist->label) - free (hotlist->label); + g_free (hotlist->label); if (hotlist->directory) - free (hotlist->directory); - free (hotlist); + g_free (hotlist->directory); + g_free (hotlist); } if (hotlist_file_name) - free (hotlist_file_name); + g_free (hotlist_file_name); hotlist_file_name = 0; hotlist = current_group = 0; l_hotlist = 0; current_group = 0; if (tkn_buf) - free (tkn_buf); + g_free (tkn_buf); } diff -ruN old/mc-4.5.9/src/info.c new/mc-4.5.10/src/info.c --- old/mc-4.5.9/src/info.c Mon Jan 18 17:44:10 1999 +++ new/mc-4.5.10/src/info.c Sun Jan 31 18:55:18 1999 @@ -22,9 +22,7 @@ #include #include #include -#include -#include "mad.h" -#include "util.h" /* statfs calls */ +#include "global.h" #include "mouse.h" /* Gpm_Event */ #include "color.h" #include "dlg.h" @@ -260,7 +258,7 @@ WInfo *info_new () { - WInfo *info = xmalloc (sizeof (WInfo), "panel_info"); + WInfo *info = g_new (WInfo, 1); init_widget (&info->widget, 0, 0, 0, 0, (callback_fn) info_callback, (destroy_fn) info_destroy, diff -ruN old/mc-4.5.9/src/key.c new/mc-4.5.10/src/key.c --- old/mc-4.5.9/src/key.c Mon Jan 18 17:44:10 1999 +++ new/mc-4.5.10/src/key.c Sun Jan 31 18:55:18 1999 @@ -23,7 +23,6 @@ #include #include -#include #include #include #ifdef HAVE_UNISTD_H @@ -37,9 +36,6 @@ #include "tty.h" #include #include -#include -#include "util.h" /* For xmalloc prototype */ -#include "mad.h" /* The memory debugger */ #include "global.h" #include "mouse.h" #include "key.h" @@ -107,7 +103,7 @@ { SelectList *new; - new = xmalloc (sizeof (SelectList), "add_select_channel"); + new = g_new (SelectList, 1); new->fd = fd; new->callback = callback; new->info = info; @@ -126,7 +122,7 @@ prev->next = p->next; else select_list = p->next; - free (p); + g_free (p); } prev = p; p = p->next; @@ -340,7 +336,7 @@ key_def *base, *p, *attach; for (base = attach = NULL; *seq; seq++){ - p = xmalloc (sizeof (key_def), "create_sequence"); + p = g_new (key_def, 1); if (!base) base = p; if (attach) attach->child = p; @@ -919,7 +915,7 @@ nodelay (stdscr, FALSE); #endif *p = 0; - return strdup (buffer); + return g_strdup (buffer); } /* xterm and linux console only: set keypad to numeric or application @@ -999,7 +995,7 @@ return; k_dispose (k->child); k_dispose (k->next); - free (k); + g_free (k); } void s_dispose (SelectList *sel) @@ -1008,7 +1004,7 @@ return; s_dispose (sel->next); - free (sel); + g_free (sel); } void done_key () diff -ruN old/mc-4.5.9/src/layout.c new/mc-4.5.10/src/layout.c --- old/mc-4.5.9/src/layout.c Mon Jan 18 17:44:10 1999 +++ new/mc-4.5.10/src/layout.c Sun Jan 31 18:55:18 1999 @@ -20,7 +20,6 @@ */ #include -#include #include #include #include @@ -41,10 +40,8 @@ # include #endif #include -#include #include "tty.h" -#include "mad.h" -#include "util.h" /* Needed for the externs */ +#include "global.h" #include "win.h" #include "color.h" #include "key.h" @@ -76,7 +73,7 @@ #include "x.h" -/* "$Id: layout.c,v 1.16 1999/01/10 08:56:00 unammx Exp $" */ +/* "$Id: layout.c,v 1.17 1999/01/27 01:09:08 timur Exp $" */ /* Controls the display of the rotating dash on the verbose mode */ int nice_rotating_dash = 1; @@ -901,14 +898,14 @@ char *get_nth_panel_name (int num) { - static char buffer [20]; + static char buffer [BUF_SMALL]; if (!num) return "New Left Panel"; else if (num == 1) return "New Right Panel"; else { - sprintf (buffer, "%ith Panel", num); + g_snprintf (buffer, sizeof (buffer), "%ith Panel", num); return buffer; } } @@ -1102,14 +1099,14 @@ if (panels [0].type == view_listing) { if (!strcmp (panel1->panel_name, get_nth_panel_name (0))) { - free (panel1->panel_name); - panel1->panel_name = strdup (get_nth_panel_name (1)); + g_free (panel1->panel_name); + panel1->panel_name = g_strdup (get_nth_panel_name (1)); } } if (panels [1].type == view_listing) { if (!strcmp (panel2->panel_name, get_nth_panel_name (1))) { - free (panel2->panel_name); - panel2->panel_name = strdup (get_nth_panel_name (0)); + g_free (panel2->panel_name); + panel2->panel_name = g_strdup (get_nth_panel_name (0)); } } diff -ruN old/mc-4.5.9/src/learn.c new/mc-4.5.10/src/learn.c --- old/mc-4.5.9/src/learn.c Mon Jan 18 17:44:11 1999 +++ new/mc-4.5.10/src/learn.c Sun Jan 31 18:55:18 1999 @@ -24,14 +24,12 @@ #endif #include #include -#include /* For malloc() */ #include #include #include #include #include "tty.h" -#include "mad.h" -#include "util.h" /* Needed for the externs and convert_controls */ +#include "global.h" #include "win.h" #include "color.h" #include "dlg.h" @@ -102,7 +100,7 @@ _(key_name_conv_tab [action - B_USER].longname)); mc_refresh (); if (learnkeys [action - B_USER].sequence != NULL) { - free (learnkeys [action - B_USER].sequence); + g_free (learnkeys [action - B_USER].sequence); learnkeys [action - B_USER].sequence = NULL; } seq = learn_key (); @@ -125,7 +123,7 @@ _(" You have entered \"%s\""), seq); } - free (seq); + g_free (seq); } dlg_run_done (d); @@ -235,7 +233,7 @@ { int x, y, i, j; key_code_name_t *key; - char buffer [22]; + char buffer [BUF_TINY]; static int i18n_flag = 0; do_refresh (); @@ -277,7 +275,7 @@ y = UY; for (key = key_name_conv_tab, j = 0; key->name != NULL && strcmp (key->name, "kpleft"); key++, j++); - learnkeys = (learnkey *) xmalloc (sizeof (learnkey) * j, "Learn keys"); + learnkeys = g_new (learnkey, j); x += ((j - 1) / ROWS) * COLSHIFT; y += (j - 1) % ROWS; learn_total = j; @@ -286,7 +284,7 @@ for (i = j - 1, key = key_name_conv_tab + j - 1; i >= 0; i--, key--) { learnkeys [i].ok = 0; learnkeys [i].sequence = NULL; - sprintf (buffer, "%-16s", _(key->longname)); + g_snprintf (buffer, sizeof (buffer), "%-16s", _(key->longname)); add_widget (learn_dlg, learnkeys [i].button = (Widget *) button_new (y, x, B_USER + i, NARROW_BUTTON, buffer, learn_button, 0, NULL)); add_widget (learn_dlg, learnkeys [i].label = (Widget *) @@ -317,7 +315,7 @@ { int i; int profile_changed = 0; - char *section = copy_strings ("terminal:", getenv ("TERM"), NULL); + char *section = g_strconcat ("terminal:", getenv ("TERM"), NULL); for (i = 0; i < learn_total; i++) { if (learnkeys [i].sequence != NULL) { diff -ruN old/mc-4.5.9/src/listmode.c new/mc-4.5.10/src/listmode.c --- old/mc-4.5.9/src/listmode.c Mon Jan 18 17:44:11 1999 +++ new/mc-4.5.10/src/listmode.c Sun Jan 31 18:55:18 1999 @@ -25,7 +25,6 @@ #endif #include #include -#include /* For malloc() */ #include #include #include @@ -34,8 +33,7 @@ # include #endif #include "tty.h" -#include "mad.h" -#include "util.h" /* Needed for the externs */ +#include "global.h" #include "win.h" #include "color.h" #include "dlg.h" @@ -48,7 +46,6 @@ #include "panel.h" /* Needed for the externs */ #include "file.h" #include "main.h" -#include "global.h" #include "listmode.h" #define UX 5 @@ -267,7 +264,7 @@ char *last; char *text, *extra; - newformat = xmalloc (1024, "collect_new_format"); + newformat = g_malloc (1024); if (radio_genwidth->sel) strcpy (newformat, "full "); else @@ -293,9 +290,9 @@ char *newformat = NULL; char *s; - s = strdup (oldlistformat); + s = g_strdup (oldlistformat); init_listmode (s); - free (s); + g_free (s); while (newformat == NULL) { @@ -306,7 +303,7 @@ switch (listmode_dlg->ret_value) { case B_CANCEL: - newformat = strdup (oldlistformat); + newformat = g_strdup (oldlistformat); break; case B_ADD: diff -ruN old/mc-4.5.9/src/mad.c new/mc-4.5.10/src/mad.c --- old/mc-4.5.9/src/mad.c Mon Jan 18 17:44:10 1999 +++ new/mc-4.5.10/src/mad.c Sun Jan 31 18:55:18 1999 @@ -19,12 +19,23 @@ #include #include "mad.h" + +#undef tempnam + #undef malloc #undef calloc #undef realloc #undef xmalloc #undef strdup #undef free + +#undef g_malloc +#undef g_malloc0 +#undef g_calloc +#undef g_realloc +#undef g_strdup +#undef g_free + #include #include #include @@ -32,6 +43,7 @@ #ifdef HAVE_UNISTD_H # include /* For getpid() */ #endif +#include /* Here to avoid non empty translation units */ #ifdef HAVE_MAD @@ -54,17 +66,26 @@ } mad_mem_area; static mad_mem_area mem_areas [MAD_MAX_AREAS]; +static FILE *memlog = stderr; + void *watch_free_pointer = 0; +void mad_set_debug (char *file) +{ + if((memlog=fopen (file, "w+")) == NULL) + memlog = stderr; +} + /* This function is only called by the mad_check function */ static void mad_abort (char *message, int area, char *file, int line) { - fprintf (stderr, "MAD: %s in area %d.\r\n", message, area); - fprintf (stderr, " Allocated in file \"%s\" at line %d.\r\n", + fprintf (memlog, "MAD: %s in area %d.\r\n", message, area); + fprintf (memlog, " Allocated in file \"%s\" at line %d.\r\n", mem_areas [area].file, mem_areas [area].line); - fprintf (stderr, " Discovered in file \"%s\" at line %d.\r\n", + fprintf (memlog, " Discovered in file \"%s\" at line %d.\r\n", file, line); - fprintf (stderr, "MAD: Core dumping...\r\n"); + fprintf (memlog, "MAD: Core dumping...\r\n"); + fflush (memlog); kill (getpid (), 3); } @@ -83,6 +104,7 @@ if (*(mem_areas [i].end_sig) != MAD_SIGNATURE) mad_abort ("Overwrite error: Bad end signature", i, file, line); } + fflush (memlog); } /* Allocates a memory area. Used instead of malloc and calloc. */ @@ -98,21 +120,23 @@ break; } if (i >= MAD_MAX_AREAS){ - fprintf (stderr, "MAD: Out of memory area handles. Increase the value of MAD_MAX_AREAS.\r\n"); - fprintf (stderr, " Discovered in file \"%s\" at line %d.\r\n", + fprintf (memlog, "MAD: Out of memory area handles. Increase the value of MAD_MAX_AREAS.\r\n"); + fprintf (memlog, " Discovered in file \"%s\" at line %d.\r\n", file, line); - fprintf (stderr, "MAD: Aborting...\r\n"); + fprintf (memlog, "MAD: Aborting...\r\n"); + fflush (memlog); abort (); } mem_areas [i].in_use = 1; size = (size + 3) & (~3); /* Alignment */ - area = (char*) malloc (size + 2 * sizeof (long)); + area = (char*) g_malloc (size + 2 * sizeof (long)); if (!area){ - fprintf (stderr, "MAD: Out of memory.\r\n"); - fprintf (stderr, " Discovered in file \"%s\" at line %d.\r\n", + fprintf (memlog, "MAD: Out of memory.\r\n"); + fprintf (memlog, " Discovered in file \"%s\" at line %d.\r\n", file, line); - fprintf (stderr, "MAD: Aborting...\r\n"); + fprintf (memlog, "MAD: Aborting...\r\n"); + fflush (memlog); abort (); } @@ -148,20 +172,22 @@ break; } if (i >= MAD_MAX_AREAS){ - fprintf (stderr, "MAD: Attempted to realloc unallocated pointer: %p.\r\n", ptr); - fprintf (stderr, " Discovered in file \"%s\" at line %d.\r\n", + fprintf (memlog, "MAD: Attempted to realloc unallocated pointer: %p.\r\n", ptr); + fprintf (memlog, " Discovered in file \"%s\" at line %d.\r\n", file, line); - fprintf (stderr, "MAD: Aborting...\r\n"); + fprintf (memlog, "MAD: Aborting...\r\n"); + fflush (memlog); abort (); } newsize = (newsize + 3) & (~3); /* Alignment */ - area = (char*) realloc (mem_areas [i].start_sig, newsize + 2 * sizeof (long)); + area = (char*) g_realloc (mem_areas [i].start_sig, newsize + 2 * sizeof (long)); if (!area){ - fprintf (stderr, "MAD: Out of memory.\r\n"); - fprintf (stderr, " Discovered in file \"%s\" at line %d.\r\n", + fprintf (memlog, "MAD: Out of memory.\r\n"); + fprintf (memlog, " Discovered in file \"%s\" at line %d.\r\n", file, line); - fprintf (stderr, "MAD: Aborting...\r\n"); + fprintf (memlog, "MAD: Aborting...\r\n"); + fflush (memlog); abort (); } @@ -179,6 +205,16 @@ return mem_areas [i].data; } +/* Allocates a memory area. Used instead of malloc and calloc. */ +void *mad_alloc0 (int size, char *file, int line) +{ + char *t; + + t = (char *) mad_alloc (size, file, line); + memset (t, 0, size); + return (void *) t; +} + /* Duplicates a character string. Used instead of strdup. */ char *mad_strdup (const char *s, char *file, int line) { @@ -197,13 +233,15 @@ mad_check (file, line); if (watch_free_pointer && ptr == watch_free_pointer){ - fprintf (stderr, "MAD: Watch free pointer found in file \"%s\" at line %d.\r\n", + fprintf (memlog, "MAD: Watch free pointer found in file \"%s\" at line %d.\r\n", file, line); + fflush (memlog); } if (ptr == NULL){ - fprintf (stderr, "MAD: Attempted to free a NULL pointer in file \"%s\" at line %d.\r\n", + fprintf (memlog, "MAD: Attempted to free a NULL pointer in file \"%s\" at line %d.\r\n", file, line); + fflush (memlog); return; } @@ -214,14 +252,15 @@ break; } if (i >= MAD_MAX_AREAS){ - fprintf (stderr, "MAD: Attempted to free an unallocated pointer: %p.\r\n", ptr); - fprintf (stderr, " Discovered in file \"%s\" at line %d.\r\n", + fprintf (memlog, "MAD: Attempted to free an unallocated pointer: %p.\r\n", ptr); + fprintf (memlog, " Discovered in file \"%s\" at line %d.\r\n", file, line); - fprintf (stderr, "MAD: Aborting...\r\n"); + fprintf (memlog, "MAD: Aborting...\r\n"); + fflush (memlog); abort (); } - - free (mem_areas [i].start_sig); + + g_free (mem_areas [i].start_sig); mem_areas [i].in_use = 0; } @@ -230,7 +269,7 @@ char *t, *u; t = tempnam(a,b); u = mad_strdup(t, "(mad_tempnam)", 0); - free(t); + g_free(t); return u; } @@ -248,11 +287,12 @@ for (i = 0; i < MAD_MAX_AREAS; i++){ if (! mem_areas [i].in_use) continue; - fprintf (stderr, "MAD: Unfreed pointer: %p.\r\n", mem_areas [i].data); - fprintf (stderr, " Allocated in file \"%s\" at line %d.\r\n", + fprintf (memlog, "MAD: Unfreed pointer: %p.\r\n", mem_areas [i].data); + fprintf (memlog, " Allocated in file \"%s\" at line %d.\r\n", mem_areas [i].file, mem_areas [i].line); - fprintf (stderr, " Discovered in file \"%s\" at line %d.\r\n", + fprintf (memlog, " Discovered in file \"%s\" at line %d.\r\n", file, line); + fflush (memlog); } #endif } diff -ruN old/mc-4.5.9/src/mad.h new/mc-4.5.10/src/mad.h --- old/mc-4.5.9/src/mad.h Mon Jan 18 17:44:10 1999 +++ new/mc-4.5.10/src/mad.h Sun Jan 31 18:55:18 1999 @@ -3,7 +3,7 @@ /* To prevent molesting these files with the malloc/calloc/free macros. */ #include -#include +#include #ifdef HAVE_MAD # define INLINE @@ -28,7 +28,6 @@ #define tempnam(x,y) mad_tempnam (x, y) - #define malloc(x) mad_alloc (x, __FILE__, __LINE__) #define calloc(x, y) mad_alloc ((x) * (y), __FILE__, __LINE__) #define realloc(x, y) mad_realloc (x, y, __FILE__, __LINE__) @@ -36,8 +35,25 @@ #define strdup(x) mad_strdup (x, __FILE__, __LINE__) #define free(x) mad_free (x, __FILE__, __LINE__) +/* This defenitions are grabbed from GLib.h */ +#define g_new(type, count) \ + ((type *) g_malloc ((unsigned) sizeof (type) * (count))) +#define g_new0(type, count) \ + ((type *) g_malloc0 ((unsigned) sizeof (type) * (count))) +#define g_renew(type, mem, count) \ + ((type *) g_realloc (mem, (unsigned) sizeof (type) * (count))) + +#define g_malloc(x) mad_alloc (x, __FILE__, __LINE__) +#define g_malloc0(x) mad_alloc0 (x, __FILE__, __LINE__) +#define g_calloc(x, y) mad_alloc ((x) * (y), __FILE__, __LINE__) +#define g_realloc(x, y) mad_realloc (x, y, __FILE__, __LINE__) +#define g_strdup(x) mad_strdup (x, __FILE__, __LINE__) +#define g_free(x) mad_free (x, __FILE__, __LINE__) + +void mad_set_debug (char *file); void mad_check (char *file, int line); void *mad_alloc (int size, char *file, int line); +void *mad_alloc0 (int size, char *file, int line); void *mad_realloc (void *ptr, int newsize, char *file, int line); char *mad_strdup (const char *s, char *file, int line); void mad_free (void *ptr, char *file, int line); diff -ruN old/mc-4.5.9/src/main.c new/mc-4.5.10/src/main.c --- old/mc-4.5.9/src/main.c Mon Jan 18 17:44:10 1999 +++ new/mc-4.5.10/src/main.c Sun Jan 31 18:55:18 1999 @@ -84,13 +84,13 @@ # include "gcorba.h" #endif +#include + /* Program include files */ #include "x.h" -#include "mad.h" #include "dir.h" #include "color.h" #include "global.h" -#include "util.h" #include "dialog.h" #include "menu.h" #include "file.h" @@ -98,7 +98,6 @@ #include "main.h" #include "win.h" #include "user.h" -#include "mem.h" #include "mouse.h" #include "option.h" #include "tree.h" @@ -138,10 +137,9 @@ #include "../vfs/vfs.h" #include "../vfs/extfs.h" -#include #include "popt.h" -/* "$Id: main.c,v 1.72 1999/01/14 01:11:20 unammx Exp $" */ +/* "$Id: main.c,v 1.75 1999/01/28 04:37:53 unammx Exp $" */ /* When the modes are active, left_panel, right_panel and tree_panel */ /* Point to a proper data structure. You should check with the functions */ @@ -401,7 +399,7 @@ do_file_mark (panel, i, 0); } if (mc_lstat (list->list [i].fname, &list->list [i].buf)){ - free (list->list [i].fname); + g_free (list->list [i].fname); continue; } if (list->list [i].f.marked) @@ -428,13 +426,13 @@ panel->is_panelized = 0; ftpfs_flushdir (); - bzero (&(panel->dir_stat), sizeof (panel->dir_stat)); + memset (&(panel->dir_stat), 0, sizeof (panel->dir_stat)); } /* If current_file == -1 (an invalid pointer) then preserve selection */ if (current_file == UP_KEEPSEL){ free_pointer = 1; - current_file = strdup (panel->dir.list [panel->selected].fname); + current_file = g_strdup (panel->dir.list [panel->selected].fname); } else free_pointer = 0; @@ -447,7 +445,7 @@ panel->dirty = 1; if (free_pointer) - free (current_file); + g_free (current_file); #ifdef HAVE_X paint_panel (panel); @@ -567,13 +565,13 @@ return; } #endif - data = (char *) xmalloc (s.st_size+1, "main, parse_control_file"); + data = (char *) g_malloc (s.st_size+1); if (!data){ fclose (file); return; } if (s.st_size != fread (data, 1, s.st_size, file)){ - free (data); + g_free (data); fclose (file); return; } @@ -631,7 +629,7 @@ current = strtok (NULL, " \t\n"); } - free (data); + g_free (data); paint_panel (cpanel); paint_panel (opanel); } @@ -705,7 +703,7 @@ char *old_vfs_dir = 0; if (!vfs_current_is_local ()) - old_vfs_dir = strdup (vfs_get_current_dir ()); + old_vfs_dir = g_strdup (vfs_get_current_dir ()); #endif save_cwds_stat (); @@ -767,7 +765,7 @@ #ifdef USE_VFS if (old_vfs_dir){ mc_chdir (old_vfs_dir); - free (old_vfs_dir); + g_free (old_vfs_dir); } #endif @@ -899,25 +897,23 @@ directory_history_add (WPanel * panel, char *s) { if (!panel->dir_history) { - panel->dir_history = malloc (sizeof (Hist)); - memset (panel->dir_history, 0, sizeof (Hist)); - panel->dir_history->text = strdup (s); + panel->dir_history = g_new0 (Hist, 1); + panel->dir_history->text = g_strdup (s); return; } if (!strcmp (panel->dir_history->text, s)) return; if (panel->dir_history->next) { if (panel->dir_history->next->text) { - free (panel->dir_history->next->text); + g_free (panel->dir_history->next->text); panel->dir_history->next->text = 0; } } else { - panel->dir_history->next = malloc (sizeof (Hist)); - memset (panel->dir_history->next, 0, sizeof (Hist)); + panel->dir_history->next = g_new0 (Hist, 1); panel->dir_history->next->prev = panel->dir_history; } panel->dir_history = panel->dir_history->next; - panel->dir_history->text = strdup (s); + panel->dir_history->text = g_strdup (s); panel_update_marks (panel); } @@ -952,7 +948,7 @@ vfsid oldvfsid; struct vfs_stamping *parent; #endif - olddir = strdup (panel->cwd); + olddir = g_strdup (panel->cwd); translated_url = new_dir = vfs_translate_url (new_dir); /* Convert *new_path to a suitable pathname, handle ~user */ @@ -970,11 +966,11 @@ if (mc_chdir (directory) == -1){ strcpy (panel->cwd, olddir); - free (olddir); - free (translated_url); + g_free (olddir); + g_free (translated_url); return 0; } - free (translated_url); + g_free (translated_url); /* Success: save previous directory, shutdown status of previous dir */ strcpy (panel->lwd, olddir); @@ -1005,7 +1001,7 @@ load_hint (); panel_update_contents (panel); - free (olddir); + g_free (olddir); return 1; } @@ -1060,7 +1056,7 @@ r = _do_panel_cd (panel, s, cd_exact); if (r) directory_history_add (panel, panel->cwd); - free (s); + g_free (s); } } } @@ -1140,10 +1136,10 @@ if (sort_order == (sortfn *) unsorted){ char *current_file; - current_file = strdup (cpanel->dir.list [cpanel->selected].fname); + current_file = g_strdup (cpanel->dir.list [cpanel->selected].fname); panel_reload (cpanel); try_to_select (cpanel, current_file); - free (current_file); + g_free (current_file); } do_re_sort (p); } @@ -1173,7 +1169,7 @@ sel_dir = tree (selection (cpanel)->fname); if (sel_dir){ do_cd(sel_dir, cd_exact); - free (sel_dir); + g_free (sel_dir); } } #endif @@ -1185,7 +1181,7 @@ char *newmode; newmode = listmode_edit ("half name,|,size:8,|,perm:4+"); message (0, " Listing format edit ", " New mode is \"%s\" ", newmode); - free (newmode); + g_free (newmode); } #endif @@ -1449,7 +1445,7 @@ newdir = vfs_translate_url (dir); mc_chdir (newdir); - free (newdir); + g_free (newdir); } #ifndef PORT_HAS_CREATE_PANELS @@ -1555,7 +1551,7 @@ int i; i = mc_readlink (p, buffer, MC_MAXPATHLEN); - free (p); + g_free (p); if (i > 0) { buffer [i] = 0; stuff (input_w (cmdline), buffer, 0); @@ -1589,7 +1585,7 @@ } else tmp = name_quote (selection (cpanel)->fname, 1); stuff (input_w (cmdline), tmp, 1); - free (tmp); + g_free (tmp); } static void copy_tagged (WPanel *panel) @@ -1604,12 +1600,12 @@ if (panel->dir.list [i].f.marked) { char *tmp = name_quote (panel->dir.list [i].fname, 1); stuff (input_w (cmdline), tmp, 1); - free (tmp); + g_free (tmp); } } else { char *tmp = name_quote (panel->dir.list [panel->selected].fname, 1); stuff (input_w (cmdline), tmp, 1); - free (tmp); + g_free (tmp); } input_enable_update (input_w (cmdline)); } @@ -2084,7 +2080,7 @@ if ((hint = get_random_hint ())){ if (*hint) set_hintbar (hint); - free (hint); + g_free (hint); } else { set_hintbar ("The Midnight Commander " VERSION " (C) 1995-1997 the Free Software Foundation"); @@ -2133,15 +2129,15 @@ if (vfs_file_is_local (filename)){ if (*filename == PATH_SEP) /* an absolute pathname */ - return strdup (filename); - d = malloc (MC_MAXPATHLEN + strlen (filename) + 2); + return g_strdup (filename); + d = g_malloc (MC_MAXPATHLEN + strlen (filename) + 2); mc_get_current_wd (d, MC_MAXPATHLEN); l = strlen(d); d[l++] = PATH_SEP; strcpy (d + l, filename); return canonicalize_pathname (d); } else - return strdup (filename); + return g_strdup (filename); } #ifdef USE_INTERNAL_EDIT @@ -2170,7 +2166,7 @@ edit (edit_one_file, 1); } #endif - free (path); + g_free (path); midnight_shutdown = 1; done_mc (); return 1; @@ -2202,9 +2198,9 @@ /* destroy_dlg destroys even cpanel->cwd, so we have to save a copy :) */ if (print_last_wd) { if (!vfs_current_is_local ()) - last_wd_string = strdup ("."); + last_wd_string = g_strdup ("."); else - last_wd_string = strdup (cpanel->cwd); + last_wd_string = g_strdup (cpanel->cwd); } done_mc (); @@ -2336,19 +2332,19 @@ #endif /* ! HAVE_X */ shell = getenv ("SHELL"); if (!shell || !*shell) - shell = strdup (getpwuid (geteuid ())->pw_shell); + shell = g_strdup (getpwuid (geteuid ())->pw_shell); if (!shell || !*shell) shell = "/bin/sh"; - sprintf (control_file, CONTROL_FILE, getpid ()); + g_snprintf (control_file, sizeof (control_file), CONTROL_FILE, getpid ()); my_putenv ("MC_CONTROL_FILE", control_file); /* This is the directory, where MC was installed, on Unix this is LIBDIR */ /* and can be overriden by the MC_LIBDIR environment variable */ if ((mc_libdir = getenv ("MC_LIBDIR")) != NULL) { - mc_home = strdup(mc_libdir); + mc_home = g_strdup (mc_libdir); } else { - mc_home = strdup(LIBDIR); + mc_home = g_strdup (LIBDIR); } } @@ -2435,22 +2431,25 @@ #endif "-c, --color Force color mode.\n" "-C, --colors Specify colors (use --help-colors to get a list).\n" + "-d, --nomouse Disable mouse support.\n" #ifdef USE_INTERNAL_EDIT "-e, --edit Startup the internal editor.\n" #endif - "-d, --nomouse Disable mouse support.\n" "-f, --libdir Print configured paths.\n" "-h, --help Shows this help message.\n" "-k, --resetsoft Reset softkeys (HP terminals only) to their terminfo/termcap\n" " default.\n" +#ifdef USE_NETCODE + "-l, --ftplog file Log ftpfs commands to the file.\n" +#endif +#ifdef HAVE_MAD + "-M, --memory file [DEVEL-ONLY: Log MAD messages to the file.]\n" +#endif "-P, --printwd At exit, print the last working directory.\n" "-s, --slow Disables verbose operation (for slow terminals).\n" #if defined(HAVE_SLANG) && !defined(OS2_NT) "-t, --termcap Activate support for the TERMCAP variable.\n" #endif -#ifdef USE_NETCODE - "-l, --ftplog file Log ftpfs commands to the file.\n" -#endif #if defined(HAVE_SLANG) && defined(OS2_NT) "-S, --createcmdile Create command file to set default directory upon exit.\n" #endif @@ -2528,14 +2527,20 @@ finish_program = 1; break; +#ifdef USE_NETCODE + case 'l': + ftpfs_set_debug (option_arg); + break; +#endif + case 'm': fprintf (stderr, _("Option -m is obsolete. Please look at Display Bits... in the Option's menu\n")); finish_program = 1; break; - -#ifdef USE_NETCODE - case 'l': - ftpfs_set_debug (option_arg); + +#ifdef HAVE_MAD + case 'M': + mad_set_debug (option_arg); break; #endif @@ -2601,6 +2606,7 @@ char *cmdline_geometry = NULL; int nowindows = 0; char **directory_list = NULL; +int force_activation = 0; static struct poptOption argument_table [] = { #ifdef HAVE_GNOME @@ -2626,6 +2632,9 @@ #ifdef USE_NETCODE { "ftplog", 'l', POPT_ARG_STRING, NULL, 'l' }, #endif +#ifdef HAVE_MAD + { "memory", 'M', POPT_ARG_STRING, NULL, 'M' }, +#endif { "libdir", 'f', POPT_ARG_NONE, NULL, 'f' }, { NULL, 'm', POPT_ARG_NONE, NULL, 'm' }, { "nocolor", 'b', POPT_ARG_NONE, &disable_colors, 0 }, @@ -2654,6 +2663,7 @@ #ifdef HAVE_GNOME { "geometry", '\0', POPT_ARG_STRING, &cmdline_geometry, 0, N_("Geometry for the window"), N_("GEOMETRY")}, {"nowindows", '\0', POPT_ARG_NONE, &nowindows, 0, N_("No windows opened at startup"), NULL}, + {"force-activation",0,POPT_ARG_NONE, &force_activation, 0, N_("Force activation even if a server is already running"), NULL}, #endif { NULL, 0, 0, NULL, 0 } @@ -2679,10 +2689,13 @@ CORBA_Environment ev; CORBA_exception_init (&ev); - orb = gnome_CORBA_init_with_popt_table ( "gmc", VERSION, &argc, argv, argument_table, 0, &ctx, GNORBA_INIT_SERVER_FUNC, &ev); + corba_init (); + if (!force_activation) + if (try_to_activate_running_copy ()) + exit (1); #else gnome_init_with_popt_table ("gmc", VERSION, argc, argv, argument_table, 0, &ctx); #endif @@ -2727,19 +2740,19 @@ if (!STRNCOMP (base, "mce", 3) || !STRCOMP(base, "vi")) { edit_one_file = ""; if (tmp) - edit_one_file = strdup (tmp); + edit_one_file = g_strdup (tmp); } else if (!STRNCOMP (base, "mcv", 3) || !STRCOMP(base, "view")) { if (tmp) - view_one_file = strdup (tmp); + view_one_file = g_strdup (tmp); } else { /* sets the current dir and the other dir */ if (tmp) { char buffer[MC_MAXPATHLEN + 2]; - this_dir = strdup (tmp); + this_dir = g_strdup (tmp); mc_get_current_wd (buffer, sizeof (buffer) - 2); if ((tmp = poptGetArg (ctx))) - other_dir = strdup (tmp); + other_dir = g_strdup (tmp); } } @@ -2762,12 +2775,12 @@ do_mc_filename_rename (char *mc_dir, char *o_name, char *n_name) { char *full_o_name = concat_dir_and_file (home_dir, o_name); - char *full_n_name = copy_strings (home_dir, MC_BASE, n_name, NULL); + char *full_n_name = g_strconcat (home_dir, MC_BASE, n_name, NULL); int move; move = 0 == rename (full_o_name, full_n_name); - free (full_o_name); - free (full_n_name); + g_free (full_o_name); + g_free (full_n_name); return move; } @@ -2806,7 +2819,7 @@ char *mc_dir = concat_dir_and_file (home_dir, ".mc"); do_compatibility_move (mc_dir); - free (mc_dir); + g_free (mc_dir); } #endif @@ -2818,7 +2831,7 @@ tree_file = concat_dir_and_file (home_dir, MC_TREE); tree_store_init (); tree_store_load (tree_file); - free (tree_file); + g_free (tree_file); } void @@ -2829,7 +2842,7 @@ printf ("Saving tree!\n"); tree_file = concat_dir_and_file (home_dir, MC_TREE); tree_store_save (tree_file); - free (tree_file); + g_free (tree_file); } int main (int argc, char *argv []) @@ -2916,7 +2929,7 @@ if (open (ttyname (0), O_RDWR) < 0) if (open ("/dev/tty", O_RDWR) < 0) { /* Try if stderr is not redirected as the last chance */ - char *p = strdup (ttyname (0)); + char *p = g_strdup (ttyname (0)); if (!strcmp (p, ttyname (2))) dup2 (2, 1); @@ -2926,7 +2939,7 @@ "On some systems you may want to run # `which mc`\n")); exit (1); } - free (p); + g_free (p); } #endif } @@ -3048,7 +3061,7 @@ #ifdef _OS_NT /* On NT, home_dir is malloced */ - free (home_dir); + g_free (home_dir); #endif #if defined(OS2_NT) if (print_last_wd == 2){ @@ -3071,7 +3084,7 @@ write (stdout_fd, ".", 1); else write (stdout_fd, last_wd_string, strlen (last_wd_string)); - free (last_wd_string); + g_free (last_wd_string); } #ifdef HAVE_MAD diff -ruN old/mc-4.5.9/src/mem.h new/mc-4.5.10/src/mem.h --- old/mc-4.5.9/src/mem.h Mon Jan 18 17:44:10 1999 +++ new/mc-4.5.10/src/mem.h Sun Jan 31 18:55:18 1999 @@ -9,7 +9,7 @@ # endif /* not STDC_HEADERS and HAVE_MEMORY_H */ # ifndef index -#define index strchr +# define index strchr # endif # ifndef rindex diff -ruN old/mc-4.5.9/src/menu.c new/mc-4.5.10/src/menu.c --- old/mc-4.5.9/src/menu.c Mon Jan 18 17:44:10 1999 +++ new/mc-4.5.10/src/menu.c Sun Jan 31 18:55:18 1999 @@ -21,19 +21,16 @@ #include #include #include -#include -#include "mad.h" -#include "util.h" +#include "global.h" #include "menu.h" #include "dialog.h" -#include "global.h" #include "color.h" #include "main.h" #include "mouse.h" #include "win.h" #include "key.h" /* For mi_getch() */ -/* "$Id: menu.c,v 1.13 1998/06/08 00:33:32 unammx Exp $" */ +/* "$Id: menu.c,v 1.14 1999/01/27 01:09:17 timur Exp $" */ extern int is_right; int menubar_visible = 1; /* This is the new default */ @@ -54,13 +51,13 @@ { Menu menu; - menu = (Menu) xmalloc (sizeof (*menu), "create_menu"); + menu = (Menu) g_malloc (sizeof (*menu)); menu->count = count; menu->max_entry_len = 0; menu->entries = entries; #ifdef ENABLE_NLS - if (entries != (menu_entry*) 0) + if (entries != (menu_entry*) NULL) { register menu_entry* mp; for (mp = entries; count--; mp++) @@ -73,7 +70,7 @@ } #endif /* ENABLE_NLS */ - menu->name = strdup( _(name) ); + menu->name = g_strdup ( _(name) ); menu_scan_hotkey(menu); menu->start_x = 0; return menu; @@ -517,15 +514,14 @@ void destroy_menu (Menu menu) { - free (menu->name); - free (menu); + g_free (menu->name); + g_free (menu); } WMenu *menubar_new (int y, int x, int cols, Menu menu [], int items) { - WMenu *menubar = (WMenu *) xmalloc (sizeof (WMenu), "menubar_new"); + WMenu *menubar = g_new0 (WMenu, 1); /* FIXME: subsel used w/o being set */ - memset(menubar, 0, sizeof(*menubar)); /* FIXME: subsel used w/o being set */ init_widget (&menubar->widget, y, x, 1, cols, (callback_fn) menubar_callback, (destroy_fn) menubar_destroy, diff -ruN old/mc-4.5.9/src/mouse.c new/mc-4.5.10/src/mouse.c --- old/mc-4.5.9/src/mouse.c Mon Jan 18 17:44:10 1999 +++ new/mc-4.5.10/src/mouse.c Sun Jan 31 18:55:18 1999 @@ -18,7 +18,7 @@ /* Events received by clients of this library have their coordinates 0 */ /* based */ -/* "$Id: mouse.c,v 1.3 1999/01/10 08:56:03 unammx Exp $" */ +/* "$Id: mouse.c,v 1.4 1999/01/27 01:09:19 timur Exp $" */ #include #include @@ -30,13 +30,9 @@ #if (!defined(__IBMC__) && !defined(__IBMCPP__)) && !defined(HAS_NO_TERMIOS_H) # include #endif -#include #include - -#include "mad.h" +#include "global.h" #include "mouse.h" -#include "global.h" /* ESC_STR */ -#include "util.h" /* xmalloc */ #include "key.h" /* define sequence */ #include "tty.h" /* get ncurses header */ @@ -100,7 +96,7 @@ } if (ptr->value == code) { *tree = 0; - free(ptr); + g_free (ptr); return TRUE; } ptr = ptr->sibling; diff -ruN old/mc-4.5.9/src/option.c new/mc-4.5.10/src/option.c --- old/mc-4.5.9/src/option.c Mon Jan 18 17:44:10 1999 +++ new/mc-4.5.10/src/option.c Sun Jan 31 18:55:18 1999 @@ -157,7 +157,7 @@ title3 = _(" Other options "); first_width = strlen (title1) + 1; - for (i = 13; i < 18; i++) + for (i = 13; i < 19; i++) { check_options[i].text = _(check_options[i].text); l1 = strlen (check_options[i].text) + 7; diff -ruN old/mc-4.5.9/src/panel.h new/mc-4.5.10/src/panel.h --- old/mc-4.5.9/src/panel.h Mon Jan 18 17:44:10 1999 +++ new/mc-4.5.10/src/panel.h Sun Jan 31 18:55:18 1999 @@ -1,8 +1,10 @@ #ifndef __PANEL_H #define __PANEL_H +#include "fs.h" #include "dir.h" /* file_entry */ #include "dlg.h" +#include "util.h" #include "widget.h" /* for history loading and saving */ #define LIST_TYPES 5 @@ -28,10 +30,18 @@ frame_half /* half screen frame */ }; -#define is_view_special(x) ((x == view_info) || (x == view_quick)) +#define is_view_special(x) (((x) == view_info) || ((x) == view_quick)) -#define J_LEFT 0 -#define J_RIGHT 1 +#define J_LEFT 1 +#define J_RIGHT 2 +#define J_CENTER 3 + +#define IS_FIT(x) ((x) & 0x0004) +#define HIDE_FIT(x) ((x) & 0x0003) + +#define J_LEFT_FIT 5 +#define J_RIGHT_FIT 6 +#define J_CENTER_FIT 7 #define NORMAL 0 #define SELECTED 1 diff -ruN old/mc-4.5.9/src/panelize.c new/mc-4.5.10/src/panelize.c --- old/mc-4.5.9/src/panelize.c Mon Jan 18 17:44:11 1999 +++ new/mc-4.5.10/src/panelize.c Sun Jan 31 18:55:18 1999 @@ -25,7 +25,6 @@ #endif #include #include -#include /* For malloc() */ #include #include #include @@ -38,8 +37,7 @@ # include #endif #include "tty.h" -#include "mad.h" -#include "util.h" /* Needed for the externs */ +#include "global.h" #include "win.h" #include "color.h" #include "dlg.h" @@ -47,7 +45,6 @@ #include "dialog.h" /* For do_refresh() */ #include "setup.h" /* For profile_bname */ #include "profile.h" /* Load/save directories panelize */ -#include "fs.h" /* Needed for the extern declarations of integer parameters */ #define DIR_H_INCLUDE_HANDLE_DIRENT @@ -55,7 +52,6 @@ #include "panel.h" /* Needed for the externs */ #include "file.h" #include "main.h" -#include "global.h" #include "../vfs/vfs.h" #include "panelize.h" @@ -241,13 +237,13 @@ } if (old == NULL){ - panelize = malloc (sizeof (struct panelize)); + panelize = g_new (struct panelize, 1); panelize->label = label; panelize->command = command; panelize->next = current; } else { struct panelize *new; - new = malloc (sizeof (struct panelize)); + new = g_new (struct panelize, 1); new->label = label; new->command = command; old->next = new; @@ -267,11 +263,11 @@ if (!label) return; if (!*label) { - free (label); + g_free (label); return; } - add2panelize (label, strdup(pname->buffer)); + add2panelize (label, g_strdup (pname->buffer)); } } @@ -289,9 +285,9 @@ } } - free (entry->label); - free (entry->command); - free (entry); + g_free (entry->label); + g_free (entry->command); + g_free (entry); } } @@ -328,10 +324,10 @@ case B_ENTER: target = pname->buffer; if (target != NULL && *target) { - char *cmd = strdup (target); + char *cmd = g_strdup (target); destroy_dlg (panelize_dlg); do_external_panelize (cmd); - free (cmd); + g_free (cmd); repaint_screen (); return; } @@ -348,18 +344,18 @@ profile_keys = profile_init_iterator (panelize_section, profile_name); - add2panelize (strdup (_("Other command")), strdup ("")); + add2panelize (g_strdup (_("Other command")), g_strdup ("")); if (!profile_keys){ - add2panelize (strdup (_("Find rejects after patching")), strdup ("find . -name \\*.rej -print")); - add2panelize (strdup (_("Find *.orig after patching")), strdup ("find . -name \\*.orig -print")); - add2panelize (strdup (_("Find SUID and SGID programs")), strdup ("find . \\( \\( -perm -04000 -a -perm +011 \\) -o \\( -perm -02000 -a -perm +01 \\) \\) -print")); + add2panelize (g_strdup (_("Find rejects after patching")), g_strdup ("find . -name \\*.rej -print")); + add2panelize (g_strdup (_("Find *.orig after patching")), g_strdup ("find . -name \\*.orig -print")); + add2panelize (g_strdup (_("Find SUID and SGID programs")), g_strdup ("find . \\( \\( -perm -04000 -a -perm +011 \\) -o \\( -perm -02000 -a -perm +01 \\) \\) -print")); return; } while (profile_keys){ profile_keys = profile_iterator_next (profile_keys, &key, &value); - add2panelize (strdup (key), strdup (value)); + add2panelize (g_strdup (key), g_strdup (value)); } } @@ -385,9 +381,9 @@ for (; current; current = next){ next = current->next; - free (current->label); - free (current->command); - free (current); + g_free (current->label); + g_free (current->command); + g_free (current); } } @@ -437,7 +433,7 @@ if (status == -1) break; list->list [next_free].fnamelen = strlen (name); - list->list [next_free].fname = strdup (name); + list->list [next_free].fname = g_strdup (name); file_mark (cpanel, next_free, 0); list->list [next_free].f.link_to_dir = link_to_dir; list->list [next_free].f.stalled_link = stalled_link; diff -ruN old/mc-4.5.9/src/profile.c new/mc-4.5.10/src/profile.c --- old/mc-4.5.9/src/profile.c Mon Jan 18 17:44:10 1999 +++ new/mc-4.5.10/src/profile.c Sun Jan 31 18:55:18 1999 @@ -20,15 +20,12 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* "$Id: profile.c,v 1.2 1998/12/02 21:27:57 unammx Exp $" */ +/* "$Id: profile.c,v 1.3 1999/01/27 01:09:21 timur Exp $" */ #include #include #include -#include /* For free() and atoi() */ #include -#include "mad.h" -#include "util.h" #include "global.h" #include "profile.h" @@ -64,7 +61,7 @@ TProfile *p = Base; while (p){ - if (!strcasecmp (FileName, p->FileName)){ + if (! g_strcasecmp (FileName, p->FileName)){ Current = p; *section = p->Section; return 1; @@ -86,7 +83,7 @@ l += (*p == '\n' || *p == TRANSLATION_CHAR); p++; } - q = p = malloc (l + 1); + q = p = g_malloc (l + 1); if (!q) return 0; for (;;) { @@ -116,7 +113,7 @@ str_translate_newline_dup (char *s) { char *p, *q; - q = p = malloc (strlen (s) + 1); + q = p = g_malloc (strlen (s) + 1); if (!q) return 0; while (*s) { @@ -168,7 +165,7 @@ if (c == ']' || overflow){ *next = '\0'; next = CharBuffer; - SecHeader->AppName = strdup (CharBuffer); + SecHeader->AppName = g_strdup (CharBuffer); state = IgnoreToEOL; } else *next++ = c; @@ -188,8 +185,7 @@ TSecHeader *temp; temp = SecHeader; - SecHeader = (TSecHeader *) xmalloc (sizeof (TSecHeader), - "KeyDef"); + SecHeader = g_new (TSecHeader, 1); SecHeader->link = temp; SecHeader->Keys = 0; state = OnSecHeader; @@ -210,9 +206,9 @@ temp = SecHeader->Keys; *next = '\0'; - SecHeader->Keys = (TKeys *) xmalloc (sizeof (TKeys), "KD2"); + SecHeader->Keys =g_new (TKeys, 1); SecHeader->Keys->link = temp; - SecHeader->Keys->KeyName = strdup (CharBuffer); + SecHeader->Keys->KeyName = g_strdup (CharBuffer); state = KeyValue; next = CharBuffer; } else { @@ -250,9 +246,9 @@ { TKeys *key; - key = (TKeys *) xmalloc (sizeof (TKeys), "new_key"); - key->KeyName = strdup (KeyName); - key->Value = strdup (Value); + key = g_new (TKeys, 1); + key->KeyName = g_strdup (KeyName); + key->Value = g_strdup (Value); key->link = section->Keys; section->Keys = key; } @@ -267,9 +263,9 @@ TKeys *key; if (!is_loaded (FileName, §ion)){ - New = (TProfile *) xmalloc (sizeof (TProfile), "GetSetProfile"); + New = g_new (TProfile, 1); New->link = Base; - New->FileName = strdup (FileName); + New->FileName = g_strdup (FileName); New->Section = load (FileName); Base = New; section = New->Section; @@ -278,14 +274,14 @@ /* Start search */ for (; section; section = section->link){ - if (section->AppName == 0 || strcasecmp (section->AppName, AppName)) + if (section->AppName == 0 || g_strcasecmp (section->AppName, AppName)) continue; for (key = section->Keys; key; key = key->link){ - if (strcasecmp (key->KeyName, KeyName)) + if ( g_strcasecmp (key->KeyName, KeyName)) continue; if (set){ - free (key->Value); - key->Value = strdup (Default); + g_free (key->Value); + key->Value = g_strdup (Default); } return key->Value; } @@ -300,8 +296,8 @@ /* Non existent section */ if (set && Default){ - section = (TSecHeader *) xmalloc (sizeof (TSecHeader), "GSP3"); - section->AppName = strdup (AppName); + section = g_new (TSecHeader, 1); + section->AppName = g_strdup (AppName); section->Keys = 0; new_key (section, KeyName, Default); section->link = Current->Section; @@ -350,18 +346,18 @@ int GetPrivateProfileInt (char * AppName, char * KeyName, int Default, char * File) { - static char IntBuf [15]; - static char buf [15]; + static char IntBuf [BUF_TINY]; + static char buf [BUF_TINY]; - sprintf (buf, "%d", Default); + g_snprintf (buf, sizeof (buf), "%d", Default); /* Check the exact semantic with the SDK */ - GetPrivateProfileString (AppName, KeyName, buf, IntBuf, 15, File); - if (!strcasecmp (IntBuf, "true")) + GetPrivateProfileString (AppName, KeyName, buf, IntBuf, BUF_TINY, File); + if (! g_strcasecmp (IntBuf, "true")) return 1; - if (!strcasecmp (IntBuf, "yes")) + if (! g_strcasecmp (IntBuf, "yes")) return 1; - return atoi (IntBuf); + return (int) atol (IntBuf); } #if 0 @@ -392,7 +388,7 @@ dump_keys (profile, p->link); t = str_untranslate_newline_dup (p->Value); fprintf (profile, "%s=%s\n", p->KeyName, t); - free (t); + g_free (t); } static void dump_sections (FILE *profile, TSecHeader *p) @@ -435,9 +431,9 @@ if (!p) return; free_keys (p->link); - free (p->KeyName); - free (p->Value); - free (p); + g_free (p->KeyName); + g_free (p->Value); + g_free (p); } static void free_sections (TSecHeader *p) @@ -446,10 +442,10 @@ return; free_sections (p->link); free_keys (p->Keys); - free (p->AppName); + g_free (p->AppName); p->link = 0; p->Keys = 0; - free (p); + g_free (p); } static void free_profile (TProfile *p) @@ -458,8 +454,8 @@ return; free_profile (p->link); free_sections (p->Section); - free (p->FileName); - free (p); + g_free (p->FileName); + g_free (p); } void free_profile_name (char *s) @@ -490,16 +486,16 @@ TSecHeader *section; if (!is_loaded (file, §ion)){ - New = (TProfile *) xmalloc (sizeof (TProfile), "GetSetProfile"); + New = g_new (TProfile, 1); New->link = Base; - New->FileName = strdup (file); + New->FileName = g_strdup (file); New->Section = load (file); Base = New; section = New->Section; Current = New; } for (; section; section = section->link){ - if (strcasecmp (section->AppName, appname)) + if ( g_strcasecmp (section->AppName, appname)) continue; return section->Keys; } @@ -531,7 +527,7 @@ /* won't be find by further walks of the structure */ for (; section; section = section->link){ - if (strcasecmp (section->AppName, appname)) + if ( g_strcasecmp (section->AppName, appname)) continue; section->AppName [0] = 0; } @@ -546,7 +542,7 @@ return 0; } for (; section; section = section->link){ - if (strcasecmp (section->AppName, section_name)) + if ( g_strcasecmp (section->AppName, section_name)) continue; return 1; } @@ -558,7 +554,7 @@ TProfile *p; for (p = Base; p; p = p->link){ - if (strcasecmp (file, p->FileName)) + if ( g_strcasecmp (file, p->FileName)) continue; p->FileName [0] = 0; } diff -ruN old/mc-4.5.9/src/regex.c new/mc-4.5.10/src/regex.c --- old/mc-4.5.9/src/regex.c Mon Jan 18 17:44:11 1999 +++ new/mc-4.5.10/src/regex.c Sun Jan 31 18:55:18 1999 @@ -149,7 +149,7 @@ #endif /* not emacs */ /* Get the interface, including the syntax bits. */ -#include "regex.h" +#include "eregex.h" /* isalpha etc. are used for the character classes. */ #include diff -ruN old/mc-4.5.9/src/regex.h new/mc-4.5.10/src/regex.h --- old/mc-4.5.9/src/regex.h Mon Jan 18 17:44:10 1999 +++ new/mc-4.5.10/src/regex.h Wed Dec 31 19:00:00 1969 @@ -1,491 +0,0 @@ -/* Definitions for data structures and routines for the regular - expression library, version 0.12. - - Copyright (C) 1985, 89, 90, 91, 92, 93, 95 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ - -#ifndef __REGEXP_LIBRARY_H__ -#define __REGEXP_LIBRARY_H__ - -/* POSIX says that must be included (by the caller) before - . */ - -#if !defined (_POSIX_C_SOURCE) && !defined (_POSIX_SOURCE) && defined (VMS) -/* VMS doesn't have `size_t' in , even though POSIX says it - should be there. */ -#include -#endif - - -/* The following bits are used to determine the regexp syntax we - recognize. The set/not-set meanings are chosen so that Emacs syntax - remains the value 0. The bits are given in alphabetical order, and - the definitions shifted by one from the previous bit; thus, when we - add or remove a bit, only one other definition need change. */ -typedef unsigned reg_syntax_t; - -/* If this bit is not set, then \ inside a bracket expression is literal. - If set, then such a \ quotes the following character. */ -#define RE_BACKSLASH_ESCAPE_IN_LISTS (1) - -/* If this bit is not set, then + and ? are operators, and \+ and \? are - literals. - If set, then \+ and \? are operators and + and ? are literals. */ -#define RE_BK_PLUS_QM (RE_BACKSLASH_ESCAPE_IN_LISTS << 1) - -/* If this bit is set, then character classes are supported. They are: - [:alpha:], [:upper:], [:lower:], [:digit:], [:alnum:], [:xdigit:], - [:space:], [:print:], [:punct:], [:graph:], and [:cntrl:]. - If not set, then character classes are not supported. */ -#define RE_CHAR_CLASSES (RE_BK_PLUS_QM << 1) - -/* If this bit is set, then ^ and $ are always anchors (outside bracket - expressions, of course). - If this bit is not set, then it depends: - ^ is an anchor if it is at the beginning of a regular - expression or after an open-group or an alternation operator; - $ is an anchor if it is at the end of a regular expression, or - before a close-group or an alternation operator. - - This bit could be (re)combined with RE_CONTEXT_INDEP_OPS, because - POSIX draft 11.2 says that * etc. in leading positions is undefined. - We already implemented a previous draft which made those constructs - invalid, though, so we haven't changed the code back. */ -#define RE_CONTEXT_INDEP_ANCHORS (RE_CHAR_CLASSES << 1) - -/* If this bit is set, then special characters are always special - regardless of where they are in the pattern. - If this bit is not set, then special characters are special only in - some contexts; otherwise they are ordinary. Specifically, - * + ? and intervals are only special when not after the beginning, - open-group, or alternation operator. */ -#define RE_CONTEXT_INDEP_OPS (RE_CONTEXT_INDEP_ANCHORS << 1) - -/* If this bit is set, then *, +, ?, and { cannot be first in an re or - immediately after an alternation or begin-group operator. */ -#define RE_CONTEXT_INVALID_OPS (RE_CONTEXT_INDEP_OPS << 1) - -/* If this bit is set, then . matches newline. - If not set, then it doesn't. */ -#define RE_DOT_NEWLINE (RE_CONTEXT_INVALID_OPS << 1) - -/* If this bit is set, then . doesn't match NUL. - If not set, then it does. */ -#define RE_DOT_NOT_NULL (RE_DOT_NEWLINE << 1) - -/* If this bit is set, nonmatching lists [^...] do not match newline. - If not set, they do. */ -#define RE_HAT_LISTS_NOT_NEWLINE (RE_DOT_NOT_NULL << 1) - -/* If this bit is set, either \{...\} or {...} defines an - interval, depending on RE_NO_BK_BRACES. - If not set, \{, \}, {, and } are literals. */ -#define RE_INTERVALS (RE_HAT_LISTS_NOT_NEWLINE << 1) - -/* If this bit is set, +, ? and | aren't recognized as operators. - If not set, they are. */ -#define RE_LIMITED_OPS (RE_INTERVALS << 1) - -/* If this bit is set, newline is an alternation operator. - If not set, newline is literal. */ -#define RE_NEWLINE_ALT (RE_LIMITED_OPS << 1) - -/* If this bit is set, then `{...}' defines an interval, and \{ and \} - are literals. - If not set, then `\{...\}' defines an interval. */ -#define RE_NO_BK_BRACES (RE_NEWLINE_ALT << 1) - -/* If this bit is set, (...) defines a group, and \( and \) are literals. - If not set, \(...\) defines a group, and ( and ) are literals. */ -#define RE_NO_BK_PARENS (RE_NO_BK_BRACES << 1) - -/* If this bit is set, then \ matches . - If not set, then \ is a back-reference. */ -#define RE_NO_BK_REFS (RE_NO_BK_PARENS << 1) - -/* If this bit is set, then | is an alternation operator, and \| is literal. - If not set, then \| is an alternation operator, and | is literal. */ -#define RE_NO_BK_VBAR (RE_NO_BK_REFS << 1) - -/* If this bit is set, then an ending range point collating higher - than the starting range point, as in [z-a], is invalid. - If not set, then when ending range point collates higher than the - starting range point, the range is ignored. */ -#define RE_NO_EMPTY_RANGES (RE_NO_BK_VBAR << 1) - -/* If this bit is set, then an unmatched ) is ordinary. - If not set, then an unmatched ) is invalid. */ -#define RE_UNMATCHED_RIGHT_PAREN_ORD (RE_NO_EMPTY_RANGES << 1) - -/* If this bit is set, succeed as soon as we match the whole pattern, - without further backtracking. */ -#define RE_NO_POSIX_BACKTRACKING (RE_UNMATCHED_RIGHT_PAREN_ORD << 1) - -/* This global variable defines the particular regexp syntax to use (for - some interfaces). When a regexp is compiled, the syntax used is - stored in the pattern buffer, so changing this does not affect - already-compiled regexps. */ -extern reg_syntax_t re_syntax_options; - -/* Define combinations of the above bits for the standard possibilities. - (The [[[ comments delimit what gets put into the Texinfo file, so - don't delete them!) */ -/* [[[begin syntaxes]]] */ -#define RE_SYNTAX_EMACS 0 - -#define RE_SYNTAX_AWK \ - (RE_BACKSLASH_ESCAPE_IN_LISTS | RE_DOT_NOT_NULL \ - | RE_NO_BK_PARENS | RE_NO_BK_REFS \ - | RE_NO_BK_VBAR | RE_NO_EMPTY_RANGES \ - | RE_UNMATCHED_RIGHT_PAREN_ORD) - -#define RE_SYNTAX_POSIX_AWK \ - (RE_SYNTAX_POSIX_EXTENDED | RE_BACKSLASH_ESCAPE_IN_LISTS) - -#define RE_SYNTAX_GREP \ - (RE_BK_PLUS_QM | RE_CHAR_CLASSES \ - | RE_HAT_LISTS_NOT_NEWLINE | RE_INTERVALS \ - | RE_NEWLINE_ALT) - -#define RE_SYNTAX_EGREP \ - (RE_CHAR_CLASSES | RE_CONTEXT_INDEP_ANCHORS \ - | RE_CONTEXT_INDEP_OPS | RE_HAT_LISTS_NOT_NEWLINE \ - | RE_NEWLINE_ALT | RE_NO_BK_PARENS \ - | RE_NO_BK_VBAR) - -#define RE_SYNTAX_POSIX_EGREP \ - (RE_SYNTAX_EGREP | RE_INTERVALS | RE_NO_BK_BRACES) - -/* P1003.2/D11.2, section 4.20.7.1, lines 5078ff. */ -#define RE_SYNTAX_ED RE_SYNTAX_POSIX_BASIC - -#define RE_SYNTAX_SED RE_SYNTAX_POSIX_BASIC - -/* Syntax bits common to both basic and extended POSIX regex syntax. */ -#define _RE_SYNTAX_POSIX_COMMON \ - (RE_CHAR_CLASSES | RE_DOT_NEWLINE | RE_DOT_NOT_NULL \ - | RE_INTERVALS | RE_NO_EMPTY_RANGES) - -#define RE_SYNTAX_POSIX_BASIC \ - (_RE_SYNTAX_POSIX_COMMON | RE_BK_PLUS_QM) - -/* Differs from ..._POSIX_BASIC only in that RE_BK_PLUS_QM becomes - RE_LIMITED_OPS, i.e., \? \+ \| are not recognized. Actually, this - isn't minimal, since other operators, such as \`, aren't disabled. */ -#define RE_SYNTAX_POSIX_MINIMAL_BASIC \ - (_RE_SYNTAX_POSIX_COMMON | RE_LIMITED_OPS) - -#define RE_SYNTAX_POSIX_EXTENDED \ - (_RE_SYNTAX_POSIX_COMMON | RE_CONTEXT_INDEP_ANCHORS \ - | RE_CONTEXT_INDEP_OPS | RE_NO_BK_BRACES \ - | RE_NO_BK_PARENS | RE_NO_BK_VBAR \ - | RE_UNMATCHED_RIGHT_PAREN_ORD) - -/* Differs from ..._POSIX_EXTENDED in that RE_CONTEXT_INVALID_OPS - replaces RE_CONTEXT_INDEP_OPS and RE_NO_BK_REFS is added. */ -#define RE_SYNTAX_POSIX_MINIMAL_EXTENDED \ - (_RE_SYNTAX_POSIX_COMMON | RE_CONTEXT_INDEP_ANCHORS \ - | RE_CONTEXT_INVALID_OPS | RE_NO_BK_BRACES \ - | RE_NO_BK_PARENS | RE_NO_BK_REFS \ - | RE_NO_BK_VBAR | RE_UNMATCHED_RIGHT_PAREN_ORD) -/* [[[end syntaxes]]] */ - -/* Maximum number of duplicates an interval can allow. Some systems - (erroneously) define this in other header files, but we want our - value, so remove any previous define. */ -#ifdef RE_DUP_MAX -#undef RE_DUP_MAX -#endif -#define RE_DUP_MAX ((1 << 15) - 1) - - -/* POSIX `cflags' bits (i.e., information for `regcomp'). */ - -/* If this bit is set, then use extended regular expression syntax. - If not set, then use basic regular expression syntax. */ -#define REG_EXTENDED 1 - -/* If this bit is set, then ignore case when matching. - If not set, then case is significant. */ -#define REG_ICASE (REG_EXTENDED << 1) - -/* If this bit is set, then anchors do not match at newline - characters in the string. - If not set, then anchors do match at newlines. */ -#define REG_NEWLINE (REG_ICASE << 1) - -/* If this bit is set, then report only success or fail in regexec. - If not set, then returns differ between not matching and errors. */ -#define REG_NOSUB (REG_NEWLINE << 1) - - -/* POSIX `eflags' bits (i.e., information for regexec). */ - -/* If this bit is set, then the beginning-of-line operator doesn't match - the beginning of the string (presumably because it's not the - beginning of a line). - If not set, then the beginning-of-line operator does match the - beginning of the string. */ -#define REG_NOTBOL 1 - -/* Like REG_NOTBOL, except for the end-of-line. */ -#define REG_NOTEOL (1 << 1) - - -/* If any error codes are removed, changed, or added, update the - `re_error_msg' table in regex.c. */ -typedef enum -{ - REG_NOERROR = 0, /* Success. */ - REG_NOMATCH, /* Didn't find a match (for regexec). */ - - /* POSIX regcomp return error codes. (In the order listed in the - standard.) */ - REG_BADPAT, /* Invalid pattern. */ - REG_ECOLLATE, /* Not implemented. */ - REG_ECTYPE, /* Invalid character class name. */ - REG_EESCAPE, /* Trailing backslash. */ - REG_ESUBREG, /* Invalid back reference. */ - REG_EBRACK, /* Unmatched left bracket. */ - REG_EPAREN, /* Parenthesis imbalance. */ - REG_EBRACE, /* Unmatched \{. */ - REG_BADBR, /* Invalid contents of \{\}. */ - REG_ERANGE, /* Invalid range end. */ - REG_ESPACE, /* Ran out of memory. */ - REG_BADRPT, /* No preceding re for repetition op. */ - - /* Error codes we've added. */ - REG_EEND, /* Premature end. */ - REG_ESIZE, /* Compiled pattern bigger than 2^16 bytes. */ - REG_ERPAREN /* Unmatched ) or \); not returned from regcomp. */ -} reg_errcode_t; - -/* This data structure represents a compiled pattern. Before calling - the pattern compiler, the fields `buffer', `allocated', `fastmap', - `translate', and `no_sub' can be set. After the pattern has been - compiled, the `re_nsub' field is available. All other fields are - private to the regex routines. */ - -struct re_pattern_buffer -{ -/* [[[begin pattern_buffer]]] */ - /* Space that holds the compiled pattern. It is declared as - `unsigned char *' because its elements are - sometimes used as array indexes. */ - unsigned char *buffer; - - /* Number of bytes to which `buffer' points. */ - unsigned long allocated; - - /* Number of bytes actually used in `buffer'. */ - unsigned long used; - - /* Syntax setting with which the pattern was compiled. */ - reg_syntax_t syntax; - - /* Pointer to a fastmap, if any, otherwise zero. re_search uses - the fastmap, if there is one, to skip over impossible - starting points for matches. */ - char *fastmap; - - /* Either a translate table to apply to all characters before - comparing them, or zero for no translation. The translation - is applied to a pattern when it is compiled and to a string - when it is matched. */ - char *translate; - - /* Number of subexpressions found by the compiler. */ - size_t re_nsub; - - /* Zero if this pattern cannot match the empty string, one else. - Well, in truth it's used only in `re_search_2', to see - whether or not we should use the fastmap, so we don't set - this absolutely perfectly; see `re_compile_fastmap' (the - `duplicate' case). */ - unsigned can_be_null : 1; - - /* If REGS_UNALLOCATED, allocate space in the `regs' structure - for `max (RE_NREGS, re_nsub + 1)' groups. - If REGS_REALLOCATE, reallocate space if necessary. - If REGS_FIXED, use what's there. */ -#define REGS_UNALLOCATED 0 -#define REGS_REALLOCATE 1 -#define REGS_FIXED 2 - unsigned regs_allocated : 2; - - /* Set to zero when `regex_compile' compiles a pattern; set to one - by `re_compile_fastmap' if it updates the fastmap. */ - unsigned fastmap_accurate : 1; - - /* If set, `re_match_2' does not return information about - subexpressions. */ - unsigned no_sub : 1; - - /* If set, a beginning-of-line anchor doesn't match at the - beginning of the string. */ - unsigned not_bol : 1; - - /* Similarly for an end-of-line anchor. */ - unsigned not_eol : 1; - - /* If true, an anchor at a newline matches. */ - unsigned newline_anchor : 1; - -/* [[[end pattern_buffer]]] */ -}; - -typedef struct re_pattern_buffer regex_t; - -/* Type for byte offsets within the string. POSIX mandates this. */ -typedef int regoff_t; - - -/* This is the structure we store register match data in. See - regex.texinfo for a full description of what registers match. */ -struct re_registers -{ - unsigned num_regs; - regoff_t *start; - regoff_t *end; -}; - - -/* If `regs_allocated' is REGS_UNALLOCATED in the pattern buffer, - `re_match_2' returns information about at least this many registers - the first time a `regs' structure is passed. */ -#ifndef RE_NREGS -#define RE_NREGS 30 -#endif - - -/* POSIX specification for registers. Aside from the different names than - `re_registers', POSIX uses an array of structures, instead of a - structure of arrays. */ -typedef struct -{ - regoff_t rm_so; /* Byte offset from string's start to substring's start. */ - regoff_t rm_eo; /* Byte offset from string's start to substring's end. */ -} regmatch_t; - -/* Declarations for routines. */ - -/* To avoid duplicating every routine declaration -- once with a - prototype (if we are ANSI), and once without (if we aren't) -- we - use the following macro to declare argument types. This - unfortunately clutters up the declarations a bit, but I think it's - worth it. */ - -#if __STDC__ - -#define _RE_ARGS(args) args - -#else /* not __STDC__ */ - -#define _RE_ARGS(args) () - -#endif /* not __STDC__ */ - -/* Sets the current default syntax to SYNTAX, and return the old syntax. - You can also simply assign to the `re_syntax_options' variable. */ -extern reg_syntax_t re_set_syntax _RE_ARGS ((reg_syntax_t syntax)); - -/* Compile the regular expression PATTERN, with length LENGTH - and syntax given by the global `re_syntax_options', into the buffer - BUFFER. Return NULL if successful, and an error string if not. */ -extern const char *re_compile_pattern - _RE_ARGS ((const char *pattern, int length, - struct re_pattern_buffer *buffer)); - - -/* Compile a fastmap for the compiled pattern in BUFFER; used to - accelerate searches. Return 0 if successful and -2 if was an - internal error. */ -extern int re_compile_fastmap _RE_ARGS ((struct re_pattern_buffer *buffer)); - - -/* Search in the string STRING (with length LENGTH) for the pattern - compiled into BUFFER. Start searching at position START, for RANGE - characters. Return the starting position of the match, -1 for no - match, or -2 for an internal error. Also return register - information in REGS (if REGS and BUFFER->no_sub are nonzero). */ -extern int re_search - _RE_ARGS ((struct re_pattern_buffer *buffer, const char *string, - int length, int start, int range, struct re_registers *regs)); - - -/* Like `re_search', but search in the concatenation of STRING1 and - STRING2. Also, stop searching at index START + STOP. */ -extern int re_search_2 - _RE_ARGS ((struct re_pattern_buffer *buffer, const char *string1, - int length1, const char *string2, int length2, - int start, int range, struct re_registers *regs, int stop)); - - -/* Like `re_search', but return how many characters in STRING the regexp - in BUFFER matched, starting at position START. */ -extern int re_match - _RE_ARGS ((struct re_pattern_buffer *buffer, const char *string, - int length, int start, struct re_registers *regs)); - - -/* Relates to `re_match' as `re_search_2' relates to `re_search'. */ -extern int re_match_2 - _RE_ARGS ((struct re_pattern_buffer *buffer, const char *string1, - int length1, const char *string2, int length2, - int start, struct re_registers *regs, int stop)); - - -/* Set REGS to hold NUM_REGS registers, storing them in STARTS and - ENDS. Subsequent matches using BUFFER and REGS will use this memory - for recording register information. STARTS and ENDS must be - allocated with malloc, and must each be at least `NUM_REGS * sizeof - (regoff_t)' bytes long. - - If NUM_REGS == 0, then subsequent matches should allocate their own - register data. - - Unless this function is called, the first search or match using - PATTERN_BUFFER will allocate its own register data, without - freeing the old data. */ -extern void re_set_registers - _RE_ARGS ((struct re_pattern_buffer *buffer, struct re_registers *regs, - unsigned num_regs, regoff_t *starts, regoff_t *ends)); - -#ifdef _REGEX_RE_COMP -/* 4.2 bsd compatibility. */ -extern char *re_comp _RE_ARGS ((const char *)); -extern int re_exec _RE_ARGS ((const char *)); -#endif - -/* POSIX compatibility. */ -extern int regcomp _RE_ARGS ((regex_t *preg, const char *pattern, int cflags)); -extern int regexec - _RE_ARGS ((const regex_t *preg, const char *string, size_t nmatch, - regmatch_t pmatch[], int eflags)); -extern size_t regerror - _RE_ARGS ((int errcode, const regex_t *preg, char *errbuf, - size_t errbuf_size)); -extern void regfree _RE_ARGS ((regex_t *preg)); - -#endif /* not __REGEXP_LIBRARY_H__ */ - -/* -Local variables: -make-backup-files: t -version-control: t -trim-versions-without-asking: nil -End: -*/ diff -ruN old/mc-4.5.9/src/rxvt.c new/mc-4.5.10/src/rxvt.c --- old/mc-4.5.9/src/rxvt.c Mon Jan 18 17:44:11 1999 +++ new/mc-4.5.10/src/rxvt.c Sun Jan 31 18:55:18 1999 @@ -18,13 +18,11 @@ #include #include /* read, printf */ -#include /* getenv */ #include #include #ifdef HAVE_UNISTD_H # include #endif -#include /* malloc */ #ifndef SCO_FLAVOR # include /* struct timeval */ @@ -35,7 +33,7 @@ #endif #include "tty.h" /* move, addch */ -#include "util.h" /* is_printable */ +#include "global.h" #include "cons.saver.h" int rxvt_extensions = 0; @@ -101,7 +99,7 @@ bytes = (y2 - y1) * (COLS + 1) + 1; /* *should* be the number of bytes read */ j = 0; - k = malloc (bytes); + k = g_malloc (bytes); for (;;) { int c; c = rxvt_getc (); @@ -122,6 +120,6 @@ move (starty + (i / cols), 0); addch (is_printable (k[i]) ? k[i] : ' '); } - free (k); + g_free (k); } diff -ruN old/mc-4.5.9/src/screen.c new/mc-4.5.10/src/screen.c --- old/mc-4.5.9/src/screen.c Mon Jan 18 17:44:10 1999 +++ new/mc-4.5.10/src/screen.c Sun Jan 31 18:55:18 1999 @@ -20,22 +20,15 @@ #include #include "tty.h" -#include "fs.h" #include #include -#include /* For malloc() and free() */ #include #include #ifdef HAVE_UNISTD_H # include /* For chdir(), readlink() and getwd()/getcwd() */ #endif -/*#include "mc.h"*/ - -#include "mem.h" -#include "mad.h" #include "global.h" #include "dir.h" -#include "util.h" #include "panel.h" #include "color.h" #include "tree.h" @@ -54,7 +47,6 @@ #include "widget.h" #include "../vfs/vfs.h" #include "../vfs/extfs.h" -#include #ifdef NEEDS_DRIVE_H # include "drive.h" #endif @@ -151,7 +143,7 @@ while (format){ next = format->next; - free (format); + g_free (format); format = next; } } @@ -218,7 +210,59 @@ return (NORMAL_COLOR); } +/* String representations of various file attributes */ +/* name */ +char * +string_file_name (file_entry *fe, int len) +{ + return fe->fname; +} + +/* size */ +char * +string_file_size (file_entry *fe, int len) +{ + static char buffer [BUF_TINY]; + int i; + +#ifdef HAVE_ST_RDEV + if (S_ISBLK (fe->buf.st_mode) || S_ISCHR (fe->buf.st_mode)) + g_snprintf (buffer, sizeof (buffer), "%3d,%3d", + (int) ((fe->buf.st_rdev >> 8) & 0xff), + (int) (fe->buf.st_rdev & 0xff)); + else +#endif + { + g_snprintf (buffer, sizeof (buffer), "%lu", (unsigned long) fe->buf.st_size); + if (len && (i = strlen (buffer)) > len) { + if (i - 2 > len) { + if (i - 5 > len) + g_snprintf (buffer, sizeof (buffer), "%luG", (unsigned long) ((fe->buf.st_size) >> 30)); + else + g_snprintf (buffer, sizeof (buffer), "%luM", (unsigned long) ((fe->buf.st_size) >> 20)); + } else + g_snprintf (buffer, sizeof (buffer), "%luK", (unsigned long) ((fe->buf.st_size) >> 10)); + } + } + return buffer; +} + +/* bsize */ +char * +string_file_size_brief (file_entry *fe, int len) +{ + static char buffer [BUF_TINY]; + + if (S_ISDIR (fe->buf.st_mode)){ + strcpy (buffer, (strcmp (fe->fname, "..") ? "SUB-DIR" : "UP--DIR")); + return buffer; + } + + return string_file_size (fe, len); +} + /* This functions return a string representation of a file entry */ +/* type */ char * string_file_type (file_entry *fe, int len) { @@ -249,181 +293,119 @@ return buffer; } +/* mtime */ char * -string_file_size_brief (file_entry *fe, int len) +string_file_mtime (file_entry *fe, int len) { - static char buffer [8]; + return file_date (fe->buf.st_mtime); +} - if (S_ISDIR (fe->buf.st_mode)){ - strcpy (buffer, (strcmp (fe->fname, "..") ? "SUB-DIR" : "UP--DIR")); - return buffer; - } +/* atime */ +char * +string_file_atime (file_entry *fe, int len) +{ + return file_date (fe->buf.st_atime); +} - return string_file_size (fe, len); +/* ctime */ +char * +string_file_ctime (file_entry *fe, int len) +{ + return file_date (fe->buf.st_ctime); } +/* perm */ char * string_file_permission (file_entry *fe, int len) { return string_perm (fe->buf.st_mode); } +/* mode */ char * -string_file_nlinks (file_entry *fe, int len) +string_file_perm_octal (file_entry *fe, int len) { - static char buffer [20]; + static char buffer [10]; - sprintf (buffer, "%16d", fe->buf.st_nlink); + g_snprintf (buffer, sizeof (buffer), "0%06o", fe->buf.st_mode); return buffer; } +/* nlink */ char * -string_file_size (file_entry *fe, int len) +string_file_nlinks (file_entry *fe, int len) { - static char buffer [16]; - int i; + static char buffer [BUF_TINY]; -#ifdef HAVE_ST_RDEV - if (S_ISBLK (fe->buf.st_mode) || S_ISCHR (fe->buf.st_mode)) - sprintf (buffer, "%3d,%3d", (int) ((fe->buf.st_rdev >> 8) & 0xff), - (int) (fe->buf.st_rdev & 0xff)); - else -#endif - { - sprintf (buffer, "%lu", (unsigned long) fe->buf.st_size); - if (len && (i = strlen (buffer)) > len) { - if (i - 2 > len) { - if (i - 5 > len) - sprintf (buffer, "%luG", (unsigned long) ((fe->buf.st_size) >> 30)); - else - sprintf (buffer, "%luM", (unsigned long) ((fe->buf.st_size) >> 20)); - } else - sprintf (buffer, "%luK", (unsigned long) ((fe->buf.st_size) >> 10)); - } - } + g_snprintf (buffer, sizeof (buffer), "%16d", fe->buf.st_nlink); return buffer; } +/* inode */ char * -string_file_mtime (file_entry *fe, int len) +string_inode (file_entry *fe, int len) { - return file_date (fe->buf.st_mtime); -} + static char buffer [10]; -char * -string_file_atime (file_entry *fe, int len) -{ - return file_date (fe->buf.st_atime); + g_snprintf (buffer, sizeof (buffer), "%lu", (unsigned long) fe->buf.st_ino); + return buffer; } +/* nuid */ char * -string_file_ctime (file_entry *fe, int len) +string_file_nuid (file_entry *fe, int len) { - return file_date (fe->buf.st_ctime); -} + static char buffer [10]; -#ifdef HAVE_GNOME -/* In GNOME, the CList truncates the names */ -char * -string_file_owner (file_entry *fe, int len) -{ - return get_owner (fe->buf.st_uid); + g_snprintf (buffer, sizeof (buffer), "%d", fe->buf.st_uid); + return buffer; } +/* ngid */ char * -string_file_group (file_entry *fe, int len) +string_file_ngid (file_entry *fe, int len) { - return get_group (fe->buf.st_gid); -} + static char buffer [10]; -char * -string_file_name (file_entry *fe, int len) -{ - return fe->fname; + g_snprintf (buffer, sizeof (buffer), "%d", fe->buf.st_gid); + return buffer; } -#else + +/* owner */ char * string_file_owner (file_entry *fe, int len) { - if (len) - return name_trunc (get_owner (fe->buf.st_uid), len); - else - return get_owner (fe->buf.st_uid); + return get_owner (fe->buf.st_uid); } +/* group */ char * string_file_group (file_entry *fe, int len) { - if (len) - return name_trunc (get_group (fe->buf.st_gid), len); - else - return get_group (fe->buf.st_gid); + return get_group (fe->buf.st_gid); } +/* mark */ char * -string_file_name (file_entry *fe, int len) +string_marked (file_entry *fe, int len) { - if (len) - return name_trunc (fe->fname, len); - else - return fe->fname; + return fe->f.marked ? "*" : " "; } -#endif +/* space */ char * string_space (file_entry *fe, int len) { return " "; } +/* dot */ char * string_dot (file_entry *fe, int len) { return "."; } -char * -string_marked (file_entry *fe, int len) -{ - return fe->f.marked ? "*" : " "; -} - -char * -string_file_perm_octal (file_entry *fe, int len) -{ - static char buffer [9]; - - sprintf (buffer, "0%06o", fe->buf.st_mode); - return buffer; -} - -char * -string_inode (file_entry *fe, int len) -{ - static char buffer [9]; - - sprintf (buffer, "%ld", (long) fe->buf.st_ino); - return buffer; -} - -char * -string_file_ngid (file_entry *fe, int len) -{ - static char buffer [9]; - - sprintf (buffer, "%d", fe->buf.st_gid); - return buffer; -} - -char * -string_file_nuid (file_entry *fe, int len) -{ - static char buffer [9]; - - sprintf (buffer, "%d", fe->buf.st_uid); - return buffer; -} - #ifdef HAVE_GNOME # define GT 2 #else @@ -440,52 +422,60 @@ char *(*string_fn)(file_entry *, int); sortfn *sort_routine; } formats [] = { -{ "name", 12, 1, J_LEFT, N_("Name"), 1, string_file_name, (sortfn *) sort_name }, -{ "size", 7, 0, J_RIGHT, N_("Size"), 1, string_file_size, (sortfn *) sort_size }, -{ "type", GT, 0, J_LEFT, "", 1, string_file_type, (sortfn *) sort_type }, -{ "mtime", 12, 0, J_RIGHT, N_("MTime"), 1, string_file_mtime, (sortfn *) sort_time }, -{ "bsize", 7, 0, J_RIGHT, N_("Size"), 1, string_file_size_brief, (sortfn *) sort_size }, -{ "perm", 10, 0, J_LEFT, N_("Permission"), 1, string_file_permission, NULL }, -{ "mode", 6, 0, J_RIGHT, N_("Perm"), 1, string_file_perm_octal, NULL }, -{ "|", 1, 0, J_RIGHT, N_("|"), 0, 0, NULL }, -{ "nlink", 2, 0, J_RIGHT, N_("Nl"), 1, string_file_nlinks, (sortfn *) sort_links }, -{ "ngid", 5, 0, J_RIGHT, N_("GID"), 1, string_file_ngid, (sortfn *) sort_ngid }, -{ "nuid", 5, 0, J_RIGHT, N_("UID"), 1, string_file_nuid, (sortfn *) sort_nuid }, -{ "owner", 8, 0, J_LEFT, N_("Owner"), 1, string_file_owner, (sortfn *) sort_owner }, -{ "group", 8, 0, J_LEFT, N_("Group"), 1, string_file_group, (sortfn *) sort_group }, -{ "atime", 12, 0, J_RIGHT, N_("ATime"), 1, string_file_atime, (sortfn *) sort_atime }, -{ "ctime", 12, 0, J_RIGHT, N_("CTime"), 1, string_file_ctime, (sortfn *) sort_ctime }, -{ "space", 1, 0, J_RIGHT, " ", 0, string_space, NULL }, -{ "dot", 1, 0, J_RIGHT, " ", 0, string_dot, NULL }, -{ "mark", 1, 0, J_RIGHT, " ", 1, string_marked, NULL }, -{ "inode", 5, 0, J_RIGHT, N_("Inode"), 1, string_inode, (sortfn *) sort_inode }, +{ "name", 12, 1, J_LEFT_FIT, N_("Name"), 1, string_file_name, (sortfn *) sort_name }, +{ "size", 7, 0, J_RIGHT, N_("Size"), 1, string_file_size, (sortfn *) sort_size }, +{ "bsize", 7, 0, J_RIGHT, N_("Size"), 1, string_file_size_brief, (sortfn *) sort_size }, +{ "type", GT, 0, J_LEFT, "", 1, string_file_type, (sortfn *) sort_type }, +{ "mtime", 12, 0, J_RIGHT, N_("MTime"), 1, string_file_mtime, (sortfn *) sort_time }, +{ "atime", 12, 0, J_RIGHT, N_("ATime"), 1, string_file_atime, (sortfn *) sort_atime }, +{ "ctime", 12, 0, J_RIGHT, N_("CTime"), 1, string_file_ctime, (sortfn *) sort_ctime }, +{ "perm", 10, 0, J_LEFT, N_("Permission"),1,string_file_permission, NULL }, +{ "mode", 6, 0, J_RIGHT, N_("Perm"), 1, string_file_perm_octal, NULL }, +{ "nlink", 2, 0, J_RIGHT, N_("Nl"), 1, string_file_nlinks, (sortfn *) sort_links }, +{ "inode", 5, 0, J_RIGHT, N_("Inode"), 1, string_inode, (sortfn *) sort_inode }, +{ "nuid", 5, 0, J_RIGHT, N_("UID"), 1, string_file_nuid, (sortfn *) sort_nuid }, +{ "ngid", 5, 0, J_RIGHT, N_("GID"), 1, string_file_ngid, (sortfn *) sort_ngid }, +{ "owner", 8, 0, J_LEFT_FIT, N_("Owner"), 1, string_file_owner, (sortfn *) sort_owner }, +{ "group", 8, 0, J_LEFT_FIT, N_("Group"), 1, string_file_group, (sortfn *) sort_group }, +{ "mark", 1, 0, J_RIGHT, " ", 1, string_marked, NULL }, +{ "|", 1, 0, J_RIGHT, " ", 0, NULL, NULL }, +{ "space", 1, 0, J_RIGHT, " ", 0, string_space, NULL }, +{ "dot", 1, 0, J_RIGHT, " ", 0, string_dot, NULL }, }; static char * to_buffer (char *dest, int just_mode, int len, char *txt) { int txtlen = strlen (txt); - int still; + int still, over; + + memset (dest, ' ', len); - if (txtlen > len){ - if (just_mode != J_LEFT) - txt += txtlen - len; - txtlen = len; - } - still = len - txtlen; - if (just_mode == J_LEFT){ - strcpy (dest, txt); - dest += txtlen; - while (still--) - *dest++ = ' '; - *dest = 0; - } else { - while (still--) - *dest++ = ' '; - strcpy (dest, txt); - dest += txtlen; - } - return dest; + still = (over=(txtlen > len)) ? (txtlen - len) : (len - txtlen); + + switch (HIDE_FIT(just_mode)){ + case J_LEFT: + still = 0; + break; + case J_CENTER: + still /= 2; + break; + case J_RIGHT: + default: + break; + } + + if (over){ + if (IS_FIT(just_mode)) + strcpy (dest, name_trunc(txt, len)); + else + strncpy (dest, txt+still, len); + } else + strncpy (dest+still, txt, txtlen); + + dest[len] = '\0'; + + return (dest + len); } int @@ -554,10 +544,6 @@ if (length == width) break; #else - /* What shall we do? Will we color each line according to - * the file type? Any suggestions to mc@timur.kazan.su - */ - attrset (color); if (permission_mode && !strcmp(format->id, "perm")) @@ -569,7 +555,6 @@ #endif } else { #ifndef HAVE_X - /* I'm preffer the view without this 3 lines, try to kill it :-) */ if (attr == SELECTED || attr == MARKED_SELECTED) attrset (SELECTED_COLOR); else @@ -600,7 +585,7 @@ { int second_column = 0; int width, offset; - char buffer [255]; + char buffer [BUF_MEDIUM]; offset = 0; if (!isstatus && panel->split){ @@ -656,13 +641,13 @@ /* Status displays total marked size */ if (panel->marked){ - char buffer [100]; + char buffer [BUF_SMALL]; char *p; attrset (MARKED_COLOR); printw ("%*s", panel->widget.cols-2, " "); widget_move (&panel->widget, llines (panel)+3, 1); - sprintf (buffer, _(" %s bytes in %d file%s"), + g_snprintf (buffer, sizeof (buffer), _(" %s bytes in %d file%s"), size_trunc_sep (panel->total), panel->marked, panel->marked == 1 ? "" : "s"); p = buffer; @@ -683,7 +668,7 @@ link = concat_dir_and_file (panel->cwd, panel->dir.list [panel->selected].fname); len = mc_readlink (link, link_target, MC_MAXPATHLEN); - free (link); + g_free (link); if (len > 0){ link_target[len] = 0; printw ("-> %-*s", panel->widget.cols - 5, @@ -867,7 +852,7 @@ for (i = 0; i < panel->count; i++){ if (strcmp (subdir, panel->dir.list [i].fname) == 0) { do_select (panel, i); - free (subdir); + g_free (subdir); return; } } @@ -875,7 +860,7 @@ /* Try to select a file near the file that is missing */ if (panel->selected >= panel->count) do_select (panel, panel->count-1); - free (subdir); + g_free (subdir); } #ifndef PORT_HAS_PANEL_UPDATE_COLS @@ -914,9 +899,9 @@ /* If the program is shuting down */ if ((midnight_shutdown && auto_save_setup) || saving_setup) - return copy_strings (panel->panel_name, 0); + return g_strconcat (panel->panel_name, NULL); else - return copy_strings ("Temporal:", panel->panel_name, 0); + return g_strconcat ("Temporal:", panel->panel_name, NULL); } static void @@ -940,21 +925,21 @@ while (current){ old = current; current = current->prev; - free (old->text); - free (old); + g_free (old->text); + g_free (old); } } - free (p->hist_name); + g_free (p->hist_name); delete_format (p->format); delete_format (p->status_format); - free (p->user_format); + g_free (p->user_format); for (i = 0; i < LIST_TYPES; i++) - free (p->user_status_format [i]); - free (p->dir.list); - free (p->panel_name); - free (name); + g_free (p->user_status_format [i]); + g_free (p->dir.list); + g_free (p->panel_name); + g_free (name); } static void @@ -981,8 +966,7 @@ char *section; int i, err; - panel = xmalloc (sizeof (WPanel), "panel_new"); - memset (panel, 0, sizeof (WPanel)); + panel = g_new0 (WPanel, 1); /* No know sizes of the panel at startup */ init_widget (&panel->widget, 0, 0, 0, 0, (callback_fn) @@ -995,11 +979,11 @@ mc_get_current_wd (panel->cwd, sizeof (panel->cwd)-2); strcpy (panel->lwd, "."); - panel->hist_name = copy_strings ("Dir Hist ", panel_name, 0); + panel->hist_name = g_strconcat ("Dir Hist ", panel_name, NULL); panel->dir_history = history_get (panel->hist_name); directory_history_add (panel, panel->cwd); - panel->dir.list = (file_entry *) malloc (MIN_FILES * sizeof (file_entry)); + panel->dir.list = g_new (file_entry, MIN_FILES); panel->dir.size = MIN_FILES; panel->active = 0; panel->filter = 0; @@ -1017,32 +1001,32 @@ panel->status_format = 0; panel->format_modified = 1; - panel->panel_name = strdup (panel_name); - panel->user_format = strdup (DEFAULT_USER_FORMAT); + panel->panel_name = g_strdup (panel_name); + panel->user_format = g_strdup (DEFAULT_USER_FORMAT); for(i = 0; i < LIST_TYPES; i++) - panel->user_status_format [i] = strdup (DEFAULT_USER_FORMAT); + panel->user_status_format [i] = g_strdup (DEFAULT_USER_FORMAT); panel->search_buffer [0] = 0; panel->frame_size = frame_half; - section = copy_strings ("Temporal:", panel->panel_name, 0); + section = g_strconcat ("Temporal:", panel->panel_name, NULL); if (!profile_has_section (section, profile_name)){ - free (section); - section = strdup (panel->panel_name); + g_free (section); + section = g_strdup (panel->panel_name); } panel_load_setup (panel, section); - free (section); + g_free (section); /* Load format strings */ err = set_panel_formats (panel); if (err){ if (err & 0x01){ - free (panel->user_format); - panel->user_format = strdup (DEFAULT_USER_FORMAT); + g_free (panel->user_format); + panel->user_format = g_strdup (DEFAULT_USER_FORMAT); } if (err & 0x02){ - free (panel->user_status_format [panel->list_type]); - panel->user_status_format [panel->list_type] = strdup (DEFAULT_USER_FORMAT); + g_free (panel->user_status_format [panel->list_type]); + panel->user_status_format [panel->list_type] = g_strdup (DEFAULT_USER_FORMAT); } set_panel_formats (panel); } @@ -1077,7 +1061,7 @@ strcpy (panel->cwd, PATH_SEP_STR); else *last_slash = 0; - bzero (&(panel->dir_stat), sizeof (panel->dir_stat)); + memset (&(panel->dir_stat), 0, sizeof (panel->dir_stat)); show_dir (panel); } @@ -1222,7 +1206,7 @@ while (*format){ /* format can be an empty string */ int found = 0; - darr = xmalloc (sizeof (format_e), "parse_display_format"); + darr = g_new (format_e, 1); /* I'm so ugly, don't look at me :-) */ if (!home) @@ -1302,7 +1286,7 @@ delete_format (home); old_char = format [pos]; format [pos] = 0; - *error = copy_strings(_("Unknow tag on display format: "), format, 0); + *error = g_strconcat (_("Unknow tag on display format: "), format, NULL); format [pos] = old_char; return 0; } @@ -1398,7 +1382,7 @@ form = use_display_format (p, panel_format (p), &err, 0); if (err){ - free (err); + g_free (err); retcode = 1; } else { @@ -1413,7 +1397,7 @@ form = use_display_format (p, mini_status_format (p), &err, 1); if (err){ - free (err); + g_free (err); retcode += 2; } else { @@ -2060,13 +2044,13 @@ #endif { char *tmp = name_quote (fe->fname, 0); - char *cmd = copy_strings (".", PATH_SEP_STR, tmp, 0); + char *cmd = g_strconcat (".", PATH_SEP_STR, tmp, NULL); if (!confirm_execute || (query_dialog (_(" The Midnight Commander "), _(" Do you really want to execute? "), 0, 2, _("&Yes"), _("&No")) == 0)) execute (cmd); - free (tmp); - free (cmd); + g_free (tmp); + g_free (cmd); } #ifdef USE_VFS else { @@ -2079,7 +2063,7 @@ if (!mc_setctl (tmp, MCCTL_EXTFS_RUN, NULL)) message (1, _(" Warning "), _(" No action taken ")); - free (tmp); + g_free (tmp); } #endif /* USE_VFS */ return 1; @@ -2127,7 +2111,7 @@ move_down (panel); - free (new_dir); + g_free (new_dir); } static void @@ -2160,7 +2144,7 @@ p[1] = 0; } if (*buffer == PATH_SEP) - new_dir = strdup (buffer); + new_dir = g_strdup (buffer); else new_dir = concat_dir_and_file (panel->cwd, buffer); @@ -2170,7 +2154,7 @@ move_down (panel); - free (new_dir); + g_free (new_dir); } } @@ -2567,7 +2551,7 @@ if (panel == NULL) return; - filename = strdup (selection (panel)->fname); + filename = g_strdup (selection (panel)->fname); unselect_item (panel); do_sort (&panel->dir, panel->sort_type, panel->count-1, panel->reverse, panel->case_sensitive); panel->selected = -1; @@ -2577,7 +2561,7 @@ break; } } - free (filename); + g_free (filename); panel->top_file = panel->selected - ITEMS (panel)/2; if (panel->top_file < 0) panel->top_file = 0; @@ -2597,10 +2581,10 @@ if (sort_order == (sortfn *) unsorted){ char *current_file; - current_file = strdup (panel->dir.list [panel->selected].fname); + current_file = g_strdup (panel->dir.list [panel->selected].fname); panel_reload (panel); try_to_select (panel, current_file); - free (current_file); + g_free (current_file); } panel_re_sort (panel); } diff -ruN old/mc-4.5.9/src/setup.c new/mc-4.5.10/src/setup.c --- old/mc-4.5.9/src/setup.c Mon Jan 18 17:44:10 1999 +++ new/mc-4.5.10/src/setup.c Sun Jan 31 18:55:18 1999 @@ -21,12 +21,9 @@ #include #include #include "tty.h" -#include #include -#include "mad.h" -#include "dir.h" #include "global.h" -#include "util.h" /* Functions and externs */ +#include "dir.h" #include "panel.h" #include "main.h" #include "tree.h" @@ -64,9 +61,10 @@ extern int ftpfs_retry_seconds; extern int ftpfs_use_passive_connections; extern int ftpfs_use_unix_list_options; +extern int ftpfs_first_cd_then_ls; #endif -/* "$Id: setup.c,v 1.19 1999/01/17 04:17:23 unammx Exp $" */ +/* "$Id: setup.c,v 1.21 1999/01/31 20:28:35 norbert Exp $" */ #ifdef USE_VFS extern int vfs_timeout; @@ -226,6 +224,7 @@ { "ftpfs_always_use_proxy", &ftpfs_always_use_proxy }, { "ftpfs_use_passive_connections", &ftpfs_use_passive_connections }, { "ftpfs_use_unix_list_options", &ftpfs_use_unix_list_options }, + { "ftpfs_first_cd_then_ls", &ftpfs_first_cd_then_ls }, #endif #endif #ifdef USE_INTERNAL_EDIT @@ -256,12 +255,12 @@ void panel_save_setup (WPanel *panel, char *section) { - char buffer [40]; + char buffer [BUF_TINY]; int i; - sprintf (buffer, "%d", panel->reverse); + g_snprintf (buffer, sizeof (buffer), "%d", panel->reverse); save_string (section, "reverse", buffer, profile_name); - sprintf (buffer, "%d", panel->case_sensitive); + g_snprintf (buffer, sizeof (buffer), "%d", panel->case_sensitive); save_string (section, "case_sensitive", buffer, profile_name); for (i = 0; sort_names [i].key; i++) if (sort_names [i].sort_type == (sortfn *) panel->sort_type){ @@ -280,12 +279,12 @@ panel->user_format, profile_name); for (i = 0; i < LIST_TYPES; i++){ - sprintf (buffer, "user_status%d", i); + g_snprintf (buffer, sizeof (buffer), "user_status%d", i); save_string (section, buffer, panel->user_status_format [i], profile_name); } - sprintf (buffer, "%d", panel->user_mini_status); + g_snprintf (buffer, sizeof (buffer), "%d", panel->user_mini_status); save_string (section, "user_mini_status", buffer, profile_name); } @@ -295,17 +294,17 @@ { char *profile; int i; - char buffer [6]; + char buffer [BUF_TINY]; profile = concat_dir_and_file (home_dir, PROFILE_NAME); /* Save integer options */ for (i = 0; layout [i].opt_name; i++){ - sprintf (buffer, "%d", *layout [i].opt_addr); + g_snprintf (buffer, sizeof (buffer), "%d", *layout [i].opt_addr); save_string ("Layout", layout [i].opt_name, buffer, profile); } - free (profile); + g_free (profile); } void @@ -320,7 +319,7 @@ for (i = 0; options [i].opt_name; i++) set_int (profile, options [i].opt_name, *options [i].opt_addr); - free (profile); + g_free (profile); } static void @@ -387,7 +386,7 @@ ftpfs_proxy_host, profile); #endif #endif - free (profile); + g_free (profile); saving_setup = 0; } @@ -395,7 +394,7 @@ panel_load_setup (WPanel *panel, char *section) { int i; - char buffer [40]; + char buffer [BUF_TINY]; panel->reverse = load_int (section, "reverse", 0); panel->case_sensitive = load_int (section, "case_sensitive", OS_SORT_CASE_SENSITIVE_DEFAULT); @@ -404,7 +403,7 @@ load_string (section, "sort_order", "name", buffer, sizeof (buffer)); panel->sort_type = (sortfn *) sort_name; for (i = 0; sort_names [i].key; i++) - if (strcasecmp (sort_names [i].key, buffer) == 0){ + if ( g_strcasecmp (sort_names [i].key, buffer) == 0){ panel->sort_type = sort_names [i].sort_type; break; } @@ -413,7 +412,7 @@ load_string (section, PORT_LIST_MODE_NAME, PORT_LIST_MODE_DEFAULT, buffer, sizeof (buffer)); panel->list_type = list_full; for (i = 0; list_types [i].key; i++) - if (strcasecmp (list_types [i].key, buffer) == 0){ + if ( g_strcasecmp (list_types [i].key, buffer) == 0){ panel->list_type = list_types [i].list_type; break; } @@ -423,18 +422,18 @@ #endif /* User formats */ if (panel->user_format){ - free (panel->user_format); + g_free (panel->user_format); panel->user_format = 0; } - panel->user_format = strdup (get_profile_string (section, "user_format", + panel->user_format = g_strdup (get_profile_string (section, "user_format", DEFAULT_USER_FORMAT, profile_name)); for (i = 0; i < LIST_TYPES; i++){ if (panel->user_status_format [i]) - free (panel->user_status_format [i]); - sprintf (buffer, "user_status%d", i); + g_free (panel->user_status_format [i]); + g_snprintf (buffer, sizeof (buffer), "user_status%d", i); panel->user_status_format [i] = - strdup (get_profile_string (section, buffer, + g_strdup (get_profile_string (section, buffer, DEFAULT_USER_FORMAT, profile_name)); } @@ -466,7 +465,7 @@ load_string (section, "display", "listing", buffer, sizeof (buffer)); for (i = 0; panel_types [i].opt_name; i++) - if (strcasecmp (panel_types [i].opt_name, buffer) == 0){ + if ( g_strcasecmp (panel_types [i].opt_name, buffer) == 0){ mode = panel_types [i].opt_type; break; } @@ -477,13 +476,13 @@ static char * do_load_string (char *s, char *ss, char *def) { - char *buffer = xmalloc (128, "dls"); + char *buffer = g_malloc (128); char *p; load_string (s, ss, def, buffer, 128); - p = strdup (buffer); - free (buffer); + p = g_strdup (buffer); + g_free (buffer); return p; } @@ -502,12 +501,12 @@ if (exist_file (buffer)){ profile = buffer; } else if (exist_file (inifile)){ - profile = strdup (inifile); - free (buffer); + profile = g_strdup (inifile); + g_free (buffer); } else { profile = buffer; } - free (inifile); + g_free (inifile); profile_name = profile; @@ -528,13 +527,13 @@ startup_left_mode = view_listing; if (!other_dir){ - buffer = (char*) malloc (MC_MAXPATHLEN); + buffer = (char*) g_malloc (MC_MAXPATHLEN); load_string ("Dirs", "other_dir", ".", buffer, MC_MAXPATHLEN); if (vfs_file_is_local (buffer)) other_dir = buffer; else - free (buffer); + g_free (buffer); } #ifdef USE_NETCODE ftpfs_proxy_host = do_load_string ("Misc", "ftp_proxy_host", "gate"); @@ -545,7 +544,7 @@ load_string ("Misc", "find_ignore_dirs", "", setup_color_string, sizeof (setup_color_string)); if (setup_color_string [0]) - find_ignore_dirs = copy_strings (":", setup_color_string, ":", 0); + find_ignore_dirs = g_strconcat (":", setup_color_string, ":", NULL); /* The default color and the terminal dependent color */ load_string ("Colors", "base_color", "", setup_color_string, @@ -576,7 +575,7 @@ load_string ("Misc", "ftpfs_password", "", buffer, sizeof (buffer)); if (buffer [0]) - return strdup (buffer); + return g_strdup (buffer); else return 0; } @@ -585,7 +584,7 @@ void done_setup (void) { - free (profile_name); + g_free (profile_name); done_hotlist (); done_panelize (); /* directory_history_free (); */ @@ -602,10 +601,10 @@ if (!terminal) return; - section_name = copy_strings ("terminal:", terminal, 0); + section_name = g_strconcat ("terminal:", terminal, NULL); profile_keys = profile_init_iterator (section_name, profile_name); if (!profile_keys){ - free (section_name); + g_free (section_name); return; } @@ -615,9 +614,9 @@ valcopy = convert_controls (value); if (key_code) define_sequence (key_code, valcopy, MCKEY_NOACTION); - free (valcopy); + g_free (valcopy); } - free (section_name); + g_free (section_name); return; } @@ -632,5 +631,5 @@ /* We don't want a huge database loaded in core */ free_profile_name (libfile); - free (libfile); + g_free (libfile); } diff -ruN old/mc-4.5.9/src/slint.c new/mc-4.5.10/src/slint.c --- old/mc-4.5.9/src/slint.c Mon Jan 18 17:44:11 1999 +++ new/mc-4.5.10/src/slint.c Sun Jan 31 18:55:18 1999 @@ -27,9 +27,8 @@ #include #include #include "tty.h" -#include "mad.h" +#include "global.h" #include "color.h" -#include "util.h" #include "mouse.h" /* Gpm_Event is required in key.h */ #include "key.h" /* define_sequence */ #include "main.h" /* extern: force_colors */ @@ -274,13 +273,13 @@ int key; char *send; char *display = " "; - char tmp[100]; + char tmp[BUF_SMALL]; for ( key = 1; key < 9; key++ ) { - sprintf ( tmp, "k%d", key); + g_snprintf (tmp, sizeof (tmp), "k%d", key); send = (char *) SLtt_tgetstr (tmp); if (send) { - sprintf(tmp, "\033&f%dk%dd%dL%s%s", key, + g_snprintf(tmp, sizeof (tmp), "\033&f%dk%dd%dL%s%s", key, strlen(display), strlen(send), display, send); SLtt_write_string (tmp); } @@ -394,11 +393,11 @@ break; p = p->next; } - p->next = malloc (sizeof (c)); + p->next = g_new (struct colors_avail, 1); p = p->next; p->next = 0; - p->fg = fg ? strdup (fg) : 0; - p->bg = bg ? strdup (bg) : 0; + p->fg = fg ? g_strdup (fg) : 0; + p->bg = bg ? g_strdup (bg) : 0; if (!fg) /* Index in color_map array = COLOR_INDEX - 1 */ fg = color_map[EDITOR_NORMAL_COLOR_INDEX - 1].fg; diff -ruN old/mc-4.5.9/src/subshell.c new/mc-4.5.10/src/subshell.c --- old/mc-4.5.9/src/subshell.c Mon Jan 18 17:44:10 1999 +++ new/mc-4.5.10/src/subshell.c Sun Jan 31 18:55:18 1999 @@ -207,7 +207,7 @@ /* {{{ Local variables */ /* This must be remembered across calls to init_subshell() */ - static char pty_name[40]; + static char pty_name[BUF_SMALL]; int pty_slave; /* Braindead tcsh can't redirect output to a file descriptor? */ @@ -264,14 +264,14 @@ /* {{{ Initialise the pty's I/O buffer */ pty_buffer_size = INITIAL_PTY_BUFFER_SIZE; - pty_buffer = (char *) malloc (pty_buffer_size); + pty_buffer = (char *) g_malloc (pty_buffer_size); /* }}} */ /* {{{ Create a pipe for receiving the subshell's CWD */ if (subshell_type == TCSH) { - sprintf (tcsh_fifo, "/tmp/mc.pipe.%d", getpid ()); + g_snprintf (tcsh_fifo, sizeof (tcsh_fifo), "/tmp/mc.pipe.%d", getpid ()); if (mkfifo (tcsh_fifo, 0600) == -1) { perror (__FILE__": mkfifo"); @@ -493,20 +493,20 @@ switch (subshell_type) { - char precmd[80]; + char precmd[BUF_SMALL]; case BASH: - sprintf (precmd, " PROMPT_COMMAND='pwd>&%d;kill -STOP $$'\n", + g_snprintf (precmd, sizeof (precmd), " PROMPT_COMMAND='pwd>&%d;kill -STOP $$'\n", subshell_pipe[WRITE]); goto write_it; case ZSH: - sprintf (precmd, "precmd(){ pwd>&%d;kill -STOP $$ }\n", + g_snprintf (precmd, sizeof (precmd), "precmd(){ pwd>&%d;kill -STOP $$ }\n", subshell_pipe[WRITE]); goto write_it; case TCSH: - sprintf (precmd, "alias precmd 'echo $cwd:q >>%s;kill -STOP $$'\n", tcsh_fifo); + g_snprintf (precmd, sizeof (precmd), "alias precmd 'echo $cwd:q >>%s;kill -STOP $$'\n", tcsh_fifo); write_it: write (subshell_pty, precmd, strlen (precmd)); @@ -617,7 +617,7 @@ if (subshell_prompt == NULL) /* First time through */ { - subshell_prompt = (char *) malloc (prompt_size); + subshell_prompt = (char *) g_malloc (prompt_size); *subshell_prompt = '\0'; prompt_pos = 0; } @@ -656,7 +656,7 @@ subshell_prompt[prompt_pos++] = pty_buffer[i]; if (prompt_pos == prompt_size) - subshell_prompt = (char *) realloc (subshell_prompt, + subshell_prompt = (char *) g_realloc (subshell_prompt, prompt_size *= 2); } @@ -705,10 +705,10 @@ else { if (subshell_type == TCSH) - sprintf (pty_buffer, " echo -n Jobs:>/tmp/mc.pipe.%d;jobs>/tmp/" + g_snprintf (pty_buffer, sizeof (pty_buffer), " echo -n Jobs:>/tmp/mc.pipe.%d;jobs>/tmp/" "mc.pipe.%d;kill -STOP $$\n", getpid (), getpid ()); else - sprintf (pty_buffer, " echo -n Jobs:>&%d;jobs>&%d;kill -STOP $$\n", + g_snprintf (pty_buffer, sizeof (pty_buffer), " echo -n Jobs:>&%d;jobs>&%d;kill -STOP $$\n", subshell_pipe[WRITE], subshell_pipe[WRITE]); write (subshell_pty, pty_buffer, strlen (pty_buffer)); @@ -735,7 +735,7 @@ if (quit && subshell_type == TCSH) { /* We abuse of pty_buffer here, but it doesn't matter at this stage */ - sprintf (pty_buffer, "/tmp/mc.pipe.%d", getpid ()); + g_snprintf (pty_buffer, sizeof (pty_buffer), "/tmp/mc.pipe.%d", getpid ()); if (unlink (pty_buffer) == -1) perror (__FILE__": couldn't remove named pipe /tmp/mc.pipe.NNN"); } @@ -767,7 +767,7 @@ if (*directory) { temp = name_quote (directory, 0); write (subshell_pty, temp, strlen (temp)); - free (temp); + g_free (temp); } else { write (subshell_pty, "/", 1); } @@ -1030,7 +1030,7 @@ ptr = pty_name+9; for (num=0;;num++) { - sprintf(ptr,"%d",num); /* surpriiise ... SCO lacks itoa() */ + g_snprintf(ptr, 9, "%d",num); /* surpriiise ... SCO lacks itoa() */ /* Try to open master */ if ((pty_master = open (pty_name, O_RDWR)) == -1) if (errno == ENOENT) /* Different from EIO */ diff -ruN old/mc-4.5.9/src/tree.c new/mc-4.5.10/src/tree.c --- old/mc-4.5.9/src/tree.c Mon Jan 18 17:44:10 1999 +++ new/mc-4.5.10/src/tree.c Sun Jan 31 18:55:18 1999 @@ -31,9 +31,7 @@ #include #include #include "tty.h" -#include "mad.h" #include "global.h" -#include "util.h" #include "color.h" #include "dialog.h" #include "dir.h" @@ -61,7 +59,7 @@ static int tree_callback (Dlg_head *h, WTree *tree, int msg, int par); #define tcallback (callback_fn) tree_callback -/* "$Id: tree.c,v 1.17 1999/01/14 01:11:27 unammx Exp $" */ +/* "$Id: tree.c,v 1.19 1999/01/27 01:09:30 timur Exp $" */ static tree_entry *back_ptr (tree_entry *ptr, int *count) { @@ -106,7 +104,7 @@ /* We assume the directory is not yet in the list */ - new = xmalloc (sizeof (tree_entry), "tree, tree_entry"); + new = g_new (tree_entry, 1); if (!tree->store->tree_first){ /* Empty list */ tree->store->tree_first = new; @@ -119,7 +117,7 @@ tree->store->tree_last = new; /* Calculate attributes */ - new->name = strdup (name); + new->name = g_strdup (name); len = strlen (new->name); new->sublevel = 0; for (i = 0; i < len; i++) @@ -164,12 +162,12 @@ void tree_destroy (WTree *tree) { - + tree_store_remove_entry_remove_hook (remove_callback); save_tree (tree); tree_store_destroy (); if (tree->tree_shown){ - free (tree->tree_shown); + g_free (tree->tree_shown); tree->tree_shown = 0; } tree->selected_ptr = NULL; @@ -183,7 +181,7 @@ filename = concat_dir_and_file (home_dir, MC_TREE); v = tree_store_load (filename); - free (filename); + g_free (filename); tree->selected_ptr = tree->store->tree_first; @@ -198,7 +196,7 @@ filename = concat_dir_and_file (home_dir, MC_TREE); error = tree_store_save (filename); - free (filename); + g_free (filename); if (error){ fprintf (stderr, _("Can't open the %s file for writing:\n%s\n"), MC_TREE, @@ -260,9 +258,9 @@ } if (tree->tree_shown) - free (tree->tree_shown); - tree->tree_shown = (tree_entry**)xmalloc (sizeof (tree_entry*)*tree_lines, - "tree, show_tree"); + g_free (tree->tree_shown); + tree->tree_shown = g_new (tree_entry*, tree_lines); + for (i = 0; i < tree_lines; i++) tree->tree_shown [i] = NULL; if (tree->store->tree_first) @@ -646,7 +644,7 @@ if (!tree->selected_ptr) return; - sprintf (cmd_buf, _("Copy \"%s\" directory to:"), + g_snprintf (cmd_buf, sizeof(cmd_buf), _("Copy \"%s\" directory to:"), name_trunc (tree->selected_ptr->name, 50)); dest = input_expand_dialog (_(" Copy "), cmd_buf, default_dest); if (!dest || !*dest){ @@ -658,14 +656,14 @@ copy_dir_dir (ctx, tree->selected_ptr->name, dest, 1, 0, 0, 0, &count, &bytes); file_op_context_destroy (ctx); - free (dest); + g_free (dest); } static void tree_help_cmd (void) { char *hlpfile = concat_dir_and_file (mc_home, "mc.hlp"); interactive_display (hlpfile, "[Directory Tree]"); - free (hlpfile); + g_free (hlpfile); } static int tree_copy_cmd (WTree *tree) @@ -684,7 +682,7 @@ if (!tree->selected_ptr) return; - sprintf (cmd_buf, _("Move \"%s\" directory to:"), + g_snprintf (cmd_buf, sizeof (cmd_buf), _("Move \"%s\" directory to:"), name_trunc (tree->selected_ptr->name, 50)); dest = input_expand_dialog (_(" Move "), cmd_buf, default_dest); if (!dest || !*dest){ @@ -693,12 +691,12 @@ if (stat (dest, &buf)){ message (1, _(" Error "), _(" Can't stat the destination \n %s "), unix_error_string (errno)); - free (dest); + g_free (dest); return; } if (!S_ISDIR (buf.st_mode)){ message (1, _(" Error "), _(" The destination isn't a directory ")); - free (dest); + g_free (dest); return; } @@ -707,7 +705,7 @@ move_dir_dir (ctx, tree->selected_ptr->name, dest, &count, &bytes); file_op_context_destroy (ctx); - free (dest); + g_free (dest); } static int @@ -750,14 +748,12 @@ if (mc_chdir (PATH_SEP_STR)) return; if (confirm_delete){ - char *cmd_buf; + char *buf; int result; - cmd_buf = xmalloc (strlen (tree->selected_ptr->name) + 20, - "tree, rmdir_cmd"); - sprintf (cmd_buf, _(" Delete %s? "), tree->selected_ptr->name); - result = query_dialog (_(" Delete "), cmd_buf, 3, 2, _("&Yes"), _("&No")); - free (cmd_buf); + buf = g_strdup_printf (_(" Delete %s? "), tree->selected_ptr->name); + result = query_dialog (_(" Delete "), buf, 3, 2, _("&Yes"), _("&No")); + g_free (buf); if (result != 0){ return; } @@ -1059,7 +1055,7 @@ WTree * tree_new (int is_panel, int y, int x, int lines, int cols) { - WTree *tree = xmalloc (sizeof (WTree), "tree_new"); + WTree *tree = g_new (WTree, 1); init_widget (&tree->widget, y, x, lines, cols, tcallback, (destroy_fn) tree_destroy, (mouse_h) event_callback, NULL); diff -ruN old/mc-4.5.9/src/treestore.c new/mc-4.5.10/src/treestore.c --- old/mc-4.5.9/src/treestore.c Mon Jan 18 17:44:11 1999 +++ new/mc-4.5.10/src/treestore.c Sun Jan 31 18:55:18 1999 @@ -41,13 +41,10 @@ #include #include #include -#include #include -#include -#include "fs.h" -#include "../vfs/vfs.h" -#include "util.h" +#include "global.h" #include "treestore.h" +#include "../vfs/vfs.h" #ifdef OS2_NT # include #endif @@ -154,8 +151,8 @@ while (current){ old = current; current = current->next; - free (old->name); - free (old); + g_free (old->name); + g_free (old); } ts.tree_first = NULL; @@ -166,7 +163,7 @@ static char * decode (char *buffer) { - char *res = strdup (buffer); + char *res = g_strdup (buffer); char *p, *q; for (p = q = res; *p; p++, q++){ @@ -274,7 +271,7 @@ e->scanned = scanned; strcpy (oldname, name); } - free (name); + g_free (name); } fclose (file); } @@ -301,7 +298,7 @@ special_chars++; } - res = malloc (p - string + special_chars + 1); + res = g_malloc (p - string + special_chars + 1); for (p = string, q = res; *p; p++, q++){ if (*p != '\n' && *p != '\\'){ *q = *p; @@ -345,12 +342,12 @@ char *encoded = encode (current->name + common); i = fprintf (file, "%d:%d %s\n", current->scanned, common, encoded); - free (encoded); + g_free (encoded); } else { char *encoded = encode (current->name); i = fprintf (file, "%d:%s\n", current->scanned, encoded); - free (encoded); + g_free (encoded); } if (i == EOF){ @@ -389,7 +386,7 @@ return current; /* Already in the list */ /* Not in the list -> add it */ - new = xmalloc (sizeof (tree_entry), "ts, tree_entry"); + new = g_new (tree_entry, 1); if (!current){ /* Append to the end of the list */ if (!ts.tree_first){ @@ -418,7 +415,7 @@ } /* Calculate attributes */ - new->name = strdup (name); + new->name = g_strdup (name); len = strlen (new->name); new->sublevel = 0; for (i = 0; i < len; i++) @@ -446,7 +443,7 @@ if (new->sublevel > 1){ /* Let's check if the parent directory is in the tree */ - char *parent = strdup (new->name); + char *parent = g_strdup (new->name); int i; for (i = strlen (parent) - 1; i > 1; i--){ @@ -456,7 +453,7 @@ break; } } - free (parent); + g_free (parent); } tree_store_dirty (TRUE); @@ -493,8 +490,8 @@ ts.tree_last = entry->prev; /* Free the memory used by the entry */ - free (entry->name); - free (entry); + g_free (entry->name); + g_free (entry); return ret; } @@ -544,13 +541,14 @@ if (!ts.loaded) return; + g_return_if_fail (ts.check_name != NULL); /* Calculate the full name of the subdirectory */ if (subname [0] == '.' && (subname [1] == 0 || (subname [1] == '.' && subname [2] == 0))) return; if (ts.check_name [0] == PATH_SEP && ts.check_name [1] == 0) - name = copy_strings (PATH_SEP_STR, subname, 0); + name = g_strconcat (PATH_SEP_STR, subname, NULL); else name = concat_dir_and_file (ts.check_name, subname); @@ -559,10 +557,12 @@ while (current && (flag = pathcmp (current->name, name)) < 0) current = current->next; - if (flag != 0) + if (flag != 0){ /* Doesn't exist -> add it */ current = tree_store_add_entry (name); - free (name); + tree_store_notify_add (current); + } + g_free (name); /* Clear the deletion mark from the subdirectory and its children */ base = current; @@ -596,19 +596,19 @@ if (!current){ struct stat s; - if (stat (path, &s) == -1) + if (mc_stat (path, &s) == -1) return NULL; if (!S_ISDIR (s.st_mode)) return NULL; current = tree_store_add_entry (path); - ts.check_name = strdup (path); + ts.check_name = g_strdup (path); return current; } - ts.check_name = strdup (path); + ts.check_name = g_strdup (path); retval = current; @@ -645,6 +645,8 @@ if (!ts.loaded) return; + + g_return_if_fail (ts.check_name); /* Check delete marks and delete if found */ len = strlen (ts.check_name); @@ -659,7 +661,7 @@ remove_entry (old); } - free (ts.check_name); + g_free (ts.check_name); ts.check_name = NULL; } @@ -686,11 +688,11 @@ continue; full_name = concat_dir_and_file (dir, dp->d_name); - if (lstat (full_name, &buf) != -1){ + if (mc_lstat (full_name, &buf) != -1){ if (S_ISDIR (buf.st_mode)) tree_store_mark_checked (dp->d_name); } - free (full_name); + g_free (full_name); } mc_closedir (dirp); } @@ -701,6 +703,7 @@ } static Hook *remove_entry_hooks; +static Hook *add_entry_hooks; void tree_store_add_entry_remove_hook (tree_store_remove_fn callback, void *data) @@ -709,6 +712,12 @@ } void +tree_store_remove_entry_remove_hook (tree_store_remove_fn callback) +{ + delete_hook (&remove_entry_hooks, (void (*)(void *))callback); +} + +void tree_store_notify_remove (tree_entry *entry) { Hook *p = remove_entry_hooks; @@ -722,6 +731,32 @@ } } +void +tree_store_add_entry_add_hook (tree_store_add_fn callback, void *data) +{ + add_hook (&add_entry_hooks, (void (*)(void *))callback, data); +} + +void +tree_store_remove_entry_add_hook (tree_store_add_fn callback) +{ + delete_hook (&add_entry_hooks, (void (*)(void *))callback); +} + +void +tree_store_notify_add (tree_entry *entry) +{ + Hook *p = add_entry_hooks; + tree_store_add_fn r; + + + while (p){ + r = (tree_store_add_fn) p->hook_fn; + r (entry, p->hook_data); + p = p->next; + } +} + tree_scan * tree_store_opendir (char *path) { @@ -739,7 +774,7 @@ if (entry->next == NULL) return NULL; - scan = xmalloc (sizeof (tree_scan), ""); + scan = g_new (tree_scan, 1); scan->base = entry; scan->current = entry->next; scan->sublevel = entry->next->sublevel; @@ -777,5 +812,5 @@ { g_assert (scanner != NULL); - free (scanner); + g_free (scanner); } diff -ruN old/mc-4.5.9/src/treestore.h new/mc-4.5.10/src/treestore.h --- old/mc-4.5.9/src/treestore.h Mon Jan 18 17:44:10 1999 +++ new/mc-4.5.10/src/treestore.h Sun Jan 31 18:55:18 1999 @@ -44,10 +44,25 @@ tree_entry *tree_store_whereis (char *name); tree_entry *tree_store_rescan (char *dir); +/* + * Register/unregister notification functions for "entry_remove" + */ typedef void (*tree_store_remove_fn)(tree_entry *tree, void *data); -void tree_store_add_entry_remove_hook (tree_store_remove_fn callback, void *data); +void tree_store_add_entry_remove_hook (tree_store_remove_fn callback, void *data); +void tree_store_remove_entry_remove_hook (tree_store_remove_fn callback); -void tree_store_notify_remove (tree_entry *entry); +/* + * Register/unregister notification functions for "entry_remove" + */ +typedef void (*tree_store_add_fn)(tree_entry *tree, void *data); +void tree_store_add_entry_add_hook (tree_store_remove_fn callback, void *data); +void tree_store_remove_entry_add_hook (tree_store_remove_fn callback); + +/* + * Changes in the tree_entry are notified with these + */ +void tree_store_notify_remove (tree_entry *entry); +void tree_store_notify_add (tree_entry *entry); tree_scan *tree_store_opendir (char *path); tree_entry *tree_store_readdir (tree_scan *scanner); diff -ruN old/mc-4.5.9/src/user.c new/mc-4.5.10/src/user.c --- old/mc-4.5.9/src/user.c Mon Jan 18 17:44:10 1999 +++ new/mc-4.5.10/src/user.c Sun Jan 31 18:55:18 1999 @@ -21,14 +21,10 @@ # include #endif #include "tty.h" -#include /* For free() */ -#include "fs.h" #include #include #include #include -#include "mad.h" -#include "util.h" #include "global.h" #include "dialog.h" #include "color.h" @@ -47,7 +43,7 @@ #include "view.h" /* for default_* externs */ -/* "$Id: user.c,v 1.9 1999/01/10 08:56:08 unammx Exp $" */ +/* "$Id: user.c,v 1.10 1999/01/27 01:09:32 timur Exp $" */ #define MAX_ENTRIES 40 #define MAX_ENTRY_LEN 60 @@ -152,17 +148,17 @@ } /* Copy the variable name */ - var_name = xmalloc (dots - p, "check_format_var"); + var_name = g_malloc (dots - p); strncpy (var_name, p+4, dots-2 - (p+3)); var_name [dots-2 - (p+3)] = 0; value = getenv (var_name); if (value){ - *v = strdup (value); + *v = g_strdup (value); return q-p; } - free (var_name); - var_name = xmalloc (q - dots + 1, "check_format_var_2"); + g_free (var_name); + var_name = g_malloc (q - dots + 1); strncpy (var_name, dots, q - dots + 1); var_name [q-dots] = 0; *v = var_name; @@ -197,7 +193,7 @@ quote_func = fake_name_quote; if (c == '%') - return strdup ("%"); + return g_strdup ("%"); if (islower (c)) panel = cpanel; @@ -205,7 +201,7 @@ if (get_other_type () == view_listing){ panel = other_panel; } else - return strdup (""); + return g_strdup (""); } if (!panel) panel = cpanel; @@ -234,12 +230,12 @@ if (panel->dir.list [i].f.marked) length += strlen (panel->dir.list [i].fname) + 1; - block = xmalloc (length*2+1, "expand_format"); + block = g_malloc (length*2+1); *block = 0; for (i = 0; i < panel->count; i++) if (panel->dir.list [i].f.marked){ strcat (block, tmp = (*quote_func) (panel->dir.list [i].fname, 0)); - free (tmp); + g_free (tmp); strcat (block, " "); if (c == 'u') do_file_mark (panel, i, 0); @@ -247,7 +243,7 @@ return block; } /* sub case block */ } /* switch */ - return strdup (""); + return g_strdup (""); } /* Checks for shell patterns defination */ @@ -505,7 +501,7 @@ #ifdef OS2_NT /* OS/2 and NT requires the command to end in .cmd */ - file_name = copy_strings (file_name, ".cmd", NULL); + file_name = g_strconcat (file_name, ".cmd", NULL); #endif if ((cmd_file_fd = open (file_name, O_RDWR | O_CREAT | O_TRUNC | O_EXCL, 0600)) == -1){ message (1, MSG_ERROR, _(" Can't create temporary command file \n %s "), @@ -544,10 +540,10 @@ } if (do_quote) { fputs (tmp = name_quote (parameter, 0), cmd_file); - free (tmp); + g_free (tmp); } else fputs (parameter, cmd_file); - free (parameter); + g_free (parameter); } else { int len = strlen (prompt); @@ -569,7 +565,7 @@ else{ char *text = expand_format (*commands, do_quote); fputs (text, cmd_file); - free (text); + g_free (text); } } else { if (*commands == '%') { @@ -630,12 +626,12 @@ return; } - menu = strdup (MC_LOCAL_MENU); + menu = g_strdup (MC_LOCAL_MENU); if (!exist_file (menu) || !menu_file_own (menu)){ - free (menu); + g_free (menu); menu = concat_dir_and_file (home_dir, MC_HOME_MENU); if (!exist_file (menu)){ - free (menu); + g_free (menu); menu = concat_dir_and_file (mc_home, MC_GLOBAL_MENU); } } @@ -643,10 +639,10 @@ if ((data = load_file (menu)) == NULL){ message (1, MSG_ERROR, _(" Can't open file %s \n %s "), menu, unix_error_string (errno)); - free (menu); + g_free (menu); return; } - free (menu); + g_free (menu); max_cols = 0; for (i = 0; i < MAX_ENTRIES; i++) @@ -732,5 +728,5 @@ easy_patterns = old_patterns; do_refresh (); - free (data); + g_free (data); } diff -ruN old/mc-4.5.9/src/util.c new/mc-4.5.10/src/util.c --- old/mc-4.5.9/src/util.c Mon Jan 18 17:44:10 1999 +++ new/mc-4.5.10/src/util.c Sun Jan 31 18:55:18 1999 @@ -26,7 +26,6 @@ #if defined(__os2__) /* OS/2 need io.h! .ado */ # include #endif -#include #include #ifdef HAVE_UNISTD_H #include @@ -65,28 +64,19 @@ # include #endif -#include /* For funny new functions */ - -#include "fs.h" #include "mountlist.h" -/* From dialog.h (not wanting to include it as - it requires including a lot of other files, too) */ -int message (int error, char *header, char *text, ...); - -#include "mad.h" #if defined(HAVE_RX_H) && defined(HAVE_REGCOMP) #include #else -#include "regex.h" +#include #endif -#include "util.h" #include "global.h" #include "profile.h" #include "user.h" /* expand_format */ #include "../vfs/vfs.h" -/* "$Id: util.c,v 1.12 1999/01/12 02:24:54 unammx Exp $" */ +/* "$Id: util.c,v 1.16 1999/01/27 01:09:34 timur Exp $" */ char app_text [] = "Midnight-Commander"; @@ -96,15 +86,6 @@ struct mount_entry *mount_list = NULL; -#ifndef HAVE_STRDUP -char *strdup (const char *s) -{ - char *t = malloc (strlen (s)+1); - strcpy (t, s); - return t; -} -#endif - #ifndef VFS_STANDALONE int is_printable (int c) { @@ -175,7 +156,7 @@ { char *ret, *d; - d = ret = xmalloc (strlen (s)*2 + 2 + 1, "quote_name"); + d = ret = g_malloc (strlen (s)*2 + 2 + 1); if (*s == '-') { *d++ = '.'; *d++ = '/'; @@ -220,7 +201,7 @@ char * fake_name_quote (const char *s, int quote_percent) { - return strdup (s); + return g_strdup (s); } /* If passed an empty txt (this usually means that there is an error) @@ -260,19 +241,19 @@ char *size_trunc (long int size) { - static char x [30]; + static char x [BUF_TINY]; long int divisor = 1; char *xtra = ""; if (size > 999999999L){ divisor = 1024; - xtra = "kb"; + xtra = "Kb"; if (size/divisor > 999999999L){ divisor = 1024*1024; xtra = "Mb"; } } - sprintf (x, "%ld%s", (size/divisor), xtra); + g_snprintf (x, sizeof (x), "%ld%s", (size/divisor), xtra); return x; } @@ -420,7 +401,7 @@ int was_wildcard = 0; if (easy_patterns){ - new_pattern = malloc (MC_MAXPATHLEN); + new_pattern = g_malloc (MC_MAXPATHLEN); d = new_pattern; if (match_type == match_file) *d++ = '^'; @@ -455,7 +436,7 @@ *d = 0; return new_pattern; } else - return strdup (pattern); + return g_strdup (pattern); } int regexp_match (char *pattern, char *string, int match_type) @@ -468,11 +449,11 @@ if (!old_pattern || STRCOMP (old_pattern, pattern) || old_type != match_type){ if (old_pattern){ regfree (&r); - free (old_pattern); + g_free (old_pattern); } pattern = convert_pattern (pattern, match_type, 0); if (regcomp (&r, pattern, REG_EXTENDED|REG_NOSUB|MC_ARCH_FLAGS)) { - free (pattern); + g_free (pattern); return -1; } old_pattern = pattern; @@ -524,19 +505,6 @@ return xbuf; */ } -#ifndef HAVE_MAD -void *do_xmalloc (int size) -{ - void *m = malloc (size); - - if (!m){ - fprintf (stderr, "memory exhausted\n"); - exit (1); - } - return m; -} -#endif /* HAVE_MAD */ - int get_int (char *file, char *key, int def) { return GetPrivateProfileInt (app_text, key, def, file); @@ -544,9 +512,9 @@ int set_int (char *file, char *key, int value) { - char buffer [30]; + char buffer [BUF_TINY]; - sprintf (buffer, "%d", value); + g_snprintf (buffer, sizeof (buffer), "%d", value); return WritePrivateProfileString (app_text, key, buffer, file); } @@ -568,7 +536,7 @@ if ((data_file = fopen (filename, "r")) == NULL){ return 0; } - data = (char *) xmalloc (s.st_size+1, "util, load_file"); + data = (char *) g_malloc (s.st_size+1); read_size = fread (data, 1, s.st_size, data_file); data [read_size] = 0; fclose (data_file); @@ -576,7 +544,7 @@ if (read_size > 0) return data; else { - free (data); + g_free (data); return 0; } } @@ -618,7 +586,7 @@ char *extract_line (char *s, char *top) { - static char tmp_line [500]; + static char tmp_line [BUF_MEDIUM]; char *t = tmp_line; while (*s && *s != '\n' && (t - tmp_line) < sizeof (tmp_line)-1 && s < top) @@ -661,30 +629,16 @@ char *x_basename (char *s) { char *where; - return ((where = strrchr (s, PATH_SEP)))? where + 1 : s; -} - -char *get_full_name (char *dir, char *file) -{ - int i; - char *d = malloc (strlen (dir) + strlen (file) + 2); - - strcpy (d, dir); - i = strlen (dir); - if (dir [i - 1] != PATH_SEP || dir [i] != 0) - strcat (d, PATH_SEP_STR); - file = x_basename (file); - strcat (d, file); - return d; + return ((where = strrchr (s, PATH_SEP))) ? where + 1 : s; } void my_putenv (char *name, char *data) { char *full; - full = xmalloc (strlen (name) + strlen (data) + 2, "util, my_putenv"); - sprintf (full, "%s=%s", name, data); + full = g_strdup_printf ("%s=%s", name, data); putenv (full); + /* WARNING: NEVER FREE THE full VARIABLE!!!!!!!!!!!!!!!!!!!!!!!! */ /* It is used by putenv. Freeing it will corrupt the environment */ } @@ -696,7 +650,7 @@ data = expand_format (macro_code); my_putenv (name, data); - free (data); + g_free (data); } /* Puts some status information in to the environment so that @@ -716,51 +670,13 @@ char *unix_error_string (int error_num) { - static char buffer [256]; - char *error_msg; + static char buffer [BUF_LARGE]; -#ifdef HAVE_STRERROR - error_msg = strerror (error_num); -#else - extern int sys_nerr; - extern char *sys_errlist []; - if ((0 <= error_num) && (error_num < sys_nerr)) - error_msg = sys_errlist[error_num]; - else - error_msg = "strange errno"; -#endif - sprintf (buffer, "%s (%d)", error_msg, error_num); + g_snprintf (buffer, sizeof (buffer), "%s (%d)", + g_strerror (error_num), error_num); return buffer; } -char *copy_strings (const char *first,...) -{ - va_list ap; - int len; - char *data, *result; - - if (!first) - return 0; - - len = strlen (first); - va_start (ap, first); - - while ((data = va_arg (ap, char *))!=0) - len += strlen (data); - - len++; - - result = xmalloc (len, "copy_strings"); - va_end (ap); - va_start (ap, first); - strcpy (result, first); - while ((data = va_arg (ap, char *)) != 0) - strcat (result, data); - va_end (ap); - - return result; -} - #ifndef VFS_STANDALONE long blocks2kilos (int blocks, int bsize) { @@ -830,24 +746,6 @@ return s; } -#ifndef HAVE_STRCASECMP -/* At least one version of HP/UX lacks this */ -/* Assumes ASCII encoding */ -int strcasecmp (const char *s, const char *d) -{ - register signed int result; - - while (1){ - if (result = (0x20 | *s) - (0x20 | *d)) - break; - if (!*s) - return 0; - s++; - d++; - } - return result; -} -#endif /* HAVE_STRCASECMP */ #endif /* VFS_STANDALONE */ /* getwd is better than getcwd, the later uses a popen ("pwd"); */ @@ -1000,7 +898,7 @@ /* Hooks */ void add_hook (Hook **hook_list, void (*hook_fn)(void *), void *data) { - Hook *new_hook = xmalloc (sizeof (Hook), "add_hook"); + Hook *new_hook = g_new (Hook, 1); new_hook->hook_fn = hook_fn; new_hook->next = *hook_list; @@ -1032,7 +930,7 @@ for (hook_list = p; hook_list;){ p = hook_list; hook_list = hook_list->next; - free (p); + g_free (p); } } @@ -1045,7 +943,7 @@ for (current = *hook_list; current; current = next){ next = current->next; if (current->hook_fn == hook_fn) - free (current); + g_free (current); else add_hook (&new_list, current->hook_fn, current->hook_data); } @@ -1068,14 +966,14 @@ for (;*p ; p++) *p = 0; - free (passwd); + g_free (passwd); } /* Convert "\E" -> esc character and ^x to control-x key and ^^ to ^ key */ /* Returns a newly allocated string */ char *convert_controls (char *s) { - char *valcopy = strdup (s); + char *valcopy = g_strdup (s); char *p, *q; /* Parse the escape special character */ @@ -1130,8 +1028,8 @@ if (*path != PATH_SEP) return NULL; - r = buf = xmalloc (MC_MAXPATHLEN, "resolve symlinks"); - buf2 = xmalloc (MC_MAXPATHLEN, "resolve symlinks"); + r = buf = g_malloc (MC_MAXPATHLEN); + buf2 = g_malloc (MC_MAXPATHLEN); *r++ = PATH_SEP; *r = 0; p = path; @@ -1145,8 +1043,8 @@ c = *q; *q = 0; if (mc_lstat (path, &mybuf) < 0) { - free (buf); - free (buf2); + g_free (buf); + g_free (buf2); *q = c; return NULL; } @@ -1155,8 +1053,8 @@ else { len = mc_readlink (path, buf2, MC_MAXPATHLEN); if (len < 0) { - free (buf); - free (buf2); + g_free (buf); + g_free (buf2); *q = c; return NULL; } @@ -1181,7 +1079,7 @@ strcpy (buf, PATH_SEP_STR); else if (*(r - 1) == PATH_SEP && r != buf + 1) *(r - 1) = 0; - free (buf2); + g_free (buf2); return buf; } @@ -1200,7 +1098,7 @@ if (j) { second = resolve_symlinks (second); if (second == NULL) { - free (first); + g_free (first); return buf; } } @@ -1225,21 +1123,21 @@ currlen = (i + 1) * 3 + strlen (q) + 1; if (j) { if (currlen < prevlen) - free (buf); + g_free (buf); else { - free (first); - free (second); + g_free (first); + g_free (second); return buf; } } - p = buf = xmalloc (currlen, "diff 2 paths"); + p = buf = g_malloc (currlen); prevlen = currlen; for (; i >= 0; i--, p += 3) strcpy (p, "../"); strcpy (p, q); } - free (first); - free (second); + g_free (first); + g_free (second); return buf; } @@ -1282,13 +1180,76 @@ #endif #endif /* VFS_STANDALONE */ +/* If filename is NULL, then we just append PATH_SEP to the dir */ char * concat_dir_and_file (const char *dir, const char *file) { - int l = strlen (dir); - - if (dir [l-1] == PATH_SEP) - return copy_strings (dir, file, 0); + int i = strlen (dir); + + if (dir [i-1] == PATH_SEP) + return g_strconcat (dir, file, NULL); else - return copy_strings (dir, PATH_SEP_STR, file, 0); + return g_strconcat (dir, PATH_SEP_STR, file, NULL); +} + +#ifdef HAVE_MAD +char *mad_strconcat (const char *first, ...) +{ + va_list ap; + long len; + char *data, *result; + + if (!first) + return 0; + + len = strlen (first) + 1; + va_start (ap, first); + + while ((data = va_arg (ap, char *)) != 0) + len += strlen (data); + + result = g_malloc (len); + + va_end (ap); + + va_start (ap, first); + strcpy (result, first); + + while ((data = va_arg (ap, char *)) != 0) + strcat (result, data); + + va_end (ap); + + return result; +} + +/* This two functions grabbed from GLib's gstrfuncs.c */ +char* +mad_strdup_vprintf (const char *format, va_list args1) +{ + char *buffer; + va_list args2; + + G_VA_COPY (args2, args1); + + buffer = g_new (char, g_printf_string_upper_bound (format, args1)); + + vsprintf (buffer, format, args2); + va_end (args2); + + return buffer; +} + +char* +mad_strdup_printf (const char *format, ...) +{ + char *buffer; + va_list args; + + va_start (args, format); + buffer = g_strdup_vprintf (format, args); + va_end (args); + + return buffer; } +#endif /* HAVE_MAD */ \ No newline at end of file diff -ruN old/mc-4.5.9/src/util.h new/mc-4.5.10/src/util.h --- old/mc-4.5.9/src/util.h Mon Jan 18 17:44:10 1999 +++ new/mc-4.5.10/src/util.h Sun Jan 31 18:55:18 1999 @@ -7,7 +7,7 @@ /* String managing functions */ #if defined(SCO_FLAVOR) && defined(__GNUC__) -extern char* strdup(const char*); +extern char*g_strdup (const char*); #endif int is_printable (int c); @@ -23,8 +23,6 @@ char *strip_home_and_password(char *dir); char *extension (char *); char *split_extension (char *, int pad); -char *get_full_name (char *dir, char *file); -char *copy_strings (const char *first, ...); char *concat_dir_and_file (const char *dir, const char *file); char *unix_error_string (int error_num); char *skip_separators (char *s); @@ -37,16 +35,18 @@ char *diff_two_paths (char *first, char *second); int set_nonblocking (int fd); -#ifndef HAVE_STRCASECMP -int strcasecmp (const char *s, const char *d); -#endif - char *x_basename (char *s); extern int align_extensions; -#ifndef HAVE_MAD -void *do_xmalloc (int); -#define xmalloc(a,b) do_xmalloc (a) + +#ifdef HAVE_MAD +char *mad_strconcat (const char *first, ...); +char *mad_strdup_printf (const char *format, ...); +char *mad_strdup_vprintf (const char *format, va_list args); + +#define g_strconcat mad_strconcat +#define g_strdup_printf mad_strdup_printf +#define g_strdup_vprintf mad_strdup_vprintf #endif /* Profile managing functions */ diff -ruN old/mc-4.5.9/src/utilunix.c new/mc-4.5.10/src/utilunix.c --- old/mc-4.5.9/src/utilunix.c Mon Jan 18 17:44:11 1999 +++ new/mc-4.5.10/src/utilunix.c Sun Jan 31 18:55:18 1999 @@ -23,7 +23,6 @@ #include #include -#include #include #ifdef HAVE_UNISTD_H #include @@ -62,12 +61,10 @@ #ifdef __QNX__ # include /* exec*() from */ #endif -#include "util.h" #include "global.h" #include "fsusage.h" #include "fsusage.h" #include "mountlist.h" -#include "mad.h" #include "dialog.h" /* message() */ #include "../vfs/vfs.h" /* mc_read() */ #include "x.h" @@ -108,10 +105,11 @@ pwd = getpwuid (current_user_uid=getuid ()); - current_user_gid = (pug = xmalloc (sizeof (user_in_groups), "init_groups")); - current_user_gid->gid = getgid (); current_user_gid->next = 0; + current_user_gid = (pug = g_new (user_in_groups, 1)); + current_user_gid->gid = getgid (); + current_user_gid->next = NULL; - if (pwd == 0) + if (pwd == NULL) return; setgrent (); @@ -119,10 +117,10 @@ for (i = 0; grp->gr_mem[i]; i++) if (!strcmp (pwd->pw_name,grp->gr_mem[i])) { - cug = xmalloc (sizeof (user_in_groups), "init_groups"); + cug = g_new (user_in_groups, 1); cug->gid = grp->gr_gid; pug->next = cug; - cug->next = 0; + cug->next = NULL; pug = cug; break; } @@ -152,7 +150,7 @@ while (cug){ pug = cug->next; - free (cug); + g_free (cug); cug = pug; } } @@ -193,8 +191,8 @@ int *last) { if (cache [*last].string) - free (cache [*last].string); - cache [*last].string = strdup (text); + g_free (cache [*last].string); + cache [*last].string = g_strdup (text); cache [*last].index = id; *last = ((*last)+1) % size; } @@ -202,7 +200,7 @@ char *get_owner (int uid) { struct passwd *pwd; - static char ibuf [8]; + static char ibuf [10]; char *name; static int uid_last; @@ -215,7 +213,7 @@ return pwd->pw_name; } else { - sprintf (ibuf, "%d", uid); + g_snprintf (ibuf, sizeof (ibuf), "%d", uid); return ibuf; } } @@ -223,7 +221,7 @@ char *get_group (int gid) { struct group *grp; - static char gbuf [8]; + static char gbuf [10]; char *name; static int gid_last; @@ -235,7 +233,7 @@ i_cache_add (gid, gid_cache, GID_CACHE_SIZE, grp->gr_name, &gid_last); return grp->gr_name; } else { - sprintf (gbuf, "%d", gid); + g_snprintf (gbuf, sizeof (gbuf), "%d", gid); return gbuf; } } @@ -322,7 +320,7 @@ int len; if (*directory != '~') - return strdup (directory); + return g_strdup (directory); directory++; @@ -337,11 +335,11 @@ p = ""; passwd = getpwnam (directory); } else { - name = xmalloc (p - directory + 1, "tilde_expand"); + name = g_malloc (p - directory + 1); strncpy (name, directory, p - directory); name [p - directory] = 0; passwd = getpwnam (name); - free (name); + g_free (name); } } @@ -350,7 +348,7 @@ return 0; len = strlen (passwd->pw_dir) + strlen (p) + 2; - directory = xmalloc (len, "tilde_expand"); + directory = g_malloc (len); strcpy (directory, passwd->pw_dir); strcat (directory, PATH_SEP_STR); strcat (directory, p); @@ -744,7 +742,7 @@ if (*ep == NULL){ static char **last_environ = NULL; - char **new_environ = (char **) malloc ((size + 2) * sizeof (char *)); + char **new_environ = g_new (char *, size + 2); if (new_environ == NULL) return -1; (void) memcpy ((void *) new_environ, (void *) __environ, @@ -752,7 +750,7 @@ new_environ[size] = (char *) string; new_environ[size + 1] = NULL; if (last_environ != NULL) - free ((void *) last_environ); + g_free ((void *) last_environ); last_environ = new_environ; __environ = new_environ; } diff -ruN old/mc-4.5.9/src/view.c new/mc-4.5.10/src/view.c --- old/mc-4.5.9/src/view.c Mon Jan 18 17:44:10 1999 +++ new/mc-4.5.10/src/view.c Sun Jan 31 18:55:18 1999 @@ -46,20 +46,15 @@ # include #endif #include /* For toupper() */ -#include /* atoi() */ -#include #include #include #include -#include "mem.h" -#include "mad.h" -#include "util.h" +#include "global.h" #include "dlg.h" /* Needed by widget.h */ #include "widget.h" /* Needed for buttonbar_new */ #include "color.h" #include "dialog.h" #include "mouse.h" -#include "global.h" #include "help.h" #include "key.h" /* For mi_getch() */ #include "layout.h" @@ -68,9 +63,8 @@ #if defined(HAVE_RX_H) && defined(HAVE_REGCOMP) # include #else -# include "regex.h" +# include #endif -#include "fs.h" #include "../vfs/vfs.h" #include "dir.h" #include "panel.h" /* Needed for current_panel and other_panel */ @@ -101,6 +95,8 @@ 10; #endif +extern Hook *idle_hook; + /* Our callback */ static int view_callback (Dlg_head *h, WView *view, int msg, int par); @@ -125,7 +121,7 @@ int altered_nroff_flag = 0; /* }}} */ -/* "$Id: view.c,v 1.24 1999/01/14 01:04:53 unammx Exp $" */ +/* "$Id: view.c,v 1.26 1999/01/27 01:09:38 timur Exp $" */ static char hex_char[] = "0123456789ABCDEF"; @@ -170,9 +166,9 @@ /* Block_ptr may be zero if the file was a file with 0 bytes */ if (view->growing_buffer && view->block_ptr){ for (i = 0; i < view->blocks; i++){ - free (view->block_ptr [i].data); + g_free (view->block_ptr [i].data); } - free (view->block_ptr); + g_free (view->block_ptr); } } @@ -187,7 +183,7 @@ /* alex: release core, used to replace mmap */ if (!view->mmapping && !view->growing_buffer && view->data != NULL){ - free(view->data); + g_free (view->data); view->data = NULL; } @@ -195,9 +191,9 @@ if (view->localcopy) mc_ungetlocalcopy (view->filename, view->localcopy, 0); free_file (view); - free (view->filename); + g_free (view->filename); if (view->command) - free (view->command); + g_free (view->command); } view->view_active = 0; default_hex_mode = view->hex_mode; @@ -227,15 +223,15 @@ if (view->growing_buffer){ if (page > view->blocks){ - tmp = xmalloc (sizeof (block_ptr_t) * page, "get_byte"); + tmp = g_new (block_ptr_t, page); if (view->block_ptr){ bcopy (view->block_ptr, tmp, sizeof (block_ptr_t) * view->blocks); - free (view->block_ptr); + g_free (view->block_ptr); } view->block_ptr = tmp; for (i = view->blocks; i < page; i++){ - char *p = malloc (VIEW_PAGE_SIZE); + char *p = g_malloc (VIEW_PAGE_SIZE); view->block_ptr [i].data = p; if (!p) return '\n'; @@ -338,7 +334,7 @@ } if (!node) { node = (struct hexedit_change_node *) - xmalloc(sizeof(struct hexedit_change_node), "HexEdit"); + g_new (struct hexedit_change_node, 1); if (node) { #ifndef HAVE_MMAP @@ -367,7 +363,7 @@ while (n) { view->change_list = n->next; - free (n); + g_free (n); n = view->change_list; } view->file_dirty = 0; @@ -402,11 +398,11 @@ return 1; query_set_sel (1); - text = copy_strings (_("File: \n\n "), view->filename, + text = g_strconcat (_("File: \n\n "), view->filename, _("\n\nhas been modified, do you want to save the changes?\n"), NULL); r = query_dialog (_(" Save changes "), text, 2, 3, _("&Yes"), _("&No"), _("&Cancel")); - free (text); + g_free (text); switch (r) { case 0: @@ -429,7 +425,7 @@ view->last_byte = 0; if (msg){ view->bytes_read = strlen (msg); - return strdup (msg); + return g_strdup (msg); } return 0; } @@ -476,15 +472,15 @@ { if ((view->file = mc_open (filename, O_RDONLY)) < 0){ set_view_init_error (view, 0); - return (copy_strings (_(" Can't open file \""), + return ( g_strconcat (_(" Can't open file \""), filename, "\"\n ", - unix_error_string (errno), " ", 0)); + unix_error_string (errno), " ", NULL)); } if (mc_fstat (view->file, &view->s) < 0){ set_view_init_error (view, 0); close_view_file (view); - return copy_strings (_(" Can't stat file \n "), - unix_error_string (errno), " ", 0); + return g_strconcat (_(" Can't stat file \n "), + unix_error_string (errno), " ", NULL); } if (S_ISDIR (view->s.st_mode) || S_ISSOCK (view->s.st_mode) || S_ISFIFO (view->s.st_mode)){ @@ -515,12 +511,12 @@ * file into memory (alex@bcs.zaporizhzhe.ua). Also, mmap can fail * for any reason, so we use this as fallback (pavel@ucw.cz) */ - view->data = (unsigned char*) xmalloc (view->s.st_size, "load_view_file"); + view->data = (unsigned char*) g_malloc (view->s.st_size); if (view->data == NULL || mc_lseek(view->file,0,0) != 0 || mc_read(view->file, view->data, view->s.st_size) != view->s.st_size){ if (view->data != NULL) - free(view->data); + g_free (view->data); close_view_file (view); return init_growing_view (view, 0, filename); } @@ -568,8 +564,8 @@ int fd; fd = mc_open(_file, O_RDONLY); if (_file[0] && view->viewer_magic_flag && (is_gunzipable (fd, &type)) != 0) - view->filename = copy_strings (_file, decompress_extension(type), NULL); - else view->filename = strdup (_file); + view->filename = g_strconcat (_file, decompress_extension(type), NULL); + else view->filename = g_strdup (_file); mc_close(fd); } @@ -581,14 +577,14 @@ if (error){ if (!view->have_frame){ message (1, MSG_ERROR, error); - free (error); + g_free (error); return -1; } } view->view_active = 1; if (_command) - view->command = strdup (_command); + view->command = g_strdup (_command); else view->command = 0; view->search_start = view->start_display = view->start_save = view->first; @@ -779,7 +775,7 @@ /* Optionally, display a ruler */ if ((!view->hex_mode) && (ruler)){ - char r_buff[4]; + char r_buff[10]; int cl; view_set_color (view, BOLD_COLOR); @@ -797,7 +793,7 @@ r_buff[0] = '*'; view_add_character (view, r_buff[0]); if ((cl != 0) && (cl % 10) == 0){ - sprintf(r_buff, "%03d", cl); + g_snprintf(r_buff, sizeof (r_buff), "%03d", cl); if (ruler == 1) widget_move (view, row + 1, c - 1); else @@ -828,7 +824,7 @@ for (;row < height && from < view->last_byte; row++){ /* Print the hex offset */ - sprintf (hex_buff, "%05X", (int) (from - view->first)); + g_snprintf (hex_buff, sizeof (hex_buff), "%05X", (int) (from - view->first)); widget_move (view, row, frame_shift); view_add_string (view, hex_buff); @@ -1346,10 +1342,10 @@ /* The grow steps */ *size += 160; - new = xmalloc (*size, "grow_string_buffer"); + new = g_malloc (*size); if (text){ strncpy (new, text, old_size); - free (text); + g_free (text); } else { *new = 0; } @@ -1466,7 +1462,7 @@ search_update_steps (view); update_activate = 0; - for (; ; isatbeg = 1, free (s)){ + for (; ; isatbeg = 1, g_free (s)){ #ifdef PORT_HAS_FLUSH_EVENTS static int count; @@ -1527,7 +1523,7 @@ view->start_display = t; } - free (s); + g_free (s); break; } disable_interrupt_key (); @@ -1687,7 +1683,7 @@ if (!old_pattern || strcmp (old_pattern, pattern) || old_type != match_type){ if (old_pattern){ regfree (&r); - free (old_pattern); + g_free (old_pattern); old_pattern = 0; } for (i = 0; pattern[i] != 0; i++){ @@ -1701,7 +1697,7 @@ message (1, MSG_ERROR, _(" Invalid regular expression ")); return -1; } - old_pattern = strdup (pattern); + old_pattern = g_strdup (pattern); old_type = match_type; } if (regexec (&r, string, 1, pmatch, 0) != 0) @@ -1744,7 +1740,7 @@ { char *hlpfile = concat_dir_and_file (mc_home, "mc.hlp"); interactive_display (hlpfile, "[Internal File Viewer]"); - free (hlpfile); + g_free (hlpfile); /* view_refresh (0); */ @@ -1820,7 +1816,7 @@ void goto_line (WView *view) { - char *line, prompt [100]; + char *line, prompt [BUF_SMALL]; int i, oldline = 1; int saved_wrap_mode = view->wrap_mode; @@ -1828,15 +1824,15 @@ for (i = view->first; i < view->start_display; i++) if (get_byte (view, i) == '\n') oldline ++; - sprintf (prompt, _(" The current line number is %d.\n" + g_snprintf (prompt, sizeof (prompt), _(" The current line number is %d.\n" " Enter the new line number:"), oldline); line = input_dialog (_(" Goto line "), prompt, ""); if (line){ if (*line){ move_to_top (view); - view_move_forward (view, atoi (line) - 1); + view_move_forward (view, atol (line) - 1); } - free (line); + g_free (line); } view->dirty++; view->wrap_mode = saved_wrap_mode; @@ -1863,7 +1859,7 @@ return; } if (old) - free (old); + g_free (old); old = regexp; #if 0 /* Mhm, do we really need to load all the file in the core? */ @@ -1895,7 +1891,7 @@ return; } if (old) - free (old); + g_free (old); old = exp; view->direction = direction; @@ -1919,17 +1915,17 @@ if (*view->filename) { altered_magic_flag = 1; view->viewer_magic_flag = !view->viewer_magic_flag; - s = strdup (view->filename); + s = g_strdup (view->filename); if (view->command) - t = strdup (view->command); + t = g_strdup (view->command); else t = 0; view_done (view); view_init (view, t, s, 0); - free (s); + g_free (s); if (t) - free (t); + g_free (t); view_labels (view); view->dirty++; view_update (view); @@ -2431,7 +2427,7 @@ WView * view_new (int y, int x, int cols, int lines, int is_panel) { - WView *view = xmalloc (sizeof (WView), "view_new"); + WView *view = g_new (WView, 1); init_widget (&view->widget, y, x, lines, cols, (callback_fn) view_callback, diff -ruN old/mc-4.5.9/src/widget.c new/mc-4.5.10/src/widget.c --- old/mc-4.5.9/src/widget.c Mon Jan 18 17:44:10 1999 +++ new/mc-4.5.10/src/widget.c Sun Jan 31 18:55:18 1999 @@ -23,17 +23,14 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* "$Id: widget.c,v 1.26 1999/01/14 01:11:30 unammx Exp $" */ +/* "$Id: widget.c,v 1.27 1999/01/27 01:09:39 timur Exp $" */ #include #include #include -#include #include "tty.h" #include -#include "mad.h" #include "global.h" -#include "util.h" #include "color.h" #include "mouse.h" #include "dlg.h" @@ -78,7 +75,7 @@ button_callback (Dlg_head *h, WButton *b, int Msg, int Par) { #ifndef HAVE_X - char *txt, buf[256]; + char *txt, buf[BUF_SMALL]; #endif int stop = 0; int off = 0; @@ -136,15 +133,15 @@ switch (b->flags){ case DEFPUSH_BUTTON: - sprintf (buf, "[< %s >]", b->text); + g_snprintf (buf, sizeof(buf), "[< %s >]", b->text); off = 3; break; case NORMAL_BUTTON: - sprintf (buf, "[ %s ]", b->text); + g_snprintf (buf, sizeof(buf), "[ %s ]", b->text); off = 2; break; case NARROW_BUTTON: - sprintf (buf, "[%s]", b->text); + g_snprintf (buf, sizeof(buf), "[%s]", b->text); off = 1; break; case HIDDEN_BUTTON: @@ -196,7 +193,7 @@ button_destroy (WButton *b) { x_destroy_cmd (b); - free (b->text); + g_free (b->text); } static int @@ -246,7 +243,7 @@ button_new (int y, int x, int action, int flags, char *text, int (*callback)(int, void *), void *callback_data, char *tkname) { - WButton *b = xmalloc (sizeof (WButton), "new_button"); + WButton *b = g_new (WButton, 1); init_widget (&b->widget, y, x, 1, button_len (text, flags), (callback_fn) button_callback, @@ -255,7 +252,7 @@ b->action = action; b->flags = flags; b->selected = 0; - b->text = strdup (text); + b->text = g_strdup (text); b->callback = callback; b->callback_data = callback_data; widget_want_hotkey (b->widget, 1); @@ -269,8 +266,8 @@ void button_set_text (WButton *b, char *text) { - free (b->text); - b->text = strdup (text); + g_free (b->text); + b->text = g_strdup (text); b->widget.cols = button_len (text, b->flags); button_scan_hotkey(b); #ifdef HAVE_X @@ -419,7 +416,7 @@ WRadio * radio_new (int y, int x, int count, char **texts, int use_hotkey, char *tkname) { - WRadio *r = xmalloc (sizeof (WRadio), "radio_new"); + WRadio *r = g_new (WRadio, 1); int i, max, m; /* Compute the longest string */ @@ -518,20 +515,20 @@ check_destroy (WCheck *c) { x_destroy_cmd (c); - free (c->text); + g_free (c->text); } WCheck * check_new (int y, int x, int state, char *text, char *tkname) { - WCheck *c = xmalloc (sizeof (WCheck), "check_new"); + WCheck *c = g_new (WCheck, 1); char *s, *t; init_widget (&c->widget, y, x, 1, strlen (text), (callback_fn)check_callback, (destroy_fn)check_destroy, (mouse_h) check_event, tkname); c->state = state ? C_BOOL : 0; - c->text = strdup (text); + c->text = g_strdup (text); c->hotkey = 0; c->hotpos = -1; widget_want_hotkey (c->widget, 1); @@ -607,10 +604,10 @@ return; /* Flickering is not nice */ if (label->text){ - free (label->text); + g_free (label->text); } if (text){ - label->text = strdup (text); + label->text = g_strdup (text); if (label->auto_adjust_cols) { newcols = strlen (text); if (newcols > label->widget.cols) @@ -634,18 +631,18 @@ { x_destroy_cmd (l); if (l->text) - free (l->text); + g_free (l->text); } WLabel * label_new (int y, int x, char *text, char *tkname) { - WLabel *l = xmalloc (sizeof (WLabel), "label_new"); + WLabel *l = g_new (WLabel, 1); init_widget (&l->widget, y, x, 1, 1, (callback_fn) label_callback, (destroy_fn) label_destroy, NULL, tkname); - l->text = text ? strdup (text) : 0; + l->text = text ? g_strdup (text) : 0; l->auto_adjust_cols = 1; l->transparent = 0; widget_want_cursor (l->widget, 0); @@ -745,7 +742,7 @@ WGauge * gauge_new (int y, int x, int shown, int max, int current, char *tkname) { - WGauge *g = xmalloc (sizeof (WGauge), "gauge_new"); + WGauge *g = g_new (WGauge, 1); init_widget (&g->widget, y, x, 1, gauge_len, (callback_fn) gauge_callback, @@ -896,9 +893,11 @@ Hist *history_get (char *input_name) { int i; - Hist *old = 0, *new = 0; + Hist *old, *new; char *profile; + old = new = NULL; + if (!num_history_items_recorded) /* this is how to disable */ return 0; if (!input_name) @@ -907,21 +906,20 @@ return 0; profile = concat_dir_and_file (home_dir, HISTORY_FILE_NAME); for (i = 0;; i++) { - char key_name[32]; - char this_entry[1024]; - sprintf (key_name, "%d", i); + char key_name[BUF_TINY]; + char this_entry[BUF_LARGE]; + g_snprintf (key_name, sizeof (key_name), "%d", i); GetPrivateProfileString (input_name, key_name, "", this_entry, sizeof (this_entry), profile); if (!*this_entry) break; - new = xmalloc (sizeof (Hist), "history_get"); - memset (new, 0, sizeof (Hist)); - new->text = strdup (this_entry); + new = g_new0 (Hist, 1); + new->text = g_strdup (this_entry); new->prev = old; /* set up list pointers */ if (old) old->next = new; old = new; } - free (profile); + g_free (profile); return new; /* return pointer to last entry in list */ } @@ -961,14 +959,14 @@ /* probably aren't any null entries, but lets be sure */ if (*(h->text)){ - char key_name[32]; - sprintf (key_name, "%d", i++); + char key_name[BUF_TINY]; + g_snprintf (key_name, sizeof(key_name), "%d", i++); WritePrivateProfileString (input_name, key_name, h->text, profile); } } h = h->next; } - free (profile); + g_free (profile); } #else void history_put (char *input_name, Hist *h) @@ -1073,7 +1071,7 @@ if (query_dlg->ret_value != B_CANCEL) { listbox_get_current (query_list, &q, NULL); if (q) - r = strdup (q); + r = g_strdup (q); } destroy_dlg (query_dlg); return r; @@ -1085,7 +1083,7 @@ r = show_hist (in->history, in->widget.x, in->widget.y); if (r) { assign_text (in, r); - free (r); + g_free (r); } } @@ -1112,15 +1110,15 @@ while (current){ old = current; current = current->prev; - free (old->text); - free (old); + g_free (old->text); + g_free (old); } } x_destroy_cmd (in); - free (in->buffer); + g_free (in->buffer); free_completions (in); if (in->history_name) - free (in->history_name); + g_free (in->history_name); } static char disable_update = 0; @@ -1152,14 +1150,14 @@ in->history = in->history->next; if (!strcmp (in->history->text, text)) return 1; - new = xmalloc (sizeof (Hist), "push_history"); + new = g_new (Hist, 1); in->history->next = new; } else - new = xmalloc (sizeof (Hist), "push_history"); + new = g_new (Hist, 1); in->need_push = 0; new->next = 0; new->prev = in->history; - new->text = strdup (text); + new->text = g_strdup (text); in->history = new; return 2; } @@ -1189,14 +1187,14 @@ in->need_push = 1; if (strlen (in->buffer)+1 == in->current_max_len){ /* Expand the buffer */ - char *narea = xmalloc(in->current_max_len + in->field_len, "string expansion"); + char *narea = g_malloc (in->current_max_len + in->field_len); if (narea){ char *p = in->buffer; strcpy (narea, in->buffer); in->buffer = narea; in->current_max_len += in->field_len; - free (p); + g_free (p); } } if (strlen (in->buffer)+1 < in->current_max_len){ @@ -1315,9 +1313,9 @@ return; if (kill_buffer) - free (kill_buffer); + g_free (kill_buffer); - kill_buffer = xmalloc (last-first + 1, "copy_region"); + kill_buffer = g_malloc (last-first + 1); strncpy (kill_buffer, in->buffer+first, last-first); kill_buffer [last-first] = 0; } @@ -1398,8 +1396,8 @@ kill_line (WInput *in) { if (kill_buffer) - free (kill_buffer); - kill_buffer = strdup (&in->buffer [in->point]); + g_free (kill_buffer); + kill_buffer = g_strdup (&in->buffer [in->point]); in->buffer [in->point] = 0; } @@ -1407,8 +1405,8 @@ assign_text (WInput *in, char *text) { free_completions (in); - free (in->buffer); - in->buffer = strdup (text); /* was in->buffer->text */ + g_free (in->buffer); + in->buffer = g_strdup (text); /* was in->buffer->text */ in->current_max_len = strlen (in->buffer) + 1; in->point = strlen (in->buffer); in->mark = 0; @@ -1684,7 +1682,7 @@ WInput * input_new (int y, int x, int color, int len, char *def_text, char *tkname) { - WInput *in = xmalloc (sizeof (WInput), "input_new"); + WInput *in = g_new (WInput, 1); int initial_buffer_len; init_widget (&in->widget, y, x, 1, len, @@ -1696,7 +1694,7 @@ in->history_name = 0; if (tkname && PORT_WIDGET_WANTS_HISTORY){ if (*tkname) { - in->history_name = strdup (tkname); + in->history_name = g_strdup (tkname); in->history = history_get (tkname); } } @@ -1713,7 +1711,7 @@ INPUT_COMPLETE_FILENAMES | INPUT_COMPLETE_HOSTNAMES | INPUT_COMPLETE_VARIABLES | INPUT_COMPLETE_USERNAMES; in->current_max_len = initial_buffer_len; - in->buffer = xmalloc (initial_buffer_len, "create_input: in->buffer"); + in->buffer = g_malloc (initial_buffer_len); in->color = color; in->field_len = len; in->first = 1; @@ -1895,8 +1893,8 @@ while (l->count--) { q = p->next; - free (p->text); - free (p); + g_free (p->text); + g_free (p); p = q; } l->pos = l->count = 0; @@ -1949,8 +1947,8 @@ l->list = l->top = l->current = 0; } - free (p->text); - free (p); + g_free (p->text); + g_free (p); } /* Makes *e the selected entry (sets current and pos) */ @@ -2194,8 +2192,8 @@ x_destroy_cmd (l); for (i = 0; i < l->count; i++){ n = p->next; - free (p->text); - free (p); + g_free (p->text); + g_free (p); p = n; } } @@ -2204,7 +2202,7 @@ listbox_new (int y, int x, int width, int height, int action, lcback callback, char *tkname) { - WListbox *l = xmalloc (sizeof (WListbox), "listbox_new"); + WListbox *l = g_new (WListbox, 1); extern int slow_terminal; init_widget (&l->widget, y, x, height, width, @@ -2279,8 +2277,8 @@ if (listbox_search_text (l, text)) return 0; - entry = xmalloc (sizeof (WLEntry), "listbox_add_item"); - entry->text = strdup (text); + entry = g_new (WLEntry, 1); + entry->text = g_strdup (text); entry->data = data; entry->hotkey = hotkey; @@ -2379,7 +2377,7 @@ for (i = 0; i < 10; i++){ if (bb->labels [i].text) - free (bb->labels [i].text); + g_free (bb->labels [i].text); } } @@ -2404,7 +2402,7 @@ buttonbar_new (int visible) { int i; - WButtonBar *bb = xmalloc (sizeof (WButtonBar), "buttonbar_new"); + WButtonBar *bb = g_new (WButtonBar, 1); init_widget (&bb->widget, LINES-1, 0, 1, COLS, (callback_fn) buttonbar_callback, @@ -2425,9 +2423,9 @@ set_label_text (WButtonBar *bb, int index, char *text) { if (bb->labels [index-1].text) - free (bb->labels [index-1].text); + g_free (bb->labels [index-1].text); - bb->labels [index-1].text = strdup (text); + bb->labels [index-1].text = g_strdup (text); } /* paneletc is either the panel widget, or info or view or tree widget */ diff -ruN old/mc-4.5.9/src/win.c new/mc-4.5.10/src/win.c --- old/mc-4.5.9/src/win.c Mon Jan 18 17:44:10 1999 +++ new/mc-4.5.10/src/win.c Sun Jan 31 18:55:18 1999 @@ -18,24 +18,20 @@ #include #include "tty.h" #include -#include /* For free() */ #include #if (!defined(__IBMC__) && !defined(__IBMCPP__)) && !defined(HAS_NO_TERMIOS_H) # include #endif -#include "mad.h" +#include "global.h" #include "color.h" #include "mouse.h" -#include "util.h" /* For xmalloc() */ - #include "dlg.h" #include "widget.h" #include "win.h" #include "key.h" /* XCTRL and ALT macros */ #include "layout.h" -#include "global.h" -/* "$Id: win.c,v 1.4 1999/01/10 08:56:12 unammx Exp $" */ +/* "$Id: win.c,v 1.5 1999/01/27 01:09:42 timur Exp $" */ typedef void (*fnptr)(void); @@ -60,9 +56,9 @@ } } if (scale > 0) - sprintf (buffer, "%4d %cb", size, scales[scale]); + g_snprintf (buffer, 10, "%4d %cb", size, scales[scale]); else - sprintf (buffer, "%4d b ", size); + g_snprintf (buffer, 10, "%4d b ", size); } void print_bytesize (int size, int scale) @@ -283,7 +279,7 @@ int i; for (i = 0; key_name_conv_tab [i].code; i++){ - if (strcasecmp (key_name_conv_tab [i].name, keyname)) + if ( g_strcasecmp (key_name_conv_tab [i].name, keyname)) continue; return key_name_conv_tab [i].code; } diff -ruN old/mc-4.5.9/src/wtools.c new/mc-4.5.10/src/wtools.c --- old/mc-4.5.9/src/wtools.c Mon Jan 18 17:44:10 1999 +++ new/mc-4.5.10/src/wtools.c Sun Jan 31 18:55:18 1999 @@ -28,17 +28,14 @@ /* }}} */ -/* [] = "$Id: wtools.c,v 1.13 1998/12/02 23:44:33 unammx Exp $" */ +/* [] = "$Id: wtools.c,v 1.14 1999/01/27 01:09:43 timur Exp $" */ #include #include #include -#include #include "tty.h" #include -#include "mad.h" #include "global.h" -#include "util.h" #include "win.h" #include "color.h" #include "mouse.h" @@ -110,7 +107,7 @@ Listbox *create_listbox_window (int cols, int lines, char *title, char *help) { int xpos, ypos, len; - Listbox *listbox = xmalloc (sizeof (Listbox), "create_listbox_window"); + Listbox *listbox = g_new (Listbox, 1); char* cancel_string = _("&Cancel"); /* Adjust sizes */ @@ -157,7 +154,7 @@ else val = l->list->pos; destroy_dlg (l->dlg); - free (l); + g_free (l); return val; } @@ -369,7 +366,7 @@ Chooser *c; int button_lines; - c = (Chooser *) xmalloc (sizeof (Chooser), "new_chooser"); + c =g_new (Chooser, 1); c->dialog = create_dlg (0, 0, lines, cols, dialog_colors, common_dialog_callback, help, "chooser", DLG_CENTER | DLG_GRID); @@ -535,7 +532,7 @@ break; case quick_input: - *qw->str_result = strdup (((WInput *) qw->the_widget)->buffer); + *qw->str_result = g_strdup (((WInput *) qw->the_widget)->buffer); break; } } @@ -704,7 +701,7 @@ if (result){ expanded = tilde_expand (result); if (expanded){ - free (result); + g_free (result); return expanded; } else return result; diff -ruN old/mc-4.5.9/vfs/ChangeLog new/mc-4.5.10/vfs/ChangeLog --- old/mc-4.5.9/vfs/ChangeLog Mon Jan 18 17:44:08 1999 +++ new/mc-4.5.10/vfs/ChangeLog Sun Jan 31 18:55:18 1999 @@ -1,8 +1,115 @@ +Mon Feb 1 01:45:08 1999 Timur I. Bakeyev + + * mcserv.c: If setuid() is avaliable, use it, even, streuid() also + present. (BTW, bsdi uses it's own auth system..) + +Sun Jan 31 20:51:17 1999 Alexander Savelyev + + * mcserv.c (do_auth): mcserv never auth properly on bsdi. + (mc/vfs/mcserv.c do_auth() on bsdi we must use setuid() not + setreuid()). + + * tcputil.c: use correct signal handler (void func(int)) on BSDI + +Sun Jan 31 20:41:00 1999 Norbert Warmuth + + * mcserv.c (do_link): Removed duplicate invokation of link. Thanks + to Grzegorz Makarewicz for spotting this. + +Sun Jan 31 20:04:13 1999 Norbert Warmuth + + * vfs.c (vfs_strip_suffix_from_filename): Whoever replaces every + occurance of 0 with NULL should stop this stupidy. And replacing + '\0' with NULL is plan wrong!!. Reverted this replacement. + + * ftpfs.c (load_no_proxy_list): ditto + +Sun Jan 31 19:57:24 1999 Norbert Warmuth + + * ftpfs.c (insert_dot): New function. Insert a "." into the linked + list. Stat'ing the root directory of a ftpfs fails if the dot is + missing. + + (retrieve_dir): insert "." into the linked list if the ftp server + haven't send it. + +Sun Jan 31 19:50:24 1999 Norbert Warmuth + + * The following changes make ftpfs work with a remote AmiTCP + server are the result of somehow longish EMail debugging session. I + don't know any public server of this kind but I was told the + combination Unix/Amiga boxes are often used in intranets. + + * ftpfs.c (translate_path): New function. Translate a Unix path, + i.e. MC's internal path representation (e.g. /somedir/somefile) to + a path valid for the remote server. Every path transfered to the + remote server has to be mangled by this function right prior to + sending it. Currently only Amiga ftp servers are handled in a + special manner. + + * ftpfs.c (various places): use translate_path + + * ftpfs.c (login_server): Assume we have to mangle pathnames if + the greatings string from the server contains the word Amiga. If + this assumption is wrong I have to find another way to turn on + path translation. + + * ftpfs.c (ftpfs_get_current_directory): Prepend a leading slash + if it is missing. MC needs it as seperator between hostname and + path in its internal url representation. + +1999-01-26 Pavel Machek + + * vfs.c (vfs_parse_ls_lga): attempt to correctly work against + Notwell 4 + +Wed Jan 27 03:09:48 1999 Timur I. Bakeyev + + * All around the source: Changed copy_strings() to g_strconcat(). Modi- + fy last parameter in concat_dir_and_file() to "" - to prevent stack from + disbalancing. + +1999-01-25 Federico Mena Quintero + + * Makefile.am (libvfs_la_SOURCES): Added utilvfs.h. + * Make-mc.in (VFSHDRS): Likewise. + +Sat Jan 23 18:40:19 1999 Timur I. Bakeyev + + * utilvfs.c (append_path_sep): Removed - concat_dir_and_file(dir, NULL); + gives the same effect. + +1999-01-21 Federico Mena Quintero + + * utilvfs.c (append_path_sep): Fixed, it was broken for paths + which already have a / at the end. + +Fri Jan 22 01:41:25 1999 Timur I. Bakeyev + + * undelfs.c: Found one more unconverted realloc() call. + +1999-01-20 Miguel de Icaza + + * undelfs.c (undelfs_loaddel): Fix Timur's changes. + +Thu Jan 21 00:58:12 1999 Timur I. Bakeyev + + * Actually commit all changes :> + +Tue Jan 19 05:15:49 1999 Timur I. Bakeyev + + * Converted all occurences of DIR_SEP_CHAR and "/" to PATH_SEP and + PATH_SEP_STR. Additionall cleanups of the memory code. + + * utilvfs.h: Added several defenitions for common sizes for buffers. + It seems, most of us experience problems, when inventing size for new + buffer. This is much better and portable way to eliminate the problem. + 1999-01-18 Miguel de Icaza * vfs.h: The correct thing to use is PATH_SEP and PATH_SEP_STR -Sun Jan 17 16:19:48 1999 Timur I. Bakeyev +Sun Jan 17 16:19:48 1999 Timur I. Bakeyev * Converted memory managment to Glib. Now we use g_new()/g_malloc()/ g_strdup()/g_free() routings. Also, copy_strings() replaced by @@ -42,7 +149,7 @@ (sfs_getid): dito, return value was wrong. -Sat Jan 9 22:49:02 1999 Timur I. Bakeyev +Sat Jan 9 22:49:02 1999 Timur I. Bakeyev * vfs.c (parse_ls_lga): Rewrite function to make it more stright. Also, fixed some bugs in parsing (and add new ones:), which diasallowed @@ -65,7 +172,7 @@ in the past, it is shown without year. In this case MC assumed the current year which is wrong from Jan to Jun. -Thu Jan 7 03:47:35 1999 Timur I. Bakeyev +Thu Jan 7 03:47:35 1999 Timur I. Bakeyev * vfs.c (parse_ls_lga): Fixed Y2K typo pointed by Alex. @@ -169,7 +276,7 @@ * direntry.c (vfs_s_new_super): Added the missing return value. -Sun Nov 29 02:54:54 1998 Timur I. Bakeyev +Sun Nov 29 02:54:54 1998 Timur I. Bakeyev * vfs.h: (Temporary?) fix to the compiling error: Some of the error codes, defined here are Linux specific and unknown to other systems. @@ -635,7 +742,7 @@ * ftpfs.c (ftpfs_fill_names): use right character to seperate prefix and username -Mon Jun 1 14:19:20 1998 Bakeyev I. Timur +Mon Jun 1 14:19:20 1998 Bakeyev I. Timur * vfs.c (parse_ls_lga): allow a bit wider range of listings. * vfs.c (is_time, is_year): new functions diff -ruN old/mc-4.5.9/vfs/Make-mc.in new/mc-4.5.10/vfs/Make-mc.in --- old/mc-4.5.9/vfs/Make-mc.in Mon Jan 18 17:44:08 1999 +++ new/mc-4.5.10/vfs/Make-mc.in Sun Jan 31 18:55:18 1999 @@ -62,13 +62,14 @@ names.h \ tar.h \ tcputil.h \ + utilvfs.h \ vfs.h \ xdirentry.h VFSOBJS = $(NONETFILES) @NETFILES@ EXTFS_MISC = README extfs.ini -EXTFS_CONST = a rpm hp48 mailfs patchfs sfs.ini +EXTFS_CONST = a rpm hp48 mailfs patchfs sfs.ini trpm rpms EXTFS_IN = \ deb.in \ diff -ruN old/mc-4.5.9/vfs/container.c new/mc-4.5.10/vfs/container.c --- old/mc-4.5.9/vfs/container.c Mon Jan 18 17:44:08 1999 +++ new/mc-4.5.10/vfs/container.c Sun Jan 31 18:55:18 1999 @@ -21,8 +21,7 @@ #include #include #include -#include "../src/mad.h" -#include "../src/util.h" +#include "utilvfs.h" #include "xdirentry.h" #include "container.h" @@ -32,7 +31,7 @@ { struct linklist *head; - head = xmalloc(sizeof(struct linklist), "struct linklist"); + head = g_new (struct linklist, 1); if (head) { head->prev = head->next = head; head->data = NULL; @@ -49,9 +48,9 @@ if (p->data && destructor) (*destructor) (p->data); q = p->next; - free(p); + g_free(p); } - free(head); + g_free(head); } int @@ -59,7 +58,7 @@ { struct linklist *p; - p = xmalloc(sizeof(struct linklist), "struct linklist"); + p = g_new (struct linklist, 1); if (p == NULL) return 0; p->data = data; @@ -78,7 +77,7 @@ for (p = head->next; p != head; p = q) { destructor(p->data); q = p->next; - free(p); + g_free(p); } head->next = head->prev = head; head->data = NULL; @@ -93,7 +92,7 @@ if (h->data == data) { h->prev->next = h->next; h->next->prev = h->prev; - free(h); + g_free(h); return 1; } h = h->next; diff -ruN old/mc-4.5.9/vfs/direntry.c new/mc-4.5.10/vfs/direntry.c --- old/mc-4.5.9/vfs/direntry.c Mon Jan 18 17:44:08 1999 +++ new/mc-4.5.10/vfs/direntry.c Sun Jan 31 18:55:18 1999 @@ -26,6 +26,7 @@ static volatile int total_inodes = 0, total_entries = 0; +#include "utilvfs.h" #include "xdirentry.h" #define CALL(x) if (MEDATA->x) MEDATA->x @@ -35,7 +36,7 @@ { vfs_s_inode *ino; - ino = xmalloc (sizeof (vfs_s_inode), "Dcache inode"); + ino = g_new (vfs_s_inode, 1); if (!ino) return NULL; @@ -44,7 +45,6 @@ ino->subdir = NULL; if (initstat) ino->st = *initstat; - ino->super = super; ino->ent = NULL; ino->flags = 0; @@ -65,11 +65,11 @@ { vfs_s_entry *entry; - entry = (struct vfs_s_entry *) xmalloc (sizeof (struct vfs_s_entry), "Dcache entry"); + entry = g_new (struct vfs_s_entry, 1); total_entries++; if (name) - entry->name = strdup (name); + entry->name = g_strdup (name); else entry->name = NULL; entry->dir = NULL; @@ -100,11 +100,11 @@ ifree (ino->linkname); if (ino->localname){ unlink (ino->localname); - free (ino->localname); + g_free(ino->localname); } total_inodes--; ino->super->ino_usage--; - free (ino); + g_free(ino); } else ino->st.st_nlink--; } @@ -112,7 +112,6 @@ vfs_s_free_entry (vfs *me, vfs_s_entry *ent) { int is_dot = 0; - if (ent->prevp){ /* It is possible that we are deleting freshly created entry */ *ent->prevp = ent->next; if (ent->next) @@ -121,7 +120,7 @@ if (ent->name){ is_dot = (!strcmp (ent->name, ".")) || (!strcmp (ent->name, "..")); - free (ent->name); + g_free (ent->name); ent->name = NULL; } @@ -132,7 +131,7 @@ } total_entries--; - free (ent); + g_free(ent); } void vfs_s_insert_entry (vfs *me, vfs_s_inode *dir, vfs_s_entry *ent) @@ -182,7 +181,7 @@ vfs_s_insert_entry (me, dir, dot); vfs_s_insert_entry (me, dir, dotdot); dir->st.st_nlink--; - parent->st.st_nlink--; /* We do not count "." and ".." into nlinks */ + parent->st.st_nlink--; /* We do not count "." and ".." into nlinks */ } struct vfs_s_entry * @@ -239,7 +238,6 @@ ; if (!path [pseg]) return ent; - path += pseg; for (pseg = 0; path[pseg] && path[pseg] != PATH_SEP; pseg++) @@ -270,9 +268,7 @@ split_dir_name (vfs *me, char *path, char **dir, char **name, char **save) { char *s; - s = strrchr (path, PATH_SEP); - if (!s){ *save = NULL; *name = path; @@ -357,13 +353,10 @@ { if (follow == LINK_NO_FOLLOW) return entry; - if (follow == 0) ERRNOR (ELOOP, NULL); - if (!entry) ERRNOR (ENOENT, NULL); - if (!S_ISLNK (entry->ino->st.st_mode)) return entry; @@ -396,8 +389,7 @@ { vfs_s_super *super; - super = xmalloc (sizeof (struct vfs_s_super), "Direntry: superblock"); - memset (super, 0, sizeof (struct vfs_s_super)); + super = g_new0 (struct vfs_s_super, 1); super->root = NULL; super->name = NULL; super->fd_usage = 0; @@ -443,7 +435,7 @@ CALL (free_archive) (me, super); ifree (super->name); super->name = NULL; - free (super); + g_free(super); } /* ------------------------------------------------------------------------= */ @@ -458,7 +450,7 @@ if (v == &vfs_local_ops){ parent = NULL; } else { - parent = xmalloc (sizeof (struct vfs_stamping), "vfs stamping"); + parent = g_new (struct vfs_stamping, 1); parent->v = v; parent->next = 0; parent->id = (*v->getid) (v, fs_name, &(parent->parent)); @@ -517,14 +509,12 @@ char * vfs_s_get_path (vfs *me, char *inname, struct vfs_s_super **archive, int flags) { - char *buf = strdup (inname); + char *buf = g_strdup( inname ); char *res = vfs_s_get_path_mangle (me, buf, archive, flags); char *res2 = NULL; - if (res) - res2 = strdup (res); - free (buf); - + res2 = g_strdup(res); + g_free(buf); return res2; } @@ -543,11 +533,10 @@ /* For now, usable only on filesystems with _linear structure */ if (MEDATA->find_entry != vfs_s_find_entry_linear) vfs_die ("Implement me!"); - if ((!ino->ent) || (!ino->ent->dir) || (!ino->ent->dir->ent)) ERRNOR (EAGAIN, NULL); - - return copy_strings (ino->ent->dir->ent->name, "/", ino->ent->name, NULL); + return g_strconcat (ino->ent->dir->ent->name, PATH_SEP_STR, + ino->ent->name, NULL); } /* Support of archives */ @@ -601,7 +590,7 @@ if (!dir->subdir) /* This can actually happen if we allow empty directories */ ERRNOR (EAGAIN, NULL); #endif - info = (struct dirhandle *) xmalloc (sizeof (struct dirhandle), "Shared opendir"); + info = g_new (struct dirhandle, 1); info->cur = dir->subdir; info->dir = dir; @@ -658,7 +647,6 @@ { struct dirhandle *info = (struct dirhandle *) data; int i; - info->cur = info->dir->subdir; for (i=0; idir; vfs_s_free_inode (dir->super->me, dir); - free (data); - + g_free (data); return 0; } @@ -715,7 +702,6 @@ vfs_s_fstat (void *fh, struct stat *buf) { *buf = FH->ino->st; - return 0; } @@ -730,10 +716,8 @@ if (!S_ISLNK (ino->st.st_mode)) ERRNOR (EINVAL, -1); - strncpy (buf, ino->linkname, size); *(buf+size-1) = 0; - return strlen (buf); } @@ -759,7 +743,6 @@ return NULL; split_dir_name (me, q, &dirname, &name, &save); - /* FIXME: if vfs_s_find_inode returns NULL, this will do rather bad things. */ dir = vfs_s_find_inode (me, super->root, dirname, LINK_FOLLOW, FL_DIR); @@ -775,7 +758,7 @@ if (S_ISDIR (ino->st.st_mode)) ERRNOR (EISDIR, NULL); - fh = (struct vfs_s_fh *) xmalloc (sizeof (struct vfs_s_fh), "Direntry: filehandle"); + fh = g_new (struct vfs_s_fh, 1); fh->pos = 0; fh->ino = ino; fh->handle = -1; @@ -783,14 +766,14 @@ fh->linear = 0; if (MEDATA->fh_open) if (MEDATA->fh_open (me, fh, flags, mode)){ - free (fh); + g_free(fh); return NULL; } if (fh->ino->localname){ fh->handle = open (fh->ino->localname, flags, mode); if (fh->handle == -1){ - free (fh); + g_free(fh); ERRNOR (errno, NULL); } } @@ -892,7 +875,7 @@ if (v == &vfs_local_ops){ parent = NULL; } else { - parent = xmalloc (sizeof (struct vfs_stamping), "vfs stamping"); + parent = g_new (struct vfs_stamping, 1); parent->v = v; parent->next = 0; parent->id = (*v->getid) (v, FH_SUPER->name, &(parent->parent)); @@ -916,7 +899,7 @@ close (FH->handle); vfs_s_free_inode (me, FH->ino); - free (fh); + g_free (fh); return res; } @@ -929,10 +912,9 @@ char *name; while (a){ - name = copy_strings (a->name, "#", me->prefix, "/", - /* a->current_dir->name, */ 0); + name = g_strconcat ( a->name, "#", me->prefix, "/", /* a->current_dir->name, */ NULL); (*func)(name); - free (name); + g_free (name); a = a->next; } } @@ -956,12 +938,12 @@ ent = ino->subdir; while (ent){ char *s; - s = copy_strings (prefix, "/", ent->name, NULL); + s = g_strconcat (prefix, "/", ent->name, NULL); if (ent->name[0] == '.') printf ("%s IGNORED\n", s); else vfs_s_dump (me, s, ent->ino); - free (s); + g_free(s); ent = ent->next; } } @@ -986,10 +968,8 @@ vfs_s_setctl (vfs *me, char *path, int ctlop, char *arg) { vfs_s_inode *ino = vfs_s_inode_from_path (me, path, 0); - if (!ino) return 0; - switch (ctlop){ case MCCTL_WANT_STALE_DATA: ino->super->want_stale = 1; @@ -1006,7 +986,6 @@ return 0; #endif } - return 0; } @@ -1025,14 +1004,11 @@ *parent = NULL; if (!(p = vfs_s_get_path (me, path, &archive, FL_NO_OPEN))) return (vfsid) -1; - - free (p); - + g_free(p); v = vfs_type (archive->name); id = (*v->getid) (v, archive->name, &par); - if (id != (vfsid)-1){ - *parent = xmalloc (sizeof (struct vfs_stamping), "vfs stamping"); + *parent = g_new (struct vfs_stamping, 1); (*parent)->v = v; (*parent)->id = id; (*parent)->parent = par; diff -ruN old/mc-4.5.9/vfs/extfs/extfs.ini new/mc-4.5.10/vfs/extfs/extfs.ini --- old/mc-4.5.9/vfs/extfs/extfs.ini Mon Jan 18 17:44:08 1999 +++ new/mc-4.5.10/vfs/extfs/extfs.ini Sun Jan 31 18:55:18 1999 @@ -35,3 +35,7 @@ # Represents a mailbox as a directory mailfs + +# Lists the rpms on the system +rpms +trpm \ No newline at end of file diff -ruN old/mc-4.5.9/vfs/extfs/rpms new/mc-4.5.10/vfs/extfs/rpms --- old/mc-4.5.9/vfs/extfs/rpms Wed Dec 31 19:00:00 1969 +++ new/mc-4.5.10/vfs/extfs/rpms Sun Jan 31 18:55:18 1999 @@ -0,0 +1,61 @@ +#! /usr/bin/perl +# +# Written by Balazs Nagy (julian7@kva.hu) 1998 +# (C) 1998 The Free Software Foundation. +# +# + +sub gd +{ + my ($dt) = @_; + $dt =~ tr/ //s; + $dt =~ s/^\w+ (\w+) (\d+) (\d+:\d+):\d+ .+\n?$/$1 $2 $3/; + return $dt; +} + +$DATE=gd(`date`); + +sub list +{ + my (@rpms, %files, $i, $fn, $dn, $sz, $bt); +# @rpms = `rpm -qa --qf "\%{NAME}-\%{VERSION}-\%{RELEASE}:\%{GROUP}:\%{SIZE}:\%{BUILDTIME:date}\n"`; + @rpms = `rpm -qa --qf "\%{NAME}-\%{VERSION}:\%{GROUP}:\%{SIZE}:\%{BUILDTIME:date}\n"`; + print @trpms; + %files = (); + %sizes = (); + %dates = (); + for $i (@rpms) { + if ($i =~ /^([^:]+):([^:]+):([^:]+):(.+)$/) { + ($fn, $dn, $sz, $bt) = ($1, $2, $3, $4); + $dn =~ s/ /_/g; + if (defined $files{$dn}) { + push(@{$files{$dn}}, $fn); + } else { + @{$files{$dn}} = ($fn); + } + $sizes{$fn} = $sz; + $dates{$fn} = gd($bt); + } + } + for $i (sort keys %files) { + print "dr-xr-xr-x 1 root root 0 $DATE $i/\n"; + for $fn (sort @{$files{$i}}) { + print "-r--r--r-- 1 root root $sizes{$fn} $dates{$fn} $i/$fn.trpm\n"; + } + } +} + +# override any locale for dates +$ENV{"LC_ALL"}="C"; + +#open O, ">>/tmp/tt"; +#print O "RPMS: "; +#for $i (@ARGV) { +# print O "$i "; +#} +#print O "\n"; +#close O; + +if ($ARGV[0] eq "list") { list(); exit(0); } +elsif ($ARGV[0] eq "copyout") { open O, ">$ARGV[3]"; print O $ARGV[2], "\n"; close O; exit(0); } +exit(1); diff -ruN old/mc-4.5.9/vfs/extfs/trpm new/mc-4.5.10/vfs/extfs/trpm --- old/mc-4.5.9/vfs/extfs/trpm Wed Dec 31 19:00:00 1969 +++ new/mc-4.5.10/vfs/extfs/trpm Sun Jan 31 18:55:18 1999 @@ -0,0 +1,161 @@ +#! /bin/sh +# +# Written by Erik Troan (ewt@redhat.com) 1996 +# Jakub Jelinek (jj@sunsite.mff.cuni.cz) 1996 +# Tomasz K³oczko (kloczek@rudy.mif.pg.gda.pl) 1997 +# minor changes by Wojtek Pilorz (wpilorz@bdk.lublin.pl) 1997 +# minor changes by Michele Marziani (marziani@fe.infn.it) 1997 +# slight changes to put rpm to Trpm by Balazs Nagy (julian7@kva.hu) 1998 +# (C) 1996 The Free Software Foundation. +# +# + +mcrpmfs_list () +{ + # set MCFASTRPM_DFLT to 1 for faster rpm files handling by default, to 0 for + # slower handling + MCFASTRPM_DFLT=0 + if test -z "$MCFASTRPM"; then + MCFASTRPM=$MCFASTRPM_DFLT + fi + FILEPREF="-r--r--r-- 1 root root " + DESC=`rpm -qi $1` + DATE=`rpm -q --qf "%{BUILDTIME:date}" $1 | cut -c 5-11,21-24` + HEADERSIZE=`echo "$DESC" | wc -c` + echo "-r--r--r-- 1 root root $HEADERSIZE $DATE HEADER" + echo "-r-xr-xr-x 1 root root 39 $DATE UNINSTALL" + echo "dr-xr-xr-x 3 root root 0 $DATE INFO" + echo "$FILEPREF 0 $DATE INFO/NAME-VERSION-RELEASE" + echo "$FILEPREF 0 $DATE INFO/GROUP" + echo "$FILEPREF 0 $DATE INFO/BUILDHOST" + echo "$FILEPREF 0 $DATE INFO/SOURCERPM" + if test "$MCFASTRPM" = 0 ; then + test "`rpm -q --qf \"%{DISTRIBUTION}\" $1`" = "(none)" || + echo "$FILEPREF 0 $DATE INFO/DISTRIBUTION" + test "`rpm -q --qf \"%{VENDOR}\" $1`" = "(none)" || + echo "$FILEPREF 0 $DATE INFO/VENDOR" + test "`rpm -q --qf \"%{DESCRIPTION}\" $1`" = "(none)" || + echo "$FILEPREF 0 $DATE INFO/DESCRIPTION" + test "`rpm -q --qf \"%{SUMMARY}\" $1`" = "(none)" || + echo "$FILEPREF 0 $DATE INFO/SUMMARY" + if test "`rpm -q --qf \"%{RPMTAG_PREIN}%{RPMTAG_POSTIN}%{RPMTAG_PREUN}%{RPMTAG_POSTUN}%{VERIFYSCRIPT}\" $1`" != "(none)(none)(none)(none)(none)"; then + echo "dr-xr-xr-x 1 root root 0 $DATE INFO/SCRIPTS" + test "`rpm -q --qf \"%{RPMTAG_PREIN}\" $1`" = '(none)' || + echo "$FILEPREF 0 $DATE INFO/SCRIPTS/PREIN" + test "`rpm -q --qf \"%{RPMTAG_POSTIN}\" $1`" = '(none)' || + echo "$FILEPREF 0 $DATE INFO/SCRIPTS/POSTIN" + test "`rpm -q --qf \"%{RPMTAG_PREUN}\" $1`" = '(none)' || + echo "$FILEPREF 0 $DATE INFO/SCRIPTS/PREUN" + test "`rpm -q --qf \"%{RPMTAG_POSTUN}\" $1`" = '(none)' || + echo "$FILEPREF 0 $DATE INFO/SCRIPTS/POSTUN" + test "`rpm -q --qf \"%{VERIFYSCRIPT}\" $1`" = '(none)' || + echo "$FILEPREF 0 $DATE INFO/SCRIPTS/VERIFYSCRIPT" + echo "$FILEPREF 0 $DATE INFO/SCRIPTS/ALL" + fi + else + echo "$FILEPREF 0 $DATE INFO/DISTRIBUTION" + echo "$FILEPREF 0 $DATE INFO/VENDOR" + echo "$FILEPREF 0 $DATE INFO/DESCRIPTION" + echo "$FILEPREF 0 $DATE INFO/SUMMARY" + echo "dr-xr-xr-x 1 root root 0 $DATE INFO/SCRIPTS" + echo "$FILEPREF 0 $DATE INFO/SCRIPTS/PREIN" + echo "$FILEPREF 0 $DATE INFO/SCRIPTS/POSTIN" + echo "$FILEPREF 0 $DATE INFO/SCRIPTS/PREUN" + echo "$FILEPREF 0 $DATE INFO/SCRIPTS/POSTUN" + echo "$FILEPREF 0 $DATE INFO/SCRIPTS/VERIFYSCRIPT" + echo "$FILEPREF 0 $DATE INFO/SCRIPTS/ALL" + fi + if test "$MCFASTRPM" = 0 ; then + test "`rpm -q --qf \"%{PACKAGER}\" $1`" = "(none)" || + echo "$FILEPREF 0 $DATE INFO/PACKAGER" + test "`rpm -q --qf \"%{URL}\" $1`" = "(none)" || + echo "$FILEPREF 0 $DATE INFO/URL" + test "`rpm -q --qf \"%{SERIAL}\" $1`" = "(none)" || + echo "$FILEPREF 0 $DATE INFO/SERIAL" + test "`rpm -q --qf \"%{COPYRIGHT}\" $1`" = "(none)" || + echo "$FILEPREF 0 $DATE INFO/COPYRIGHT" + else + echo "$FILEPREF 0 $DATE INFO/PACKAGER" + echo "$FILEPREF 0 $DATE INFO/URL" + echo "$FILEPREF 0 $DATE INFO/SERIAL" + echo "$FILEPREF 0 $DATE INFO/COPYRIGHT" + fi + echo "$FILEPREF 0 $DATE INFO/BUILDTIME" + echo "$FILEPREF 0 $DATE INFO/RPMVERSION" + echo "$FILEPREF 0 $DATE INFO/OS" + echo "$FILEPREF 0 $DATE INFO/SIZE" + if test "$MCFASTRPM" != 0 ; then + rpm -q --qf "[%{REQUIRENAME}\n]" $1 | grep "(none)" > /dev/null || + echo "$FILEPREF 0 $DATE INFO/REQUIRENAME" + rpm -q --qf "[%{PROVIDES}\n]" $1 | grep "(none)" > /dev/null || + echo "$FILEPREF 0 $DATE INFO/PROVIDES" + test "`rpm -q --qf \"%{CHANGELOGTEXT}\" $1`" = "(none)" || + echo "$FILEPREF 0 $DATE INFO/CHANGELOG" + else + echo "$FILEPREF 0 $DATE INFO/REQUIRENAME" + echo "$FILEPREF 0 $DATE INFO/PROVIDES" + echo "$FILEPREF 0 $DATE INFO/CHANGELOG" + fi + + rpm -qlv $1 | sed -e 's/^\(..........\) /\1 1 /' +} + +mcrpmfs_copyout () +{ + case "$2" in + HEADER) rpm -qi $1 > $3; exit 0;; + UNINSTALL) echo "# Run this to uninstall this RPM package" > $3; exit 0;; + INFO/NAME-VERSION-RELEASE) rpm -q --qf "%{NAME}-%{VERSION}-%{RELEASE}\n" $1 > $3; exit 0;; + INFO/RELEASE) rpm -q --qf "%{RELEASE}\n" $1 > $3; exit 0;; + INFO/GROUP) rpm -q --qf "%{GROUP}\n" $1 > $3; exit 0;; + INFO/DISTRIBUTION) rpm -q --qf "%{DISTRIBUTION}\n" $1 > $3; exit 0;; + INFO/VENDOR) rpm -q --qf "%{VENDOR}\n" $1 > $3; exit 0;; + INFO/BUILDHOST) rpm -q --qf "%{BUILDHOST}\n" $1 > $3; exit 0;; + INFO/SOURCERPM) rpm -q --qf "%{SOURCERPM}\n" $1 > $3; exit 0;; + INFO/DESCRIPTION) rpm -q --qf "%{DESCRIPTION}\n" $1 > $3; exit 0;; + INFO/PACKAGER) rpm -q --qf "%{PACKAGER}\n" $1 > $3; exit 0;; + INFO/URL) rpm -q --qf "%{URL}\n" $1 >$3; exit 0;; + INFO/BUILDTIME) rpm -q --qf "%{BUILDTIME:date}\n" $1 >$3; exit 0;; + INFO/SERIAL) rpm -q --qf "%{SERIAL}\n" $1 >$3; exit 0;; + INFO/COPYRIGHT) rpm -q --qf "%{COPYRIGHT}\n" $1 >$3; exit 0;; + INFO/RPMVERSION) rpm -q --qf "%{RPMVERSION}\n" $1 >$3; exit 0;; + INFO/REQUIRENAME) rpm -q --qf "[%{REQUIRENAME} %{REQUIREFLAGS:depflags} %{REQUIREVERSION}\n]" $1 >$3; exit 0;; + INFO/PROVIDES) rpm -q --qf "[%{PROVIDES}\n]" $1 >$3; exit 0;; + INFO/SCRIPTS/PREIN) rpm -q --qf "%{RPMTAG_PREIN}\n" $1 >$3; exit 0;; + INFO/SCRIPTS/POSTIN) rpm -q --qf "%{RPMTAG_POSTIN}\n" $1 >$3; exit 0;; + INFO/SCRIPTS/PREUN) rpm -q --qf "%{RPMTAG_PREUN}\n" $1 >$3; exit 0;; + INFO/SCRIPTS/POSTUN) rpm -q --qf "%{RPMTAG_POSTUN}\n" $1 >$3; exit 0;; + INFO/SCRIPTS/VERIFYSCRIPT) rpm -q --qf "%{VERIFYSCRIPT}\n" $1 >$3; exit 0;; + INFO/SCRIPTS/ALL) rpm -q --scripts $1 > $3; exit 0;; + INFO/SUMMARY) rpm -q --qf "%{SUMMARY}\n" $1 > $3; exit 0;; + INFO/OS) rpm -q --qf "%{OS}\n" $1 > $3; exit 0;; + INFO/CHANGELOG) rpm -q --qf "[* %{CHANGELOGTIME:date} %{CHANGELOGNAME}\n%{CHANGELOGTEXT}\n\n]\n" $1 > $3; exit 0;; + INFO/SIZE) rpm -q --qf "%{SIZE} bytes\n" $1 > $3; exit 0;; + *) + cp /$2 $3 + esac +} + +mcrpmfs_run () +{ + case "$2" in + UNINSTALL) echo "Uninstalling $1"; rpm -e $1; exit 0;; + esac +} + +# override any locale for dates +LC_ALL=C +export LC_ALL +name=$2 +if [ ${name%%.trpm} = $name ]; then + name=`head -1 $name` +fi +#echo "TRPM: $@ ($name)" >> /tmp/tt +#name=`echo $(basename $2 .trpm) | sed "s/^\(.*\)\.[^\.]*/\1/"` +name=`basename $name .trpm` +case "$1" in + list) mcrpmfs_list $name; exit 0;; + copyout) mcrpmfs_copyout $name $3 $4; exit 0;; + run) mcrpmfs_run $name $3; exit 1;; +esac +exit 1 diff -ruN old/mc-4.5.9/vfs/extfs.c new/mc-4.5.10/vfs/extfs.c --- old/mc-4.5.9/vfs/extfs.c Mon Jan 18 17:44:08 1999 +++ new/mc-4.5.10/vfs/extfs.c Sun Jan 31 18:55:18 1999 @@ -38,11 +38,8 @@ #include /* alex: for struct timeb definition */ #endif /* SCO_FLAVOR */ #include -#include "../src/fs.h" -#include "../src/util.h" +#include "utilvfs.h" #include "../src/dialog.h" -#include "../src/mem.h" -#include "../src/mad.h" #include "../src/main.h" /* For shell_execute */ #include "vfs.h" #include "extfs.h" @@ -68,24 +65,23 @@ char *name; while (a){ - name = copy_strings (extfs_prefixes [a->fstype], "#", + name = g_strconcat (extfs_prefixes [a->fstype], "#", (a->name ? a->name : ""), "/", - a->current_dir->name, 0); + a->current_dir->name, NULL); (*func)(name); - free (name); + g_free (name); a = a->next; } } static void make_dot_doubledot (struct entry *ent) { - struct entry *entry = (struct entry *) - xmalloc (sizeof (struct entry), "Extfs: entry"); + struct entry *entry = g_new (struct entry, 1); struct entry *parentry = ent->dir; struct inode *inode = ent->inode, *parent; parent = (parentry != NULL) ? parentry->inode : NULL; - entry->name = strdup ("."); + entry->name = g_strdup ("."); entry->has_changed = 0; entry->inode = inode; entry->dir = ent; @@ -93,10 +89,9 @@ inode->first_in_subdir = entry; inode->last_in_subdir = entry; inode->nlink++; - entry->next_in_dir = (struct entry *) - xmalloc (sizeof (struct entry), "Extfs: entry"); + entry->next_in_dir = g_new (struct entry, 1); entry=entry->next_in_dir; - entry->name = strdup (".."); + entry->name = g_strdup (".."); entry->has_changed = 0; inode->last_in_subdir = entry; entry->next_in_dir = NULL; @@ -119,10 +114,9 @@ struct entry *entry; parent = (parentry != NULL) ? parentry->inode : NULL; - entry = (struct entry *) - xmalloc (sizeof (struct entry), "Extfs: entry"); + entry = g_new (struct entry, 1); - entry->name = strdup (name); + entry->name = g_strdup (name); entry->has_changed = 0; entry->next_in_dir = NULL; entry->dir = parentry; @@ -130,8 +124,7 @@ parent->last_in_subdir->next_in_dir = entry; parent->last_in_subdir = entry; } - inode = (struct inode *) - xmalloc (sizeof (struct inode), "Extfs: inode"); + inode = g_new (struct inode, 1); entry->inode = inode; inode->has_changed = 0; inode->local_filename = NULL; @@ -173,8 +166,8 @@ /* ungetlocalcopy frees local_name for us */ } if (archive->name) - free (archive->name); - free (archive); + g_free (archive->name); + g_free (archive); } static FILE *open_archive (int fstype, char *name, struct archive **pparc) @@ -209,23 +202,22 @@ #endif mc_extfsdir = concat_dir_and_file (mc_home, "extfs/"); - cmd = copy_strings (mc_extfsdir, extfs_prefixes [fstype], - " list ", local_name ? local_name : tmp, 0); + cmd = g_strconcat (mc_extfsdir, extfs_prefixes [fstype], + " list ", local_name ? local_name : tmp, NULL); if (tmp) - free (tmp); + g_free (tmp); result = popen (cmd, "r"); - free (cmd); - free (mc_extfsdir); + g_free (cmd); + g_free (mc_extfsdir); if (result == NULL) { if (local_name != NULL && uses_archive) mc_ungetlocalcopy (name, local_name, 0); return NULL; } - current_archive = (struct archive *) - xmalloc (sizeof (struct archive), "Extfs archive"); + current_archive = g_new (struct archive, 1); current_archive->fstype = fstype; - current_archive->name = name ? strdup (name): name; + current_archive->name = name ? g_strdup (name): name; current_archive->local_name = local_name; if (local_name != NULL) @@ -276,7 +268,7 @@ return -1; } - buffer = xmalloc (4096, "Extfs: buffer"); + buffer = g_malloc (4096); while (fgets (buffer, 4096, extfsd) != NULL) { current_link_name = NULL; if (vfs_parse_ls_lga (buffer, &hstat, ¤t_file_name, ¤t_link_name)) { @@ -305,12 +297,12 @@ if (pent == NULL) { message_1s (1, MSG_ERROR, _("Inconsistent extfs archive")); /* FIXME: Should clean everything one day */ - free (buffer); + g_free (buffer); pclose (extfsd); return -1; } - entry = (struct entry *) xmalloc (sizeof (struct entry), "Extfs: entry"); - entry->name = strdup (p); + entry = g_new (struct entry, 1); + entry->name = g_strdup (p); entry->has_changed = 0; entry->next_in_dir = NULL; entry->dir = pent; @@ -325,7 +317,7 @@ if (pent == NULL) { message_1s (1, MSG_ERROR, _("Inconsistent extfs archive")); /* FIXME: Should clean everything one day */ - free (buffer); + g_free (buffer); pclose (extfsd); return -1; } else { @@ -333,7 +325,7 @@ pent->inode->nlink++; } } else { - inode = (struct inode *) xmalloc (sizeof (struct inode), "Extfs: inode"); + inode = g_new (struct inode, 1); entry->inode = inode; inode->local_filename = NULL; inode->has_changed = 0; @@ -366,9 +358,9 @@ } } read_extfs_continue: - free (current_file_name); + g_free (current_file_name); if (current_link_name != NULL) - free (current_link_name); + g_free (current_link_name); } } pclose (extfsd); @@ -376,7 +368,7 @@ waitpid(-1,NULL,WNOHANG); #endif /* SCO_FLAVOR */ *pparc = current_archive; - free (buffer); + g_free (buffer); return 0; } @@ -437,7 +429,7 @@ if (v == &vfs_local_ops) { parent = NULL; } else { - parent = xmalloc (sizeof (struct vfs_stamping), "vfs stamping"); + parent = g_new (struct vfs_stamping, 1); parent->v = v; parent->next = 0; parent->id = (*v->getid) (v, archive_name, &(parent->parent)); @@ -461,14 +453,14 @@ size_t len; for (len = 0, head = 0; entry->dir; entry = entry->dir) { - p = xmalloc (sizeof (struct list), "Extfs: list"); + p = g_new (struct list, 1); p->next = head; p->name = entry->name; head = p; len += strlen (entry->name) + 1; } - localpath = xmalloc (len, "Extfs: localpath"); + localpath = g_malloc (len); *localpath = '\0'; for ( ; head; ) { strcat (localpath, head->name); @@ -476,7 +468,7 @@ strcat (localpath, "/"); p = head; head = head->next; - free (p); + g_free (p); } return (localpath); } @@ -507,13 +499,11 @@ errloop = 1; return NULL; } - looping = (struct loop_protect *) - xmalloc (sizeof (struct loop_protect), - "Extfs: symlink looping protection"); + looping = g_new (struct loop_protect, 1); looping->entry = entry; looping->next = list; pent = __find_entry (entry->dir, entry->inode->linkname, looping, 0, 0); - free (looping); + g_free (looping); if (pent == NULL) my_errno = ENOENT; return pent; @@ -563,7 +553,8 @@ void extfs_run (char *file) { struct archive *archive; - char *p, *q, *cmd, *archive_name, *mc_extfsdir; + char *p, *q, *archive_name, *mc_extfsdir; + char *cmd; if ((p = get_path (file, &archive, 0, 0)) == NULL) return; @@ -571,18 +562,18 @@ archive_name = name_quote (get_archive_name(archive), 0); mc_extfsdir = concat_dir_and_file (mc_home, "extfs/"); - cmd = copy_strings (mc_extfsdir, extfs_prefixes [archive->fstype], - " run ", archive_name, " ", q, 0); - free (mc_extfsdir); - free (archive_name); - free (q); + cmd = g_strconcat (mc_extfsdir, extfs_prefixes [archive->fstype], + " run ", archive_name, " ", q, NULL); + g_free (mc_extfsdir); + g_free (archive_name); + g_free (q); #ifndef VFS_STANDALONE shell_execute(cmd, 0); #else vfs_die( "shell_execute: implement me!" ); #endif - free(cmd); - free(p); + g_free(cmd); + g_free(p); } static void *extfs_open (vfs *me, char *file, int flags, int mode) @@ -604,9 +595,10 @@ return NULL; if (S_ISDIR (entry->inode->mode)) ERRNOR (EISDIR, NULL); if (entry->inode->local_filename == NULL) { - char *cmd, *archive_name, *p; + char *cmd; + char *archive_name, *p; - entry->inode->local_filename = strdup (tempnam (NULL, "extfs")); + entry->inode->local_filename = g_strdup (tempnam (NULL, "extfs")); { int handle; @@ -617,31 +609,31 @@ } p = get_path_from_entry (entry); q = name_quote (p, 0); - free (p); + g_free (p); archive_name = name_quote (get_archive_name (archive), 0); mc_extfsdir = concat_dir_and_file (mc_home, "extfs/"); - cmd = copy_strings (mc_extfsdir, extfs_prefixes [archive->fstype], + cmd = g_strconcat (mc_extfsdir, extfs_prefixes [archive->fstype], " copyout ", archive_name, - " ", q, " ", entry->inode->local_filename, 0); - free (q); - free (mc_extfsdir); - free (archive_name); + " ", q, " ", entry->inode->local_filename, NULL); + g_free (q); + g_free (mc_extfsdir); + g_free (archive_name); if (my_system (EXECUTE_AS_SHELL | EXECUTE_SETUID | EXECUTE_WAIT, shell, cmd) && !do_create){ - free (entry->inode->local_filename); + g_free (entry->inode->local_filename); entry->inode->local_filename = NULL; - free (cmd); + g_free (cmd); my_errno = EIO; return NULL; } - free (cmd); + g_free (cmd); } local_handle = open (entry->inode->local_filename, flags, mode); if (local_handle == -1) ERRNOR (EIO, NULL); - extfs_info = (struct pseudofile *) xmalloc (sizeof (struct pseudofile), "Extfs: extfs_open"); + extfs_info = g_new (struct pseudofile, 1); extfs_info->archive = archive; extfs_info->entry = entry; extfs_info->has_changed = 0; @@ -680,20 +672,20 @@ archive_name = name_quote (get_archive_name (archive), 0); p = get_path_from_entry (file->entry); file_name = name_quote (p, 0); - free (p); + g_free (p); mc_extfsdir = concat_dir_and_file (mc_home, "extfs/"); - cmd = copy_strings (mc_extfsdir, + cmd = g_strconcat (mc_extfsdir, extfs_prefixes [archive->fstype], " copyin ", archive_name, " ", file_name, " ", - file->entry->inode->local_filename, 0); - free (archive_name); - free (file_name); + file->entry->inode->local_filename, NULL); + g_free (archive_name); + g_free (file_name); if (my_system (EXECUTE_AS_SHELL | EXECUTE_SETUID | EXECUTE_WAIT, shell, cmd)) errno_code = EIO; - free (cmd); - free (mc_extfsdir); + g_free (cmd); + g_free (mc_extfsdir); { struct stat file_status; if( stat(file->entry->inode->local_filename,&file_status) != 0 ) @@ -712,7 +704,7 @@ if (!file->archive->name || !*file->archive->name || (v = vfs_type (file->archive->name)) == &vfs_local_ops) { parent = NULL; } else { - parent = xmalloc (sizeof (struct vfs_stamping), "vfs stamping"); + parent = g_new (struct vfs_stamping, 1); parent->v = v; parent->next = 0; parent->id = (*v->getid) (v, file->archive->name, &(parent->parent)); @@ -721,7 +713,7 @@ vfs_rm_parents (parent); } - free (data); + g_free (data); if (errno_code) ERRNOR (EIO, -1); return 0; } @@ -758,7 +750,7 @@ if ((!entry) || (!S_ISDIR (entry->inode->mode))) return -1; entry->inode->archive->current_dir = entry; - res = copy_strings ( + res = g_strconcat ( entry->inode->archive->name, "#", extfs_prefixes [entry->inode->archive->fstype], "/", q, NULL); my_errno = 0; @@ -783,12 +775,12 @@ *parent = NULL; if (!(p = get_path (path, &archive, 1, 1))) return (vfsid) -1; - free(p); + g_free(p); if (archive->name){ v = vfs_type (archive->name); id = (*v->getid) (v, archive->name, &par); if (id != (vfsid)-1) { - *parent = xmalloc (sizeof (struct vfs_stamping), "vfs stamping"); + *parent = g_new (struct vfs_stamping, 1); (*parent)->v = v; (*parent)->id = id; (*parent)->parent = par; @@ -818,16 +810,16 @@ if (i <= 0) { if (e->inode->local_filename != NULL) { unlink (e->inode->local_filename); - free (e->inode->local_filename); + g_free (e->inode->local_filename); } if (e->inode->linkname != NULL) - free (e->inode->linkname); - free (e->inode); + g_free (e->inode->linkname); + g_free (e->inode); } if (e->next_in_dir != NULL) free_entry (e->next_in_dir); - free (e->name); - free (e); + g_free (e->name); + g_free (e); } static void extfs_free (vfsid id) @@ -860,7 +852,7 @@ extfs_close ((void *) fp); return NULL; } - p = strdup (fp->entry->inode->local_filename); + p = g_strdup (fp->entry->inode->local_filename); fp->archive->fd_usage++; extfs_close ((void *) fp); return p; @@ -894,7 +886,7 @@ mc_extfsini = concat_dir_and_file (mc_home, "extfs/extfs.ini"); cfg = fopen (mc_extfsini, "r"); - free (mc_extfsini); + g_free (mc_extfsini); if (!cfg) { fprintf( stderr, "Warning: " LIBDIR "extfs/extfs.ini not found\n" ); @@ -932,7 +924,7 @@ if (!(*key)) continue; - extfs_prefixes [extfs_no] = strdup (key); + extfs_prefixes [extfs_no] = g_strdup (key); extfs_no++; } fclose(cfg); @@ -955,7 +947,7 @@ int i; for (i = 0; i < extfs_no; i++ ) - free (extfs_prefixes [i]); + g_free (extfs_prefixes [i]); extfs_no = 0; } diff -ruN old/mc-4.5.9/vfs/fish.c new/mc-4.5.10/vfs/fish.c --- old/mc-4.5.9/vfs/fish.c Mon Jan 18 17:44:08 1999 +++ new/mc-4.5.10/vfs/fish.c Sun Jan 31 18:55:18 1999 @@ -35,15 +35,13 @@ #undef HAVE_HACKED_SSH +#include "utilvfs.h" + #include "xdirentry.h" -#include "../src/tty.h" /* enable/disable interrupt key */ -#include "../src/main.h" -#include "../src/mem.h" #include "vfs.h" #include "tcputil.h" #include "container.h" #include "fish.h" -#include /* * Reply codes. @@ -181,7 +179,7 @@ static char *fish_getcwd(vfs *me, vfs_s_super *super) { if (command(me, super, WANT_STRING, "#PWD\npwd; echo '### 200'\n") == COMPLETE) - return copy_strings(reply_str, "/", NULL); + return g_strconcat (reply_str, "/", NULL); ERRNOR (EIO, NULL); } static int @@ -228,13 +226,13 @@ #endif if (!SUP.password){ char *p, *op; - p = copy_strings (" fish: Password required for ", SUP.user, + p = g_strconcat (" fish: Password required for ", SUP.user, " ", NULL); op = vfs_get_password (p); - free (p); + g_free (p); if (op == NULL) ERRNOR (EPERM, -1); - SUP.password = strdup (op); + SUP.password = g_strdup (op); wipe_password(op); } print_vfs_message( "fish: Sending password..." ); @@ -255,9 +253,9 @@ SUP.home = fish_getcwd (me, super); print_vfs_message( "FISH: Connected, home %s.", SUP.home ); #if 0 - super->name = copy_strings( "/#sh:", SUP.user, "@", SUP.host, "/", NULL ); + super->name = g_strconcat ( "/#sh:", SUP.user, "@", SUP.host, "/", NULL ); #endif - super->name = strdup( "/" ); + super->name = g_strdup(PATH_SEP_STR); super->root = vfs_s_new_inode (me, super, vfs_s_default_stat(me, S_IFDIR | 0755)); return 0; @@ -270,14 +268,14 @@ int flags; vfs_split_url (strchr(op, ':')+1, &host, &user, &flags, &password, 0, URL_NOSLASH); - SUP.host = strdup (host); - SUP.user = strdup (user); + SUP.host = g_strdup (host); + SUP.user = g_strdup (user); SUP.flags = flags; if (!strncmp( op, "rsh:", 4 )) SUP.flags |= FISH_FLAG_RSH; SUP.home = NULL; if (password) - SUP.password = strdup (password); + SUP.password = g_strdup (password); return open_archive_int (me, super); } @@ -374,7 +372,7 @@ char *c; if (!strcmp(buffer+1, ".") || !strcmp(buffer+1, "..")) break; /* We'll do . and .. ourself */ - ent->name = strdup(buffer+1); + ent->name = g_strdup(buffer+1); if ((c=strchr(ent->name, ' '))) *c = 0; /* this is ugly, but we can not handle " " in name */ break; @@ -415,7 +413,7 @@ ST.st_rdev = (maj << 8) | min; #endif } - case 'L': ent->ino->linkname = strdup(buffer+1); + case 'L': ent->ino->linkname = g_strdup(buffer+1); break; } } @@ -517,7 +515,7 @@ print_vfs_message( "Aborting transfer..." ); do { - n = VFS_MIN(8192, fh->u.fish.total - fh->u.fish.got); + n = MIN(8192, fh->u.fish.total - fh->u.fish.got); if (n) if ((n = read(SUP.sockr, buffer, n)) < 0) return; @@ -534,7 +532,7 @@ { vfs_s_super *super = FH_SUPER; int n = 0; - len = VFS_MIN( fh->u.fish.total - fh->u.fish.got, len ); + len = MIN( fh->u.fish.total - fh->u.fish.got, len ); disable_interrupt_key(); while (len && ((n = read (SUP.sockr, buf, len))<0)) { if ((errno == EINTR) && !got_interrupt()) @@ -595,7 +593,7 @@ } #define PREFIX \ - char buf[999]; \ + char buf[BUF_LARGE]; \ char *rpath; \ vfs_s_super *super; \ if (!(rpath = vfs_s_get_path_mangle(me, path, &super, 0))) \ @@ -608,7 +606,7 @@ fish_chmod (vfs *me, char *path, int mode) { PREFIX - sprintf(buf, "#CHMOD %4.4o /%s\nchmod %4.4o /%s; echo '### 000'\n", + g_snprintf(buf, sizeof(buf), "#CHMOD %4.4o /%s\nchmod %4.4o /%s; echo '### 000'\n", mode & 07777, rpath, mode & 07777, rpath); POSTFIX(OPT_FLUSH); @@ -617,7 +615,7 @@ #define FISH_OP(name, chk, string) \ static int fish_##name (vfs *me, char *path1, char *path2) \ { \ - char buf[1024]; \ + char buf[BUF_LARGE]; \ char *rpath1 = NULL, *rpath2 = NULL; \ vfs_s_super *super1, *super2; \ if (!(rpath1 = vfs_s_get_path_mangle(me, path1, &super1, 0))) \ @@ -635,7 +633,7 @@ static int fish_symlink (vfs *me, char *setto, char *path) { PREFIX - sprintf(buf, "#SYMLINK %s /%s\nln -s %s /%s; echo '### 000'\n", setto, rpath, setto, rpath); + g_snprintf(buf, sizeof(buf), "#SYMLINK %s /%s\nln -s %s /%s; echo '### 000'\n", setto, rpath, setto, rpath); POSTFIX(OPT_FLUSH); } @@ -646,12 +644,12 @@ PREFIX sowner = getpwuid( owner )->pw_name; sgroup = getgrgid( group )->gr_name; - sprintf(buf, "#CHOWN /%s /%s\nchown /%s /%s; echo '### 000'\n", + g_snprintf(buf, sizeof(buf), "#CHOWN /%s /%s\nchown /%s /%s; echo '### 000'\n", sowner, rpath, sowner, rpath); send_fish_command(me, super, buf, OPT_FLUSH); /* FIXME: what should we report if chgrp succeeds but chown fails? */ - sprintf(buf, "#CHGRP /%s /%s\nchgrp /%s /%s; echo '### 000'\n", + g_snprintf(buf, sizeof(buf), "#CHGRP /%s /%s\nchgrp /%s /%s; echo '### 000'\n", sgroup, rpath, sgroup, rpath); POSTFIX(OPT_FLUSH) @@ -660,21 +658,21 @@ static int fish_unlink (vfs *me, char *path) { PREFIX - sprintf(buf, "#DELE /%s\nrm -f /%s; echo '### 000'\n", rpath, rpath); + g_snprintf(buf, sizeof(buf), "#DELE /%s\nrm -f /%s; echo '### 000'\n", rpath, rpath); POSTFIX(OPT_FLUSH); } static int fish_mkdir (vfs *me, char *path, mode_t mode) { PREFIX - sprintf(buf, "#MKD /%s\nmkdir /%s; echo '### 000'\n", rpath, rpath); + g_snprintf(buf, sizeof(buf), "#MKD /%s\nmkdir /%s; echo '### 000'\n", rpath, rpath); POSTFIX(OPT_FLUSH); } static int fish_rmdir (vfs *me, char *path) { PREFIX - sprintf(buf, "#RMD /%s\nrmdir /%s; echo '### 000'\n", rpath, rpath); + g_snprintf(buf, sizeof(buf), "#RMD /%s\nrmdir /%s; echo '### 000'\n", rpath, rpath); POSTFIX(OPT_FLUSH); } @@ -732,7 +730,7 @@ close(handle); unlink(ino->localname); error_4: - free(ino->localname); + g_free(ino->localname); ino->localname = NULL; return -1; } diff -ruN old/mc-4.5.9/vfs/ftpfs.c new/mc-4.5.10/vfs/ftpfs.c --- old/mc-4.5.9/vfs/ftpfs.c Mon Jan 18 17:44:08 1999 +++ new/mc-4.5.10/vfs/ftpfs.c Sun Jan 31 18:55:18 1999 @@ -55,11 +55,9 @@ #if HAVE_SYS_SELECT_H # include #endif -#include "../src/fs.h" -#include "../src/mad.h" + #include "../src/setup.h" -#include "../src/tty.h" /* enable/disable interrupt key */ -#include "../src/main.h" + #include /* struct hostent */ #include /* AF_INET */ #include /* struct in_addr */ @@ -73,18 +71,15 @@ # include /* alex: this redefines struct timeval */ #endif /* SCO_FLAVOR */ #include -#undef MIN -#undef MAX -#include #ifdef USE_TERMNET #include #endif -#include "../src/mem.h" +#include "utilvfs.h" + #include "vfs.h" #include "tcputil.h" -#include "../src/util.h" #include "../src/dialog.h" #include "container.h" #include "ftpfs.h" @@ -111,6 +106,9 @@ */ int ftpfs_use_unix_list_options = 1; +/* First "CWD ", then "LIST -la ." */ +int ftpfs_first_cd_then_ls; + /* Use the ~/.netrc */ int use_netrc = 1; @@ -157,6 +155,56 @@ static char *get_path (struct connection **bucket, char *path); +/* char *translate_path (struct ftpfs_connection *bucket, char *remote_path) + Translate a Unix path, i.e. MC's internal path representation (e.g. + /somedir/somefile) to a path valid for the remote server. Every path + transfered to the remote server has to be mangled by this function + right prior to sending it. + Currently only Amiga ftp servers are handled in a special manner. + + When the remote server is an amiga: + a) strip leading slash if necesarry + b) replace first occurance of ":/" with ":" + c) strip trailing "/." + */ + +static char * +translate_path (struct connection *bucket, char *remote_path) +{ + char *p; + static char buf[255]; /* No one ever needs more ;-). + Actually I consider this static a bug + -- Norbert */ + + if (!bucket->remote_is_amiga || strlen (remote_path) >= sizeof (buf) - 1) + return remote_path; + else { + if (logfile) { + fprintf (logfile, "MC -- translate_path: %s\n", remote_path); + fflush (logfile); + } + + if (*remote_path == '/' && remote_path[1] == '\0') + return "."; /* Don't change "/" into "", e.g. "CWD " would be + invalid. */ + + /* strip leading slash */ + if (*remote_path == '/') + strcpy (buf, remote_path + 1); + else + strcpy (buf, remote_path); + + /* replace first occurance of ":/" with ":" */ + if ((p = strchr (buf, ':')) && *(p + 1) == '/') + strcpy (p + 1, p + 2); + + /* strip trailing "/." */ + if ((p = strrchr (buf, '/')) && *(p + 1) == '.' && *(p + 2) == '\0') + *p = '\0'; + return buf; + } +} + /* Extract the hostname and username from the path */ /* @@ -234,7 +282,7 @@ fmt_str = g_strdup_vprintf (fmt, ap); va_end (ap); - str = copy_strings (fmt_str, "\r\n", NULL); + str = g_strconcat (fmt_str, "\r\n", NULL); g_free (fmt_str); if (logfile){ @@ -251,7 +299,7 @@ got_sigpipe = 0; enable_interrupt_key (); status = write (sock, str, strlen (str)); - free (str); + g_free (str); if (status < 0){ code = 421; @@ -312,35 +360,36 @@ char *op; char *name; /* login user name */ int anon = 0; + char reply_string[255]; bucket->isbinary = TYPE_UNKNOWN; if (netrcpass) - op = strdup (netrcpass); + op = g_strdup (netrcpass); else { if (!strcmp (quser (bucket), "anonymous") || !strcmp (quser (bucket), "ftp")) { - op = strdup (ftpfs_anonymous_passwd); + op = g_strdup (ftpfs_anonymous_passwd); anon = 1; } else { char *p; if (!bucket->password){ - p = copy_strings (" FTP: Password required for ", quser (bucket), + p = g_strconcat (" FTP: Password required for ", quser (bucket), " ", NULL); op = vfs_get_password (p); - free (p); + g_free (p); if (op == NULL) ERRNOR (EPERM, 0); - bucket->password = strdup (op); + bucket->password = g_strdup (op); } else - op = strdup (bucket->password); + op = g_strdup (bucket->password); } } if (!anon || logfile) - pass = strdup (op); + pass = g_strdup (op); else - pass = copy_strings ("-", op, 0); + pass = g_strconcat ("-", op, NULL); wipe_password (op); @@ -352,29 +401,35 @@ p = my_get_host_and_username (ftpfs_proxy_host, &host, &proxyname, &port, &proxypass); if (p) - free (p); + g_free (p); - free (host); + g_free (host); if (proxypass) wipe_password (proxypass); - p = copy_strings (" Proxy: Password required for ", proxyname, " ", + p = g_strconcat (" Proxy: Password required for ", proxyname, " ", NULL); proxypass = vfs_get_password (p); - free (p); + g_free (p); if (proxypass == NULL) { wipe_password (pass); - free (proxyname); + g_free (proxyname); ERRNOR (EPERM, 0); } - name = strdup (quser (bucket)); + name = g_strdup (quser (bucket)); #else - name = copy_strings (quser (bucket), "@", - qhost (bucket)[0] == '!' ? qhost (bucket)+1 : qhost (bucket), 0); + name = g_strconcat (quser (bucket), "@", + qhost (bucket)[0] == '!' ? qhost (bucket)+1 : qhost (bucket), NULL); #endif } else - name = strdup (quser (bucket)); + name = g_strdup (quser (bucket)); - if (get_reply (qsock (bucket), NULL, 0) == COMPLETE) { + if (get_reply (qsock(bucket), reply_string, sizeof (reply_string) - 1) == COMPLETE) { + g_strup (reply_string); + bucket->remote_is_amiga = strstr (reply_string, "AMIGA") != 0; + if (logfile) { + fprintf (logfile, "MC -- remote_is_amiga = %d\n", bucket->remote_is_amiga); + fflush (logfile); + } #if defined(HSC_PROXY) if (qproxy (bucket)){ print_vfs_message ("ftpfs: sending proxy login name"); @@ -397,13 +452,13 @@ if (proxypass) wipe_password (proxypass); wipe_password (pass); - free (proxyname); - free (name); + g_free (proxyname); + g_free (name); ERRNOR (EPERM, 0); } if (proxypass) wipe_password (proxypass); - free (proxyname); + g_free (proxyname); } #endif print_vfs_message ("ftpfs: sending login name"); @@ -418,7 +473,7 @@ case COMPLETE: print_vfs_message ("ftpfs: logged in"); wipe_password (pass); - free (name); + g_free (name); return 1; default: @@ -434,7 +489,7 @@ print_vfs_message ("ftpfs: Login incorrect for user %s ", quser (bucket)); login_fail: wipe_password (pass); - free (name); + g_free (name); ERRNOR (EPERM, 0); } @@ -478,12 +533,11 @@ load_no_proxy_list () { /* FixMe: shouldn't be hardcoded!!! */ - char s[258]; /* provide for 256 characters and nl */ + char s[BUF_LARGE]; /* provide for BUF_LARGE characters */ struct no_proxy_entry *np, *current = 0; FILE *npf; int c; - char *p; - char *mc_file; + char *p, *mc_file; static int loaded; if (loaded) @@ -492,9 +546,9 @@ mc_file = concat_dir_and_file (mc_home, "mc.no_proxy"); if (exist_file (mc_file) && (npf = fopen (mc_file, "r"))) { - while (fgets (s, 258, npf) || !(feof (npf) || ferror (npf))) { + while (fgets (s, sizeof(s), npf) || !(feof (npf) || ferror (npf))) { if (!(p = strchr (s, '\n'))) { /* skip bogus entries */ - while ((c = getc (npf)) != EOF && c != '\n') + while ((c = fgetc (npf)) != EOF && c != '\n') ; continue; } @@ -503,11 +557,10 @@ continue; *p = '\0'; - p = xmalloc (strlen (s), "load_no_proxy_list:1"); - np = xmalloc (sizeof (*np), "load_no_proxy_list:2"); - strcpy (p, s); - np->domain = p; - np->next = 0; + + np = g_new (struct no_proxy_entry, 1); + np->domain = g_strdup (s); + np->next = NULL; if (no_proxy) current->next = np; else @@ -518,7 +571,7 @@ fclose (npf); loaded = 1; } - free (mc_file); + g_free (mc_file); } static int @@ -554,7 +607,7 @@ if (!ld) return 0; } else - if (!strcasecmp (host, domain)) + if (!g_strcasecmp (host, domain)) return 0; } @@ -573,11 +626,11 @@ #endif dir = vfs_split_url (proxy, host, &user, port, &pass, PORT, URL_DEFAULTANON); - free (user); + g_free (user); if (pass) wipe_password (pass); if (dir) - free (dir); + g_free (dir); } static int @@ -617,7 +670,7 @@ print_vfs_message ("ftpfs: Invalid host address."); my_errno = EINVAL; if (free_host) - free (host); + g_free (host); return -1; } server_address.sin_family = hp->h_addrtype; @@ -634,14 +687,14 @@ if ((my_socket = socket (AF_INET, SOCK_STREAM, 0)) < 0) { my_errno = errno; if (free_host) - free (host); + g_free (host); return -1; } setup_source_route (my_socket, server_address.sin_addr.s_addr); print_vfs_message ("ftpfs: making connection to %s", host); if (free_host) - free (host); + g_free (host); enable_interrupt_key (); /* clear the interrupt flag */ @@ -667,8 +720,7 @@ struct connection *bucket; int retry_seconds, count_down; - bucket = xmalloc(sizeof(struct connection), - "struct connection"); + bucket = g_new (struct connection, 1); if (bucket == NULL) ERRNOR (ENOMEM, NULL); @@ -680,8 +732,8 @@ watch_free_pointer = host; } #endif - qhost (bucket) = strdup (host); - quser (bucket) = strdup (user); + qhost (bucket) = g_strdup (host); + quser (bucket) = g_strdup (user); qcdir (bucket) = NULL; qport (bucket) = port; qlock (bucket) = 0; @@ -697,6 +749,7 @@ bucket->use_source_route = source_route; bucket->strict_rfc959_list_cmd = !ftpfs_use_unix_list_options; bucket->isbinary = TYPE_UNKNOWN; + bucket->remote_is_amiga = 0; /* We do not want to use the passive if we are using proxies */ if (bucket->use_proxy) @@ -704,9 +757,9 @@ if ((qdcache (bucket) = linklist_init ()) == NULL) { my_errno = ENOMEM; - free (qhost (bucket)); - free (quser (bucket)); - free (bucket); + g_free (qhost (bucket)); + g_free (quser (bucket)); + g_free (bucket); return NULL; } @@ -751,8 +804,8 @@ qhome (bucket) = ftpfs_get_current_directory (bucket); if (!qhome (bucket)) - qhome (bucket) = strdup ("/"); - qupdir (bucket) = strdup ("/"); /* FIXME: I changed behavior to ignore last_current_dir */ + qhome (bucket) = g_strdup (PATH_SEP_STR); + qupdir (bucket) = g_strdup (PATH_SEP_STR); /* FIXME: I changed behavior to ignore last_current_dir */ return bucket; } @@ -851,8 +904,18 @@ *bufq++ = '/'; *bufq = 0; } - return strdup (bufp); - } else ERRNOR (EIO, NULL); + if (*bufp == '/') + return g_strdup (bufp); + else { + /* If the remote server is an Amiga a leading slash + might be missing. MC needs it because it is used + as seperator between hostname and path internally. */ + return g_strconcat( "/", bufp, 0); + } + } else { + my_errno = EIO; + return NULL; + } } } } @@ -971,7 +1034,8 @@ return -1; } if (remote) - j = command (bucket, WAIT_REPLY, "%s %s", cmd, remote); + j = command (bucket, WAIT_REPLY, "%s %s", cmd, + translate_path (bucket, remote)); else j = command (bucket, WAIT_REPLY, "%s", cmd); if (j != PRELIM) @@ -1064,8 +1128,7 @@ } continue; } else { - fel->l_stat = xmalloc(sizeof(struct stat), - "resolve_symlink: struct stat"); + fel->l_stat = g_new (struct stat, 1); if ( S_ISLNK (fe->s.st_mode)) *fel->l_stat = *fe->l_stat; else @@ -1131,10 +1194,9 @@ } if (vfs_parse_ls_lga (buffer, &s, &filename, NULL)) { int r = strcmp(fe->name, filename); - free(filename); + g_free(filename); if (r == 0) { - fe->l_stat = xmalloc(sizeof(struct stat), - "resolve_symlink: struct stat"); + fe->l_stat = g_new (struct stat, 1); if (fe->l_stat == NULL) goto done; *fe->l_stat = s; @@ -1180,6 +1242,36 @@ return s_get_path (bucket, path, "/#ftp:"); } +/* Inserts an entry for "." into the linked list. Ignore any errors + because "." isn't important (as fas as you don't try to save a + file in the root dir of the ftp server). + Actually the dot is needed when stating the root directory, e.g. + mc_stat ("/ftp#localhost", &buf). Down the call tree _get_file_entry + gets called with filename = "/" which will be transformed into "." + before searching for a fileentry. Whithout "." in the linked list + this search fails. -- Norbert. */ +static void +insert_dot (struct linklist *file_list, struct connection *bucket) +{ + struct direntry *fe; + static char buffer[] = "drwxrwxrwx 1 0 0 1024 Jan 1 1970 ."; + + fe = malloc(sizeof(struct direntry)); + if (fe == NULL) + return; + if (vfs_parse_ls_lga (buffer, &fe->s, &fe->name, &fe->linkname)) { + fe->freshly_created = 0; + fe->count = 1; + fe->local_filename = fe->remote_filename = NULL; + fe->l_stat = NULL; + fe->bucket = bucket; + (fe->s).st_ino = bucket->__inode_counter++; + + if (!linklist_insert(file_list, fe)) + free(fe); + } else + free (fe); +} static struct dir * retrieve_dir(struct connection *bucket, char *remote_path, int resolve_symlinks) @@ -1193,6 +1285,7 @@ char buffer[8192]; struct dir *dcache; int got_intr = 0; + int dot_found = 0; int has_spaces = (strchr (remote_path, ' ') != NULL); canonicalize_pathname (remote_path); @@ -1213,7 +1306,7 @@ p->next->prev = p->prev; p->prev->next = p->next; dir_destructor(dcache); - free (p); + g_free (p); break; } } @@ -1224,18 +1317,21 @@ print_vfs_message("ftpfs: Reading FTP directory %s... (don't use UNIX ls options)", remote_path); else print_vfs_message("ftpfs: Reading FTP directory %s...", remote_path); - if (has_spaces || bucket->strict_rfc959_list_cmd) - if (ftpfs_chdir_internal (bucket, remote_path) != COMPLETE) { + if (has_spaces || bucket->strict_rfc959_list_cmd || ftpfs_first_cd_then_ls) { + char *p; + + p = translate_path (bucket, remote_path); + if (ftpfs_chdir_internal (bucket, p) != COMPLETE) { my_errno = ENOENT; print_vfs_message("ftpfs: CWD failed."); return NULL; } + } file_list = linklist_init(); if (file_list == NULL) ERRNOR (ENOMEM, NULL); - dcache = xmalloc(sizeof(struct dir), - "struct dir"); + dcache = g_new (struct dir, 1); if (dcache == NULL) { my_errno = ENOMEM; linklist_destroy(file_list, NULL); @@ -1245,18 +1341,23 @@ gettimeofday(&dcache->timestamp, NULL); dcache->timestamp.tv_sec += ftpfs_directory_timeout; dcache->file_list = file_list; - dcache->remote_path = strdup(remote_path); + dcache->remote_path = g_strdup(remote_path); dcache->count = 1; dcache->symlink_status = FTPFS_NO_SYMLINKS; if (bucket->strict_rfc959_list_cmd == 1) sock = open_data_connection (bucket, "LIST", 0, TYPE_ASCII, 0); - else if (has_spaces) + else if (has_spaces || ftpfs_first_cd_then_ls) sock = open_data_connection (bucket, "LIST -la", ".", TYPE_ASCII, 0); else { - char *path = copy_strings (remote_path, PATH_SEP_STR, ".", (char *) 0); - sock = open_data_connection (bucket, "LIST -la", path, TYPE_ASCII, 0); - free (path); + /* Trailing "/." is necessary if remote_path is a symlink + but don't generate "//." */ + char *path = g_strconcat (remote_path, + remote_path[1] == '\0' ? "" : PATH_SEP_STR, + ".", (char *) 0); + + sock = open_data_connection (bucket, "LIST -la", path, TYPE_ASCII, 0); + g_free (path); } if (sock == -1) @@ -1294,7 +1395,7 @@ } if (buffer [0] == 0 && eof) break; - fe = xmalloc(sizeof(struct direntry), "struct direntry"); + fe = g_new (struct direntry, 1); fe->freshly_created = 0; fe->local_filename = NULL; if (fe == NULL) { @@ -1302,6 +1403,8 @@ goto error_1; } if (vfs_parse_ls_lga (buffer, &fe->s, &fe->name, &fe->linkname)) { + if (strcmp (fe->name, ".") == 0) + dot_found = 1; fe->count = 1; fe->local_filename = fe->remote_filename = NULL; fe->l_stat = NULL; @@ -1311,13 +1414,13 @@ has_symlinks = 1; if (!linklist_insert(file_list, fe)) { - free(fe); + g_free(fe); my_errno = ENOMEM; goto error_1; } } else - free(fe); + g_free(fe); if (eof) break; } @@ -1335,8 +1438,13 @@ } close_this_sock(fp, sock); disable_interrupt_key(); - if ( (get_reply (qsock (bucket), NULL, 0) != COMPLETE) || (file_list->next == file_list)) + if ((get_reply (qsock (bucket), NULL, 0) != COMPLETE) || + (file_list->next == file_list)) goto fallback; + + if (!dot_found) + insert_dot (file_list, bucket); + if (!linklist_insert(qdcache(bucket), dcache)) { my_errno = ENOMEM; goto error_3; @@ -1357,8 +1465,8 @@ #endif get_reply(qsock(bucket), NULL, 0); error_3: - free(dcache->remote_path); - free(dcache); + g_free(dcache->remote_path); + g_free(dcache); linklist_destroy(file_list, direntry_destructor); print_vfs_message("ftpfs: failed"); return NULL; @@ -1368,14 +1476,14 @@ /* It's our first attempt to get a directory listing from this server (UNIX style LIST command) */ bucket->strict_rfc959_list_cmd = 1; - free(dcache->remote_path); - free(dcache); + g_free(dcache->remote_path); + g_free(dcache); linklist_destroy(file_list, direntry_destructor); return retrieve_dir (bucket, remote_path, resolve_symlinks); } my_errno = EACCES; - free(dcache->remote_path); - free(dcache); + g_free(dcache->remote_path); + g_free(dcache); linklist_destroy(file_list, direntry_destructor); print_vfs_message("ftpfs: failed; nowhere to fallback to"); return NULL; @@ -1533,15 +1641,16 @@ static int send_ftp_command(char *filename, char *cmd, int flags) { - char *remote_path; + char *remote_path, *p; struct connection *bucket; int r; int flush_directory_cache = (flags & OPT_FLUSH) && (normal_flush > 0); if (!(remote_path = get_path(&bucket, filename))) return -1; - r = command (bucket, WAIT_REPLY, cmd, remote_path); - free(remote_path); + p = translate_path (bucket, remote_path); + r = command (bucket, WAIT_REPLY, cmd, p); + g_free(remote_path); vfs_add_noncurrent_stamps (&vfs_ftpfs_ops, (vfsid) bucket, NULL); if (flags & OPT_IGNORE_ERROR) r = COMPLETE; @@ -1571,9 +1680,9 @@ gethostname(hostname, sizeof(hostname)); hp = gethostbyname(hostname); if (hp != NULL) - ftpfs_anonymous_passwd = copy_strings (p, "@", hp->h_name, NULL); + ftpfs_anonymous_passwd = g_strconcat (p, "@", hp->h_name, NULL); else - ftpfs_anonymous_passwd = copy_strings (p, "@", hostname, NULL); + ftpfs_anonymous_passwd = g_strconcat (p, "@", hostname, NULL); endpwent (); } @@ -1587,9 +1696,9 @@ static int ftpfs_chmod (vfs *me, char *path, int mode) { - char buf[40]; + char buf[BUF_SMALL]; - sprintf(buf, "SITE CHMOD %4.4o %%s", mode & 07777); + g_snprintf(buf, sizeof(buf), "SITE CHMOD %4.4o %%s", mode & 07777); return send_ftp_command(path, buf, OPT_IGNORE_ERROR | OPT_FLUSH); } @@ -1625,17 +1734,20 @@ ftpfs_chdir_internal (struct connection *bucket ,char *remote_path) { int r; + char *p; if (!bucket->cwd_defered && is_same_dir (remote_path, bucket)) return COMPLETE; - r = command (bucket, WAIT_REPLY, "CWD %s", remote_path); + p = translate_path (bucket, remote_path); + r = command (bucket, WAIT_REPLY, "CWD %s", p); + if (r != COMPLETE) { my_errno = EIO; } else { if (qcdir(bucket)) - free(qcdir(bucket)); - qcdir(bucket) = strdup (remote_path); + g_free(qcdir(bucket)); + qcdir(bucket) = g_strdup (remote_path); bucket->cwd_defered = 0; } return r; @@ -1678,15 +1790,15 @@ file += 6; if (!(rp = my_get_host_and_username (file, &host, &user, &port, &pass))) { - free (host); - free (user); + g_free (host); + g_free (user); if (pass) wipe_password (pass); return; } /* we do not care about the path actually */ - free (rp); + g_free (rp); for (l = connections_list->next; l != connections_list; l = l->next){ struct connection *bucket = l->data; @@ -1706,8 +1818,8 @@ break; } } - free (host); - free (user); + g_free (host); + g_free (user); if (pass) wipe_password (pass); } @@ -1770,7 +1882,7 @@ }; #ifdef USE_NETRC -static char buffer[100]; +static char buffer[BUF_MEDIUM]; static char *netrc, *netrcp; static int netrc_next (void) @@ -1830,17 +1942,15 @@ for (rupp = rup_cache; rupp != NULL; rupp = rupp->next) if (!strcmp (host, rupp->host)) { if (rupp->login != NULL) - *login = strdup (rupp->login); + *login = g_strdup (rupp->login); if (rupp->pass != NULL) - *pass = strdup (rupp->pass); + *pass = g_strdup (rupp->pass); return 0; } - netrcname = xmalloc (strlen (home_dir) + strlen ("/.netrc") + 1, "netrc"); - strcpy (netrcname, home_dir); - strcat (netrcname, "/.netrc"); + netrcname = concat_dir_and_file (home_dir, ".netrc"); netrcp = netrc = load_file (netrcname); if (netrc == NULL) { - free (netrcname); + g_free (netrcname); return 0; } if (gethostname (hostname, sizeof (hostname)) < 0) @@ -1852,10 +1962,10 @@ if (keyword == 2) { if (netrc_next () != 8) continue; - if (strcasecmp (host, buffer) && + if (g_strcasecmp (host, buffer) && ((tmp = strchr (host, '.')) == NULL || - strcasecmp (tmp, domain) || - strncasecmp (host, buffer, tmp - host) || + g_strcasecmp (tmp, domain) || + g_strncasecmp (host, buffer, tmp - host) || buffer [tmp - host])) continue; } else if (keyword != 1) @@ -1865,7 +1975,7 @@ case 3: if (netrc_next ()) if (*login == NULL) - *login = strdup (buffer); + *login = g_strdup (buffer); else if (strcmp (*login, buffer)) keyword = 20; break; @@ -1879,12 +1989,12 @@ "Remove password or correct mode.")); be_angry = 0; } - free (netrc); - free (netrcname); + g_free (netrc); + g_free (netrcname); return -1; } if (netrc_next () && *pass == NULL) - *pass = strdup (buffer); + *pass = g_strdup (buffer); break; case 6: if (stat (netrcname, &mystat) >= 0 && @@ -1894,8 +2004,8 @@ "Remove password or correct mode.")); be_angry = 0; } - free (netrc); - free (netrcname); + g_free (netrc); + g_free (netrcname); return -1; } netrc_next (); @@ -1919,35 +2029,20 @@ else break; } - rupp = (struct rupcache *) xmalloc (sizeof (struct rupcache), ""); - rupp->host = strdup (host); + rupp = g_new (struct rupcache, 1); + rupp->host = g_strdup (host); rupp->login = rupp->pass = 0; if (*login != NULL) - rupp->login = strdup (*login); + rupp->login = g_strdup (*login); if (*pass != NULL) - rupp->pass = strdup (*pass); + rupp->pass = g_strdup (*pass); rupp->next = rup_cache; rup_cache = rupp; - free (netrc); - free (netrcname); + g_free (netrc); + g_free (netrcname); return 0; } -#ifndef HAVE_STRNCASECMP -int strncasecmp (char *s, char *d, int l) -{ - int result; - - while (l--){ - if (result = (0x20 | *s) - (0x20 | *d)) - break; - if (!*s) - return 0; - s++; - d++; - } -} -#endif #endif /* USE_NETRC */ diff -ruN old/mc-4.5.9/vfs/ftpfs.h new/mc-4.5.10/vfs/ftpfs.h --- old/mc-4.5.9/vfs/ftpfs.h Mon Jan 18 17:44:08 1999 +++ new/mc-4.5.10/vfs/ftpfs.h Sun Jan 31 18:55:18 1999 @@ -55,6 +55,7 @@ int result_pending; int use_source_route; int use_passive_connection; + int remote_is_amiga; /* No leading slash allowed for AmiTCP (Amiga) */ int isbinary; int cwd_defered; /* current_directory was changed but CWD command hasn't been sent yet */ diff -ruN old/mc-4.5.9/vfs/local.c new/mc-4.5.10/vfs/local.c --- old/mc-4.5.9/vfs/local.c Mon Jan 18 17:44:08 1999 +++ new/mc-4.5.10/vfs/local.c Sun Jan 31 18:55:18 1999 @@ -1,15 +1,13 @@ #include #include #include -#include #include #include #include -#include "../src/mad.h" -#include "../src/fs.h" #include -#include "../src/util.h" + +#include "utilvfs.h" #include "vfs.h" #include "local.h" @@ -29,7 +27,7 @@ if (fd == -1) return 0; - local_info = (int *) xmalloc (sizeof (int), "Local fs"); + local_info = g_new (int, 1); *local_info = fd; return local_info; @@ -64,7 +62,7 @@ return -1; fd = *(int *) data; - free (data); + g_free (data); return close (fd); } @@ -84,7 +82,7 @@ if (!dir) return 0; - local_info = (DIR **) xmalloc (sizeof (DIR *), "Local fs"); + local_info = (DIR **) g_new (DIR *, 1); *local_info = dir; return local_info; @@ -115,7 +113,7 @@ i = closedir (* (DIR **) data); if (data) - free (data); + g_free (data); return i; } @@ -264,7 +262,7 @@ static char * local_getlocalcopy (vfs *me, char *path) { - return strdup (path); + return g_strdup (path); } static void diff -ruN old/mc-4.5.9/vfs/mcfs.c new/mc-4.5.10/vfs/mcfs.c --- old/mc-4.5.9/vfs/mcfs.c Mon Jan 18 17:44:08 1999 +++ new/mc-4.5.10/vfs/mcfs.c Sun Jan 31 18:55:18 1999 @@ -31,8 +31,6 @@ #include #include #include -#include "../src/fs.h" -#include "../src/mad.h" #include /* struct hostent */ #include /* AF_INET */ #include /* struct in_addr */ @@ -46,11 +44,11 @@ #include #endif -#include "../src/mem.h" +#include "utilvfs.h" + #include "vfs.h" #include "mcfs.h" #include "tcputil.h" -#include "../src/util.h" #include "../src/dialog.h" #define MCFS_MAX_CONNECTIONS 32 @@ -90,18 +88,18 @@ for (i = 0; i < MCFS_MAX_CONNECTIONS; i++){ if (mcfs_connections [i].host == 0) continue; - name = copy_strings ("/#mc:", mcfs_connections [i].user, - "@", mcfs_connections [i].host, 0); + name = g_strconcat ("/#mc:", mcfs_connections [i].user, + "@", mcfs_connections [i].host, NULL); (*func) (name); - free (name); + g_free (name); } } static void mcfs_free_bucket (int bucket) { - free (mcfs_connections [bucket].host); - free (mcfs_connections [bucket].user); - free (mcfs_connections [bucket].home); + g_free (mcfs_connections [bucket].host); + g_free (mcfs_connections [bucket].user); + g_free (mcfs_connections [bucket].home); /* Set all the fields to zero */ mcfs_connections [bucket].host = @@ -184,7 +182,7 @@ } } if (netrcpass != NULL) - pass = strdup (netrcpass); + pass = g_strdup (netrcpass); else pass = vfs_get_password (_(" MCFS Password required ")); if (!pass){ @@ -329,8 +327,8 @@ bucket = mcfs_get_free_bucket (); mcfs_open_connections++; - bucket->host = strdup (host); - bucket->user = strdup (user); + bucket->host = g_strdup (host); + bucket->user = g_strdup (user); bucket->home = 0; bucket->port = *port; bucket->sock = sock; @@ -374,11 +372,11 @@ port = 0; if ((remote_path = mcfs_get_host_and_username(path, &host, &user, &port, &pass))) if (!(*mc = mcfs_open_link (host, user, &port, pass))){ - free (remote_path); + g_free (remote_path); remote_path = NULL; } - free (host); - free (user); + g_free (host); + g_free (user); if (pass) wipe_password (pass); @@ -391,7 +389,7 @@ if (f || !strncmp( remote_path, "/~/", 3 )) { char *s; s = concat_dir_and_file( mcfs_gethome (*mc), remote_path +3-f ); - free (remote_path); + g_free (remote_path); remote_path = s; } } @@ -423,7 +421,7 @@ return -1; if ((r2 = mcfs_get_path (&mc, s2)) == 0){ - free (r1); + g_free (r1); return -1; } @@ -432,8 +430,8 @@ RPC_STRING, r1, RPC_STRING, r2, RPC_END); - free (r1); - free (r2); + g_free (r1); + g_free (r2); return mcfs_handle_simple_error (mc->sock, 0); } @@ -450,7 +448,7 @@ RPC_STRING, remote_file, RPC_END); - free (remote_file); + g_free (remote_file); return mcfs_handle_simple_error (mc->sock, 0); } @@ -467,7 +465,7 @@ RPC_STRING, remote_file, RPC_INT, data, RPC_END); - free (remote_file); + g_free (remote_file); return mcfs_handle_simple_error (mc->sock, 0); } @@ -486,7 +484,7 @@ RPC_INT, n2, RPC_END); - free (remote_file); + g_free (remote_file); return mcfs_handle_simple_error (mc->sock, 0); } @@ -495,13 +493,13 @@ char *buffer; if (mc->home) - return strdup (mc->home); + return g_strdup (mc->home); else { rpc_send (mc->sock, RPC_INT, MC_GETHOME, RPC_END); if (0 == rpc_get (mc->sock, RPC_STRING, &buffer, RPC_END)) - return strdup ("/"); + return g_strdup (PATH_SEP_STR); mc->home = buffer; - return strdup (buffer); + return g_strdup (buffer); } } @@ -518,7 +516,7 @@ rpc_send (mc->sock, RPC_INT, MC_OPEN, RPC_STRING, remote_file, RPC_INT, flags, RPC_INT, mode, RPC_END); - free (remote_file); + g_free (remote_file); if (0 == rpc_get (mc->sock, RPC_INT, &result, RPC_INT, &error_num, RPC_END)) return 0; @@ -526,7 +524,7 @@ if (is_error (result, error_num)) return 0; - remote_handle = (mcfs_handle *) xmalloc (2 * sizeof (mcfs_handle), "mcfs_handle"); + remote_handle = g_new (mcfs_handle, 2); remote_handle->handle = result; remote_handle->conn = mc; @@ -596,7 +594,7 @@ is_error (result, error); - free (data); + g_free (data); return result; } @@ -631,7 +629,7 @@ return 0; rpc_send (mc->sock, RPC_INT, MC_OPENDIR, RPC_STRING, remote_dir, RPC_END); - free (remote_dir); + g_free (remote_dir); if (0 == rpc_get (mc->sock, RPC_INT, &result, RPC_INT, &error_num, RPC_END)) return 0; @@ -641,7 +639,7 @@ handle = result; - mcfs_info = (opendir_info *) xmalloc (sizeof(opendir_info),"mcfs_opendir"); + mcfs_info = g_new (opendir_info, 1); mcfs_info->conn = mc; mcfs_info->handle = handle; mcfs_info->entries = 0; @@ -671,9 +669,8 @@ if (entry_len == 0) break; - new_entry = xmalloc (sizeof (dir_entry), "mcfs_loaddir"); - new_entry->text = xmalloc (entry_len + 1, "mcfs_loaddir"); - new_entry->text [entry_len] = 0; + new_entry = g_new (dir_entry, 1); + new_entry->text = g_new0 (char, entry_len + 1); new_entry->next = 0; if (first){ @@ -710,8 +707,8 @@ if (!de) return; mcfs_free_dir (de->next); - free (de->text); - free (de); + g_free (de->text); + g_free (de); } /* Explanation: @@ -770,10 +767,10 @@ for (p = mcfs_info->entries; p;){ q = p; p = p->next; - free (q->text); - free (q); + g_free (q->text); + g_free (q); } - free (info); + g_free (info); return 0; } @@ -804,7 +801,7 @@ RPC_STRING, &buf, RPC_END); sscanf (buf, "%lx", &tm); - free (buf); + g_free (buf); return (time_t) tm; } @@ -855,7 +852,7 @@ return -1; rpc_send (mc->sock, RPC_INT, cmd, RPC_STRING, remote_file, RPC_END); - free (remote_file); + g_free (remote_file); if (!rpc_get (mc->sock, RPC_INT, &status, RPC_INT, &error, RPC_END)) return the_error (-1, errno); @@ -931,15 +928,15 @@ status = 0; if (mc->version >= 2) { - char abuf[2*sizeof(long) + 1]; - char mbuf[2*sizeof(long) + 1]; + char abuf[BUF_SMALL]; + char mbuf[BUF_SMALL]; long atime, mtime; atime = (long) times->actime; mtime = (long) times->modtime; - sprintf (abuf, "%lx", atime); - sprintf (mbuf, "%lx", mtime); + g_snprintf (abuf, sizeof(abuf), "%lx", atime); + g_snprintf (mbuf, sizeof(mbuf), "%lx", mtime); rpc_send (mc->sock, RPC_INT, MC_UTIME, RPC_STRING, file, @@ -949,7 +946,7 @@ status = mcfs_handle_simple_error (mc->sock, 0); } - free (file); + g_free (file); return (status); } @@ -963,7 +960,7 @@ return -1; rpc_send (mc->sock, RPC_INT, MC_READLINK, RPC_STRING, remote_file, RPC_END); - free (remote_file); + g_free (remote_file); if (!rpc_get (mc->sock, RPC_INT, &status, RPC_INT, &error, RPC_END)) return the_error (-1, EIO); @@ -974,7 +971,7 @@ return the_error (-1, EIO); strncpy (buf, stat_str, size); - free (stat_str); + g_free (stat_str); return strlen (buf); } @@ -1003,7 +1000,7 @@ return -1; rpc_send (mc->sock, RPC_INT, MC_CHDIR, RPC_STRING, remote_dir, RPC_END); - free (remote_dir); + g_free (remote_dir); if (!rpc_get (mc->sock, RPC_INT, &status, RPC_INT, &error, RPC_END)) return the_error (-1, EIO); @@ -1086,8 +1083,8 @@ path += 2; if ((p = mcfs_get_host_and_username (path, &host, &user, &port, &pass)) == 0) { - free (host); - free (user); + g_free (host); + g_free (user); if (pass) wipe_password (pass); return; @@ -1104,9 +1101,9 @@ mcfs_connections [i].sock = mcfs_open_tcp_link (host, user, &port, pass, &vers); } } - free (p); - free (host); - free (user); + g_free (p); + g_free (host); + g_free (user); if (pass) wipe_password (pass); } diff -ruN old/mc-4.5.9/vfs/mcserv.c new/mc-4.5.10/vfs/mcserv.c --- old/mc-4.5.9/vfs/mcserv.c Mon Jan 18 17:44:08 1999 +++ new/mc-4.5.10/vfs/mcserv.c Sun Jan 31 18:55:18 1999 @@ -93,8 +93,9 @@ # endif #endif -#include "../src/fs.h" -#include "../src/mem.h" +#include "utilvfs.h" + +#include "vfs.h" #include "mcfs.h" #include "tcputil.h" @@ -178,7 +179,7 @@ handle = open (arg, flags, mode); send_status (handle, errno); - free (arg); + g_free (arg); } void do_read (void) @@ -187,7 +188,7 @@ void *data; rpc_get (msock, RPC_INT, &handle, RPC_INT, &count, RPC_END); - data = malloc (count); + data = g_malloc (count); if (!data){ send_status (-1, ENOMEM); return; @@ -202,7 +203,7 @@ send_status (n, 0); rpc_send (msock, RPC_BLOCK, n, data, RPC_END); - free (data); + g_free (data); } void do_write (void) @@ -286,9 +287,9 @@ RPC_END); } else { long ltime = (long) time; - char buf[2*sizeof(long) + 1]; + char buf[BUF_SMALL]; - sprintf (buf, "%lx", ltime); + g_snprintf (buf, sizeof(buf), "%lx", ltime); rpc_send (msock, RPC_STRING, buf, RPC_END); @@ -330,7 +331,7 @@ send_status (n, errno); if (n >= 0) send_stat_info (&st); - free (file); + g_free (file); } void do_fstat (void) @@ -360,7 +361,7 @@ send_status (n, errno); if (n >= 0) send_stat_info (&st); - free (file); + g_free (file); } /* }}} */ @@ -379,7 +380,7 @@ if (mcfs_DIR.dirs [handle]) closedir (mcfs_DIR.dirs [handle]); if (mcfs_DIR.names [handle]) - free (mcfs_DIR.names [handle]); + g_free (mcfs_DIR.names [handle]); mcfs_DIR.dirs [handle] = 0; mcfs_DIR.names [handle] = 0; } @@ -394,7 +395,7 @@ if (mcfs_DIR.used == OPENDIR_HANDLES){ send_status (-1, ENFILE); /* Error */ - free (arg); + g_free (arg); return; } @@ -408,7 +409,7 @@ if (handle == -1){ send_status (-1, EMFILE); - free (arg); + g_free (arg); if (!inetd_started) fprintf (stderr, "OOPS! you have found a bug in mc - do_opendir()!\n"); return; @@ -426,7 +427,7 @@ } else { send_status (-1, errno); - free (arg); + g_free (arg); } } @@ -435,7 +436,7 @@ { struct dirent *dirent; struct stat st; - int handle, n, dnamelen; + int handle, n; char *fname = 0; rpc_get (msock, RPC_INT, &handle, RPC_END); @@ -447,18 +448,17 @@ /* We incremented it in opendir */ handle --; - dnamelen = strlen (mcfs_DIR.names [handle]); while ((dirent = readdir (mcfs_DIR.dirs [handle]))){ int length = NLENGTH (dirent); rpc_send (msock, RPC_INT, length, RPC_END); rpc_send (msock, RPC_BLOCK, length, dirent->d_name, RPC_END); - fname = malloc (dnamelen + length + 2); - strcat (strcat (strcpy (fname, mcfs_DIR.names [handle]), "/"), dirent->d_name); + fname = g_strconcat (mcfs_DIR.names [handle], + PATH_SEP_STR, dirent->d_name, NULL); n = lstat (fname, &st); send_status (n, errno); - free (fname); + g_free (fname); if (n >= 0) send_stat_info (&st); } @@ -486,7 +486,7 @@ status = chdir (file); send_status (status, errno); - free (file); + g_free (file); } void do_rmdir (void) @@ -498,7 +498,7 @@ status = rmdir (file); send_status (status, errno); - free (file); + g_free (file); } void do_mkdir (void) @@ -510,7 +510,7 @@ status = mkdir (file, mode); send_status (status, errno); - free (file); + g_free (file); } void do_mknod (void) @@ -522,7 +522,7 @@ status = mknod (file, mode, dev); send_status (status, errno); - free (file); + g_free (file); } void do_readlink (void) @@ -538,7 +538,7 @@ buffer [n] = 0; rpc_send (msock, RPC_STRING, buffer, RPC_END); } - free (file); + g_free (file); } void do_unlink (void) @@ -549,7 +549,7 @@ rpc_get (msock, RPC_STRING, &file, RPC_END); status = unlink (file); send_status (status, errno); - free (file); + g_free (file); } void do_rename (void) @@ -560,7 +560,7 @@ rpc_get (msock, RPC_STRING, &f1, RPC_STRING, &f2, RPC_END); status = rename (f1, f2); send_status (status, errno); - free (f1); free (f2); + g_free (f1); g_free (f2); } void do_symlink (void) @@ -571,7 +571,7 @@ rpc_get (msock, RPC_STRING, &f1, RPC_STRING, &f2, RPC_END); status = symlink (f1, f2); send_status (status, errno); - free (f1); free (f2); + g_free (f1); g_free (f2); } void do_link (void) @@ -581,8 +581,8 @@ rpc_get (msock, RPC_STRING, &f1, RPC_STRING, &f2, RPC_END); status = link (f1, f2); - send_status (link (f1, f2), errno); - free (f1); free (f2); + send_status (status, errno); + g_free (f1); g_free (f2); } @@ -608,7 +608,7 @@ rpc_get (msock, RPC_STRING, &file, RPC_INT, &mode, RPC_END); status = chmod (file, mode); send_status (status, errno); - free (file); + g_free (file); } void do_chown (void) @@ -619,7 +619,7 @@ rpc_get (msock, RPC_STRING, &file,RPC_INT, &owner, RPC_INT,&group,RPC_END); status = chown (file, owner, group); send_status (status, errno); - free (file); + g_free (file); } void do_utime (void) @@ -640,13 +640,13 @@ sscanf (ms, "%lx", &mtime); if (verbose) printf ("Got a = %s, m = %s, comp a = %ld, m = %ld\n", as, ms, atime, mtime); - free (as); - free (ms); + g_free (as); + g_free (ms); times.actime = (time_t) atime; times.modtime = (time_t) mtime; status = utime (file, ×); send_status (status, errno); - free (file); + g_free (file); } void do_quit () @@ -669,7 +669,7 @@ struct user_pass *up = appdata_ptr; int status; - r = (struct pam_response *) malloc (sizeof (struct pam_response) * messages); + r = g_new (struct pam_response, messages); if (!r) return PAM_CONV_ERR; *resp = r; @@ -678,12 +678,12 @@ switch ((*msg)->msg_style){ case PAM_PROMPT_ECHO_ON: - r->resp = strdup (up->username); + r->resp = g_strdup (up->username); r->resp_retcode = PAM_SUCCESS; break; case PAM_PROMPT_ECHO_OFF: - r->resp = strdup (up->password); + r->resp = g_strdup (up->password); r->resp_retcode = PAM_SUCCESS; break; @@ -891,9 +891,9 @@ return 0; if (this->pw_dir [strlen (this->pw_dir) - 1] == '/') - home_dir = strdup (this->pw_dir); + home_dir = g_strdup (this->pw_dir); else { - home_dir = malloc (strlen (this->pw_dir) + 2); + home_dir = g_malloc (strlen (this->pw_dir) + 2); if (home_dir) { strcpy (home_dir, this->pw_dir); strcat (home_dir, "/"); @@ -912,12 +912,13 @@ #endif #endif -#ifndef BSD +#if defined (HAVE_SETUID) if (setuid (this->pw_uid)) -#else + return 0; +#elif defined (HAVE_SETREUID) if (setreuid (this->pw_uid, this->pw_uid)) -#endif return 0; +#endif /* If the setuid call failed, then deny access */ /* This should fix the problem on those machines with strange setups */ @@ -1284,30 +1285,39 @@ return "none"; } -#ifndef HAVE_MAD -void *do_xmalloc (int size) +void vfs_die( char *m ) { - void *m = malloc (size); - - if (!m){ - fprintf (stderr, "memory exhausted\n"); + fprintf (stderr, m); exit (1); } - return m; -} -#endif - -#ifndef HAVE_STRDUP -char *strdup (char *s) +#ifdef HAVE_MAD +char * mad_strconcat (const char *first, ...) { - char *t = malloc (strlen (s)+1); - strcpy (t, s); - return t; -} -#endif + va_list ap; + long len; + char *data, *result; -void vfs_die( char *m ) -{ - fprintf (stderr,m); - exit (1); + if (!first) + return 0; + + len = strlen (first) + 1; + va_start (ap, first); + + while ((data = va_arg (ap, char *)) != 0) + len += strlen (data); + + result = g_malloc (len); + + va_end (ap); + + va_start (ap, first); + strcpy (result, first); + + while ((data = va_arg (ap, char *)) != 0) + strcat (result, data); + + va_end (ap); + + return result; } +#endif /* HAVE_MAD */ diff -ruN old/mc-4.5.9/vfs/sfs.c new/mc-4.5.10/vfs/sfs.c --- old/mc-4.5.9/vfs/sfs.c Mon Jan 18 17:44:08 1999 +++ new/mc-4.5.10/vfs/sfs.c Sun Jan 31 18:55:18 1999 @@ -15,16 +15,12 @@ #include #include #include -#include #include #include #include -#include "../src/mad.h" -#include "../src/fs.h" - #include -#include "../src/util.h" -#include "../src/main.h" + +#include "utilvfs.h" #include "vfs.h" #include "local.h" @@ -72,7 +68,7 @@ if (!(sfs_flags[w] & F_NOLOCALCOPY)) name = mc_getlocalcopy (name); else - name = strdup (name); + name = g_strdup (name); s = sfs_command[w]; #define COPY_CHAR if (t-pad>10200) return -1; else *t++ = *s; #define COPY_STRING(a) if ((t-pad)+strlen(a)>10200) return -1; else { strcpy (t, a); t+= strlen(a); } @@ -93,7 +89,7 @@ } s++; } - free (name); + g_free (name); if (my_system (EXECUTE_AS_SHELL | EXECUTE_SETUID | EXECUTE_WAIT, "/bin/sh", pad)) { return -1; @@ -129,9 +125,9 @@ close (handle); - xname = strdup (name); + xname = g_strdup (name); if (!vfmake (me, name, cache)){ - cur = xmalloc (sizeof(struct cachedfile), "SFS cache"); + cur = g_new (struct cachedfile, 1); cur->name = xname; cur->cache = cache; cur->uid = uid; @@ -143,7 +139,7 @@ return cache; } else { - free(xname); + g_free(xname); } return "/I_MUST_NOT_EXIST"; } @@ -159,7 +155,7 @@ if (fd == -1) return 0; - sfs_info = (int *) xmalloc (sizeof (int), "SF fs"); + sfs_info = g_new (int, 1); *sfs_info = fd; return sfs_info; @@ -224,14 +220,14 @@ *parent = NULL; { - char *path2 = strdup (path); + char *path2 = g_strdup (path); v = vfs_split (path2, NULL, NULL); id = (*v->getid) (v, path2, &par); - free (path2); + g_free (path2); } if (id != (vfsid)-1) { - *parent = xmalloc (sizeof (struct vfs_stamping), "vfs stamping"); + *parent = g_new (struct vfs_stamping, 1); (*parent)->v = v; (*parent)->id = id; (*parent)->parent = par; @@ -277,7 +273,7 @@ static char *sfs_getlocalcopy (vfs *me, char *path) { path = redirect (me, path); - return strdup (path); + return g_strdup (path); } static void sfs_ungetlocalcopy (vfs *me, char *path, char *local, int has_changed) @@ -336,8 +332,8 @@ if ((semi = strchr (c, '\n'))) *semi = 0; - sfs_prefix [sfs_no] = strdup (key); - sfs_command [sfs_no] = strdup (c); + sfs_prefix [sfs_no] = g_strdup (key); + sfs_command [sfs_no] = g_strdup (c); sfs_flags [sfs_no] = flags; sfs_no++; } @@ -351,8 +347,8 @@ int i; for (i = 0; i < sfs_no; i++){ - free (sfs_prefix [i]); - free (sfs_command [i]); + g_free (sfs_prefix [i]); + g_free (sfs_command [i]); sfs_prefix [i] = sfs_command [i] = NULL; } sfs_no = 0; diff -ruN old/mc-4.5.9/vfs/shared_ftp_fish.c new/mc-4.5.10/vfs/shared_ftp_fish.c --- old/mc-4.5.9/vfs/shared_ftp_fish.c Mon Jan 18 17:44:08 1999 +++ new/mc-4.5.10/vfs/shared_ftp_fish.c Sun Jan 31 18:55:18 1999 @@ -79,9 +79,9 @@ if (fe->count > 0) return; - free(fe->name); + g_free(fe->name); if (fe->linkname) - free(fe->linkname); + g_free(fe->linkname); if (fe->local_filename) { if (fe->local_is_temp) { if (!fe->local_stat.st_mtime) @@ -94,14 +94,14 @@ unlink (fe->local_filename); /* Delete only if it hasn't changed */ } } - free(fe->local_filename); + g_free(fe->local_filename); fe->local_filename = NULL; } if (fe->remote_filename) - free(fe->remote_filename); + g_free(fe->remote_filename); if (fe->l_stat) - free(fe->l_stat); - free(fe); + g_free(fe->l_stat); + g_free(fe); } static void @@ -112,9 +112,9 @@ fd->count--; if (fd->count > 0) return; - free(fd->remote_path); + g_free(fd->remote_path); linklist_destroy(fd->file_list, direntry_destructor); - free(fd); + g_free(fd); } static int @@ -147,18 +147,18 @@ { struct connection *bucket = data; - free(qhost(bucket)); - free(quser(bucket)); + g_free(qhost(bucket)); + g_free(quser(bucket)); if (qcdir(bucket)) - free(qcdir(bucket)); + g_free(qcdir(bucket)); if (qhome(bucket)) - free(qhome(bucket)); + g_free(qhome(bucket)); if (qupdir(bucket)) - free(qupdir(bucket)); + g_free(qupdir(bucket)); if (bucket->password) wipe_password (bucket->password); linklist_destroy(qdcache(bucket), dir_destructor); - free(bucket); + g_free(bucket); } @@ -187,11 +187,11 @@ do { if ((bucket = lptr->data) != 0){ - path_name = copy_strings ( X_myname, quser (bucket), + path_name = g_strconcat ( X_myname, quser (bucket), "@", qhost (bucket), - qcdir(bucket), 0); + qcdir(bucket), NULL); (*func)(path_name); - free (path_name); + g_free (path_name); } lptr = lptr->next; } while (lptr != connections_list); @@ -222,12 +222,14 @@ my_errno = ENOENT; else { if ((*bucket = open_link (host, user, port, pass)) == NULL) { - free (remote_path); + g_free (remote_path); remote_path = NULL; } } - free (host); - free (user); + if (host) + g_free (host); + if (user) + g_free (user); if (pass) wipe_password (pass); @@ -245,7 +247,7 @@ if (f || !strncmp( remote_path, "/~/", 3 )) { char *s; s = concat_dir_and_file( qhome (*bucket), remote_path +3-f ); - free (remote_path); + g_free (remote_path); remote_path = s; } } @@ -310,7 +312,7 @@ if (!S_ISREG(fmode)) ERRNOR (EPERM, NULL); if ((flags & O_EXCL) && (flags & O_CREAT)) ERRNOR (EEXIST, NULL); if (ent->remote_filename == NULL) - if (!(ent->remote_filename = strdup(file_name))) ERRNOR (ENOMEM, NULL); + if (!(ent->remote_filename = g_strdup(file_name))) ERRNOR (ENOMEM, NULL); if (ent->local_filename == NULL || !ent->local_stat.st_mtime || stat (ent->local_filename, &sb) < 0 || @@ -318,7 +320,7 @@ int handle; if (ent->local_filename){ - free (ent->local_filename); + g_free (ent->local_filename); ent->local_filename = NULL; } if (flags & O_TRUNC) { @@ -351,15 +353,15 @@ if ((op & DO_OPEN) && (flags & O_CREAT)) { int handle; - ent = xmalloc(sizeof(struct direntry), "struct direntry"); + ent = g_new (struct direntry, 1); ent->freshly_created = 0; if (ent == NULL) ERRNOR (ENOMEM, NULL); ent->count = 1; ent->linkname = NULL; ent->l_stat = NULL; ent->bucket = bucket; - ent->name = strdup(p); - ent->remote_filename = strdup(file_name); + ent->name = g_strdup(p); + ent->remote_filename = g_strdup(file_name); ent->local_filename = tempnam (NULL, X "fs"); if (!ent->name && !ent->remote_filename && !ent->local_filename) { direntry_destructor(ent); @@ -422,7 +424,7 @@ if (strcmp (p, ent->name) == 0) { if (ent->local_filename) { unlink (ent->local_filename); - free (ent->local_filename); + g_free (ent->local_filename); ent->local_filename = NULL; return 0; } @@ -442,7 +444,7 @@ return NULL; fe = _get_file_entry(bucket, remote_path, op, flags); - free(remote_path); + g_free(remote_path); #if 0 if (op & DO_FREE_RESOURCE) vfs_add_noncurrent_stamps (&vfs_X_ops, (vfsid) bucket, NULL); @@ -477,18 +479,18 @@ struct filp *fp; struct direntry *fe; - fp = xmalloc(sizeof(struct filp), "struct filp"); + fp = g_new (struct filp, 1); if (fp == NULL) ERRNOR (ENOMEM, NULL); fe = get_file_entry(file, DO_OPEN | DO_RESOLVE_SYMLINK, flags); if (!fe) { - free(fp); + g_free(fp); return NULL; } fe->linear_state = IS_LINEAR(flags); if (!fe->linear_state) { fp->local_handle = open(fe->local_filename, flags, mode); if (fp->local_handle < 0) { - free(fp); + g_free(fp); ERRNOR (errno, NULL); } } else fp->local_handle = -1; @@ -558,7 +560,7 @@ close(fp->local_handle); qlock(fp->fe->bucket)--; direntry_destructor(fp->fe); - free(fp); + g_free(fp); return result; } @@ -592,7 +594,7 @@ if (!(remote_path = get_path (&bucket, dirname))) return NULL; - dirp = xmalloc(sizeof(struct my_dirent), "struct my_dirent"); + dirp = g_new (struct my_dirent, 1); if (dirp == NULL) { my_errno = ENOMEM; goto error_return; @@ -601,13 +603,13 @@ if (dirp->dcache == NULL) goto error_return; dirp->pos = dirp->dcache->file_list->next; - free(remote_path); + g_free(remote_path); dirp->dcache->count++; return (void *)dirp; error_return: vfs_add_noncurrent_stamps (&vfs_X_ops, (vfsid) bucket, NULL); - free(remote_path); - free(dirp); + g_free(remote_path); + g_free(dirp); return NULL; } @@ -657,7 +659,7 @@ { struct my_dirent *dirp = info; dir_destructor(dirp->dcache); - free(dirp); + g_free(dirp); return 0; } @@ -723,7 +725,7 @@ if (!(remote_path = get_path(&bucket, path))) return -1; if (qcdir(bucket)) - free(qcdir(bucket)); + g_free(qcdir(bucket)); qcdir(bucket) = remote_path; bucket->cwd_defered = 1; @@ -758,7 +760,7 @@ if (!(remote_path = get_path (&bucket, p))) return (vfsid) -1; else { - free(remote_path); + g_free(remote_path); return (vfsid) bucket; } } @@ -787,7 +789,7 @@ s_close ((void *) fp); return NULL; } - p = strdup (fp->fe->local_filename); + p = g_strdup (fp->fe->local_filename); qlock(fp->fe->bucket)++; fp->fe->count++; s_close ((void *) fp); @@ -885,7 +887,7 @@ close(local_handle); unlink(fe->local_filename); error_4: - free(fe->local_filename); + g_free(fe->local_filename); fe->local_filename = NULL; return 0; } diff -ruN old/mc-4.5.9/vfs/shared_tar_ext.c new/mc-4.5.10/vfs/shared_tar_ext.c --- old/mc-4.5.9/vfs/shared_tar_ext.c Mon Jan 18 17:44:08 1999 +++ new/mc-4.5.10/vfs/shared_tar_ext.c Sun Jan 31 18:55:18 1999 @@ -12,12 +12,12 @@ static char *get_path (char *inname, struct archive **archive, int is_dir, int do_not_open) { - char *buf = strdup( inname ); + char *buf = g_strdup (inname); char *res = get_path_mangle( buf, archive, is_dir, do_not_open ); char *res2 = NULL; if (res) - res2 = strdup(res); - free(buf); + res2 = g_strdup(res); + g_free(buf); return res2; } @@ -133,7 +133,7 @@ return NULL; if (!S_ISDIR (entry->inode->mode)) ERRNOR (ENOTDIR, NULL); - info = (struct entry **) xmalloc (2*sizeof (struct entry *), "shared opendir"); + info = g_new (struct entry *, 2); info[0] = entry->inode->first_in_subdir; info[1] = entry->inode->first_in_subdir; @@ -190,7 +190,7 @@ static int s_closedir (void *data) { - free (data); + g_free (data); return 0; } diff -ruN old/mc-4.5.9/vfs/tar.c new/mc-4.5.10/vfs/tar.c --- old/mc-4.5.9/vfs/tar.c Mon Jan 18 17:44:08 1999 +++ new/mc-4.5.10/vfs/tar.c Sun Jan 31 18:55:18 1999 @@ -26,8 +26,9 @@ #include /* alex: for struct timeb definition */ #endif /* SCO_FLAVOR */ #include -#include "../src/fs.h" -#include "../src/util.h" + +#include "utilvfs.h" + #include "../src/dialog.h" /* For MSG_ERROR */ #include "tar.h" #include "names.h" @@ -84,7 +85,7 @@ ERRNOR (ENOENT, -1); } - archive->name = strdup (name); + archive->name = g_strdup (name); mc_stat (name, &(archive->u.tar.tarstat)); archive->u.tar.fd = -1; @@ -94,11 +95,11 @@ if (size > 0) { char *s; mc_close( result ); - s = copy_strings( archive->name, decompress_extension (type), NULL ); + s = g_strconcat ( archive->name, decompress_extension (type), NULL ); result = mc_open (s, O_RDONLY); if (result == -1) message_2s (1, MSG_ERROR, _("Couldn't open tar archive\n%s"), s); - free(s); + g_free(s); if (result == -1) ERRNOR (ENOENT, -1); } @@ -272,8 +273,8 @@ : &next_long_link); if (*longp) - free (*longp); - bp = *longp = (char *) xmalloc (hstat.st_size, "Tar: Long name"); + g_free (*longp); + bp = *longp = g_malloc (hstat.st_size); for (size = hstat.st_size; size > 0; @@ -306,7 +307,7 @@ current_file_name = (next_long_name ? next_long_name - : strdup (header->header.arch_name)); + : g_strdup (header->header.arch_name)); len = strlen (current_file_name); if (current_file_name[len - 1] == '/') { current_file_name[len - 1] = 0; @@ -315,7 +316,7 @@ current_link_name = (next_long_link ? next_long_link - : strdup (header->header.arch_linkname)); + : g_strdup (header->header.arch_linkname)); len = strlen (current_link_name); if (len && current_link_name [len - 1] == '/') current_link_name[len - 1] = 0; @@ -347,7 +348,7 @@ inode = parent; entry = vfs_s_new_entry(me, p, inode); vfs_s_insert_entry(me, parent, entry); - free (current_link_name); + g_free (current_link_name); goto done; } } @@ -361,7 +362,7 @@ entry = vfs_s_new_entry (me, p, inode); vfs_s_insert_entry (me, parent, entry); - free (current_file_name); + g_free (current_file_name); done: if (header->header.isextended) { @@ -473,7 +474,7 @@ if (mc_lseek (fd, begin + FH->pos, SEEK_SET) != begin + FH->pos) ERRNOR (EIO, -1); - count = VFS_MIN(count, FH->ino->st.st_size - FH->pos); + count = MIN(count, FH->ino->st.st_size - FH->pos); if ((count = mc_read (fd, buffer, count)) == -1) ERRNOR (errno, -1); diff -ruN old/mc-4.5.9/vfs/tcputil.c new/mc-4.5.10/vfs/tcputil.c --- old/mc-4.5.9/vfs/tcputil.c Mon Jan 18 17:44:08 1999 +++ new/mc-4.5.10/vfs/tcputil.c Sun Jan 31 18:55:18 1999 @@ -29,7 +29,6 @@ #include #include #include -#include #ifdef HAVE_PMAP_SET #include @@ -46,9 +45,9 @@ #include #include "tcputil.h" #include "../src/dialog.h" /* for message () */ -#include "../src/mem.h" /* for bcopy */ -#include "../src/util.h" /* for unix_error_string */ -#include "../src/mad.h" + +#include "utilvfs.h" + #include "mcfs.h" /* for mcserver_port definition */ #define CHECK_SIG_PIPE(sock) if (got_sigpipe) \ @@ -165,7 +164,7 @@ } else { prev->link = callback->link; } - free (callback); + g_free (callback); return; } } @@ -208,12 +207,12 @@ } if (len > 128*1024) abort (); - text = malloc (len+1); + text = g_new0 (char, len+1); if (socket_read_block (sock, text, len) == 0) return 0; str_dest = va_arg (ap, char **); *str_dest = text; - text [len] = 0; + text [len] = NULL; break; case RPC_BLOCK: @@ -233,14 +232,15 @@ { sock_callback_t *new; - new = malloc (sizeof (sock_callback_t)); + new = g_new (sock_callback_t, 1); new->cback = cback; new->sock = sock; new->link = sock_callbacks; sock_callbacks = new; } -#if defined(IS_AIX) || defined(linux) || defined(SCO_FLAVOR) || defined(__QNX__) +#if defined(IS_AIX) || defined(linux) || defined(SCO_FLAVOR) \ + || defined(__QNX__) || defined(__FreeBSD__) || defined(__bsdi__) static void sig_pipe (int unused) #else static void sig_pipe (void) diff -ruN old/mc-4.5.9/vfs/undelfs.c new/mc-4.5.10/vfs/undelfs.c --- old/mc-4.5.9/vfs/undelfs.c Mon Jan 18 17:44:08 1999 +++ new/mc-4.5.10/vfs/undelfs.c Sun Jan 31 18:55:18 1999 @@ -34,15 +34,8 @@ #include #include -#include "../src/fs.h" -#include "../src/mad.h" -#include "../src/util.h" - -#include "../src/mem.h" -#include "vfs.h" #include -#include #include #include /* asm/types.h defines its own umode_t :-( */ @@ -51,6 +44,10 @@ #include #include +#include "utilvfs.h" + +#include "vfs.h" + void print_vfs_message(char *, ...); struct deleted_info { @@ -92,13 +89,13 @@ ext2fs_close (fs); fs = 0; if (ext2_fname) - free (ext2_fname); + g_free (ext2_fname); ext2_fname = 0; if (delarray) - free (delarray); + g_free (delarray); delarray = 0; if (block_buf) - free (block_buf); + g_free (block_buf); block_buf = 0; } @@ -134,16 +131,16 @@ while (p > dirname){ if (*p == '/'){ - *file = strdup (p+1); + *file = g_strdup (p+1); *p = 0; - *ext2_fname = copy_strings ("/dev/", dirname, NULL); + *ext2_fname = g_strconcat ("/dev/", dirname, NULL); *p = '/'; return; } p--; } - *file = strdup (""); - *ext2_fname = copy_strings ("/dev/", dirname, NULL); + *file = g_strdup (""); + *ext2_fname = g_strconcat ("/dev/", dirname, NULL); return; } @@ -179,12 +176,12 @@ max_delarray = 100; num_delarray = 0; - delarray = malloc(max_delarray * sizeof(struct deleted_info)); + delarray = g_new (struct deleted_info, max_delarray); if (!delarray) { message_1s (1, undelfserr, " not enough memory "); return 0; } - block_buf = malloc(fs->blocksize * 3); + block_buf = g_malloc (fs->blocksize * 3); if (!block_buf) { message_1s (1, undelfserr, " while allocating block buffer "); goto free_delarray; @@ -222,8 +219,7 @@ if (lsd.free_blocks && !lsd.bad_blocks) { if (num_delarray >= max_delarray) { max_delarray += 50; - delarray = realloc(delarray, - max_delarray * sizeof(struct deleted_info)); + delarray = g_renew (struct deleted_info, delarray, max_delarray); if (!delarray) { message_1s (1, undelfserr, " no more memory while reallocating array "); goto error_out; @@ -255,10 +251,10 @@ error_out: ext2fs_close_inode_scan (scan); free_block_buf: - free (block_buf); + g_free (block_buf); block_buf = 0; free_delarray: - free (delarray); + g_free (delarray); delarray = 0; return 0; } @@ -267,10 +263,9 @@ { char *cptr; - cptr = xmalloc (strlen (s2) + strlen (str) + 60, "com_err"); - sprintf (cptr, " %s (%s: %ld) ", s2, str, err_code); + cptr = g_strdup_printf (" %s (%s: %ld) ", s2, str, err_code); message_1s (1, " Ext2lib error ", cptr); - free (cptr); + g_free (cptr); } static void * @@ -283,7 +278,7 @@ return 0; /* We don't use the file name */ - free (f); + g_free (f); if (!ext2_fname || strcmp (ext2_fname, file)){ undelfs_shutdown (); @@ -291,7 +286,7 @@ } else { /* To avoid expensive re-scannings */ readdir_ptr = READDIR_PTR_INIT; - free (file); + g_free (file); return fs; } @@ -347,11 +342,11 @@ } if (readdir_ptr == num_delarray) return NULL; - dirent_dest = &(undelfs_readdir_data.dent.d_name [0]); + dirent_dest = (char *) &(undelfs_readdir_data.dent.d_name [0]); if (readdir_ptr < 0) - sprintf (dirent_dest, "%s", readdir_ptr == -2 ? "." : ".."); + g_snprintf(dirent_dest, MC_MAXPATHLEN, "%s", readdir_ptr == -2 ? "." : ".."); else - sprintf (dirent_dest, "%ld:%d", + g_snprintf(dirent_dest, MC_MAXPATHLEN, "%ld:%d", (long)delarray [readdir_ptr].ino, delarray [readdir_ptr].num_blocks); readdir_ptr++; @@ -399,8 +394,8 @@ if (!ext2_fname || strcmp (ext2_fname, file)){ message_1s (1, undelfserr, " You have to chdir to extract files first "); - free (file); - free (f); + g_free (file); + g_free (f); return 0; } inode = atol (f); @@ -411,17 +406,17 @@ continue; /* Found: setup all the structures needed by read */ - p = (void *) malloc (sizeof (undelfs_file)); + p = g_new (undelfs_file, 1); if (!p){ - free (file); - free (f); + g_free (file); + g_free (f); return 0; } - p->buf = malloc(fs->blocksize); + p->buf = g_malloc (fs->blocksize); if (!p->buf){ - free (p); - free (file); - free (f); + g_free (p); + g_free (file); + g_free (f); return 0; } p->inode = inode; @@ -431,8 +426,8 @@ p->pos = 0; p->size = delarray [i].size; } - free (file); - free (f); + g_free (file); + g_free (f); undelfs_usage++; return p; } @@ -441,8 +436,8 @@ undelfs_close (void *vfs_info) { undelfs_file *p = vfs_info; - free (p->buf); - free (p); + g_free (p->buf); + g_free (p); undelfs_usage--; return 0; } @@ -576,20 +571,20 @@ f = "sda1" f ="401:1" If the first char in f is no digit -> return error */ if (!isdigit (*f)) { - free (file); - free (f); + g_free (file); + g_free (f); return -1; } if (!ext2_fname || strcmp (ext2_fname, file)){ message_1s (1, undelfserr, " You have to chdir to extract files first "); - free (file); - free (f); + g_free (file); + g_free (f); return 0; } inode_index = undelfs_getindex (f); - free (file); - free (f); + g_free (file); + g_free (f); if (inode_index == -1) return -1; @@ -627,13 +622,13 @@ /* our vfs, but that is left as an excercise for the reader */ if ((fd = open (file, O_RDONLY)) == -1){ message_2s (1, undelfserr, " Could not open file: %s ", file); - free (f); - free (file); + g_free (f); + g_free (file); return -1; } close (fd); - free (f); - free (file); + g_free (f); + g_free (file); return 0; } @@ -655,8 +650,8 @@ if (!ext2_fname) return (vfsid) -1; - free (ext2_fname); - free (file); + g_free (ext2_fname); + g_free (file); return (vfsid)0; } diff -ruN old/mc-4.5.9/vfs/utilvfs.c new/mc-4.5.10/vfs/utilvfs.c --- old/mc-4.5.9/vfs/utilvfs.c Mon Jan 18 17:44:08 1999 +++ new/mc-4.5.10/vfs/utilvfs.c Sun Jan 31 18:55:18 1999 @@ -35,12 +35,13 @@ #include #include #include -#include #ifdef USE_TERMNET #include #endif - #include + +#include "utilvfs.h" + #include "vfs.h" /* Extract the hostname and username from the path */ @@ -65,7 +66,7 @@ struct passwd *passwd_info; char *dir, *colon, *inner_colon, *at, *rest; char *retval; - char *pcopy = strdup (path); + char *pcopy = g_strdup (path); char *pend = pcopy + strlen (pcopy); int default_is_anon = flags & URL_DEFAULTANON; @@ -77,13 +78,13 @@ dir = pcopy; if (!(flags & URL_NOSLASH)) { /* locate path component */ - for (; *dir != '/' && *dir; dir++) + for (; *dir != PATH_SEP && *dir; dir++) ; if (*dir){ - retval = strdup (dir); + retval = g_strdup (dir); *dir = 0; } else - retval = strdup ("/"); + retval = g_strdup (PATH_SEP_STR); } /* search for any possible user */ @@ -99,10 +100,10 @@ if (*inner_colon == '@') *pass = NULL; else - *pass = strdup (inner_colon); + *pass = g_strdup (inner_colon); } - if (*pcopy != 0) - *user = strdup (pcopy); + if (*pcopy != NULL) + *user = g_strdup (pcopy); else default_is_anon = 0; @@ -115,12 +116,12 @@ if (!*user){ if (default_is_anon) - *user = strdup ("anonymous"); + *user = g_strdup ("anonymous"); else { if ((passwd_info = getpwuid (geteuid ())) == NULL) - *user = strdup ("anonymous"); + *user = g_strdup ("anonymous"); else { - *user = strdup (passwd_info->pw_name); + *user = g_strdup (passwd_info->pw_name); } endpwent (); } @@ -146,9 +147,9 @@ } } done: - *host = strdup (rest); + *host = g_strdup (rest); - free (pcopy); + g_free (pcopy); return retval; } @@ -229,9 +230,9 @@ char *current; if ((passwd_info = getpwuid (geteuid ())) == NULL) - current = strdup ("anonymous"); + current = g_strdup ("anonymous"); else { - current= strdup (passwd_info->pw_name); + current= g_strdup (passwd_info->pw_name); } endpwent (); diff -ruN old/mc-4.5.9/vfs/utilvfs.h new/mc-4.5.10/vfs/utilvfs.h --- old/mc-4.5.9/vfs/utilvfs.h Wed Dec 31 19:00:00 1969 +++ new/mc-4.5.10/vfs/utilvfs.h Sun Jan 31 18:55:18 1999 @@ -0,0 +1,5 @@ +#include +#include "../src/global.h" + +#include "../src/tty.h" /* enable/disable interrupt key */ +#include "../src/main.h" diff -ruN old/mc-4.5.9/vfs/vfs.c new/mc-4.5.10/vfs/vfs.c --- old/mc-4.5.9/vfs/vfs.c Mon Jan 18 17:44:08 1999 +++ new/mc-4.5.10/vfs/vfs.c Sun Jan 31 18:55:18 1999 @@ -20,16 +20,13 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* Warning: funtions like extfs_lstat() have right to destroy any - * strings you pass to them. This is acutally ok as you strdup what + * strings you pass to them. This is acutally ok as you g_strdup what * you are passing to them, anyway; still, beware. */ /* Namespace: exports *many* functions with vfs_ prefix; exports parse_ls_lga and friends which do not have that prefix. */ #include -#include -#undef MIN -#undef MAX #include #include @@ -38,7 +35,6 @@ #include #include #include -#include #include #include #ifdef SCO_FLAVOR @@ -46,10 +42,10 @@ #endif /* SCO_FLAVOR */ #include #include -#include "../src/fs.h" -#include "../src/mad.h" + +#include "utilvfs.h" + #include "../src/dir.h" -#include "../src/util.h" #include "../src/main.h" #ifndef VFS_STANDALONE #include "../src/panel.h" @@ -57,6 +53,7 @@ #include "../src/layout.h" /* For get_panel_widget and get_other_index */ #include "../src/dialog.h" #endif + #include "vfs.h" #include "extfs.h" /* FIXME: we should not know anything about our modules */ #include "names.h" @@ -163,7 +160,7 @@ if (!filename) vfs_die("vfs_strip_suffix_from_path got NULL: impossible"); - p = strdup (filename); + p = g_strdup (filename); if (!(semi = strrchr (p, '#'))) return p; @@ -198,7 +195,7 @@ /* * Splits path '/p1#op/inpath' into inpath,op; returns which vfs it is. - * What is left in path is p1. You still want to free(path), you DON'T + * What is left in path is p1. You still want to g_free(path), you DON'T * want to free neither *inpath nor *op */ vfs * @@ -215,7 +212,7 @@ if (!semi || !path_magic(path)) return NULL; - slash = strchr (semi, '/'); + slash = strchr (semi, PATH_SEP); *semi = 0; if (op) @@ -236,7 +233,7 @@ } if (slash) - *slash = '/'; + *slash = PATH_SEP; ret = vfs_split (path, inpath, op); *semi = '#'; return ret; @@ -257,7 +254,7 @@ if (!semi || !path_magic (path)) return NULL; - slash = strchr (semi, '/'); + slash = strchr (semi, PATH_SEP); *semi = 0; if (slash) *slash = 0; @@ -265,7 +262,7 @@ ret = vfs_type_from_op (semi+1); if (slash) - *slash = '/'; + *slash = PATH_SEP; if (!ret) ret = vfs_rosplit (path); @@ -310,13 +307,13 @@ gettimeofday(&(stamp->time), NULL); return; } - stamp = xmalloc (sizeof (struct vfs_stamping), "vfs stamping"); + stamp = g_new (struct vfs_stamping, 1); stamp->v = v; stamp->id = id; if (parent){ struct vfs_stamping *st = stamp; for (; parent;){ - st->parent = xmalloc (sizeof (struct vfs_stamping), "vfs stamping"); + st->parent = g_new (struct vfs_stamping, 1); *st->parent = *parent; parent = parent->parent; st = st->parent; @@ -359,9 +356,9 @@ if (stamp){ for (st2 = stamp, st3 = st2->parent; st3 != NULL; st2 = st3, st3 = st3->parent) - free (st2); + g_free (st2); - free (st2); + g_free (st2); } } @@ -382,7 +379,7 @@ } else { st1->next = stamp->next; } - free (stamp); + g_free (stamp); return; } @@ -416,7 +413,7 @@ vfs_die ("VFS must support open.\n"); info = (*vfs->open) (vfs, file, flags, mode); /* open must be supported */ - free (file); + g_free (file); if (!info){ errno = ferrno (vfs); return -1; @@ -447,7 +444,7 @@ } #define MC_NAMEOP(name, inarg, callarg) \ - MC_OP (name, inarg, callarg, path = vfs_canon (path); vfs = vfs_type (path);, free (path); ) + MC_OP (name, inarg, callarg, path = vfs_canon (path); vfs = vfs_type (path);, g_free (path); ) #define MC_HANDLEOP(name, inarg, callarg) \ MC_OP (name, inarg, callarg, if (handle == -1) return -1; vfs = vfs_op (handle);, ) @@ -476,7 +473,7 @@ path = vfs_canon (path); vfs = vfs_type (path); result = vfs->setctl ? (*vfs->setctl)(vfs, path, ctlop, arg) : 0; - free (path); + g_free (path); return result; } @@ -510,22 +507,17 @@ void *info; vfs *vfs; char *p = NULL; - int i = strlen (dirname); - if (dirname [i - 1] != '/'){ /* We should make possible reading of the root directory in a tar file */ - p = xmalloc (i + 2, "slash"); - strcpy (p, dirname); - strcpy (p + i, "/"); - dirname = p; - } + dirname = p = concat_dir_and_file (dirname, ""); + dirname = vfs_canon (dirname); vfs = vfs_type (dirname); info = vfs->opendir ? (*vfs->opendir)(vfs, dirname) : NULL; - free (dirname); + g_free (dirname); if (p) - free (p); + g_free (p); if (!info){ errno = vfs->opendir ? ferrno (vfs) : E_NOTSUPP; return NULL; @@ -534,7 +526,7 @@ vfs_file_table [handle].fs_info = info; vfs_file_table [handle].operations = vfs; - handlep = (int *) xmalloc (sizeof (int), "opendir handle"); + handlep = g_new (int, 1); *handlep = handle; return (DIR *) handlep; } @@ -591,7 +583,7 @@ result = vfs->closedir ? (*vfs->closedir)(vfs_info (handle)) : -1; vfs_free_bucket (handle); - free (dirp); + g_free (dirp); return result; } @@ -600,7 +592,7 @@ MC_HANDLEOP (fstat, (int handle, struct stat *buf), (vfs_info (handle), buf)) /* - * You must strdup whatever this function returns, static buffers are in use + * You must g_strdup whatever this function returns, static buffers are in use */ char * @@ -622,8 +614,8 @@ if (my_stat.st_ino != my_stat2.st_ino || my_stat.st_dev != my_stat2.st_dev || !cd_symlinks){ - free (current_dir); - current_dir = strdup (p); + g_free (current_dir); + current_dir = g_strdup (p); return p; } /* Otherwise we return current_dir below */ } @@ -657,14 +649,14 @@ name2 = vfs_canon (name2); \ if (vfs != vfs_type (name2)){ \ errno = EXDEV; \ - free (name1); \ - free (name2); \ + g_free (name1); \ + g_free (name2); \ return -1; \ } \ \ result = vfs->name ? (*vfs->name)(vfs, vfs_name (name1), vfs_name (name2)) : -1; \ - free (name1); \ - free (name2); \ + g_free (name1); \ + g_free (name2); \ if (result == -1) \ errno = vfs->name ? ferrno (vfs) : E_NOTSUPP; \ return result; \ @@ -709,23 +701,23 @@ local = tilde_expand (path); if (local){ result = vfs_canon (local); - free (local); + g_free (local); return result; } else - return strdup (path); + return g_strdup (path); } /* Relative to current directory */ - if (*path != '/'){ + if (*path != PATH_SEP){ char *local, *result; - if (current_dir [strlen (current_dir) - 1] == '/') - local = copy_strings (current_dir, path, NULL); + if (current_dir [strlen (current_dir) - 1] == PATH_SEP) + local = g_strconcat (current_dir, path, NULL); else - local = copy_strings (current_dir, "/", path, NULL); + local = g_strconcat (current_dir, PATH_SEP_STR, path, NULL); result = vfs_canon (local); - free (local); + g_free (local); return result; } @@ -737,23 +729,19 @@ canonicalize_pathname (path); mad_check("(post-canonicalize)", 0); - return strdup (path); + return g_strdup (path); } vfsid vfs_ncs_getid (vfs *nvfs, char *dir, struct vfs_stamping **par) { vfsid nvfsid; - int freeit = 0; - if (dir [strlen (dir) - 1] != '/'){ - dir = copy_strings (dir, "/", NULL); - freeit = 1; + dir = concat_dir_and_file (dir, ""); - } nvfsid = (*nvfs->getid)(nvfs, dir, par); - if (freeit) - free (dir); + + g_free (dir); return nvfsid; } @@ -888,43 +876,36 @@ char *a, *b; int result; char *p = NULL; - int i = strlen (path); vfs *oldvfs; vfsid oldvfsid; struct vfs_stamping *parent; - if (path [i - 1] != '/'){ /* We should make possible reading of the root directory in a tar archive */ - p = xmalloc (i + 2, "slash"); - strcpy (p, path); - strcpy (p + i, "/"); - path = p; - } + path = p = concat_dir_and_file (path, ""); a = current_dir; /* Save a copy for case of failure */ current_dir = vfs_canon (path); current_vfs = vfs_type (current_dir); - b = strdup (current_dir); + b = g_strdup (current_dir); result = (*current_vfs->chdir) ? (*current_vfs->chdir)(current_vfs, vfs_name (b)) : -1; - free (b); + g_free (b); if (result == -1){ errno = ferrno (current_vfs); - free (current_dir); + g_free (current_dir); current_vfs = vfs_type (a); current_dir = a; } else { oldvfs = vfs_type (a); oldvfsid = vfs_ncs_getid (oldvfs, a, &parent); - free (a); + g_free (a); vfs_add_noncurrent_stamps (oldvfs, oldvfsid, parent); vfs_rm_parents (parent); } - if (p) - free (p); + g_free (p); if (*current_dir){ p = strchr (current_dir, 0) - 1; - if (*p == '/' && p > current_dir) + if (*p == PATH_SEP && p > current_dir) *p = 0; /* Sometimes we assume no trailing slash on cwd */ } return result; @@ -958,7 +939,7 @@ filename = vfs_canon (filename); vfs = vfs_type (filename); - free (filename); + g_free (filename); return vfs == &vfs_local_ops; } @@ -970,7 +951,7 @@ filename = vfs_canon (filename); vfs = vfs_type (filename); - free (filename); + g_free (filename); return vfs == &vfs_ftpfs_ops; #else return 0; @@ -984,7 +965,7 @@ static void vfs_setup_wd (void) { - current_dir = strdup ("/"); + current_dir = g_strdup (PATH_SEP_STR); if (!(vfs_flags & FL_NO_CWDSETUP)) mc_return_cwd(); @@ -1022,7 +1003,7 @@ errno = ferrno (vfs); return (caddr_t)-1; } - mcm = (struct mc_mmapping *) xmalloc (sizeof (struct mc_mmapping), "vfs: mmap handling"); + mcm =g_new (struct mc_mmapping, 1); mcm->addr = result; mcm->vfs_info = vfs_info (fd); mcm->vfs = vfs; @@ -1044,7 +1025,7 @@ mcm2->next = mcm->next; if (*mcm->vfs->munmap) (*mcm->vfs->munmap)(mcm->vfs, addr, len, mcm->vfs_info); - free (mcm); + g_free (mcm); return 0; } } @@ -1068,7 +1049,7 @@ fdout = open (tmp, O_CREAT|O_WRONLY|O_TRUNC|O_EXCL, 0600); if (fdout == -1){ mc_close (fdin); - free (tmp); + g_free (tmp); return NULL; } while ((i = mc_read (fdin, buffer, sizeof (buffer))) == sizeof (buffer)){ @@ -1094,7 +1075,7 @@ vfs = vfs_type (path); result = vfs->getlocalcopy ? (*vfs->getlocalcopy)(vfs, vfs_name (path)) : mc_def_getlocalcopy (vfs, vfs_name (path)); - free (path); + g_free (path); if (!result) errno = ferrno (vfs); return result; @@ -1110,14 +1091,14 @@ fdin = open (local, O_RDONLY); if (fdin == -1){ unlink (local); - free (local); + g_free (local); return; } fdout = mc_open (filename, O_WRONLY | O_TRUNC); if (fdout == -1){ close (fdin); unlink (local); - free (local); + g_free (local); return; } while ((i = read (fdin, buffer, sizeof (buffer))) == sizeof (buffer)){ @@ -1129,7 +1110,7 @@ mc_close (fdout); } unlink (local); - free (local); + g_free (local); } void @@ -1141,7 +1122,7 @@ vfs = vfs_type (path); vfs->ungetlocalcopy ? (*vfs->ungetlocalcopy)(vfs, vfs_name (path), local, has_changed) : mc_def_ungetlocalcopy (vfs, vfs_name (path), local, has_changed); - free (path); + g_free (path); } /* @@ -1253,7 +1234,7 @@ for (stamp = stamps, stamps = 0; stamp != NULL;){ (*stamp->v->free)(stamp->id); st = stamp->next; - free (stamp); + g_free (stamp); stamp = st; } @@ -1261,7 +1242,7 @@ vfs_rmstamp (stamps->v, stamps->id, 1); if (current_dir) - free (current_dir); + g_free (current_dir); for (vfs=vfs_list; vfs; vfs=vfs->next) if (vfs->done) @@ -1591,11 +1572,13 @@ if (strncmp (p, "total", 5) == 0) return 0; - p_copy = strdup(p); + p_copy = g_strdup(p); if ((i = vfs_parse_filetype(*(p++))) == -1) goto error; s->st_mode = i; + if (*p == ' ') /* Notwell 4 */ + p++; if (*p == '['){ if (strlen (p) <= 8 || p [8] != ']') goto error; @@ -1616,8 +1599,8 @@ p++; } - free(p_copy); - p_copy = strdup(p); + g_free(p_copy); + p_copy = g_strdup(p); num_cols = vfs_split_text (p); s->st_nlink = atol (columns [0]); @@ -1702,14 +1685,11 @@ char *s; if (filename){ - p = column_ptr [idx2] - column_ptr [idx]; - s = xmalloc (p, "filename"); - strncpy (s, p_copy + column_ptr [idx], p - 1); - s[p - 1] = '\0'; + s = g_strndup (p_copy + column_ptr [idx], column_ptr [idx2] - column_ptr [idx] - 1); *filename = s; } if (linkname){ - s = strdup (p_copy + column_ptr [idx2+1]); + s = g_strdup (p_copy + column_ptr [idx2+1]); p = strlen (s); if (s [p-1] == '\r' || s [p-1] == '\n') s [p-1] = 0; @@ -1724,13 +1704,14 @@ */ if (filename){ /* - *filename = strdup (columns [idx++]); + *filename = g_strdup (columns [idx++]); */ int p; char *s; - s = strdup (p_copy + column_ptr [idx++]); + s = g_strdup (p_copy + column_ptr [idx++]); p = strlen (s); + /* g_strchomp(); */ if (s [p-1] == '\r' || s [p-1] == '\n') s [p-1] = 0; if (s [p-2] == '\r' || s [p-2] == '\n') @@ -1741,13 +1722,13 @@ if (linkname) *linkname = NULL; } - free (p_copy); + g_free (p_copy); return 1; error: message_1s (1, "Could not parse:", p_copy); if (p_copy != p) /* Carefull! */ - free (p_copy); + g_free (p_copy); return 0; } @@ -1779,13 +1760,13 @@ /* * Returns vfs path corresponding to given url. If passed string is - * not recognized as url, strdup(url) is returned. + * not recognized as url, g_strdup(url) is returned. */ char * vfs_translate_url (char *url) { if (strncmp (url, "ftp://", 6) == 0) - return copy_strings ("/#ftp:", url + 6, 0); + return g_strconcat ("/#ftp:", url + 6, NULL); else - return strdup (url); + return g_strdup (url); } diff -ruN old/mc-4.5.9/vfs/vfs.h new/mc-4.5.10/vfs/vfs.h --- old/mc-4.5.9/vfs/vfs.h Mon Jan 18 17:44:08 1999 +++ new/mc-4.5.10/vfs/vfs.h Sun Jan 31 18:55:18 1999 @@ -6,10 +6,6 @@ #include #include -#if 0 -#include "src/mad.h" -#endif - #if !defined(SCO_FLAVOR) || !defined(_SYS_SELECT_H) || defined(IS_AIX) # include /* alex: this redefines struct timeval */ #endif /* SCO_FLAVOR */ @@ -242,7 +238,7 @@ # define vfs_current_is_tarfs() 0 # define vfs_current_is_extfs() 0 # define vfs_path(x) x -# define vfs_strip_suffix_from_filename(x) strdup(x) +# define vfs_strip_suffix_from_filename(x) g_strdup(x) # define mc_close close # define mc_read read # define mc_write write @@ -275,7 +271,7 @@ # define mc_ctl(a,b,c) 0 # define mc_setctl(a,b,c) 0 -# define vfs_translate_url strdup(s) +# define vfs_translate_url g_strdup(s) # define mc_stat stat # define mc_mknod mknod @@ -286,7 +282,7 @@ # define vfs_type(x) (vfs *)(NULL) # define vfs_init() # define vfs_shut() -# define vfs_canon(p) strdup (canonicalize_pathname(p)) +# define vfs_canon(p) g_strdup (canonicalize_pathname(p)) # define vfs_free_resources() # define vfs_timeout_handler() # define vfs_timeouts() 0 @@ -393,9 +389,6 @@ * O_LINEAR allows filesystems not to create temporary file in some * cases (ftp transfer). -- pavel@ucw.cz */ - -#define VFS_MIN(a,b) ((a)<(b) ? (a) : (b)) -#define VFS_MAX(a,b) ((a)<(b) ? (b) : (a)) #ifdef HAVE_MMAP #define MMAPNULL , NULL, NULL diff -ruN old/mc-4.5.9/vfs/xdirentry.h new/mc-4.5.10/vfs/xdirentry.h --- old/mc-4.5.9/vfs/xdirentry.h Mon Jan 18 17:44:08 1999 +++ new/mc-4.5.10/vfs/xdirentry.h Sun Jan 31 18:55:18 1999 @@ -15,10 +15,6 @@ #include #include -#include "../src/fs.h" -#include "../src/util.h" -#include "../src/mem.h" -#include "../src/mad.h" #include "vfs.h" @@ -220,7 +216,7 @@ int vfs_s_get_line_interruptible (vfs *me, char *buffer, int size, int fd); /* If non-null, FREE */ -#define ifree(ptr) do { if (ptr) free(ptr); } while (0) +#define ifree(ptr) do { if (ptr) g_free(ptr); } while (0) #define MEDATA ((struct vfs_s_data *) me->data) #define ERRNOR(a, b) do { me->verrno = a; return b; } while (0)