xfm-1.5.4/0000777000175000017500000000000010744136021007316 500000000000000xfm-1.5.4/README0000644000175000017500000000220610065560240010112 00000000000000This is Version 1.4.3brl of xfm, originating from Version 1.4.3 from Albert Graef. For latest information about this modified version visit http://alioth.debian.org/projects/xfm/ For information on the old version and sources please visit the xfm homepage at http://www.musikwissenschaft.uni-mainz.de/~ag/xfm/. Installation instructions can be found in the INSTALL file (who would have guessed that ;-)). This is a powerful file and applications manager program written using the X toolkit. It contains virtually all of the features that you would expect in a file manager -- move around your directory tree in multiple windows, and move, copy or delete files with simple mouse operations. Directory displays are updated automatically in regular intervals when the contents of a displayed directory changes. The integrated application manager allows you to load files into your favourite applications from the file manager by dragging icons. It can also be used as a "shelf" onto which you can place files and directories you are currently working with. A special LOAD action for application files enables you to manage different application groups. xfm-1.5.4/configure.in0000644000175000017500000001122610744135445011556 00000000000000dnl dnl Process this file with autoconf to produce a configure script dnl AC_INIT(src/FmMain.c) AM_INIT_AUTOMAKE(xfm,1.5.4) AM_CONFIG_HEADER(xfmconfig.h) AM_MAINTAINER_MODE AC_PROG_CC AC_PROG_INSTALL AC_CHECK_HEADER(X11/Intrinsic.h,[],[AC_MSG_ERROR([Could not find X11/Intrinsic.h])]) AC_CHECK_HEADER(X11/StringDefs.h,[],[AC_MSG_ERROR([Could not find X11/StringDefs.h])]) AC_CHECK_HEADER(X11/Xos.h,[],[AC_MSG_ERROR([Could not find X11/Xos.h])]) AC_CHECK_HEADER(X11/xpm.h,[],[AC_MSG_ERROR([Could not find X11/xpm.h])]) AC_CHECK_HEADER(X11/Xmu/Atoms.h,[],[AC_MSG_ERROR([Could not find X11/Xmu/Atoms.h])]) AC_CHECK_HEADER(X11/Xaw3d/XawInit.h,[],[AC_MSG_ERROR([Could not find Xaw3d/XawInit.h])],[#include ]) AC_CHECK_HEADERS(fstab.h) dnl more readable when here instead of each command line AC_DEFINE([_GNU_SOURCE],[],[switch to get more prototypes]) AC_DEFINE([_XOPEN_SOURCE],[],[switch to get more prototypes]) AC_DEFINE([_BSD_SOURCE],[],[switch to get more prototypes]) AC_DEFINE([_SVID_SOURCE],[],[switch to get more prototypes]) AC_DEFINE([NeedFunctionPrototypes],[1],[switch to get prototypes in X headers]) dnl Most of those do not work when switched off, should dnl be removed from the source one future day: AC_DEFINE([ENHANCE_BUGFIX],[],[Fix some bugs]) AC_DEFINE([USE_NEW_WIDGETS],[],[Use newer widgets]) AC_DEFINE([ENHANCE_POP_ACCEL],[],[Install accelerators for some widgets]) AC_DEFINE([ENHANCE_HISTORY],[],[Provide a history of the visited paths.]) AC_DEFINE([ENHANCE_USERINFO],[],[Use $HOME as starting dir and $SHELL for shells]) AC_DEFINE([ENHANCE_MENU],[],[Small modification of the Folder-menu]) AC_DEFINE([ENHANCE_TRANSLATIONS],[],[The translations were moved to a resource file]) AC_DEFINE([ENHANCE_PERMS],[],[Show all permissions]) AC_DEFINE([ENHANCE_SCROLL],[],[try to preserver scrollbar position when deleting items]) AC_DEFINE([ENHANCE_SELECTION],[],[This enhancement provides support for a simple inter client communication.]) dnl This causes quite some problems? perhaps change it to only use output of dnl programs started? AC_DEFINE([ENHANCE_LOG],[],[This enhancement adds a logging window feature.]) AC_DEFINE([ENHANCE_CMAP],[],[Enhance color usage if not enough colors are ready]) AC_DEFINE([SYSTEMWIDE_DEFAULTS],[],[Use systemwide defaults for user config]) CONFIG_VARIANT=DEFAULT AC_ARG_WITH([config],[ --with-config select a specific config variant, possible values are: SARGE], [case "$withval" in DEFAULT) CONFIG_VARIANT=DEFAULT ;; SARGE) CONFIG_VARIANT=SARGE ;; no) AC_MSG_ERROR([what is --without-config supposed to tell me?]) ;; yes) AC_MSG_ERROR([--with-config without config specified]) ;; *) AC_MSG_ERROR([unknown config variant $withval]) ;; esac ]) AC_SUBST([CONFIG_VARIANT]) COMPRESSIONLIBS="" # check for libz AH_TEMPLATE([HAVE_ZLIB],[Defined if zlib is available]) AC_ARG_WITH([zlib],[ --with-zlib path where zlib can be found (or yes or no to force (non)usage)], [case "$withval" in no) ;; yes) AC_CHECK_LIB(z,deflateEnd,[ AC_CHECK_HEADER(zlib.h,[ AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_ZLIB)) COMPRESSIONLIBS="-lz $COMPRESSIONLIBS" ],[AC_MSG_ERROR([Could not find zlib.h])]) ],[AC_MSG_ERROR([Could not find libz])]) ;; *) CPPFLAGS="-I$withval/include $CPPFLAGS" LDFLAGS="-L$withval/lib $LDFLAGS" AC_CHECK_LIB(z,deflateEnd,[ AC_CHECK_HEADER(zlib.h,[ AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_ZLIB)) COMPRESSIONLIBS="-lz $COMPRESSIONLIBS" ],[AC_MSG_ERROR([Could not find zlib.h])]) ],[AC_MSG_ERROR([Could not find libz])]) ;; esac ],[ AC_CHECK_LIB(z,deflateEnd,[ AC_CHECK_HEADER(zlib.h,[ AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_ZLIB)) COMPRESSIONLIBS="-lz $COMPRESSIONLIBS" ],[AC_MSG_WARN([Could not find zlib.h])]) ],[AC_MSG_WARN([Could not find libz])]) ]) # check for libbz2 AH_TEMPLATE([HAVE_LIBBZ2],[Defined if libbz2 is available]) AC_ARG_WITH([libbz2],[ --with-libbz2 path where libbz2 can be found (not used by default, as it needs huge amount of read-ahead...)], [case "$withval" in no) ;; yes) AC_CHECK_LIB(bz2,BZ2_bzDecompressEnd,[ AC_CHECK_HEADER(bzlib.h,[ AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_LIBBZ2)) COMPRESSIONLIBS="-lbz2 $COMPRESSIONLIBS" ],[AC_MSG_ERROR([Could not find bzlib.h])]) ],[AC_MSG_ERROR([Could not find libbz2])]) ;; *) CPPFLAGS="-I$withval/include $CPPFLAGS" LDFLAGS="-L$withval/lib $LDFLAGS" AC_CHECK_LIB(bz2,BZ2_bzDecompressEnd,[ AC_CHECK_HEADER(bzlib.h,[ AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_LIBBZ2)) COMPRESSIONLIBS="-lbz2 $COMPRESSIONLIBS" ],[AC_MSG_ERROR([Could not find bzlib.h])]) ],[AC_MSG_ERROR([Could not find libbz2])]) ;; esac ]) AC_SUBST([COMPRESSIONLIBS]) dnl dnl Create makefiles dnl AC_OUTPUT(src/Makefile icons/Makefile defaults/Makefile images/Makefile doc/Makefile Makefile) xfm-1.5.4/aclocal.m40000644000175000017500000010076710744135536011117 00000000000000# generated automatically by aclocal 1.10 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. m4_if(m4_PACKAGE_VERSION, [2.61],, [m4_fatal([this file was generated for autoconf 2.61. You have another version of autoconf. If you want to use that, you should regenerate the build system entirely.], [63])]) # Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.10' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. m4_if([$1], [1.10], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) # _AM_AUTOCONF_VERSION(VERSION) # ----------------------------- # aclocal traces this macro to find the Autoconf version. # This is a private macro too. Using m4_define simplifies # the logic in aclocal, which can simply ignore this definition. m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AC_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.10])dnl _AM_AUTOCONF_VERSION(m4_PACKAGE_VERSION)]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to # `$srcdir', `$srcdir/..', or `$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is `.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [dnl Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50])dnl # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 8 # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ(2.52)dnl ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl _AM_SUBST_NOTMAKE([$1_FALSE])dnl if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 9 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "GCJ", or "OBJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl ifelse([$1], CC, [depcc="$CC" am_compiler_list=], [$1], CXX, [depcc="$CXX" am_compiler_list=], [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], UPC, [depcc="$UPC" am_compiler_list=], [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE(dependency-tracking, [ --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. #serial 3 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [for mf in $CONFIG_FILES; do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each `.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 8 # AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 12 # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.60])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) AM_MISSING_PROG(AUTOCONF, autoconf) AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) AM_MISSING_PROG(AUTOHEADER, autoheader) AM_MISSING_PROG(MAKEINFO, makeinfo) AM_PROG_INSTALL_SH AM_PROG_INSTALL_STRIP AC_REQUIRE([AM_PROG_MKDIR_P])dnl # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES(CC)], [define([AC_PROG_CC], defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES(CXX)], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES(OBJC)], [define([AC_PROG_OBJC], defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl ]) ]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $1 | $1:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} AC_SUBST(install_sh)]) # Copyright (C) 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Add --enable-maintainer-mode option to configure. -*- Autoconf -*- # From Jim Meyering # Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 AC_DEFUN([AM_MAINTAINER_MODE], [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) dnl maintainer-mode is disabled by default AC_ARG_ENABLE(maintainer-mode, [ --enable-maintainer-mode enable make rules and dependencies not useful (and sometimes confusing) to the casual installer], USE_MAINTAINER_MODE=$enableval, USE_MAINTAINER_MODE=no) AC_MSG_RESULT([$USE_MAINTAINER_MODE]) AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes]) MAINT=$MAINTAINER_MODE_TRUE AC_SUBST(MAINT)dnl ] ) AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 3 # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo done .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # We grep out `Entering directory' and `Leaving directory' # messages which can occur if `w' ends up in MAKEFLAGS. # In particular we don't look at `^make:' because GNU make might # be invoked under some other name (usually "gmake"), in which # case it prints its new name instead of `make'. if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then am__include=include am__quote= _am_result=GNU fi # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then am__include=.include am__quote="\"" _am_result=BSD fi fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 5 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it supports --run. # If it does, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= AC_MSG_WARN([`missing' script is too old or missing]) fi ]) # Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_MKDIR_P # --------------- # Check for `mkdir -p'. AC_DEFUN([AM_PROG_MKDIR_P], [AC_PREREQ([2.60])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, dnl while keeping a definition of mkdir_p for backward compatibility. dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of dnl Makefile.ins that do not define MKDIR_P, so we do our own dnl adjustment using top_builddir (which is defined more often than dnl MKDIR_P). AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl case $mkdir_p in [[\\/$]]* | ?:[[\\/]]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 3 # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # ------------------------------ # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) # _AM_SET_OPTIONS(OPTIONS) # ---------------------------------- # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 echo timestamp > conftest.file # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftest.file` fi rm -f conftest.file if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT(yes)]) # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor `install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in `make install-strip', and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be `maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputing VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of `v7', `ustar', or `pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. AM_MISSING_PROG([AMTAR], [tar]) m4_if([$1], [v7], [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], [m4_case([$1], [ustar],, [pax],, [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' _am_tools=${am_cv_prog_tar_$1-$_am_tools} # Do not fold the above two line into one, because Tru64 sh and # Solaris sh will not grok spaces in the rhs of `-'. for _am_tool in $_am_tools do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR xfm-1.5.4/Makefile.am0000644000175000017500000000047010420724074011271 00000000000000SUBDIRS = defaults src icons images doc MAINTAINERCLEANFILES = Makefile.in configure install-sh stamp-h.in aclocal.m4 mkinstalldirs missing xfmconfig.h.in autom4te.cache config.guess config.sub EXTRA_DIST = autogen.sh xfmconfig.h.in README-1.2 README-1.4 README-1.4.3 distclean-local: -rm -rf autom4te.cache xfm-1.5.4/Makefile.in0000644000175000017500000004535610744135561011324 00000000000000# Makefile.in generated by automake 1.10 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = . DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/xfmconfig.h.in \ $(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \ TODO depcomp install-sh missing ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = xfmconfig.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ { test ! -d $(distdir) \ || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -fr $(distdir); }; } DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COMPRESSIONLIBS = @COMPRESSIONLIBS@ CONFIG_VARIANT = @CONFIG_VARIANT@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = defaults src icons images doc MAINTAINERCLEANFILES = Makefile.in configure install-sh stamp-h.in aclocal.m4 mkinstalldirs missing xfmconfig.h.in autom4te.cache config.guess config.sub EXTRA_DIST = autogen.sh xfmconfig.h.in README-1.2 README-1.4 README-1.4.3 all: xfmconfig.h $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: am--refresh: @: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \ cd $(srcdir) && $(AUTOMAKE) --gnu \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) xfmconfig.h: stamp-h1 @if test ! -f $@; then \ rm -f stamp-h1; \ $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \ else :; fi stamp-h1: $(srcdir)/xfmconfig.h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status xfmconfig.h $(srcdir)/xfmconfig.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_srcdir) && $(AUTOHEADER) rm -f stamp-h1 touch $@ distclean-hdr: -rm -f xfmconfig.h stamp-h1 # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) xfmconfig.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) xfmconfig.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) xfmconfig.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) xfmconfig.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) $(am__remove_distdir) test -d $(distdir) || mkdir $(distdir) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ distdir=`$(am__cd) $(distdir) && pwd`; \ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$top_distdir" \ distdir="$$distdir/$$subdir" \ am__remove_distdir=: \ am__skip_length_check=: \ distdir) \ || exit 1; \ fi; \ done -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r $(distdir) dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 $(am__remove_distdir) dist-tarZ: distdir tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__remove_distdir) dist-shar: distdir shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__remove_distdir) dist dist-all: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir); chmod a+w $(distdir) mkdir $(distdir)/_build mkdir $(distdir)/_inst chmod a-w $(distdir) dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && cd $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck $(am__remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @cd $(distuninstallcheck_dir) \ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: check-recursive all-am: Makefile xfmconfig.h installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-recursive clean-am: clean-generic mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f Makefile distclean-am: clean-am distclean-generic distclean-hdr distclean-local \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-exec-am: install-html: install-html-recursive install-info: install-info-recursive install-man: install-pdf: install-pdf-recursive install-ps: install-ps-recursive installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ install-strip .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am am--refresh check check-am clean clean-generic \ ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \ dist-shar dist-tarZ dist-zip distcheck distclean \ distclean-generic distclean-hdr distclean-local distclean-tags \ distcleancheck distdir distuninstallcheck dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am tags tags-recursive uninstall uninstall-am distclean-local: -rm -rf autom4te.cache # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xfm-1.5.4/xfmconfig.h.in0000644000175000017500000000534510735457403012011 00000000000000/* xfmconfig.h.in. Generated from configure.in by autoheader. */ /* Fix some bugs */ #undef ENHANCE_BUGFIX /* Enhance color usage if not enough colors are ready */ #undef ENHANCE_CMAP /* Provide a history of the visited paths. */ #undef ENHANCE_HISTORY /* This enhancement adds a logging window feature. */ #undef ENHANCE_LOG /* Small modification of the Folder-menu */ #undef ENHANCE_MENU /* Show all permissions */ #undef ENHANCE_PERMS /* Install accelerators for some widgets */ #undef ENHANCE_POP_ACCEL /* try to preserver scrollbar position when deleting items */ #undef ENHANCE_SCROLL /* This enhancement provides support for a simple inter client communication. */ #undef ENHANCE_SELECTION /* The translations were moved to a resource file */ #undef ENHANCE_TRANSLATIONS /* Use $HOME as starting dir and $SHELL for shells */ #undef ENHANCE_USERINFO /* Define to 1 if you have the header file. */ #undef HAVE_FSTAB_H /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Defined if libbz2 is available */ #undef HAVE_LIBBZ2 /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Defined if zlib is available */ #undef HAVE_ZLIB /* switch to get prototypes in X headers */ #undef NeedFunctionPrototypes /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the version of this package. */ #undef PACKAGE_VERSION /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Use systemwide defaults for user config */ #undef SYSTEMWIDE_DEFAULTS /* Use newer widgets */ #undef USE_NEW_WIDGETS /* Version number of package */ #undef VERSION /* switch to get more prototypes */ #undef _BSD_SOURCE /* switch to get more prototypes */ #undef _GNU_SOURCE /* switch to get more prototypes */ #undef _SVID_SOURCE /* switch to get more prototypes */ #undef _XOPEN_SOURCE xfm-1.5.4/configure0000755000175000017500000066017410744135565011173 00000000000000#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.61. # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi # PATH needs CR # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) as_nl=' ' IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 { (exit 1); exit 1; } fi # Work around bugs in pre-3.0 UWIN ksh. for as_var in ENV MAIL MAILPATH do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var fi done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # CDPATH. $as_unset CDPATH if test "x$CONFIG_SHELL" = x; then if (eval ":") 2>/dev/null; then as_have_required=yes else as_have_required=no fi if test $as_have_required = yes && (eval ": (as_func_return () { (exit \$1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = \"\$1\" ); then : else exitcode=1 echo positional parameters were not saved. fi test \$exitcode = 0) || { (exit 1); exit 1; } ( as_lineno_1=\$LINENO as_lineno_2=\$LINENO test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } ") 2> /dev/null; then : else as_candidate_shells= as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. case $as_dir in /*) for as_base in sh bash ksh sh5; do as_candidate_shells="$as_candidate_shells $as_dir/$as_base" done;; esac done IFS=$as_save_IFS for as_shell in $as_candidate_shells $SHELL; do # Try only shells that exist, to save several forks. if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { ("$as_shell") 2> /dev/null <<\_ASEOF if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi : _ASEOF }; then CONFIG_SHELL=$as_shell as_have_required=yes if { "$as_shell" 2> /dev/null <<\_ASEOF if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi : (as_func_return () { (exit $1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = "$1" ); then : else exitcode=1 echo positional parameters were not saved. fi test $exitcode = 0) || { (exit 1); exit 1; } ( as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } _ASEOF }; then break fi fi done if test "x$CONFIG_SHELL" != x; then for as_var in BASH_ENV ENV do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done export CONFIG_SHELL exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} fi if test $as_have_required = no; then echo This script requires a shell more modern than all the echo shells that I found on your system. Please install a echo modern shell, or manually run the script under such a echo shell if you do have one. { (exit 1); exit 1; } fi fi fi (eval "as_func_return () { (exit \$1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = \"\$1\" ); then : else exitcode=1 echo positional parameters were not saved. fi test \$exitcode = 0") || { echo No shell found that supports shell functions. echo Please tell autoconf@gnu.org about your system, echo including any error possibly output before this echo message } as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line after each line using $LINENO; the second 'sed' # does the real work. The second script uses 'N' to pair each # line-number line with the line containing $LINENO, and appends # trailing '-' during substitution so that $LINENO is not a special # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # scripts with optimization help from Paolo Bonzini. Blame Lee # E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in -n*) case `echo 'x\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. *) ECHO_C='\c';; esac;; *) ECHO_N='-n';; esac if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir fi echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME= PACKAGE_TARNAME= PACKAGE_VERSION= PACKAGE_STRING= PACKAGE_BUGREPORT= ac_unique_file="src/FmMain.c" # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir localstatedir includedir oldincludedir docdir infodir htmldir dvidir pdfdir psdir libdir localedir mandir DEFS ECHO_C ECHO_N ECHO_T LIBS build_alias host_alias target_alias INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA am__isrc CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CPP GREP EGREP CONFIG_VARIANT COMPRESSIONLIBS LIBOBJS LTLIBOBJS' ac_subst_files='' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CPP' # Initialize some variables set by options. ac_init_help= ac_init_version=false # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` eval enable_$ac_feature=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` eval enable_$ac_feature=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package | sed 's/[-.]/_/g'` eval with_$ac_package=\$ac_optarg ;; -without-* | --without-*) ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package | sed 's/[-.]/_/g'` eval with_$ac_package=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) { echo "$as_me: error: unrecognized option: $ac_option Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` { echo "$as_me: error: missing argument to $ac_option" >&2 { (exit 1); exit 1; }; } fi # Be sure to have absolute directory names. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; } done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || { echo "$as_me: error: Working directory cannot be determined" >&2 { (exit 1); exit 1; }; } test "X$ac_ls_di" = "X$ac_pwd_ls_di" || { echo "$as_me: error: pwd does not report name of working directory" >&2 { (exit 1); exit 1; }; } # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$0" || $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$0" : 'X\(//\)[^/]' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X"$0" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2 { (exit 1); exit 1; }; } pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures this package to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names _ACEOF fi if test -n "$ac_init_help"; then cat <<\_ACEOF Optional Features: --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-maintainer-mode enable make rules and dependencies not useful (and sometimes confusing) to the casual installer --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-config select a specific config variant, possible values are: SARGE --with-zlib path where zlib can be found (or yes or no to force (non)usage) --with-libbz2 path where libbz2 can be found (not used by default, as it needs huge amount of read-ahead...) Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF configure generated by GNU Autoconf 2.61 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by $as_me, which was generated by GNU Autoconf 2.61. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; 2) ac_configure_args1="$ac_configure_args1 '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac done done $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo cat <<\_ASBOX ## ---------------- ## ## Cache variables. ## ## ---------------- ## _ASBOX echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( *) $as_unset $ac_var ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo cat <<\_ASBOX ## ----------------- ## ## Output variables. ## ## ----------------- ## _ASBOX echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX ## ------------------- ## ## File substitutions. ## ## ------------------- ## _ASBOX echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then cat <<\_ASBOX ## ----------- ## ## confdefs.h. ## ## ----------- ## _ASBOX echo cat confdefs.h echo fi test "$ac_signal" != 0 && echo "$as_me: caught signal $ac_signal" echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer explicitly selected file to automatically selected ones. if test -n "$CONFIG_SITE"; then set x "$CONFIG_SITE" elif test "x$prefix" != xNONE; then set x "$prefix/share/config.site" "$prefix/etc/config.site" else set x "$ac_default_prefix/share/config.site" \ "$ac_default_prefix/etc/config.site" fi shift for ac_site_file do if test -r "$ac_site_file"; then { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special # files actually), so we avoid doing that. if test -f "$cache_file"; then { echo "$as_me:$LINENO: loading cache $cache_file" >&5 echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { echo "$as_me:$LINENO: creating cache $cache_file" >&5 echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 echo "$as_me: former value: $ac_old_val" >&2;} { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 echo "$as_me: current value: $ac_new_val" >&2;} ac_cache_corrupted=: fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 echo "$as_me: error: changes in the environment can compromise the build" >&2;} { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu am__api_version='1.10' ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5 echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;} { (exit 1); exit 1; }; } fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # 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" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. { echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; } if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in ./ | .// | /cC/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi done done ;; esac done IFS=$as_save_IFS fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { echo "$as_me:$LINENO: result: $INSTALL" >&5 echo "${ECHO_T}$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { echo "$as_me:$LINENO: checking whether build environment is sane" >&5 echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6; } # Just in case sleep 1 echo timestamp > conftest.file # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftest.file` fi rm -f conftest.file if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&5 echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&2;} { (exit 1); exit 1; }; } fi test "$2" = conftest.file ) then # Ok. : else { { echo "$as_me:$LINENO: error: newly created file is older than distributed files! Check your system clock" >&5 echo "$as_me: error: newly created file is older than distributed files! Check your system clock" >&2;} { (exit 1); exit 1; }; } fi { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. echo might interpret backslashes. # By default was `s,x,x', remove it if useless. cat <<\_ACEOF >conftest.sed s/[\\$]/&&/g;s/;s,x,x,$// _ACEOF program_transform_name=`echo $program_transform_name | sed -f conftest.sed` rm -f conftest.sed # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi { echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5 echo $ECHO_N "checking for a thread-safe mkdir -p... $ECHO_C" >&6; } if test -z "$MKDIR_P"; then if test "${ac_cv_path_mkdir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. test -d ./--version && rmdir ./--version MKDIR_P="$ac_install_sh -d" fi fi { echo "$as_me:$LINENO: result: $MKDIR_P" >&5 echo "${ECHO_T}$MKDIR_P" >&6; } mkdir_p="$MKDIR_P" case $mkdir_p in [\\/$]* | ?:[\\/]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_AWK+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AWK="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { echo "$as_me:$LINENO: result: $AWK" >&5 echo "${ECHO_T}$AWK" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$AWK" && break done { echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; } set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } SET_MAKE= else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} { (exit 1); exit 1; }; } fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE=xfm VERSION=1.5.4 cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { echo "$as_me:$LINENO: result: $STRIP" >&5 echo "${ECHO_T}$STRIP" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 echo "${ECHO_T}$ac_ct_STRIP" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. AMTAR=${AMTAR-"${am_missing_run}tar"} am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' ac_config_headers="$ac_config_headers xfmconfig.h" { echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5 echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6; } # Check whether --enable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval else USE_MAINTAINER_MODE=no fi { echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5 echo "${ECHO_T}$USE_MAINTAINER_MODE" >&6; } if test $USE_MAINTAINER_MODE = yes; then MAINTAINER_MODE_TRUE= MAINTAINER_MODE_FALSE='#' else MAINTAINER_MODE_TRUE='#' MAINTAINER_MODE_FALSE= fi MAINT=$MAINTAINER_MODE_TRUE ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&5 echo "$as_me: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } # Provide some information about the compiler. echo "$as_me:$LINENO: checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (ac_try="$ac_compiler --version >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -v >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -V >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; } ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # # List of possible output files, starting from the most likely. # The algorithm is not robust to junk in `.', hence go to wildcards (a.*) # only as a last resort. b.out is created by i960 compilers. ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out' # # The IRIX 6 linker writes into existing files which may not be # executable, retaining their permissions. Remove them first so a # subsequent execution test works. ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { (ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link_default") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi { echo "$as_me:$LINENO: result: $ac_file" >&5 echo "${ECHO_T}$ac_file" >&6; } if test -z "$ac_file"; then echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: C compiler cannot create executables See \`config.log' for more details." >&5 echo "$as_me: error: C compiler cannot create executables See \`config.log' for more details." >&2;} { (exit 77); exit 77; }; } fi ac_exeext=$ac_cv_exeext # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { echo "$as_me:$LINENO: checking whether the C compiler works" >&5 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; } # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { echo "$as_me:$LINENO: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&5 echo "$as_me: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi fi fi { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } rm -f a.out a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; } { echo "$as_me:$LINENO: result: $cross_compiling" >&5 echo "${ECHO_T}$cross_compiling" >&6; } { echo "$as_me:$LINENO: checking for suffix of executables" >&5 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; } if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest$ac_cv_exeext { echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 echo "${ECHO_T}$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT { echo "$as_me:$LINENO: checking for suffix of object files" >&5 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; } if test "${ac_cv_objext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 echo "${ECHO_T}$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 CFLAGS="" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; } 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="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } if test "${ac_cv_prog_cc_c89+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_c89=$ac_arg else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { echo "$as_me:$LINENO: result: none needed" >&5 echo "${ECHO_T}none needed" >&6; } ;; xno) { echo "$as_me:$LINENO: result: unsupported" >&5 echo "${ECHO_T}unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; esac ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo done .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # We grep out `Entering directory' and `Leaving directory' # messages which can occur if `w' ends up in MAKEFLAGS. # In particular we don't look at `^make:' because GNU make might # be invoked under some other name (usually "gmake"), in which # case it prints its new name instead of `make'. if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then am__include=include am__quote= _am_result=GNU fi # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then am__include=.include am__quote="\"" _am_result=BSD fi fi { echo "$as_me:$LINENO: result: $_am_result" >&5 echo "${ECHO_T}$_am_result" >&6; } rm -f confinc confmf # Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi depcc="$CC" am_compiler_list= { echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # 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" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. { echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; } if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in ./ | .// | /cC/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi done done ;; esac done IFS=$as_save_IFS fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { echo "$as_me:$LINENO: result: $INSTALL" >&5 echo "${ECHO_T}$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if test "${ac_cv_prog_CPP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { echo "$as_me:$LINENO: result: $CPP" >&5 echo "${ECHO_T}$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&5 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; } if test "${ac_cv_path_GREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Extract the first word of "grep ggrep" to use in msg output if test -z "$GREP"; then set dummy grep ggrep; ac_prog_name=$2 if test "${ac_cv_path_GREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break ac_count=`expr $ac_count + 1` if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS fi GREP="$ac_cv_path_GREP" if test -z "$GREP"; then { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} { (exit 1); exit 1; }; } fi else ac_cv_path_GREP=$GREP fi fi { echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 echo "${ECHO_T}$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { echo "$as_me:$LINENO: checking for egrep" >&5 echo $ECHO_N "checking for egrep... $ECHO_C" >&6; } if test "${ac_cv_path_EGREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else # Extract the first word of "egrep" to use in msg output if test -z "$EGREP"; then set dummy egrep; ac_prog_name=$2 if test "${ac_cv_path_EGREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break ac_count=`expr $ac_count + 1` if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS fi EGREP="$ac_cv_path_EGREP" if test -z "$EGREP"; then { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} { (exit 1); exit 1; }; } fi else ac_cv_path_EGREP=$EGREP fi fi fi { echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 echo "${ECHO_T}$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { echo "$as_me:$LINENO: checking for ANSI C header files" >&5 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi { echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 echo "${ECHO_T}$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF #define STDC_HEADERS 1 _ACEOF fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Header=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done if test "${ac_cv_header_X11_Intrinsic_h+set}" = set; then { echo "$as_me:$LINENO: checking for X11/Intrinsic.h" >&5 echo $ECHO_N "checking for X11/Intrinsic.h... $ECHO_C" >&6; } if test "${ac_cv_header_X11_Intrinsic_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi { echo "$as_me:$LINENO: result: $ac_cv_header_X11_Intrinsic_h" >&5 echo "${ECHO_T}$ac_cv_header_X11_Intrinsic_h" >&6; } else # Is the header compilable? { echo "$as_me:$LINENO: checking X11/Intrinsic.h usability" >&5 echo $ECHO_N "checking X11/Intrinsic.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? { echo "$as_me:$LINENO: checking X11/Intrinsic.h presence" >&5 echo $ECHO_N "checking X11/Intrinsic.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: X11/Intrinsic.h: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: X11/Intrinsic.h: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: X11/Intrinsic.h: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: X11/Intrinsic.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: X11/Intrinsic.h: present but cannot be compiled" >&5 echo "$as_me: WARNING: X11/Intrinsic.h: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: X11/Intrinsic.h: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: X11/Intrinsic.h: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: X11/Intrinsic.h: see the Autoconf documentation" >&5 echo "$as_me: WARNING: X11/Intrinsic.h: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: X11/Intrinsic.h: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: X11/Intrinsic.h: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: X11/Intrinsic.h: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: X11/Intrinsic.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: X11/Intrinsic.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: X11/Intrinsic.h: in the future, the compiler will take precedence" >&2;} ;; esac { echo "$as_me:$LINENO: checking for X11/Intrinsic.h" >&5 echo $ECHO_N "checking for X11/Intrinsic.h... $ECHO_C" >&6; } if test "${ac_cv_header_X11_Intrinsic_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_X11_Intrinsic_h=$ac_header_preproc fi { echo "$as_me:$LINENO: result: $ac_cv_header_X11_Intrinsic_h" >&5 echo "${ECHO_T}$ac_cv_header_X11_Intrinsic_h" >&6; } fi if test $ac_cv_header_X11_Intrinsic_h = yes; then : else { { echo "$as_me:$LINENO: error: Could not find X11/Intrinsic.h" >&5 echo "$as_me: error: Could not find X11/Intrinsic.h" >&2;} { (exit 1); exit 1; }; } fi if test "${ac_cv_header_X11_StringDefs_h+set}" = set; then { echo "$as_me:$LINENO: checking for X11/StringDefs.h" >&5 echo $ECHO_N "checking for X11/StringDefs.h... $ECHO_C" >&6; } if test "${ac_cv_header_X11_StringDefs_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi { echo "$as_me:$LINENO: result: $ac_cv_header_X11_StringDefs_h" >&5 echo "${ECHO_T}$ac_cv_header_X11_StringDefs_h" >&6; } else # Is the header compilable? { echo "$as_me:$LINENO: checking X11/StringDefs.h usability" >&5 echo $ECHO_N "checking X11/StringDefs.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? { echo "$as_me:$LINENO: checking X11/StringDefs.h presence" >&5 echo $ECHO_N "checking X11/StringDefs.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: X11/StringDefs.h: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: X11/StringDefs.h: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: X11/StringDefs.h: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: X11/StringDefs.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: X11/StringDefs.h: present but cannot be compiled" >&5 echo "$as_me: WARNING: X11/StringDefs.h: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: X11/StringDefs.h: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: X11/StringDefs.h: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: X11/StringDefs.h: see the Autoconf documentation" >&5 echo "$as_me: WARNING: X11/StringDefs.h: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: X11/StringDefs.h: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: X11/StringDefs.h: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: X11/StringDefs.h: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: X11/StringDefs.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: X11/StringDefs.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: X11/StringDefs.h: in the future, the compiler will take precedence" >&2;} ;; esac { echo "$as_me:$LINENO: checking for X11/StringDefs.h" >&5 echo $ECHO_N "checking for X11/StringDefs.h... $ECHO_C" >&6; } if test "${ac_cv_header_X11_StringDefs_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_X11_StringDefs_h=$ac_header_preproc fi { echo "$as_me:$LINENO: result: $ac_cv_header_X11_StringDefs_h" >&5 echo "${ECHO_T}$ac_cv_header_X11_StringDefs_h" >&6; } fi if test $ac_cv_header_X11_StringDefs_h = yes; then : else { { echo "$as_me:$LINENO: error: Could not find X11/StringDefs.h" >&5 echo "$as_me: error: Could not find X11/StringDefs.h" >&2;} { (exit 1); exit 1; }; } fi if test "${ac_cv_header_X11_Xos_h+set}" = set; then { echo "$as_me:$LINENO: checking for X11/Xos.h" >&5 echo $ECHO_N "checking for X11/Xos.h... $ECHO_C" >&6; } if test "${ac_cv_header_X11_Xos_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi { echo "$as_me:$LINENO: result: $ac_cv_header_X11_Xos_h" >&5 echo "${ECHO_T}$ac_cv_header_X11_Xos_h" >&6; } else # Is the header compilable? { echo "$as_me:$LINENO: checking X11/Xos.h usability" >&5 echo $ECHO_N "checking X11/Xos.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? { echo "$as_me:$LINENO: checking X11/Xos.h presence" >&5 echo $ECHO_N "checking X11/Xos.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: X11/Xos.h: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: X11/Xos.h: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: X11/Xos.h: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: X11/Xos.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: X11/Xos.h: present but cannot be compiled" >&5 echo "$as_me: WARNING: X11/Xos.h: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: X11/Xos.h: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: X11/Xos.h: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: X11/Xos.h: see the Autoconf documentation" >&5 echo "$as_me: WARNING: X11/Xos.h: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: X11/Xos.h: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: X11/Xos.h: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: X11/Xos.h: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: X11/Xos.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: X11/Xos.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: X11/Xos.h: in the future, the compiler will take precedence" >&2;} ;; esac { echo "$as_me:$LINENO: checking for X11/Xos.h" >&5 echo $ECHO_N "checking for X11/Xos.h... $ECHO_C" >&6; } if test "${ac_cv_header_X11_Xos_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_X11_Xos_h=$ac_header_preproc fi { echo "$as_me:$LINENO: result: $ac_cv_header_X11_Xos_h" >&5 echo "${ECHO_T}$ac_cv_header_X11_Xos_h" >&6; } fi if test $ac_cv_header_X11_Xos_h = yes; then : else { { echo "$as_me:$LINENO: error: Could not find X11/Xos.h" >&5 echo "$as_me: error: Could not find X11/Xos.h" >&2;} { (exit 1); exit 1; }; } fi if test "${ac_cv_header_X11_xpm_h+set}" = set; then { echo "$as_me:$LINENO: checking for X11/xpm.h" >&5 echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6; } if test "${ac_cv_header_X11_xpm_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi { echo "$as_me:$LINENO: result: $ac_cv_header_X11_xpm_h" >&5 echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6; } else # Is the header compilable? { echo "$as_me:$LINENO: checking X11/xpm.h usability" >&5 echo $ECHO_N "checking X11/xpm.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? { echo "$as_me:$LINENO: checking X11/xpm.h presence" >&5 echo $ECHO_N "checking X11/xpm.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: X11/xpm.h: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: X11/xpm.h: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: X11/xpm.h: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: X11/xpm.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: X11/xpm.h: present but cannot be compiled" >&5 echo "$as_me: WARNING: X11/xpm.h: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: X11/xpm.h: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: X11/xpm.h: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: X11/xpm.h: see the Autoconf documentation" >&5 echo "$as_me: WARNING: X11/xpm.h: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: X11/xpm.h: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: X11/xpm.h: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: X11/xpm.h: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: X11/xpm.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: X11/xpm.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: X11/xpm.h: in the future, the compiler will take precedence" >&2;} ;; esac { echo "$as_me:$LINENO: checking for X11/xpm.h" >&5 echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6; } if test "${ac_cv_header_X11_xpm_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_X11_xpm_h=$ac_header_preproc fi { echo "$as_me:$LINENO: result: $ac_cv_header_X11_xpm_h" >&5 echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6; } fi if test $ac_cv_header_X11_xpm_h = yes; then : else { { echo "$as_me:$LINENO: error: Could not find X11/xpm.h" >&5 echo "$as_me: error: Could not find X11/xpm.h" >&2;} { (exit 1); exit 1; }; } fi if test "${ac_cv_header_X11_Xmu_Atoms_h+set}" = set; then { echo "$as_me:$LINENO: checking for X11/Xmu/Atoms.h" >&5 echo $ECHO_N "checking for X11/Xmu/Atoms.h... $ECHO_C" >&6; } if test "${ac_cv_header_X11_Xmu_Atoms_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi { echo "$as_me:$LINENO: result: $ac_cv_header_X11_Xmu_Atoms_h" >&5 echo "${ECHO_T}$ac_cv_header_X11_Xmu_Atoms_h" >&6; } else # Is the header compilable? { echo "$as_me:$LINENO: checking X11/Xmu/Atoms.h usability" >&5 echo $ECHO_N "checking X11/Xmu/Atoms.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? { echo "$as_me:$LINENO: checking X11/Xmu/Atoms.h presence" >&5 echo $ECHO_N "checking X11/Xmu/Atoms.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: X11/Xmu/Atoms.h: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: X11/Xmu/Atoms.h: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: X11/Xmu/Atoms.h: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: X11/Xmu/Atoms.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: X11/Xmu/Atoms.h: present but cannot be compiled" >&5 echo "$as_me: WARNING: X11/Xmu/Atoms.h: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: X11/Xmu/Atoms.h: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: X11/Xmu/Atoms.h: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: X11/Xmu/Atoms.h: see the Autoconf documentation" >&5 echo "$as_me: WARNING: X11/Xmu/Atoms.h: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: X11/Xmu/Atoms.h: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: X11/Xmu/Atoms.h: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: X11/Xmu/Atoms.h: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: X11/Xmu/Atoms.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: X11/Xmu/Atoms.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: X11/Xmu/Atoms.h: in the future, the compiler will take precedence" >&2;} ;; esac { echo "$as_me:$LINENO: checking for X11/Xmu/Atoms.h" >&5 echo $ECHO_N "checking for X11/Xmu/Atoms.h... $ECHO_C" >&6; } if test "${ac_cv_header_X11_Xmu_Atoms_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_X11_Xmu_Atoms_h=$ac_header_preproc fi { echo "$as_me:$LINENO: result: $ac_cv_header_X11_Xmu_Atoms_h" >&5 echo "${ECHO_T}$ac_cv_header_X11_Xmu_Atoms_h" >&6; } fi if test $ac_cv_header_X11_Xmu_Atoms_h = yes; then : else { { echo "$as_me:$LINENO: error: Could not find X11/Xmu/Atoms.h" >&5 echo "$as_me: error: Could not find X11/Xmu/Atoms.h" >&2;} { (exit 1); exit 1; }; } fi { echo "$as_me:$LINENO: checking for X11/Xaw3d/XawInit.h" >&5 echo $ECHO_N "checking for X11/Xaw3d/XawInit.h... $ECHO_C" >&6; } if test "${ac_cv_header_X11_Xaw3d_XawInit_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_header_X11_Xaw3d_XawInit_h=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_X11_Xaw3d_XawInit_h=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_header_X11_Xaw3d_XawInit_h" >&5 echo "${ECHO_T}$ac_cv_header_X11_Xaw3d_XawInit_h" >&6; } if test $ac_cv_header_X11_Xaw3d_XawInit_h = yes; then : else { { echo "$as_me:$LINENO: error: Could not find Xaw3d/XawInit.h" >&5 echo "$as_me: error: Could not find Xaw3d/XawInit.h" >&2;} { (exit 1); exit 1; }; } fi for ac_header in fstab.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? { echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? { echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ;; esac { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done cat >>confdefs.h <<\_ACEOF #define _GNU_SOURCE _ACEOF cat >>confdefs.h <<\_ACEOF #define _XOPEN_SOURCE _ACEOF cat >>confdefs.h <<\_ACEOF #define _BSD_SOURCE _ACEOF cat >>confdefs.h <<\_ACEOF #define _SVID_SOURCE _ACEOF cat >>confdefs.h <<\_ACEOF #define NeedFunctionPrototypes 1 _ACEOF cat >>confdefs.h <<\_ACEOF #define ENHANCE_BUGFIX _ACEOF cat >>confdefs.h <<\_ACEOF #define USE_NEW_WIDGETS _ACEOF cat >>confdefs.h <<\_ACEOF #define ENHANCE_POP_ACCEL _ACEOF cat >>confdefs.h <<\_ACEOF #define ENHANCE_HISTORY _ACEOF cat >>confdefs.h <<\_ACEOF #define ENHANCE_USERINFO _ACEOF cat >>confdefs.h <<\_ACEOF #define ENHANCE_MENU _ACEOF cat >>confdefs.h <<\_ACEOF #define ENHANCE_TRANSLATIONS _ACEOF cat >>confdefs.h <<\_ACEOF #define ENHANCE_PERMS _ACEOF cat >>confdefs.h <<\_ACEOF #define ENHANCE_SCROLL _ACEOF cat >>confdefs.h <<\_ACEOF #define ENHANCE_SELECTION _ACEOF cat >>confdefs.h <<\_ACEOF #define ENHANCE_LOG _ACEOF cat >>confdefs.h <<\_ACEOF #define ENHANCE_CMAP _ACEOF cat >>confdefs.h <<\_ACEOF #define SYSTEMWIDE_DEFAULTS _ACEOF CONFIG_VARIANT=DEFAULT # Check whether --with-config was given. if test "${with_config+set}" = set; then withval=$with_config; case "$withval" in DEFAULT) CONFIG_VARIANT=DEFAULT ;; SARGE) CONFIG_VARIANT=SARGE ;; no) { { echo "$as_me:$LINENO: error: what is --without-config supposed to tell me?" >&5 echo "$as_me: error: what is --without-config supposed to tell me?" >&2;} { (exit 1); exit 1; }; } ;; yes) { { echo "$as_me:$LINENO: error: --with-config without config specified" >&5 echo "$as_me: error: --with-config without config specified" >&2;} { (exit 1); exit 1; }; } ;; *) { { echo "$as_me:$LINENO: error: unknown config variant $withval" >&5 echo "$as_me: error: unknown config variant $withval" >&2;} { (exit 1); exit 1; }; } ;; esac fi COMPRESSIONLIBS="" # check for libz # Check whether --with-zlib was given. if test "${with_zlib+set}" = set; then withval=$with_zlib; case "$withval" in no) ;; yes) { echo "$as_me:$LINENO: checking for deflateEnd in -lz" >&5 echo $ECHO_N "checking for deflateEnd in -lz... $ECHO_C" >&6; } if test "${ac_cv_lib_z_deflateEnd+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lz $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char deflateEnd (); int main () { return deflateEnd (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_z_deflateEnd=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_z_deflateEnd=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_z_deflateEnd" >&5 echo "${ECHO_T}$ac_cv_lib_z_deflateEnd" >&6; } if test $ac_cv_lib_z_deflateEnd = yes; then if test "${ac_cv_header_zlib_h+set}" = set; then { echo "$as_me:$LINENO: checking for zlib.h" >&5 echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6; } if test "${ac_cv_header_zlib_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi { echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5 echo "${ECHO_T}$ac_cv_header_zlib_h" >&6; } else # Is the header compilable? { echo "$as_me:$LINENO: checking zlib.h usability" >&5 echo $ECHO_N "checking zlib.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? { echo "$as_me:$LINENO: checking zlib.h presence" >&5 echo $ECHO_N "checking zlib.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: zlib.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: zlib.h: present but cannot be compiled" >&5 echo "$as_me: WARNING: zlib.h: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: zlib.h: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: zlib.h: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: zlib.h: see the Autoconf documentation" >&5 echo "$as_me: WARNING: zlib.h: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: zlib.h: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: zlib.h: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: zlib.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: zlib.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: zlib.h: in the future, the compiler will take precedence" >&2;} ;; esac { echo "$as_me:$LINENO: checking for zlib.h" >&5 echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6; } if test "${ac_cv_header_zlib_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_zlib_h=$ac_header_preproc fi { echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5 echo "${ECHO_T}$ac_cv_header_zlib_h" >&6; } fi if test $ac_cv_header_zlib_h = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_ZLIB 1 _ACEOF COMPRESSIONLIBS="-lz $COMPRESSIONLIBS" else { { echo "$as_me:$LINENO: error: Could not find zlib.h" >&5 echo "$as_me: error: Could not find zlib.h" >&2;} { (exit 1); exit 1; }; } fi else { { echo "$as_me:$LINENO: error: Could not find libz" >&5 echo "$as_me: error: Could not find libz" >&2;} { (exit 1); exit 1; }; } fi ;; *) CPPFLAGS="-I$withval/include $CPPFLAGS" LDFLAGS="-L$withval/lib $LDFLAGS" { echo "$as_me:$LINENO: checking for deflateEnd in -lz" >&5 echo $ECHO_N "checking for deflateEnd in -lz... $ECHO_C" >&6; } if test "${ac_cv_lib_z_deflateEnd+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lz $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char deflateEnd (); int main () { return deflateEnd (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_z_deflateEnd=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_z_deflateEnd=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_z_deflateEnd" >&5 echo "${ECHO_T}$ac_cv_lib_z_deflateEnd" >&6; } if test $ac_cv_lib_z_deflateEnd = yes; then if test "${ac_cv_header_zlib_h+set}" = set; then { echo "$as_me:$LINENO: checking for zlib.h" >&5 echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6; } if test "${ac_cv_header_zlib_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi { echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5 echo "${ECHO_T}$ac_cv_header_zlib_h" >&6; } else # Is the header compilable? { echo "$as_me:$LINENO: checking zlib.h usability" >&5 echo $ECHO_N "checking zlib.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? { echo "$as_me:$LINENO: checking zlib.h presence" >&5 echo $ECHO_N "checking zlib.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: zlib.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: zlib.h: present but cannot be compiled" >&5 echo "$as_me: WARNING: zlib.h: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: zlib.h: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: zlib.h: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: zlib.h: see the Autoconf documentation" >&5 echo "$as_me: WARNING: zlib.h: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: zlib.h: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: zlib.h: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: zlib.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: zlib.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: zlib.h: in the future, the compiler will take precedence" >&2;} ;; esac { echo "$as_me:$LINENO: checking for zlib.h" >&5 echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6; } if test "${ac_cv_header_zlib_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_zlib_h=$ac_header_preproc fi { echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5 echo "${ECHO_T}$ac_cv_header_zlib_h" >&6; } fi if test $ac_cv_header_zlib_h = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_ZLIB 1 _ACEOF COMPRESSIONLIBS="-lz $COMPRESSIONLIBS" else { { echo "$as_me:$LINENO: error: Could not find zlib.h" >&5 echo "$as_me: error: Could not find zlib.h" >&2;} { (exit 1); exit 1; }; } fi else { { echo "$as_me:$LINENO: error: Could not find libz" >&5 echo "$as_me: error: Could not find libz" >&2;} { (exit 1); exit 1; }; } fi ;; esac else { echo "$as_me:$LINENO: checking for deflateEnd in -lz" >&5 echo $ECHO_N "checking for deflateEnd in -lz... $ECHO_C" >&6; } if test "${ac_cv_lib_z_deflateEnd+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lz $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char deflateEnd (); int main () { return deflateEnd (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_z_deflateEnd=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_z_deflateEnd=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_z_deflateEnd" >&5 echo "${ECHO_T}$ac_cv_lib_z_deflateEnd" >&6; } if test $ac_cv_lib_z_deflateEnd = yes; then if test "${ac_cv_header_zlib_h+set}" = set; then { echo "$as_me:$LINENO: checking for zlib.h" >&5 echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6; } if test "${ac_cv_header_zlib_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi { echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5 echo "${ECHO_T}$ac_cv_header_zlib_h" >&6; } else # Is the header compilable? { echo "$as_me:$LINENO: checking zlib.h usability" >&5 echo $ECHO_N "checking zlib.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? { echo "$as_me:$LINENO: checking zlib.h presence" >&5 echo $ECHO_N "checking zlib.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: zlib.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: zlib.h: present but cannot be compiled" >&5 echo "$as_me: WARNING: zlib.h: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: zlib.h: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: zlib.h: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: zlib.h: see the Autoconf documentation" >&5 echo "$as_me: WARNING: zlib.h: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: zlib.h: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: zlib.h: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: zlib.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: zlib.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: zlib.h: in the future, the compiler will take precedence" >&2;} ;; esac { echo "$as_me:$LINENO: checking for zlib.h" >&5 echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6; } if test "${ac_cv_header_zlib_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_zlib_h=$ac_header_preproc fi { echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5 echo "${ECHO_T}$ac_cv_header_zlib_h" >&6; } fi if test $ac_cv_header_zlib_h = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_ZLIB 1 _ACEOF COMPRESSIONLIBS="-lz $COMPRESSIONLIBS" else { echo "$as_me:$LINENO: WARNING: Could not find zlib.h" >&5 echo "$as_me: WARNING: Could not find zlib.h" >&2;} fi else { echo "$as_me:$LINENO: WARNING: Could not find libz" >&5 echo "$as_me: WARNING: Could not find libz" >&2;} fi fi # check for libbz2 # Check whether --with-libbz2 was given. if test "${with_libbz2+set}" = set; then withval=$with_libbz2; case "$withval" in no) ;; yes) { echo "$as_me:$LINENO: checking for BZ2_bzDecompressEnd in -lbz2" >&5 echo $ECHO_N "checking for BZ2_bzDecompressEnd in -lbz2... $ECHO_C" >&6; } if test "${ac_cv_lib_bz2_BZ2_bzDecompressEnd+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbz2 $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char BZ2_bzDecompressEnd (); int main () { return BZ2_bzDecompressEnd (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_bz2_BZ2_bzDecompressEnd=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_bz2_BZ2_bzDecompressEnd=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_bz2_BZ2_bzDecompressEnd" >&5 echo "${ECHO_T}$ac_cv_lib_bz2_BZ2_bzDecompressEnd" >&6; } if test $ac_cv_lib_bz2_BZ2_bzDecompressEnd = yes; then if test "${ac_cv_header_bzlib_h+set}" = set; then { echo "$as_me:$LINENO: checking for bzlib.h" >&5 echo $ECHO_N "checking for bzlib.h... $ECHO_C" >&6; } if test "${ac_cv_header_bzlib_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi { echo "$as_me:$LINENO: result: $ac_cv_header_bzlib_h" >&5 echo "${ECHO_T}$ac_cv_header_bzlib_h" >&6; } else # Is the header compilable? { echo "$as_me:$LINENO: checking bzlib.h usability" >&5 echo $ECHO_N "checking bzlib.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? { echo "$as_me:$LINENO: checking bzlib.h presence" >&5 echo $ECHO_N "checking bzlib.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: bzlib.h: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: bzlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: bzlib.h: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: bzlib.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: bzlib.h: present but cannot be compiled" >&5 echo "$as_me: WARNING: bzlib.h: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: bzlib.h: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: bzlib.h: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: bzlib.h: see the Autoconf documentation" >&5 echo "$as_me: WARNING: bzlib.h: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: bzlib.h: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: bzlib.h: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: bzlib.h: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: bzlib.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: bzlib.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: bzlib.h: in the future, the compiler will take precedence" >&2;} ;; esac { echo "$as_me:$LINENO: checking for bzlib.h" >&5 echo $ECHO_N "checking for bzlib.h... $ECHO_C" >&6; } if test "${ac_cv_header_bzlib_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_bzlib_h=$ac_header_preproc fi { echo "$as_me:$LINENO: result: $ac_cv_header_bzlib_h" >&5 echo "${ECHO_T}$ac_cv_header_bzlib_h" >&6; } fi if test $ac_cv_header_bzlib_h = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBBZ2 1 _ACEOF COMPRESSIONLIBS="-lbz2 $COMPRESSIONLIBS" else { { echo "$as_me:$LINENO: error: Could not find bzlib.h" >&5 echo "$as_me: error: Could not find bzlib.h" >&2;} { (exit 1); exit 1; }; } fi else { { echo "$as_me:$LINENO: error: Could not find libbz2" >&5 echo "$as_me: error: Could not find libbz2" >&2;} { (exit 1); exit 1; }; } fi ;; *) CPPFLAGS="-I$withval/include $CPPFLAGS" LDFLAGS="-L$withval/lib $LDFLAGS" { echo "$as_me:$LINENO: checking for BZ2_bzDecompressEnd in -lbz2" >&5 echo $ECHO_N "checking for BZ2_bzDecompressEnd in -lbz2... $ECHO_C" >&6; } if test "${ac_cv_lib_bz2_BZ2_bzDecompressEnd+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbz2 $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char BZ2_bzDecompressEnd (); int main () { return BZ2_bzDecompressEnd (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_bz2_BZ2_bzDecompressEnd=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_bz2_BZ2_bzDecompressEnd=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_bz2_BZ2_bzDecompressEnd" >&5 echo "${ECHO_T}$ac_cv_lib_bz2_BZ2_bzDecompressEnd" >&6; } if test $ac_cv_lib_bz2_BZ2_bzDecompressEnd = yes; then if test "${ac_cv_header_bzlib_h+set}" = set; then { echo "$as_me:$LINENO: checking for bzlib.h" >&5 echo $ECHO_N "checking for bzlib.h... $ECHO_C" >&6; } if test "${ac_cv_header_bzlib_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi { echo "$as_me:$LINENO: result: $ac_cv_header_bzlib_h" >&5 echo "${ECHO_T}$ac_cv_header_bzlib_h" >&6; } else # Is the header compilable? { echo "$as_me:$LINENO: checking bzlib.h usability" >&5 echo $ECHO_N "checking bzlib.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? { echo "$as_me:$LINENO: checking bzlib.h presence" >&5 echo $ECHO_N "checking bzlib.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: bzlib.h: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: bzlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: bzlib.h: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: bzlib.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: bzlib.h: present but cannot be compiled" >&5 echo "$as_me: WARNING: bzlib.h: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: bzlib.h: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: bzlib.h: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: bzlib.h: see the Autoconf documentation" >&5 echo "$as_me: WARNING: bzlib.h: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: bzlib.h: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: bzlib.h: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: bzlib.h: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: bzlib.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: bzlib.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: bzlib.h: in the future, the compiler will take precedence" >&2;} ;; esac { echo "$as_me:$LINENO: checking for bzlib.h" >&5 echo $ECHO_N "checking for bzlib.h... $ECHO_C" >&6; } if test "${ac_cv_header_bzlib_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_bzlib_h=$ac_header_preproc fi { echo "$as_me:$LINENO: result: $ac_cv_header_bzlib_h" >&5 echo "${ECHO_T}$ac_cv_header_bzlib_h" >&6; } fi if test $ac_cv_header_bzlib_h = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBBZ2 1 _ACEOF COMPRESSIONLIBS="-lbz2 $COMPRESSIONLIBS" else { { echo "$as_me:$LINENO: error: Could not find bzlib.h" >&5 echo "$as_me: error: Could not find bzlib.h" >&2;} { (exit 1); exit 1; }; } fi else { { echo "$as_me:$LINENO: error: Could not find libbz2" >&5 echo "$as_me: error: Could not find libbz2" >&2;} { (exit 1); exit 1; }; } fi ;; esac fi ac_config_files="$ac_config_files src/Makefile icons/Makefile defaults/Makefile images/Makefile doc/Makefile Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # 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. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( *) $as_unset $ac_var ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote # substitution turns \\\\ into \\, and sed turns \\ into \). sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then test "x$cache_file" != "x/dev/null" && { echo "$as_me:$LINENO: updating cache $cache_file" >&5 echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi : ${CONFIG_STATUS=./config.status} ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 echo "$as_me: creating $CONFIG_STATUS" >&6;} cat >$CONFIG_STATUS <<_ACEOF #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi # PATH needs CR # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) as_nl=' ' IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 { (exit 1); exit 1; } fi # Work around bugs in pre-3.0 UWIN ksh. for as_var in ENV MAIL MAILPATH do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var fi done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # CDPATH. $as_unset CDPATH as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line after each line using $LINENO; the second 'sed' # does the real work. The second script uses 'N' to pair each # line-number line with the line containing $LINENO, and appends # trailing '-' during substitution so that $LINENO is not a special # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # scripts with optimization help from Paolo Bonzini. Blame Lee # E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in -n*) case `echo 'x\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. *) ECHO_C='\c';; esac;; *) ECHO_N='-n';; esac if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir fi echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 # Save the log message, to keep $[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by $as_me, which was generated by GNU Autoconf 2.61. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF cat >>$CONFIG_STATUS <<_ACEOF # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ config.status configured by $0, generated by GNU Autoconf 2.61, with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" Copyright (C) 2006 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # If no file are specified by the user, then we need to provide default # value. By we need to know if files were specified by the user. ac_need_defaults=: while test $# != 0 do case $1 in --*=*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) echo "$ac_cs_version"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift CONFIG_FILES="$CONFIG_FILES $ac_optarg" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header { echo "$as_me: error: ambiguous option: $1 Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; };; --help | --hel | -h ) echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) { echo "$as_me: error: unrecognized option: $1 Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *) ac_config_targets="$ac_config_targets $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF if \$ac_cs_recheck; then echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 CONFIG_SHELL=$SHELL export CONFIG_SHELL exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "xfmconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS xfmconfig.h" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; "icons/Makefile") CONFIG_FILES="$CONFIG_FILES icons/Makefile" ;; "defaults/Makefile") CONFIG_FILES="$CONFIG_FILES defaults/Makefile" ;; "images/Makefile") CONFIG_FILES="$CONFIG_FILES images/Makefile" ;; "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= trap 'exit_status=$? { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status ' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || { echo "$me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } # # Set up the sed scripts for CONFIG_FILES section. # # No need to generate the scripts if there are no CONFIG_FILES. # This happens for instance when ./config.status config.h if test -n "$CONFIG_FILES"; then _ACEOF ac_delim='%!_!# ' for ac_last_try in false false false false false :; do cat >conf$$subs.sed <<_ACEOF SHELL!$SHELL$ac_delim PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim PACKAGE_NAME!$PACKAGE_NAME$ac_delim PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim PACKAGE_STRING!$PACKAGE_STRING$ac_delim PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim exec_prefix!$exec_prefix$ac_delim prefix!$prefix$ac_delim program_transform_name!$program_transform_name$ac_delim bindir!$bindir$ac_delim sbindir!$sbindir$ac_delim libexecdir!$libexecdir$ac_delim datarootdir!$datarootdir$ac_delim datadir!$datadir$ac_delim sysconfdir!$sysconfdir$ac_delim sharedstatedir!$sharedstatedir$ac_delim localstatedir!$localstatedir$ac_delim includedir!$includedir$ac_delim oldincludedir!$oldincludedir$ac_delim docdir!$docdir$ac_delim infodir!$infodir$ac_delim htmldir!$htmldir$ac_delim dvidir!$dvidir$ac_delim pdfdir!$pdfdir$ac_delim psdir!$psdir$ac_delim libdir!$libdir$ac_delim localedir!$localedir$ac_delim mandir!$mandir$ac_delim DEFS!$DEFS$ac_delim ECHO_C!$ECHO_C$ac_delim ECHO_N!$ECHO_N$ac_delim ECHO_T!$ECHO_T$ac_delim LIBS!$LIBS$ac_delim build_alias!$build_alias$ac_delim host_alias!$host_alias$ac_delim target_alias!$target_alias$ac_delim INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim INSTALL_DATA!$INSTALL_DATA$ac_delim am__isrc!$am__isrc$ac_delim CYGPATH_W!$CYGPATH_W$ac_delim PACKAGE!$PACKAGE$ac_delim VERSION!$VERSION$ac_delim ACLOCAL!$ACLOCAL$ac_delim AUTOCONF!$AUTOCONF$ac_delim AUTOMAKE!$AUTOMAKE$ac_delim AUTOHEADER!$AUTOHEADER$ac_delim MAKEINFO!$MAKEINFO$ac_delim install_sh!$install_sh$ac_delim STRIP!$STRIP$ac_delim INSTALL_STRIP_PROGRAM!$INSTALL_STRIP_PROGRAM$ac_delim mkdir_p!$mkdir_p$ac_delim AWK!$AWK$ac_delim SET_MAKE!$SET_MAKE$ac_delim am__leading_dot!$am__leading_dot$ac_delim AMTAR!$AMTAR$ac_delim am__tar!$am__tar$ac_delim am__untar!$am__untar$ac_delim MAINTAINER_MODE_TRUE!$MAINTAINER_MODE_TRUE$ac_delim MAINTAINER_MODE_FALSE!$MAINTAINER_MODE_FALSE$ac_delim MAINT!$MAINT$ac_delim CC!$CC$ac_delim CFLAGS!$CFLAGS$ac_delim LDFLAGS!$LDFLAGS$ac_delim CPPFLAGS!$CPPFLAGS$ac_delim ac_ct_CC!$ac_ct_CC$ac_delim EXEEXT!$EXEEXT$ac_delim OBJEXT!$OBJEXT$ac_delim DEPDIR!$DEPDIR$ac_delim am__include!$am__include$ac_delim am__quote!$am__quote$ac_delim AMDEP_TRUE!$AMDEP_TRUE$ac_delim AMDEP_FALSE!$AMDEP_FALSE$ac_delim AMDEPBACKSLASH!$AMDEPBACKSLASH$ac_delim CCDEPMODE!$CCDEPMODE$ac_delim am__fastdepCC_TRUE!$am__fastdepCC_TRUE$ac_delim am__fastdepCC_FALSE!$am__fastdepCC_FALSE$ac_delim CPP!$CPP$ac_delim GREP!$GREP$ac_delim EGREP!$EGREP$ac_delim CONFIG_VARIANT!$CONFIG_VARIANT$ac_delim COMPRESSIONLIBS!$COMPRESSIONLIBS$ac_delim LIBOBJS!$LIBOBJS$ac_delim LTLIBOBJS!$LTLIBOBJS$ac_delim _ACEOF if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 85; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` if test -n "$ac_eof"; then ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` ac_eof=`expr $ac_eof + 1` fi cat >>$CONFIG_STATUS <<_ACEOF cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof /@[a-zA-Z_][a-zA-Z_0-9]*@/!b end _ACEOF sed ' s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g s/^/s,@/; s/!/@,|#_!!_#|/ :n t n s/'"$ac_delim"'$/,g/; t s/$/\\/; p N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n ' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF :end s/|#_!!_#|//g CEOF$ac_eof _ACEOF # VPATH may cause trouble with some makes, so we remove $(srcdir), # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=/{ s/:*\$(srcdir):*/:/ s/:*\${srcdir}:*/:/ s/:*@srcdir@:*/:/ s/^\([^=]*=[ ]*\):*/\1/ s/:*$// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF fi # test -n "$CONFIG_FILES" for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 echo "$as_me: error: Invalid tag $ac_tag." >&2;} { (exit 1); exit 1; }; };; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 echo "$as_me: error: cannot find input file: $ac_f" >&2;} { (exit 1); exit 1; }; };; esac ac_file_inputs="$ac_file_inputs $ac_f" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input="Generated from "`IFS=: echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { echo "$as_me:$LINENO: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} fi case $ac_tag in *:-:* | *:-) cat >"$tmp/stdin";; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` { as_dir="$ac_dir" case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= case `sed -n '/datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p ' $ac_file_inputs` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF sed "$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s&@configure_input@&$configure_input&;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " $ac_file_inputs | sed -f "$tmp/subs-1.sed" >$tmp/out test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&5 echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&2;} rm -f "$tmp/stdin" case $ac_file in -) cat "$tmp/out"; rm -f "$tmp/out";; *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;; esac ;; :H) # # CONFIG_HEADER # _ACEOF # Transform confdefs.h into a sed script `conftest.defines', that # substitutes the proper values into config.h.in to produce config.h. rm -f conftest.defines conftest.tail # First, append a space to every undef/define line, to ease matching. echo 's/$/ /' >conftest.defines # Then, protect against being on the right side of a sed subst, or in # an unquoted here document, in config.status. If some macros were # called several times there might be several #defines for the same # symbol, which is useless. But do not sort them, since the last # AC_DEFINE must be honored. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* # These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where # NAME is the cpp macro being defined, VALUE is the value it is being given. # PARAMS is the parameter list in the macro definition--in most cases, it's # just an empty string. ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*' ac_dB='\\)[ (].*,\\1define\\2' ac_dC=' ' ac_dD=' ,' uniq confdefs.h | sed -n ' t rset :rset s/^[ ]*#[ ]*define[ ][ ]*// t ok d :ok s/[\\&,]/\\&/g s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p ' >>conftest.defines # Remove the space that was appended to ease matching. # Then replace #undef with comments. This is necessary, for # example, in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. # (The regexp can be short, since the line contains either #define or #undef.) echo 's/ $// s,^[ #]*u.*,/* & */,' >>conftest.defines # Break up conftest.defines: ac_max_sed_lines=50 # First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1" # Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2" # Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1" # et cetera. ac_in='$ac_file_inputs' ac_out='"$tmp/out1"' ac_nxt='"$tmp/out2"' while : do # Write a here document: cat >>$CONFIG_STATUS <<_ACEOF # First, check the format of the line: cat >"\$tmp/defines.sed" <<\\CEOF /^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def /^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def b :def _ACEOF sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS echo 'CEOF sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail grep . conftest.tail >/dev/null || break rm -f conftest.defines mv conftest.tail conftest.defines done rm -f conftest.defines conftest.tail echo "ac_result=$ac_in" >>$CONFIG_STATUS cat >>$CONFIG_STATUS <<\_ACEOF if test x"$ac_file" != x-; then echo "/* $configure_input */" >"$tmp/config.h" cat "$ac_result" >>"$tmp/config.h" if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 echo "$as_me: $ac_file is unchanged" >&6;} else rm -f $ac_file mv "$tmp/config.h" $ac_file fi else echo "/* $configure_input */" cat "$ac_result" fi rm -f "$tmp/out12" # Compute $ac_file's index in $config_headers. _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $ac_file | $ac_file:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $ac_file" >`$as_dirname -- $ac_file || $as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X$ac_file : 'X\(//\)[^/]' \| \ X$ac_file : 'X\(//\)$' \| \ X$ac_file : 'X\(/\)' \| . 2>/dev/null || echo X$ac_file | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'`/stamp-h$_am_stamp_count ;; :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5 echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| . 2>/dev/null || echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| . 2>/dev/null || echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` { as_dir=$dirpart/$fdir case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done ;; esac done # for ac_tag { (exit 0); exit 0; } _ACEOF chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || { (exit 1); exit 1; } fi xfm-1.5.4/AUTHORS0000644000175000017500000000174710320017072010305 00000000000000 XFM - The X File Manager (ver 1.4.3brl) ------------------------------------ (c) Simon Marlow 1990-1993 simonm@dcs.glasgow.ac.uk (c) Albert Graef 1994-1997 ag@muwiinfa.geschichte.uni-mainz.de (c) Till Straumann 1997 strauman@sun6hft.ee.tu-berlin.de some changes: (c) Bernhard R. Link 2003-2005 brlink@debian.org 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA xfm-1.5.4/COPYING0000644000175000017500000004313310320017072010263 00000000000000 GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 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 of the License, 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. xfm-1.5.4/ChangeLog0000644000175000017500000011125110744135445011016 000000000000002008-01-18 Bernhard R. Link * add a default mailcap entry for application/msword calling openoffice, overwriting system's mailcap (but not ~/.mailcap), to avoid openoffice confused by excel files detected as word files. * if a filename is given to a program to start in form of a symlink, and the mailcap entry specifies no extension, use the one of the filename (instead of none as before) * detect '%s' in mailcap command templates reduce the characters causing it always to be called via symlink to \ and '. * fix typo leading to double-free and segfaults in rename 2007-12-29 Bernhard R. Link * add support for Btn4 and Btn5 (mouse wheel) (Fm.h, Xfm.m4, FmMain.c FmViewportScroll.c IconFileList.c TextFileList.c) * don't abort when switching fastly back to iconfilelist 2007-08-12 Bernhard R. Link * duplicate confirm dialog to one per window, setting TransientFor to the specific window. (Fm.h, FmAwActions.c, FmAwCb.c, FmConfirm.c, FmDelete.c, FmFwActions.c, FmFwCb.c, FmMain.c, FmPopup.c) * dito with info dialog (Fm.h, FmInfo.h, FmMain.c) * override simpleMenu behaviour to first popdown and only then trigger the action, avoiding icewm to put the menu above the confirm Dialogs. 2007-08-11 Bernhard R. Link * duplicate about, chmod, mkdir, createFile, goto, rename, move, copy, link, select and filter dialogs to one per window (though not created at startup, but on demand), setting TransientFor to the specific window to work around IceWM not bringem them to the foreground. (Fm.h, FmAwActions.c, FmAwCb.c, FmAwPopup.c, FmChmod.c, FmFw.c, FmFwCb.c, FmMain.c, FmPopup.c, FmUtils.c) 2007-08-10 Bernhard R. Link * remove some more static buffers * remove in-place filename expansion (FmHistory.*, FmOps.c, FmPopup.c) 2007-08-09 Bernhard R. Link * add xstrdup (FmOps.c, Fm.h) * shorten filenames to fit into the boxes in Icon view (FileList.c, FileListP.h, FmDirs.c, IconFileList.c) * remove some usages of MAXPATHLEN and static buffer. (Many still left) 2006-11-30 Bernhard R. Link * add icon for application/x-iso9660 files * symlink vnd.sun.xml.* to vnd.oasis. icons 2006-09-27 Bernhard R. Link * fix c&p error in buffer length calculation in mime.c * silence automake warning against += without previous = 2006-04-22 Bernhard R. Link * default application file is now called Apps.xfm (FmMain.c, Xfm.m4) * some icon movement, choose some to install * append .xfm to newly created application groups. (Fm.h, FmAwPopup.c, FmOps.c) * not-absolute application group files are searched for in applicationDataDir and the new systemwideApplicationDataDir. (Fm.h, FmAw.c, FmMain.c, Xfm.m4) * add default Apps.xfm and Graphics.xfm * do not set wrong icon for directory (FmAwActions.c) 2006-04-20 Bernhard R. Link * rename all default config files, so that they start with xfm_ * processing all manpages by sed so that: * xfmmailcap and the manpages now include the sysconfdir xfm is actually compiled with. (*.?, xfmtype.c, global.h, FmMain.c) * avoid "missing sentinel" warnings of newer gcc ( FmBitmaps.c, FmChmod.c, FmFw.c, FmHistory.c, FmLog.c, FmSelection.c, Textfield.c, FmMain.c) * files containing a '\0' are binary and not ascii now (magic.c) * detect types described mime.types when compressed and when not the shortest possible suffix (magic.c, suffix.c) 2006-04-19 Bernhard R. Link * fix copy and paste errors in FmPopup.c introduced in 1.8 * reenable ENHANCE_LOG, but make it only log the output of external programs to avoid deathlocks. (FmLog.c, execute.h) * do not do reverse deletion or ask weather to do it if a directory is empty. (FmDelete.c) 2006-04-18 Bernhard R. Link * repair nametemplate handling in mime_start.c * move some generic stuff from mime_start.c to mime.c, * repair xfmmailcap to do something related to xfm. * add a xfmmailcap.1 man page * add a xfm_mailcap.5 man page * update xfmtype.1 and fix xfmtype.c to do what the manpage tells. * update xfm.1 * remove configFile resource not used anywhere anymore 2006-04-17 Bernhard R. Link * add compatibility code when input application window description still contain the obsolete filename field. ( Fm.h, FmAw.c, FmAwActions.c, FmOps.c) * add GETFSENT pdeuso-entry for xfmdev to read available mount points via getfsent. Only decrement mount count when previousy mounted. ( Fm.h, FmDirs.c, FmFw.c) * if XFM-DEVICES gets LOADed, a non-modifiable menu with all the devices known is created. ( Am.h, Fm.h, FmAw.c, FmAwActions.c, FmAwPopup.c, FmFw.c, FmMain.c) * move all included and yet installed images to images/ ( FmBitmaps.c) * tell make dist what to include * implement icon determination code for XFM-DEVICES ( FmFw.c) * move manpages to doc/ and add xfm.5 and xfmdev.5. 2006-04-16 Bernhard R. Link * show disabled cursor for AW drags if dropping is not possible ( Xfm.m4, FmAwActions.c, * reenable draging files on AW items, no longer taking the items filename into account. ( Fm.h, FmAwActions.c, FmFw.c, FmFwActions.c, execute.c) * depreceate filename field of AW ( Am.h, Fm.h, FmAw.c, FmAwActions.c, FmAwCb.c, FmAwPopup.c, FmOps.c, mime_start.c) 2006-04-14 Bernhard R. Link * various draging improvements: - show by cursor if things cannot be dropped currently - disable kwm workaround and catch leave and enter events again - move cursor handling into new drag_set_dropable (Xfm.m4, Am.h, FileList.c, Fm.h, FmAw.c, FmAwActions.c, FmFwActions.c) 2006-04-06 Bernhard R. Link * fix bug introduces in dispatchDirFile (FileList.c) 2006-04-05 Bernhard R. Link * show the type the action is for (mime_start.c, mime.c, mime.h) * error out when no action found for a file, do not print empty actions. (FmFwActions.c, mime_start.c) 2006-04-04 Bernhard R. Link * remove fileExecFile action and change dispatchDirExeFile to dispatchDirFile, replace dispatchDirExeFilePopup by grabMouseForPopup. (Xfm.m4, FileList.c, Fm.h, FileList.h, FileList.c, FmFwActions.c, IconFileList.c, TextFileList.c) * new resources editor, viewer, xterminal, xtermalon and shell of type XtRCommandArgs. (not given to shell like the older ones) remove defaultEditor, defaultViewer, defaultXterm, bourneShells, shellCommand. (Fm.h, FmFw.c, FmFwActions.c, FmMain.c, xfm.man, execute.c, mime_start.c, execute.h) * new resource echoMimeSearch to display what possibilities are checked when starting a file. (Fm.h, FmMain.c, mime_start.c) 2006-04-03 Bernhard R. Link * reenable appDefaults version check 2006-03-20 Bernhard R. Link * move resources.app_file to aw.app_file and make it a pointer instead of a static array, also make {read,write}ApplicationData to only use that variable. (Am.h, Fm.h, FmAw.c, FmAwActions.c, FmAwCb.c, FmAwPopup.c, FmMain.c) * remove static message array from FmChmod.c * initialize dialog flag and end of line in varPopup and close a memory hole in createPopupQuestions (FmUtils.c) 2006-03-19 Bernhard R. Link * create one set of popup menus per FileWindow, removing the need for the popup_fw variable. (Fm.h, FmChmod.c, FmDelete.c, FmFw.c, FmFwActions.c, FmFwCb.c, FmInfo.c, FmPopup.c) * move stuff from CFLAGS to xfmconfig.h * fix strange value given to XtCallActionProc (src/FileList.c) * increment FmVersion to denote the AppDefault format changes (FmVersion.h) * quite compiler warnings by making more stuff const char, unsigned, __attribute__ed, renamed to not shadow, or casted. (Am.h, Fm.h, FmAw.c, FmChmod.c, FmConfirm.c, FmDirs.c, FmErrors.c, FmFw.c, FmHistory.c, FmHistory.h, FmInfo.c, FmMain.c, FmOps.c, FmPopup.c, FmSelection.c, FmSelection.h, FmStringDefs.h, FmUtils.c, IconFileList.c, TextField.c, TextFieldP.h, TextFileList.c, execute.c, magic.c, magic.h, mime.c) * make varPopup always alloc its return value, as some code is free'ing it now. 2006-03-18 Bernhard R. Link * make un*zip static and avoid uninitialized warnings (magic.c) * remove the non-ENHANCE_TXT_FIELD case (FmAwPopup.c, FmAwCb.c, FmHistory.c, FmMain.c, FmUtils.c * seperate static popup question data from answers, less global variables) (Fm.h, FmAwPopup.c, FmAwCb.c, FmInfo.c, FmPopup.c, FmUtils.c) * more typesafe Callbacks (Am.h, Fm.h, FmAw.c, FmChmod.c, FmConfirm.c, FmErrors.c, FmFw.c, FmFwCb.c, FmInfo.c, FmPopup.c, FmUtils.c) 2006-02-07 Bernhard R. Link * add support to detect gzipped and bzipped files and look into them for their file type. (magic.c) * flip gzip modifier image (IconFileList.c) 2006-02-06 Bernhard R. Link * draw file_modifiers (symlink, gzipped, bzipped) over icons. 2006-02-05 Bernhard R. Link * IconFileWindow size fixup: - limit maximal extends to 32000 to cope with broken X servers - if vertical extend is too large, increase horizontal instead. - always show horizontal scroll bars when needed - add a new maxLabelWidth resource to limit filename writing over that limit. 2006-01-15 Bernhard R. Link * major clean up: - use prototypes regardless of NeedPrototypes - mark unused variables - some signed/unsigned fixes (almost all files) 2006-01-01 Bernhard R. Link * ignore magic rules needing more than 1024 bytes of a file. (customizeable with the new maxMagicRead resource). (Fm.h, FmFw.c, FmMain.c, magic.c, magic.h, xfmtype.c) 2005-12-30 Bernhard R. Link * add loadFileIcon and do not search in the icon dir with loadIcon. (therfore adding a new icon_dir resource) (FmMain.c, Fm.hm, FmBitmaps.c, FmOps.c) * icons to show are determined by mime-type and programs to start are selected by mailcap database. (FileList.c, Fm.h, FmAwActions.c, FmBitmaps.c, FmDelete.c, FmDirs.c, FmFw.c, FmFwActions.c, FmInfo.c, FmMain.c, FmOps.c, IconFileList.c, TextFileList.c, magic.c, magic.h, mime.c, mime.h, xfmmailcap.c, xfmtype.c, execute.c, execute.h) 2005-12-10 Bernhard R. Link * add arbitrary environment variable parsing within ConfigFile-name expansion. Move expansion into a resource conversion routine (Fm.h, FmMain.c, FmOps.c) * replace update of obsolete resource conversion via XtAppAddConverter for SortType DisplayType with XtSetTypeConverter. (FmMain.c) 2005-12-09 Bernhard R. Link * add application/x-xfm icon * improve magicfile: do not use buggy gnome data, do not override directory data, fix postscript mime type 2005-12-08 Bernhard R. Link * move application file loading code into single instance within FmAw.c (Am.h, FmAw.c, FmAwActions.c, FmAwCb.c, FmFwActions.c) * set default to IconView and not showing inodes in TextView 2005-11-24 Bernhard R. Link * remove support for "builtin" magic rule (as those have changed their values anyway) * magic recognition can now also returns the corresponding mime type (which is looked for at parse time). (magic.c, magic.h, Fm.h, xfmtype.c, FmDirs.c, FmFw.c) * add prototypes, correct prototypes, make local functions static, fix parameter types. (Am.h, Fm.h, FmAw.c, FmAwCb.c, FmAwPopup.c, FmBitmaps.c, FmChmod.c, FmConfirm.c, FmErrors.c, FmFw.c, FmFwActions.c, FmFwCb.c, FmMain.c, FmPopup.c, FocusForm.c, TextField.c, magic.h) * TftDrawShadows gets relief field it has in Xaw3d (TextField.c) 2005-11-22 Bernhard R. Link * When parsing magic files, subtype expressions replace the message instead of appending it. (Makes the code a bit simpler and needed for coming move to mime-types) Also move declarations into magic.h and the prior content of magic.h to magic.c. (Fm.h,magic.h,magic.c,FmDirs.c,FmFw.c,FmInfo.c, xfmtype.c) 2005-11-20 Bernhard R. Link * calculate fallback resources compilied into the binary from the app-defaults file. (FmMain.c) 2005-11-17 Bernhard R. Link * create app-defaults file and install it with make install * place some default translations into builtin classes (FmMain.c, TextFileList.c, IconFileList.c, FmFw.c) * place default into binary, too. (FmMain.c) * reenable viewport-hack (FmFw.c) * disable ENHANCE_LOG until I have time to implement it properly (can block when it writes itself too much into stderr) * Fix wrong index when to menu title is there (FmHistory.c) 2005-11-12 Bernhard R. Link * Add an "Any" to the modifier map of translations causing popup menus to show up. This avoids them opening non-functional when NumLock is activated. 2005-11-01 Bernhard R. Link * use memcpy instead of strcpy to copy magic strings into place to avoid problems with '\000\021' magic for application/x-tex-tfm. (magic.c) All praise valgrind for finding that one. * refactor application windows' icon loading a bit move unescaping and bitmap loading into parseApp, all icon loading into readApplicationBitmap, choose default icon based on action and not on file type. (Am.h, FmAw.c, FmAwCb.c) * Make it compile with -std=c99 -pedantic. (FmBitmaps.c, FmErrors.c, magic.c, mime.c, lib/bitmaps/xfm_*.xbm) 2005-10-31 Bernhard R. Link * replace readIcon by loadIcon, caching requests for icons and keeping them in memory, not free'ing them. (Am.h, Fm.h, FmAw.c, FmAwActions.c, FmBitmaps.c, FmFw.c, FmOps.c, FmUtils.c) 2005-10-30 Bernhard R. Link * Clean up FmBitmaps.c code a bit (moving #ifdefs into readPixmap, splitting that into FromFile and FromData for better type checking and readability) (FmBitmaps.c) * properly add -Wall, fix some subtilities that got missed as it was not enabled as expected. (Makefile.am, FmFw.c, xfmmailcap.c) 2005-10-29 Bernhard R. Link * more built in types and all in mime-type format (magic.c, xfmtype.man) * remove code for disabled XPM, ENHANCE_3DICONS and ENHANCE_CURSOR; tidy up Fm.h and FmBitmaps.c a bit (configure.in,Makefile.am, Fm.h, FmBitmaps.c, FmAw.c, FmFw.c, FmMain.c) * replace lib/pixmaps/xfm_{file,files,dir,icon,appmgr,xymlnk}.xpm by contrib/3dicons/icons/{file,files,folder,folder,suitcase,link}.xpm 2005-10-23 Bernhard R. Link * remove support to switch off MAGIC_HEADER (FileList.c, Fm.h, FmBitmaps.c, FmDirs.c, FmFw.c, FmInfo.c, FmMain.c, xfm.man) * add system_mailcap_file and mailcap_file resource to read (Fm.h, FmFw.c, FmMain.c) * move some expanded values away from a fixed size array to variable sized variables. (Fm.h, FmFw.c, FmMain.c, FmOps.c) * fix forgotten count = 0 in magic_parse_single_file (magic.c) and fix default magic file accordingly (contrib/3dicons/magic) * add mime_get_betworking (mime.c, mime.h, xfmmailcap.c) * add include statement (mime.c) and include default magic file using it. (contrib/3dicons/mime) 2005-10-22 Bernhard R. Link * implement running tests specified by mailcap (mime.c) 2005-10-19 Bernhard R. Link * Replace all Xaw includes by Xaw3d. (avoiding to mix them) * remove -lXext -lSM -lICE as not needed. 2005-10-17 Bernhard R. Link * add checks for some headers in configure.in * add start of mime.c and xfmmailcap.c to parse mailcap files. 2005-10-17 Bernhard R. Link * 'include:' file's and gnome's mime-magic into the default magic file. * use text/plain and application/octet-stream as fallback types instead of ascii and data (magic.c) * rewrite default xfrm file to use those mime types as magic values. 2005-10-15 Bernhard R. Link * add xfmconfig.h to all files, declaring some preprocessor switches there instead of by compiler command line (*.c) * change some typing to make gcc's aliasing rules happier (TextField.c, FmSelection.c) * add an include: directive for magic files (magic.c) 2005-10-02 Bernhard R. Link * Place GPL notice in every file, update FSF postal address, remove old cvs Ids, ... (all src/*.{c,h} files) * fix some compiler warnings (xfmtype.c, FmFw.c, FmExec.c, FmErrors.c) 2005-03-24 Bernhard R. Link * Always specify xpm_attributes, avoiding segfaults with full color palette (FmBitmaps.c) 2004-06-21 Bernhard R. Link * fix some compiler warnings (FmAwActions.c, FmBitmaps.c, FmDelete.c, FmFwActions.c, FmFwCb.c, FmHistory.c, FmMain.c, FmOps.c, FmPopup.c, FmSelection.c, FmUtils.c, TextField.c) * fix possible buffer overflow (FmDirs.c) * begin changing magic.c to use regexps from libc. 2003-08-27 Bernhard R. Link * ad 'systemwide' configfiles to be read when no user supplied are available (FmAw.c, FmAwCb.c, FmMain.c) 2001-09-03 root Release 1.4.3 * fixed some bugs in magic.c (patch snapped from xplore), updated magic files accordingly (*NOTE*: this might break older setups, so make sure you update your personal magic file!) * added Bob Woodside's double click patch for the application window (FmAw.c) 2000-05-11 Till Straumann Patchlevel 1.4.2patchl05 * fixed problems with `kwm' hanging on session logout. We now participate to the WM_SAVE_YOURSELF protocol (and even set KWM_SAVE_YOURSELF if kwm seems to be running). * fixed the `ugly text display of long group names' problem which occurred when a text display list contained only one entry [..] 2000-01-17 Albert Graef Patchlevel 1.4.2patchl04 * added some trivial changes to fix compilation probs on SuSE Linux 6.3 and Solaris 2.x, and tweaked some of the resources in Xfm.cpp (nicer selection color, no borders on labels in dialogs when using Xaw3d) * updated ChangeLog 2000-01-17 Till Straumann Patchlevel 1.4.2patchl03 This patch fixes a couple of bugs in 1.4.2: * xfm sometimes crashed when creating a text display (e.g. by cloning a text display or setting the `defaultDisplayType' or `initialDisplayType' resources). * the `options' menu button disappeared when the text display was updated. * double clicks in the file window finally work in ol[v]wm/kwm even if the focus policy is "click to focus" (app window still needs to be fixed) * popup windows didn't handle the WM_DELETE_WINDOW protocol. * the `-version' option should work and show the release number as well as the patchlevel. * The `TextField: cursor position out of range' warnings should have gone. TextField has been used for other apps and has got a couple of new features (currently not used by xfm). Fri Oct 31 08:06:33 1997 Albert Graef (ag@muwiinfa.geschichte.uni-mainz.de) Release 1.4.2 * integrated some last-minute patches from Till * some more bug fixes and final touches for the forthcoming public release * integrated the new 3dicons setup and made it the default (Imake.options, Imakefile) * added WM_DELETE_WINDOW handlers to the main popups * added an "about" dialog * moved installation instructions to a separate `INSTALL' file Oct 1997 Albert Graef (ag@muwiinfa.geschichte.uni-mainz.de) some additional patches for Till's 1.4 version * bug fixes in copy operation (patch contributed by Walt Killjoy (ngogn@clark.net)) and magic headers code (patch by Juan D. Martin) * transparently move files between different file systems (via copy/del) * new Rename and Xterm operations (inspired by moxfm) * current path/application file name is shown in window titles * at startup, prompt user to run xfm.install if the .xfm dir does not yet exist * added a new 3d icon set (see contrib/3dicons) * updated the manpage Jul-Oct 1997 Till Straumann (strauman@sun6hft.ee.tu-berlin.de) new version 1.4 with lots of bug fixes and enhancements (see README-1.4 for details) Mar-Apr 1995 Albert Graef (ag@muwiinfa.geschichte.uni-mainz.de) Release 1.3.2 * integrated various contributions: magic file type detection (Juan D. Martin, juando@cnm.us.es), filter option (Kevin Rodgers, rodgers@lvs-emh.lvs.loral.com), view option (Scott Heavner, sdh@falstaff.MAE.cwru.edu) and default values in parameter dialogs (Brian King, ender@ee.WPI.EDU) * fixed a memory leak in .FmOps.copydir(), and some annoying bugs in .FmFw.createTreeDisplay(), .FmFwCb.mainArrowCb() and .FmAw.replaceApplication() * added default values to all standard dialogs (everybody's favorite trivial change ;-), and, since I was too lazy to implement an "About" box, a -version option which causes xfm to print its version number and exit * improved support for creating symbolic links, and added a Link option to the file popup menu; these options now work analogous to the corresponding Copy options * removed the autoSave resource and the Save setup option; application files are now always saved automatically upon each modification of the application window (this has become necessary since manipulating the applications window is now a lot easier; see below); a Reload option still lets you edit application files with a text editor and reload the applications file while xfm is running * added an option to install application groups (which is a simplified version of the general application install option) * an application file stack; the Back and Main options allow you to navigate in your application group tree, and make explicit "back" items in the application window unnecessary * drag and drop in the application window; it is now possible to move and copy items in the application window by simply dragging a selected set of items to a new place * cut/copy/paste of application items; this finally gives a convenient way to move items in the application window between different application files * added "Select all" and "Deselect all" options to the application menu * buttons with Back, Main, Reload and File window options at the bottom of the application window * additions to the Imakefile and Xfm.cpp for optional linking with Xaw3d (suggested by Simon Marlow) * removed obsolete xfmc subdir, cleaned up the source directory tree, overhauled Imakefiles, and added an "Imake.options" file for easier customization * renamed the standard application files (note that xfm applications files are now recognized in xfm by the "#XFM" header, thanks to the magic types added by Juan D. Martin; so the rigid "xfm-*" naming scheme of earlier 1.3.x releases is no longer required) * added lots of icons (a large collection of fileicons was donated by Juan D. Martin), and overhauled the standard config files * updated documentation Feb 1995 Robert Vogelgesang (vogelges@rhrk.uni-kl.de) Release 1.3.1 Some minor portability fixes for AIX. Dec 1994 Albert Graef (ag@muwiinfa.geschichte.uni-mainz.de) * bug fixes: - initialize parameter dialog fields - handle \% in push and drop actions - invoke executable with absolute pathname (.FmFwActions.fileExecFile()) - fixed buggy use of alloca in FmAw.c; added casts to (char *) to all invokations of alloca - fixed "interrupted system call" error in shell auto-detection (fix suggested by Simon Marlow) * applied some portability patches * added some icons (in particular, note that the applications window has a new icon, xfm_appmgr.xpm, which now has the same size as the file window icon; the "button bar" icon, which used to be in xfm_appmgr.xpm, is now in apps.xpm) * some cosmetic changes and bug fixes in configuration, make, and documentation files Nov 1994 Robert Vogelgesang (vogelges@rhrk.uni-kl.de) Release 1.3.1 beta * fixed some minor bugs, in particular initialization of file types in text display * code cleanup; updated documentation. One problem remains unsolved: sometimes when you start xfm, it won't come up, but print a message like: `Reading child's output failed: interrupted system call' It's my Bourne Shell test which outputs this message. If you get this message, please retry starting xfm, and if that doesn't work, you can disable the test by defining the X resource Xfm.BourneShells -- see the man page for details. Albert gets this on a Sun running Solaris, but I cannot reproduce it under Linux, and therefore wasn't able to fix it. Maybe you are. Please email any fixes (or further bug reports) either to Albert or to me. Sep 1994 Robert Vogelgesang (vogelges@rhrk.uni-kl.de) * added resource `*BourneShells' and shell type detection. Apr 1994 Albert Graef (ag@muwiinfa.geschichte.uni-mainz.de) Release 1.3 with many bug fixes and enhancements, too numerous to list them all. The most important user-visible changes are listed below, in no particular order. * Fixed bugs in drag and drop operations. * Applications are launched in the user's home directory if no files are specified, and in the directory containing the selected files otherwise. * Resources are now contained in the Xfm application defaults file, to be installed in /usr/lib/X11/app-defaults. * A bunch of additional resources for controlling existing and new xfm operations; see the Xfm applications default file for details. * Check for geometry resource for popups. This allows you to display dialog popups in a fixed place, instead of having to chase them around the screen. * Avoid unecessary folder updates in Move/Copy/Delete operations. * Check for identical source and target in move and copy operations. * Added an Abort button to the confirmation popup, which allows you to kill an operation (like Move, Delete) which may prompt you for more than one confirmation. * Confirmation for exiting xfm (configurable with the confirmQuit resource). * Made the -filemgr option work. * Prevent applications from locking up xfm with keyboard input. This bug was discovered by my four years old son Sebastian when he played around with the mouse. ;-) * Added overwrite confirmation for the move operation. * Added confirmation for removing applications in the applications window. * Added a status line to the file window which displays number of files and total byte size for the displayed directory and selection. * Distinguish between directories and other files in the file window popup menu. * Added a semaphore to prevent the automatic folder updates from breaking xfm. * Disabled the xfmc stuff. It will possibly be reintegrated in a future release. Trashcans and opening windows on floppy devices can now be realized easily without xfmc. In fact, the applications file distributed with xfm contains examples on how to do this. * Added support for color icons in XPM format. * Added support for user-defined file types. * Distinguish between push and drop actions for launching applications. * Allow all types of files to be installed on the application window, with proper action settings depending on the file type. * Allow actions to prompt for parameters before launching an application. * Changed the format of the xfm applications files (which is now named xfm-apps by default) and added configuration files for file types (xfmrc) and devices (xfmdev). * Added an autosave feature for application files. * Reorganized menus and actions. The file window now has three menus (File, Folder and View), and the application menu is accessible as a popup by pressing the right mouse button in the application window. Pressing the button on an application invokes a popup menu with operations for this application, similar to the file window popup. This menu contains two new operations for moving and copying applications to the bottom of the applications window. * Added support for recursive copying and deletion operations (with help form Simon Marlow). An extra confirmation resource allows you to be prompted before the contents of a directory is removed, in addition to the usual delete confirmations. * New operations: move/copy a file or a collection of files to a specified target (which may be an existing directory). The move operation replaces the rename operation in the previous release. I also added operations to create a new and empty file, to create symbolic links, and to empty the current directory (delete all items in it). * Added an operation to open a new file window from the application window, and allow the last file window to be closed. * Made the application and file windows respond to WM_DELETE_WINDOW messages. * The selection operations now only include . or .. in the selection when specified explitly. I also added a Remove button to the selections popup which allows you to remove the specified files from the selection. The pattern matcher now also understands ranges of characters such as [a-z]. * Added a collection of color icons, and edited existing bitmaps for cursors, directories, files, etc. Also designed some icons myself, like xfm_appmgr.xpm. Hope you like them. :-) * Added a LOAD action to the application manager which allows you to load different application files simply by double-clicking on the corresponding icon. In effect, this provides support for different application groups in the application manager. There is still only one applications window, though. :-( * Added support for auto-mounting and -unmounting of special file systems such as floppies. See the man page for details. * Double-clicking on the directory name label in a file window now updates the directory display. This is for those of you who are too impatient to wait for the automatic folder update to perform its task. It is also useful on some special file systems which do not always change the time stamp when updating a directory. (I noticed this under the msdos file system of Linux.) * Added a man page. Quick and dirty job, but it hopefully provides all necessary information. In any case, it is better than nothing. ;-) * And a plethora of smaller bug fixes (for which I probably introduced some new ;-). Wed Mar 17 00:00:05 1993 system admin (root@rachel) * Updated the README file, included a MANIFEST, and released version 1.2. * Cleaned up the source, placing xfm and xfmc in subdirectories with a top-level Imakefile that knows which things to make. It should still be possible to make in each subdirectory seperately. Tue Mar 16 19:37:43 1993 system admin (root@rachel) * Placed xfm under the GNU General Public License, added a copyright message to files that didn't have one. * Lots of minor cleanups and cosmetic changes. Now compiles with virtually no warnings with -Wall -Wno-parentheses. * Added an initialDisplayType resource, since there are differing opinions as to whether the first window should be of the same type as subsequent ones. * Incorporated numerous patches from Dave Safford (dave.safford@edu.tamu.sc) including the following: a timeout that updates windows when they have changed (by checking the timestamp), icons have different names (so they can be assigned colours), an edit option for the popup menu, and an option to hide files beginning with a '.'. Also added some new options to DEFAULTS to give some colour to the icons, and display the application manager on the left of the screen. Sat Mar 6 23:38:23 1993 system admin (root@rachel) * Added defaultEditor resource. This is the name of a program to be executed when a normal file is double-clicked on. Fri Mar 5 23:19:05 1993 system admin (root@rachel) * Fixed a major memory leak (failing to free the FileRecs on updating a window). Added function freeFileList() to FmDirs. Added some hooks for the debugging malloc library, included when DEBUG_MALLOC is defined. (ver 1.1h). Sun Dec 6 16:48:16 GMT 1992 * Made some minor cleanups, changed the README file, tested it for about 20 secs, and released it to a few alpha testers (ver 1.1g). Fri Oct 16 15:25:42 BST 1992 * New function: newFileWindow in FmFw.c. Replaces a common sequence of lines when opening a new file window. * Added some checking that the chdir function actually succeeded in createFileWindow() - it was failing sometimes when responding to messages from the client. * fileOpenButtonCb() now pops up windows by the cursor only if it was called from FmFwActions.c. * Uncommented a line from fileCloseCb() that caused an error in older versions of the X toolkit - the widgets could not be destoryed. Xfm should now use a lot less memory as this was a major memory leak. * Fixed some bugs in the communications module. There are still problems due to the event handler being called recursively - this is mainly a problem with the error handler which dispatches more events while waiting for the user to press 'ok'. Thu Oct 15 15:44:33 BST 1992 * Removed the function clearUpdateMarks(), and incorporated it into intUpdate(). * Finally completed the communications module so that arbitrary length messages can be sent from the client. It seems to work, but I'm a bit dubious. Wed Oct 14 12:54:37 BST 1992 * Removed special translations for labels, it messed up the click-drag stuff (ie. if you dragged on to a label, xfm got all confused). * Finally fixed the problem with symbolic links to non-existent files. Now, you get the directory displayed, and the offending icon(s) are greyed out, although they can still be used. You should still get a warning when this is happening. * I'm getting some strange behaviour, that results in error() being called recursively. For now I just ignore any subsequent errors, but I suspect this is a bug in the toolkit/server. * Removed the freeing of the bitmaps and cursors on exit. This is done by the server anyway (apparently). * improved the communications module somewhat - it now uses atoms for the two message types, to avoid problems with other messages. Still need to allow arbitrary length messages. Also - I'm getting an error when using the client from another machine. Tue Oct 13 11:54:18 BST 1992 * added sys/types.h before sys/stat.h in Fm.h. Removed sys/stat.h from some files since it is included in Fm.h anyway. This patch is required for Ultrix (apparently), and System V I think. Mon Oct 12 14:06:05 BST 1992 * Probably missed out a few more. * Fixed fnSub() in FmDirs.c - It was failing due to overlapping areas being handled incorrectly by strcpy, to the effect that if HOME was shorter than the name of the resource file, it crashed. Thanks to Peter Williams for this one. * Fixed FmDelete.c so that it deletes symbolic links properly. Sat Sep 26 15:20:08 BST 1992 * I've missed a few out here... Added support to handle the ClientMessage event, and either open a new window or update some of the existing ones. A small program called xfmc to send these signals is included. Currently very hacky, needs some work. * Added a signal handler for SIGCHLD that just calls waitpid(), this clears up the zombie processes generated by the application manager. * Patched in a fix for FmFw.c, when the text display is used and there exists a file owned by a user that has no entry in the password file, then it core dumped. Thanks to hkarhune@hydra.helsinki.fi for this one. * Action fileBeginDrag is now called when leaving the window with the button pressed. This solves problems with double clicking (you weren't allowed to move the mouse between clicks). * Added a floating menu activated by the third button with all the single file operations on it. The operations menu now has only delete and mkdir options. I think it's nicer this way. * Scrapped FmIcons.c for now. Looking for a more general solution. Sat Sep 12 19:35:50 BST 1992 * Added support for user defined icons in file windows: FmIcons.c. A new resource is added (iconMappings). * Cursors are now opaque (looks nicer :-) * Cursor changes to a no-entry symbol when over a directory that you do not have write access to. * New function abortXfm() in FmErrors.c for terminal errors during startup. Thu Sep 10 17:05:49 BST 1992 simonm (simonm@dcs.glasgow.ac.uk) * This file added. * Moved the 'move' operation to button 1 (press+move to initiate) * Added the select operation, put it on button 1. Button 1 now selects the file that the mouse is on, and deselects all others. Move defaults to select if the mouse doesn't move anywhere usefull. * Relegated the old toggle operation to button 2. * Added the ability to drag directories onto the root window to open them * Modified popupByCursor so that windows are not created half off the screen, modulo messing around by the window manager. xfm-1.5.4/INSTALL0000644000175000017500000001413107731273201010267 00000000000000 INSTALLATION ------------ For the impatient: - back up your existing xfm library directory if necessary - take a look at Imake.options and edit it as needed - run `xmkmf; make Makefiles; make; make install; make install.man' If everything goes smoothly, you should have an xfm binary installed in your X bin directory, along with some other stuff (note the directories may not be identical on your system, it is up to imake to install these things in the correct place): /usr/X11/bin/xfm.install The user setup installation script /usr/X11/bin/xfmtype Juan D. Martin's xfmtype program /usr/X11/lib/X11/xfm/ bitmaps Some example bitmaps pixmaps Some example pixmaps icons New 3d-look pixmaps (see below) dot.xfm Default config files (for xfm.install) /usr/X11/lib/X11/app-defaults/Xfm application defaults for xfm /usr/X11/man/man1/xfm.1 the xfm manual page /usr/X11/man/man1/xfmtype.1 manual page for the xfmtype program If everything didn't go smoothly, you may have to make xfm in the src subdirectory separately, and/or install things by hand. To complete the installation, you will probably wish to edit the default configuration files and the application defaults file to reflect your local configuration. Also you might wish to manually install additional icons and other stuff from the contrib dir. Good luck! :-) *** IMPORTANT *** If you are a seasoned xfm 1.3 user, you should note the following: - You probably shouldn't install over an existing xfm library directory (/usr/X11/lib/X11/xfm or similar). Rather delete or rename your existing xfm libdir first. - When xfm is started by the user for the first time (i.e., the ~/.xfm dir does not yet exist), it now displays a dialog which allows the user to run the xfm.install script, which installs the default configuration files in the user's home directory. I was told that this would really be a relief for sysadmins of large sites with hundreds or even thousands of users. ;-) - As distributed, xfm is now set up to use the alternative configuration files and icons in the contrib/3dicons dir (see also the comments regarding the USE_3DICONS option in the NOTES section below). Unfortunately, the new setup is *not* entirely backward-compatible. Thus, if you're upgrading from xfm 1.3.2 and would like to reuse your old setup, you might wish to comment out the USE_3DICONS option in the Imake.options file. Xfm will then use the old- fashioned standard setup from previous releases, and you should be able to use existing configuration files without any changes. - Please note that application defaults files from older xfm versions will not work with the new version; you have to install the new one. Xfm will ensure this by checking the new "appDefsVersion" resource. For further details please refer to the `NOTES' section below. NOTES ----- As distributed, xfm is set up to work with Arnaud Le Hors' XPM library. It can still be compiled and run without this library, if you comment out the #define XPM in Imake.options, but then you will have to edit the configuration files (xfmrc, Apps, etc.) to replace the pixmap icons by bitmaps (a few are supplied in the bitmaps directory). Versions of the XPM library less than 3.3 appear not to work. Other options which can be controlled by corresponding #define's in Imake.options are XAW3D (which causes linkage with the Xaw3d library, and also adds some Xaw3d-specific lines to the applications default file) and MAGIC_HEADERS (which causes the magic headers code to be included, and also determines the standard xfmrc file to be installed on your system). Both are now enabled by default. Till Straumann's 1.4 extensions (which are all enabled by default) can be controlled by means of a bunch of #define's in the Imake.options file; see README-1.4 for further information. I strongly recommend that you leave all these features enabled, unless you encounter compilation problems in these parts. Otherwise xfm should still function, but many things won't work exactly as described in the manpage. --------------------- If xfm is compiled and installed with the USE_3DICONS option in the Imake.options file enabled (which is the default), then additional icon pixmaps will be installed in the icon subdir of the xfm library directory, and an alternative set of standard configuration files in the dot.xfm subdir. Moreover, this option changes some lines in the Xfm app-defaults file and causes xfm's built-in icons to be replaced with pixmaps from the 3dicons/icons subdir. When using this option, you should make sure that users delete or rename their old .xfm directory s.t. xfm installs the new configuration files. (On larger sites, this could also be handled automatically with an appropriate xfm.install script.) IMHO, the new setup looks a lot nicer than the old one, but, as already mentioned, you might wish to disable this option, e.g., when upgrading an existing xfm 1.3.2 installation. Note that the USE_3DICONS option is also disabled automatically if you compile xfm without the XPM or the MAGIC_HEADERS option. --------------------- Xfm 1.3 has been reported to compile and run successfully under Linux >=0.99, BSDI 1.1, RS6000 with AIX 3.2.5 (using gcc), SUN workstations running SunOS 4.1 and Solaris 2.x, HP700 with HPUX 9.01, DECstation with Ultrix 4.3a, DEC Alpha with OSF/1, SGI Indigo with IRIX 4.0.5F and 5.2. Up to now, the present release has been tested on Linux 2.0.x (running XFree 3.3) and Solaris 2.4. We are still interested in getting Xfm compiled on as many platforms as possible (porting should be a piece of cake), so please continue to send us any patches so that they can be included in future releases. NOTE for SUN users and other people running ol[v]wm: In order to get double clicks in xfm working, you may have to set olwm to the "focus-follows-mouse" (rather than the "click-to-focus") mode. This can be done by setting the SetInput resource to followmouse in your .OWdefaults file (see props(1)). In click-to-focus mode double clicks in xfm won't work. I consider this a bug in olwm, but if anybody has a fix to get double clicks working in click-to-focus mode I'd like to hear about it. xfm-1.5.4/NEWS0000644000175000017500000000403310744135445007742 00000000000000Xfm 1.5.4 is only bugfix and little improvements to the programm calling code. Xfm 1.5.3 is only bugfix and mouse wheel event support Xfm 1.5.2 is some code clean up and some little things: * add more icons and symlinks (.iso files and new openoffice names) * trim filenames in icon view when too long * duplicate several dialogs to have one per top-level window, so that icewm does bring them to foreground uppon popup, even when the window group leader is not visible. Xfm 1.5.1 was only bugfixes Xfm 1.5 has got quite some changes do previous versions: * The build system is now autotools based. * The config is mostly replaced with a new system: - file types and their actions are now determined using the system magic, mime.types and mailcap files, which are included from xfm specific variants of those files. - icons are determined from file-type by appending xfm and looking in the directories specified in the Xfm.iconPath resources. - renamed all config files to make sure the old versions some old versions copied to all home directories do not cause problems. * due to different changed, old AppDefaults no longer work, you need a new one shipped by this package. * many little changes and modifications to the source of almost all parts to make it behave more like I want it to behave, including but not limited to: - many changes to make it compile more cleanly or change some things in the code I deem ugly. - log window only show output of programs started, not xfm itself to avoid race conditions. - maxMagicRead resource defaulting to 1024 to limit magic buffer. - limit file window to 32000 vertically to avoid bugs in some graphic drivers. - remove kwm workarounds so that cursor can be updated - built-in handling of linked and compressed files, the icon for those is made from small icons. - ... * the default config and the manpage references might be a bit too Debian specific. For more information there also is the Changelog file. 22.4.2006 Bernhard R. Link xfm-1.5.4/TODO0000644000175000017500000000156610656603706007745 00000000000000things still TODO: * add hotkeys to Tree View * show default hotkeys in Menu * decide wheather to execute things easily * look how file detects tar files * also unmount/remove linkdir/other cleanup when X connection closes... * get rid of PATH_MAX in all its forms * look out of sprintf and get rid of more static arrays older TODO items from my predecessors: * Add Chmod on multiple files / recursively. * Add a help feature. * Add a find feature. * Reintegrate the xfmc stuff. * Replace the pattern matching code for file selections with a `real' regexp matcher. * Add a configuration panel for common resource values. * Add a dialog for editing xfmrc entries. * Add user definable file menus. * Add support for multiple application windows. * Add a drag'n'drop protocol which allows xfm to interact with other applications (e.g., fvwm's button bar). xfm-1.5.4/depcomp0000755000175000017500000004224610735457413010632 00000000000000#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2006-10-15.18 # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006 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., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Alexandre Oliva . case $1 in '') echo "$0: No command. Try \`$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] Run PROGRAMS ARGS to compile a file, generating dependencies as side-effects. Environment variables: depmode Dependency tracking mode. source Source file read by `PROGRAMS ARGS'. object Object file output by `PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputing dependencies. libtool Whether libtool is used (yes/no). Report bugs to . EOF exit $? ;; -v | --v*) echo "depcomp $scriptversion" exit $? ;; esac if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. depfile=${depfile-`echo "$object" | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. ## Unfortunately, FreeBSD c89 acceptance of flags depends upon ## the command line argument order; so add the flags where they ## appear in depend2.am. Note that the slowdown incurred here ## affects only configure: in makefiles, %FASTDEP% shortcuts this. for arg do case $arg in -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; *) set fnord "$@" "$arg" ;; esac shift # fnord shift # $arg done "$@" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ## The second -e expression handles DOS-style file names with drive letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the `deleted header file' problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. tr ' ' ' ' < "$tmpdepfile" | ## Some versions of gcc put a space before the `:'. On the theory ## that the space means something, we add a space to the output as ## well. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like `#:fec' to the end of the # dependency line. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ tr ' ' ' ' >> $depfile echo >> $depfile # The second pass generates a dummy entry for each header file. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> $depfile else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the # current directory. Also, the AIX compiler puts `$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'` tmpdepfile="$stripped.u" if test "$libtool" = yes; then "$@" -Wc,-M else "$@" -M fi stat=$? if test -f "$tmpdepfile"; then : else stripped=`echo "$stripped" | sed 's,^.*/,,'` tmpdepfile="$stripped.u" fi if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi if test -f "$tmpdepfile"; then outname="$stripped.o" # Each line is of the form `foo.o: dependent.h'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile" sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; icc) # Intel's C compiler understands `-MD -MF file'. However on # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c # ICC 7.0 will fill foo.d with something like # foo.o: sub/foo.c # foo.o: sub/foo.h # which is wrong. We want: # sub/foo.o: sub/foo.c # sub/foo.o: sub/foo.h # sub/foo.c: # sub/foo.h: # ICC 7.1 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using \ : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form `foo.o: dependent.h', # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp2) # The "hp" stanza above does not work with aCC (C++) and HP's ia64 # compilers, which have integrated preprocessors. The correct option # to use with these is +Maked; it writes dependencies to a file named # 'foo.d', which lands next to the object file, wherever that # happens to be. # Much of this is similar to the tru64 case; see comments there. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then tmpdepfile1=$dir$base.d tmpdepfile2=$dir.libs/$base.d "$@" -Wc,+Maked else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d "$@" +Maked fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" # Add `dependent.h:' lines. sed -ne '2,${; s/^ *//; s/ \\*$//; s/$/:/; p;}' "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" "$tmpdepfile2" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in `foo.d' instead, so we check for that too. # Subdirectories are respected. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then # With Tru64 cc, shared objects can also be used to make a # static library. This mechanism is used in libtool 1.4 series to # handle both shared and static libraries in a single compilation. # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. # # With libtool 1.5 this exception was removed, and libtool now # generates 2 separate objects for the 2 libraries. These two # compilations output dependencies in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is # automatically cleaned when .libs/ is deleted, while ignoring # the former would cause a distcleancheck panic. tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 tmpdepfile2=$dir$base.o.d # libtool 1.5 tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.o.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d tmpdepfile4=$dir$base.d "$@" -MD fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a tab and a space in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test $1 != '--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M # Require at least two characters before searching for `:' # in the target name. This is to cope with DOS-style filenames: # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. "$@" $dashmflag | sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" tr ' ' ' ' < "$tmpdepfile" | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test $1 != '--mode=compile'; do shift done shift fi # X makedepend shift cleared=no for arg in "$@"; do case $cleared in no) set ""; shift cleared=yes ;; esac case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix="`echo $object | sed 's/^.*\././'`" touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" sed '1,2d' "$tmpdepfile" | tr ' ' ' ' | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test $1 != '--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o, # because we must use -o when running libtool. "$@" || exit $? IFS=" " for arg do case "$arg" in "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" echo " " >> "$depfile" . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: xfm-1.5.4/install-sh0000755000175000017500000003160010735457410011246 00000000000000#!/bin/sh # install - install a program, script, or datafile scriptversion=2006-10-14.15 # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or # sell copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name of the X Consortium shall not # be used in advertising or otherwise to promote the sale, use or other deal- # ings in this Software without prior written authorization from the X Consor- # tium. # # # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. nl=' ' IFS=" "" $nl" # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit="${DOITPROG-}" if test -z "$doit"; then doit_exec=exec else doit_exec=$doit fi # Put in absolute file names if you don't have them in your path; # or use environment vars. mvprog="${MVPROG-mv}" cpprog="${CPPROG-cp}" chmodprog="${CHMODPROG-chmod}" chownprog="${CHOWNPROG-chown}" chgrpprog="${CHGRPPROG-chgrp}" stripprog="${STRIPPROG-strip}" rmprog="${RMPROG-rm}" mkdirprog="${MKDIRPROG-mkdir}" posix_glob= posix_mkdir= # Desired mode of installed file. mode=0755 chmodcmd=$chmodprog chowncmd= chgrpcmd= stripcmd= rmcmd="$rmprog -f" mvcmd="$mvprog" src= dst= dir_arg= dstarg= no_target_directory= usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... In the 1st form, copy SRCFILE to DSTFILE. In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: -c (ignored) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. -s $stripprog installed files. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. --help display this help and exit. --version display version info and exit. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " while test $# -ne 0; do case $1 in -c) shift continue;; -d) dir_arg=true shift continue;; -g) chgrpcmd="$chgrpprog $2" shift shift continue;; --help) echo "$usage"; exit $?;; -m) mode=$2 shift shift case $mode in *' '* | *' '* | *' '* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac continue;; -o) chowncmd="$chownprog $2" shift shift continue;; -s) stripcmd=$stripprog shift continue;; -t) dstarg=$2 shift shift continue;; -T) no_target_directory=true shift continue;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac done if test $# -ne 0 && test -z "$dir_arg$dstarg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dstarg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dstarg" shift # fnord fi shift # arg dstarg=$arg done fi if test $# -eq 0; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi # It's OK to call `install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi if test -z "$dir_arg"; then trap '(exit $?); exit' 1 2 13 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. case $mode in # Optimize common cases. *644) cp_umask=133;; *755) cp_umask=22;; *[0-7]) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac fi for src do # Protect names starting with `-'. case $src in -*) src=./$src ;; esac if test -n "$dir_arg"; then dst=$src dstdir=$dst test -d "$dstdir" dstdir_status=$? else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dstarg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dstarg # Protect names starting with `-'. case $dst in -*) dst=./$dst ;; esac # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then if test -n "$no_target_directory"; then echo "$0: $dstarg: Is a directory" >&2 exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else # Prefer dirname, but fall back on a substitute if dirname fails. dstdir=` (dirname "$dst") 2>/dev/null || expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$dst" : 'X\(//\)[^/]' \| \ X"$dst" : 'X\(//\)$' \| \ X"$dst" : 'X\(/\)' \| . 2>/dev/null || echo X"$dst" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q' ` test -d "$dstdir" dstdir_status=$? fi fi obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') # Create intermediate dirs using mode 755 as modified by the umask. # This is like FreeBSD 'install' as of 1997-10-28. umask=`umask` case $stripcmd.$umask in # Optimize common cases. *[2367][2367]) mkdir_umask=$umask;; .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; *[0-7]) mkdir_umask=`expr $umask + 22 \ - $umask % 100 % 40 + $umask % 20 \ - $umask % 10 % 4 + $umask % 2 `;; *) mkdir_umask=$umask,go-w;; esac # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then mkdir_mode=-m$mode else mkdir_mode= fi posix_mkdir=false case $umask in *[123567][0-7][0-7]) # POSIX mkdir -p sets u+wx bits regardless of umask, which # is incompatible with FreeBSD 'install' when (umask & 300) != 0. ;; *) tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 if (umask $mkdir_umask && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 then if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # other-writeable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. ls_ld_tmpdir=`ls -ld "$tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && $mkdirprog -m$different_mode -p -- "$tmpdir" && { ls_ld_tmpdir_1=`ls -ld "$tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi rmdir "$tmpdir/d" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null fi trap '' 0;; esac;; esac if $posix_mkdir && ( umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else # The umask is ridiculous, or mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. case $dstdir in /*) prefix=/ ;; -*) prefix=./ ;; *) prefix= ;; esac case $posix_glob in '') if (set -f) 2>/dev/null; then posix_glob=true else posix_glob=false fi ;; esac oIFS=$IFS IFS=/ $posix_glob && set -f set fnord $dstdir shift $posix_glob && set +f IFS=$oIFS prefixes= for d do test -z "$d" && continue prefix=$prefix$d if test -d "$prefix"; then prefixes= else if $posix_mkdir; then (umask=$mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 else case $prefix in *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; *) qprefix=$prefix;; esac prefixes="$prefixes '$qprefix'" fi fi prefix=$prefix/ done if test -n "$prefixes"; then # Don't fail if two instances are running concurrently. (umask $mkdir_umask && eval "\$doit_exec \$mkdirprog $prefixes") || test -d "$dstdir" || exit 1 obsolete_mkdir_used=true fi fi fi if test -n "$dir_arg"; then { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 else # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ rmtmp=$dstdir/_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \ && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \ && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \ && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && # Now rename the file to the real destination. { $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null \ || { # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. # Now remove or move aside any old file at destination location. # We try this two ways since rm can't unlink itself on some # systems and the destination file might be busy for other # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { if test -f "$dst"; then $doit $rmcmd -f "$dst" 2>/dev/null \ || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null \ && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }; }\ || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 } else : fi } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dst" } } || exit 1 trap '' 0 fi done # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: xfm-1.5.4/missing0000755000175000017500000002557710735457410010661 00000000000000#! /bin/sh # Common stub for a few missing GNU programs while installing. scriptversion=2006-05-10.23 # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006 # Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 1996. # 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., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try \`$0 --help' for more information" exit 1 fi run=: sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' sed_minuso='s/.* -o \([^ ]*\).*/\1/p' # In the cases where this matters, `missing' is being run in the # srcdir already. if test -f configure.ac; then configure_ac=configure.ac else configure_ac=configure.in fi msg="missing on your system" case $1 in --run) # Try to run requested program, and just exit if it succeeds. run= shift "$@" && exit 0 # Exit code 63 means version mismatch. This often happens # when the user try to use an ancient version of a tool on # a file that requires a minimum version. In this case we # we should proceed has if the program had been absent, or # if --run hadn't been passed. if test $? = 63; then run=: msg="probably too old" fi ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an error status if there is no known handling for PROGRAM. Options: -h, --help display this help and exit -v, --version output version information and exit --run try to run the given command, and emulate it if it fails Supported PROGRAM values: aclocal touch file \`aclocal.m4' autoconf touch file \`configure' autoheader touch file \`config.h.in' autom4te touch the output file, or create a stub one automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c help2man touch the output file lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file tar try tar, gnutar, gtar, then tar without non-portable flags yacc create \`y.tab.[ch]', if possible, from existing .[ch] Send bug reports to ." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: Unknown \`$1' option" echo 1>&2 "Try \`$0 --help' for more information" exit 1 ;; esac # Now exit if we have it, but it failed. Also exit now if we # don't have it and --version was passed (most likely to detect # the program). case $1 in lex|yacc) # Not GNU programs, they don't have --version. ;; tar) if test -n "$run"; then echo 1>&2 "ERROR: \`tar' requires --run" exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then exit 1 fi ;; *) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then # Could not run --version or --help. This is probably someone # running `$TOOL --version' or `$TOOL --help' to check whether # $TOOL exists and not knowing $TOOL uses missing. exit 1 fi ;; esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. case $1 in aclocal*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." touch aclocal.m4 ;; autoconf) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." touch configure ;; autoheader) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acconfig.h' or \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` test -z "$files" && files="config.h" touch_files= for f in $files; do case $f in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; esac done touch $touch_files ;; automake*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." find . -type f -name Makefile.am -print | sed 's/\.am$/.in/' | while read f; do touch "$f"; done ;; autom4te) echo 1>&2 "\ WARNING: \`$1' is needed, but is $msg. You might have modified some files without having the proper tools for further handling them. You can get \`$1' as part of \`Autoconf' from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo "#! /bin/sh" echo "# Created by GNU Automake missing as a replacement of" echo "# $ $@" echo "exit 0" chmod +x $file exit 1 fi ;; bison|yacc) echo 1>&2 "\ WARNING: \`$1' $msg. You should only need it if you modified a \`.y' file. You may need the \`Bison' package in order for those modifications to take effect. You can get \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h if test $# -ne 1; then eval LASTARG="\${$#}" case $LASTARG in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.h fi ;; esac fi if test ! -f y.tab.h; then echo >y.tab.h fi if test ! -f y.tab.c; then echo 'main() { return 0; }' >y.tab.c fi ;; lex|flex) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.l' file. You may need the \`Flex' package in order for those modifications to take effect. You can get \`Flex' from any GNU archive site." rm -f lex.yy.c if test $# -ne 1; then eval LASTARG="\${$#}" case $LASTARG in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if test ! -f lex.yy.c; then echo 'main() { return 0; }' >lex.yy.c fi ;; help2man) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a dependency of a manual page. You may need the \`Help2man' package in order for those modifications to take effect. You can get \`Help2man' from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" exit 1 fi ;; makeinfo) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.texi' or \`.texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious call might also be the consequence of using a buggy \`make' (AIX, DU, IRIX). You might want to install the \`Texinfo' package or the \`GNU make' package. Grab either from any GNU archive site." # The file to touch is that specified with -o ... file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -z "$file"; then # ... or it is the one specified with @setfilename ... infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n ' /^@setfilename/{ s/.* \([^ ]*\) *$/\1/ p q }' $infile` # ... or it is derived from the source name (dir/f.texi becomes f.info) test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info fi # If the file does not exist, the user really needs makeinfo; # let's fail without touching anything. test -f $file || exit 1 touch $file ;; tar) shift # We have already tried tar in the generic part. # Look for gnutar/gtar before invocation to avoid ugly error # messages. if (gnutar --version > /dev/null 2>&1); then gnutar "$@" && exit 0 fi if (gtar --version > /dev/null 2>&1); then gtar "$@" && exit 0 fi firstarg="$1" if shift; then case $firstarg in *o*) firstarg=`echo "$firstarg" | sed s/o//` tar "$firstarg" "$@" && exit 0 ;; esac case $firstarg in *h*) firstarg=`echo "$firstarg" | sed s/h//` tar "$firstarg" "$@" && exit 0 ;; esac fi echo 1>&2 "\ WARNING: I can't seem to be able to run \`tar' with the given arguments. You may want to install GNU tar or Free paxutils, or check the command line arguments." exit 1 ;; *) echo 1>&2 "\ WARNING: \`$1' is needed, and is $msg. You might have modified some files without having the proper tools for further handling them. Check the \`README' file, it often tells you about the needed prerequisites for installing this package. You may also peek at any GNU archive site, in case some other package would contain this missing \`$1' program." exit 1 ;; esac exit 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: xfm-1.5.4/autogen.sh0000755000175000017500000000006510323730065011235 00000000000000#!/bin/sh aclocal autoheader automake -a -c autoconf xfm-1.5.4/README-1.20000644000175000017500000002333407731273201010421 00000000000000 XFM - The X File Manager (ver 1.2 beta) ---------------------------------------- (c) Simon Marlow 1990-1993 simonm@dcs.glasgow.ac.uk 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 1, 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. ------------------------------------------------------------------------------ 1. Introduction This is a small file manager/program manager package written using the XToolkit. It contains most of the features that you would expect in a file manager -- move around your directory tree in multiple windows, and move, copy or delete files with simple mouse operations. The integrated application manager allows you to load files into your favourite applications from the file manager by dragging icons. Consider this software a beta release - the last version was alpha (and contained at least one serious bug), but I am more confident that xfm is stable now. This version has been in testing for quite a while, and will probably lose the 'beta' sticker before long, too. Comments are welcome - please send me bug-fixes and any suggestions you have for improving the program in any way (patches are also welcome, as is complete texinfo documentation :-). Oh yes, and if you have any nice icons, I'd certainly like to include them in the distribution. Installation is relatively straight forward. Section 1 contains a list of instructions to get you started right away, and sections 2-3 have a more detailed explanation. ------------------------------------------------------------------------------- 1. QuickStart - for those of you who can't wait type the following: xmkmf make Makefiles make all install cat DEFAULTS >>~/.Xdefaults xrdb ~/.Xdefaults xfm This will start xfm with no applications configured. To use the configuration files and icons included in the package, read section 3. ------------------------------------------------------------------------------ 2. Compilation I have included a minimal Imakefile, so there should be no problem with compilation on most machines. Take a look at the Imakefile, and edit it if you like. Then, simply make the Makefile by typing 'xmkmf', and make the Makefiles in the xfm and xfmc subdirectories by typing 'make Makefiles'. 'make depend' will update the Makefiles with dependancy information, but this is not strictly necessary. To make the binaries, do a 'make'. If there are any changes to be made to the source to compile on other machines (these should be minor), please send me patches as I don't have the resources here to test these things. Xfm currently compiles cleanly on SunOS4.1, Ultrix (I think), Linux, and most POSIXish systems (all with gcc and X11R5). Xfm needs an ANSI C compiler - *please* don't send me patches to compile it on an older compiler, just get gcc. ------------------------------------------------------------------------------ 3. Installation To install the binaries, do a 'make install'. This will install xfm and xfmc in the default directory on your system. If you have a .Xdefaults file, you may want to concatenate the file DEFAULTS to it. This contains some defaults for xfm, to specify fonts and other things. These are the xfm-specific resources. Some of them may be removed in future versions as I will make them settable from within xfm. All the Xtoolkit resources are also available. If you want to use your own icons (in the application manager) xfm needs to know where to find them. Include a line like *bitmapFilePath: /home/simon/bitmaps:/usr/include/X11/bitmaps in your .Xdefaults. A number of icons come with the standard X distribution (these are in /usr/include/X11/bitmaps). I've also included a few of mine in the directory user-bitmaps. Xfm uses its own data file (by default called ~/.xfmrc) to keep track of the icons you have installed in the application manager. You shouldn't need to edit this file yourself, in fact xfm may get very confused if you do. I have included a small .xfmrc file (STARTUP) that you should rename and place in your home directory before starting xfm - this will give you a few applications to get started. Note that you will need the bitmap files in ./user-bitmaps available to use this setup. ------------------------------------------------------------------------------ 4. Operation of the File Manager Most of it should be pretty obvious. Things that aren't obvious: o The left hand mouse button selects an item (and deselects all others in the same window). The second button toggles the selected state of an item. o Clicking the right-hand mouse button when over an icon pops up a menu with some operations that can be performed on that file. o You can open new windows by two methods: (a) Drag (with button 1) a directory onto anywhere on the root window. Note that this may not work if you have a picture on your background. (b) Select one or more directories and press the 'open' button. o You cannot close the last window. To quit the program, use the 'quit' button on the Application Manager window. o Drag with the left-hand button to another window (or another icon, in general a valid destination will be highlighted with a border when the cursor is over it) to move files from one directory to another. The second button used in the same way will copy files. o Clicking on the arrows in Tree mode moves in that direction. o Double clicking on a directory in Icon mode moves into that directory. To move up a level, either select 'Up' from the 'Move' menu, or double click on the '..' icon. o Double clicking on an executable runs the program. Dragging files onto an executable runs the program with the full pathnames of the dragged files as arguments. (You can test this with 'echo'). o Double clicking on normal files invokes the default editor (specified in the defaultEditor resource) with the filename as an argument. The 'edit' option on the popup menu also performs the same action. o To get detailed information on a file, use 'Info' on the 'Operations' menu. ------------------------------------------------------------------------------ 5. Operation of the Application Manager o To install an application, either use the 'install' option on the menu or drag an executable file over from a file window. o Double clicking on an application will start it by running the command '$SHELL -c ' - this is so you can use various shell thingies in the command line. o Dragging files over from a file window onto an application will start it with the command '$SHELL -c ...' Most shells will then place , etc. into the variables $0, $1 ... So for example if you wanted to load a file into emacs, the command for the emacs application would be 'emacs $0', and you could drag a file over from a file window onto the emacs icon to have emacs come up with the file loaded. Other useful applications to install this way are the printer (print files by dragging onto the printer icon), a waste-paper basket 'rm $*' (you'll need to make sure the windows are updated too -- see Secction 6 below). o Icons that you specify must be in one of the directories specified by the bitmapFilePath resource, and must be in standard X bitmap format (use 'bitmap' to create or edit them). o To save the current set of applications to the resource file, use the 'Save setup' option. To restore the application set from the resource file, use 'Load setup' ------------------------------------------------------------------------------ 6. The program xfmc In this release, I've included a small program xfmc that will communicate with an xfm process running on the same display. There are two types of messages that can be sent: open new windows, or update existing ones. The syntax of the command is xfmc -o path ... xfmc -u path ... This means that you can finally have a real wastebasket in the application manager (by instructing xfm to update some windows using xfmc), and do other cool things like mount a floppy disk and have a window onto it open up automatically. It works by finding the xfm window (using a depth-first traversal of the window tree on the display), and sending it a sequence of XClientEvent messages. This works where xfm and xfmc are running on different machines, but is rather slow. A better method may be to use a socket in /tmp, although this would restrict xfm & xfmc to being on the same machine. ------------------------------------------------------------------------------ 7. Bugs / Problems o Starting applications will start another copy of the shell. If you don't like this, then prefix all your application commands with 'exec'. In a future version I might have xfm insert this for you. o There is no recursive copy routine currently - so copying directories is not allowed. Sorry! o It's a bit slow - this is a combination of having to stat all the files in a directory, and then creating millions of widgets. A possible solution to this problem is to create my own widget class for the icons. Maybe in a future version. o Anything else... please tell me, my email address is below. ------------------------------------------------------------------------------ Have fun! Simon Marlow simonm@dcs.glasgow.ac.uk xfm-1.5.4/README-1.40000644000175000017500000011037010407020753010414 00000000000000Further enhancments to XFM Copyright (C) 1997 by T. Straumann, 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 of the License, 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. 1. Introduction =============== Xfm is a cool tool. I found, however, that several features were missing; that's why I'd like to present an enhanced version of XFM. This version provides the following improvements: - path history; a menu offering the paths already visited. - modification & display of _all_ file modes (up to now suid was not even displayed); - translations were moved to resource files, so the user can modify them. - after updating the file window it is attempted to scroll the window to its previous position. (For me it was _very_ annoying to be thrown back to the start of the view every single time after touching something in the directory.) - New widgets for the Icon- and Text- view modes. This is many, MANY times faster than the old version. Ok, still the whole directory has to be 'stat'ed, but creation of all the Toggle widgets in a big directory (ever visited ghostscript's source dir for example?) took en eternity and I don't want to have coffee every time I do a chdir. The new widgets provide also a 'notify()' action and a callback resource. This allows XFM to provide additional functionability. Currently this feature is used to let the user delete/move/link/copy/select etc. the items with the keyboard. - More info fields in the 'text view' mode (device type, group info etc). An 'options' menu was added to switch individual fields on and of. Besides this there are some minor changes: - some bugs fixed; - XFM starts up in the cwd and not always in HOME. (It's easy to move home anyway and often I need an XFM in the cwd of some shell). - If you give a shell path in the app_res file, it will be _really_ the shell used by XFM. XFM will try the shell given in the 'shellCommand' resource. If no executable is found the environment variable SHELL is examinated and finally "/bin/sh". This scheme gives the user more freedom than the old one when SHELL was always used. The meaning of the 'BourneShells' resource as a hint for XFM about the calling semantics remains the same however. Personally I want to use 'csh' when I'm working in a 'xterm' but I want XFM to use 'bash'. This can now simply achieved by a modification of the resource file; before I always had to set SHELL or to use a script. - The cursor is set to the 'noentry cursor' if you try to drag something to the file window of a non-writable directory. - The 'folder' menu provides two additional entries to 'close' or 'clone' the actual file window. - Accelerators are installed in dialog boxes and the 'confirm' popup. By the 'accelerators' resource eg. the key can be mapped to emulate clicking the 'ok' button. - A 'TextField' widget is provided as a replacement for the 'Text' widget offering 3D look in dialog boxes. Scrolling without need of scrollbars is supported by this widget (useful for long input when editing application properties in the application manager.) - Some servers can't handle big cursors. My MIT Xsun (X11R6) server isn't capable of dealing with cursors bigger than 32x32. That's why I use a smaller cursor for the 'noentry' cursor (32x32, like all other special cursors; I don't know why this one 's so big anyway). New code queries the server for the cursor size and uses extra small cursors (16x16, every server should be able to handle this) if the server denies using 32x32. - A simple ICCM has been implemented; it is possible to paste the paths of the selected file items (as strings) to other applications using the XA_PRIMARY selection. - A logging window has been added to show output of child processes sent to stdout / stderr. If any output is generated by children of XFM (eg. applications started by the am) the log window pops up. - The new 3dicons contributed by Albert Graef look very nice -- they are quite hungry however and eat up an 8-bit colormap quickly. Xpm however is capable of dealing with such situations, allocating close colors instead of exact matching colors. In most cases this doesn't really matter and you won't see the difference but the colormap is used in a much more economical way. A new resource 'colorCloseness' has been added which can be set to specify the matching tolerance (the old XFM asked always for an _exact_ match :-( ). 2. Configurable Enhancements ============================ All the enhancements except the support for the new 'iconFileList' and 'textFileList' widgets can be configured by defining preprocessor flags in the file 'Imake.options'. These flags will now be described in detail. -DENHANCE_TXT_FIELD (can not longer be disabled) ------------------- This flag substitutes the Athena 'Text' widget for my 'TextField' widget. This Widget is an input area for single line text strings providing 3D look. If not the whole string can be displayed, small scroll marks appear where the text gets obscured. Clicking on these scroll marks moves the text cursor, which can also be moved by the / keys. Many actions are provided in order to insert, delete text, to move the cursor etc. Communication with other clients is possible using standard selections (Primary, Secondary or Clipboard). A readOnly mode disables string modification while still supporting selection and scrolling. Further Information is given in the header file 'TextField.h' (This widget was not specifically designed for XFM but as an all purpose single line input area.) Together with the 'TextField' widget comes the 'FocusForm' widget. The 'FocusForm' is a subclass of Form which is capable of managing Keyboard Traversal provided the Translations of its children are set up accordingly. The FocusForm allows you to type text into the child (eg. TextField) which has the Keyboard focus with the pointer anywhere in the FocusForm. The focus can be changed by clicking into another field or using the or keys. -DENHANCE_POP_ACCEL ------------------- Install accelerators on the text and form widgets of dialog boxes. Accelerators are also installed on the form widget of the 'confirm popup'. This allows to emulate clicking buttons by keys. An appropriate entry in the resource file is necessary: Xfm*button box*ok.accelerators:#override\n\ Return: set() notify() unset()\n\ Linefeed: set() notify() unset()\n\ Xfm*button box*cancel.accelerators:#override\n\ Escape: set() notify() unset()\n\ Likewise, if you want to use the accelerators in the 'edit' popup of the application manager and the 'select' popup entries in the resource database are required: Xfm*button box*install.accelerators:#override\n\ Return: set() notify() unset()\n\ Linefeed: set() notify() unset()\n\ Xfm*button box*replace.accelerators:#override\n\ Return: set() notify() unset()\n\ Linefeed: set() notify() unset()\n\ -DENHANCE_BUGFIX ---------------- Fix some bugs (see comments in the source) -DENHANCE_HISTORY ----------------- Provide a history of the visited paths. A menu can be popped up providing an mru ordered list of paths. The module 'FmHistory.c' provides procedures to create, destroy or chop a history list menu to a determined length. Paths can be deleted from the list or inserted on top. (see 'FmHistory.h') The module adds an action 'FmUpdateHistory()' to the application. Currently only one history that is common to all file windows is used (although the module supports more than one). Default translations pop the history up if the mouse button 3 is pressed on the label widget showing the actual path on top of the file window. (The default translation can of course be changed) As an additional feature the history can be popped up on the text input field in dialog boxes in order to paste a path there (only supported if -DENHANCE_TXT_FIELD). This is very practical when moving or copying files. An application resource 'historyMaxN' has been added to specify the maximal number of paths remembered (defaults to 30). A value of 0 lets the list grow without limit. -DENHANCE_USERINFO ------------------ Some modifications regarding the 'userinfo' structure: - The filemanager is not started in $HOME, but in the cwd. I'm often working somewhere with xterm and want an XFM to startup where I am. - The shell to be used by XFM is first read from the app_resource 'shellCommand', then from $SHELL and if neither works, "/bin/sh" is used (see above). -DENHANCE_MENU -------------- Small modification of the Folder-menu (see above) -DENHANCE_TRANSLATIONS ---------------------- The translations were moved to a resource file (as 'baseTranslations'). That way the user can modify them in a personal resource file. User configurability is why Xt is cool, so why restrict him/her? No fallback resources are set for the translations. By means of a new application resource 'appDefsVersion' (set to version number XFMVERSION in the app-defaults file) a check is made, if the right app_defaults file was found. In case of failure an error popup is shown and the program is terminated. The new subclasses of the fileList widget allow the user to map (e.g. key-) events to callbacks which are registered with arbitrary menu entries of the file window. See 'fileListCb()' below. -DENHANCE_PERMS --------------- I was shocked, when I realized that XFM does not even _display_ all the permissions (especially suid). If you configure -DENHANCE_PERMS the permissions string shown in the 'text view' looks like what 'ls -l' yields. Suid etc. can now also be set by the 'permissions' popup. There were four bitmaps added for this purpose: lib/bitmaps/xfm_suid.xbm lib/bitmaps/xfm_Suid.xbm lib/bitmaps/xfm_sticky.xbm lib/bitmaps/xfm_Sticky.xbm You should be aware that XFM updates its display only if the directory's inode was changed since the last timeout event. If a file's modes are changed or if a file pointed to by a symbolic link is deleted the directory's inode will remain unaffected and hence no update occurs. That's why an additional application resource was added, called hardUpdateTicks If this resource is not zero, every 'hardUpdateTicks'*'updateInterval' (eg. hardUpdateTicks=3, updateInterval=10000 -> every 30 secs) the changes will be determined the hard way ie. by 'stat()'ing the whole directory. -DENHANCE_SCROLL ---------------- When you delete a file or if you use, for example, an editor that creates a scratch file when opening an existing file, the directory shown by XFM changes. XFM will update its display, ie. it destroys the old view and creates a new one. This means that your actual position of the scrollbars is lost. The new position will be the top of the scrolled window. This behavior is VERY annoying. ;-( With -DENHANCE_SCROLL XFM tries to restore the position of the scrollbars after updating (same directory, same viewing mode). Of course there's no way of figuring out the new position if you just deleted, renamed or added a big number of files at once. In the normal case however this enhancement is a very nice feature. -DENHANCE_CURSOR ---------------- A 32x32 bit cursor will be used for the 'noentry' cursor which appears if the user tries to drop something on a directory without write access. (The old version used 48x48 bit, which some servers cannot handle). Code was added to query the server for the allowed cursor size. If 32x32 is still too big, 16x16 cursors will be used. New bitmap files were added: lib/bitmaps/xfm_noentry32.xbm the 32x32 noentry cursor lib/bitmaps/xfm_noentrymsk32.xbm lib/bitmaps/xfm_noentry_s.xbm small 16x16 cursors lib/bitmaps/xfm_noentrymsk_s.xbm lib/bitmaps/xfm_file_s.xbm lib/bitmaps/xfm_filemsk_s.xbm lib/bitmaps/xfm_files_s.xbm lib/bitmaps/xfm_filesmsk_s.xbm lib/bitmaps/xfm_dir_s.xbm lib/bitmaps/xfm_dirmsk_s.xbm lib/bitmaps/xfm_exec_s.xbm lib/bitmaps/xfm_execmsk_s.xbm -DENHANCE_SELECTION ------------------- This enhancement provides support for a simple inter client communication. A string containing the paths of the selected file items can be requested by other applications using the selection mechanism (PRIMARY selection). To provide visual feedback, the file window that owns the selection paints its status line using the 'highlightColor' (new app. resource which also defines the color used to highlight selected items). Another app. resource, 'selectionPathsSeparator', allows for an arbitrary string to be used as a separator between the individual paths. (Defaults to a space character). A new menu entry in the 'file' menu was created which allows for requesting the ownership of the PRIMARY selection. This is useful if some files had been selected before but the ownership of the X-selection was lost and the user later wants to get the ownership back. -DENHANCE_LOG ------------- This enhancement adds a logging window feature. Stdout and stderr are redirected to a new fd which is monitored by Xt. A callback is registered which stores the redirected data to a text widget. The text is popped up automatically as soon as new data is pending. A new entry has been added to the 'view' menu to request popup of the log window. The logging feature should maybe not be enabled under an OS which does no blocking IO (since XFM is only useful under younix anyway, this should be no problem). Depending on the state of a toggle widget the log-window is automatically popped up as soon as new data is logged. -DENHANCE_CMAP -------------- A new application Resource, 'colorCloseness' allows you to specify how close you want the colors to be to the original values. Loading an icon Xpm tries to use a slightly different color if a corresponding entry in the colormap exists already. The higher the value, the greater is the tolerance. A value of 40000 (default) is recommended by the designers of Xpm and it looks pretty good on my Sun which has 256 colors only and many, many slots can be saved. If XFM is still incapable to load the icons it will try to switch to its private colormap. -DVIEWPORT_HACK --------------- The viewport widget contains several bugs (see the patch file for 'Viewport.c'). If VIEWPORT_HACK is defined workarounds for the known bugs will be activated. 3. New Widgets for the File Window ================================== 3.1 Description of the New Widgets ---------------------------------- 3.1.1 The Common Superclass 'FileListWidget' - - - - - - - - - - - - - - - - - - - - - - Traditionally XFM created a toggle widget for each and every file shown in the file window. When displaying a big directory (eg. ghostscript's source directory) the time required to create all the widgets becomes prohibitively long. I would not use XFM anymore only for this reason. That's why I wrote new widgets implementing the 'icon view' and the 'text view'. Using these widgets, creating the file display is a LOT faster: on my pentium 133 there's no perceivable delay anymore (except for stat()'ing the directory of course) when creating the file window for the ghostscript directory mentioned above. The old version took up to several minutes though. The widgets add several new features and resources that will described below. Since I didn't want to rewrite XFM from scratch, I had to sacrifice some elegance of concept. Ideally a new widget should not be aware of the outside world, and everything should be encapsulated into its module (or some superclass). The 'FileListWidgetClass' however imports the definition of the fundamental data structure FileRec and calls some procedures of the outside world. The FileListWidget (FLW) implements a higher layer of abstraction and is not used directly. Instead it is subclassed by either the TextFileListWidget (TLW) or the IconFileListWidget (ILW), which implement the details of either viewing mode. The FileListWidget gets its FileList as a resource when it is created. The FileList can not be changed. The FLW maintains GCs for drawing and offers the resources fileList Pointer to the FileList; must be set on creation nFiles number of files in the list; must be set on creation font Font to draw file names and info highlightColor color used to highlight selected or highlighted files the TLW uses this color to draw the file name foreground normal foreground color borderWidth width of the border around selected files. userData pointer to arbitrary user data callback callbacks on this list are invoked by the 'notify(arg)' action. A pointer to the argument string is passed in the 'call data' parameter. dragTimeout After receiving a ButtonPress event the FLW suppresses propagation of Motion events for 'dragTimeout' millisecs. in order to distinguish between intended drags and small movements while clicking. This resource defaults to 200ms. For sake of simplicity most of these resources can only be set at creation. Note that the core resource 'borderWidth' is overlayed. The FLW itself has no border at all. When a FLW is created the file type is set using 'fileType()'. There are default Types defined in 'FmBitmaps.c'. Note again that the principle of perfect encapsulation is violated for sake of simplicity (use existing procedures if possible). Because I wanted also to use the existing actions, the FLW implements its own action 'dispatchDirExeFile()' which takes at least four arguments. The old version of XFM used a different widget for every file displayed in the file window. Hence it was possible to define different translations for different files. This is not possible with the new FLW. However FLW determines the file class for which the action dispatchDirExeFile() was invoked (directory, executable or normal file) and invokes different action procedures according to the file class. The names of these actions are given as arguments to dispatchDirExeFile(). The action name given as the fourth argument specifies a routine to be invoked if the event that triggered 'dispatchDirExeFile()' ocurred on the background of the FLW, ie. on no specific file item. It is possible to give more than four arguments to this action. The exceeding arguments are passed on to the action invoked by dispatchDirExeFile(). As an example consider the translation :dispatchDirExeFile( foo, boo, gnu, blah, arg) If Button1 is released on a FileListWidget it looks first for the file that is listed at the event position. If this file is a directory, the action 'foo(arg)' is invoked. If the file is executable 'boo(arg)' is called else (normal file) 'gnu(arg)'. If the button was released on no item at all, 'blah(arg)' will be called. Note that there is second version of dispatchDirExeFile(), called dispatchExeDirFilePopup(). The only difference between the two versions consists in the latter being registered as a Grab Action. This is necessary to dispatch actions that popup menus. The FLW provides a 'notify(arg)' action which calls the callback on its 'callback' list (resource 'XtNcallback'). A pointer to the argument string is passed in the 'call data' parameter. The FLW provides public procedures to map a pointer position to a file list entry and vice versa. These are implemented using methods supplied by the subclasses of FLW. (The 'text view' provides a different method to compute the list entry from a pointer position than the 'icon view' but the superclass FLW does not have to know about these details). Another public procedure 'FileListRefreshItem()' allows for redrawing one item in the FLW. The whole visible part can be redrawn by XClearArea(display,XtWindow(fileListWidget),0,0,0,0,True). The old XFM needs and events in its translation tables of the widgets of each individual file. Because in the new FLW not every file entry has its own window anymore, the FLW fakes and events. It tracks the pointer motion and generates 'SendEvents' when the pointer moves from one file entry to another. That way the same actions and translations can be used as with the old XFM (although the actions have to be dispatched by dispatchDirExeFile()). Note that and events of the FLW itself are eaten up and can not be used in translation tables. Since in XFM a FLW is usually created as a child of a viewport widget, these events can be selected eg. on the viewport's clipping window: Xfm*viewport.clip.translations: #override \n\ : do-something()\n\ : do-something-else()\n 3.1.2 The IconFileListWidget - - - - - - - - - - - - - - - The IconFileListWidget (ILW) is a subclass of FLW and implements the 'icon view' mode of the file window. It adds the following resources topSep space between the top/bottom edge of the ILW and the first/last row of file icons. leftSep space between the left/right edge of the ILW and the first/last column of file icons. entrySep horizontal and vertical space around file entries. labelSep space between the file icons and the file name strings. nHoriz number of columns of file icons. If this number equals to zero the number is chosen to fill the available space (default). minIconWidth minimal icon width. An icon is never drawn narrower than this. minIconHeight minimal icon height. An icon is never drawn smaller than this. The last two resources are currently set to the application resources fileIconWidth and fileIconHeight by the procedure that creates the ILW (backward compatibility to old XFM, see FmFw.c). This does not happen in the widget code however, I mention this here so nobody should wonder that resource file settings don't work. The ILW provides two actions, highlight() and unhighlight() which allow for highlighting one item (used by XFM to indentify possible drop targets). Note that the ILW, unlike the old XFM, is only able to highlight _one_ item at once. (The old XFM however did not highlight more than one item either, although this would theoretically be possible.) 3.1.3 The TextFileListWidget - - - - - - - - - - - - - - - The TextFileListWidget (TLW) is a subclass of FLW and implements the 'text view' mode of the file window. It adds the following resources topSep space between the top/bottom edge of the TLW and the first/last row of file icons. leftSep space between the left/right edge of the TLW and the first/last column of file icons. entrySep horizontal and vertical space around file entries. tabSep horizontal space between individual info fields of one file entry. showInode show the inode nr. showType show the device type: sym (l)ink, (d)irectory, (c)haracter special, (b)lock special, (p)ipe or (s)ocket. showLinks show the nr. of links. showPermissions show the permissions string. showOwner show the owner. showGroup show the group. showLength show the size of the file. showDate show the modification time. Some of the names of these resources were chosen to be compatible with the old XFM application resources. Additional fields have been added. The TLW provides two actions, highlight() and unhighlight() which allow for highlighting one item (used by XFM to indentify possible drop targets). Note that the TLW, unlike the old XFM, is only able to highlight _one_ item at once. (The old XFM however did not highlight more than one item either, although this would theoretically be possible.) In XFM a TLW is created as a child of a viewport widget. Note that there's a bug in the viewport GeometryManager that causes the geometry layout of the child to be calculated wrong if it requests a change of width or height only. Only if both sizes are changed at the same time the calculation is done better (there are still other bugs, alas). A resize request is issued by TLW when adding or removing information fields since the width changes. If this happens more than once, a horizontal scrollbar will appear although it is not needed. In case you don't want to patch the Viewport, there has been implemented a workaround in the TLW which can be activated by compiling the TLW with -DVIEWPORT_HACK. 3.2 Mayor Changes to XFM ------------------------ Upon incorporating the new widgets ILW and TLW into XFM some changes had to be made. The most important changes are stated here. Note that the changes can NOT be configured by defining preprocessor symbols. The main modifications are given here: FmVersion.h: - a new file containing only the version string XFMVERSION which was increased to 1.4.0 Fm.h: - Added two fields to 'TypeRec', 'bm_width' and 'bm_height'. These are needed in order to draw the file pixmaps and not to have to query the server for its dimensions. - Added one field 'option_items' to 'FileWindowRec' (see below). - Made the procedures 'fileType()' public. (To be used by FLW, arrrgh) - Added fields for the state of info fields shown by the 'text view' mode. This state is preserved when updating or cloning the file window. - Added public declaration of 'showTxtOptsCb()' (see below). - Added public declaration of 'destroyTxtOptsCb()' (see below). - Added public declaration of 'updateTxtOpts()' (see below). - Added public declaration of 'trackCursor()' (see below). - Added public default types 'TypeRec builtin_types[]' and symbols as indices into this table. - Changed the declaration of 'readIcon()' (added function args to read back the icon width and height, see below). - Application resources 'showInode', 'showType', 'showLinks' and 'showGroup' added. FmAw.c, FmAwActions.c, FmAwCb.c: - new call args to 'readIcon()' added. These are NULL because the application manager does not need pixmap width/height information. FmBitmaps.c: - definition of a new public variable 'TypeRec builtin_types[]'. Files whose type cannot resolved by fileType() are assigned one of these default types in FLW's Initialize method. The default types are DIR_T (directory) UPDIR_T ('..' dir) FILE_T ('normal' file, default) EXEC_T (executable) SYMLNK_T (symlink to file) DIRLNK_T (symlink to dir) EXECLNK_T (symlink to executable) BLACKHOLE_T (symlink to nothing) - Default type information is obtained by inspecting the file's stat modes. (see FileList.c). The default types are initialized in 'readBitmaps()'. In order for this initialization to work correctly the order of the default bitmaps DIR_BM .. BLACKHOLE_BM must not be changed. - 'readIcon(char *name, unsigned int *width, unsigned int *height)': added the 'width' and 'height' arguments in order to read the pixmap width and height into the new 'TypeRec' fields 'bm_width' and 'bm_height'. These are needed to draw the pixmaps by ILW. These pointers can be NULL to indicate that the information is not needed (eg. by the application manager). FmPopup.c: - 'selectReplaceCb()', 'selectAddCb()', 'selectRemoveCb()': These callback procedures among other things set the colors of selected toggle widgets. A test was inserted to see whether the widget is a subclass of FLW. In this case the color change is omitted, but a redraw of the FLW is issued (XClearArea() or FileListRefreshItem if only few items are concerned). FmMain.c: - The application resources 'showInode', 'showType', 'showGroup' and 'showLinks' were added. They control the initial settings of fields shown by the 'text view'. FmFwCb.c: - 'fileSelectAllCb()', 'fileDeselectCb()': see 'FmPopup.c'. - A public callback procedure 'showTxtOptsCb()' is added. This callback is intended to be registered by menu entries of a text view 'options' menu. This menu allows for switching individual info fields (eg. 'owner', 'group') to be switched on and off interactively. The callback propagates changes of the state of 'toggle' type menu entries to the corresponding TLW resource settings. - The list of 'option_items' (new field of FileWindowRec) is released in 'fileCloseCb()'. FmFwActions.c: - Added an 'ev' argument to 'static int findWidget(Widget w, FileWindowRec **fw_ret, XEvent *ev)' The event position is needed by findWidget to be able to retrieve the file list entry nr. in a FLW subclass widget. If 'w' is a subclass of FLW, findWidget() calls 'FileListFindEntry(w,ev)'. - All procedures calling findWidget() are modified in order to supply the new argument. - 'drag()' needed some modification, because it contains its own event loop. Therefore an argument 'event_return' was added to 'static Widget drag(Widget w, int button, FileWindowRec *fw, Boolean *on_root_return, XEvent *event_return)' in order to report back the last event processed by drag() to its calling routine (which might call findWidget()). - The action routines 'fileToggle()' and 'fileSelect()' were modified as described above (see FmPopup.c). - The action procedures 'fileHighlight()', 'fileMaybeHighlight()', 'resetCursor()' were modified and a new action, 'trackCursor()' was added. The modifications were made to support setting the cursor to 'noentry' when the user tries to drag something to the file window ('background') of a directory where he/she has no write access. The new action 'trackCursor()' is used to set the cursor when entering/leaving the file window. FmFw.c: - 'trackCursor()' is added to the action table. - In routine 'readFileBitmaps()', where the default icon pixmap is set, the new fields of 'TypeRec', 'bm_width' and 'bm_height' are set to the width and height of the default pixmap. - The routine 'fileType()' has been made public, so it can be used by the FLW. - In 'createFileWindow()' a new menu called 'options' is created. The menu allows individual info fields of the 'text view' to be switched on and off (eg. permissions, inode nr. etc). The menu registers the callback 'showTxtOptsCb()'. Note that the ordering of the menu entries is critical and can not be changed without adapting the callback routine and 'updateTxtOpts()'. - Eight boolean fields of 'FileWindowRec' reflect the state of the info fields shown by the 'text view'. This state is preserved when the file window is updated or cloned. The initial state is read from the application resources 'showInode', 'showPermissions' etc. The routine 'void updateTxtOpts(FileWindowRec *fw)' reads the state variables from the FileWindowRec 'fw' and updates the TLW and the text options menu accordingly. - added a callback procedure 'fileListCb(widget,clientdata,calldata)' which parses the first string passed in 'calldata' using 'XtNameToWidget' to find the specified widget-descendant of '((FileWindowRec*)clientdata)->shell' ie. a file window. If the named widget, which is supposed to be a menu entry, is found, the procedures on it's callback list will be called. This permits the user to map events to the fileList's 'notify()' action by means of translations. 'notify()' calls fileListCb in turn and passes its argument string. If this string can be resolved to the name of a menu item that menu item's callbacks are invoked. If a fileList widget contains e.g. the following translation: d : notify(*file*delete) and if there is a menu entry called 'delete' which is a descendant of the menu called 'file', the callback registered with the 'delete' menu item is invoked when the user presses 'd'. You might have to look up the widget names in the source (mainly 'FmFw.c') or by using 'editres'. Consult the docs of 'XtNameToWidget()' on how the argument string to 'notify()' is parsed. - 'createFileIcons()' has been rewritten; an ILW is now used. If the number of columns of icons is not fixed by the user (ie. resource 'nHoriz' of the ILW is zero) the 'Viewport' parent is not allowed to have a horizontal scrollbar. If it is resized, it will resize the ILW which displays as many columns as there is space for. 'fileListCb()' is registered on ILW's callback list (to be invoked by the 'notify()' action. That way selected files can be deleted, copied and so on by keystrokes (given the appropriate translations). - 'createTextDisplay()' has been rewritten; a TLW is now used. A callback procedure 'unmanageTxtOptsCb()' is registered which unmaps the options menu when the TLW is destroyed (change of view mode). The 'Viewport' parent of the TLW is allowed to have a horizontal bar if necessary. Consider the comments about a bug in the viewport widget above. The 'options' menu is mapped. 'fileListCb()' is registered on TLW's callback list (to be invoked by the 'notify()' action. That way selected files can be deleted, copied and so on by keystrokes (given the appropriate translations). - A new private callback procedure, 'unmanageTxtOptsCb()', is added. - A workaround for another bug in 'Viewport.c' has been added. (Under certain circumstances scrollbars are wrongly placed and obscured.) The workaround is activated by compiling 'FmFw.c' with -DVIEWPORT_HACK. A patch for 'Viewport.c' is also provided. 4. Other Modifications ====================== 4.1 Adapted Imakefiles and Application Defaults ----------------------------------------------- In order to be able to easily build XFM 'Imakefile', 'src/Imakefile' and 'Imake.options' were modified. New symbols were added to 'Imake.options' which control configuration of the different enhancements. The application defaults file 'Xfm.ad' is built depending on the different 'Imake.options' settings. The version string is extracted from 'FmVersion.h' and inserted into the application defaults. XFM uses this information to check for the correct version of the app. defaults. 4.2 A Patch File for the Viewport Widget ---------------------------------------- A patch for the viewport widget is provided to fix some bugs (see the comments in the file). Change dir to the Xaw or Xaw3d source directory and issue patch -p0 < 'path'/viewport-patch to apply the patch. Then you have to rebuild the Xaw/Xaw3d library. If you link XFM with the patched library, the line defining the symbol 'USE_VP_HACK' should be commented out in 'Imake.options' before building XFM. If you plan to use the buggy library, it is recommended not to comment out the definition of 'USE_VP_HACK' thereby activating workarounds for the bugs. 5. Building the Enhanced XFM ============================ Edit the file 'Imake.options' to your needs and/or desires. By default all the enhancements and the viewport hack will be compiled. Then build and install xfm by issuing 'xmkmf -a', 'make all' and 'make install'. Note that the application resource file 'Xfm' _MUST_ be installed at a place where xfm can find it. Be aware that xfm-1.4 can not be run without the resources because many important things are not hardcoded -- but user configurable :-). If the proper resource file can not be found (XFM checks also for the version of the resource file), a message is displayed and XFM aborts. Preferably 'Xfm' should be installed in a directory contained in the XFILESEARCHPATH (should default to /usr/X11R6/lib/X11/app-defaults/%N). Every user can then still modify some of the resources to his/her personal needs and put them into an additional 'Xfm' file located in a directory contained in the XUSERFILESEARCHPATH (should default to $HOME/%N, as long as the XAPPLRESDIR is not set). The user defined resources override the system wide resources; consult the Xt-docs for further (important) information on this subject. 6. TODO ======= To further improve the speed/response time of XFM the procedure of how directories are read could be changed. Since files are mostly listed alphabetically, the directory should first be read and sorted. Only the currently visible files should then be stat()'ed, deferring the time consuming stats for invisible files for a later time. If ever XFM is rewritten, the whole file window stuff should be moved to widget code (ie. FLW). The file list should be maintained and updated when XFM manipulates it. Re-reading the directory and stat'ing everything is then only needed at 'updateIntervals' to track for 'external' modifications. A feature to successively select files by keystrokes could be added. (Typing a 'regexpr' on the file window would select the corresponding files) Consult the file TODO for further suggestions. xfm-1.5.4/README-1.4.30000644000175000017500000002054607731543450010574 00000000000000 XFM - The X File Manager (ver 1.4.3) ------------------------------------ (c) Simon Marlow 1990-1993 simonm@dcs.glasgow.ac.uk (c) Albert Graef 1994-1997 ag@muwiinfa.geschichte.uni-mainz.de (c) Till Straumann 1997 strauman@sun6hft.ee.tu-berlin.de 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. ------------------------------------------------------------------------------ For the latest information and sources please visit the xfm homepage at http://www.musikwissenschaft.uni-mainz.de/~ag/xfm/. Installation instructions can be found in the INSTALL file (who would have guessed that ;-)). This is a powerful file and applications manager program written using the X toolkit. It contains virtually all of the features that you would expect in a file manager -- move around your directory tree in multiple windows, and move, copy or delete files with simple mouse operations. Directory displays are updated automatically in regular intervals when the contents of a displayed directory changes. The integrated application manager allows you to load files into your favourite applications from the file manager by dragging icons. It can also be used as a "shelf" onto which you can place files and directories you are currently working with. A special LOAD action for application files enables you to manage different application groups. User-definable file types allow you to specify a command to be executed when double-clicking on a file or dropping other files onto it. The command can also prompt you for required parameters. Xfm makes it easy to configure special kinds of actions such as, e.g., replacing the contents of a compressed tar archive with a collection of selected files. A lot of corresponding examples can be found in the distribution, including a fully functional trashcan feature. Last not least, xfm can automatically mount and unmount special devices like floppies as you open and close the corresponding directories (mount points). So you won't have to fiddle around with mount or mtools commands any more if all you want to do is copy some files between the hard disk and your floppy drive. I think that this program compares well to other free -- and even commercial -- file managers. It is fast, convenient to use, and offers a lot of built-in functionality and configuration options. If you are not addicted to the shell and like to shuffle around files with one hand in order to perform tasks such as moving, copying, deleting, compiling, formatting, archiving, compressing, etc. etc., then xfm is certainly for you. The original version of this program was written by Simon Marlow at the University of Glasgow. I included Simon's README for reference purposes; see README-1.2. [Most of the information in this file is outdated; please refer to this README file and the man page for up-to-date installation and usage instructions.] Release 1.3 stemmed from my efforts to resolve some nasty bugs in the 1.2 beta version distributed with Linux slackware, and to add XPM support for displaying color icons in the file and application windows. As it came out, I also added a plethora of other features to make xfm the tool I was looking for; see the ChangeLog for details. Release 1.3.1 added an automatic shell detection feature, which has been contributed by Robert Vogelgesang (vogelges@rhrk.uni-kl.de). We hope that this transparently fixes the problems with different shell argument passing conventions which have been encountered with release 1.3. The configuration files supplied with the package should now work with any popular shell -- if not, set the new X resource Xfm.BourneShells; see the man page for details. Release 1.3.2 added a bunch of new features; the most important are listed below: * Improved support for creating symbolic links. The Link option now works completely analogous to the Copy option; in particular, it is now possible to create links for a selected set of files in a specified directory. * Rearranging items in the application window, which used to be a pain in earlier releases, is now a lot easier. Items in the application window can now be moved and copied using drag and drop, and cut/copy/paste gives a convenient way to move entries between different application files. There also is a new option for installing application groups, and the Back and Main buttons allow to navigate in the application group tree. * "Magic headers," contributed by Juan D. Martin (juando@cnm.us.es). With this feature it is now possible to identify file types by their mode and contents in addition to the filename patterns. This is implemented using a "magic" file format (see magic(5)) with some important extensions like mode checking and regular expression matching. It also allows you to specify custom icons for directories and executables in file windows. A sample magic file is included. Also, Juan wrote a tiny program named xfmtype which lets you determine the xfm magic type of a file. * A Filter option for the View menu, contributed by Kevin Rodgers (rodgers@lvs-emh.lvs.loral.com). This nice function allows you to restrict the set of files displayed in a file window -- for instance, only display *.c files. * A View option for the file popup menu (accompanied by a VIEW action which can be used in push actions), contributed by Scott Heavner (sdh@falstaff.MAE.cwru.edu). This option works analogous to the Edit option, but invokes a program for viewing a file (e.g. xless, available from ftp.x.org). * Default values in parameter dialogs, contributed by Brian King (ender@ee.WPI.EDU). Using the %parameter--value% notation, you can now specify default values for parameters in push and drop actions. * Lots of new icons, and a new set of standard config files. Juan D. Martin has compiled a comprehensive collection of fileicons. Take a look at the contrib/fileicons directory. * Besides this, I cleaned up the source tree, fixed some bugs, overhauled Imakefiles and added an "Imake.options" file for easier customization. Release 1.4 is mostly the work of Till Straumann from the Technical University of Berlin. He's done a marvellous job. Here are the most important user-visible changes (please refer to Till's README-1.4 for further details): * xfm now starts in the cwd instead of the user's home directory * the performance of the file view has been improved considerably; it's really impressive, especially if you're displaying directories with hundreds of files * the scrollbar position is retained during updates (everybody's favourite fix ;-)) * keyboard shortcuts for most menu operations and dialog buttons, improved scrolling text fields in dialogs * path history menu * log window for output of child processes * a new "shellCommand" resource now allows you to set the shell to be used for invoking commands independently from the SHELL environment variable * text display, file info and permissions now include the suid/sgid/sticky bits * X selection support: it is now possible to paste the paths of the selected file items (as strings) to other applications using the XA_PRIMARY selection * many bug fixes I also added some of my own favourite patches: * bug fixes in copy operation (patch contributed by Walt Killjoy (ngogn@clark.net)) and magic headers code (patch by Juan D. Martin) * transparently move files between different file systems (via copy/del) * new Rename and Xterm operations (inspired by moxfm), and an "About" dialog which displays a logo and version information * current path/application file name is shown in window titles * at startup, prompt user to run xfm.install if the .xfm dir does not yet exist (every sysadmin's favourite change ;-)) * an improved setup featuring additional file types and spiffy new 3d-look icons (see the contrib/3dicons dir) Enjoy! Albert Graef ag@muwiinfa.geschichte.uni-mainz.de xfm-1.5.4/defaults/0000777000175000017500000000000010744136015011130 500000000000000xfm-1.5.4/defaults/Makefile.am0000644000175000017500000000251110422414423013072 00000000000000MAINTAINERCLEANFILES = Makefile.in pkgconfdir = $(sysconfdir)/X11/xfm applicationdefaultdir = $(sysconfdir)/X11/app-defaults CONFIG_FILES = xfm_magic xfm_mailcap xfm_dev xfm_mime.types APP_FILES = Apps.xfm Graphics.xfm CONFIG_DEFS = -D@CONFIG_VARIANT@=@CONFIG_VARIANT@ applicationdefault_DATA = Xfm %: %.m4 m4 -E -P -G $(DEFS) -DDATADIR="$(pkgdatadir)" -DCONFDIR="$(sysconfdir)/X11/xfm" -DAPPDIR="CONFDIR" $(CONFIG_DEFS) $< >$@ || rm $@ Xfm.test: Xfm sed -e 's/^!\?Xfm/TestXfm/' $< > $@ fallback.res: Xfm awk 'function iscontinued(){continued=(substr($$0,length($$0))=="\\")} BEGIN{lastcomment=0;continued=0} continued && lastcomment {iscontinued();next} /^!/ {if(continued){print "#error commentary in continued line"};iscontinued();lastcomment=1;next} {lastcomment=0;pre=""} /^Xfm/ {if(continued){print "#error continued line looking like new fallback resource"};$$0=substr($$0,4);pre="XFM_APP_CLASS "} {sc=continued;iscontinued(); if(continued){line=substr($$0,1,length($$0)-1);post=""}else{line=$$0;post=","};if(length(line)>0){gsub(/\\/,"\\\\",line);gsub(/"/,"\\\"",line);print pre "\"" line "\"" post}else{if(sc){print post}};next}' $< > $@ pkgconf_DATA = $(CONFIG_FILES) $(APP_FILES) noinst_DATA = fallback.res EXTRA_DIST = $(addsuffix .m4,$(CONFIG_FILES)) Xfm.m4 $(APP_FILES) CLEANFILES = Xfm Xfm.test fallback.res $(CONFIG_FILES) xfm-1.5.4/defaults/Makefile.in0000644000175000017500000002676010744135555013134 00000000000000# Makefile.in generated by automake 1.10 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = defaults DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/xfmconfig.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(applicationdefaultdir)" \ "$(DESTDIR)$(pkgconfdir)" applicationdefaultDATA_INSTALL = $(INSTALL_DATA) pkgconfDATA_INSTALL = $(INSTALL_DATA) DATA = $(applicationdefault_DATA) $(noinst_DATA) $(pkgconf_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COMPRESSIONLIBS = @COMPRESSIONLIBS@ CONFIG_VARIANT = @CONFIG_VARIANT@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ MAINTAINERCLEANFILES = Makefile.in pkgconfdir = $(sysconfdir)/X11/xfm applicationdefaultdir = $(sysconfdir)/X11/app-defaults CONFIG_FILES = xfm_magic xfm_mailcap xfm_dev xfm_mime.types APP_FILES = Apps.xfm Graphics.xfm CONFIG_DEFS = -D@CONFIG_VARIANT@=@CONFIG_VARIANT@ applicationdefault_DATA = Xfm pkgconf_DATA = $(CONFIG_FILES) $(APP_FILES) noinst_DATA = fallback.res EXTRA_DIST = $(addsuffix .m4,$(CONFIG_FILES)) Xfm.m4 $(APP_FILES) CLEANFILES = Xfm Xfm.test fallback.res $(CONFIG_FILES) all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu defaults/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu defaults/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-applicationdefaultDATA: $(applicationdefault_DATA) @$(NORMAL_INSTALL) test -z "$(applicationdefaultdir)" || $(MKDIR_P) "$(DESTDIR)$(applicationdefaultdir)" @list='$(applicationdefault_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ echo " $(applicationdefaultDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(applicationdefaultdir)/$$f'"; \ $(applicationdefaultDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(applicationdefaultdir)/$$f"; \ done uninstall-applicationdefaultDATA: @$(NORMAL_UNINSTALL) @list='$(applicationdefault_DATA)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(applicationdefaultdir)/$$f'"; \ rm -f "$(DESTDIR)$(applicationdefaultdir)/$$f"; \ done install-pkgconfDATA: $(pkgconf_DATA) @$(NORMAL_INSTALL) test -z "$(pkgconfdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfdir)" @list='$(pkgconf_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ echo " $(pkgconfDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgconfdir)/$$f'"; \ $(pkgconfDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgconfdir)/$$f"; \ done uninstall-pkgconfDATA: @$(NORMAL_UNINSTALL) @list='$(pkgconf_DATA)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(pkgconfdir)/$$f'"; \ rm -f "$(DESTDIR)$(pkgconfdir)/$$f"; \ done tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(DATA) installdirs: for dir in "$(DESTDIR)$(applicationdefaultdir)" "$(DESTDIR)$(pkgconfdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-applicationdefaultDATA install-pkgconfDATA install-dvi: install-dvi-am install-exec-am: install-html: install-html-am install-info: install-info-am install-man: install-pdf: install-pdf-am install-ps: install-ps-am installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-applicationdefaultDATA uninstall-pkgconfDATA .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic distclean \ distclean-generic distdir dvi dvi-am html html-am info info-am \ install install-am install-applicationdefaultDATA install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-pkgconfDATA install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am uninstall uninstall-am \ uninstall-applicationdefaultDATA uninstall-pkgconfDATA %: %.m4 m4 -E -P -G $(DEFS) -DDATADIR="$(pkgdatadir)" -DCONFDIR="$(sysconfdir)/X11/xfm" -DAPPDIR="CONFDIR" $(CONFIG_DEFS) $< >$@ || rm $@ Xfm.test: Xfm sed -e 's/^!\?Xfm/TestXfm/' $< > $@ fallback.res: Xfm awk 'function iscontinued(){continued=(substr($$0,length($$0))=="\\")} BEGIN{lastcomment=0;continued=0} continued && lastcomment {iscontinued();next} /^!/ {if(continued){print "#error commentary in continued line"};iscontinued();lastcomment=1;next} {lastcomment=0;pre=""} /^Xfm/ {if(continued){print "#error continued line looking like new fallback resource"};$$0=substr($$0,4);pre="XFM_APP_CLASS "} {sc=continued;iscontinued(); if(continued){line=substr($$0,1,length($$0)-1);post=""}else{line=$$0;post=","};if(length(line)>0){gsub(/\\/,"\\\\",line);gsub(/"/,"\\\"",line);print pre "\"" line "\"" post}else{if(sc){print post}};next}' $< > $@ # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xfm-1.5.4/defaults/xfm_magic.m40000644000175000017500000000611410506770213013242 00000000000000# add your own entries overriding others here: 0 short 0x1F9D COMPRESS 0 short 0x1F8B GZIP 0 string .snd audio/basic 0 string RIFF >8 string WAVE audio/x-wav 0 long 0x59A66A95 image/x-cmu-raster 0 string P1 image/x-portable-bitmap 0 string P2 image/x-portable-graymap 0 string P3 image/x-portable-pixmap 0 string P4 image/x-portable-bitmap 0 string P5 image/x-portable-graymap 0 string P6 image/x-portable-pixmap 0 short 0x4D4D image/tiff 0 short 0x4949 image/tiff 0 string GIF87a image/gif 0 string GIF89a image/gif 0 short 0xffd8 image/jpeg 0 long 0xFFD8FFE0 image/jpeg 0 long 0xFFD8FFEE image/jpeg 1 string PNG image/png 0 long 0x01666370 application/x-font 0 string From text/x-mail 0 string #FIG application/x-xfig 0 string #XFM application/x-xfm 0 string text/html 0 string text/html 0 string /*\ XPM\ */ image/x-xpixmap 0 regexp \ ^#define[\ \t]+[^\ \t]+_width[\ \t]+[0-9]+ image/x-xbitmap 0 regexp&512 (^|\n)\\.SH\ NAME application/x-troff-man 0 regexp&512 \ (^|\n)begin[\ \t]+[0-7][0-7][0-7] application/x-uuencoded 0 string %! application/postscript 0 string %PDF- application/pdf 0 string \\documentclass text/x-tex 0 string \\documentstyle text/x-tex m4_dnl As the current sid version does not register the vnd.sun.xml m4_dnl types anymore, replace them by the corresponding new ones. m4_define(XXX,application/vnd.m4_ifdef(`SARGE',sun.xml.$1,oasis.opendocument.$2)) 0 string PK\003\004 application/x-zip >18 string \036\000\000\000\036\000\000\000\010\000\000\000mimetypeapplication/vnd.sun.xml.writer XXX(writer,text) >18 string \045\000\000\000\045\000\000\000\010\000\000\000mimetypeapplication/vnd.sun.xml.writer.global XXX(writer.global,text-master) >18 string \034\000\000\000\034\000\000\000\010\000\000\000mimetypeapplication/vnd.sun.xml.calc XXX(calc,spreadsheet) >18 string \034\000\000\000\034\000\000\000\010\000\000\000mimetypeapplication/vnd.sun.xml.draw XXX(draw,graphics) >18 string \034\000\000\000\034\000\000\000\010\000\000\000mimetypeapplication/vnd.sun.xml.math XXX(math,formula) >18 string \037\000\000\000\037\000\000\000\010\000\000\000mimetypeapplication/vnd.sun.xml.impress XXX(impress,presentation) >18 string \047\000\000\000\047\000\000\000\010\000\000\000mimetypeapplication/vnd.oasis.opendocument.text XXX(writer,text) >18 string \056\000\000\000\056\000\000\000\010\000\000\000mimetypeapplication/vnd.oasis.opendocument.spreadsheet XXX(calc,spreadsheet) >18 string \053\000\000\000\053\000\000\000\010\000\000\000mimetypeapplication/vnd.oasis.opendocument.graphics XXX(draw,graphics) >18 string \057\000\000\000\057\000\000\000\010\000\000\000mimetypeapplication/vnd.oasis.opendocument.presentation XXX(impress,presentation) >18 string \052\000\000\000\052\000\000\000\010\000\000\000mimetypeapplication/vnd.oasis.opendocument.formula XXX(math,formula) # include mime database of libmagic1 (resposible for the file command) include: /usr/share/m4_ifdef(`SARGE',misc/)file/magic.mime m4_dnl too buggy to include: m4_dnl # data from gnome-libs-data m4_dnl include: /etc/mime-magic xfm-1.5.4/defaults/xfm_mailcap.m40000644000175000017500000000202110744135464013570 00000000000000# If ~/.xfm/xfm_mailcap (or whatever value the mailcapFile resource has) # does not exist (or if it includes, preferably as last line # an "include; /etc/X11/xfm/xfm_mailcap") this file (unless someone # changed the systemwideMailcapFile resource) is read # to get mailcap entries for all mime-types. # By default is just read the default places for such files, # if you have xfm specific things to add, do this before all # of them. # see xfm_mailcap(5) for more information application/x-xfm; LOAD; # Include program-independant user data: include; ~/.mailcap # No nametemplate, as openoffice does not like the wrong one application/msword; ooffice '%s'; compose=ooffice '%s'; edit=ooffice '%s'; test=test "$DISPLAY" != "" -a -x /usr/bin/ooffice ; description="Microsoft Office Document" # Include system-wide user data: include; /etc/mailcap include; /usr/share/etc/mailcap include; /usr/local/etc/mailcap # Fall-back default for manpages: application/x-troff-man; man -l '%s'; needsterminal; description=manual page # *; VIEW; edit=EDIT xfm-1.5.4/defaults/xfm_dev.m40000644000175000017500000000121610421673302012733 00000000000000# This file specify some directories and commands which xfm # should execute before entering and after leaving them. # The format is: # :: # # first some manual examples: # #/dos/c:mount /dos/c:umount /dos/c #/media/floppy:mount /media/floppy:umount /media/floppy:dev_floppy.xpm #/media/cdrom:mount /media/cdrom:umount /media/cdrom # # Now a special entry telling xfm to call getfsent(1) to read /etc/fstab # It will include all entries containing an mountoption starting with "user". # The mountpoint will appendnded after the given command and a space: GETFSENT:mount:umount:dev_disk.xpm,iso9660=dev_cdrom.xpm xfm-1.5.4/defaults/xfm_mime.types.m40000644000175000017500000000005710421704216014250 00000000000000!include ~/mime.types !include /etc/mime.types xfm-1.5.4/defaults/Xfm.m40000644000175000017500000003546510735452244012062 00000000000000!*********************************************************************** ! Application defaults for xfm. ! Defaults are commented out (have a ! in front of them) ! (Don't forget to remove the ! in front of those you change) !*********************************************************************** !********** Version of xfm this is made for ********** Xfm.appDefsVersion: 1.5 !***********************some Colors******************* Xfm*highlightColor: midnight blue Xfm*foreground: black Xfm*background: grey77 Xfm*fmLog*log_text.background: white !!Xfm*viewport.icon box*Toggle.foreground: midnight blue !****************some files and filepaths:************ ! bitmap and pixmap path: !Xfm.bitmapPath: DATADIR/bitmaps:/usr/include/X11/bitmaps !Xfm.pixmapPath: DATADIR/icons:DATADIR/pixmaps:/usr/include/X11/pixmaps ! Search for Application Files: !Xfm.systemwideApplicationDataFile: APPDIR/Apps.xfm !Xfm.applicationDataFile: ~/.xfm/Apps.xfm !Xfm.systemwideApplicationDataDir: APPDIR !Xfm.applicationDataDir: ~/.xfm ! store CopyPaste between Application windows in here: !Xfm.applicationDataClip: ~/.xfm/.XfmClip ! Config files: !Xfm.systemwideDevFile: CONFDIR/xfm_dev !Xfm.systemwideMailcapFile: CONFDIR/xfm_mailcap !Xfm.systemwideMimeTypesFile: CONFDIR/xfm_mime.types !Xfm.systemwideMagicFile: CONFDIR/xfm_magic !Xfm.devFile: ~/.xfm/xfm_dev !Xfm.mailcapFile: ~/.xfm/xfm_mailcap !Xfm.magicFile: ~/.xfm/xfm_magic !Xfm.mimeTypesFile: ~/.xfm/xfm_mime.types !*****************Asking questions******************** !Xfm.confirmDeletes: True !Xfm.confirmDeleteFolder: True !Xfm.confirmMoves: True !Xfm.confirmCopies: True !Xfm.confirmOverwrite: True !Xfm.confirmQuit: True !**********************Echoing************************ !Xfm.echoActions: False !******************what and how to show**************** ! TODO: move them to Xfm !Xfm.showOwner: True !Xfm.showDate: True !Xfm.showPermissions: True !Xfm.showLength: True !Xfm.showInode: True !Xfm.showType: True !Xfm.showGroup: True !Xfm.showLinks: True !Xfm.defaultDisplayType: Icons !Xfm.initialDisplayType: Icons !Xfm.defaultSortType: SortByName !****************fall-back programs******************* Xfm.editor: nedit Xfm.viewer: xless !Xfm.xTerminal: x-terminal-emulator -e !Xfm.xTerminalAlone: x-terminal-emulator !Xfm.shell: /bin/sh !*******Specify which window to show at startup******* ! if none is True and no -filemgr nor -appmgr is in the command line ! both are shown: !Xfm.appmgr: False !Xfm.filemgr: False !***********************fonts************************* ! to set all fonts: Xfm*Font: XtDefaultFont ! some special Fonts: Xfm.iconFont: -adobe-helvetica-medium-r-*-*-10-* Xfm.buttonFont: -adobe-helvetica-medium-r-*-*-12-* Xfm.menuFont: -adobe-helvetica-medium-r-*-*-12-* Xfm.labelFont: -adobe-helvetica-medium-r-*-*-12-* Xfm.statusFont: -adobe-helvetica-medium-r-*-*-12-* Xfm.boldFont: -adobe-helvetica-bold-r-*-*-12-* ! this should be a fixed width font: Xfm.cellFont: fixed Xfm*fmLog*AsciiSink.font: -*-lucidatypewriter-medium-r-*-*-12-* !**********************geometry*********************** ! application window Xfm.Geometry: 240x345+565+130 ! file windows: Xfm.initGeometry: 555x345+5+130 Xfm.file windows.Geometry: 555x345 ! Layout in Icons mode: !Xfm*IconFileList.entrySep: 2 !Xfm*IconFileList.topSep: 2 !Xfm*IconFileList.leftSep: 2 !Xfm*IconFileList.labelSep: 2 ! number of columns, 0=as much as fit: !Xfm*IconFileList.nHoriz: 0 ! minimal width of icons: !Xfm*IconFileList.minIconWidth: 0 ! minimal height of icons: !Xfm*IconFileList.minIconHeight: 0 ! maximal length of text below an icon: !Xfm*IconFileList.maxLabelWidth: 150 ! Layout in Text mode: !Xfm*TextFileList.entrySep: 2 !Xfm*TextFileList.topSep: 2 !Xfm*TextFileList.leftSep: 2 !Xfm*TextFileList.tabSep: 4 ! TODO: move show* here? !***********************different stuff*************** ! hopefully not needed: !Xfm.BourneShells: AUTO ! number of history entries to keep !Xfm.historyMaxN: 30 ! tolarance for matching colors !Xfm.colorCloseness: 40000 ! seperator between file names for the clipboard ! a space, escaped with a \ before it: !Xfm.selectionPathsSeparator: \ ! miliseconds between folder updates !Xfm.updateInterval: 10000 ! reread permissions every n-th update (0=disable) Xfm.hardUpdateTicks: 10 ! miliseconds between double clicks: !Xfm.doubleClickTime: 300 ! ignore magic rules needing so much look-ahead in a file !Xfm.maxMagicRead: 1024 !********************************************************** ! translations (key and mouse bindings in the following format) ! should be called baseTranslations in the app-defaults file ! so that a .Xresources file can have .translations items for ! just the changed items. ! ! mouse and key bindings for File Window in Icon view: !Xfm*IconFileList.baseTranslations:#override\n\ : dispatchDirFile(fileHighlight,fileMaybeHighlight,"")\n\ : resetCursor()\n\ Shift , : fileToggle()\n\ (2) : dispatchDirFile(fileOpenDir,fileExecAction,"")\n\ , : fileSelect()\n\ , : fileBeginDrag(1,move)\n\ , : fileToggle()\n\ , : fileBeginDrag(2,copy)\n\ Any : grabMouseForPopup(dispatchDirFile,dirPopup,filePopup,"")\n\ Any : ViewportScroll(-0.1,V)\n\ Any : ViewportScroll(+0.1,V)\n\ Shift n : notify(*folder*new)\n\ Shift g : notify(*folder*goto)\n\ Shift h : notify(*folder*home)\n\ Shift u : notify(*folder*up)\n\ Shift c : notify(*folder*clone)\n\ Shift q : notify(*folder*close)\n\ Ctrl r : notify(*view*tree)\n\ Ctrl i : notify(*view*icons)\n\ Ctrl t : notify(*view*text)\n\ Ctrl n : notify("*view*sort by name")\n\ Ctrl s : notify("*view*sort by size")\n\ Ctrl d : notify("*view*sort by mtime")\n\ Ctrl f : notify(*view*filter)\n\ Ctrl h : notify("*view*hide folders")\n\ Ctrl m : notify("*view*mix folders/files")\n\ Ctrl u : notify("*view*show hidden files")\n\ Ctrl l : notify("*view*show log")\n\ n : notify(*file*new)\n\ m : notify(*file*move)\n\ c : notify(*file*copy)\n\ l : notify(*file*link)\n\ d : notify(*file*delete)\n\ Delete : notify(*file*delete)\n\ BackSpace : notify(*file*delete)\n\ s : notify(*file*select)\n\ a : notify("*file*select all")\n\ u : notify("*file*deselect all")\n\ o : notify("*file*own Selection")\n\ x : notify(*file*xterm)\n\ q : notify(*file*quit)\n ! mouse and key bindings for FileWindow in Text view: !Xfm*TextFileList.baseTranslations:#override\n\ : dispatchDirFile(fileHighlight,fileMaybeHighlight,"")\n\ : resetCursor()\n\ Shift , : fileToggle()\n\ (2) : dispatchDirFile(fileOpenDir,fileExecAction,"")\n\ , : fileSelect()\n\ , : fileBeginDrag(1,move)\n\ , : fileToggle()\n\ , : fileBeginDrag(2,copy)\n\ Any : grabMouseForPopup(dispatchDirFile,dirPopup,filePopup,"")\n\ Any : ViewportScroll(-0.1,V)\n\ Any : ViewportScroll(+0.1,V)\n\ Shift n : notify(*folder*new)\n\ Shift g : notify(*folder*goto)\n\ Shift h : notify(*folder*home)\n\ Shift u : notify(*folder*up)\n\ Shift c : notify(*folder*clone)\n\ Shift q : notify(*folder*close)\n\ Ctrl r : notify(*view*tree)\n\ Ctrl i : notify(*view*icons)\n\ Ctrl t : notify(*view*text)\n\ Ctrl n : notify("*view*sort by name")\n\ Ctrl s : notify("*view*sort by size")\n\ Ctrl d : notify("*view*sort by mtime")\n\ Ctrl f : notify(*view*filter)\n\ Ctrl h : notify("*view*hide folders")\n\ Ctrl m : notify("*view*mix folders/files")\n\ Ctrl u : notify("*view*show hidden files")\n\ n : notify(*file*new)\n\ m : notify(*file*move)\n\ c : notify(*file*copy)\n\ l : notify(*file*link)\n\ d : notify(*file*delete)\n\ Delete : notify(*file*delete)\n\ BackSpace : notify(*file*delete)\n\ s : notify(*file*select)\n\ a : notify("*file*select all")\n\ u : notify("*file*deselect all")\n\ o : notify("*file*own Selection")\n\ x : notify(*file*xterm)\n\ q : notify(*file*quit)\n !**************remove some borders******************** ! these are some fall-back defaults. There is no easy ! way to specify them in the program in a way they can ! be changed here or in a user's .Xresources file without ! being in here, so here they are: Xfm*Command.cursor: hand2 Xfm*Command*borderWidth: 0 Xfm*viewport*Command*shadowWidth: 0 Xfm*MenuButton.cursor: hand2 Xfm*popup form*bitmap.borderWidth: 0 Xfm*popup form*label.borderWidth: 0 Xfm*button box.orientation: horizontal Xfm*button box.borderWidth: 0 Xfm*file window*viewport.borderWidth: 0 Xfm*viewport.icon box*Label.borderWidth: 0 Xfm*viewport.icon box.Command.borderWidth: 0 Xfm*viewport.icon box.Form.borderWidth: 0 Xfm*viewport.icon box*Toggle.borderWidth: 1 Xfm*chmod*Label.borderWidth: 0 Xfm*info*Label.borderWidth: 0 Xfm*error*Label.borderWidth: 0 Xfm*confirm*Label.borderWidth: 0 Xfm*fm_history.label: Path history Xfm*fm_history*SmeLine.lineWidth: 1 ! the translations for the Application Window Xfm*awform*icon box.baseTranslations: #override\n\ : dummy()\n\ : dummy()\n\ Any : appPopup()\n\ : appTrackCursor()\n\ : appTrackCursor()\n\ Any : ViewportScroll(-0.1,V)\n\ Any : ViewportScroll(+0.1,V)\n Xfm*awform*icon box*label.baseTranslations: #override\n\ Any : ViewportScroll(-0.1,V)\n\ Any : ViewportScroll(+0.1,V)\n\ : appTrackCursor()\n\ : appTrackCursor()\n Xfm*awform*icon box*icon.baseTranslations:#override\n\ Any : ViewportScroll(-0.1,V)\n\ Any : ViewportScroll(+0.1,V)\n\ : appMaybeHighlight()\n\ : unhighlight()\n\ (2) : runApp()\n\ , : appSelect()\n\ , : appBeginDrag(1,move)\n\ , : appToggle()\n\ , : appBeginDrag(2,copy)\n ! the translations for the folderlabel of a file window Xfm*file window*folderlabel.baseTranslations: #override\n\ Any : FmUpdateHistory(fm_history) MenuPopup(fm_history)\n\ (2) : fileRefresh()\n ! the file window main viewport: Xfm*file window*viewport.baseTranslations: #override\n\ : trackCursor()\n\ : trackCursor()\n\ Any : ViewportScroll(-0.1,V)\n\ Any : ViewportScroll(+0.1,V)\n ! the translations for the Tree View of a file window: Xfm*file window*icon box*tree_icon.baseTranslations: #override\n\ : fileHighlight()\n\ : resetCursor()\n\ Shift , : fileToggle()\n\ , : fileSelect()\n\ , : fileBeginDrag(1,move)\n\ , : fileToggle()\n\ , : fileBeginDrag(2,copy)\n\ : dirPopup()\n\ Any : ViewportScroll(-0.1,V)\n\ Any : ViewportScroll(+0.1,V)\n\ Shift n : notify(*folder*new)\n\ Shift g : notify(*folder*goto)\n\ Shift h : notify(*folder*home)\n\ Shift u : notify(*folder*up)\n\ Shift c : notify(*folder*clone)\n\ Shift q : notify(*folder*close)\n\ Ctrl r : notify(*view*tree)\n\ Ctrl i : notify(*view*icons)\n\ Ctrl t : notify(*view*text)\n ! the translations for the text fields: Xfm*TextField.baseTranslations:#override\n\ Any: FocusSet() FmUpdateHistory(fm_history) MenuPopup(fm_history)\n\ Shift Tab:FocusTraverse(b)\n\ Tab:FocusTraverse()\n\ :Detail_NotifyAncestor(CursorState,a)\n\ :Detail_NotifyAncestor(CursorState,i)\n\ :FocusSet() HighlightExtend() MakeSelection(PRIMARY)\n\ :FocusSet() MoveCursor() InsertSelection(PRIMARY)\n\ :\n\ :\n\ Escape: \n\ Return: \n\ Linefeed:\n ! first popdown menu, then trigger action: Xfm*SimpleMenu.baseTranslations:#override\n\ : popdown() notify() unhighlight()\n ! accelerators for some Buttons: Xfm*button box*cancel.accelerators:#override\n\ WM_PROTOCOLS: set() notify() unset()\n\ Escape: set() notify() unset()\n Xfm*about*button box*ok.accelerators:#override\n\ WM_PROTOCOLS: set() notify() unset()\n\ Escape: set() notify() unset()\n Xfm*button box*ok.accelerators:#override\n\ Return: set() notify() unset()\n\ Linefeed: set() notify() unset()\n Xfm*button box*replace.accelerators:#override\n\ Return: set() notify() unset()\n\ Linefeed: set() notify() unset()\n Xfm*button box*install.accelerators:#override\n\ Return: set() notify() unset()\n\ Linefeed: set() notify() unset()\n Xfm*fmLog*Hide.accelerators:#override\n\ WM_PROTOCOLS: set() notify() unset()\n\ Return: set() notify() unset()\n\ Linefeed: set() notify() unset()\n Xfm*fmLog*Clear Log.accelerators:#override\n\ Delete: set() notify() unset()\n !***Info for the Log window:**** ! Some settings for the log window Xfm*fmLog.title: Xfm output log ! You can enable the horizontal scrollbar if you want: Xfm*fmLog*Text.scrollHorizontal: whenNeeded ! The initial value of the 'auto popup' toggle which ! determines if the Log window pops up automatically ! when new data is available. Xfm*fmLog*Auto Flag.state: True Xfm*fmLog.width:515 Xfm*fmLog.height:200 xfm-1.5.4/defaults/Apps.xfm0000644000175000017500000000076410422416445012473 00000000000000#XFM Xterm:::xterm.xpm:exec x-terminal-emulator: Emacs:::emacs.xpm:exec emacs:exec emacs "$@" nedit:::xlogo.xpm:exec nedit:exec nedit "$@" gvim:::vim-32.xpm:exec gvim:exec gvim "$@" Calculator:::calc.xpm:exec xcalc: Manual:::helpme.xpm:exec xman: Graphics:Graphics.xfm::pictures.xpm:LOAD: Printer:::printer.xpm:printop:exec lpr %Printer Options---Plp% -- "$@" Trash:~/.trash::recycle.xpm:OPEN:mv -f -b -V numbered -- "$@" "$HOME/.trash" Home:::home.xpm:OPEN: Mountable:XFM-DEVICES::devices.xpm:LOAD: xfm-1.5.4/defaults/Graphics.xfm0000644000175000017500000000026510422414423013316 00000000000000#XFM Xpdf:::xpdf.xpm:exec xpdf:exec xpdf -- "$@" Gv:::gv_icon.xpm:exec gv:exec gv "$@" Xfig:::xfig.xpm:exec xfig:exec xfig "$@" Xpaint:::XPaintIcon.xpm:exec xpaint:exec xpaint "$@" xfm-1.5.4/src/0000777000175000017500000000000010744136016010111 500000000000000xfm-1.5.4/src/Am.h0000644000175000017500000000515010420672344010534 00000000000000/*----------------------------------------------------------------------------- Am.h (c) Simon Marlow 1990-1993 (c) Albert Graef 1994 modified 2005, 2006 by Bernhard R. Link (see Changelog) -----------------------------------------------------------------------------*/ #ifndef AM_H #define AM_H #include "Fm.h" #include /*--FmAw---------------------------------------------------------------------*/ #define MAXAPPSTRINGLEN MAXPATHLEN typedef struct { char *name; char *directory; char *icon; char *push_action; char *drop_action; Pixmap icon_bm; Widget form, toggle, label; Boolean selected; } AppRec, *AppList; typedef struct { Widget shell, form, viewport, button_box, icon_box; AppList apps; Cardinal n_apps; Cardinal n_selections; char *app_file; Boolean readonly; } AppWindowRec; extern AppWindowRec aw; extern Widget app_popup_widget, *app_popup_items, app_popup_widget1, *app_popup_items1; extern int n_appst; extern char **appst; int parseApp(FILE *fp, Boolean loadicons); void createApplicationWindow(void); void createApplicationDisplay(void); void updateApplicationDisplay(void); void setApplicationWindowName(void); void readApplicationData(void); int writeApplicationData(void); void installApplication(const char *name, const char *directory, const char *icon, const char *push_action, const char *drop_action); void replaceApplication(AppRec *app, const char *name, const char *directory, const char *icon, const char *push_action, const char *drop_action); void freeApplicationResources(AppRec *app); void popApplicationsFile(void); void clearApplicationsStack(void); void AmReadUpdate(void); Boolean AmPushLoadFile(const char *filename, Boolean fromFW); /*--FmAwCb-------------------------------------------------------------------*/ CallbackProc appInstallAppCb, appInstallGroupCb, appEditCb, appCutCb, appCopyCb, appPasteCb, appRemoveCb, appSelectAllCb, appDeselectCb, appLoadCb, appMainCb, appBackCb, appOpenCb, appCloseCb, aboutCb; /*--FmAwActions--------------------------------------------------------------*/ int findAppWidget(Widget w); FmActionProc appPopup, appMaybeHighlight, runApp, appSelect, appToggle, appTrackCursor; void appBeginDrag(Widget w, XEvent *event, String *params, Cardinal *num_params); void appEndDrag(int i); void appEndDragInBox(void); /*--FmAwPopup----------------------------------------------------------------*/ void installNewAppPopup(void); void installExistingAppPopup(void); void installGroupPopup(void); void createInstallPopups(void); #endif xfm-1.5.4/src/Fm.h0000644000175000017500000003760110735452244010553 00000000000000/*----------------------------------------------------------------------------- Fm.h (c) Simon Marlow 1990-1993 (c) Albert Graef 1994 modified 1-29-95 by rodgers@lvs-emh.lvs.loral.com (Kevin M. Rodgers) to add filtering of icon/text directory displays by a filename filter. modified 7-1997 by strauman@sun6hft.ee.tu-berlin.de to add different enhancements (see README-NEW). modfied 2005,2006,2007 by Bernhard R. Link (see Changelog) -----------------------------------------------------------------------------*/ #ifndef FM_H #define FM_H #ifdef DEBUG_MALLOC #include #endif #ifdef _AIX #pragma alloca #else #include #endif #include #include /* just in case */ #include #include #include #include #include #include "magic.h" /* some systems define SVR4 but not SYSV */ #ifdef SVR4 #ifndef SYSV #define SYSV #endif #endif /* RBW - 2001/08/14 */ #ifdef _SVID_SOURCE #define SYSV #endif #ifdef SYSV #define getwd(s) getcwd(s,MAXPATHLEN) #endif /* ULTRIX apparently doesn't define these */ #ifdef ultrix #define S_ISLNK(mode) (mode & S_IFMT) == S_IFLNK #define S_ISSOCK(mode) (mode & S_IFMT) == S_IFSOCK #endif /* for compatibility with BSDI */ #define fnmatch xfnmatch #ifndef FILENAME_MAX #define FILENAME_MAX 1024 #endif /*--FmDirs-------------------------------------------------------------------*/ #define MAXCFGSTRINGLEN MAXPATHLEN /* structure representing configured devices */ typedef struct { char *name; char *mount_action; char *umount_action; char *type; int mounted; } DevRec, *DevList; /* structure containing the widget ids of an icon */ typedef struct { Widget form, toggle, label, arrow; } IconRec; /* structure into which the directory information is read */ typedef struct { char *name; const char *magic_type; IconRec icon; Boolean selected; struct stat stats; struct mime_filetype *mime_type; struct magic_modifiers info; /* only set after flInitialize is run: */ int width; /* these are only set after a call to FileListReducedFilenames, * i.e. only in the IconFileList */ char *reducedname; size_t reducedlen; } FileRec, **FileList; struct filetype_data { Pixmap icon_bm; unsigned int bm_width,bm_height; Boolean builtin; // TODO: subtypes... }; /* enumerated arguments passed to functions */ typedef enum { Files, Directories, All } FilterType; typedef enum { SortByName, SortBySize, SortByMTime } SortType; typedef enum { Tree, Icons, Text } DisplayType; struct ChmodPopupData; typedef struct _FileWindowRec { struct _FileWindowRec *next; DisplayType display_type; Boolean show_dirs, dirs_first, show_hidden; Boolean update; SortType sort_type; Widget shell, form, button_box, label, viewport, status, icon_box; char directory[MAXPATHLEN]; int dev; struct stat stats; FileList files; int n_files; int n_selections; long n_bytes, n_bytes_selected; int option_in_use; Widget *file_items, *folder_items, *view_items, *option_items; Widget unreadable; Boolean do_filter; /* KMR */ char dirFilter[MAXPATHLEN]; /* KMR */ Boolean showInode,showType,showLinks,showPermissions,showOwner,showGroup, showLength,showDate; Widget file_popup_widget, *file_popup_items; Widget dir_popup_widget, *dir_popup_items; struct PopupDialog *mkdir, *createFile, *goTo, *rename, *move, *copy, *link, *select, *filter; struct ChmodPopupData *chmode; struct ConfirmationDialog *confirmationDialog; struct InfoData *info; } FileWindowRec, *FileWindowList; #define P_READ 0x1 #define P_WRITE 0x2 #define P_EXECUTE 0x4 /* public functions */ Boolean readDirectory(FileWindowRec *fw); void filterDirectory(FileWindowRec *fw, FilterType type); void sortDirectory(FileList fl, int n, SortType type, Boolean dirs_first); int permission(struct stat *stats, int perms); void makePermissionsString(char *s, unsigned int perms); void freeFileList(FileWindowRec *fw); /*--FmFw---------------------------------------------------------------------*/ extern FileWindowList file_windows; extern unsigned int n_devices; extern DevList devs; int findDev(char *path); Boolean mountDev(int d); void umountDev(int d); void initFileWindows(void); void createFileDisplay(FileWindowRec *fw); void newFileWindow(String path, DisplayType format, Boolean by_cursor); #ifdef ENHANCE_SCROLL void updateFileDisplay(FileWindowRec *fw, Boolean keep_position); #else void updateFileDisplay(FileWindowRec *fw); #endif void reSortFileDisplay(FileWindowRec *fw); void reDisplayFileWindow(FileWindowRec *fw); void clearUpdateMarks(void); void markForUpdate(const char *path); void intUpdate(void); void updateStatus(FileWindowRec *fw); void updateTxtOpts(FileWindowRec *fw); struct PopupDialog; typedef void CallbackProc(Widget, void *, void *); typedef void PDCallbackProc(Widget, struct PopupDialog *, void *); typedef void FmCallbackProc(Widget, FileWindowRec *, void *); /*--FmFwCb-------------------------------------------------------------------*/ FmCallbackProc fileOpenCb, fileSelectAllCb, fileDeselectCb, fileTreeCb, fileIconsCb, fileTextCb, fileSortNameCb, fileSortSizeCb, fileSortMTimeCb, fileShowDirsCb, fileDirsFirstCb, fileCloseCb, mainArrowCb, fileHomeCb, fileUpCb, floatingMenuCb, fileShowHiddenCb, fileEditCb, fileViewCb, xtermCb, fileAboutCb, fileQuitCb; #ifdef ENHANCE_SELECTION FmCallbackProc selectionOwnCb; #endif FmCallbackProc showTxtOptsCb; #ifdef ENHANCE_MENU FmCallbackProc fileCloneCb; #endif void timeoutCb(XtPointer data, XtIntervalId *id); /*---FmFwActions-------------------------------------------------------------*/ typedef enum { SingleFile, MultipleFiles, Executable, Directory } FileType; typedef struct { Widget dragged_from; FileWindowRec *fw; FileType type; } MoveInfo; extern MoveInfo move_info; extern Boolean dragging; void drag_set_dropable(Display *d, bool dropable); typedef void FmActionProc(Widget w, XEvent *event, String *params, Cardinal *num_params); FmActionProc fileHighlight, fileMaybeHighlight, fileToggle, fileSelect, fileRefresh, fileOpenDir, fileBeginDrag, treeOpenDir, fileExecAction, resetCursor, trackCursor, filePopup, dirPopup; void doEdit(const char *directory, const char *fname); void doView(const char *directory, const char *fname); void doXterm(const char *directory); void fileCallWithSelected(const char *action); /*---FmBitmaps---------------------------------------------------------------*/ enum { /* Tree view bitmaps */ NOENTRY_BM=0, LLINE_BM, TLINE_BM, FLINE_BM, CLINE_BM, LARROW_BM, RARROW_BM, WAVY_BM, /* Misc */ TICK_BM, NOTICK_BM, EXCL_BM, #ifdef ENHANCE_PERMS /* showing the modes */ sUID_BM, SUID_BM, StICKY_BM, STICKY_BM, #endif /* File pixmaps */ FILES_BM, DIR_BM, FILE_BM, SYMLNK_BM, /* Hardcoded bitmaps stop here: */ BM_COUNT } bitmap_names; /* Cursors */ enum { FILE_CUR=0, FILES_CUR, NOENTRY_CUR, DIR_CUR, EXEC_CUR, WATCH_CUR, CURSOR_COUNT } cursor_names; /* Builtin default Types */ enum { DIR_T=0, UPDIR_T, FILE_T, SPECIAL_T, BLACKHOLE_T, TYPE_COUNT } builtin_type_names; /* file modifiers */ enum { LINK_SYMBOL=0, /* not yet implemented... */ GZIP_SYMBOL, BZIP_SYMBOL, FILE_MODIFIER_COUNT } file_modifier_names; extern Cursor curs[CURSOR_COUNT]; extern struct dimensionedpixmap { Pixmap pm; Dimension width, height; } file_modifiers[FILE_MODIFIER_COUNT]; extern Pixmap bm[BM_COUNT]; extern Pixmap bm_appmgr,bm_appmgrmsk,bm_icon,bm_iconmsk; void readBitmaps(void); Pixmap loadIcon(const char *name, Cardinal *pm_width, Cardinal *pm_height); Pixmap loadFileIcon(const char *name, Cardinal *pm_width, Cardinal *pm_height); /*--FmChmod------------------------------------------------------------------*/ FmCallbackProc chmodPopup; /*--FmConfirm----------------------------------------------------------------*/ int fwConfirm(FileWindowRec *fw, const char *s1, const char *s2, const char *s3, Boolean *aborted); int amConfirm(const char *s1, const char *s2, const char *s3, Boolean *aborted); /*--FmDelete-----------------------------------------------------------------*/ FmCallbackProc deleteItems, emptyDir; /*--FmErrors-----------------------------------------------------------------*/ #include "FmErrors.h" /*--FmExec-------------------------------------------------------------------*/ typedef struct { String pattern, command; } ExecMapRec; extern ExecMapRec *exec_map; extern int n_exec_maps; /*--FmInfo-------------------------------------------------------------------*/ FmCallbackProc infoPopup; /*--FmMain-------------------------------------------------------------------*/ /* Structure containing information about the user */ typedef struct { uid_t uid; gid_t gid; char home[MAXPATHLEN]; #ifdef ENHANCE_USERINFO char cwd[MAXPATHLEN]; #endif mode_t umask; } UserInfo; typedef struct { Boolean appmgr, filemgr, version; String init_geometry; XFontStruct *icon_font, *button_font, *menu_font, *label_font, *status_font, *bold_font, *cell_font; int app_icon_width, app_icon_height, file_icon_width, file_icon_height, tree_icon_width, tree_icon_height; String main_app_file, app_dir, app_clip, dev_file; String mailcap_file, mimetypes_file, magic_file; #ifdef SYSTEMWIDE_DEFAULTS String system_main_app_file, system_app_dir, system_dev_file; String system_mailcap_file, system_mimetypes_file, system_magic_file; #endif Boolean confirm_deletes, confirm_delete_folder, confirm_moves, confirm_copies, confirm_overwrite, confirm_quit; Boolean echo_actions, echo_mime_search; SortType default_sort_type; DisplayType default_display_type, initial_display_type; Boolean show_owner, show_perms, show_date, show_length; Boolean show_group, show_type, show_inode, show_links; int double_click_time, update_interval; #ifdef ENHANCE_PERMS int hard_update_ticks; #endif String bitmap_path, pixmap_path, icon_path; #ifdef ENHANCE_HISTORY int history_max_n; #endif #ifdef ENHANCE_TRANSLATIONS String app_defs_version; #endif #ifdef ENHANCE_CMAP int color_closeness; #endif #ifdef ENHANCE_SELECTION Pixel highlight_pixel; String selection_paths_separator; #endif String symlinkdir; Boolean alwaysSymlink; Cardinal maxMagicRead; const char **editor, **viewer, **xterminal, **xtermalone, **shell; } Resources; extern char *progname; extern Resources resources; extern XtAppContext app_context; extern UserInfo user; /* The following implements a semaphor for preventing the processing of update events in the refresh timer and the client message handler while a complex operation is in progress. This is a dreadful kludge, but we have to keep these events from modifying global data structures of the file manager while an operation is running. Update events which happen to get dispatched while the semaphor is set (for instance when an operation like file-copy is processing a popup form) will be simply ignored. -ag */ extern int freeze; void quit(int unused) __attribute__ ((noreturn)); /*---FmPopup-----------------------------------------------------------------*/ FmCallbackProc selectPopup, mkdirPopup, createFilePopup, goToPopup, renamePopup, movePopup, copyPopup, linkPopup, filterPopup; /*--FmUtils------------------------------------------------------------------*/ /* structures containing information required to set up a menu */ typedef struct { const char *item_name; const char *item_label; CallbackProc *callback; } MenuItemRec; /* variant for filewindow (must be assignment compatible) */ typedef struct { const char *item_name; const char *item_label; FmCallbackProc *callback; } FmMenuItemRec; /* structures containing information required to set up a button */ typedef struct { const char *button_name; const char *button_label; CallbackProc *callback; } ButtonRec; /* variant for QuestionPopups (must be assignment compatible!) */ typedef struct { const char *button_name; const char *button_label; PDCallbackProc *callback; } PDButtonRec; /* variant for filewindow (must be assignment compatible) */ typedef struct { const char *button_name; const char *button_label; FmCallbackProc *callback; } FmButtonRec; /* structure for creating a popup questionaire */ typedef struct { const char *label; Cardinal length; } QuestionRec; struct PopupDialog { Widget shell; Cardinal count; const QuestionRec *questions; void *data; struct PopupDialog **clear_ptr; struct PopupDialogField { char *answer; Widget widget; } fields[]; }; #if 1 #define getPopupAnswer(p,i) ({Cardinal _j=i; assert(_j<(p)->count); (p)->fields[_j].answer;}) #else #define getPopupAnswer(p,i) (p)->answers[i] #endif /* functions */ void initUtils(void); Widget *createMenu(const char *menu_name, const char *menu_label, const MenuItemRec *items, Cardinal n_items, Dimension left_margin, Widget parent, XtPointer client_data); static inline Widget *createFmMenu(const char *menu_name, const char *menu_label, const FmMenuItemRec *items, Cardinal n_items, Dimension left_margin, Widget parent, FileWindowRec *fw) { return createMenu(menu_name, menu_label, (const MenuItemRec *)items, n_items, left_margin, parent, fw); } Widget *createButtons(const ButtonRec *buttons, Cardinal n_buttons, Widget parent, XtPointer client_data); void createPopupQuestions(struct PopupDialog **out, Widget parent, const char *name, const char *title, Pixmap bitmap, const QuestionRec *questions, Cardinal n_questions, const PDButtonRec *buttons, Cardinal n_buttons, Cardinal dflt_button); void popdownPopup(struct PopupDialog *p); void reloadPopupData(struct PopupDialog *p); bool setPopupData(struct PopupDialog *p, Cardinal i, const char *value); void popupPopupByCursor(struct PopupDialog *p, void *data); void destroyPopup(struct PopupDialog *p); void fillIn(Widget w); void grayOut(Widget w); void tick(Widget w); void noTick(Widget w); void popupByCursor(Widget shell, XtGrabKind grab_kind); void zzz(void), wakeUp(void); Widget *createFloatingMenu(const char *menu_name, const MenuItemRec *items, Cardinal n_items, Dimension left_margin, Widget parent, XtPointer client_data, Widget *menu_widget); char *varPopup(Widget parent, Pixmap icon_bm, char *action); void aboutPopup(Widget parent); void setWMProps(Widget shell); /*--FmComms------------------------------------------------------------------*/ extern Atom xfm_open_window, xfm_update_window, wm_delete_window, wm_protocols, wm_save_yourself, kwm_save_yourself; void clientMessageHandler(Widget w, XtPointer closure, XEvent *e); void initComms(void); /*--FmOps--------------------------------------------------------------------*/ char *xstrdup(const char *str); char *dirConcat(const char *directory,const char *name); char *suffixConcat(const char *directory,const char *name); char *spaceConcat(const char *str1, const char *str2); char *split(char *s, char c); char *expand(char *s, char *t, char *c); void fprintexpand(FILE *f, const char *t, const char *c); char *strparse(char *s, const char *t, const char *c); int fnmatch(String pattern, String name); char *fnexpand(char *fn); char *dyn_fnexpand(const char *fn); char *expanddirectory(const char *dir); char *home_and_env_expand(const char *fn); int prefix(const char *s, const char *t); int exists(const char *path); char *searchPath(char *s1, char *p, const char *s2); char *searchPathWithSuffix(char *s1, char *p, const char *s2, const char *suffix); Boolean cmpCanonical(const char *dir1, const char *dir2); int create(const char *path, mode_t mode), rcopy(const char *oldpath, const char *newpath), rmove(const char *oldpath, const char *newpath), rdel(const char *path); /*--FmViewportScroll---------------------------------------------------------*/ void initViewportScroll(XtAppContext context); /*---------------------------------------------------------------------------*/ /* Horrible kludge to avoid warnings, as XtFree is designed to take a (char *)*/ #define XTFREE(p) XtFree((void *)(p)) #define XTREALLOC(p,n) XtRealloc((void *)(p),(n)) #endif xfm-1.5.4/src/FmStringDefs.h0000644000175000017500000001132110407323504012523 00000000000000#ifndef FmStringDefs_h #define FmStringDefs_h /* * Enhancements to the X-File Manager XFM-1.3.2 * -------------------------------------------- * Copyright (C) 1997 by Till Straumann * 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 of the License, 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* * String definitions for the FileList, IconFileList and TextFileList widgets. */ /* THIS FILE WAS AUTOMATICALLY GENERATED BY SCAN_STRINGS */ /************************* DO NOT EDIT *******************/ extern char FmResStrings[]; extern char FmClStrings[]; extern char FmTypeStrings[]; #ifndef XtNfiles #define XtNfiles ((char *)(&FmResStrings[0])) #endif #ifndef XtCFiles #define XtCFiles ((char *)(&FmClStrings[0])) #endif #ifndef XtNnFiles #define XtNnFiles ((char *)(&FmResStrings[6])) #endif #ifndef XtCNFiles #define XtCNFiles ((char *)(&FmClStrings[6])) #endif #ifndef XtNentrySep #define XtNentrySep ((char *)(&FmResStrings[13])) #endif #ifndef XtCEntrySep #define XtCEntrySep ((char *)(&FmClStrings[13])) #endif #ifndef XtNleftSep #define XtNleftSep ((char *)(&FmResStrings[22])) #endif #ifndef XtCLeftSep #define XtCLeftSep ((char *)(&FmClStrings[22])) #endif #ifndef XtNtopSep #define XtNtopSep ((char *)(&FmResStrings[30])) #endif #ifndef XtCTopSep #define XtCTopSep ((char *)(&FmClStrings[30])) #endif #ifndef XtNtabSep #define XtNtabSep ((char *)(&FmResStrings[37])) #endif #ifndef XtCTabSep #define XtCTabSep ((char *)(&FmClStrings[37])) #endif #ifndef XtNlabelSep #define XtNlabelSep ((char *)(&FmResStrings[44])) #endif #ifndef XtCLabelSep #define XtCLabelSep ((char *)(&FmClStrings[44])) #endif #ifndef XtNhighlightColor #define XtNhighlightColor ((char *)(&FmResStrings[53])) #endif #ifndef XtCHighlightColor #define XtCHighlightColor ((char *)(&FmClStrings[53])) #endif #ifndef XtNshowInode #define XtNshowInode ((char *)(&FmResStrings[68])) #endif #ifndef XtCShowInode #define XtCShowInode ((char *)(&FmClStrings[68])) #endif #ifndef XtNshowType #define XtNshowType ((char *)(&FmResStrings[78])) #endif #ifndef XtCShowType #define XtCShowType ((char *)(&FmClStrings[78])) #endif #ifndef XtNshowLinks #define XtNshowLinks ((char *)(&FmResStrings[87])) #endif #ifndef XtCShowLinks #define XtCShowLinks ((char *)(&FmClStrings[87])) #endif #ifndef XtNshowPermissions #define XtNshowPermissions ((char *)(&FmResStrings[97])) #endif #ifndef XtCShowPermissions #define XtCShowPermissions ((char *)(&FmClStrings[97])) #endif #ifndef XtNshowOwner #define XtNshowOwner ((char *)(&FmResStrings[113])) #endif #ifndef XtCShowOwner #define XtCShowOwner ((char *)(&FmClStrings[113])) #endif #ifndef XtNshowGroup #define XtNshowGroup ((char *)(&FmResStrings[123])) #endif #ifndef XtCShowGroup #define XtCShowGroup ((char *)(&FmClStrings[123])) #endif #ifndef XtNshowLength #define XtNshowLength ((char *)(&FmResStrings[133])) #endif #ifndef XtCShowLength #define XtCShowLength ((char *)(&FmClStrings[133])) #endif #ifndef XtNshowDate #define XtNshowDate ((char *)(&FmResStrings[144])) #endif #ifndef XtCShowDate #define XtCShowDate ((char *)(&FmClStrings[144])) #endif #ifndef XtNnHoriz #define XtNnHoriz ((char *)(&FmResStrings[153])) #endif #ifndef XtCNHoriz #define XtCNHoriz ((char *)(&FmClStrings[153])) #endif #ifndef XtNminIconWidth #define XtNminIconWidth ((char *)(&FmResStrings[160])) #endif #ifndef XtCMinIconWidth #define XtCMinIconWidth ((char *)(&FmClStrings[160])) #endif #ifndef XtNminIconHeight #define XtNminIconHeight ((char *)(&FmResStrings[173])) #endif #ifndef XtCMinIconHeight #define XtCMinIconHeight ((char *)(&FmClStrings[173])) #endif #ifndef XtNuserData #define XtNuserData ((char *)(&FmResStrings[187])) #endif #ifndef XtCUserData #define XtCUserData ((char *)(&FmClStrings[187])) #endif #ifndef XtNdragTimeout #define XtNdragTimeout ((char *)(&FmResStrings[196])) #endif #ifndef XtCDragTimeout #define XtCDragTimeout ((char *)(&FmClStrings[196])) #endif #ifndef XtNmaxLabelWidth #define XtNmaxLabelWidth ((char *)(&FmResStrings[208])) #endif #ifndef XtCMaxLabelWidth #define XtCMaxLabelWidth ((char *)(&FmClStrings[208])) #endif #ifndef XtRFileList #define XtRFileList ((char *)(&FmTypeStrings[0])) #endif #endif xfm-1.5.4/src/IconFileList.h0000644000175000017500000000350010320017072012506 00000000000000#ifndef _IconFileList_h #define _IconFileList_h /* * Enhancements to the X-File Manager XFM-1.3.2 (The IconFileList Widget) * ---------------------------------------------------------------------- * Copyright (C) 1997 by Till Straumann * 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 of the License, 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "FmStringDefs.h" /**************************************************************** * * IconFileList widget * ****************************************************************/ #include "FileList.h" /* Resources: Name Class RepType Default Value ---- ----- ------- ------------- entrySep EntrySep int 2 topSep TopSep int 2 leftSep LeftSep int 2 labelSep LabelSep int 2 nHoriz NHoriy Int 0 minIconWidth MinIconWidth Int 0 minIconHeight MinIconHeight Int 0 */ /* declare specific IconFileListWidget class and instance datatypes */ typedef struct _IconFileListClassRec* IconFileListWidgetClass; typedef struct _IconFileListRec* IconFileListWidget; /* declare the class constant */ extern WidgetClass iconFileListWidgetClass; #endif /* _IconFileList_h */ xfm-1.5.4/src/TextFieldP.h0000644000175000017500000000631210407323504012204 00000000000000#ifndef _TextFieldP_h #define _TextFieldP_h /* * The TextField Widget * -------------------- * Copyright (C) 1997 by Till Straumann * modified 2006 by Bernhard R. Link (see Changelog for details) * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Library Public License as published by * the Free Software Foundation; either version 2 of the License, 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 Library Public License for more details. * You should have received a copy of the GNU General Library Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "TextField.h" #ifdef TEXT_COMPAT #include /* need XtNRResizeMode */ #endif /* include superclass private header file */ #include /* define unique representation types not found in */ typedef struct { int empty; } TextFieldClassPart; typedef struct _TextFieldClassRec { CoreClassPart core_class; SimpleClassPart simple_class; ThreeDClassPart threeD_class; TextFieldClassPart textField_class; } TextFieldClassRec; extern TextFieldClassRec textFieldClassRec; #ifdef TEXT_COMPAT typedef XawTextResizeMode TfResizeMode; #else typedef union { Boolean b; enum { pas_a,pad_b,pad_c,pad_d } pad; } TfResizeMode; #endif typedef struct { /* resources */ XFontStruct* font; Pixel foreground; Pixel insensitive_foreground; Dimension internalHeight; Dimension internalWidth; TfTextPosition text_cursor; TfResizeMode resize; String string; Boolean use_string_in_place; XtJustify justify; Cardinal maxlen; Boolean readonly; short scroll_chars; XtCallbackList notify_cbl,modified_cbl; XrmValue value; String value_type; String input_format; String output_format; Boolean display_caret; Boolean modified_by_user; Boolean blink; Boolean auto_blink; int auto_blink_wait_time; /* note: time in ms for XtTimers is unsigned long. * There is no such rep. type however. */ int blink_on_time; int blink_off_time; Boolean leftLabel; /* paint the label at the left or right ? */ XFontStruct* lblFont; String label; int labelSep; Dimension labelWidth; XtJustify lblJustify; int showNChars; /* private state */ GC lbl,norm, norm_hil, insens, insens_hil; short visible_start,visible_end; unsigned long selections; String buffer; short hil_start,hil_end; short multiclick; Time multiclick_time; Boolean active_cursor; XtIntervalId blink_timer; Boolean blink_state_on; String backup; } TextFieldPart; typedef struct _TextFieldRec { CorePart core; SimplePart simple; ThreeDPart threeD; TextFieldPart textField; } TextFieldRec; #endif /* _TextFieldP_h */ xfm-1.5.4/src/FileList.h0000644000175000017500000000603410414443656011721 00000000000000#ifndef _FileList_h #define _FileList_h /* * Enhancements to the X-File Manager XFM-1.3.2 (The FileList Widget) * ------------------------------------------------------------------ * Copyright (C) 1997 by Till Straumann * 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 of the License, 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "FmStringDefs.h" /**************************************************************** * * FileList widget * ****************************************************************/ /* Resources: Name Class RepType Default Value ---- ----- ------- ------------- font Font FontStruct XtDefaultFont files Files FileList 0 nFiles NFiles Int -1 foreground Foreground Pixel XtDefaultForeground highlightColor HighlightColor Pixel XtDefaultForeground borderWidth BorderWidth Dimension 2 userData UserData Pointer NULL callback Callback Callback NULL dragTimeout DragTimeout Int 200 */ /* declare specific FileListWidget class and instance datatypes */ typedef struct _FileListClassRec* FileListWidgetClass; typedef struct _FileListRec* FileListWidget; /* declare the class constant */ extern WidgetClass fileListWidgetClass; /* Actions * * dispatchDirFile( , , * , * [optional args to specific action] ) * * dispatch the event to a file type dependent action procedure or * to if the event was triggered when the pointer * was not on a file item. * * grabMouseForPopup(..) * * registers a grab action and calls the first argument with the * rest of the arguments as argument. * * notify(arg) * * the callbacks on the callbacklist given by resource XtNcallback are * called with the 'callData' parameter set to point to the argument string * (or NULL when there was no argument). */ /* get the position where ev occurred */ void FileListEventPosition(XEvent *, int *x, int *y); /* find the entry where ev occurred */ int FileListFindEntry(FileListWidget, XEvent*); /* get the position of the upper left corner of an entry as * well as its width and height */ void FileListEntryPosition( FileListWidget flw, int entry, Position *x, Position *y, Dimension *width, Dimension *height); /* redraw one entry. */ void FileListRefreshItem(FileListWidget flw, int entry); #endif /* _FileList_h */ xfm-1.5.4/src/FmHistory.h0000644000175000017500000000377010657112102012122 00000000000000#ifndef FMHISTORY_H #define FMHISTORY_H /* * Enhancements to the X-File Manager XFM-1.3.2 (Path History) * ----------------------------------------------------------- * Copyright (C) 1997 by Till Straumann * * modified 2007 by Bernhard R. Link (see Changelog) * ----------------------------------------------------------- * 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 of the License, 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include /* Create a menu (Class SimpleMenu) with recently used paths * the last path in use appears first in the list. * * On top some fixed paths (eg. $HOME) can be displayed. These strings * are given as a NULL terminated list to FmCreateHistoryList(); * * the menu is named "fm_history", if no name is specified. This name * can be used in translation tables in order to popup the menu. * */ typedef struct HistoryList_s *HistoryList; HistoryList FmCreateHistoryList(const char* name, Widget parent, char *fixed_paths[]); /* insert path on top */ void FmInsertHistoryPath(HistoryList hl, const char *path); /* delete entry (no action if path not found in list) */ void FmDeleteHistoryPath(HistoryList hl, const char *path); /* chop the list to n entries */ void FmChopHistoryList(HistoryList hl, int n); /* destroy a list */ void FmDestroyHistoryList(HistoryList hl); #endif xfm-1.5.4/src/FmVersion.h0000644000175000017500000000027710407323504012110 00000000000000#ifndef FmVersion_h #define FmVersion_h #define XFMVERSION "1.5" /* changes of minor version and/or patchlevel * don't require a new app-defaults file */ #define XFMMINORVERSION "" #endif xfm-1.5.4/src/IconFileListP.h0000644000175000017500000000353410371444417012652 00000000000000#ifndef _IconFileListP_h #define _IconFileListP_h /* * Enhancements to the X-File Manager XFM-1.3.2 (The IconFileList Widget) * ---------------------------------------------------------------------- * Copyright (C) 1997 by Till Straumann * 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 of the License, 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "Fm.h" #include "IconFileList.h" /* include superclass private header file */ #include "FileListP.h" typedef struct { int empty; } IconFileListClassPart; typedef struct _IconFileListClassRec { CoreClassPart core_class; FileListClassPart fileList_class; IconFileListClassPart iconFileList_class; } IconFileListClassRec; extern IconFileListClassRec iconFileListClassRec; typedef struct { /* resources */ int entry_sep,left,top,labelsep; int user_n_horiz,min_icon_width,min_icon_height; int max_label_width; /* private state */ int entry_height; int entry_width; int liney; int hil_entry; int n_horiz; } IconFileListPart; typedef struct _IconFileListRec { CorePart core; FileListPart fileList; IconFileListPart iconFileList; } IconFileListRec; #endif /* _IconFileListP_h */ xfm-1.5.4/src/TextFileList.h0000644000175000017500000000403310320017072012544 00000000000000#ifndef _TextFileList_h #define _TextFileList_h /* * Enhancements to the X-File Manager XFM-1.3.2 (The TextFileList Widget) * ---------------------------------------------------------------------- * Copyright (C) 1997 by Till Straumann * 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 of the License, 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "FmStringDefs.h" /**************************************************************** * * TextFileList widget * ****************************************************************/ #include "FileList.h" /* Resources: Name Class RepType Default Value ---- ----- ------- ------------- entrySep EntrySep int 2 topSep TopSep int 2 leftSep LeftSep int 2 tabSep TabSep int 2 showInode ShowInode Boolean True showType ShowType Boolean True showPermission ShowPermission Boolean True showLinks ShowLinks Boolean True showUser ShowUser Boolean True showGroup ShowGroup Boolean True showSize ShowSize Boolean True showMTime ShowMTime Boolean True */ /* declare specific TextFileListWidget class and instance datatypes */ typedef struct _TextFileListClassRec* TextFileListWidgetClass; typedef struct _TextFileListRec* TextFileListWidget; /* declare the class constant */ extern WidgetClass textFileListWidgetClass; #endif /* _TextFileList_h */ xfm-1.5.4/src/FileListP.h0000644000175000017500000000430510656605307012041 00000000000000#ifndef _FileListP_h #define _FileListP_h /* * Enhancements to the X-File Manager XFM-1.3.2 (The FileList Widget) * ------------------------------------------------------------------ * Copyright (C) 1997 by Till Straumann * modified 2006,2007 by Bernhard R. Link (see Changelog) * 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 of the License, 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "Fm.h" #include "FileList.h" /* include superclass private header file */ #include typedef struct { int (*findEntry)(FileListWidget,int,int,XEvent*); void (*entryPosition)(FileListWidget, int, Position *,Position *, Dimension*,Dimension*); } FileListClassPart; typedef struct _FileListClassRec { CoreClassPart core_class; FileListClassPart fileList_class; } FileListClassRec; extern FileListClassRec fileListClassRec; typedef struct { /* resources */ XFontStruct *font; FileList files; int n_files; Pixel foreground,highlight_pixel; Dimension border_width; XtPointer user_data; XtCallbackList notify_cbl; int drag_timeout; /* private state */ Cardinal name_w; int pointer_entry; int enter_x,enter_y; GC gc_norm,gc_invert,gc_highlight; XtIntervalId timeout_id; Boolean timer_running; } FileListPart; typedef struct _FileListRec { CorePart core; FileListPart fileList; } FileListRec; /* reduce all names to have length at most max_width */ void FileListReduceFilenames(FileListWidget flw, int max_width); #endif /* _FileListP_h */ xfm-1.5.4/src/FmLog.h0000644000175000017500000000026307731273202011204 00000000000000#ifndef FmLog_h #define FmLog_h Widget FmCreateLog(Widget parent, XFontStruct *font); extern Widget fmLogPopupShell; void logPopup(Widget, FileWindowRec *, XtPointer); #endif xfm-1.5.4/src/FocusForm.h0000644000175000017500000001077310325467413012114 00000000000000/* THIS FILE WAS AUTOMATICALLY GENERATED BY SCAN_STRINGS */ /************************* DO NOT EDIT *******************/ #ifndef _FocusForm_h #define _FocusForm_h /* * The FocusForm Widget * -------------------- * Copyright (C) 1997 by Till Straumann * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Library Public License as published by * the Free Software Foundation; either version 2 of the License, 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 Library Public License for more details. * You should have received a copy of the GNU General Library Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* This is a subclass of the athena 'Form' widget */ /* Copyright (c) 1987, 1988, 1994 X Consortium Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. */ #include /*********************************************************************** * * FocusForm Widget (Subclass of Form) * * The FocusForm widget provides additional resources in order to control * focus traversal. * ***********************************************************************/ /* Parameters: Name Class RepType Default Value Description ---- ----- ------- ------------- ----------- focusInitChild FocusInitChild String NULL (qualified) name of a child to whom to give the focus after realizing the widget tree. The name is evaluated by XtName(top_level_widget,focusInitChild) */ /* Constraint parameters: Name Class RepType Default Value ---- ----- ------- ------------- focusInterest FocusInterest Boolean False Child is willing to accept the focus. sensitive Sensitive Boolean True Overrides the core resource. This is used to redirect the focus upon setting to insensitive. (handled transparently) */ /* * Actions and Translations * * The following actions are provided: * * FocusTraverse([f/b]) Give the focus to the next child of the FocusForm, which is willing * to accept it (sensitive && focusInterest && managed). If this action * is invoked by a non FocusForm widget, the closest FocusForm-ancestor * is retrieved and performs the action. (Optional parameter indicates * the direction: forward / backward) * * FocusSet( [qualified widget name] ) Set the focus to the widget invoking this action. If * the optional, qualified name resolves to a valid (sensitive etc.) * widget relative to the toplevel, focus is transferred there. * * The default translations for the FocusForm are * * ShiftTab: FocusTraverse(b)\n\ * Tab: FocusTraverse()\n\ * : FocusSet()\n\ * : FocusSet() * */ /* THIS FILE WAS AUTOMATICALLY GENERATED BY SCAN_STRINGS */ /************************* DO NOT EDIT *******************/ #ifdef __STDC__ extern const char FocusFormResStrings[]; extern const char FocusFormClStrings[]; extern const char FocusFormTypeStrings[]; #else extern char FocusFormResStrings[]; extern char FocusFormClStrings[]; extern char FocusFormTypeStrings[]; #endif #ifndef XtNfocusInterest #define XtNfocusInterest ((char *)(&FocusFormResStrings[0])) #endif #ifndef XtCFocusInterest #define XtCFocusInterest ((char *)(&FocusFormClStrings[0])) #endif #ifndef XtNfocusInitChild #define XtNfocusInitChild ((char *)(&FocusFormResStrings[14])) #endif #ifndef XtCFocusInitChild #define XtCFocusInitChild ((char *)(&FocusFormClStrings[14])) #endif typedef struct _FocusFormClassRec *FocusFormWidgetClass; typedef struct _FocusFormRec *FocusFormWidget; extern WidgetClass focusFormWidgetClass; #endif /* _FocusForm_h */ xfm-1.5.4/src/magic.h0000644000175000017500000000105610407323504011254 00000000000000#ifndef MAGIC_H #define MAGIC_H struct magic_modifiers { bool symlink:1; bool gzipped:1; bool bzipped:1; }; struct mime_filetype; typedef struct mime_filetype *typeinitfunc(const char *); void magic_get_type(const char *name, const char **messagep, struct mime_filetype **mimep, struct magic_modifiers *modifiers,struct stat *s); void magic_parse_file(char *name, typeinitfunc *initfunc, size_t maxlen); void magic_parse_init(typeinitfunc *initfunc); void magic_parse_singlefile(char *name, typeinitfunc *initfunc, size_t maxlen); #endif /* MAGIC_H */ xfm-1.5.4/src/TextFileListP.h0000644000175000017500000000362310320017072012670 00000000000000#ifndef _TextFileListP_h #define _TextFileListP_h /* * Enhancements to the X-File Manager XFM-1.3.2 (The TextFileList Widget) * ---------------------------------------------------------------------- * Copyright (C) 1997 by Till Straumann * 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 of the License, 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "Fm.h" #include "TextFileList.h" /* include superclass private header file */ #include "FileListP.h" typedef struct { int empty; } TextFileListClassPart; typedef struct _TextFileListClassRec { CoreClassPart core_class; FileListClassPart fileList_class; TextFileListClassPart textFileList_class; } TextFileListClassRec; extern TextFileListClassRec textFileListClassRec; typedef struct { /* resources */ int entry_sep,left,top,tabsep; Boolean ino_s,dev_s,nlink_s,umode_s,uid_s,gid_s,size_s,time_s; /* private state */ int entry_height; int hil_entry; int ino_w,dev_w,nlink_w,umode_w,uid_w,gid_w,size_w,time_w; int perm_w[9]; #ifdef VIEWPORT_HACK int hack; #endif } TextFileListPart; typedef struct _TextFileListRec { CorePart core; FileListPart fileList; TextFileListPart textFileList; } TextFileListRec; #endif /* _TextFileListP_h */ xfm-1.5.4/src/FmComms.h0000644000175000017500000000107607731273201011543 00000000000000/*----------------------------------------------------------------------------- FmComms.h (c) Simon Marlow 1992 (c) Albert Graef 1994 atom definitions for client messages -----------------------------------------------------------------------------*/ #ifndef FMCOMMS_H #define FMCOMMS_H #define XFM_OPEN_WINDOW "XFM_OPEN_WINDOW" #define XFM_UPDATE_WINDOW "XFM_UPDATE_WINDOW" #define WM_DELETE_WINDOW "WM_DELETE_WINDOW" #define WM_PROTOCOLS "WM_PROTOCOLS" #define WM_SAVE_YOURSELF "WM_SAVE_YOURSELF" #define KWM_SAVE_YOURSELF "KWM_SAVE_YOURSELF" #endif xfm-1.5.4/src/FmSelection.h0000644000175000017500000000034710407323504012406 00000000000000#ifndef FmSelection_h #define FmSelection_h Boolean FmOwnSelection(FileWindowRec *fw, Time t); void FmDisownSelection(FileWindowRec *fw); void FmSelectionInit(Display *di); Boolean FmIsSelectionOwner(FileWindowRec *fw); #endif xfm-1.5.4/src/FocusFormP.h0000644000175000017500000000524510325467413012232 00000000000000#ifndef _FocusFormP_h #define _FocusFormP_h /* * The FocusForm Widget * -------------------- * Copyright (C) 1997 by Till Straumann * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Library Public License as published by * the Free Software Foundation; either version 2 of the License, 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 Library Public License for more details. * You should have received a copy of the GNU General Library Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* This is a subclass of the athena 'Form' widget */ /* Copyright (c) 1987, 1988, 1994 X Consortium Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. */ #include "FocusForm.h" #include typedef struct _FocusFormClassRec { CoreClassPart core_class; CompositeClassPart composite_class; ConstraintClassPart constraint_class; FormClassPart form_class; } FocusFormClassRec; extern FocusFormClassRec focusFormClassRec; typedef struct _FocusFormPart { /* which child you want to give the focus first * (can only be evaluated _after_ children have * been created) */ String focus_init_child; /* private */ Widget focus_child; /* This _has_ the focus */ Boolean initialized; } FocusFormPart; typedef struct _FocusFormRec { CorePart core; CompositePart composite; ConstraintPart constraint; FormPart form; FocusFormPart focusForm; } FocusFormRec; typedef struct _FocusFormConstraintsPart { Boolean focus_interest; Boolean sensitive; /* try to override core resource */ } FocusFormConstraintsPart; typedef struct _FocusFormConstraintsRec { FormConstraintsPart form; FocusFormConstraintsPart focusForm; } FocusFormConstraintsRec, *FocusFormConstraints; #endif /* _XawFormP_h */ xfm-1.5.4/src/TextField.h0000644000175000017500000005554610362516040012100 00000000000000/* THIS FILE WAS AUTOMATICALLY GENERATED BY SCAN_STRINGS */ /************************* DO NOT EDIT *******************/ #ifndef _TextField_h #define _TextField_h /* * The TextField Widget * -------------------- * Copyright (C) 1997 by Till Straumann * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Library Public License as published by * the Free Software Foundation; either version 2 of the License, 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 Library Public License for more details. * You should have received a copy of the GNU General Library Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /**************************************************************** * * TextField widget * ****************************************************************/ #include #ifdef TEXT_COMPAT /* compatibility with the Xaw text widget */ #include /* we need XawTextPosition and XawTextResizeMode */ #endif /* Resources: Name Class RepType Default Value Comment ---- ----- ------- ------------- ------- font Font Font XtDefaultFont foreground Foreground Pixel XtDefaultForeground insensitiveForeground InsensitiveForeground Pixel XtDefaultForeground fg when there can't be typed into the widget. internalHeight Height Dimension 2 Space around the widget. internalWidth Width Dimension 2 There's additional space reserved for the scroll marks. insertPosition TextPosition TfTextPosition 0 Pos. of the text cursor. TfTextPosition type maps to XawTextPosition in TEXT_COMPAT mode. displayCaret Output Boolean True Whether to display the text cursor. **** if in TEXT_COMPAT resize Resize ResizeMode XawtextResizeNever Whether widget tries to resize itself. Note that the resizing behavior depends on the `showNChars' resource also. **** else resize Resize Boolean False Whether widget tries to resize itself. Note that the resizing behavior depends on the `showNChars' resource also. **** else **** endif string Label String "" The editable string. showNChars ShowNChars Int 0 If > 0, at initialize time, the widget calculates its size order to show `showNChars' characters using the current font (this is approximate, if using a proportional font). This resource also affects the resizing policy if the `resize' resource is set True: - If (`resize' && showNChars > 0) the widget tries to resize itself to the size of showNChars*charsize_of_font (+ label width, internal width etc.). - If (`resize' && showNChars == 0 ) the editable area is resized to the length of the string it holds. useStringInPlace UseStringInPlace Boolean False Don't use internal buffer but use the address passed in the 'string' resource. If in `useStringInPlace' mode, of course, the widget has no means to `know' whether the app changed the string buffer contents. It is up to the application to notify the widget that it modified the string by setting the `string' resource, passing the buffer address (altough it's already known by the widget), i.e: XtVaSetValues(textField, XtNuseStringInPlace,True, XtNstring,buffer,0); // buffer contents are changed strcpy(buffer, "blah blah blah"); // let the widget know that string changed XtVaSetValues(textField, XtNstring,buffer,0); length Length Short 0 Length of buffer. Must be set accordingly if useStringInPlace is True. The internal buffer defaults to 15 chars if this resource is set to 0. justify Justify Justify XtJustifyLeft readOnly ReadOnly Boolean False Only look at the string; selection and scrolling is still possible. scrollChars ScrollChars Short 4 Start scrolling if the text cursor gets closer than 'scrollChars' to either end of the visible area. callback Callback Callback NULL Called by the 'notify()' action. modifiedByUser ModifiedByUser Boolean False This resource is set 'True' by widget code whenever the user modifies the string. It is up to the application to reset this resource to 'False' e.g. after acknowledgeing the changes made by the user. The app may later check this resource again for new changes. The actions cited under 'modifiedCallback' check this resource before changing the string. If it is 'False', the widget saves the old string (see 'Backup()' and 'Restore()' actions) and sets the resource 'True'. Read about the 'autoBlink' resource and the 'Commit()' action for further information. modifiedCallback Callback Callback NULL called upon any user modification of the string ie. successful - InsertChar() - Delete() - DeleteToClipboard() - InsertSelection() actions. The callbacks are also invoked as a result of the string having been changed by the application or restored by the 'Restored' action. The callback reason is supplied in the 'callData' argument. This argument must be casted to 'TfwModificationType'. blink Blink Boolean False While this resource is set 'True' the string is flashed. The timings are set by the next two resources. blinkOnTime BlinkTime Int 700 'On' time (ms) of the blinker. blinkOffTime BlinkTime Int 700 'Off' time (ms) of the blinker. autoBlink AutoBlink Boolean False The autoBlink feature is intended to be used together with the Commit() action. It provides a means to give the user visual feedback that she has modified the string. As soon as the string is changed by any of the actions cited above (see modifiedCallback), the string starts blinking (blink is set True) and stops only after 'Commit()'ing. autoBlinkWaitTime BlinkTime Int 2000 First 'on' time period after auto blinking starts. leftLabel LeftLabel Boolean True Paint the (optional) label to the left (or right, if `False') of the text entry area. label Label String NULL Label for the text entry area. No space is reserved for the label area if this resource is set to NULL. An empty ("") label may be supplied if the label space is to be reserved / drawn. labelFont LabelFont Font XtDefaultFont Label font. labelSep LabelSep Int 2 Space between the label and the text entry area. NOTE: this resource is an _Int_, so negative values may be used (small negative values may be useful to bring the label closer to the entry area). labelWidth LabelWidth Dimension 0 Width reserved for the label. If the current width is smaller than labelWidth, the widget sets this to the width of the label string. Therefore, if you want to change the label and you want it to reserve enough space, set this resource to 0 when changing the label. labelJustify LabelJustify Justify XtJustifyRight Justification of the label. valueAddress Value Pointer NULL valueSize Value Int 0 valueType Value String XtRCFormat inputFormat ValueFormat String NULL outputFormat ValueFormat String NULL The last five resources provide a mechanism to connect a textField widget to a variable of arbitrary type, that can automatically be updated. The public procedures TextFieldString2Value() and TextFieldValue2String() invoke an Xt-type converter that converts the text string to 'valueType' at 'valueAddress' or vice versa. The `valueType' resource provides a simple way to use _any_ Xt type converter, i.e. a TextField may be used to allocate a Pixel value ("color"), the user typing the color name to the text field (note that proper translations must be set up for the `Commit' or `Notify' actions to be invoked in order for making this example work): widget textField; // create the widget textField=XtVaCreateManatedWidget("textField", textFieldWidgetClass, parent, XtNvalueType, XtRPixel, XtNvalueSize, sizeof(Pixel), 0); XtAddCallback(textField,XtNcallback,getPixelCB,NULL); ...... static void getPixelCB(Widget w, XtPointer closure, XtPointer call_data) { Pixel someColor; // set address XtVaSetValues(w, XtNvalueAddress, (XtPointer)&someColor, 0); // convert and get the color if (TextFieldString2Value(w)) { // success do_something_with(someColor); } else { // failure notify_user_that_color_alloc_failed(); } } The `valueAddress/Size/Type' resources can save many lines of tedious code if you can use an existing converter. There exists the special representation type 'CFormat' that can be converted using the C-format strings a la sprintf()/sscanf(). If the variable is of type 'CFormat', the formatting strings to be used by the converter can be set via the 'inputFormat' and 'outputFormat' resources. As an example let's assume, there's an integer variable, which should be connected to the widget. The integer value should be displayed in hex-representation, but user input should be allowed in the usual 'val' (decimal), 0'val' (octal), 0x'val'(hex) style. In this case, the resources are set as shown: valueAddress &val valueSize sizeof(int) valueType CFormat inputFormat %i outputFormat %x The value can now be read invoking TextFieldString2Value(wid) and written back by TextFieldValue2String(). These convenience procedures return 'True' if the conversion was successful. This conversion can be done in a callback procedure thus providing automatic updating of application variables. */ /* Default translations: : CursorState(Active)\n\ : CursorState(Inactive)\n\ None : MoveCursor()\ HighlightStart()\n\ : MoveCursor()\ HighlightExtend()\ MakeSelection(PRIMARY)\n\ : MoveCursor()\ HighlightExtend()\ MakeSelection(PRIMARY)\n\ : MoveCursor()\ InsertSelection(PRIMARY)\n\ Shift Right: MoveCursor()\ HighlightExtend()\ MakeSelection(PRIMARY)\n\ Shift Home : MoveCursor(Home)\ HighlightExtend()\ MakeSelection(PRIMARY)\n\ Shift End : MoveCursor(End)\ HighlightExtend()\ MakeSelection(PRIMARY)\n\ Shift Left : MoveCursor(-1)\ HighlightExtend()\ MakeSelection(PRIMARY)\n\ Shift Delete: Delete(Selection,End) \n\ Shift BackSpace: Delete(Selection,Home) \n\ Alt Delete: Delete(Selection,All) \n\ Alt BackSpace: Delete(Selection,All) \n\ Right: MoveCursor() \ HighlightStart()\n\ Home : MoveCursor(Home)\ HighlightStart()\n\ End : MoveCursor(End) \ HighlightStart()\n\ Left : MoveCursor(-1) \ HighlightStart()\n\ Delete: Delete(Selection,1) \n\ BackSpace: Delete(Selection,-1) \n\ SunCopy: MakeSelection(CLIPBOARD)\n\ SunPaste: InsertSelection(CLIPBOARD)\n\ SunCut: DeleteToClipboard()\n\ Escape: Restore()\n\ : InsertChar()\ */ /* Actions: The TextFieldWidget processes the following actions: (Note that only the first character of any argument is used, although more can be given for sake of easier reading) Action Name Arguments Comment MoveCursor([Home|End|]) Move the text cursor If the action occured due to a Button or Motion event, then the cursor is moved to the pointer position. If the Button was pressed on one of the scroll marks, the cursor is moved one character. If any other event invoked the action the argument is parsed, and the cursor positioned to the left (Home), the right (End), or chars relative to the actual position ( may be negative). No argument defaults to MoveCursor(1). InsertChar([[ ',' ( 'True' | 'False')]]) Insert one character at the cursor position (KeyPress Event only). If any argument is present is inserted instead (any event). The second argument indicates if the string should be parsed for \ escaped sequences (\n, \023 etc); defaults to 'True'. Delete([Home|End|All||Selection[,Home|End|All|]]) Delete from cursor pos. to left (H), to right (E) or relative (). (A) deletes all, (S) the high- lighted area. In this case, an optional second argument indicates what to delete if nothing is highlighted. No argument defaults to Delete(1) HighlightStart() Mark the beginning of the highlighted area. This is to be the pointer position (Button Event) or the cursor position (any other event). Note: No selection ownership is asserted yet. ---- HighlightExtend() Extend the highlighted area i.e. move the beginning or the end of this area, whichever is closer to the pointer position (Button Event) or the text cursor (any other event). If no highlighted area exists the beginning is marked. Since Xt translations don't allow multiclicks and motion events to coexist, a multiclick feature is implemented in this action. A double click highlights the word (delimited by spaces) at the pointer position, a triple click selects the whole string. Note: No selection ownership is asserted yet. ---- Highlight(Word|All|End|Home) Set the highlighted area to the whole string (A), to the space delimited word at the event position (W), or from the event position to the left (H) / right (E). The event position is the pointer position (Button or Motion event) or the text cursor position (any other event). Note: No selection ownership is asserted yet. ---- MakeSelection([Primary|Secondary|Clipboard]) Assert the ownership of the specified X-Selection. The selection can then be requested by other clients. No parameter defaults to MakeSelection(P). DeleteToClipboard() Assert the ownership of the CLIPBOARD selection. Then wait for another client (eg. 'xclipboard') to copy the selected part of the string. If this is done successfully the selected part is deleted. InsertSelection([Primary|Secondary|Clipboard]) Request the specified selection value from another client, and insert it at the cursor position. No argument defaults to InsertSelection(P) Notify([]) Call the callbacks on the 'callback' resource's callback list. A pointer to the is passed as the 'call_data' argument to the callback procs. Commit() Like Notify(), but the widget automatically switches off the autoBlinker (if active) and sets 'modifiedByUser' to 'False' after executing the callback list. Note: no default translation maps to this action. As a result of executing this action, the backup string is discarded. Backup() Save the string to a backup copy. This is automatically done by the actions cited under 'modifiedCallback' above, if 'modifiedByUser' is 'False'. The backup may be restored by 'Restore()'. Note: the backup is discarded by setting 'modifiedByUser' to 'False', or by the application changing the string. Restore() Restore the string to the value it had when 'modifiedByUser' last was 'False'. CursorState(Active|Inactive|Toggle) Set the state of the cursor to active (A), inactive (I) or toggle it (T). This affects only how the cursor is drawn and can be used when implementing focus traversal. */ /* THIS FILE WAS AUTOMATICALLY GENERATED BY SCAN_STRINGS */ /************************* DO NOT EDIT *******************/ #ifdef __STDC__ extern const char TextFieldResStrings[]; extern const char TextFieldClStrings[]; extern const char TextFieldTypeStrings[]; #else extern char TextFieldResStrings[]; extern char TextFieldClStrings[]; extern char TextFieldTypeStrings[]; #endif #ifndef XtNinsertPosition #define XtNinsertPosition ((char *)(&TextFieldResStrings[0])) #endif #ifndef XtNlength #define XtNlength ((char *)(&TextFieldResStrings[15])) #endif #ifndef XtNinsensitiveForeground #define XtNinsensitiveForeground ((char *)(&TextFieldResStrings[22])) #endif #ifndef XtNreadOnly #define XtNreadOnly ((char *)(&TextFieldResStrings[44])) #endif #ifndef XtNscrollChars #define XtNscrollChars ((char *)(&TextFieldResStrings[53])) #endif #ifndef XtNmodifiedCallback #define XtNmodifiedCallback ((char *)(&TextFieldResStrings[65])) #endif #ifndef XtNvalueAddress #define XtNvalueAddress ((char *)(&TextFieldResStrings[82])) #endif #ifndef XtNvalueSize #define XtNvalueSize ((char *)(&TextFieldResStrings[95])) #endif #ifndef XtNvalueType #define XtNvalueType ((char *)(&TextFieldResStrings[105])) #endif #ifndef XtNinputFormat #define XtNinputFormat ((char *)(&TextFieldResStrings[115])) #endif #ifndef XtNoutputFormat #define XtNoutputFormat ((char *)(&TextFieldResStrings[127])) #endif #ifndef XtNuseStringInPlace #define XtNuseStringInPlace ((char *)(&TextFieldResStrings[140])) #endif #ifndef XtNdisplayCaret #define XtNdisplayCaret ((char *)(&TextFieldResStrings[157])) #endif #ifndef XtNmodifiedByUser #define XtNmodifiedByUser ((char *)(&TextFieldResStrings[170])) #endif #ifndef XtNblink #define XtNblink ((char *)(&TextFieldResStrings[185])) #endif #ifndef XtNautoBlink #define XtNautoBlink ((char *)(&TextFieldResStrings[191])) #endif #ifndef XtNautoBlinkWaitTime #define XtNautoBlinkWaitTime ((char *)(&TextFieldResStrings[201])) #endif #ifndef XtNblinkOnTime #define XtNblinkOnTime ((char *)(&TextFieldResStrings[219])) #endif #ifndef XtNblinkOffTime #define XtNblinkOffTime ((char *)(&TextFieldResStrings[231])) #endif #ifndef XtNleftLabel #define XtNleftLabel ((char *)(&TextFieldResStrings[244])) #endif #ifndef XtNlabelFont #define XtNlabelFont ((char *)(&TextFieldResStrings[254])) #endif #ifndef XtNlabel #define XtNlabel ((char *)(&TextFieldResStrings[264])) #endif #ifndef XtNlabelWidth #define XtNlabelWidth ((char *)(&TextFieldResStrings[270])) #endif #ifndef XtNlabelJustify #define XtNlabelJustify ((char *)(&TextFieldResStrings[281])) #endif #ifndef XtNlabelSep #define XtNlabelSep ((char *)(&TextFieldResStrings[294])) #endif #ifndef XtNshowNChars #define XtNshowNChars ((char *)(&TextFieldResStrings[303])) #endif #ifndef XtNuserData #define XtNuserData ((char *)(&TextFieldResStrings[314])) #endif #ifndef XtCTextPosition #define XtCTextPosition ((char *)(&TextFieldClStrings[0])) #endif #ifndef XtCLength #define XtCLength ((char *)(&TextFieldClStrings[13])) #endif #ifndef XtCInsensitiveForeground #define XtCInsensitiveForeground ((char *)(&TextFieldClStrings[20])) #endif #ifndef XtCReadOnly #define XtCReadOnly ((char *)(&TextFieldClStrings[42])) #endif #ifndef XtCScrollChars #define XtCScrollChars ((char *)(&TextFieldClStrings[51])) #endif #ifndef XtCValueFormat #define XtCValueFormat ((char *)(&TextFieldClStrings[63])) #endif #ifndef XtCUseStringInPlace #define XtCUseStringInPlace ((char *)(&TextFieldClStrings[75])) #endif #ifndef XtCOutput #define XtCOutput ((char *)(&TextFieldClStrings[92])) #endif #ifndef XtCModifiedByUser #define XtCModifiedByUser ((char *)(&TextFieldClStrings[99])) #endif #ifndef XtCBlink #define XtCBlink ((char *)(&TextFieldClStrings[114])) #endif #ifndef XtCAutoBlink #define XtCAutoBlink ((char *)(&TextFieldClStrings[120])) #endif #ifndef XtCBlinkTime #define XtCBlinkTime ((char *)(&TextFieldClStrings[130])) #endif #ifndef XtCLeftLabel #define XtCLeftLabel ((char *)(&TextFieldClStrings[140])) #endif #ifndef XtCLabelWidth #define XtCLabelWidth ((char *)(&TextFieldClStrings[150])) #endif #ifndef XtCLabelSep #define XtCLabelSep ((char *)(&TextFieldClStrings[161])) #endif #ifndef XtCLabelJustify #define XtCLabelJustify ((char *)(&TextFieldClStrings[170])) #endif #ifndef XtCShowNChars #define XtCShowNChars ((char *)(&TextFieldClStrings[183])) #endif #ifndef XtCUserData #define XtCUserData ((char *)(&TextFieldClStrings[194])) #endif #ifndef XtRCFormat #define XtRCFormat ((char *)(&TextFieldTypeStrings[0])) #endif /* declare specific TextFieldWidget class and instance datatypes */ typedef struct _TextFieldClassRec* TextFieldWidgetClass; typedef struct _TextFieldRec* TextFieldWidget; /* declare a type for 'insertPosition'; this allows us to * be independent from Xaw/Text.h as well as to include it. */ #ifdef TEXT_COMPAT typedef XawTextPosition TfTextPosition; #else typedef long TfTextPosition; #endif /* reason for the 'modifiedCallback'; an argument of this type is supplied * when the 'modifiedCallback' list is executed. */ typedef enum { tfwNone = -1, /* internal use */ tfwCommitted, /* the commit action was invoked or the app set * modifiedByUser 'False' without changing the string */ tfwStringChanged, /* XtNstring resource was changed and string differs */ tfwStringRestored, /* string was restored */ tfwModified /* modified by the user */ } TfwModificationType; /* declare the class constant */ extern WidgetClass textFieldWidgetClass; /* public procedures */ #ifdef __cplusplus extern "C" { #endif /* convert the text string to the type indicated * by the valueType resource (valueSize must be set correctly) * and store the converted value at address valueAddress * * RETURNS: `True' upon successful conversion. */ Boolean TextFieldString2Value(Widget textFieldWidget); Boolean TextFieldValue2String(Widget textFieldWidget); #ifdef __cplusplus } #endif #endif /* _TextField_h */ xfm-1.5.4/src/XtHelper.h0000644000175000017500000000225010320017072011716 00000000000000#ifndef _XtHelper_h #define _XtHelper_h /* * Enhancements to the X-File Manager XFM-1.3.2 (Xt Helper functions) * ------------------------------------------------------------------ * Copyright (C) 1997 by Till Straumann * 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 of the License, 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* Xt Helper Functions */ #include /* Xt doesn't export a function/macro to find out whether a * widget is being destroyed :-( */ Boolean XtIsBeingDestroyed(Widget w); #endif xfm-1.5.4/src/mime.h0000644000175000017500000000233710421213451011121 00000000000000#ifndef XFM_MIME_H #define XFM_MIME_H struct mime_filetype; struct mime_action { struct mime_action *next; char *view,*compose,*edit,*print,*drop; char *test; char *nameprefix; const char *namesuffix; char *notes,*description,*x11bitmap; int priority; bool testOK,editOK,viewOK; bool needsterminal,copiosoutput; /* for verbose output */ struct mime_filetype *type; }; struct mime_filetype { const char *subtypename; char *fulltypename; struct mime_filetype *fallback; struct mime_action *actions; struct filetype_data *data; /* from mime.types? */ bool official; bool iconfailed; }; /* create filetype if not found, returns NULL if OutOfMemory */ struct mime_filetype *mime_get_filetype(const char *identifier); int mime_init(void); typedef void initfunc(struct mime_filetype *); int mime_parse_types(const char *filename, initfunc); int mime_parse_mailcap(const char *filename); typedef bool mime_action_func(const struct mime_action *,const char *,const char *,const char *); enum mime_start_type { MIME_START_ANY, MIME_START_EDIT, MIME_START_VIEW }; bool mime_best_action(struct mime_filetype *mime_type,const char *directory,const char *filename,enum mime_start_type how, mime_action_func *start, bool echo); #endif xfm-1.5.4/src/suffix.h0000644000175000017500000000027410355311561011503 00000000000000 /* returns NULL if nothing found */ const char *suffix_search(const char *name,struct mime_filetype **typep); bool suffix_add(const char *suffix,size_t len, struct mime_filetype *type); xfm-1.5.4/src/mime_start.h0000644000175000017500000000044110421213451012330 00000000000000#ifndef XFM_MIME_START_H #define XFM_MIME_START_H #include "mime.h" bool mime_start_init(const char *symlinkdir); void mime_start_done(const char *symlinkdir); bool mime_start(struct mime_filetype *mime_type,const char *directory,const char *filename,enum mime_start_type how ); #endif xfm-1.5.4/src/execute.h0000644000175000017500000000077310421470706011646 00000000000000 typedef void external_done_proc(int status, void *priv_data); bool execute_init(XtAppContext app); bool execute_and_wait(const char *program,const char *directory, const char **argv); void execute_external_program(const char *program,const char *directory, const char **argv, external_done_proc *done, void *priv_data); const char **makeShellArgs(const char *command, const char **arguments); const char **appendArgs(const char **old, int number, ...); extern int child_stdout; extern int child_stderr; xfm-1.5.4/src/global.h0000644000175000017500000000027010421673302011431 00000000000000#ifndef XFM_GLOBALS_H #define XFM_GLOBALS_H #define UNUSED(decl) decl __attribute((unused)) #define XFM_CONFDIR SYSCONFDIR "/X11/xfm" #define XFM_APPDIR SYSCONFDIR "/X11/xfm" #endif xfm-1.5.4/src/FmErrors.h0000644000175000017500000000051510657105530011736 00000000000000#ifndef FMERRORS_H #define FMERRORS_H void createErrorPopup(void); void error(const char *label1, const char *label2); void sysError(const char *label); void sysErrorFmt(const char *format, ...); void abortXfm(const char *message) __attribute__ ((noreturn)); void XtAppWarningFmt(XtAppContext app, const char *format, ...); #endif xfm-1.5.4/src/Fm_class_c0000644000175000017500000000074010371444417012005 00000000000000#ifndef Fm_class_c #define Fm_class_c /* THIS FILE WAS AUTOMATICALLY GENERATED BY SCAN_STRINGS */ /************************* DO NOT EDIT *******************/ char FmClStrings[]={"\ Files\0\ NFiles\0\ EntrySep\0\ LeftSep\0\ TopSep\0\ TabSep\0\ LabelSep\0\ HighlightColor\0\ ShowInode\0\ ShowType\0\ ShowLinks\0\ ShowPermissions\0\ ShowOwner\0\ ShowGroup\0\ ShowLength\0\ ShowDate\0\ NHoriz\0\ MinIconWidth\0\ MinIconHeight\0\ UserData\0\ DragTimeout\0\ MaxLabelWidth\0\ "}; #endif xfm-1.5.4/src/Fm_res_c0000644000175000017500000000073610371444417011476 00000000000000#ifndef Fm_res_c #define Fm_res_c /* THIS FILE WAS AUTOMATICALLY GENERATED BY SCAN_STRINGS */ /************************* DO NOT EDIT *******************/ char FmResStrings[]={"\ files\0\ nFiles\0\ entrySep\0\ leftSep\0\ topSep\0\ tabSep\0\ labelSep\0\ highlightColor\0\ showInode\0\ showType\0\ showLinks\0\ showPermissions\0\ showOwner\0\ showGroup\0\ showLength\0\ showDate\0\ nHoriz\0\ minIconWidth\0\ minIconHeight\0\ userData\0\ dragTimeout\0\ maxLabelWidth\0\ "}; #endif xfm-1.5.4/src/Fm_type_c0000644000175000017500000000031407731273202011654 00000000000000#ifndef Fm_type_c #define Fm_type_c /* THIS FILE WAS AUTOMATICALLY GENERATED BY SCAN_STRINGS */ /************************* DO NOT EDIT *******************/ char FmTypeStrings[]={"\ FileList\0\ "}; #endif xfm-1.5.4/src/FocusForm_class_c0000644000175000017500000000050307731273202013341 00000000000000#ifdef __STDC__ #define Const const #else #define Const /**/ #endif #ifndef FocusForm_class_c #define FocusForm_class_c /* THIS FILE WAS AUTOMATICALLY GENERATED BY SCAN_STRINGS */ /************************* DO NOT EDIT *******************/ Const char FocusFormClStrings[]={"\ FocusInterest\0\ FocusInitChild\0\ "}; #endif xfm-1.5.4/src/FocusForm_res_c0000644000175000017500000000050107731273202013023 00000000000000#ifdef __STDC__ #define Const const #else #define Const /**/ #endif #ifndef FocusForm_res_c #define FocusForm_res_c /* THIS FILE WAS AUTOMATICALLY GENERATED BY SCAN_STRINGS */ /************************* DO NOT EDIT *******************/ Const char FocusFormResStrings[]={"\ focusInterest\0\ focusInitChild\0\ "}; #endif xfm-1.5.4/src/FocusForm_type_c0000644000175000017500000000044007731273202013215 00000000000000#ifdef __STDC__ #define Const const #else #define Const /**/ #endif #ifndef FocusForm_type_c #define FocusForm_type_c /* THIS FILE WAS AUTOMATICALLY GENERATED BY SCAN_STRINGS */ /************************* DO NOT EDIT *******************/ Const char FocusFormTypeStrings[]={"\ "}; #endif xfm-1.5.4/src/TextField_class_c0000644000175000017500000000104107731273202013324 00000000000000#ifdef __STDC__ #define Const const #else #define Const /**/ #endif #ifndef TextField_class_c #define TextField_class_c /* THIS FILE WAS AUTOMATICALLY GENERATED BY SCAN_STRINGS */ /************************* DO NOT EDIT *******************/ Const char TextFieldClStrings[]={"\ TextPosition\0\ Length\0\ InsensitiveForeground\0\ ReadOnly\0\ ScrollChars\0\ ValueFormat\0\ UseStringInPlace\0\ Output\0\ ModifiedByUser\0\ Blink\0\ AutoBlink\0\ BlinkTime\0\ LeftLabel\0\ LabelWidth\0\ LabelSep\0\ LabelJustify\0\ ShowNChars\0\ UserData\0\ "}; #endif xfm-1.5.4/src/TextField_res_c0000644000175000017500000000126207731273202013015 00000000000000#ifdef __STDC__ #define Const const #else #define Const /**/ #endif #ifndef TextField_res_c #define TextField_res_c /* THIS FILE WAS AUTOMATICALLY GENERATED BY SCAN_STRINGS */ /************************* DO NOT EDIT *******************/ Const char TextFieldResStrings[]={"\ insertPosition\0\ length\0\ insensitiveForeground\0\ readOnly\0\ scrollChars\0\ modifiedCallback\0\ valueAddress\0\ valueSize\0\ valueType\0\ inputFormat\0\ outputFormat\0\ useStringInPlace\0\ displayCaret\0\ modifiedByUser\0\ blink\0\ autoBlink\0\ autoBlinkWaitTime\0\ blinkOnTime\0\ blinkOffTime\0\ leftLabel\0\ labelFont\0\ label\0\ labelWidth\0\ labelJustify\0\ labelSep\0\ showNChars\0\ userData\0\ "}; #endif xfm-1.5.4/src/TextField_type_c0000644000175000017500000000045307731273202013206 00000000000000#ifdef __STDC__ #define Const const #else #define Const /**/ #endif #ifndef TextField_type_c #define TextField_type_c /* THIS FILE WAS AUTOMATICALLY GENERATED BY SCAN_STRINGS */ /************************* DO NOT EDIT *******************/ Const char TextFieldTypeStrings[]={"\ CFormat\0\ "}; #endif xfm-1.5.4/src/Makefile.am0000644000175000017500000000273510735452244012074 00000000000000 bin_PROGRAMS = xfm xfmtype xfmmailcap CFLAGS ?= -g -O2 AM_CPPFLAGS = @CPPFLAGS@ -Wall -DPKGDATADIR="\"$(pkgdatadir)\"" -DSYSCONFDIR="\"$(sysconfdir)\"" xfm_SOURCES = \ FileList.c FmComms.c FmFw.c FmPopup.c TextField.c \ FmAwActions.c FmConfirm.c FmFwCb.c FmSelection.c TextFileList.c \ FmAw.c FmDelete.c FmHistory.c FmStringDefs.c \ FmAwCb.c FmDirs.c FmInfo.c FmUtils.c XtHelper.c \ FmAwPopup.c FmErrors.c FmLog.c FocusForm.c \ FmBitmaps.c FmMain.c IconFileList.c \ FmChmod.c FmFwActions.c FmOps.c magic.c \ mime.c suffix.c mime_start.c execute.c FmViewportScroll.c xfmtype_SOURCES = xfmtype.c magic.c suffix.c xfmtype_LDFLAGS = -Wl,-z,syms @COMPRESSIONLIBS@ xfmmailcap_SOURCES = xfmmailcap.c mime.c suffix.c xfmmailcap_LDFLAGS = -Wl,-z,syms xfm_LDFLAGS = -L/usr/X11R6/lib -lXpm -lXaw3d -lXmu -lXt -lX11 -Wl,-z,syms @COMPRESSIONLIBS@ noinst_HEADERS = \ Am.h Fm.h FmStringDefs.h IconFileList.h TextFieldP.h \ FileList.h FmHistory.h FmVersion.h IconFileListP.h TextFileList.h \ FileListP.h FmLog.h FocusForm.h magic.h TextFileListP.h \ FmComms.h FmSelection.h FocusFormP.h TextField.h XtHelper.h \ mime.h suffix.h mime_start.h execute.h global.h FmErrors.h \ Fm_class_c Fm_res_c Fm_type_c \ FocusForm_class_c FocusForm_res_c FocusForm_type_c \ TextField_class_c TextField_res_c TextField_type_c MAINTAINERCLEANFILES = Makefile.in xfm-1.5.4/src/Makefile.in0000644000175000017500000004364310744135560012107 00000000000000# Makefile.in generated by automake 1.10 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : bin_PROGRAMS = xfm$(EXEEXT) xfmtype$(EXEEXT) xfmmailcap$(EXEEXT) subdir = src DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/xfmconfig.h CONFIG_CLEAN_FILES = am__installdirs = "$(DESTDIR)$(bindir)" binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(bin_PROGRAMS) am_xfm_OBJECTS = FileList.$(OBJEXT) FmComms.$(OBJEXT) FmFw.$(OBJEXT) \ FmPopup.$(OBJEXT) TextField.$(OBJEXT) FmAwActions.$(OBJEXT) \ FmConfirm.$(OBJEXT) FmFwCb.$(OBJEXT) FmSelection.$(OBJEXT) \ TextFileList.$(OBJEXT) FmAw.$(OBJEXT) FmDelete.$(OBJEXT) \ FmHistory.$(OBJEXT) FmStringDefs.$(OBJEXT) FmAwCb.$(OBJEXT) \ FmDirs.$(OBJEXT) FmInfo.$(OBJEXT) FmUtils.$(OBJEXT) \ XtHelper.$(OBJEXT) FmAwPopup.$(OBJEXT) FmErrors.$(OBJEXT) \ FmLog.$(OBJEXT) FocusForm.$(OBJEXT) FmBitmaps.$(OBJEXT) \ FmMain.$(OBJEXT) IconFileList.$(OBJEXT) FmChmod.$(OBJEXT) \ FmFwActions.$(OBJEXT) FmOps.$(OBJEXT) magic.$(OBJEXT) \ mime.$(OBJEXT) suffix.$(OBJEXT) mime_start.$(OBJEXT) \ execute.$(OBJEXT) FmViewportScroll.$(OBJEXT) xfm_OBJECTS = $(am_xfm_OBJECTS) xfm_LDADD = $(LDADD) xfm_LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(xfm_LDFLAGS) $(LDFLAGS) -o \ $@ am_xfmmailcap_OBJECTS = xfmmailcap.$(OBJEXT) mime.$(OBJEXT) \ suffix.$(OBJEXT) xfmmailcap_OBJECTS = $(am_xfmmailcap_OBJECTS) xfmmailcap_LDADD = $(LDADD) xfmmailcap_LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(xfmmailcap_LDFLAGS) \ $(LDFLAGS) -o $@ am_xfmtype_OBJECTS = xfmtype.$(OBJEXT) magic.$(OBJEXT) \ suffix.$(OBJEXT) xfmtype_OBJECTS = $(am_xfmtype_OBJECTS) xfmtype_LDADD = $(LDADD) xfmtype_LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(xfmtype_LDFLAGS) \ $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(xfm_SOURCES) $(xfmmailcap_SOURCES) $(xfmtype_SOURCES) DIST_SOURCES = $(xfm_SOURCES) $(xfmmailcap_SOURCES) $(xfmtype_SOURCES) HEADERS = $(noinst_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COMPRESSIONLIBS = @COMPRESSIONLIBS@ CONFIG_VARIANT = @CONFIG_VARIANT@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = @CPPFLAGS@ -Wall -DPKGDATADIR="\"$(pkgdatadir)\"" -DSYSCONFDIR="\"$(sysconfdir)\"" xfm_SOURCES = \ FileList.c FmComms.c FmFw.c FmPopup.c TextField.c \ FmAwActions.c FmConfirm.c FmFwCb.c FmSelection.c TextFileList.c \ FmAw.c FmDelete.c FmHistory.c FmStringDefs.c \ FmAwCb.c FmDirs.c FmInfo.c FmUtils.c XtHelper.c \ FmAwPopup.c FmErrors.c FmLog.c FocusForm.c \ FmBitmaps.c FmMain.c IconFileList.c \ FmChmod.c FmFwActions.c FmOps.c magic.c \ mime.c suffix.c mime_start.c execute.c FmViewportScroll.c xfmtype_SOURCES = xfmtype.c magic.c suffix.c xfmtype_LDFLAGS = -Wl,-z,syms @COMPRESSIONLIBS@ xfmmailcap_SOURCES = xfmmailcap.c mime.c suffix.c xfmmailcap_LDFLAGS = -Wl,-z,syms xfm_LDFLAGS = -L/usr/X11R6/lib -lXpm -lXaw3d -lXmu -lXt -lX11 -Wl,-z,syms @COMPRESSIONLIBS@ noinst_HEADERS = \ Am.h Fm.h FmStringDefs.h IconFileList.h TextFieldP.h \ FileList.h FmHistory.h FmVersion.h IconFileListP.h TextFileList.h \ FileListP.h FmLog.h FocusForm.h magic.h TextFileListP.h \ FmComms.h FmSelection.h FocusFormP.h TextField.h XtHelper.h \ mime.h suffix.h mime_start.h execute.h global.h FmErrors.h \ Fm_class_c Fm_res_c Fm_type_c \ FocusForm_class_c FocusForm_res_c FocusForm_type_c \ TextField_class_c TextField_res_c TextField_type_c MAINTAINERCLEANFILES = Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu src/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; for p in $$list; do \ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ if test -f $$p \ ; then \ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ else :; fi; \ done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; for p in $$list; do \ f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ rm -f "$(DESTDIR)$(bindir)/$$f"; \ done clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) xfm$(EXEEXT): $(xfm_OBJECTS) $(xfm_DEPENDENCIES) @rm -f xfm$(EXEEXT) $(xfm_LINK) $(xfm_OBJECTS) $(xfm_LDADD) $(LIBS) xfmmailcap$(EXEEXT): $(xfmmailcap_OBJECTS) $(xfmmailcap_DEPENDENCIES) @rm -f xfmmailcap$(EXEEXT) $(xfmmailcap_LINK) $(xfmmailcap_OBJECTS) $(xfmmailcap_LDADD) $(LIBS) xfmtype$(EXEEXT): $(xfmtype_OBJECTS) $(xfmtype_DEPENDENCIES) @rm -f xfmtype$(EXEEXT) $(xfmtype_LINK) $(xfmtype_OBJECTS) $(xfmtype_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FileList.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FmAw.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FmAwActions.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FmAwCb.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FmAwPopup.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FmBitmaps.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FmChmod.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FmComms.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FmConfirm.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FmDelete.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FmDirs.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FmErrors.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FmFw.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FmFwActions.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FmFwCb.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FmHistory.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FmInfo.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FmLog.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FmMain.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FmOps.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FmPopup.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FmSelection.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FmStringDefs.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FmUtils.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FmViewportScroll.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FocusForm.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/IconFileList.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/TextField.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/TextFileList.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/XtHelper.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/execute.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/magic.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mime.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mime_start.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/suffix.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xfmmailcap.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xfmtype.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-exec-am: install-binPROGRAMS install-html: install-html-am install-info: install-info-am install-man: install-pdf: install-pdf-am install-ps: install-ps-am installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ clean-generic ctags distclean distclean-compile \ distclean-generic distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-binPROGRAMS \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ uninstall-am uninstall-binPROGRAMS CFLAGS ?= -g -O2 # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xfm-1.5.4/src/FileList.c0000644000175000017500000004161510735465611011721 00000000000000/* * This file is part of X-File Manager XFM * ---------------------------------------------------------------------- * Enhancements to the X-File Manager XFM-1.3.2 (FileList Widget) * Copyright (C) 1997 by Till Straumann * modified 2005,2006,2007 by Bernhard R. Link * ---------------------------------------------------------------------- * 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 of the License, 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include #include #include #include "global.h" #include #include #include "FileListP.h" #include #include "FmErrors.h" #define FL (flw->fileList) static XtResource fl_resources[] = { #define offset(field) XtOffsetOf(FileListRec, fileList.field) /* {name, class, type, size, offset, default_type, default_addr}, */ { XtNfont, XtCFont, XtRFontStruct, sizeof(XFontStruct*), offset(font), XtRString, (XtPointer) XtDefaultFont }, { XtNfiles, XtCFiles, XtRFileList, sizeof(FileList), offset(files), XtRImmediate, (XtPointer) 0 }, { XtNnFiles, XtCNFiles, XtRInt, sizeof(int), offset(n_files), XtRImmediate, (XtPointer) -1 }, { XtNhighlightColor, XtCHighlightColor, XtRPixel, sizeof(Pixel), offset(highlight_pixel), XtRString, (XtPointer) XtDefaultForeground }, { XtNforeground, XtCForeground, XtRPixel, sizeof(Pixel), offset(foreground), XtRString, (XtPointer) XtDefaultForeground }, { XtNuserData, XtCUserData, XtRPointer, sizeof(XtPointer), offset(user_data), XtRPointer, (XtPointer) NULL }, { XtNcallback, XtCCallback, XtRCallback, sizeof(XtPointer), offset(notify_cbl), XtRCallback, (XtPointer)NULL}, { XtNdragTimeout, XtCDragTimeout, XtRInt, sizeof(int), offset(drag_timeout), XtRImmediate, (XtPointer)200}, /* modified core resources */ { XtNborderWidth, XtCBorderWidth, XtRDimension, sizeof(Dimension), offset(border_width), XtRImmediate, (XtPointer) 2 }, #undef offset }; /* Methods */ static void flDestroy(Widget); static void ClassInitialize(void); static void flInitialize(Widget,Widget,ArgList,Cardinal*); static Boolean flSetValues(Widget,Widget,Widget,ArgList,Cardinal*); /* private procedures */ static void ReleaseGCs(FileListWidget); static void GetGCs(FileListWidget); /* Event Handlers */ static void FakeEntryLeave(Widget,XtPointer,XEvent*,Boolean *ctd); static void CatchEntryLeave(Widget,XtPointer,XEvent*,Boolean *ctd); static void StartTimer(Widget,XtPointer,XEvent*,Boolean *ctd); static void DiscardMotion(Widget,XtPointer,XEvent*,Boolean *ctd); /* Timer Callbacks */ static void EnableMotion(XtPointer,XtIntervalId *); /* Actions */ static void DispatchDirFile(Widget, XEvent*, String*, Cardinal* ); static void GrabMouseForPopup(Widget, XEvent *, String *, Cardinal *); static void Notify(Widget, XEvent*, String*, Cardinal*); static XtActionsRec actions[] = { /* {name, procedure}, */ {"dispatchDirFile", DispatchDirFile}, {"grabMouseForPopup", GrabMouseForPopup}, {"notify", Notify}, }; static char translations[] =""; /* ": fileList() \n\ "; */ FileListClassRec fileListClassRec = { { /* core fields */ /* superclass */ (WidgetClass) &widgetClassRec, /* class_name */ "FileList", /* widget_size */ sizeof(FileListRec), /* class_initialize */ ClassInitialize, /* class_part_initialize */ NULL, /* class_inited */ FALSE, /* initialize */ flInitialize, /* initialize_hook */ NULL, /* realize */ XtInheritRealize, /* actions */ actions, /* num_actions */ XtNumber(actions), /* resources */ fl_resources, /* num_resources */ XtNumber(fl_resources), /* xrm_class */ NULLQUARK, /* compress_motion */ TRUE, /* compress_exposure */ TRUE, /* compress_enterleave */ TRUE, /* visible_interest */ FALSE, /* destroy */ flDestroy, /* resize */ NULL, /* expose */ NULL, /* set_values */ flSetValues, /* set_values_hook */ NULL, /* set_values_almost */ XtInheritSetValuesAlmost, /* get_values_hook */ NULL, /* accept_focus */ NULL, /* version */ XtVersion, /* callback_private */ NULL, /* tm_table */ translations, /* query_geometry */ XtInheritQueryGeometry, /* display_accelerator */ XtInheritDisplayAccelerator, /* extension */ NULL }, { /* fileList fields */ /* findEntry */ NULL, /* entryPosition */ NULL, } }; WidgetClass fileListWidgetClass = (WidgetClass)&fileListClassRec; static void flDestroy(Widget w) { FileListWidget flw=(FileListWidget)w; ReleaseGCs(flw); XtRemoveEventHandler(w,XtAllEvents,True,FakeEntryLeave,(XtPointer)0); XtRemoveEventHandler(w,XtAllEvents,True,CatchEntryLeave,(XtPointer)0); XtRemoveEventHandler(w,XtAllEvents,True,DiscardMotion,(XtPointer)0); XtRemoveEventHandler(w,XtAllEvents,True,StartTimer,(XtPointer)0); if (FL.timer_running) XtRemoveTimeOut(FL.timeout_id); FL.timer_running=False; } static void ClassInitialize(void) { XawInitializeWidgetSet(); XtRegisterGrabAction(GrabMouseForPopup, True, ButtonPressMask | ButtonReleaseMask, GrabModeAsync, GrabModeAsync); } static void flInitialize(UNUSED(Widget treq),Widget tnew,UNUSED(ArgList args),UNUSED(Cardinal *n_args)) { FileRec *file; int i,tmp,width; const char *name; FileListWidget flw=(FileListWidget)tnew; if (FL.files==0 || FL.n_files<0) { XtAppError(XtWidgetToApplicationContext(tnew), "FileList must be set upon creation"); } width=0; for (i=0; iname; tmp=XTextWidth(FL.font, name, strlen(name)); if (tmp > width) width=tmp; file->width = tmp; file->icon.toggle=tnew; file->icon.form=(Widget)0; file->icon.arrow=(Widget)0; file->icon.label=(Widget)0; assert(file->mime_type != NULL ); } width+=XTextWidth(FL.font,"[]",2); width+=2*FL.border_width; FL.name_w=width; flw->core.border_width=0; FL.timer_running=False; if (FL.drag_timeout > 10000 || FL.drag_timeout<=0) { XtAppWarningFmt(XtWidgetToApplicationContext(tnew), "FileListWidget: %ims seems a very unusual drag timeout to me", FL.drag_timeout); } XtInsertEventHandler(tnew, ButtonMotionMask,False,DiscardMotion,(XtPointer)0,XtListHead); /* This one must go on top of the list, so entry/leave still are * generated if ButtonMotions are discarded */ XtInsertEventHandler(tnew, PointerMotionMask, False, (XtEventHandler)FakeEntryLeave, (XtPointer)0, XtListHead); XtInsertEventHandler(tnew, EnterWindowMask|LeaveWindowMask, False, (XtEventHandler)CatchEntryLeave, (XtPointer)0, XtListHead); XtInsertEventHandler(tnew, ButtonPressMask,False,StartTimer,(XtPointer)0,XtListHead); FL.pointer_entry=-1; GetGCs(flw); } void FileListReduceFilenames(FileListWidget flw, int max_width) { FileRec *file; int i, omit, width; size_t namelen; char *name; if (FL.files==0 || FL.n_files<0) { XtAppError(XtWidgetToApplicationContext((Widget)flw), "FileList must be set upon creation"); } for (i=0; ireducedname != NULL ) free(file->reducedname); namelen = strlen(file->name); name = XtMalloc(namelen + 1); file->reducedname = name; memcpy(name, file->name, namelen + 1); width = XTextWidth(FL.font, name, namelen); /* if already short enough, keep it: */ if( width <= max_width ) { file->width = width; file->reducedlen = namelen; continue; } /* do nothing if too short to handle properly */ if( namelen <= 7 ) { file->width = width; file->reducedlen = namelen; continue; } /* namelen characters are width long, * (namelen * max_width)/width characters may be max_width long? * ( not all characters have the same length, but on * avarage they should have... ) */ omit = namelen - ((namelen * max_width)/width); if( omit < 6 ) omit = 6; name[3] = '.'; name[4] = '.'; name[5] = '.'; memmove(name+6, name+omit, namelen+1-omit); namelen -= (omit - 6); /* finaly reduce more until it fits */ while( (width = XTextWidth(FL.font, name, namelen)) > max_width ) { if( namelen <= 6 ) break; // TODO: guess by the new width if there can be more characters // omitted at once // (in fixed-with-font that will need 6 tried otherwise): memmove(name+6, name+7, namelen+1-7); namelen--; } file->width = width; file->reducedlen = namelen; } } #define NF (new->fileList) #define CF (current->fileList) static Boolean flSetValues(Widget c, UNUSED(Widget r), Widget super, UNUSED(ArgList args), UNUSED(Cardinal *nargs)) { Boolean rval=False,warn=False; FileListWidget current=(FileListWidget)c; FileListWidget new=(FileListWidget)super; if (NF.highlight_pixel != CF.highlight_pixel || NF.foreground != CF.foreground || new->core.background_pixel != current->core.background_pixel) { ReleaseGCs(new); GetGCs(new); rval=True; } if (NF.drag_timeout!=CF.drag_timeout && (NF.drag_timeout > 10000 || NF.drag_timeout<=0)) { XtAppWarningFmt(XtWidgetToApplicationContext(super), "FileListWidget: %ims seems a very unusual drag timeout to me", NF.drag_timeout); } if (NF.font!=CF.font) {NF.font=CF.font; warn=True; } if (NF.border_width!=CF.border_width) { NF.border_width=CF.border_width; warn=True; } if (NF.files!=CF.files) {NF.files=CF.files; warn=True;} if (NF.n_files!=CF.n_files) {NF.n_files=CF.n_files; warn=True;} if (warn) XtAppWarning(XtWidgetToApplicationContext(super), "most resources of FileList Widget cannot be changed"); return rval; } #undef NF #undef CF /* Actions */ static void Notify( Widget w, UNUSED(XEvent *ev), String *args, Cardinal *nargs) { FileListWidget flw=(FileListWidget)w; String *alist=(String*) XtMalloc(*nargs+1); Cardinal i; alist[*nargs]=0; for (i=0; i<*nargs; i++) alist[i]=args[i]; XtCallCallbackList(w,FL.notify_cbl,(XtPointer)alist); XtFree((char*)alist); } static void GrabMouseForPopup( Widget w, XEvent *ev, String *args, Cardinal *nargs) { if (nargs == NULL || *nargs<1) { XtAppWarning(XtWidgetToApplicationContext(w), "DispatchDirFile() needs min. 1 argument"); return; } XtCallActionProc(w,args[0],ev,args+1,*nargs-1); } static void DispatchDirFile( Widget w, XEvent *ev, String *args, Cardinal *nargs) { FileListWidget flw=(FileListWidget)w; int i; unsigned int idx; FileRec *file; if (nargs == NULL || *nargs<3) { XtAppWarning(XtWidgetToApplicationContext(w), "DispatchDirFile() needs min. 3 arguments"); return; } i=FileListFindEntry(flw,ev); if (i==-1) idx=2; else { file=FL.files[i]; if (S_ISDIR(file->stats.st_mode)) idx=0; else idx=1; } if (*args[idx]!=(char)0) XtCallActionProc(w,args[idx],ev,args+3,*nargs-3); } /* public procedures */ void FileListEventPosition(XEvent *ev, int *x, int *y) { switch (ev->type) { case KeyPress: case KeyRelease: *x=ev->xkey.x; *y=ev->xkey.y; return; case ButtonPress: case ButtonRelease: *x=ev->xbutton.x; *y=ev->xbutton.y; return; case MotionNotify: *x=ev->xmotion.x; *y=ev->xmotion.y; return; case EnterNotify : case LeaveNotify: *x=ev->xcrossing.x; *y=ev->xcrossing.y; return; default: *x=*y=-1; return; } } int FileListFindEntry(FileListWidget flw, XEvent *ev) { int x,y; FileListWidgetClass classptr=(FileListWidgetClass)XtClass((Widget)flw); if (! classptr->fileList_class.findEntry) return -1; FileListEventPosition(ev,&x,&y); if (x<0) return -1; return classptr->fileList_class.findEntry(flw,x,y,ev); } void FileListEntryPosition(FileListWidget flw, int entry, Position *x, Position *y, Dimension *w, Dimension *h) { FileListWidgetClass classptr=(FileListWidgetClass)XtClass((Widget)flw); if (! classptr->fileList_class.entryPosition || entry<0 || entry>FL.n_files) { *x=*y=-1; return; } classptr->fileList_class.entryPosition(flw,entry,x,y,w,h); } void FileListRefreshItem(FileListWidget flw, int item) { Position x,y; Dimension w,h; if (item<0 || item>=FL.n_files) { XtAppWarning( XtWidgetToApplicationContext((Widget)flw), "FileListRefreshItem(): item nr. out of range"); return; } FileListEntryPosition(flw,item,&x,&y,&w,&h); XClearArea(XtDisplay((Widget)flw),XtWindow((Widget)flw), x,y, (unsigned int) w, (unsigned int) h, True); } static void CatchEntryLeave(Widget w, UNUSED(XtPointer cld), XEvent* ev, Boolean *ctd) { FileListWidget flw=(FileListWidget)w; FileListWidgetClass classptr=(FileListWidgetClass)XtClass((Widget)flw); if (ev->xcrossing.send_event) return; *ctd=True; /* no longer eat up event */ if (ev->type==EnterNotify) { int x=ev->xcrossing.x; int y=ev->xcrossing.y; int entry=classptr->fileList_class.findEntry(flw,x,y,ev); if (entry!=-1) { FL.enter_x=x; FL.enter_y=y; } FL.pointer_entry=entry; } else { if (FL.pointer_entry!=-1) { ev->xcrossing.x=FL.enter_x; ev->xcrossing.y=FL.enter_y; } FL.pointer_entry=-1; } } /* A button was pressed, suppress propagation of motion events for * some time; that way drags can be separated from clicks if the * user just moved the pointer a bit while clicking */ static void StartTimer(Widget w, UNUSED(XtPointer cld), UNUSED(XEvent* ev), UNUSED(Boolean *ctd)) { FileListWidget flw=(FileListWidget)w; if (FL.timer_running) XtRemoveTimeOut(FL.timeout_id); FL.timeout_id=XtAppAddTimeOut( XtWidgetToApplicationContext(w), (unsigned long) FL.drag_timeout, EnableMotion,(XtPointer)w); FL.timer_running=True; } /* If a timer is still running, don't continue to dispatch * ButtonMotion events. */ static void DiscardMotion(Widget w, UNUSED(XtPointer cld), UNUSED(XEvent* ev), Boolean *ctd) { FileListWidget flw=(FileListWidget)w; if (FL.timer_running) *ctd=False; } static void FakeEntryLeave(Widget w, UNUSED(XtPointer cld), XEvent* ev, UNUSED(Boolean *ctd)) { int x,y,entry; FileListWidget flw=(FileListWidget)w; FileListWidgetClass classptr=(FileListWidgetClass)XtClass((Widget)flw); static XCrossingEvent elev={ (int) 0, /* type */ (unsigned long)0, /* req # */ True, /* send event */ (Display*)0, /* Display */ (Window)0, /* Window */ (Window)0, /* root window */ None, /* child window */ CurrentTime, /* time */ (int)-1, /* x */ (int)-1, /* y */ (int)-1, /* root x */ (int)-1, /* root y */ NotifyNormal, /* mode (grab) */ NotifyAncestor, /* detail (?) */ (Boolean)-1, /* same screen */ False, /* focus */ (unsigned int) 0 /* Modifier / button state */ }; x=ev->xmotion.x; y=ev->xmotion.y; entry=classptr->fileList_class.findEntry(flw,x,y,ev); if (entry==FL.pointer_entry) return; elev.display= ev->xmotion.display; elev.window= ev->xmotion.window; elev.root= ev->xmotion.root; elev.time= ev->xmotion.time; elev.x_root= ev->xmotion.x_root; elev.y_root= ev->xmotion.y_root; elev.same_screen=ev->xmotion.same_screen; elev.state= ev->xmotion.state; if (FL.pointer_entry!=-1) { elev.x= FL.enter_x; elev.y= FL.enter_y; elev.type=LeaveNotify; XSendEvent(XtDisplay(w),XtWindow(w),False,LeaveWindowMask,(XEvent*)&elev); } if ((FL.pointer_entry=entry)!=-1) { elev.x=FL.enter_x=x; /* save position of entry, so when the correspoinding * leave event will be faked, we remember a position * inside the list item. */ elev.y=FL.enter_y=y; elev.type=EnterNotify; XSendEvent(XtDisplay(w),XtWindow(w),False,EnterWindowMask,(XEvent*)&elev); } } /* Timer callback */ /* Some time has expired since the last Button was pressed; * we guess that the user really intends to drag something * if he/she moves the pointer now. */ static void EnableMotion(XtPointer cld, UNUSED(XtIntervalId *id)) { FileListWidget flw=(FileListWidget)cld; FL.timer_running=False; /*Timer just expired*/ } /* private procedures */ static void ReleaseGCs(FileListWidget flw) { Widget w=(Widget)flw; XtReleaseGC(w,FL.gc_highlight); XtReleaseGC(w,FL.gc_norm); XtReleaseGC(w,FL.gc_invert); } static void GetGCs(FileListWidget flw) { XGCValues vals; XtGCMask mask=GCForeground|GCBackground|GCFont|GCGraphicsExposures|GCLineWidth; vals.foreground=FL.highlight_pixel; vals.background=flw->core.background_pixel; vals.font=FL.font->fid; vals.line_width=FL.border_width; vals.graphics_exposures=False; FL.gc_highlight=XtGetGC((Widget)flw,mask,&vals); vals.foreground=FL.foreground; FL.gc_norm=XtGetGC((Widget)flw,mask,&vals); vals.foreground=vals.background; vals.background=FL.highlight_pixel; FL.gc_invert=XtGetGC((Widget)flw,mask,&vals); } xfm-1.5.4/src/FmComms.c0000644000175000017500000000700310362516040011525 00000000000000/* * This file is part of X-File Manager XFM * ---------------------------------------------------------------------- FmComms.c (c) Simon Marlow 1990-1993 (c) Albert Graef 1994 modified 2006 by Bernhard R. Link (see Changelog) support for receiving instructions from other X processes * ---------------------------------------------------------------------- * 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 of the License, 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include "global.h" #include "Fm.h" #include "Am.h" #include "FmComms.h" Atom xfm_open_window, xfm_update_window, wm_delete_window, wm_protocols, wm_save_yourself, kwm_save_yourself; void clientMessageHandler(Widget w, UNUSED(XtPointer closure), XEvent *e) { /* The client message handler must be re-entrant because the invokation of the callbacks in response to a wm_delete_window message can cause more events to be dispatched. We handle this by just ignoring these recursive calls. */ static int in_use = 0; XClientMessageEvent *c = (XClientMessageEvent *)e; if (in_use || e->type != ClientMessage || (c->message_type != wm_protocols && freeze)) return; in_use = 1; if (c->message_type == xfm_open_window) ; /**/ /* to be implemented */ else if (c->message_type == xfm_update_window) ; /**/ /* to be implemented */ else if (c->message_type == wm_protocols) { if (w == aw.shell) { if ((Atom)c->data.l[0] == wm_delete_window) { appCloseCb(w, file_windows, (XtPointer)NULL); } else { /* must be `save yourself'; they are waiting for * a property change event */ XChangeProperty(XtDisplay(w),XtWindow(w), XA_WM_COMMAND, XA_STRING, 8, PropModeAppend, NULL,0); } } else { FileWindowRec *fw; for (fw = file_windows; fw; fw = fw->next) if (w == fw->shell) break; if (!fw) error("Internal error:", "Widget not found in clientMessageHandler"); else fileCloseCb(w, fw, (XtPointer)NULL); } } in_use = 0; } void initComms(void) { /* Make up some new atoms */ xfm_open_window = XInternAtom(XtDisplay(aw.shell), XFM_OPEN_WINDOW, False); xfm_update_window = XInternAtom(XtDisplay(aw.shell), XFM_UPDATE_WINDOW, False); wm_delete_window = XInternAtom(XtDisplay(aw.shell), WM_DELETE_WINDOW, False); wm_protocols = XInternAtom(XtDisplay(aw.shell), WM_PROTOCOLS, False); /* participate on this also; kwm works better with it */ wm_save_yourself = XInternAtom(XtDisplay(aw.shell), WM_SAVE_YOURSELF, False); /* let's see, whether kwm is up */ kwm_save_yourself = XInternAtom(XtDisplay(aw.shell), KWM_SAVE_YOURSELF, False); if (xfm_open_window == None || xfm_update_window == None || wm_delete_window == None || wm_protocols == None) abortXfm("Couldn't initialize client message handler"); } xfm-1.5.4/src/FmFw.c0000644000175000017500000013574210657377707011065 00000000000000/* * This file is part of X-File Manager XFM * ---------------------------------------------------------------------- FmFw.c (c) Simon Marlow 1991 (c) Albert Graef 1994 modified 1-29-95 by rodgers@lvs-emh.lvs.loral.com (Kevin M. Rodgers) to add filtering of icon/text directory displays by a filename filter. modified 7-1997 by strauman@sun6hft.ee.tu-berlin.de to add different enhancements (see README-1.4). modified 2005,2006,2007 by Bernhard R. Link (see Changelog) functions & data for creating a file window, and various functions related to file windows * ---------------------------------------------------------------------- * 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 of the License, 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include #include #include #include #include #ifdef _AIX #include #endif #ifdef HAVE_FSTAB_H #include #endif #define VIEWPORT_HACK 1 #include #include #include #include #include #include #include #include #include #include "XtHelper.h" #include "global.h" #include "TextFileList.h" #include "IconFileList.h" #include "Am.h" #include "Fm.h" #include "execute.h" #ifdef ENHANCE_HISTORY #include "FmHistory.h" #endif #ifdef ENHANCE_SELECTION #include "FmSelection.h" #endif #ifdef ENHANCE_TRANSLATIONS /* This is a hack in order not to change the resource tables * because I don't want to re-index all references to these tables * (would have been nicer, if some symbols were defined) */ #undef XtNtranslations #define XtNtranslations "" #endif #ifdef ENHANCE_LOG #include "FmLog.h" #endif #include "mime.h" #define FW_WIDTH 400 #define FW_HEIGHT 300 #define TEXT_PADDING 10 #define MAXCFGLINELEN 1024 /*----------------------------------------------------------------------------- PUBLIC DATA -----------------------------------------------------------------------------*/ #ifdef ENHANCE_HISTORY extern HistoryList path_history; #endif FileWindowList file_windows = NULL; Cardinal n_devices; DevList devs; /*----------------------------------------------------------------------------- STATIC DATA -----------------------------------------------------------------------------*/ static const FmMenuItemRec file_popup_menu[] = { { "edit", "Edit", fileEditCb }, { "view", "View", fileViewCb }, { "line1", NULL, NULL }, { "rename", "Rename...", renamePopup }, { "line2", NULL, NULL }, { "move", "Move...", movePopup }, { "copy", "Copy...", copyPopup }, { "link", "Link...", linkPopup }, { "line3", NULL, NULL }, { "delete", "Delete", deleteItems }, { "line4", NULL, NULL }, { "info", "Information...", infoPopup }, { "chmod", "Permissions...", chmodPopup } }; static const FmMenuItemRec dir_popup_menu[] = { { "open", "Open", fileOpenCb }, { "line1", NULL, NULL }, { "rename", "Rename...", renamePopup }, { "line2", NULL, NULL }, { "move", "Move...", movePopup }, { "copy", "Copy...", copyPopup }, { "link", "Link...", linkPopup }, { "line3", NULL, NULL }, { "delete", "Delete", deleteItems }, { "line4", NULL, NULL }, { "info", "Information...", infoPopup }, { "chmod", "Permissions...", chmodPopup } }; static const FmMenuItemRec file_menu[] = { { "new", "New...", createFilePopup }, { "line1", NULL, NULL }, { "move", "Move...", movePopup }, { "copy", "Copy...", copyPopup }, { "link", "Link...", linkPopup }, { "line2", NULL, NULL }, { "delete", "Delete", deleteItems }, { "line3", NULL, NULL }, { "select", "Select...", selectPopup }, { "select all", "Select all", fileSelectAllCb }, { "deselect all", "Deselect all", fileDeselectCb }, #ifdef ENHANCE_SELECTION { "own Selection", "Own Selection", selectionOwnCb }, #endif { "line4", NULL, NULL }, { "xterm", "Xterm", xtermCb }, { "line5", NULL, NULL }, { "about", "About xfm...", fileAboutCb }, { "line6", NULL, NULL }, { "quit", "Quit", fileQuitCb }, }; static const FmMenuItemRec folder_menu[] = { { "new", "New...", mkdirPopup }, { "line1", NULL, NULL }, { "goto", "Go to...", goToPopup }, { "home", "Home", fileHomeCb }, { "up", "Up", fileUpCb }, { "line2", NULL, NULL }, { "empty", "Empty", emptyDir }, { "line3", NULL, NULL }, #ifdef ENHANCE_MENU { "clone", "Clone", fileCloneCb }, #endif { "close", "Close", fileCloseCb }, }; static const FmMenuItemRec view_menu[] = { { "tree", "Tree", fileTreeCb }, { "icons", "Icons", fileIconsCb }, { "text", "Text", fileTextCb }, { "line1", NULL, NULL }, { "sort by name", "Sort by name", fileSortNameCb }, { "sort by size", "Sort by size", fileSortSizeCb }, { "sort by mtime", "Sort by date", fileSortMTimeCb }, { "line2", NULL, NULL }, { "filter", "Filter...", filterPopup }, /* KMR */ { "line3", NULL, NULL }, { "hide folders", "Hide folders", fileShowDirsCb }, { "mix folders/files", "Mix folders/files", fileDirsFirstCb }, { "show hidden files", "Show hidden files", fileShowHiddenCb }, #ifdef ENHANCE_LOG { "line4", NULL, NULL }, { "show log", "Show log", logPopup }, #endif }; /* Don't change the order of menu entries * (showTxtOptsCb() and updateTxtOpts() depend on it) */ static const FmMenuItemRec text_opts_menu[]={ { "show Inode", "Show Inode", showTxtOptsCb}, { "show Type", "Show Type", showTxtOptsCb}, { "show Permission", "Show Permission", showTxtOptsCb}, { "show Link Count", "Show Link Count", showTxtOptsCb}, { "show User", "Show User", showTxtOptsCb}, { "show Group", "Show Group", showTxtOptsCb}, { "show Size", "Show Size", showTxtOptsCb}, { "show MTime", "Show MTime", showTxtOptsCb}, }; /*----------------------------------------------------------------------------- Widget Argument Lists -----------------------------------------------------------------------------*/ static Arg shell_args[] = { { XtNtitle, (XtArgVal) NULL }, { XtNiconPixmap, (XtArgVal) NULL }, { XtNiconMask, (XtArgVal) NULL } }; static Arg form_args[] = { { XtNdefaultDistance, (XtArgVal) 0 } }; static Arg button_box_args[] = { { XtNtop, XtChainTop }, { XtNbottom, XtChainTop }, { XtNleft, XtChainLeft }, { XtNright, XtChainLeft }, }; static Arg label_args[] = { { XtNfromVert, (XtArgVal) NULL }, { XtNlabel, (XtArgVal) NULL }, { XtNwidth, (XtArgVal) FW_WIDTH }, { XtNfont, (XtArgVal) NULL }, { XtNresize, (XtArgVal) False }, { XtNtop, XtChainTop }, { XtNbottom, XtChainTop }, { XtNleft, XtChainLeft }, { XtNright, XtChainRight }, { XtNtranslations, (XtArgVal) NULL }, }; static Arg viewport_args[] = { { XtNfromVert, (XtArgVal) NULL }, { XtNwidth, (XtArgVal) FW_WIDTH }, { XtNtop, XtChainTop }, { XtNbottom, XtChainBottom }, { XtNleft, XtChainLeft }, { XtNright, XtChainRight }, { XtNallowVert, (XtArgVal) True }, { XtNallowHoriz, (XtArgVal) True } }; static Arg status_args[] = { { XtNfromVert, (XtArgVal) NULL }, { XtNlabel, (XtArgVal) NULL }, { XtNwidth, (XtArgVal) FW_WIDTH }, { XtNfont, (XtArgVal) NULL }, { XtNresize, (XtArgVal) False }, { XtNtop, XtChainBottom }, { XtNbottom, XtChainBottom }, { XtNleft, XtChainLeft }, { XtNright, XtChainRight }, { XtNjustify, XtJustifyLeft } }; static Arg text_list_args[] = { { XtNwidth, (XtArgVal) 0 }, { XtNfont, (XtArgVal)0 }, { XtNfiles, (XtArgVal) 0}, { XtNnFiles, (XtArgVal) 0}, { XtNtranslations, (XtArgVal) NULL}, { XtNhighlightColor, (XtArgVal) 0 }, }; static Arg icon_list_args[] = { { XtNwidth, (XtArgVal) 0 }, { XtNfont, (XtArgVal)0 }, { XtNfiles, (XtArgVal) 0}, { XtNnFiles, (XtArgVal) 0}, { XtNminIconWidth, (XtArgVal) 0}, { XtNminIconHeight, (XtArgVal) 0}, { XtNtranslations, (XtArgVal) NULL}, { XtNhighlightColor, (XtArgVal) 0 }, }; static Arg tree_box_args[] = { { XtNwidth, (XtArgVal) 1 }, { XtNdefaultDistance, (XtArgVal) 0 }, { XtNheight, (XtArgVal) 1 } }; static Arg tree_form_args[] = { { XtNfromHoriz, (XtArgVal) NULL }, { XtNfromVert, (XtArgVal) NULL }, { XtNdefaultDistance, (XtArgVal) 0 }, { XtNwidth, (XtArgVal) 0 }, { XtNtop, XtChainTop }, { XtNbottom, XtChainTop }, { XtNleft, XtChainLeft }, { XtNright, XtChainLeft }, #ifdef VIEWPORT_HACK { XtNresizable, (XtArgVal) True }, #endif }; static Arg icon_toggle_args[] = { { XtNfromHoriz, (XtArgVal) NULL }, { XtNfromVert, (XtArgVal) NULL }, { XtNbitmap, (XtArgVal) NULL }, { XtNtranslations, (XtArgVal) NULL }, { XtNwidth, (XtArgVal) 0 }, { XtNheight, (XtArgVal) 0 }, { XtNforeground, (XtArgVal) 0 }, }; static Arg icon_label_args[] = { { XtNfromHoriz, (XtArgVal) NULL }, { XtNfromVert, (XtArgVal) NULL }, { XtNlabel, (XtArgVal) NULL }, { XtNfont, (XtArgVal) NULL }, { XtNwidth, (XtArgVal) 0 }, { XtNtranslations, (XtArgVal) NULL }, { XtNinternalWidth, (XtArgVal) 0 }, { XtNinternalHeight, (XtArgVal) 0 }, }; static Arg arrow_args[] = { { XtNfromHoriz, (XtArgVal) NULL }, { XtNfromVert, (XtArgVal) NULL }, { XtNbitmap, (XtArgVal) NULL }, { XtNsensitive, (XtArgVal) True }, { XtNtop, XtChainTop }, { XtNbottom, XtChainTop }, { XtNleft, XtChainLeft }, { XtNright, XtChainLeft }, { XtNinternalWidth, (XtArgVal) 0 }, { XtNinternalHeight, (XtArgVal) 0 }, { XtNhighlightThickness, (XtArgVal) 0 } }; static Arg line_args[] = { { XtNfromHoriz, (XtArgVal) NULL }, { XtNfromVert, (XtArgVal) NULL }, { XtNbitmap, (XtArgVal) NULL }, { XtNtop, XtChainTop }, { XtNbottom, XtChainTop }, { XtNleft, XtChainLeft }, { XtNright, XtChainLeft }, { XtNinternalWidth, (XtArgVal) 0 }, { XtNinternalHeight, (XtArgVal) 0 } }; /*----------------------------------------------------------------------------- Translation tables -----------------------------------------------------------------------------*/ #ifndef ENHANCE_TRANSLATIONS #ifdef ENHANCE_HISTORY static char label_translations_s[] = "\ : FmUpdateHistory(fm_history) MenuPopup(fm_history)\n\ (2) : fileRefresh()\n"; #else static char label_translations_s[] = "\ (2) : fileRefresh()\n"; #endif static char tree_translations_s[] = "\ : fileHighlight()\n\ : resetCursor()\n\ , : fileSelect()\n\ , : fileBeginDrag(1,move)\n\ , : fileToggle()\n\ , : fileBeginDrag(2,copy)\n\ Any : dirPopup()\n"; #endif static void dummy(UNUSED(Widget w), UNUSED(XEvent *event), UNUSED(String *params), UNUSED(Cardinal *num_params)) { } static XtActionsRec file_actions[] = { { "fileRefresh", fileRefresh }, { "fileToggle", fileToggle }, { "fileSelect", fileSelect }, { "fileHighlight", fileHighlight }, { "fileOpenDir", fileOpenDir }, { "fileBeginDrag", fileBeginDrag }, { "fileExecAction", fileExecAction }, { "resetCursor", resetCursor }, { "trackCursor", trackCursor }, { "fileMaybeHighlight", fileMaybeHighlight }, { "filePopup", filePopup }, { "dirPopup", dirPopup }, { "dummy", dummy }, }; #ifndef ENHANCE_TRANSLATIONS static XtTranslations label_translations, file_list_translations, tree_translations; #endif /*----------------------------------------------------------------------------- PRIVATE FUNCTIONS -----------------------------------------------------------------------------*/ static int longestName(FileWindowRec *fw) { int i,l; int longest = 0; for (i=0; in_files; i++) if ((l = XTextWidth(resources.icon_font, fw->files[i]->name, strlen(fw->files[i]->name))) > longest) longest = l; return longest; } static void unmapTxtOptsCb(Widget w, XtPointer cld, UNUSED(XtPointer cad)) { FileWindowRec *fw=(FileWindowRec *)cld; Widget options_button; /* don't do nothing if our parent is already being * destroyed. * (fw may be a dangling pointer in this case!) */ if (XtIsBeingDestroyed(XtParent(w))) return; /* if they continue to use the options button, return */ if (--fw->option_in_use >0) return; options_button=XtParent(XtParent(fw->option_items[0])); if (XtIsRealized(options_button)) XtUnmapWidget(options_button); else XtSetMappedWhenManaged(options_button,False); } /* This callback is registered on the callback list of a fileList widget. * It is called by the 'notify()' action. * A pointer to the (null terminated) argument list is passed in the * 'call data' parameter. We use it to determine what to do * * Notify(menu entry path) * * calls the callback registered with an arbitrary menu entry. * the name of the menu entry is resolved by means of * 'XtNameToWidget', starting with the FileWindow's shell. */ static void fileListCb(Widget w, XtPointer cld, XtPointer cad) { FileWindowRec *fw=(FileWindowRec*)cld; String *args=(String*)cad; String entry_path; Widget entry; if ((entry_path=args[0])==0) { XtAppWarning(XtWidgetToApplicationContext(w), "fileListCb (Notify): need 1 arg"); return; } if ((entry=XtNameToWidget(fw->shell,entry_path))==0) { XtAppWarningFmt(XtWidgetToApplicationContext(w), "fileListCb (Notify): menu entry '%s' not found", entry_path); return; } XtCallCallbacks(entry,XtNcallback,0); } /*---------------------------------------------------------------------------*/ static int parseDev(FILE *fp, char **name, char **mount_action, char **umount_action, char **type) { static char s[MAXCFGLINELEN]; int l; start: if (feof(fp)||!fgets(s, MAXCFGLINELEN, fp)) return 0; l = strlen(s); if (s[l-1] == '\n') s[--l] = '\0'; if (!l || *s == '#') goto start; if (!(*name = split(s, ':'))) return -1; if (!(*mount_action = split(NULL, ':'))) return -1; if (!(*umount_action = split(NULL, ':'))) return -1; *type = split(NULL, ':'); return l; } /*---------------------------------------------------------------------------*/ #ifdef HAVE_FSTAB_H static char *getFSIcon(const char *fstype, const char *translations) { size_t fslen = strlen(fstype); const char *rule = translations; const char *result = translations; while ((rule = strchr(rule, ',')) != NULL) { rule++; if (strncmp(rule,fstype,fslen) != 0 || rule[fslen] != '=') continue; result = rule + fslen + 1; break; } rule = strchr(result, ','); if (rule == NULL) { return XtNewString(result); } else { char *r = XtMalloc((rule-result)+1); memcpy(r, result, rule-result); r[rule-result] = '\0'; return r; } } #endif static void readDevices(String path) { FILE *fp; char *name, *mount_action, *umount_action, *type; char s1[MAXCFGSTRINGLEN]; char s2[MAXCFGSTRINGLEN]; char s3[MAXCFGSTRINGLEN]; char s4[MAXCFGSTRINGLEN]; int i, j, p; n_devices = 0; devs = NULL; if (!(fp = fopen(path, "r"))) return; i = 0; while ((p = parseDev(fp, &name, &mount_action, &umount_action, &type)) > 0) { name = strparse(s1, name, "\\:"); mount_action = strparse(s2, mount_action, "\\:"); umount_action = strparse(s3, umount_action, "\\:"); if (type != NULL) type = strparse(s4, type, "\\:"); else type = strcpy(s4,"disk.xpm"); if (strcmp(name,"GETFSENT") == 0) { #ifdef HAVE_FSTAB_H struct fstab *fs; if (setfsent() != 1 ) { sysError("setfsent() returned an error, unable to get mountable devices!\n"); continue; } while ((fs = getfsent()) != NULL) { /* look for "user" or "users" option */ if (strncmp(fs->fs_mntops,"user",4) != 0 && strstr(fs->fs_mntops,",user") == NULL) { continue; } /* skip entries already in the list */ for (j=0; j < i ; j++) if (strcmp(devs[j].name,fs->fs_file) == 0) break; if (j < i) continue; devs = (DevList) XTREALLOC(devs, (i+1)*sizeof(DevRec) ); devs[i].name = XtNewString(fs->fs_file); devs[i].type = getFSIcon(fs->fs_vfstype,type); devs[i].mount_action = spaceConcat(mount_action, fs->fs_file); devs[i].umount_action = spaceConcat(umount_action, fs->fs_file); devs[i].mounted = 0; i++; } endfsent(); #else sysError("No getfsent support compiled in, ignoring GETFSENT!\n"); #endif continue; } devs = (DevList) XTREALLOC(devs, (i+1)*sizeof(DevRec) ); devs[i].name = XtNewString(name); devs[i].mount_action = XtNewString(mount_action); devs[i].umount_action = XtNewString(umount_action); devs[i].type = XtNewString(type); devs[i].mounted = 0; i++; } if (p == -1) error("Error in devices file", ""); n_devices = i; if (fclose(fp)) sysError("Error reading devices file:"); } /*---------------------------------------------------------------------------*/ static bool devAction(const char *action) { const char **command; bool successfull; command = makeShellArgs(action, NULL); successfull = execute_and_wait(command[0], "/", command); XTFREE(command); return successfull?1:0; } /*----------------------------------------------------------------------------*/ /* This is new */ static void createFileIcons(FileWindowRec *fw) { Dimension width; XtVaGetValues(fw->viewport, XtNwidth, &width, NULL); icon_list_args[0].value = (XtArgVal) width; icon_list_args[1].value = (XtArgVal) resources.icon_font; icon_list_args[2].value = (XtArgVal) fw->files; icon_list_args[3].value = (XtArgVal) fw->n_files; icon_list_args[4].value = (XtArgVal) resources.file_icon_width; icon_list_args[5].value = (XtArgVal) resources.file_icon_height; #ifndef ENHANCE_TRANSLATIONS icon_list_args[6].value = (XtArgVal) file_list_translations; #endif #ifdef ENHANCE_SELECTION icon_list_args[7].value = (XtArgVal) resources.highlight_pixel; #endif fw->icon_box = XtCreateWidget("icon list", iconFileListWidgetClass, fw->viewport, icon_list_args, XtNumber(icon_list_args) ); XtAddCallback(fw->icon_box,XtNcallback,fileListCb,(XtPointer)fw); XtVaSetValues(fw->viewport, XtNallowVert, (XtArgVal)True , NULL); XtVaSetValues(fw->viewport, XtNallowHoriz, (XtArgVal)True , NULL); } /*----------------------------------------------------------------------------*/ /* This is new */ static void createTextDisplay(FileWindowRec *fw) { Dimension width; Widget options_button; XtVaSetValues(fw->viewport, XtNallowHoriz, True, NULL); XtVaGetValues(fw->viewport, XtNwidth, &width, NULL); text_list_args[0].value = (XtArgVal) width; text_list_args[1].value = (XtArgVal) resources.icon_font; text_list_args[2].value = (XtArgVal) fw->files; text_list_args[3].value = (XtArgVal) fw->n_files; #ifndef ENHANCE_TRANSLATIONS text_list_args[4].value = (XtArgVal) file_list_translations; #endif #ifdef ENHANCE_SELECTION text_list_args[5].value = (XtArgVal) resources.highlight_pixel; #endif fw->icon_box = XtCreateWidget("text list", textFileListWidgetClass, fw->viewport, text_list_args, XtNumber(text_list_args) ); XtAddCallback(fw->icon_box,XtNcallback,fileListCb,(XtPointer)fw); /* increment in_use count for the options button; the unmapTxtOptsCb * will only unmap the button if the count drops to zero. */ fw->option_in_use++; XtAddCallback(fw->icon_box,XtNdestroyCallback, unmapTxtOptsCb,(XtPointer)fw); updateTxtOpts(fw); options_button=XtParent(XtParent(fw->option_items[0])); /* show the text options menu */ if (XtIsRealized(fw->shell)) XtMapWidget(options_button); else XtSetMappedWhenManaged(options_button,True); } /*----------------------------------------------------------------------------*/ /* create a directory icon in position specified by horiz & vert */ static Widget createDirIcon(FileWindowRec *fw, int i, Widget horiz,Widget vert) { FileRec *file = fw->files[i]; char *dirlabel; Pixel back; Pixmap icon = None; if( file->mime_type ) { assert( file->mime_type->data != NULL ); icon = file->mime_type->data->icon_bm; assert( icon != None ); } /* create form */ tree_form_args[0].value = (XtArgVal) horiz; tree_form_args[1].value = (XtArgVal) vert; #ifdef VIEWPORT_HACK file->icon.form = XtCreateWidget(file->name, #else file->icon.form = XtCreateManagedWidget(file->name, #endif formWidgetClass, fw->icon_box, tree_form_args, XtNumber(tree_form_args) ); /* create icon */ icon_toggle_args[0].value = (XtArgVal) NULL; icon_toggle_args[1].value = (XtArgVal) NULL; icon_toggle_args[2].value = (XtArgVal) icon; #ifdef ENHANCE_SELECTION icon_toggle_args[6].value = (XtArgVal) resources.highlight_pixel; #endif #ifndef ENHANCE_TRANSLATIONS icon_toggle_args[3].value = (XtArgVal) tree_translations; file->icon.toggle = XtCreateManagedWidget("icon", #else file->icon.toggle = XtCreateManagedWidget("tree_icon", #endif toggleWidgetClass, file->icon.form, icon_toggle_args, XtNumber(icon_toggle_args) ); XtVaGetValues(file->icon.toggle, XtNbackground, &back, NULL); XtVaSetValues(file->icon.toggle, XtNborder, (XtArgVal) back, NULL); /* create label */ icon_label_args[0].value = (XtArgVal) NULL; icon_label_args[1].value = (XtArgVal) file->icon.toggle; if (i == 0) dirlabel = fw->directory[1]?strrchr(fw->directory, '/')+1:fw->directory; else dirlabel = file->name; icon_label_args[2].value = (XtArgVal)dirlabel; file->icon.label = XtCreateManagedWidget("label", labelWidgetClass, file->icon.form, icon_label_args, XtNumber(icon_label_args) ); return file->icon.form; } /*----------------------------------------------------------------------------*/ /* create the icons for the directory display */ static void createTreeDisplay(FileWindowRec *fw) { int i, l; char *s = fw->directory[1]?strrchr(fw->directory, '/')+1:fw->directory; Widget vert, horiz; Pixmap line_bm; Dimension width; FileList files = fw->files; #ifdef VIEWPORT_HACK Boolean force_bars; WidgetList children; Cardinal num_children; #endif /* find width of icons */ width = longestName(fw); if (width < (l = XTextWidth(resources.icon_font, s, strlen(s)))) width = l; if (width < resources.tree_icon_width) width = resources.tree_icon_width; tree_form_args[3].value = (XtArgVal) width; icon_toggle_args[4].value = (XtArgVal) width; icon_toggle_args[5].value = (XtArgVal) resources.tree_icon_height; icon_label_args[4].value = (XtArgVal) width; /* create icon box in viewport */ #ifdef VIEWPORT_HACK XtVaGetValues(fw->viewport, XtNwidth, &width, XtNforceBars, &force_bars, NULL); /* force creation of scrollbars */ XtVaSetValues(fw->viewport, XtNallowHoriz, True, XtNforceBars, True, NULL); #else XtVaSetValues(fw->viewport, XtNallowHoriz, True, NULL); XtVaGetValues(fw->viewport, XtNwidth, &width, NULL); #endif tree_box_args[0].value = (XtArgVal) width; #ifdef VIEWPORT_HACK /* widget must be managed by viewport */ fw->icon_box = XtCreateManagedWidget("icon box", formWidgetClass, #else fw->icon_box = XtCreateWidget("icon box", formWidgetClass, #endif fw->viewport, tree_box_args, XtNumber(tree_box_args) ); #ifdef VIEWPORT_HACK XawFormDoLayout(fw->icon_box,False); #endif /* The '..' directory is not displayed, and no arrow for '.' */ files[1]->icon.form = files[1]->icon.toggle = files[1]->icon.label = NULL; files[0]->icon.arrow = NULL; /* create left arrow */ arrow_args[0].value = (XtArgVal) NULL; arrow_args[1].value = (XtArgVal) NULL; if (!permission(&files[1]->stats, P_EXECUTE)) { arrow_args[2].value = bm[NOENTRY_BM]; arrow_args[3].value = False; } else { arrow_args[2].value = bm[LARROW_BM]; arrow_args[3].value = True; } horiz = files[1]->icon.arrow = XtCreateManagedWidget("left arrow", commandWidgetClass, fw->icon_box, arrow_args, XtNumber(arrow_args) ); XtAddCallback(horiz, XtNcallback, (XtCallbackProc) mainArrowCb, fw); /* create current directory icon */ horiz = createDirIcon(fw, 0, horiz, NULL); vert = NULL; for(i = 2; i < fw->n_files; i++, horiz = files[0]->icon.form) { /* create line */ if (i == 2) if (fw->n_files == 3) line_bm = bm[LLINE_BM]; else line_bm = bm[TLINE_BM]; else if (i == fw->n_files - 1) line_bm = bm[CLINE_BM]; else line_bm = bm[FLINE_BM]; line_args[0].value = (XtArgVal) horiz; line_args[1].value = (XtArgVal) vert; line_args[2].value = (XtArgVal) line_bm; horiz = XtCreateManagedWidget("line", labelWidgetClass, fw->icon_box, line_args, XtNumber(line_args) ); /* create icon */ horiz = createDirIcon(fw, i, horiz, vert); /* create right arrow */ arrow_args[0].value = (XtArgVal) horiz; arrow_args[1].value = (XtArgVal) vert; if (!permission(&files[i]->stats, P_EXECUTE)) { arrow_args[2].value = bm[NOENTRY_BM]; arrow_args[3].value = False; } else if (files[i]->info.symlink) { arrow_args[2].value = bm[WAVY_BM]; arrow_args[3].value = True; } else { arrow_args[2].value = bm[RARROW_BM]; arrow_args[3].value = True; } vert = files[i]->icon.arrow = XtCreateManagedWidget("right arrow", commandWidgetClass, fw->icon_box, arrow_args, XtNumber(arrow_args) ); XtAddCallback(vert, XtNcallback, (XtCallbackProc) mainArrowCb, fw); } #ifdef VIEWPORT_HACK XawFormDoLayout(fw->icon_box,False); XtVaGetValues(fw->icon_box,XtNchildren,&children,XtNnumChildren,&num_children,(char*)0); XtManageChildren(children,num_children); if (!force_bars) XtVaSetValues(fw->viewport,XtNforceBars,False,(char*)0); #endif } /*----------------------------------------------------------------------------- PUBLIC FUNCTIONS -----------------------------------------------------------------------------*/ /* find the device for a directory */ int findDev(char *path) { unsigned int d; for (d = 0; d < n_devices; d++) if (prefix(devs[d].name, path)) return d; return -1; } /*---------------------------------------------------------------------------*/ /* mount a device */ Boolean mountDev(int d) { if (d == -1) return False; if (devs[d].mounted || devAction(devs[d].mount_action)) { devs[d].mounted++; return True; } return False; } /*---------------------------------------------------------------------------*/ /* unmount a device */ void umountDev(int d) { if (d == -1 || devs[d].mounted <= 0) return; if (devs[d].mounted > 1 || devAction(devs[d].umount_action)) devs[d].mounted--; } static void loadtypeicon(struct mime_filetype *type) { struct filetype_data *data; Cardinal w,h; Pixmap p; if( type == NULL ) abortXfm("Out of Memory"); if( type->data == NULL ) { data = (struct filetype_data*)XtCalloc(1,sizeof(struct filetype_data)); type->data = data; } else { data = type->data; if( !data->builtin ) return; } p = loadFileIcon(type->fulltypename,&w,&h); if( p != None ) { data->builtin = false; data->icon_bm = p; data->bm_width = w; data->bm_height = h; return; } if( data->icon_bm != None ) { /* a builtin is better than a default, * so we keep it, and remember that is * could not be loaded: */ data->builtin = false; return; } if( type->fallback != NULL ) { loadtypeicon(type->fallback); data->icon_bm = type->fallback->data->icon_bm; data->bm_width = type->fallback->data->bm_width; data->bm_height = type->fallback->data->bm_height; return; } assert("Missing fallback"==NULL); } static struct mime_filetype *findmimetype(const char *name) { struct mime_filetype *type; type = mime_get_filetype(name); loadtypeicon(type); return type; } /*---------------------------------------------------------------------------*/ /* initialise the file Windows module */ static void initFiles(void) { int r; r = mime_parse_types(resources.mimetypes_file,loadtypeicon); if( r == 0 ) r = mime_parse_types(resources.system_mimetypes_file,loadtypeicon); if( r <= -2 ) abortXfm("Out of Memory"); r = mime_parse_mailcap(resources.mailcap_file); if( r == 0 ) r = mime_parse_mailcap(resources.system_mailcap_file); if( r <= -2 ) abortXfm("Out of Memory"); if( !exists(resources.dev_file) ) readDevices(resources.system_dev_file); else readDevices(resources.dev_file); if( !exists(resources.magic_file) ) magic_parse_file(resources.system_magic_file,findmimetype, resources.maxMagicRead); else magic_parse_file(resources.magic_file,findmimetype, resources.maxMagicRead); } void initFileWindows(void) { XtAppAddActions(app_context, file_actions, XtNumber(file_actions)); #ifndef ENHANCE_TRANSLATIONS label_translations = XtParseTranslationTable(label_translations_s); tree_translations = XtParseTranslationTable(tree_translations_s); file_list_translations = XtParseTranslationTable(file_list_translations_s); label_args[9].value = (XtArgVal) label_translations; #endif label_args[3].value = (XtArgVal) resources.label_font; status_args[3].value = (XtArgVal) resources.status_font; icon_label_args[3].value = (XtArgVal) resources.icon_font; shell_args[1].value = (XtArgVal) bm_icon; shell_args[2].value = (XtArgVal) bm_iconmsk; XtRegisterGrabAction(filePopup, True, ButtonPressMask | ButtonReleaseMask, GrabModeAsync, GrabModeAsync); XtRegisterGrabAction(dirPopup, True, ButtonPressMask | ButtonReleaseMask, GrabModeAsync, GrabModeAsync); initFiles(); } /*---------------------------------------------------------------------------*/ static void fileDestroyed(UNUSED(Widget w), XtPointer client_data, UNUSED(XtPointer call_data)) { FileWindowRec *p, *fw = client_data; int d; if ((d = findDev(fw->directory)) != -1) umountDev(d); #ifdef ENHANCE_BUGFIX /* The registered event handler should be removed */ XtRemoveEventHandler(fw->shell,XtAllEvents,True, (XtEventHandler)clientMessageHandler,(XtPointer)0); #endif #ifdef ENHANCE_SELECTION /* give the selection up now (might be called * after destroying fw->shell! */ FmDisownSelection(fw); #endif if (fw == file_windows) file_windows = fw->next; else { for (p = file_windows; p != NULL && p->next != fw; p = p->next); if( p != NULL ) p->next = fw->next; } fw->shell = None; freeFileList(fw); XTFREE(fw->file_items); XTFREE(fw->folder_items); XTFREE(fw->view_items); XTFREE(fw->option_items); XTFREE(fw); chdir(user.home); } /*---------------------------------------------------------------------------*/ /* Create a file Window at the specified path, in the specified format */ static FileWindowRec *createFileWindow(const char *path, const char *title, DisplayType format) { FileWindowRec *fw; const char *shell_name; #ifdef DEBUG_MALLOC fprintf(stderr, "entering createFileWindow: %lu\n", malloc_inuse(NULL)); #endif if (chdir(path)) { sysError("Can't open folder:"); return NULL; } /* put at front of linked list */ fw = (FileWindowRec *) XtCalloc(1, sizeof(FileWindowRec)); fw->next = file_windows; file_windows = fw; if (!getwd(fw->directory)) { sysError("Can't open folder:"); return NULL; } /* set up defaults */ fw->dev = -1; fw->display_type = format; fw->sort_type = resources.default_sort_type; fw->show_dirs = True; fw->show_hidden = False; fw->dirs_first = True; fw->n_selections = 0; fw->n_bytes_selected = 0; fw->unreadable = NULL; fw->files = NULL; fw->n_files = 0; fw->n_bytes = 0; fw->update = False; /* KMR */ /* AG removed inherited do_filter attribute */ fw->do_filter = False; fw->dirFilter[0] = '\0'; fw->showInode=resources.show_inode; fw->showType=resources.show_type; fw->showLinks=resources.show_links; fw->showPermissions=resources.show_perms; fw->showOwner=resources.show_owner; fw->showGroup=resources.show_group; fw->showLength=resources.show_length; fw->showDate=resources.show_date; shell_name = "file window"; shell_args[0].value = (XtArgVal) title; fw->shell = XtCreatePopupShell(shell_name, topLevelShellWidgetClass, aw.shell, shell_args, XtNumber(shell_args) ); if (resources.init_geometry) XtVaSetValues(fw->shell, XtNgeometry, resources.init_geometry, NULL); /* create form */ fw->form = XtCreateManagedWidget("form", formWidgetClass, fw->shell, form_args, XtNumber(form_args) ); /* create button box */ fw->button_box = XtCreateManagedWidget("button box", boxWidgetClass, fw->form, button_box_args, XtNumber(button_box_args) ); /* create the menus */ fw->file_items = createFmMenu("file", "File", file_menu, XtNumber(file_menu), 4, fw->button_box, fw); fw->folder_items = createFmMenu("folder", "Folder", folder_menu, XtNumber(folder_menu), 4, fw->button_box, fw); fw->view_items = createFmMenu("view", "View", view_menu, XtNumber(view_menu), 16, fw->button_box, fw); fw->option_items=createFmMenu("options","Options",text_opts_menu,XtNumber(text_opts_menu), 16, fw->button_box, fw); XtSetMappedWhenManaged(XtParent(XtParent(fw->option_items[0])),False); fw->option_in_use=0; /* count the number of textFileLists currently * using the options menu (maybe 2; one, old, being destroyed + a * a new one. */ /* create folder label */ label_args[0].value = (XtArgVal) fw->button_box; label_args[1].value = (XtArgVal) fw->directory; #ifndef ENHANCE_TRANSLATIONS fw->label = XtCreateManagedWidget("label", labelWidgetClass, fw->form, #else fw->label = XtCreateManagedWidget("folderlabel", labelWidgetClass, fw->form, #endif label_args, XtNumber(label_args) ); /* create viewport */ viewport_args[0].value = (XtArgVal) fw->label; fw->viewport = XtCreateManagedWidget("viewport", viewportWidgetClass, fw->form, viewport_args, XtNumber(viewport_args) ); /* create status line */ status_args[0].value = (XtArgVal) fw->viewport; status_args[1].value = (XtArgVal) ""; fw->status = XtCreateManagedWidget("status", labelWidgetClass, fw->form, status_args, XtNumber(status_args) ); /* create popup menus */ fw->file_popup_items = createFloatingMenu("file popup", (const MenuItemRec *)file_popup_menu, XtNumber(file_popup_menu), 4, fw->shell, fw, &fw->file_popup_widget); fw->dir_popup_items = createFloatingMenu("dir popup", (const MenuItemRec *)dir_popup_menu, XtNumber(dir_popup_menu), 4, fw->shell, fw, &fw->dir_popup_widget); #ifdef DEBUG_MALLOC fprintf(stderr, "exiting createFileWindow: %lu\n", malloc_inuse(NULL)); #endif XtAddCallback(fw->shell, XtNdestroyCallback, fileDestroyed, fw); return fw; } /*----------------------------------------------------------------------------*/ void newFileWindow(String path, DisplayType d, Boolean by_cursor) { FileWindowRec *fw; #ifdef DEBUG_MALLOC fprintf(stderr, "entering newFileWindow: %lu\n", malloc_inuse(NULL)); #endif if (!(fw = createFileWindow(path, "File Manager", d))) return; createFileDisplay(fw); XtRealizeWidget(fw->shell); XSetIconName(XtDisplay(fw->shell), XtWindow(fw->shell), fw->directory); XStoreName(XtDisplay(fw->shell), XtWindow(fw->shell), fw->directory); setWMProps(fw->shell); XtAddEventHandler(fw->shell, (EventMask)0L, True, (XtEventHandler)clientMessageHandler, (XtPointer)NULL); if (by_cursor) popupByCursor(fw->shell, XtGrabNone); else XtPopup(fw->shell, XtGrabNone); #ifdef DEBUG_MALLOC fprintf(stderr, "exiting newFileWindow: %lu\n", malloc_inuse(NULL)); #endif } /*---------------------------------------------------------------------------*/ /* Main procedure to create the display in the viewport */ void createFileDisplay(FileWindowRec *fw) { int i; #ifdef DEBUG_MALLOC fprintf(stderr, "entering createFileDisplay: %lu\n", malloc_inuse(NULL)); #endif XtVaSetValues(fw->label, XtNlabel, (XtArgVal) fw->directory, NULL); fw->icon_box = NULL; if (fw->unreadable) { XtDestroyWidget(fw->unreadable); fw->unreadable = NULL; } if (!readDirectory(fw)) { fw->unreadable = XtVaCreateManagedWidget("label", labelWidgetClass, fw->viewport, XtNlabel, "Directory is unreadable", XtNfont, resources.label_font, NULL); return; } for (i=0; in_files; i++) fw->files[i]->selected = False; fw->n_selections = 0; fw->n_bytes_selected = 0; switch (fw->display_type) { case Tree: filterDirectory(fw, Directories); sortDirectory(fw->files+2, fw->n_files-2, fw->sort_type, False); createTreeDisplay(fw); break; case Icons: filterDirectory(fw, fw->show_dirs ? All : Files); sortDirectory(fw->files, fw->n_files, fw->sort_type, fw->dirs_first); createFileIcons(fw); break; case Text: filterDirectory(fw, fw->show_dirs ? All : Files); sortDirectory(fw->files, fw->n_files, fw->sort_type, fw->dirs_first); createTextDisplay(fw); break; } updateStatus(fw); #ifdef ENHANCE_HISTORY FmInsertHistoryPath(path_history,fw->directory); if (resources.history_max_n>0) FmChopHistoryList(path_history,resources.history_max_n); #endif XtManageChild(fw->icon_box); #ifdef DEBUG_MALLOC fprintf(stderr, "exiting createFileDisplay: %lu\n", malloc_inuse(NULL)); #endif } /*---------------------------------------------------------------------------*/ /* Update the display in the viewport */ #ifdef ENHANCE_SCROLL void updateFileDisplay(FileWindowRec *fw, Boolean keep_position) #else void updateFileDisplay(FileWindowRec *fw) #endif { int d; #ifdef ENHANCE_SCROLL Position x,y; #endif #ifdef DEBUG_MALLOC fprintf(stderr, "entering updateFileDisplay: %lu\n", malloc_inuse(NULL)); #endif zzz(); d = fw->dev; #ifdef ENHANCE_SCROLL x=y=0; if (fw->icon_box) { if (keep_position) XtVaGetValues(fw->icon_box,XtNx,&x,XtNy,&y,(char*)0); XtUnrealizeWidget(fw->icon_box); XtDestroyWidget(fw->icon_box); } #else if (fw->icon_box) XtDestroyWidget(fw->icon_box); #endif freeFileList(fw); createFileDisplay(fw); #ifdef ENHANCE_SCROLL if (keep_position) XawViewportSetCoordinates(fw->viewport,-x,-y); #endif if (d != -1) umountDev(d); XSetIconName(XtDisplay(fw->shell), XtWindow(fw->shell), fw->directory); XStoreName(XtDisplay(fw->shell), XtWindow(fw->shell), fw->directory); wakeUp(); #ifdef DEBUG_MALLOC fprintf(stderr, "exiting updateFileDisplay: %lu\n", malloc_inuse(NULL)); #endif } /*---------------------------------------------------------------------------*/ /* resort the icons in the display */ void reSortFileDisplay(FileWindowRec *fw) { #ifdef ENHANCE_BUGFIX int i; #endif #ifdef DEBUG_MALLOC fprintf(stderr, "entering resortFileDisplay: %lu\n", malloc_inuse(NULL)); #endif if (fw->unreadable) return; zzz(); switch (fw->display_type) { case Tree: #ifdef ENHANCE_SELECTION FmDisownSelection(fw); #endif XtDestroyWidget(fw->icon_box); #ifdef ENHANCE_BUGFIX /* when we set n_selections=0 we have to * deselect all the files too! (createTreeDisplay * does not check for the status of file->selected) */ for (i=0; in_files; i++) { fw->files[i]->selected=False; } #endif fw->n_selections = 0; fw->n_bytes_selected = 0; sortDirectory(fw->files+2, fw->n_files-2, fw->sort_type, False); createTreeDisplay(fw); break; case Icons: sortDirectory(fw->files, fw->n_files, fw->sort_type, fw->dirs_first); /* force a redisplay (file list, widget and selections are preserved) */ XClearArea(XtDisplay(fw->icon_box),XtWindow(fw->icon_box),0,0,0,0,True); break; case Text: sortDirectory(fw->files, fw->n_files, fw->sort_type, fw->dirs_first); /* force a redisplay */ XClearArea(XtDisplay(fw->icon_box),XtWindow(fw->icon_box),0,0,0,0,True); break; } updateStatus(fw); XtManageChild(fw->icon_box); wakeUp(); #ifdef DEBUG_MALLOC fprintf(stderr, "exiting resortFileDisplay: %lu\n", malloc_inuse(NULL)); #endif } /*---------------------------------------------------------------------------*/ void reDisplayFileWindow(FileWindowRec *fw) { #ifdef DEBUG_MALLOC fprintf(stderr, "entering redisplayFileWindow: %lu\n", malloc_inuse(NULL)); #endif if (fw->unreadable) return; zzz(); XtDestroyWidget(fw->icon_box); switch (fw->display_type) { case Tree: createTreeDisplay(fw); break; case Icons: createFileIcons(fw); break; case Text: createTextDisplay(fw); break; } updateStatus(fw); XtManageChild(fw->icon_box); wakeUp(); #ifdef DEBUG_MALLOC fprintf(stderr, "exiting redisplayFileWindow: %lu\n", malloc_inuse(NULL)); #endif } /*---------------------------------------------------------------------------- Intelligent update - only update the windows needed. Use markForUpdate() to explicitly mark a directory for update. Call intUpdate to execute all the actions. -----------------------------------------------------------------------------*/ void markForUpdate(const char *path) { FileWindowRec *fw; for (fw = file_windows; fw; fw = fw->next) if (!strcmp(path, fw->directory)) fw->update = True; } #ifdef ENHANCE_PERMS /* change of user permission or removing files which * are pointed to by symlinks in our directory are * only detected the hard way :-(, so we must stat * everything to be sure. */ static Boolean files_changed(FileWindowRec *fw) { FileList fl=fw->files; int i,statfailed; struct stat cur; if (chdir(fw->directory)) return True; for (i=0; in_files; i++) { statfailed=stat(fl[i]->name,&cur); if (fl[i]->info.symlink) { if ( (statfailed && !S_ISLNK(fl[i]->stats.st_mode)) || (!statfailed && S_ISLNK(fl[i]->stats.st_mode)) ) { return True; } if (!statfailed && (cur.st_ctime > fl[i]->stats.st_ctime)) { return True; } } else { if ( statfailed || (cur.st_ctime > fl[i]->stats.st_ctime) ) { return True; } } } return False; } #endif void intUpdate(void) { FileWindowRec *fw; struct stat cur; #ifdef ENHANCE_PERMS static int ticks=0; ticks++; #endif for (fw = file_windows; fw; fw = fw->next) { if (fw->update || stat(fw->directory, &cur) || #ifdef ENHANCE_PERMS cur.st_ctime > fw->stats.st_ctime || (ticks==resources.hard_update_ticks && files_changed(fw))) #else cur.st_ctime > fw->stats.st_ctime) #endif #ifdef ENHANCE_SCROLL updateFileDisplay(fw,True); #else updateFileDisplay(fw); #endif } for (fw = file_windows; fw; fw = fw->next) fw->update = False; #ifdef ENHANCE_PERMS if (ticks>=resources.hard_update_ticks) ticks=0; #endif } /*----------------------------------------------------------------------------- Keep menus and status line consistent with the number of selections in each window. Currently this must be called manually, which is bad news. -----------------------------------------------------------------------------*/ void updateStatus(FileWindowRec *fw) { char *line; int r, n_files, n_selections; long n_bytes, n_bytes_selected; if (fw->n_selections >= 1) { fillIn(fw->file_items[2]); fillIn(fw->file_items[3]); fillIn(fw->file_items[4]); fillIn(fw->file_items[6]); fillIn(fw->file_items[10]); #ifdef ENHANCE_SELECTION fillIn(fw->file_items[11]); #endif }else { grayOut(fw->file_items[2]); grayOut(fw->file_items[3]); grayOut(fw->file_items[4]); grayOut(fw->file_items[6]); grayOut(fw->file_items[10]); #ifdef ENHANCE_SELECTION grayOut(fw->file_items[11]); #endif } if (fw->display_type == Tree) { /* incremented the view_item */ grayOut(fw->view_items[10]); /* numbers by 1 since I added */ grayOut(fw->view_items[11]); /* a new menu pick in slot 7 */ noTick(fw->view_items[10]); /* only affects items 8 and above */ noTick(fw->view_items[11]); /* KMR */ } else { fillIn(fw->view_items[10]); if (fw->show_dirs) { fillIn(fw->view_items[11]); noTick(fw->view_items[10]); if (fw->dirs_first) noTick(fw->view_items[11]); else tick(fw->view_items[11]); } else { grayOut(fw->view_items[11]); tick(fw->view_items[10]); noTick(fw->view_items[11]); } } if (fw->show_hidden) tick(fw->view_items[12]); else noTick(fw->view_items[12]); noTick(fw->view_items[0]); noTick(fw->view_items[1]); noTick(fw->view_items[2]); noTick(fw->view_items[4]); noTick(fw->view_items[5]); noTick(fw->view_items[6]); switch (fw->display_type) { case Tree: tick(fw->view_items[0]); break; case Icons: tick(fw->view_items[1]); break; case Text: tick(fw->view_items[2]); break; } switch (fw->sort_type) { case SortByName: tick(fw->view_items[4]); break; case SortBySize: tick(fw->view_items[5]); break; case SortByMTime: tick(fw->view_items[6]); break; } /* update the status line */ n_bytes = fw->n_bytes; n_files = fw->n_files; n_bytes_selected = fw->n_bytes_selected; n_selections = fw->n_selections; if (fw->display_type == Tree) { n_bytes -= fw->files[1]->stats.st_size; n_files--; } if (n_selections > 0) r = asprintf(&line, "%ld byte%s in %d item%s, %ld byte%s in %d selected item%s%s%s%s", n_bytes, n_bytes==1?"":"s", n_files, n_files==1?"":"s", n_bytes_selected, n_bytes_selected==1?"":"s", n_selections, n_selections==1?"":"s", fw->do_filter?" [":"", fw->do_filter?fw->dirFilter:"", fw->do_filter?"]":""); else r = asprintf(&line, "%ld byte%s in %d item%s%s%s%s", n_bytes, n_bytes==1?"":"s", n_files, n_files==1?"":"s", fw->do_filter?" [":"", fw->do_filter?fw->dirFilter:"", fw->do_filter?"]":""); if( r < 0 || line == NULL ) XtVaSetValues(fw->status, XtNlabel, (XtArgVal) "Error", NULL); else { XtVaSetValues(fw->status, XtNlabel, (XtArgVal) line, NULL); free(line); } } /*---------------------------------------------------------------------------- Update a the tick marks of a text options menu and the resources of a text file List to the settings of a FileWindowRec -----------------------------------------------------------------------------*/ void updateTxtOpts(FileWindowRec *fw) { Cardinal i; WidgetList menu_items; static Arg args[]={ { XtNshowInode, (XtArgVal) 0}, { XtNshowType, (XtArgVal) 0}, { XtNshowPermissions, (XtArgVal) 0}, { XtNshowLinks, (XtArgVal) 0}, { XtNshowOwner, (XtArgVal) 0}, { XtNshowGroup, (XtArgVal) 0}, { XtNshowLength, (XtArgVal) 0}, { XtNshowDate, (XtArgVal) 0}, }; if (!XtIsSubclass(fw->icon_box,textFileListWidgetClass)) { XtAppWarning(app_context,"updateTxtOpts(): not a textFileList widget"); return; } /* retrieve the menu items */ menu_items=fw->option_items; i=0; args[i].value=(XtArgVal)fw->showInode; i++; args[i].value=(XtArgVal)fw->showType; i++; args[i].value=(XtArgVal)fw->showPermissions; i++; args[i].value=(XtArgVal)fw->showLinks; i++; args[i].value=(XtArgVal)fw->showOwner; i++; args[i].value=(XtArgVal)fw->showGroup; i++; args[i].value=(XtArgVal)fw->showLength; i++; args[i].value=(XtArgVal)fw->showDate; i++; for (i=0; iicon_box,args,XtNumber(args)); } xfm-1.5.4/src/FmPopup.c0000644000175000017500000006563010744135466011601 00000000000000/* * This file is part of X-File Manager XFM * ---------------------------------------------------------------------- FmPopup.c (c) Simon Marlow 1990-92 (c) Albert Graef 1994 modified 1-29-95 by rodgers@lvs-emh.lvs.loral.com (Kevin M. Rodgers) to add filtering of icon/text directory displays by a filename filter. modified 7-1997 by strauman@sun6hft.ee.tu-berlin.de to add different enhancements (see README-1.4). modified 2004,2005,2006,2007 by Bernhard R. Link (see Changelog) Routines for creating and managing popup forms and dialog boxes * ---------------------------------------------------------------------- * 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 of the License, 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include #include #include #include #include #include #include #include "global.h" #include "FileList.h" #include "Fm.h" #ifdef ENHANCE_HISTORY #include "FmHistory.h" #endif #ifdef ENHANCE_SELECTION #include "FmSelection.h" #endif /*--------------------------------------------------------------------------- PRIVATE FUNCTIONS ---------------------------------------------------------------------------*/ static char *dir_prefix(const char *filename) { const char *p; char *r; p = strrchr(filename, '/'); if (p == NULL) p = filename; else if (p == filename) p++; r = strndup(filename, p-filename); if( r == NULL ) abortXfm("Out of memory!\n"); return r; } static PDCallbackProc mkdirOkCb, mkdirCancelCb, createFileOkCb, createFileCancelCb, goToOkCb, goToCancelCb, moveOkCb, moveCancelCb, copyOkCb, copyCancelCb, linkOkCb, linkCancelCb, selectAddCb, selectRemoveCb, selectCancelCb, selectReplaceCb, filterOkCb, filterClearCb, filterCancelCb; static void mkdirOkCb(UNUSED(Widget w), struct PopupDialog *p, UNUSED(void *call_data)) { char *dir = dyn_fnexpand(getPopupAnswer(p,0)); FileWindowRec *fw = p->data; popdownPopup(p); if (chdir(fw->directory)) sysError("System error:"); else if (mkdir(dir, user.umask & 0777)) { sysErrorFmt("Error creating folder %s:", dir); } else intUpdate(); XtFree(dir); freeze = False; } /*---------------------------------------------------------------------------*/ static void mkdirCancelCb(UNUSED(Widget w), struct PopupDialog *p, UNUSED(void *call_data)) { popdownPopup(p); freeze = False; } /*---------------------------------------------------------------------------*/ static void createFileOkCb(UNUSED(Widget w), struct PopupDialog *p, UNUSED(void *call_data)) { char *fn = dyn_fnexpand(getPopupAnswer(p,0)); FileWindowRec *fw = p->data; popdownPopup(p); if (chdir(fw->directory)) sysError("System error:"); else if (create(fn, user.umask & 0666)) { sysErrorFmt("Error creating file %s:", fn); } else intUpdate(); XtFree(fn); freeze = False; } /*---------------------------------------------------------------------------*/ static void createFileCancelCb(UNUSED(Widget w), struct PopupDialog *p, UNUSED(void *call_data)) { popdownPopup(p); freeze = False; } /*---------------------------------------------------------------------------*/ static void goToOkCb(UNUSED(Widget w), struct PopupDialog *p, UNUSED(void *call_data)) { char *dir = dyn_fnexpand(getPopupAnswer(p,0)); FileWindowRec *fw = p->data; char path[MAXPATHLEN]; #ifdef ENHANCE_SCROLL Boolean keep_position=True; #endif popdownPopup(p); #ifdef ENHANCE_BUGFIX /* if it's impossible to chdir(popups.fw->directory) * it still might be possible to chdir(popups.goTo_s) ! * eg. if the actual directory was deleted, an we want to * change to another one. */ // TODO: this breaks chdir to relative directories, doesn't it? if (chdir(dir)) { sysErrorFmt("Can't open folder %s:", dir); if (chdir(fw->directory)) { sysErrorFmt("Can't open folder %s:", fw->directory); } #else if (chdir(popups.fw->directory) || chdir(dir)) { sysErrorFmt("Can't open folder %s:", dir); #endif } else if (!getwd(path)) sysError("System error:"); else { #ifdef ENHANCE_SCROLL if (!(keep_position= (!strcmp(fw->directory,path)))) #endif strcpy(fw->directory, path); #ifdef ENHANCE_SCROLL updateFileDisplay(fw,keep_position); #else updateFileDisplay(fw); #endif } XtFree(dir); freeze = False; } /*---------------------------------------------------------------------------*/ static void goToCancelCb(UNUSED(Widget w), struct PopupDialog *p, UNUSED(void *call_data)) { popdownPopup(p); freeze = False; } /*---------------------------------------------------------------------------*/ static void renameOkCb(UNUSED(Widget w), struct PopupDialog *p, UNUSED(void *call_data)) { FileWindowRec *fw = p->data; struct stat stats; int i; char *from = NULL, *to; popdownPopup(p); to = dyn_fnexpand(getPopupAnswer(p,0)); if (chdir(fw->directory)) sysError("System error:"); else { struct stat stats1; for (i = 0; i < fw->n_files; i++) if (fw->files[i]->selected) { from = fw->files[i]->name; break; } if (from == NULL ) goto out; if (!strcmp(from, ".") || !strcmp(from, "..")) { error("Cannot rename . or ..", ""); goto out; } else if (!lstat(to, &stats) && !lstat(from, &stats1) && stats.st_ino == stats1.st_ino) { error("Rename:", "Source and destination are identical"); goto out; } if (exists(to) && resources.confirm_overwrite) { if (!fwConfirm(fw, "Rename: file already exists!", to, "Overwrite?", NULL)) goto out; } if (rmove(from, to)) { sysErrorFmt("Error renaming %s:", from); } else { char *todir = dir_prefix(to); markForUpdate(fw->directory); markForUpdate(todir); XTFREE(todir); intUpdate(); } } out: XTFREE(to); freeze = False; } /*---------------------------------------------------------------------------*/ static void renameCancelCb(UNUSED(Widget w), struct PopupDialog *p, UNUSED(void *call_data)) { popdownPopup(p); freeze = False; } /*---------------------------------------------------------------------------*/ static void moveOkCb(UNUSED(Widget w), struct PopupDialog *p, UNUSED(void *call_data)) { char *move = getPopupAnswer(p,0); FileWindowRec *fw = p->data; struct stat stats; int i, n_moved = 0; const char *from = NULL; char *destination; Boolean aborted; popdownPopup(p); destination = dyn_fnexpand(move); if (chdir(fw->directory)) sysError("System error:"); else { /* if target exists and is a directory, move the source into that directory */ if (!stat(destination, &stats) && S_ISDIR(stats.st_mode)) { char *to; if (cmpCanonical(fw->directory, destination)) { error("Move:", "Source and destination are identical"); goto out; } for (i=0; i < fw->n_files; i++) if (fw->files[i]->selected) { if (!strcmp(fw->files[i]->name, ".") || !strcmp(fw->files[i]->name, "..")) { error("Cannot move . or ..", ""); continue; } from = fw->files[i]->name; to = dirConcat(destination, fw->files[i]->name); if (exists(to) && resources.confirm_overwrite) { if (!fwConfirm(fw, "Move: file already exists at destination", from, "Overwrite?", &aborted)) { XTFREE(to); if (aborted) break; else continue; } } if (rmove(from, to)) { sysErrorFmt("Error moving %s:", from); } else n_moved++; XTFREE(to); } if (n_moved) { markForUpdate(fw->directory); markForUpdate(destination); intUpdate(); } } /* otherwise only a single file may be selected; move it to the target file */ else if (fw->n_selections > 1) { error("Move: target for multiple files", "must be a folder"); goto out; } else { struct stat stats1; for (i = 0; i < fw->n_files; i++) if (fw->files[i]->selected) { from = fw->files[i]->name; break; } assert(from != NULL); if (!strcmp(from, ".") || !strcmp(from, "..")) { error("Cannot move . or ..", ""); goto out; } else if (!lstat(destination, &stats) && !lstat(from, &stats1) && stats.st_ino == stats1.st_ino) { error("Move:", "Source and destination are identical"); goto out; } if (exists(destination) && resources.confirm_overwrite) { if (!fwConfirm(fw, "Move: file already exists", destination, "Overwrite?", NULL)) goto out; } if (rmove(from, destination)) { sysErrorFmt("Error moving %s:", from); } else { char *todir = dir_prefix(destination); markForUpdate(todir); XTFREE(todir); markForUpdate(fw->directory); intUpdate(); } } } out: XTFREE(destination); freeze = False; } /*---------------------------------------------------------------------------*/ static void moveCancelCb(UNUSED(Widget w), struct PopupDialog *p, UNUSED(void *call_data)) { popdownPopup(p); freeze = False; } /*---------------------------------------------------------------------------*/ static void copyOkCb(UNUSED(Widget w), struct PopupDialog *p, UNUSED(void *call_data)) { char *copy = getPopupAnswer(p,0); FileWindowRec *fw = p->data; struct stat stats; int i, n_copied = 0; const char *from = NULL; char *destination; Boolean aborted; popdownPopup(p); destination = dyn_fnexpand(copy); if (chdir(fw->directory)) sysError("System error:"); else { /* if target exists and is a directory, copy the source into that directory */ if (!stat(destination, &stats) && S_ISDIR(stats.st_mode)) { char *to; if (cmpCanonical(fw->directory, destination)) { error("Copy:", "Source and destination are identical"); goto out; } for (i=0; i < fw->n_files; i++) if (fw->files[i]->selected) { if (!strcmp(fw->files[i]->name, ".") || !strcmp(fw->files[i]->name, "..")) { error("Cannot copy . or ..", ""); continue; } from = fw->files[i]->name; to = dirConcat(destination, from); if (exists(to) && resources.confirm_overwrite) { if (!fwConfirm(fw, "Copy: file already exists at destination", from, "Overwrite?", &aborted)) { XTFREE(to); if (aborted) break; else continue; } } if (rcopy(from,to)) { sysErrorFmt("Error copying %s:", from); } else n_copied++; XTFREE(to); } if (n_copied) { markForUpdate(destination); intUpdate(); } } /* otherwise only a single file may be selected; copy it to the target file */ else if (fw->n_selections > 1) { error("Copy: target for multiple files", "must be a folder"); goto out; } else { struct stat stats1; for (i = 0; i < fw->n_files; i++) if (fw->files[i]->selected) { from = fw->files[i]->name; break; } if (!strcmp(from, ".") || !strcmp(from, "..")) { error("Cannot copy . or ..", ""); goto out; } else if (!lstat(destination, &stats) && !lstat(from, &stats1) && stats.st_ino == stats1.st_ino) { error("Copy:", "Source and destination are identical"); goto out; } if (exists(destination) && resources.confirm_overwrite) { if (!fwConfirm(fw, "Copy: file already exists", destination, "Overwrite?", NULL)) goto out; } if (rcopy(from, destination)) { sysErrorFmt("Error copying %s:", from); } else { char *todir = dir_prefix(destination); markForUpdate(todir); XTFREE(todir); intUpdate(); } } } out: XTFREE(destination); freeze = False; } /*---------------------------------------------------------------------------*/ static void copyCancelCb(UNUSED(Widget w), struct PopupDialog *p, UNUSED(void *call_data)) { popdownPopup(p); freeze = False; } /*---------------------------------------------------------------------------*/ static void linkOkCb(UNUSED(Widget w), struct PopupDialog *p, UNUSED(void *call_data)) { FileWindowRec *fw = p->data; struct stat stats; int i, n_linked = 0; char *destination; Boolean aborted; popdownPopup(p); destination = dyn_fnexpand(getPopupAnswer(p,0)); if (chdir(fw->directory)) sysError("System error:"); else { /* if target exists and is a directory, link the source into that directory */ if (!stat(destination, &stats) && S_ISDIR(stats.st_mode)) { char *to; if (cmpCanonical(fw->directory, destination)) { error("Link:", "Source and destination are identical"); goto out; } for (i=0; i < fw->n_files; i++) if (fw->files[i]->selected) { const char *from = fw->files[i]->name; char *name = dirConcat(fw->directory, from); to = dirConcat(destination, from); if (exists(to) && resources.confirm_overwrite) { if (!fwConfirm(fw, "Link: file already exists at destination", from, "Overwrite?", &aborted)) { XTFREE(to); if (aborted) break; else continue; } } if (symlink(name,to)) { sysErrorFmt("Error linking %s:", from); } else n_linked++; XTFREE(to); } if (n_linked) { markForUpdate(destination); intUpdate(); } } /* otherwise only a single file may be selected; link it to the target file */ else if (fw->n_selections > 1) { error("Link: target for multiple files", "must be a folder"); goto out; } else { struct stat stats1; const char *from = NULL; char *name; for (i = 0; i < fw->n_files; i++) if (fw->files[i]->selected) { from = fw->files[i]->name; break; } assert(from != NULL); name = dirConcat(fw->directory, from); if (!lstat(destination, &stats) && !lstat(from, &stats1) && stats.st_ino == stats1.st_ino) { error("Link:", "Source and destination are identical"); XTFREE(name); goto out; } if (exists(destination) && resources.confirm_overwrite) { if (!fwConfirm(fw, "Link: file already exists", destination, "Overwrite?", NULL)) { XTFREE(name); goto out; } } if (symlink(name, destination)) { sysErrorFmt("Error linking %s:", from); } else { char *todir = dir_prefix(destination); markForUpdate(todir); XTFREE(destination); intUpdate(); } XTFREE(name); } } out: XTFREE(destination); freeze = False; } /*---------------------------------------------------------------------------*/ static void linkCancelCb(UNUSED(Widget w), struct PopupDialog *p, UNUSED(void *call_data)) { popdownPopup(p); freeze = False; } /*---------------------------------------------------------------------------*/ /* The following variant of fnmatch matches the . and .. dirs only if specified explicitly. */ #define fnmatchnodot(pattern,fn) (strcmp(fn,".")&&strcmp(fn,"..")? \ fnmatch(pattern,fn):!strcmp(pattern,fn)) static void selectReplaceCb(UNUSED(Widget w), struct PopupDialog *p, UNUSED(void *call_data)) { FileWindowRec *fw = p->data; char *select_s = getPopupAnswer(p,0); int i; Pixel pix; Boolean new_val; int onewid=XtIsSubclass(fw->icon_box,fileListWidgetClass); popdownPopup(p); fw->n_selections = 0; fw->n_bytes_selected = 0; for (i=0; in_files; i++) { if (onewid || fw->files[i]->icon.toggle) { if (fnmatchnodot(select_s, fw->files[i]->name)) { new_val = True; fw->n_selections++; fw->n_bytes_selected += fw->files[i]->stats.st_size; } else new_val = False; if (new_val!= fw->files[i]->selected) { fw->files[i]->selected = new_val; if (!onewid) { XtVaGetValues(fw->files[i]->icon.toggle, fw->files[i]->selected?XtNforeground:XtNbackground, &pix, NULL); XtVaSetValues(fw->files[i]->icon.toggle, XtNborder, (XtArgVal) pix, NULL); } else FileListRefreshItem((FileListWidget)fw->icon_box,i); } } } updateStatus(fw); freeze = False; #ifdef ENHANCE_SELECTION FmOwnSelection(fw,CurrentTime); #endif } /*---------------------------------------------------------------------------*/ static void selectAddCb(UNUSED(Widget w), struct PopupDialog *p, UNUSED(void *call_data)) { char *select_s = getPopupAnswer(p,0); FileWindowRec *fw = p->data; int i; Pixel pix; int onewid=XtIsSubclass(fw->icon_box,fileListWidgetClass); popdownPopup(p); for(i=0; in_files; i++) if (onewid || fw->files[i]->icon.toggle) { if (!fw->files[i]->selected && (fnmatchnodot(select_s, fw->files[i]->name))) { fw->files[i]->selected = True; fw->n_selections++; fw->n_bytes_selected += fw->files[i]->stats.st_size; if (!onewid) { XtVaGetValues(fw->files[i]->icon.toggle, XtNforeground, &pix, NULL); XtVaSetValues(fw->files[i]->icon.toggle, XtNborder, (XtArgVal) pix, NULL); } else FileListRefreshItem((FileListWidget)fw->icon_box,i); } } updateStatus(fw); freeze = False; #ifdef ENHANCE_SELECTION FmOwnSelection(fw,CurrentTime); #endif } /*---------------------------------------------------------------------------*/ static void selectRemoveCb(UNUSED(Widget w), struct PopupDialog *p, UNUSED(void *call_data)) { char *select_s = getPopupAnswer(p,0); FileWindowRec *fw = p->data; int i; Pixel pix; int onewid=XtIsSubclass(fw->icon_box,fileListWidgetClass); popdownPopup(p); for(i=0; in_files; i++) if (onewid || fw->files[i]->icon.toggle) { if (fw->files[i]->selected && (fnmatch(select_s, fw->files[i]->name))) { fw->files[i]->selected = False; fw->n_selections--; fw->n_bytes_selected -= fw->files[i]->stats.st_size; if (!onewid) { XtVaGetValues(fw->files[i]->icon.toggle, XtNbackground, &pix, NULL); XtVaSetValues(fw->files[i]->icon.toggle, XtNborder, (XtArgVal) pix, NULL); } else FileListRefreshItem((FileListWidget)fw->icon_box,i); } } updateStatus(fw); freeze = False; #ifdef ENHANCE_SELECTION FmOwnSelection(fw,CurrentTime); #endif } /*---------------------------------------------------------------------------*/ static void selectCancelCb(UNUSED(Widget w), struct PopupDialog *p, UNUSED(void *call_data)) { popdownPopup(p); freeze = False; } /*---------------------------------------------------------------------------*/ /* KMR */ static void filterCancelCb(UNUSED(Widget w), struct PopupDialog *p, UNUSED(void *call_data)) { popdownPopup(p); freeze = False; } /*---------------------------------------------------------------------------*/ /* KMR */ static void filterOkCb(UNUSED(Widget w), struct PopupDialog *p, UNUSED(void *call_data)) { char *filter_s = getPopupAnswer(p,0); FileWindowRec *fw = p->data; popdownPopup(p); fw->do_filter = True; strcpy(fw->dirFilter,filter_s); #ifdef ENHANCE_SCROLL updateFileDisplay(fw,True); #else updateFileDisplay(fw); #endif freeze = False; } /*---------------------------------------------------------------------------*/ /* KMR */ static void filterClearCb(UNUSED(Widget w), struct PopupDialog *p, UNUSED(void *call_data)) { FileWindowRec *fw = p->data; popdownPopup(p); fw->do_filter = False; fw->dirFilter[0] = '\0'; #ifdef ENHANCE_SCROLL updateFileDisplay(fw,True); #else updateFileDisplay(fw); #endif freeze = False; } /*--------------------------------------------------------------------------- Button information for popups ---------------------------------------------------------------------------*/ static const PDButtonRec mkdir_buttons[] = { { "ok", "Ok", mkdirOkCb }, { "cancel", "Cancel", mkdirCancelCb } }; static const PDButtonRec createFile_buttons[] = { { "ok", "Ok", createFileOkCb }, { "cancel", "Cancel", createFileCancelCb } }; static const PDButtonRec goTo_buttons[] = { { "ok", "Ok", goToOkCb }, { "cancel", "Cancel", goToCancelCb } }; static const PDButtonRec rename_buttons[] = { { "ok", "Ok", renameOkCb }, { "cancel", "Cancel", renameCancelCb } }; static const PDButtonRec move_buttons[] = { { "ok", "Ok", moveOkCb }, { "cancel", "Cancel", moveCancelCb } }; static const PDButtonRec copy_buttons[] = { { "ok", "Ok", copyOkCb }, { "cancel", "Cancel", copyCancelCb } }; static const PDButtonRec link_buttons[] = { { "ok", "Ok", linkOkCb }, { "cancel", "Cancel", linkCancelCb } }; static const PDButtonRec select_buttons[] = { { "replace", "Replace", selectReplaceCb }, { "add", "Add", selectAddCb }, { "remove", "Remove", selectRemoveCb }, { "cancel", "Cancel", selectCancelCb } }; static const PDButtonRec filter_buttons[] = { /* KMR */ { "ok", "Ok", filterOkCb }, { "clear", "Clear", filterClearCb }, { "cancel", "Cancel", filterCancelCb } }; /*--------------------------------------------------------------------------- Question information for popups ---------------------------------------------------------------------------*/ static const QuestionRec mkdir_questions[] = { { "Create folder:", MAXPATHLEN } }; static const QuestionRec createFile_questions[] = { { "Create file:", MAXPATHLEN } }; static const QuestionRec goTo_questions[] = { { "Go to folder:", MAXPATHLEN } }; static const QuestionRec rename_questions[] = { { "Rename to:", MAXPATHLEN } }; static const QuestionRec move_questions[] = { { "Move to:", MAXPATHLEN } }; static const QuestionRec copy_questions[] = { { "Copy to:", MAXPATHLEN } }; static const QuestionRec link_questions[] = { { "Link to:", MAXPATHLEN } }; static const QuestionRec select_questions[] = { { "Filename pattern:", MAXPATHLEN } }; static const QuestionRec filter_questions[] = { /* KMR */ { "Filename pattern:", MAXPATHLEN } }; /*--------------------------------------------------------------------------- PUBLIC FUNCTIONS ---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/ void selectPopup(UNUSED(Widget w), FileWindowRec *fw, UNUSED(void *call_data)) { if (fw->select == NULL) createPopupQuestions(&fw->select, fw->shell, "select", "Select", bm[FILES_BM], select_questions, XtNumber(select_questions), select_buttons, XtNumber(select_buttons), XtNumber(select_buttons)-1); reloadPopupData(fw->select); freeze = True; popupPopupByCursor(fw->select, fw); } /*---------------------------------------------------------------------------*/ /* KMR */ void filterPopup(UNUSED(Widget w), FileWindowRec *fw, UNUSED(void *call_data)) { /* Filter */ /* KMR */ if (fw->filter == NULL) createPopupQuestions(&fw->filter, fw->shell, "filter", "Filter", bm[FILES_BM], filter_questions, XtNumber(filter_questions), filter_buttons, XtNumber(filter_buttons), XtNumber(filter_buttons)-1); setPopupData(fw->filter, 0, fw->dirFilter); freeze = True; popupPopupByCursor(fw->filter, fw); } /*---------------------------------------------------------------------------*/ void mkdirPopup(UNUSED(Widget w), FileWindowRec *fw, UNUSED(void *call_data)) { if (fw->mkdir == NULL) createPopupQuestions(&fw->mkdir, fw->shell, "mkdir", "New Folder", bm[DIR_BM], mkdir_questions, XtNumber(mkdir_questions), mkdir_buttons, XtNumber(mkdir_buttons), XtNumber(mkdir_buttons)-1); reloadPopupData(fw->mkdir); freeze = True; popupPopupByCursor(fw->mkdir, fw); } /*---------------------------------------------------------------------------*/ void createFilePopup(UNUSED(Widget w), FileWindowRec *fw, UNUSED(void *call_data)) { if (fw->createFile == NULL) createPopupQuestions(&fw->createFile, fw->shell, "create", "New File", bm[FILE_BM], createFile_questions, XtNumber(createFile_questions), createFile_buttons, XtNumber(createFile_buttons), XtNumber(createFile_buttons)-1); reloadPopupData(fw->createFile); freeze = True; popupPopupByCursor(fw->createFile, fw); } /*---------------------------------------------------------------------------*/ void goToPopup(UNUSED(Widget w), FileWindowRec *fw, UNUSED(void *call_data)) { if (fw->goTo == NULL) createPopupQuestions(&fw->goTo, fw->shell, "goto", "Go To", bm[DIR_BM], goTo_questions, XtNumber(goTo_questions), goTo_buttons, XtNumber(goTo_buttons), XtNumber(goTo_buttons)-1); reloadPopupData(fw->goTo); freeze = True; popupPopupByCursor(fw->goTo, fw); } /*---------------------------------------------------------------------------*/ void renamePopup(UNUSED(Widget w), FileWindowRec *fw, UNUSED(void *call_data)) { int i; assert( fw != NULL ); if (!fw->n_selections) return; if (fw->rename == NULL) createPopupQuestions(&fw->rename, fw->shell, "rename", "Rename", bm[FILE_BM], rename_questions, XtNumber(rename_questions), rename_buttons, XtNumber(rename_buttons), XtNumber(rename_buttons)-1); for (i = 0; i < fw->n_files; i++) if (fw->files[i]->selected) { setPopupData(fw->rename, 0, fw->files[i]->name); break; } freeze = True; popupPopupByCursor(fw->rename, fw); } /*---------------------------------------------------------------------------*/ void movePopup(UNUSED(Widget w), FileWindowRec *fw, UNUSED(void *call_data)) { assert( fw != NULL ); if (!fw->n_selections) return; if (fw->move == NULL) createPopupQuestions(&fw->move, fw->shell, "move", "Move", bm[FILES_BM], move_questions, XtNumber(move_questions), move_buttons, XtNumber(move_buttons), XtNumber(move_buttons)-1); reloadPopupData(fw->move); freeze = True; popupPopupByCursor(fw->move, fw); } /*---------------------------------------------------------------------------*/ void copyPopup(UNUSED(Widget w), FileWindowRec *fw, UNUSED(void *call_data)) { assert( fw != NULL ); if (!fw->n_selections) return; if (fw->copy == NULL) createPopupQuestions(&fw->copy, fw->shell, "copy", "Copy", bm[FILES_BM], copy_questions, XtNumber(copy_questions), copy_buttons, XtNumber(copy_buttons), XtNumber(copy_buttons)-1); reloadPopupData(fw->copy); freeze = True; popupPopupByCursor(fw->copy, fw); } /*---------------------------------------------------------------------------*/ void linkPopup(UNUSED(Widget w), FileWindowRec *fw, UNUSED(void *call_data)) { assert( fw != NULL ); if (!fw->n_selections) return; if (fw->link == NULL) createPopupQuestions(&fw->link, fw->shell, "link", "Link", bm[SYMLNK_BM], link_questions, XtNumber(link_questions), link_buttons, XtNumber(link_buttons), XtNumber(link_buttons)-1); reloadPopupData(fw->link); freeze = True; popupPopupByCursor(fw->link, fw); } xfm-1.5.4/src/TextField.c0000644000175000017500000022444010735462747012104 00000000000000/* * This file is part of X-File Manager XFM * ---------------------------------------------------------------------- * The TextField Widget * Copyright (C) 1997 by Till Straumann * modified 2004,2005,2006,2007 by Bernhard R. Link (see Changelog) * ---------------------------------------------------------------------- * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Library Public License as published by * the Free Software Foundation; either version 2 of the License, 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 Library Public License for more details. * You should have received a copy of the GNU General Library Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include #include #include #include #include #include #include #define SHADOW_WIDTH(tfw) ((tfw)->threeD.shadow_width) /* convert to int to allow for negative labelSeps */ #define LABEL_WIDTH(tfw) ((tfw)->textField.label ? (Dimension)(\ (int)(tfw)->textField.internalWidth + \ (int)(tfw)->textField.labelWidth + \ (tfw)->textField.labelSep) : 0) #define MAX_ASCENT(tfw) (((tfw)->textField.label && \ (tfw)->textField.lblFont->max_bounds.ascent > (tfw)->textField.font->max_bounds.ascent) ? \ (tfw)->textField.lblFont->max_bounds.ascent : (tfw)->textField.font->max_bounds.ascent) #define MAX_FONTH(tfw) (((tfw)->textField.label && \ ((tfw)->textField.lblFont->max_bounds.ascent + (tfw)->textField.lblFont->max_bounds.descent) > \ ((tfw)->textField.font->max_bounds.ascent + (tfw)->textField.font->max_bounds.descent) ) ? \ ((tfw)->textField.lblFont->max_bounds.ascent + (tfw)->textField.lblFont->max_bounds.descent) : \ ((tfw)->textField.font->max_bounds.ascent + (tfw)->textField.font->max_bounds.descent) ) #include #include #include #include #ifdef TEXT_COMPAT #include /* XmuCopyISOLatin1Lowered() */ #endif #include "global.h" #include "TextFieldP.h" #include "FmErrors.h" /* Macro definitions */ #define SetPoint(arg,a1,a2) ((void)((arg).x=(short)(a1), (arg).y=(short)(a2))) #define TF (tfw->textField) #ifdef TEXT_COMPAT #define RESIZE(w) (((w)->textField).resize==XawtextResizeWidth || \ ((w)->textField).resize==XawtextResizeBoth) #else #define RESIZE(w) ((w)->textField.resize.b) #endif /* is this Dimension probably negative ? */ #define NEGDIMENSION(x) (x & (1<< (8*sizeof(Dimension)-1))) #define WIDTH 4 #define CURSOR_WIDTH_DIV2 3 #define CURSOR_ASCENT 3 #define CURSOR_HEIGHT 8 #define PRIMARY_BIT 1 #define SECONDARY_BIT 2 #define CLIPBOARD_BIT 4 #define DEF_BUFFER_SIZE 15 /* global variables */ #ifndef SEPARATE_STRINGS /* include the automatically generated strings of resource names */ #ifdef __VMS #include "TextField_res_c." #include "TextField_class_c." #include "TextField_type_c." #else #include "TextField_res_c" #include "TextField_class_c" #include "TextField_type_c" #endif /* __VMS */ #endif /* The memory for '*value' allocated in 'ConvertSelection()' * must be freed in 'ClipboardXferDone()', for we own it * if a 'done_proc' is registered */ static String clipboardValue; /* resources */ static XtResource resources[] = { #define offset(field) XtOffsetOf(TextFieldRec, textField.field) /* {name, class, type, size, offset, default_type, default_addr}, */ { XtNfont, XtCFont, XtRFontStruct, sizeof(XFontStruct*), offset(font), XtRString, (XtPointer) XtDefaultFont}, { XtNforeground, XtCForeground, XtRPixel, sizeof(Pixel), offset(foreground), XtRString, (XtPointer) XtDefaultForeground}, { XtNinsensitiveForeground, XtCInsensitiveForeground, XtRPixel, sizeof(Pixel), offset(insensitive_foreground), XtRString,(XtPointer) XtDefaultForeground}, { XtNinternalHeight, XtCHeight, XtRDimension, sizeof(Dimension), offset(internalHeight), XtRImmediate, (XtPointer)2}, { XtNinternalWidth, XtCWidth, XtRDimension, sizeof(Dimension), offset(internalWidth), XtRImmediate, (XtPointer)2}, { XtNinsertPosition, XtCTextPosition, XtRInt, sizeof(TfTextPosition), offset(text_cursor), XtRImmediate, (XtPointer)0}, #ifdef TEXT_COMPAT { XtNresize, XtCResize, XtRResizeMode, sizeof(XawTextResizeMode), offset(resize), XtRImmediate, (XtPointer)XawtextResizeNever}, #else { XtNresize, XtCResize, XtRBoolean, sizeof(Boolean), offset(resize), XtRImmediate, (XtPointer)False}, #endif { XtNstring, XtCLabel, XtRString, sizeof(String), offset(string), XtRString, ""}, { XtNuseStringInPlace, XtCUseStringInPlace, XtRBoolean, sizeof(Boolean), offset(use_string_in_place), XtRImmediate, (XtPointer)False}, { XtNlength, XtCLength, XtRCardinal, sizeof(Cardinal), offset(maxlen), XtRImmediate, (XtPointer) 0}, { XtNjustify, XtCJustify, XtRJustify, sizeof(XtJustify), offset(justify), XtRImmediate, (XtPointer)XtJustifyLeft}, { XtNreadOnly, XtCReadOnly, XtRBoolean, sizeof(Boolean), offset(readonly), XtRImmediate, (XtPointer)False}, { XtNscrollChars, XtCScrollChars, XtRShort, sizeof(short), offset(scroll_chars), XtRImmediate, (XtPointer)4}, { XtNcallback, XtCCallback, XtRCallback, sizeof(XtPointer), offset(notify_cbl), XtRCallback, (XtPointer)NULL}, { XtNmodifiedByUser, XtCModifiedByUser, XtRBoolean, sizeof(Boolean), offset(modified_by_user), XtRImmediate, (XtPointer)False}, { XtNmodifiedCallback, XtCCallback, XtRCallback, sizeof(XtPointer), offset(modified_cbl), XtRCallback, (XtPointer)NULL}, { XtNvalueAddress, XtCValue, XtRPointer, sizeof(caddr_t), offset(value.addr), XtRImmediate, (XtPointer)NULL}, { XtNvalueSize, XtCValue, XtRInt, sizeof(unsigned int), offset(value.size), XtRImmediate, (XtPointer)NULL}, { XtNvalueType, XtCValue, XtRString, sizeof(String), offset(value_type), XtRString, (XtPointer)XtRCFormat}, { XtNinputFormat, XtCValueFormat, XtRString, sizeof(String), offset(input_format), XtRImmediate, (XtPointer)NULL}, { XtNoutputFormat, XtCValueFormat, XtRString, sizeof(String), offset(output_format), XtRImmediate, (XtPointer)NULL}, { XtNdisplayCaret, XtCOutput, XtRBoolean, sizeof(Boolean), offset(display_caret), XtRImmediate, (XtPointer)True}, /* modified Simple defaults */ { XtNcursor, XtCCursor, XtRCursor, sizeof(Cursor), XtOffsetOf(TextFieldRec, simple.cursor), XtRString, "xterm"}, { XtNblink, XtCBlink, XtRBoolean, sizeof(Boolean), offset(blink), XtRImmediate, (XtPointer)False}, { XtNautoBlink, XtCAutoBlink, XtRBoolean, sizeof(Boolean), offset(auto_blink), XtRImmediate, (XtPointer)False}, { XtNautoBlinkWaitTime, XtCBlinkTime, XtRInt, sizeof(int), offset(auto_blink_wait_time), XtRImmediate, (XtPointer) 2500}, { XtNblinkOnTime, XtCBlinkTime, XtRInt, sizeof(int), offset(blink_on_time), XtRImmediate, (XtPointer) 700}, { XtNblinkOffTime, XtCBlinkTime, XtRInt, sizeof(int), offset(blink_off_time), XtRImmediate, (XtPointer) 700}, { XtNleftLabel, XtCLeftLabel, XtRBoolean, sizeof(Boolean), offset(leftLabel), XtRImmediate, (XtPointer)True}, { XtNlabelFont, XtCFont, XtRFontStruct, sizeof(XFontStruct*), offset(lblFont), XtRString, (XtPointer) XtDefaultFont}, { XtNlabel, XtCLabel, XtRString, sizeof(String), offset(label), XtRString, (XtPointer) 0}, { XtNlabelWidth, XtCLabelWidth, XtRDimension, sizeof(Dimension), offset(labelWidth), XtRDimension, (XtPointer) 0}, { XtNlabelSep, XtCLabelSep, XtRInt, sizeof(int), offset(labelSep), XtRImmediate, (XtPointer) 2 }, { XtNlabelJustify, XtCLabelJustify, XtRJustify, sizeof(XtJustify), offset(lblJustify), XtRImmediate, (XtPointer)XtJustifyRight}, { XtNshowNChars, XtCShowNChars, XtRInt, sizeof(int), offset(showNChars), XtRImmediate, (XtPointer)0}, #undef offset }; /* Private Procedures */ static int str2chr(unsigned char **chpt); static int PointerToCursor(TextFieldWidget tfw, int pos); static Boolean GetEventTime(XEvent *ev, Time *t); static Boolean GetSelectionFromArgs(Widget w, String *args, Cardinal *nargs, Atom *selection); static Boolean ConvertSelection( Widget w, Atom *selection, Atom *target, Atom *type, XtPointer *value, unsigned long *length, int *format ); static void LoseSelection(Widget w, Atom *selection); static void DoPastingCallback( Widget w, XtPointer cld, Atom *selection, Atom *type, XtPointer value, unsigned long *length, int *format ); static void ClipboardXferDone(Widget w, Atom *selection, Atom *target); static int GetTextStart(TextFieldWidget tfw); static Boolean make_cursor_visible(TextFieldWidget tfw); static void DrawCursor(TextFieldWidget tfw, int txt_x, int liney); static void DrawLabel(TextFieldWidget tfw, Boolean do_clear); static void ReDisplay(TextFieldWidget tfw, Boolean do_clear); static void getGCs(TextFieldWidget tfw); static Boolean adj_left(TextFieldWidget tfw); static Boolean adj_right(TextFieldWidget tfw); static void curs_visible_left(TextFieldWidget tfw); static void curs_visible_right(TextFieldWidget tfw); static Boolean resize_width(TextFieldWidget tfw); static void Unhighlight(TextFieldWidget tfw, unsigned long selectionBits); static unsigned long AtomToBit(Display *d, Atom sel); static void Unselect(TextFieldWidget tfw, Atom *selection); static void DoDelete(TextFieldWidget tfw, int len, int shift, int curs); /* blinker Support */ static void blinkerToggle(TextFieldWidget); static void blinkerOff(TextFieldWidget); static void autoBlinkerOn(TextFieldWidget); /* the blinker timer callback */ static void blinkerCallback(XtPointer, XtIntervalId*); /* Actions */ static void MoveCursor(Widget, XEvent*, String*, Cardinal*); static void InsertChar(Widget, XEvent*, String*, Cardinal*); static void Delete(Widget, XEvent*, String*, Cardinal*); static void HighlightStart(Widget, XEvent*, String*, Cardinal*); static void HighlightExtend(Widget, XEvent*, String*, Cardinal*); static void Highlight(Widget, XEvent*, String*, Cardinal*); static void MakeSelection(Widget, XEvent*, String*, Cardinal*); static void DeleteToClipboard(Widget, XEvent*, String*, Cardinal*); static void InsertSelection(Widget, XEvent*, String*, Cardinal*); static void Notify(Widget, XEvent*, String*, Cardinal*); static void CursorState(Widget, XEvent*, String*, Cardinal*); static void Backup(Widget, XEvent*, String*, Cardinal*); static void Restore(Widget, XEvent*, String*, Cardinal*); static void Commit(Widget, XEvent*, String*, Cardinal*); /* Event handlers */ static void handleVisibilityEvents(Widget, XtPointer, XEvent *, Boolean *); static XtActionsRec actions[] = { /* {name, procedure}, */ {"MoveCursor", MoveCursor}, {"InsertChar", InsertChar}, {"Delete", Delete}, {"HighlightStart", HighlightStart}, {"HighlightExtend", HighlightExtend}, {"Highlight", Highlight}, {"MakeSelection", MakeSelection}, {"DeleteToClipboard", DeleteToClipboard}, {"InsertSelection", InsertSelection}, {"Notify", Notify}, {"Commit", Commit}, {"CursorState", CursorState}, {"Backup", Backup}, {"Restore", Restore}, }; /* default translations */ static char translations[] = ": CursorState(Active)\n" ": CursorState(Inactive)\n" "None: MoveCursor() HighlightStart()\n" ": MoveCursor() HighlightExtend()\n" ": HighlightExtend() MakeSelection(PRIMARY)\n" ": MoveCursor() InsertSelection(PRIMARY)\n" "ShiftRight: MoveCursor() HighlightExtend() MakeSelection(PRIMARY)\n" "ShiftHome: MoveCursor(Home) HighlightExtend() MakeSelection(PRIMARY)\n" "ShiftEnd: MoveCursor(End) HighlightExtend() MakeSelection(PRIMARY)\n" "ShiftLeft: MoveCursor(-1) HighlightExtend() MakeSelection(PRIMARY)\n" "ShiftDelete: Delete(Selection,End)\n" "ShiftBackSpace: Delete(Selection,Home)\n" "AltDelete: Delete(Selection,All)\n" "AltBackSpace: Delete(Selection,All)\n" "CtrlU: Delete(All)\n" "Right: MoveCursor() HighlightStart()\n" "Home: MoveCursor(Home) HighlightStart()\n" "End: MoveCursor(End) HighlightStart()\n" "Left: MoveCursor(-1) HighlightStart()\n" "Delete: Delete(Selection,1) \n" "BackSpace: Delete(Selection,-1) \n" "SunCopy: MakeSelection(CLIPBOARD)\n" "SunPaste: InsertSelection(CLIPBOARD)\n" "SunCut: DeleteToClipboard()\n" "Escape: Restore()\n" ": InsertChar()"; /* Methods */ static void ClassInitialize(void); static void Initialize(Widget treq, Widget tnew, ArgList args, Cardinal *num_args); static void Destroy(Widget); static void TfwExpose(Widget w, XEvent *ev, Region reg); static void Resize(Widget); static Boolean SetValues(Widget current, Widget req, Widget super, ArgList args, Cardinal *nargs); static XtGeometryResult QueryGeometry(Widget w, XtWidgetGeometry *proposed, XtWidgetGeometry *answer); static Boolean AcceptFocus(Widget widget, Time *t); static void TfwDrawShadows(Widget gw, XEvent *event, Region region, XtRelief relief,Boolean out); /* Converters */ static Boolean CvtByFormat( Display *, XrmValuePtr , Cardinal *, XrmValuePtr , XrmValuePtr, XtPointer * ); #ifdef TEXT_COMPAT static Boolean CvtStringToResizeMode ( Display *, XrmValuePtr , Cardinal *, XrmValuePtr , XrmValuePtr , XtPointer * ); #endif TextFieldClassRec textFieldClassRec = { { /* core fields */ /* superclass */ (WidgetClass) &threeDClassRec, /* class_name */ "TextField", /* widget_size */ sizeof(TextFieldRec), /* class_initialize */ ClassInitialize, /* class_part_initialize */ NULL, /* class_inited */ FALSE, /* initialize */ Initialize, /* initialize_hook */ NULL, /* realize */ XtInheritRealize, /* actions */ actions, /* num_actions */ XtNumber(actions), /* resources */ resources, /* num_resources */ XtNumber(resources), /* xrm_class */ NULLQUARK, /* compress_motion */ TRUE, /* compress_exposure */ TRUE, /* compress_enterleave */ TRUE, /* visible_interest */ FALSE, /* destroy */ Destroy, /* resize */ Resize, /* expose */ TfwExpose, /* set_values */ SetValues, /* set_values_hook */ NULL, /* set_values_almost */ XtInheritSetValuesAlmost, /* get_values_hook */ NULL, /* accept_focus */ AcceptFocus, /* version */ XtVersion, /* callback_private */ NULL, /* tm_table */ translations, /* query_geometry */ QueryGeometry, /* display_accelerator */ XtInheritDisplayAccelerator, /* extension */ NULL }, { /* simple fields */ /* change_sensitive */ XtInheritChangeSensitive }, { /* ThreeD class fields */ /* shadowdraw */ (void(*)())TfwDrawShadows }, { /* textField fields */ /* empty */ 0 } }; WidgetClass textFieldWidgetClass = (WidgetClass)&textFieldClassRec; /* private Procedures */ static int str2chr(unsigned char **chpt) { unsigned char ch=(*(*chpt)++); int i,rval; if (ch != '\\' ) return((int)ch); ch=(*(*chpt)++); switch (ch) { /* \0 is handled by the default branch case '0': return((int)'\0'); */ case 'n': return((int)'\n'); case 't': return((int)'\t'); case 'b': return((int)'\b'); case 'f': return((int)'\f'); case 'r': return((int)'\r'); case 'v': return((int)'\v'); case '\'': return((int)'\''); case '\\': return((int)'\\'); default: rval=0; i=0; do { if ( ch >= '0' && ch <='7' ) { rval=8*rval+(int)(ch-'0'); ch=(*(*chpt)++); } else { break; } i++; } while (i<=2); return( (i>0 && rval<256) ? rval: -1); } } static unsigned long AtomToBit(Display *d, Atom sel) { if (sel==XA_PRIMARY) return((unsigned long)PRIMARY_BIT); else if (sel==XA_SECONDARY) return((unsigned long)SECONDARY_BIT); else if (sel==XA_CLIPBOARD(d)) return((unsigned long)CLIPBOARD_BIT); else return((unsigned long)0); } static void Unhighlight(TextFieldWidget tfw, unsigned long selectionBits) { TF.selections &= ~selectionBits; if (TF.selections==(unsigned long)0) { TF.hil_start=TF.hil_end=-1; } } static void Unselect(TextFieldWidget tfw, Atom *selection) { Display *di=XtDisplay((Widget)tfw); unsigned long bits; if (selection==NULL) { XtDisownSelection((Widget)tfw,XA_CLIPBOARD(di),CurrentTime); XtDisownSelection((Widget)tfw,XA_PRIMARY,CurrentTime); XtDisownSelection((Widget)tfw,XA_SECONDARY,CurrentTime); bits=0; } else { XtDisownSelection((Widget)tfw,*selection,CurrentTime); bits=AtomToBit(di,*selection); } Unhighlight(tfw,bits); } /* adjust the right margin of the visible window */ /* RETURNS: true if any changes were made */ static Boolean adj_right(TextFieldWidget tfw) { int len =strlen(&TF.buffer[TF.visible_start]); int toolong=XTextWidth(TF.font,TF.buffer+TF.visible_start,len) - (int)(tfw->core.width - LABEL_WIDTH(tfw) -2*(TF.internalWidth+WIDTH+SHADOW_WIDTH(tfw)) ); int old = TF.visible_end; TF.visible_end=TF.visible_start+len; while(toolong>0 && TF.visible_end>TF.text_cursor) { toolong-=XTextWidth(TF.font,&TF.buffer[TF.visible_end-- -1],1); } return TF.visible_end != old; } /* adjust the left margin of the visible window */ /* RETURNS: true if any changes were made */ static Boolean adj_left(TextFieldWidget tfw) { int old=TF.visible_start; int toolong=XTextWidth(TF.font,TF.buffer,(int)TF.visible_end) - (int)(((Widget)tfw)->core.width - LABEL_WIDTH(tfw) -2*(TF.internalWidth+WIDTH+SHADOW_WIDTH(tfw)) ); TF.visible_start=0; while( toolong>0 && TF.visible_startlen) { TF.visible_end=len; } adj_left(tfw); } /* adjust the visible area so that the cursor is seen * at the left margin (preserving 'scroll_chars') */ static void curs_visible_left(TextFieldWidget tfw) { if ( (TF.visible_start=TF.text_cursor-TF.scroll_chars) < 0) { TF.visible_start=0; } adj_right(tfw); } /* request the parent to change our width * returns false, if this could not be done * (might be due to 'resize' resource beeing set to False) */ static Boolean resize_width(TextFieldWidget tfw) { XtWidgetGeometry request; Boolean rval; int len=strlen(TF.buffer); if (!RESIZE(tfw)) return(False); request.request_mode=CWWidth; request.width= ( TF.showNChars > 0 ? TF.showNChars * TF.font->max_bounds.width : XTextWidth(TF.font,TF.buffer,len) ) + LABEL_WIDTH(tfw) + 2*( SHADOW_WIDTH(tfw)+TF.internalWidth+WIDTH); rval=(XtMakeGeometryRequest((Widget)tfw,&request,NULL)==XtGeometryYes); if (rval) { TF.visible_start=0; TF.visible_end=len; } return(rval); } /* release any old GCs before calling this function */ static void getGCs(TextFieldWidget tfw) { XGCValues values; XtGCMask mask =GCForeground|GCBackground|GCFont|GCGraphicsExposures; XtGCMask inv_mask=GCFunction|GCPlaneMask|GCGraphicsExposures; values.foreground=TF.foreground; values.background=tfw->core.background_pixel; values.function=GXinvert; values.graphics_exposures=False; values.plane_mask=values.background^values.foreground; values.font=TF.lblFont->fid; TF.lbl=XtGetGC((Widget)tfw,mask,&values); values.font=TF.font->fid; TF.norm=XtGetGC((Widget)tfw,mask,&values); TF.norm_hil=XtGetGC((Widget)tfw,inv_mask,&values); if (TF.foreground==TF.insensitive_foreground) { mask |=GCFillStyle|GCTile; values.fill_style=FillTiled; values.tile =XmuCreateStippledPixmap(XtScreen((Widget)tfw), TF.foreground, tfw->core.background_pixel, tfw->core.depth); } else { values.foreground=TF.insensitive_foreground; values.plane_mask=values.background^values.foreground; } TF.insens =XtGetGC((Widget)tfw,mask,&values); TF.insens_hil=XtGetGC((Widget)tfw,inv_mask,&values); } /* Draw the text cursor at txt_x, liney */ static void DrawCursor(TextFieldWidget tfw, int txt_x, int liney) { XPoint cur_shape[5]; int cur_x,cwd2,cheight,h,peak; GC gc; Display *di=XtDisplay((Widget)tfw); Window wi =XtWindow((Widget)tfw); int i; cur_x=txt_x + XTextWidth(TF.font, &TF.buffer[TF.visible_start], (int)(TF.text_cursor-TF.visible_start)); cheight=(TF.font->max_bounds.ascent+TF.font->max_bounds.descent)/3; if (cheight<4) cheight=4; gc=(!tfw->core.sensitive || TF.readonly || !TF.active_cursor )?TF.insens:TF.norm; peak=liney-CURSOR_ASCENT; h=tfw->core.height-SHADOW_WIDTH(tfw) - peak; if (h>cheight) h=cheight; cwd2=h/2; i=0; /* !! KEEP i < 6 !! */ SetPoint(cur_shape[i],cur_x,liney-CURSOR_ASCENT);i++; SetPoint(cur_shape[i],cwd2,h);i++; SetPoint(cur_shape[i],-(2*cwd2+1),0); i++; XFillPolygon(di,wi,gc,cur_shape,i,Convex,CoordModePrevious); } static void DrawLabel(TextFieldWidget tfw, Boolean do_clear) { Display *di; Window wi; if (0==LABEL_WIDTH(tfw) || !XtIsRealized((Widget)tfw) || !tfw->core.visible) return; di=XtDisplay(tfw); wi=XtWindow((Widget)tfw); if (do_clear) { XClearArea(di,wi, TF.leftLabel ? 0 : tfw->core.width-LABEL_WIDTH(tfw), 0, LABEL_WIDTH(tfw), tfw->core.height, False); } if (TF.label && *TF.label) { int txt_x, liney; liney = TF.internalHeight+SHADOW_WIDTH(tfw) + MAX_ASCENT(tfw); /* internalHeight is around the bigger font */ txt_x = TF.leftLabel ? TF.internalWidth : tfw->core.width - LABEL_WIDTH(tfw) + TF.labelSep; switch (TF.lblJustify) { case XtJustifyLeft: break; case XtJustifyRight: txt_x += TF.labelWidth - XTextWidth(TF.lblFont,TF.label,strlen(TF.label)); break; case XtJustifyCenter: txt_x += ((int)(TF.labelWidth - XTextWidth(TF.lblFont,TF.label,strlen(TF.label))))/2; break; } XDrawString(di, wi, TF.lbl ? TF.lbl : TF.norm, txt_x, liney, TF.label, strlen(TF.label)); } } /* redisplay everything but 3D borders and the label; erase if 'do_clear' */ static void ReDisplay(TextFieldWidget tfw, Boolean do_clear) { GC gc ; Display *di; Window wi; int liney,txt_x,left,right,len; if (!XtIsRealized((Widget)tfw) || !((Widget)tfw)->core.visible) return; di = XtDisplay((Widget)tfw); wi = XtWindow((Widget)tfw); len = strlen(TF.buffer); left = TF.internalWidth+WIDTH+SHADOW_WIDTH(tfw); right= tfw->core.width-left; liney = TF.internalHeight+SHADOW_WIDTH(tfw) + MAX_ASCENT(tfw); /* internalHeight is around the bigger font */ if (TF.leftLabel) left+=LABEL_WIDTH(tfw); else right-=LABEL_WIDTH(tfw); if (do_clear) { /* clear the internal Width and Height area also */ XClearArea(di,wi, (TF.leftLabel ? LABEL_WIDTH(tfw) : 0 ) + SHADOW_WIDTH(tfw), SHADOW_WIDTH(tfw), tfw->core.width-LABEL_WIDTH(tfw)-2*SHADOW_WIDTH(tfw), tfw->core.height-2*SHADOW_WIDTH(tfw), False); } txt_x=GetTextStart(tfw); /* Draw String */ if (TF.blink_state_on) { Boolean doHighlight = ( TF.hil_startTF.visible_start && TF.hil_end!=TF.hil_start); /* init to 0 in - keep compiler quiet */ int hil_x=0,hil_y=0,hil1,hil2; unsigned int hil_w=0,hil_h=0; gc=(((Widget)tfw)->core.sensitive && !TF.readonly)?TF.norm:TF.insens; if (doHighlight) { /* calculate highlighted area */ hil1=(TF.hil_start>TF.visible_start)?TF.hil_start:TF.visible_start; hil2=(TF.hil_end max_bounds.ascent; hil_w = XTextWidth(TF.font, TF.buffer+hil1, hil2-hil1); hil_h = TF.font->max_bounds.ascent+TF.font->max_bounds.descent; if (!do_clear) /* clear highlighted area however */ XClearArea(di,wi,hil_x,hil_y,hil_w,hil_h,False); } /* then draw the string */ XDrawString(di, wi, gc, txt_x, liney, &TF.buffer[TF.visible_start], (int)(TF.visible_end-TF.visible_start)); /* now invert highlighted area */ if ( doHighlight ) { XFillRectangle(di,wi, (((Widget)tfw)->core.sensitive && !TF.readonly)?TF.norm_hil:TF.insens_hil, hil_x,hil_y,hil_w,hil_h); } } /* Draw Cursor */ if (TF.display_caret) DrawCursor(tfw,txt_x,liney); /* Draw scroll marks */ gc=(((Widget)tfw)->core.sensitive && ! TF.readonly) ? TF.norm : TF.insens; if (TF.visible_start>0) { XDrawLine(di,wi,gc,left-1,liney+TF.font->max_bounds.descent, left-1,liney-TF.font->max_bounds.ascent); XFillRectangle(di,wi,gc, left-WIDTH, liney-TF.font->max_bounds.ascent+TF.font->max_bounds.descent, WIDTH-1, TF.font->max_bounds.ascent-TF.font->max_bounds.descent); } if (TF.visible_end < len) { XDrawLine(di,wi,gc,right+1,liney+TF.font->max_bounds.descent, right+1,liney-TF.font->max_bounds.ascent); XFillRectangle(di,wi,gc, right+2, liney-TF.font->max_bounds.ascent+TF.font->max_bounds.descent, WIDTH-1, TF.font->max_bounds.ascent-TF.font->max_bounds.descent); } } /* adjust the visible window, if cursor is outside */ /* RETURNS: true if changes were made (hint if redisplay * must be called) */ static Boolean make_cursor_visible(TextFieldWidget tfw) { Boolean rval=False; if (TF.visible_endTF.text_cursor) { rval=True; curs_visible_left(tfw); } return rval; } /* Get X-coordinate of the visible part of the text string * (depends on 'justify' etc. ) */ static int GetTextStart(TextFieldWidget tfw) { int left = TF.internalWidth+WIDTH+SHADOW_WIDTH(tfw); int right= tfw->core.width-left; int txt_x; int txt_width=XTextWidth( TF.font, &TF.buffer[TF.visible_start], (int)(TF.visible_end-TF.visible_start)); if (TF.leftLabel) left+=LABEL_WIDTH(tfw); else right-=LABEL_WIDTH(tfw); txt_x = left; switch (TF.justify) { case XtJustifyRight: txt_x= right -txt_width; break; case XtJustifyCenter:txt_x= (right+left-txt_width)/2; default: break; } return(txt_x); } /* The hightlighted area has been successfully transferred to * the CLIPBOARD-owner ('DeleteToClipboard()' action), so * it can be deleted now. */ static void ClipboardXferDone(Widget w, UNUSED(Atom *selection), UNUSED(Atom *target)) { TextFieldWidget tfw=(TextFieldWidget)w; Cardinal nargs=1; static char *args[]={"S"}; /* free the converted value, because we own it */ XtFree(clipboardValue); /* Call with NULL event arg. to suppress giving up the clipboard */ Delete((Widget)tfw,(XEvent*)0,args,&nargs); } /* A selection has been successfully transferred from another client - it * can be inserted into the buffer. * This procedure is registered in the 'InsertSelection()' action */ static void DoPastingCallback(Widget w, UNUSED(XtPointer cld), UNUSED(Atom *selection), Atom *type, XtPointer vpar, unsigned long *length, UNUSED(int *format)) { TextFieldWidget tfw=(TextFieldWidget)w; Display *di=XtDisplay((Widget)tfw); register int ncopychars; register char *chpt,*cursp; int *value=(int*)vpar; if ( ! tfw->core.sensitive || TF.readonly ){ XBell(di,100); } else { if ( (*type==XT_CONVERT_FAIL)|| (value==NULL) || (*value==0) || (*length==0)){ XBell(di,100); XtWarning("TextField: no selection or selection timed out"); } else { if (!TF.modified_by_user) Backup(w,0,0,0); ncopychars=TF.maxlen-strlen(TF.buffer); if ((int)*length>ncopychars) { XBell(di,100); XtWarning("TextField: Buffer full"); } else { ncopychars=(int)*length; } if (ncopychars>0) { Unselect(tfw,(Atom*)0); cursp=TF.buffer+TF.text_cursor; for (chpt=TF.buffer+strlen(TF.buffer); chpt>=cursp; chpt-- ) { *(chpt+ncopychars)=*chpt; } (void)strncpy(cursp,(char*)value,ncopychars); TF.text_cursor+=ncopychars; adj_right(tfw); if (TF.text_cursor>=TF.visible_end) { curs_visible_right(tfw); } ReDisplay(tfw,True); /* set resource that indicates that the user modified * the string, call the callbacks and trigger the * auto blinker. */ XtCallCallbackList((Widget)tfw,TF.modified_cbl,(XtPointer)tfwModified); /* set this _after_ calling the callback, so they get a chance to * detect changes to this resource. */ TF.modified_by_user = True; if (TF.auto_blink) autoBlinkerOn(tfw); } } } if (value) XtFree((char *)value); } /* The ownership of *selection has been lost */ static void LoseSelection(Widget w, Atom *selection) { TextFieldWidget tfw=(TextFieldWidget)w; Unhighlight(tfw,AtomToBit(XtDisplay(w),*selection)); if (TF.selections==(unsigned long)0) ReDisplay(tfw,True); } static Boolean ConvertSelection (Widget w, Atom *selection, Atom *target, Atom *type, XtPointer *valp, unsigned long *length, int *format) { char **value=(char**)valp; TextFieldWidget tfw=(TextFieldWidget)w; Display* d = XtDisplay(w); XSelectionRequestEvent* req = XtGetSelectionRequest(w, *selection, (XtRequestId)NULL); unsigned int tmp; if (*target == XA_TARGETS(d)) { Atom* targetP; XPointer std_targets; unsigned long std_length; XmuConvertStandardSelection(w, req->time, selection, target, type, &std_targets, &std_length, format); *value = (XtPointer)XtMalloc(sizeof(Atom)*((unsigned)std_length + 5)); targetP = *(Atom**)value; *targetP++ = XA_STRING; *targetP++ = XA_TEXT(d); *length = std_length + (targetP - (*(Atom **) value)); (void)memcpy( targetP, std_targets, (size_t)(sizeof(Atom)*std_length)); XtFree((char*)std_targets); *type = XA_ATOM; *format = 32; return True; } if (*target == XA_STRING || *target == XA_TEXT(d) || *target == XA_COMPOUND_TEXT(d)) { if (*target == XA_COMPOUND_TEXT(d)) *type = *target; else *type = XA_STRING; tmp= TF.hil_end-TF.hil_start; *length= tmp; *value = (XtPointer)strncpy(XtMalloc(tmp+1),TF.buffer+TF.hil_start, tmp); (*value)[tmp]=(char)0; *format = 8; if (*selection==XA_CLIPBOARD(d)) { clipboardValue=*value; /* Disown the clipboard now; disowning it in * 'ClipboardXferDone()' behaves wrong! * (Communication with 'xclipboard') */ XtDisownSelection((Widget)tfw,*selection,CurrentTime); } return True; } if (XmuConvertStandardSelection(w, req->time, selection, target, type, (XPointer *)value, length, format)) return True; return False; } /* Convert a Pointer position to a cursor position * * return value -1 indicates a Pointer pos. to the left of the string * return value -2 indicates a Pointer pos. to the right of the string */ static int PointerToCursor(TextFieldWidget tfw, int pos) { register int c1pos,c2pos,curs,lst_ch; int left = TF.internalWidth+WIDTH+SHADOW_WIDTH(tfw); int right= tfw->core.width-left; if (TF.leftLabel) left+=LABEL_WIDTH(tfw); else right-=LABEL_WIDTH(tfw); if (posright) return(-2); pos-=GetTextStart(tfw); c1pos=c2pos=0; curs=TF.visible_start; lst_ch=strlen(TF.buffer)-1; while (c1postype) { case KeyPress: case KeyRelease: *t=ev->xkey.time; break; case ButtonPress: case ButtonRelease: *t=ev->xbutton.time;break; case MotionNotify: *t=ev->xmotion.time;break; case EnterNotify: case LeaveNotify: *t=ev->xcrossing.time;break; default: XtWarning("TextField: invalid event type (no time field)"); return(False); } return(True); } /* Retrieve a selection name from * an action-procedure's arglist. * Prints a warning message and * returns 'False' if there are too * many arguments, or if the conversion * yields no result. * for *nargs==0 *selection defaults to XA_PRIMARY * * if additional selections will be added to this * procedure, don't forget to care about them * in 'Unselect()' 'AtomToBit()' and 'ClipboardXferDone()' */ static Boolean GetSelectionFromArgs(Widget w, String *args, Cardinal *nargs, Atom *selection) { if (*nargs>1) { XtWarning("TextField: Too many arguments"); return(False); } if (*nargs>0) { switch( *args[0]){ case 'p': case 'P': *selection=XA_PRIMARY; break; case 's': case 'S': *selection=XA_SECONDARY; break; case 'c': case 'C': *selection=XA_CLIPBOARD(XtDisplay(w)); break; default: XtAppWarningFmt(XtWidgetToApplicationContext(w), "TextField: %s invalid selection name", args[0]); return(False); } } else { /* no arguments */ *selection=XA_PRIMARY; } return(True); } /* Action Procedures */ /* Move the Cursor * a) (ButtonPress, ButtonRelease or MotionNotify event) * to the Pointer position. If this is one of the scroll * marks then scroll the visible window one character. * b) (other events) * evaluate 1st arg: * 'E': move to eol * 'H': move to beginning of line * : move n chars */ static void MoveCursor(Widget w, XEvent *ev, String *args, Cardinal *nargs) { TextFieldWidget tfw=(TextFieldWidget)w; int shift; int len=strlen(TF.buffer); char *chpt; switch (ev->type) { case ButtonPress: case ButtonRelease: shift=PointerToCursor(tfw,ev->xbutton.x); break; case MotionNotify: shift=PointerToCursor(tfw,ev->xmotion.x); break; /* retrieve args later */ default: shift=-3; break; } switch(shift) { default: TF.text_cursor=shift; break; case -1: if (TF.visible_start>0) TF.text_cursor--; else TF.text_cursor = 0; break; case -2: if (TF.visible_endlen) TF.text_cursor=len; make_cursor_visible(tfw); ReDisplay(tfw,True); } /* Insert one Character at cursor position (key event) * if any argument is present, insert 1st arg * a 2nd argument can be specified to suppress parsing of * special character sequences in the 1st arg (\t, \xxx expansion) */ #define STRBUFSIZE 4 static void InsertChar(Widget w, XEvent *ev, String *args, Cardinal *nargs) { TextFieldWidget tfw=(TextFieldWidget)w; unsigned char ch,*valpt,chbuf[STRBUFSIZE]; int val; size_t end; Boolean redisp=False, modified=False, parse=True; if (*nargs>0) { valpt=(unsigned char *)args[0]; if (*nargs>1) switch(*args[1]) { case 'n': case 'N': case 'F': case 'f': parse=False; default: break; } } else { if (ev->type!=KeyPress) return; if (0==XLookupString (&(ev->xkey), (char*)chbuf, STRBUFSIZE, NULL, NULL)) { /* nothing to insert; maybe a modifier key which we ignore */ return; } parse=False; chbuf[1]=(unsigned char)0; valpt=chbuf; } /* check for readonly now (don't ring the bell if a modifier was pressed */ if (TF.readonly){ XBell(XtDisplay((Widget)tfw),100); return; } /* delete the selection if any */ if (TF.hil_end>TF.hil_start) { int shift; TF.text_cursor=TF.hil_start; shift=TF.hil_end-TF.hil_start; make_cursor_visible(tfw); if (0 != shift) { Unselect(tfw,(Atom*)0); if ( ! TF.modified_by_user ) Backup(w,0,0,0); DoDelete(tfw,strlen(TF.buffer),shift,TF.text_cursor); modified = True; } } end=strlen(TF.buffer)+1; while( (val=(parse?str2chr(&valpt):(int)*valpt++)) > 0 ) { ch=(char)val; if (end>TF.maxlen) { XtWarning("TextField: Buffer full"); XBell(XtDisplay(w),100); return; } if (!modified) { if ( ! TF.modified_by_user ) Backup(w,0,0,0); Unselect(tfw,(Atom*)0); modified = True; } { register char *chpt=TF.buffer; register int idx=end; register int curs=TF.text_cursor; while (idx > curs) {chpt[idx]=chpt[idx-1]; idx--;} chpt[TF.text_cursor++]=ch; curs++; end++; } if (!resize_width(tfw)) { if (TF.justify!=XtJustifyRight) { adj_right(tfw); if (TF.text_cursor>=TF.visible_end) { curs_visible_right(tfw); } } else { TF.visible_end++; adj_left(tfw); } redisp=True; } } if (val==-1) { XtWarning("TextField: InsertChar(): invalid argument"); } if (modified) { if (redisp) ReDisplay(tfw,True); /* set resource that indicates that the user modified * the string and call the callbacks. */ XtCallCallbackList((Widget)tfw,TF.modified_cbl,(XtPointer)tfwModified); /* set this _after_ calling the callback, so they get a chance to * detect changes to this resource. */ TF.modified_by_user = True; /* fire up the auto blinker */ if (TF.auto_blink) autoBlinkerOn(tfw); } } /* Called with an ev=NULL by ClipboardXferDone() */ static void Delete(Widget w, XEvent *ev, String *args, Cardinal *nargs) { TextFieldWidget tfw=(TextFieldWidget)w; int len =strlen(TF.buffer); register int curs=TF.text_cursor; register int shift=0, argindx; Boolean moreargs; if (TF.readonly) return; if (*nargs==0) { shift=(len>curs)?1:0; } else { argindx=0; do { moreargs=False; switch (*args[argindx]) { /* delete to end of line */ case 'e': case 'E': shift= len-curs; break; /* delete to beginning of line */ case 'h': case 'H': shift= -curs; break; /* delete all */ case 'a': case 'A': shift= len; break; /* delete highlighted area */ case 's': case 'S': if (TF.hil_end>TF.hil_start) { curs=TF.text_cursor=TF.hil_start; shift=TF.hil_end-TF.hil_start; make_cursor_visible(tfw); break; } else if (*nargs <2 ) { /* no second parameter that indicates * what to delete if there's no selection */ return; } /* if there is, get next parameter and * evaluate it */ argindx++; moreargs=True; break; default: shift=atoi(args[argindx]); if (shift==0) { XtWarning("TextField: Delete() wrong Parameter"); return; } if (shift>len-curs) shift=len-curs; if (-shift>curs) shift=-curs; break; } } while (moreargs); } if (shift==0) return; if (ev!=NULL) { /* Dont give up the Clipboard now if called * by ClipboardXferDone() */ Unselect(tfw,(Atom*)0); } else { XtDisownSelection((Widget)tfw,XA_PRIMARY,CurrentTime); XtDisownSelection((Widget)tfw,XA_SECONDARY,CurrentTime); Unhighlight(tfw,(unsigned long)0); } if ( ! TF.modified_by_user ) Backup(w,0,0,0); DoDelete(tfw,len,shift,curs); if (!resize_width(tfw)) ReDisplay(tfw,True); /* set resource that indicates that the user modified * the string and call the callbacks. */ XtCallCallbackList((Widget)tfw,TF.modified_cbl,(XtPointer)tfwModified); /* set this _after_ calling the callback, so they get a chance to * detect changes to this resource. */ TF.modified_by_user = True; /* fire up the auto blinker */ if (TF.auto_blink) autoBlinkerOn(tfw); } /* do the work here */ static void DoDelete(TextFieldWidget tfw, int len, int shift, int curs) { if (shift==len) { /* delete everything */ TF.text_cursor=0; TF.visible_start=0; TF.visible_end=0; TF.buffer[0]=(char)0; } else if (shift>0) { /* delete to the right */ register char *chpt = TF.buffer; curs--; do {curs++;} while((chpt[curs]=chpt[curs+shift])!=0); } else { /* delete to the left */ register char *chpt = TF.buffer; curs--; do {curs++;} while((chpt[curs+shift]=chpt[curs])!=0); TF.text_cursor+=shift; } if (!resize_width(tfw)) { /* resize not possible */ if (shift>0) { /* deleted to the right */ TF.visible_end-=shift; if (TF.justify==XtJustifyRight) { if (TF.text_cursor=TF.visible_end && (TF.justify!=XtJustifyLeft || TF.text_cursor<(int)strlen(TF.buffer)) ) { curs_visible_right(tfw); } } else { /* delete to the left */ TF.visible_end+=shift; if (TF.justify==XtJustifyLeft) { if (TF.text_cursor>TF.visible_start) adj_right(tfw); } else { adj_left(tfw); } if (TF.text_cursor <= TF.visible_start && (TF.justify!=XtJustifyRight || TF.text_cursor>0 )) { curs_visible_left(tfw); } } } } static void HighlightStart(Widget w, XEvent *ev, UNUSED(String *args), UNUSED(Cardinal *nargs)) { TextFieldWidget tfw=(TextFieldWidget)w; if (ev->type==ButtonPress || ev->type==ButtonRelease) { TF.hil_start=TF.hil_end=PointerToCursor(tfw,ev->xbutton.x); } else { TF.hil_start=TF.hil_end=TF.text_cursor; } ReDisplay(tfw,True); } static void HighlightExtend(Widget w, XEvent *ev, UNUSED(String *args), UNUSED(Cardinal *nargs)) { TextFieldWidget tfw=(TextFieldWidget)w; int eventpos; String word="W"; String all="A"; Cardinal n=1; eventpos=TF.text_cursor; /* Translations allow no coexistence of * Motion Events and multiclicks, so * we have to implement them */ if (ev->type==ButtonRelease) { if (TF.multiclick >= 3) { /* maximum already reached */ TF.multiclick=1; } else if ((int)(ev->xbutton.time-TF.multiclick_time) < XtGetMultiClickTime(XtDisplay(w))) { /* multiclick */ TF.multiclick++; } else { TF.multiclick=1; /* reset */ } TF.multiclick_time=ev->xbutton.time; switch (TF.multiclick) { case 1: /* 1st click */ break; case 2: /* 2 clicks */ Highlight(w,ev,&word,&n); return; case 3: /* 3 clicks */ Highlight(w,ev,&all,&n); return; } } if (TF.hil_start<0) { TF.hil_start=TF.hil_end=eventpos; return; } if (TF.hil_start==TF.hil_end) { if (eventpos>TF.hil_start) TF.hil_end=eventpos; else TF.hil_start=eventpos; } else { if (abs(eventpos-TF.hil_start)type) { case ButtonPress: case ButtonRelease: eventpos=PointerToCursor(tfw,ev->xbutton.x); break; case MotionNotify: eventpos=PointerToCursor(tfw,ev->xmotion.x); break; default: eventpos=TF.text_cursor; break; } switch(*args[0]) { case 'w': case 'W': /* select word */ if (eventpos<0) return; chpt=strchr(TF.buffer+eventpos,(int)' '); TF.hil_end=(chpt)?chpt-TF.buffer:(int)strlen(TF.buffer); ch=TF.buffer[eventpos]; TF.buffer[eventpos]=0; chpt=strrchr(TF.buffer,(int)' '); TF.buffer[eventpos]=ch; TF.hil_start=(chpt)?chpt+1-TF.buffer:0; break; case 'a': case 'A': /* select all */ TF.hil_start=0; TF.hil_end=strlen(TF.buffer); break; case 'e': case 'E': /* select to eol */ TF.hil_start=eventpos; TF.hil_end=strlen(TF.buffer); break; case 'h': case 'H': /* select to home */ TF.hil_start=0; TF.hil_end=eventpos; break; default: XtWarning("TextField: Highlight(): wrong arguments"); return; } ReDisplay(tfw,True); } static void MakeSelection(Widget w, XEvent *ev, String *args, Cardinal *nargs) { TextFieldWidget tfw=(TextFieldWidget)w; Atom selection; Display *di=XtDisplay((Widget)tfw); Time t; if (TF.hil_start>=TF.hil_end) return; /* nothing highlighted */ if (! (GetEventTime(ev,&t) && GetSelectionFromArgs(w,args,nargs,&selection))) { XtWarning("(from MakeSelection())"); return; } if ( ! XtOwnSelection(w, selection, t, ConvertSelection, LoseSelection, (XtSelectionDoneProc) 0)) { XtWarning("TextField: Selection ownership not granted"); XBell(di,100); } else { TF.selections|=AtomToBit(di,selection); } } static void DeleteToClipboard(Widget w, XEvent *ev, UNUSED(String *args), UNUSED(Cardinal *nargs)) { TextFieldWidget tfw=(TextFieldWidget)w; Time t; Display *di=XtDisplay((Widget)tfw); if (TF.hil_start>=TF.hil_end) return; /* nothing highlighted */ if (TF.readonly) return; if ( ! GetEventTime(ev,&t)) { XtWarning("(from DeleteToClipboard())"); return; } if ( ! XtOwnSelection(w, XA_CLIPBOARD(di), t, ConvertSelection, LoseSelection, ClipboardXferDone)) { XtWarning("TextField: Selection ownership not granted"); XBell(di,100); } else { TF.selections|=CLIPBOARD_BIT; } } static void InsertSelection(Widget w, XEvent *ev, String *args, Cardinal *nargs) { TextFieldWidget tfw=(TextFieldWidget)w; Time t; Atom selection; if ( TF.readonly ) { XBell(XtDisplay((Widget)tfw),100); return; } if (! (GetEventTime(ev,&t) && GetSelectionFromArgs(w,args,nargs,&selection))) { XtWarning("(from MakeSelection())"); return; } XtGetSelectionValue( (Widget)tfw, selection, XA_STRING, DoPastingCallback, (XtPointer)(unsigned long)TF.text_cursor, t); } static void Notify(Widget w, UNUSED(XEvent *ev), String *args, Cardinal *nargs) { TextFieldWidget tfw=(TextFieldWidget)w; XtCallCallbackList((Widget)tfw,TF.notify_cbl,(XtPointer)((*nargs>0) ? args[0] : 0)); } static void Commit(Widget w, UNUSED(XEvent *ev), String *args, Cardinal *nargs) { TextFieldWidget tfw=(TextFieldWidget)w; XtCallCallbackList((Widget)tfw,TF.notify_cbl,(XtPointer)((*nargs>0) ? args[0] : 0)); /* switch off the auto-blinker */ if (TF.auto_blink) blinkerOff(tfw); /* commit the changes (notify user) */ XtCallCallbackList((Widget)tfw,TF.modified_cbl,(XtPointer)tfwCommitted); TF.modified_by_user = False; /* throw away the backup */ if (TF.backup) { XtFree(TF.backup); TF.backup=0; } } static void CursorState(Widget w, UNUSED(XEvent *ev), String *args, Cardinal *nargs) { TextFieldWidget tfw=(TextFieldWidget)w; if ((*nargs) == 0) TF.active_cursor=!TF.active_cursor; else { switch (*args[0]) { case 'a': case 'A': TF.active_cursor=True; break; case 'i': case 'I': TF.active_cursor=False; break; case 't': case 'T': TF.active_cursor=!TF.active_cursor; break; default: XtWarning("TextField: CursorState(): wrong parameter"); return; } } if (TF.display_caret) DrawCursor(tfw, GetTextStart(tfw), TF.internalHeight+SHADOW_WIDTH(tfw)+MAX_ASCENT(tfw)); /* internalHeight is around the bigger font */ } /* Methods */ static void TfwExpose(Widget w, XEvent *ev, Region reg) { TextFieldWidget tfw=(TextFieldWidget)w; ReDisplay(tfw,False); if (TF.label) DrawLabel(tfw,False); (*((TextFieldWidgetClass)(XtClass((Widget)tfw)))->threeD_class.shadowdraw)(w,ev,reg, XtReliefNone, (Boolean)(! (tfw->core.sensitive && !TF.readonly))); } #define TOP 0 static void TfwDrawShadows(Widget gw, UNUSED(XEvent *event), Region region, UNUSED(XtRelief relief), Boolean out) { XPoint pt[6]; TextFieldWidget tfw = (TextFieldWidget) gw; Dimension s = tfw->threeD.shadow_width; /* * draw the shadows using the core part width and height, * threeD part shadow_width and our LABEL_WIDTH. * * no point to do anything if the shadow_width is 0 or the * widget has not been realized. */ if((s > 0) && XtIsRealized (gw)){ Dimension h = tfw->core.height; Dimension w = tfw->core.width-LABEL_WIDTH(tfw); Dimension wms = w - s; Dimension hms = h - s; Display *dpy = XtDisplay (gw); Window win = XtWindow (gw); GC top, bot; Position left=TF.leftLabel ? LABEL_WIDTH(tfw) : 0; if (out) { top = tfw->threeD.top_shadow_GC; bot = tfw->threeD.bot_shadow_GC; } else { top = tfw->threeD.bot_shadow_GC; bot = tfw->threeD.top_shadow_GC; } /* top-left shadow */ if ((region == NULL) || (XRectInRegion (region, left, TOP, w, s) != RectangleOut) || (XRectInRegion (region, left, TOP, s, h) != RectangleOut)) { pt[0].x = left; pt[0].y = TOP+h; pt[1].x = left; pt[1].y = TOP; pt[2].x = left+w; pt[2].y = TOP; pt[3].x = left+wms;pt[3].y = TOP+s; pt[4].x = left+s; pt[4].y = TOP+s; pt[5].x = left+s; pt[5].y = TOP+hms; XFillPolygon (dpy, win, top, pt, 6,Complex,CoordModeOrigin); } /* bottom-right shadow */ if ((region == NULL) || (XRectInRegion (region, left, TOP + hms, w, s) != RectangleOut) || (XRectInRegion (region, left + wms, TOP, s, h) != RectangleOut)) { pt[0].x = left; pt[0].y = TOP+h; pt[1].x = left+w; pt[1].y = TOP+h; pt[2].x = left+w; pt[2].y = TOP; pt[3].x = left+wms; pt[3].y = TOP+s; pt[4].x = left+wms; pt[4].y = TOP+hms; pt[5].x = left+s; pt[5].y = TOP+hms; XFillPolygon (dpy, win, bot, pt,6, Complex,CoordModeOrigin); } } } #undef TOP static void ClassInitialize (void) { static XtConvertArgRec formatCvtFromStringArgs[]={ { XtWidgetBaseOffset, (XtPointer) XtOffsetOf(TextFieldRec,textField.input_format), sizeof(String) }, { XtImmediate, (XtPointer)True, sizeof(XtPointer) } }; static XtConvertArgRec formatCvtToStringArgs[]={ { XtWidgetBaseOffset, (XtPointer) XtOffsetOf(TextFieldRec,textField.output_format), sizeof(String) }, { XtImmediate, (XtPointer)False, sizeof(XtPointer) } }; XawInitializeWidgetSet(); XtAddConverter(XtRString, XtRJustify, XmuCvtStringToJustify, (XtConvertArgList)NULL, 0); #ifdef TEXT_COMPAT XtSetTypeConverter(XtRString, XtRResizeMode, CvtStringToResizeMode, (XtConvertArgList)NULL, 0, XtCacheAll, NULL); #endif XtSetTypeConverter(XtRString, XtRCFormat, CvtByFormat, formatCvtFromStringArgs, XtNumber(formatCvtFromStringArgs), XtCacheAll, NULL); XtSetTypeConverter(XtRCFormat, XtRString, CvtByFormat, formatCvtToStringArgs, XtNumber(formatCvtToStringArgs), XtCacheAll, NULL); } static void Initialize(UNUSED(Widget treq), Widget tnew, UNUSED(ArgList args), UNUSED(Cardinal *num_args)) { TextFieldWidget tfw=(TextFieldWidget)tnew; Dimension minh; int len; /* get Xt's multiclick time */ TF.norm=TF.insens=0; TF.selections=0; TF.active_cursor=False; /* set multicklick so that the count will be * reset upon first call of HighlightExtend() * anyway */ TF.multiclick=4; TF.multiclick_time=(Time)0; Unselect(tfw,(Atom*)0); if (TF.use_string_in_place) { TF.buffer=TF.string; if (TF.maxlen < strlen(TF.string)) { if (TF.maxlen) /* maxlen==0 means: set maxlen to strlen */ XtWarning("TextField: buffer length < strlen() (set to strlen())"); TF.maxlen=strlen(TF.string)+1; } } else { if (TF.maxlen<1) { TF.maxlen=DEF_BUFFER_SIZE; } else if (TF.maxlen>1023) { XtWarning("TextField: buffer length > 1023 (correct?)"); } TF.buffer=(String)XtMalloc((unsigned) TF.maxlen+1); TF.buffer[0]=TF.buffer[TF.maxlen]=(char)0; if (strlen(TF.string)>TF.maxlen) { XBell(XtDisplay((Widget)tfw),100); XtAppWarningFmt(XtWidgetToApplicationContext(tnew), "TextField: Buffer full (%i chars)", (int)TF.maxlen); } if (TF.string) (void)strncpy(TF.buffer,TF.string,TF.maxlen); TF.string=TF.buffer; } TF.backup = (String)0; len=strlen(TF.buffer); if (TF.text_cursor < 0 || TF.text_cursor>len) { XtWarning("TextField: cursor position out of range (using 0)"); TF.text_cursor=0; } if (NEGDIMENSION(TF.internalHeight)) { XtWarning("TextField: internalHeight < 0 ? (using 0)"); TF.internalHeight=0; } if (NEGDIMENSION(TF.internalWidth)) { XtWarning("TextField: internalWidth < 0 ? (using 0)"); TF.internalWidth=0; } if (NEGDIMENSION(TF.labelWidth)) { XtWarning("TextField: labelWidth < 0 ? (using 0)"); TF.labelWidth=0; } TF.visible_start=(short)0; TF.visible_end=(short)len; /* if there is a label, make a copy */ if (TF.label) { int lw; TF.label = XtNewString(TF.label); lw = XTextWidth(TF.lblFont,TF.label,strlen(TF.label)); if (lw>(int)TF.labelWidth) TF.labelWidth=lw; } /* set Font */ minh = MAX_FONTH(tfw) + 2*( TF.internalHeight + SHADOW_WIDTH(tfw)); if (tfw->core.height < minh) { if (tfw->core.height > 0) { XtAppWarningFmt(XtWidgetToApplicationContext(tnew), "TextField: Height too small (using %i)", (int)minh); } tfw->core.height=minh; } getGCs(tfw); if (tfw->core.width<=0 || RESIZE(tfw)) { tfw->core.width = ((TF.showNChars > 0 ) ? TF.showNChars*TF.font->max_bounds.width : XTextWidth(TF.font,TF.buffer,len)) + LABEL_WIDTH(tfw) + 2*( TF.internalWidth + WIDTH +SHADOW_WIDTH(tfw)); } else { switch (TF.justify) { case XtJustifyLeft: TF.visible_start=TF.text_cursor-TF.scroll_chars; if (TF.visible_start<0) TF.visible_start=0; adj_right(tfw); break; case XtJustifyRight:TF.visible_end=TF.text_cursor+TF.scroll_chars; if (TF.visible_end>len) TF.visible_end=len; adj_left(tfw); break; default: adj_right (tfw); adj_left (tfw); } } /* fix core bug (?), initially 'visible' is set to true although * the window is not even mapped !!! */ tfw->core.visible=False; /* * another problem: core sets 'visible' handling VisiblityNotify events. * Such an event is _not_ sent after unmapping a widget * however. (if mapping a window the server sends * visiblitynotify though). * YAP (yet another problem): * we get no callback if the visibility changes, so we better * handle visibility events ourselves. */ XtAddEventHandler((Widget)tfw,VisibilityChangeMask,False, handleVisibilityEvents,(XtPointer)0); /* initialize the blinker */ TF.blink_state_on = True; TF.blink_timer = (XtIntervalId) 0; if (TF.auto_blink_wait_time < 100) TF.auto_blink_wait_time = 100; if (TF.blink_on_time < 100) TF.blink_on_time = 100; if (TF.blink_off_time < 100) TF.blink_off_time = 100; } static void Destroy(Widget w) { TextFieldWidget tfw=(TextFieldWidget)w; Unselect(tfw,(Atom*)0); XtReleaseGC(w,TF.lbl); XtReleaseGC(w,TF.norm); XtReleaseGC(w,TF.norm_hil); XtReleaseGC(w,TF.insens); XtReleaseGC(w,TF.insens_hil); /* remove event handlers */ XtRemoveEventHandler(w, XtAllEvents, True, handleVisibilityEvents, (XtPointer)0); /* remove the blinker */ if (TF.blink_timer) { XtRemoveTimeOut(TF.blink_timer); TF.blink_timer=(XtIntervalId)0; } if (! TF.use_string_in_place) XtFree(TF.buffer); if (TF.backup) XtFree(TF.backup); if (TF.label) XtFree(TF.label); } static void Resize(Widget w) { TextFieldWidget tfw=(TextFieldWidget)w; TF.internalHeight=(int)(tfw->core.height - MAX_FONTH(tfw))/2 - SHADOW_WIDTH(tfw); if (NEGDIMENSION(TF.internalHeight)) TF.internalHeight=0; if (TF.justify==XtJustifyRight) { adj_left (tfw); adj_right(tfw); } else { adj_right(tfw); adj_left (tfw); } } #define NTF (ntfw->textField) static Boolean SetValues(Widget current, UNUSED(Widget req), Widget super, ArgList args, Cardinal *nargs) { TextFieldWidget tfw=(TextFieldWidget) current; TextFieldWidget ntfw=(TextFieldWidget) super; Boolean adjust=False,new_string,new_buffer; Boolean needsExpose=False; TfwModificationType reason=tfwNone; size_t nlen; int maxFntH; if (XtIsSensitive((Widget)ntfw)!=XtIsSensitive((Widget)tfw)) { /* Switch to insensitive */ needsExpose=True; } if (TF.font->fid !=NTF.font->fid || TF.lblFont->fid != NTF.lblFont->fid || tfw->core.background_pixel != ntfw->core.background_pixel || TF.foreground!=NTF.foreground || TF.insensitive_foreground!=NTF.insensitive_foreground) { XtReleaseGC((Widget)tfw,TF.lbl); XtReleaseGC((Widget)tfw,TF.norm); XtReleaseGC((Widget)tfw,TF.norm_hil); XtReleaseGC((Widget)tfw,TF.insens); XtReleaseGC((Widget)tfw,TF.insens_hil); getGCs(ntfw); if (TF.font->fid !=NTF.font->fid || TF.lblFont->fid != NTF.lblFont->fid) adjust=True; needsExpose=True; } /* check for changes affecting the label */ if ( TF.label != NTF.label ) { if (TF.label) { XtFree(TF.label); TF.label=0; } if (NTF.label){ NTF.label=XtNewString(NTF.label); } adjust=True; needsExpose=True; } if (TF.labelSep!=NTF.labelSep) { adjust=True; needsExpose=True; } { Dimension lw = NTF.label ? XTextWidth(NTF.lblFont,NTF.label,strlen(NTF.label)) : 0; if (lw > NTF.labelWidth) { /* set labelWidth to text width */ NTF.labelWidth=lw; } } if (NTF.labelWidth!=TF.labelWidth) { adjust=True; needsExpose=True; } /* calculate the height of the bigger font */ maxFntH=MAX_FONTH(ntfw); if (!RESIZE(ntfw)) { if (adjust) { NTF.internalHeight=(int)(ntfw->core.height - maxFntH)/2 -SHADOW_WIDTH(ntfw); if (NEGDIMENSION(NTF.internalHeight)) { ntfw->core.height-=NTF.internalHeight; NTF.internalHeight=0; } } else { NTF.internalHeight=TF.internalHeight; } if ((int)NTF.internalWidth*2 > (int)tfw->core.width-(int)LABEL_WIDTH(tfw)-30) { NTF.internalWidth=TF.internalWidth; } if (TF.internalWidth!=NTF.internalWidth) adjust=True; } else { if (adjust || (NTF.internalHeight!=TF.internalHeight)) { ntfw->core.height=maxFntH + 2*(SHADOW_WIDTH(ntfw)+NTF.internalHeight); } } if (NTF.use_string_in_place != TF.use_string_in_place) { XtWarning("TextField (SetValues): useStringInPlace cannot be changed"); NTF.use_string_in_place = TF.use_string_in_place; } nlen=strlen(NTF.string); if (NTF.use_string_in_place) { if ( ! (new_buffer = (NTF.string != TF.string)) && (NTF.maxlen!=TF.maxlen)) { XtWarning("TextField (SetValues): new length for old buffer req (use old)"); NTF.maxlen=TF.maxlen; } if (new_buffer) { NTF.buffer=NTF.string; if (NTF.maxlen == 0) NTF.maxlen=strlen(NTF.buffer)+1; } } else { if (0!=(new_buffer = (NTF.maxlen!=TF.maxlen))) { NTF.buffer=XtMalloc((unsigned)NTF.maxlen+1); NTF.buffer[0]=NTF.buffer[NTF.maxlen]=0; } else { NTF.buffer=TF.buffer; } } if (NTF.use_string_in_place && !new_buffer) { Cardinal k; /* we have no means to know that the string changed at this point :-( * just trust them and search for XtNstring in the argument list; * that's the way they tell us they tampered with the string. */ new_string=False; for (k=0; k<*nargs; k++) if (!strcmp(args[k].name,XtNstring)) { new_string=True; break; } } else { new_string = (Boolean)(strcmp( NTF.string, TF.string)); } if (new_string) { NTF.modified_by_user = False; if (NTF.backup && ! strcmp(NTF.backup,NTF.string)) { /* string was restored. */ reason=tfwStringRestored; } else reason=tfwStringChanged; } if (new_string || new_buffer){ if (new_string || NTF.hil_start>(int)NTF.maxlen) { Unselect(tfw,(Atom*)0); needsExpose=True; } if (!NTF.use_string_in_place) { (void)strncpy(NTF.buffer,NTF.string,NTF.maxlen); if (nlen > NTF.maxlen) { nlen = NTF.maxlen; XtWarning("TextField: Buffer full"); XBell(XtDisplay(ntfw),100); } if (new_buffer) XtFree(TF.buffer); } /* throw away the backup, we don't bother allocating a * new buffer. (Do this only _after_ copying the source * string to the destination, since Restore() sets the * source to 'backup' */ if (NTF.backup) { XtFree(NTF.backup); NTF.backup=(String)0; } /* * maybe the string was edited; verify that the * cursor, the highlighted and visible areas are * valid. */ if (new_string){ NTF.visible_start=0; NTF.visible_end=nlen; if (NTF.hil_start>=(int)nlen) NTF.hil_start=NTF.hil_end=-1; if (NTF.hil_end > (int)nlen) NTF.hil_end = nlen; if (NTF.text_cursor > (int)nlen) NTF.text_cursor=nlen; adjust=True; } else { if (NTF.visible_end>(int)NTF.maxlen) { NTF.visible_end=NTF.maxlen; adjust=True; } if (NTF.hil_end>(int)NTF.maxlen) { NTF.hil_end=NTF.maxlen; adjust=True; } } } NTF.string=NTF.buffer; if (NTF.text_cursor<0 || (size_t)NTF.text_cursor>nlen) { XtWarning("TextField: text cursor out of range"); NTF.text_cursor=0; } if (NTF.scroll_chars<0) { XtWarning("TextField: scrollChars out of range"); NTF.scroll_chars=1; } if (NTF.text_cursor>NTF.visible_end) { NTF.visible_end=NTF.text_cursor; adjust=True; } if (NTF.text_cursorcore.width = (NTF.showNChars > 0 ? NTF.showNChars*NTF.font->max_bounds.width : XTextWidth(NTF.font,NTF.buffer,strlen(NTF.buffer))) +LABEL_WIDTH(ntfw) +2*(SHADOW_WIDTH(ntfw)+WIDTH+NTF.internalWidth); NTF.visible_end=nlen; NTF.visible_start=0; } adj_right(ntfw); adj_left(ntfw); /* handle changes to modified_by_user */ if (NTF.modified_by_user != TF.modified_by_user) { if (NTF.modified_by_user) { /* they must not set it 'True' */ NTF.modified_by_user=False; } else { if (NTF.auto_blink || TF.auto_blink) blinkerOff(ntfw); if (NTF.backup) { XtFree(NTF.backup); NTF.backup = (String)0; } if ( ! new_string ) reason = tfwCommitted; } } /* handle changes to the blinker */ /* range checking of the timer values. * Note: we don't bother resetting running timers. The new * values will take effect only the next time the * blink timer is triggered. */ if (NTF.auto_blink_wait_time < 100) NTF.auto_blink_wait_time = 100; if (NTF.blink_on_time < 100) NTF.blink_on_time = 100; if (NTF.blink_off_time < 100) NTF.blink_off_time = 100; /* no need to check new autoBlink value */ /* blinker value changed */ if (NTF.blink != TF.blink) { if (NTF.blink && ntfw->core.visible && ! NTF.blink_timer) { /* start blinker */ NTF.blink_timer = XtAppAddTimeOut(XtWidgetToApplicationContext(super), (unsigned long)NTF.blink_on_time, blinkerCallback, (XtPointer)ntfw); } if ( ! NTF.blink ) blinkerOff(ntfw); } /* * Notify them that the string was changed or committed. */ if (tfwNone != reason) { Boolean tmp = NTF.modified_by_user; /* we want them to see the last value */ NTF.modified_by_user=TF.modified_by_user; XtCallCallbackList((Widget)ntfw,NTF.modified_cbl,(XtPointer)reason); NTF.modified_by_user=tmp; } /* general checks if we need an exposure event */ if ( NTF.visible_end != TF.visible_end || NTF.visible_start != TF.visible_start || NTF.text_cursor != TF.text_cursor || new_string || ntfw->core.width != tfw->core.width || ntfw->core.height != tfw->core.height || adjust ) needsExpose = True; return needsExpose; /* the following does not work correctly; no exposure events * are generated, if parent does not allow the new * geometry * return((ntfw->core.width==tfw->core.width)&& * (ntfw->core.height==tfw->core.height)); */ } #undef NTF static XtGeometryResult QueryGeometry(Widget w, XtWidgetGeometry *proposed, XtWidgetGeometry *answer) { TextFieldWidget tfw=(TextFieldWidget)w; Boolean ok=False; answer->request_mode=CWWidth|CWHeight; answer->width=(TF.showNChars > 0 ? TF.showNChars * TF.font->max_bounds.width : XTextWidth(TF.font,TF.buffer,strlen(TF.buffer))) + LABEL_WIDTH(tfw) + 2*( SHADOW_WIDTH(tfw)+TF.internalWidth+WIDTH); answer->height= MAX_FONTH(tfw)+2*(SHADOW_WIDTH(tfw)+TF.internalHeight); if ((proposed->request_mode&CWWidth) && proposed->width==answer->width) ok=True; if ((proposed->request_mode&CWHeight) && proposed->width!=answer->width) ok=False; if (ok) return(XtGeometryYes); if (answer->width==tfw->core.width && answer->height==tfw->core.height) return(XtGeometryNo); else return(XtGeometryAlmost); } static Boolean AcceptFocus(Widget widget, UNUSED(Time *t)) { /* * XtSetKeyboardFocus(XtParent(widget),widget); * * Doesn't work; The composite parent must * call XtSetKeyboardFocus. I dont want to use * XSetInputFocus(), since it interferes with * XtSetKeyboardFocus. * * The Xt programmers manual is not consistent about * this method. Somewhere I read the method itself has * to set the KB focus, somewhere else was said, that * the method only tells the parent if the widget is * willing to accept the focus. The latter is what we do. */ return(XtIsSensitive(widget)&&XtIsManaged(widget)); } /* Public Procedures */ /* convert the text string to the type indicated * by the valueType resource (valueSize must be set correctly) * and store the converted value at address valueAddress */ Boolean TextFieldString2Value(Widget w) { TextFieldWidget tfw=(TextFieldWidget)w; XrmValue from; if (! XtIsSubclass(w,textFieldWidgetClass)) { XtWarning("TextFieldString2Value: operand not a subclass of 'TextField'"); } if (TF.value.addr==NULL) { XtWarning("TextFieldString2Value: valueAddress == NULL"); return(False); } from.size=strlen(from.addr=TF.buffer); return(XtConvertAndStore((Widget)tfw,XtRString,&from,TF.value_type,&TF.value)); } Boolean TextFieldValue2String(Widget w) { TextFieldWidget tfw=(TextFieldWidget)w; XrmValue to; Boolean rval; int len; if (! XtIsSubclass(w,textFieldWidgetClass)) { XtWarning("TextFieldValue2String: operand not a subclass of 'TextField'"); } if (TF.value.addr==NULL) { XtWarning("TextFieldValue2String: valueAddress == NULL"); return(False); } to.size=TF.maxlen; to.addr=TF.buffer; if (0!=(rval=XtConvertAndStore((Widget)tfw, TF.value_type,&TF.value,XtRString,&to))) { Unselect(tfw,(Atom*)0); len=strlen(TF.buffer); if (TF.text_cursor>len) TF.text_cursor=len; TF.visible_start=0; TF.visible_end=len; if (!resize_width(tfw)) { if (TF.justify==XtJustifyRight) { adj_left (tfw); adj_right(tfw); } else { adj_right(tfw); adj_left (tfw); } } ReDisplay(tfw,True); } return(rval); } /* Type converters */ static Boolean CvtByFormat(Display *di, XrmValuePtr args, Cardinal *nargs, XrmValuePtr from, XrmValuePtr to, UNUSED(XtPointer *my_data)) { String fmt; Boolean rval,fromString; int typ=0; int iarg=0; long larg=0; double darg=0; if (*nargs != 2) { XtErrorMsg("wrong Parameters", "CvtByFormat", "XtToolkitError", "String to CFormat conversion needs 1 extra arg", (String*)NULL,(Cardinal*)NULL); } fmt=*(String*)args[0].addr; fromString=(Boolean)(unsigned)(*(XtPointer*)args[1].addr); rval=True; if (fmt==NULL) { XtAppWarning(XtDisplayToApplicationContext(di), "CvtByFormat: no format string"); rval=False; } else if ((typ=strlen(fmt)-1)>80) { XtAppWarning(XtDisplayToApplicationContext(di), "CvtByFormat: format too long"); rval=False; } else if (fmt[0]!='%') { XtAppWarning(XtDisplayToApplicationContext(di), "CvtByFormat: possibly no format (missing %%)"); rval=False; } if (from->addr==NULL) { XtAppWarning(XtDisplayToApplicationContext(di), "CvtByFormat: no source address"); rval=False; } if (to->addr==NULL) { XtAppWarning(XtDisplayToApplicationContext(di), "CvtByFormat: no target address"); rval=False; } if (rval) { if (fromString) { rval=(sscanf(from->addr,fmt,to->addr)==1); } else switch(fmt[typ]) { case 'c': case 'd': case 'o': case 'u': case 'x': case 'X': if (from->size==sizeof(char)) { if (fmt[typ-1]=='l') larg=(long)(*((char*)from->addr)); else iarg=(int) (*((char*)from->addr)); } else if (from->size==sizeof(short)) { if (fmt[typ-1]=='l') larg=(long)(*((short*)from->addr)); else iarg=(int) (*((short*)from->addr)); } else if (from->size==sizeof(int)) { if (fmt[typ-1]=='l') larg=(long)(*((int*)from->addr)); else iarg=(int) (*((int*)from->addr)); } else if (from->size==sizeof(long)) { if (fmt[typ-1]=='l') larg=(long)(*((long*)from->addr)); else rval=False; } else { rval=False; } if (rval) { if (fmt[typ-1]=='l') (void)sprintf(to->addr,fmt,larg); else (void)sprintf(to->addr,fmt,iarg); if (strlen(to->addr) > to->size) { /* !! String overflow !! */ XtErrorMsg("buffer overflow", "CvtByFormat", "XtToolkitError", "The target string is too small", (String*)NULL,(Cardinal*)NULL); } } break; case 'f': case 'e': case 'E': case 'g': case 'G': if (from->size==sizeof(float)) { darg=(double)(* ((float*)from->addr)); } else if (from->size==sizeof(double)) { darg=(double)(* ((double*)from->addr)); } else { rval=False; } if (rval) { (void)sprintf(to->addr,fmt,darg); if (strlen(to->addr) > to->size) { /* !! String overflow !! */ XtErrorMsg("buffer overflow", "CvtByFormat", "XtToolkitError", "The target string is too small", (String*)NULL,(Cardinal*)NULL); } } break; default: XtAppWarning(XtDisplayToApplicationContext(di), "CvtByFormat: wrong conversion character"); rval=False; break; } } if (!rval) { if (fromString) { char *mess = XtMalloc(20+strlen(XtRCFormat)+strlen(fmt)); (void)sprintf(mess,"%s using format '%s'",XtRCFormat,fmt); XtDisplayStringConversionWarning(di,(char*)from->addr,mess); XtFree(mess); } else { XtAppWarningFmt(XtDisplayToApplicationContext(di), "CvtByFormat: Cannot convert type %s to string %s using format %s", XtRCFormat, (char*)from->addr, fmt); } } return(rval); } #ifdef TEXT_COMPAT /* Do this to be compatible with the Text widget's 'resize' resource */ static Boolean CvtStringToResizeMode (Display *di, UNUSED(XrmValuePtr args), UNUSED(Cardinal *num_args), XrmValuePtr fromVal, XrmValuePtr toVal, XtPointer *my_data) { static XawTextResizeMode resizeMode; static XrmQuark QResizeNever, QResizeWidth, QResizeHeight, QResizeBoth; XrmQuark q; char lowerName[BUFSIZ]; static Boolean inited = FALSE; if ( !inited ) { QResizeNever = XrmPermStringToQuark(XtEtextResizeNever); QResizeWidth = XrmPermStringToQuark(XtEtextResizeWidth); QResizeHeight = XrmPermStringToQuark(XtEtextResizeHeight); QResizeBoth = XrmPermStringToQuark(XtEtextResizeBoth); inited = TRUE; } XmuCopyISOLatin1Lowered (lowerName, (char *)fromVal->addr); q = XrmStringToQuark(lowerName); if (q == QResizeNever) resizeMode = XawtextResizeNever; else if (q == QResizeWidth) resizeMode = XawtextResizeWidth; else if (q == QResizeHeight) resizeMode = XawtextResizeHeight; else if (q == QResizeBoth) resizeMode = XawtextResizeBoth; else { return False; } toVal->size=sizeof(XawTextResizeMode); toVal->addr=(XtPointer)&resizeMode; return True; } #endif /* Event handlers */ /* we need an event handler to workaround a bug (or is this considered a feature?) * in Core. If a widget is unmapped, 'visible' is not set to false apparently. */ static void handleVisibilityEvents(Widget w, UNUSED(XtPointer cld), XEvent *ev, UNUSED(Boolean *ctd)) { TextFieldWidget tfw=(TextFieldWidget)w; if (ev->xvisibility.state != VisibilityFullyObscured) { w->core.visible = True; /* check if the blinker needs to be restarted */ if (TF.blink && ! TF.blink_timer) { TF.blink_timer = XtAppAddTimeOut(XtWidgetToApplicationContext(w), (unsigned long)TF.blink_on_time, blinkerCallback, (XtPointer)tfw); } } else { w->core.visible = False; } } /* Blinker Support */ /* helper routines */ /* toggle the string state and paint it */ static void blinkerToggle(TextFieldWidget tfw) { TF.blink_state_on = ! TF.blink_state_on; /* clear if the new state is 'off' */ ReDisplay(tfw, ! TF.blink_state_on); } static void blinkerOff(TextFieldWidget tfw) { if (TF.blink_timer) { XtRemoveTimeOut(TF.blink_timer); TF.blink_timer = (XtIntervalId)0; } TF.blink=False; /* if the string was off, we need a redisplay */ if (!TF.blink_state_on) blinkerToggle(tfw); } static void autoBlinkerOn(TextFieldWidget tfw) { /* cancel running timer */ if (TF.blink_timer) { XtRemoveTimeOut(TF.blink_timer); } TF.blink=True; /* if the string is switched off, display it */ if (!TF.blink_state_on) blinkerToggle(tfw); /* restart the auto timeout */ TF.blink_timer = tfw->core.visible ? XtAppAddTimeOut(XtWidgetToApplicationContext((Widget)tfw), (unsigned long)TF.auto_blink_wait_time, blinkerCallback, (XtPointer)tfw): (XtIntervalId)0; } static void blinkerCallback(XtPointer cld, UNUSED(XtIntervalId *id)) { TextFieldWidget tfw =(TextFieldWidget)cld; /* if we are not visible, we don't blink * * just reset the timer id, event handler * will restart blinking. */ if ( ! tfw->core.visible ) { TF.blink_state_on = True; /* at first, the string is shown */ TF.blink_timer = 0; } else { unsigned long timeout = TF.blink_state_on ? TF.blink_on_time : TF.blink_off_time; /* toggle the state */ blinkerToggle(tfw); /* retrigger the timeout */ TF.blink_timer = XtAppAddTimeOut(XtWidgetToApplicationContext((Widget)tfw), timeout, blinkerCallback, cld); } } /* the backup/restore facility */ static void Backup(Widget w, UNUSED(XEvent *ev), UNUSED(String *args), UNUSED(Cardinal *nargs)) { TextFieldWidget tfw=(TextFieldWidget)w; if (! TF.backup) { TF.backup = XtMalloc(TF.maxlen+1); TF.backup[TF.maxlen]=(char)0; } strncpy(TF.backup,TF.buffer,TF.maxlen); } static void Restore(Widget w, UNUSED(XEvent *ev), UNUSED(String *args), UNUSED(Cardinal *nargs)) { TextFieldWidget tfw=(TextFieldWidget)w; if (!TF.backup) return; if ( ! strcmp(TF.buffer,TF.backup) ) { if (TF.modified_by_user) { /* notify them, that the string was 'restored by typing' */ XtCallCallbackList(w,TF.modified_cbl,(XtPointer)tfwStringRestored); } else { /* should not get here */ XtFree(TF.backup); TF.backup=0; return; } } /* ok, the strings differ; so we must call 'SetValues' to change * it and update all internal state. */ if (TF.use_string_in_place) { /* need to copy it first */ strncpy(TF.buffer,TF.backup,TF.maxlen); TF.buffer[TF.maxlen-1]=0; XtVaSetValues(w,XtNstring,TF.buffer,(char*)0); } else { XtVaSetValues(w,XtNstring,TF.backup,(char*)0); } TF.modified_by_user = False; if (TF.auto_blink) blinkerOff(tfw); ReDisplay(tfw,True); } #undef TF #undef SetPoint xfm-1.5.4/src/FmAwActions.c0000644000175000017500000003565610657577236012403 00000000000000/* * This file is part of X-File Manager XFM * ---------------------------------------------------------------------- FmAwActions.c (c) Simon Marlow 1990-92 (c) Albert Graef 1994 modified 2004,2005,2006,2007 by Bernhard R. Link (see Changelog) Action procedures for widgets in the application window * ---------------------------------------------------------------------- * 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 of the License, 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include #include #include #include "global.h" #include "Am.h" #include "execute.h" /*--------------------------------------------------------------------------- PRIVATE FUNCTIONS ---------------------------------------------------------------------------*/ static void awDragGrab(Boolean dropable) { Cursor c; if (dropable) c = curs[EXEC_CUR]; else c = curs[NOENTRY_CUR]; XGrabPointer(XtDisplay(aw.shell), XtWindow(aw.shell), True, EnterWindowMask | LeaveWindowMask | ButtonReleaseMask, GrabModeAsync, GrabModeAsync, None, c, CurrentTime); } /* perform a click-drag, returning the widget that the user released the button on */ static Boolean dragging_app = False; static Widget drag(Widget w, unsigned int button, Boolean *on_root_return) { XEvent e; int x, y; Window child; awDragGrab(True); freeze = dragging_app = True; for (;;) { XtAppNextEvent(app_context, &e); switch (e.type) { case ButtonPress: /* Ignore button presses */ continue; case ButtonRelease: /* Ignore button releases except 2 */ if (e.xbutton.button != button) continue; break; default: XtDispatchEvent(&e); continue; } break; } XUngrabPointer(XtDisplay(aw.shell),CurrentTime); XtDispatchEvent(&e); freeze = dragging_app = False; /* Find out if the drag was released on the root window (child = None) */ XTranslateCoordinates(XtDisplay(w),e.xbutton.window,e.xbutton.root, e.xbutton.x,e.xbutton.y,&x,&y,&child); if (child == None) *on_root_return = True; else *on_root_return = False; return XtWindowToWidget(XtDisplay(w),e.xbutton.window); } /*--------------------------------------------------------------------------- PUBLIC FUNCTIONS ---------------------------------------------------------------------------*/ int findAppWidget(Widget w) { Cardinal i; for (i=0; i= 0) { if (move) appEndMove(i); else appEndCopy(i); } } /*---------------------------------------------------------------------------*/ static void appEndMoveInBox(void) { char s[0xff]; Cardinal j, k, l; AppRec *apps; if (aw.n_selections == 0) return; if (resources.confirm_moves) { sprintf(s, "Moving %d item%s in", aw.n_selections, aw.n_selections > 1 ? "s" : "" ); if (!amConfirm(s, "the application window", "", NULL)) return; } apps = (AppRec*) XtMalloc(aw.n_apps*sizeof(AppRec)); assert(aw.n_apps >= aw.n_selections); for (j = k = 0, l = aw.n_apps - aw.n_selections; j < aw.n_apps; j++) if (aw.apps[j].selected) memcpy(&apps[l++], &aw.apps[j], sizeof(AppRec)); else memcpy(&apps[k++], &aw.apps[j], sizeof(AppRec)); XTFREE(aw.apps); aw.apps = apps; updateApplicationDisplay(); writeApplicationData(); } /*---------------------------------------------------------------------------*/ static void appEndMove(Cardinal i) { char s[0xff]; Cardinal j, k, l, m; AppRec *apps; if (aw.n_selections == 0 || aw.apps[i].selected) return; if (resources.confirm_moves) { sprintf(s, "Moving %d item%s in", aw.n_selections, aw.n_selections > 1 ? "s" : "" ); if (!amConfirm(s, "the application window", "", NULL)) return; } apps = (AppRec*) XtMalloc(aw.n_apps*sizeof(AppRec)); for (j = l = 0; j < i; j++) if (!aw.apps[j].selected) l++; for (j = k = 0, m = l + aw.n_selections; j < aw.n_apps; j++) if (aw.apps[j].selected) memcpy(&apps[l++], &aw.apps[j], sizeof(AppRec)); else if (j < i) memcpy(&apps[k++], &aw.apps[j], sizeof(AppRec)); else memcpy(&apps[m++], &aw.apps[j], sizeof(AppRec)); XTFREE(aw.apps); aw.apps = apps; updateApplicationDisplay(); writeApplicationData(); } /*---------------------------------------------------------------------------*/ static void copyApps(void) { int j, n_apps = aw.n_apps; aw.apps = (AppList) XTREALLOC(aw.apps, (aw.n_apps+aw.n_selections) * sizeof(AppRec)); for (j=0; j 1 ? "s" : "" ); if (!amConfirm(s, "the application window", "", NULL)) return; } copyApps(); updateApplicationDisplay(); writeApplicationData(); } /*---------------------------------------------------------------------------*/ void appEndCopy(int i) { char s[0xff]; int n_apps = aw.n_apps; AppRec *apps; if (aw.n_selections == 0) return; if (resources.confirm_copies) { sprintf(s, "Copying %d item%s in", aw.n_selections, aw.n_selections > 1 ? "s" : "" ); if (!amConfirm(s, "the application window", "", NULL)) return; } copyApps(); apps = (AppRec*) XtMalloc(aw.n_apps * sizeof(AppRec)); memcpy(apps, aw.apps, i*sizeof(AppRec)); memcpy(&apps[i], &aw.apps[n_apps], (aw.n_apps-n_apps)*sizeof(AppRec)); memcpy(&apps[i+aw.n_apps-n_apps], &aw.apps[i], (n_apps-i)*sizeof(AppRec)); XTFREE(aw.apps); aw.apps = apps; updateApplicationDisplay(); writeApplicationData(); } /*---------------------------------------------------------------------------*/ void appEndDrag(int i) { if (*aw.apps[i].drop_action) { char *action = varPopup(aw.shell, aw.apps[i].icon_bm, aw.apps[i].drop_action); if (!action) return; fileCallWithSelected(action); XTFREE(action); } } /*---------------------------------------------------------------------------*/ void appEndDragInBox(void) { int i; if (aw.readonly) return; for (i=0; in_files; i++) if (move_info.fw->files[i]->selected) { if (S_ISDIR(move_info.fw->files[i]->stats.st_mode)) { char *fullname = dirConcat(move_info.fw->directory, move_info.fw->files[i]->name); installApplication(move_info.fw->files[i]->name, fullname, "", "OPEN", ""); XtFree(fullname); } else if (move_info.fw->files[i]->stats.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH)) { char *push_action, *drop_action; push_action = move_info.fw->files[i]->name; drop_action = (char *)alloca(strlen(push_action)+6); strcpy(drop_action, push_action); strcat(drop_action, " \"$*\""); installApplication(move_info.fw->files[i]->name, move_info.fw->directory, "", push_action, drop_action); } else { // TODO: re-add support for storing how to start that file here char *editcmd = spaceConcat("EDIT", move_info.fw->files[i]->name); installApplication(move_info.fw->files[i]->name, move_info.fw->directory, "", editcmd, ""); XtFree(editcmd); } } updateApplicationDisplay(); writeApplicationData(); } /*---------------------------------------------------------------------------*/ void appSelect(Widget w, UNUSED(XEvent *event), UNUSED(String *params), UNUSED(Cardinal *num_params)) { Cardinal i; int j; Pixel back, fore; j = findAppWidget(w); if (j == -1) { error("Internal error:", "widget not found in appSelect"); return; } for (i=0; itype != LeaveNotify && !aw.readonly); else if (dragging_app) awDragGrab(event->type != LeaveNotify && !aw.readonly); } xfm-1.5.4/src/FmConfirm.c0000644000175000017500000001517610657577236012103 00000000000000/* * This file is part of X-File Manager XFM * ---------------------------------------------------------------------- FmConfirm.c (c) Simon Marlow 1990-1993 modified 2005,2006 by Bernhard R. Link (see Changelog) Module for creating and implementing the confirmation window * ---------------------------------------------------------------------- * 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 of the License, 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include #include #include #include #include "global.h" #include "Am.h" #include "Fm.h" #define LABEL_WIDTH 400 /*----------------------------------------------------------------------------- STATIC DATA -----------------------------------------------------------------------------*/ struct ConfirmationDialog { Widget shell, label1, label2, label3; enum { DontKnow, Ok, Cancel, Abort } confirm_flag; Boolean aborted; }; /*----------------------------------------------------------------------------- Widget Argument Lists -----------------------------------------------------------------------------*/ static Arg shell_args[] = { { XtNtitle, (XtArgVal) "Confirm" }, { XtNtransientFor, (XtArgVal) NULL } }; static Arg *form_args = NULL; static Arg label_args[] = { { XtNfromHoriz, (XtArgVal) NULL }, { XtNfromVert, (XtArgVal) NULL }, { XtNlabel, (XtArgVal) NULL }, { XtNwidth, (XtArgVal) LABEL_WIDTH }, { XtNfont, (XtArgVal) NULL }, { XtNresize, (XtArgVal) False }, { XtNtop, XtChainTop }, { XtNbottom, XtChainTop }, { XtNleft, XtChainLeft }, { XtNright, XtChainRight } }; static Arg button_box_args[] = { { XtNfromHoriz, (XtArgVal) NULL }, { XtNfromVert, (XtArgVal) NULL }, { XtNtop, XtChainTop }, { XtNbottom, XtChainTop }, { XtNleft, XtChainLeft }, { XtNright, XtChainLeft } }; /*----------------------------------------------------------------------------- PRIVATE FUNCTIONS -----------------------------------------------------------------------------*/ static void confirmOkCb(UNUSED(Widget w), void *client_data, UNUSED(void *call_data)) { struct ConfirmationDialog *d = client_data; XtPopdown(d->shell); d->confirm_flag = Ok; } /*---------------------------------------------------------------------------*/ static void confirmCancelCb(UNUSED(Widget w), void *client_data, UNUSED(void *call_data)) { struct ConfirmationDialog *d = client_data; XtPopdown(d->shell); d->confirm_flag = Cancel; } /*---------------------------------------------------------------------------*/ static void confirmAbortCb(UNUSED(Widget w), void *client_data, UNUSED(void *call_data)) { struct ConfirmationDialog *d = client_data; XtPopdown(d->shell); d->confirm_flag = Abort; } /*----------------------------------------------------------------------------- Button Data -----------------------------------------------------------------------------*/ static const ButtonRec confirm_buttons[] = { { "ok", "Continue", confirmOkCb }, { "cancel", "Cancel", confirmCancelCb }, { "abort", "Abort", confirmAbortCb }, }; /*----------------------------------------------------------------------------- PUBLIC FUNCTIONS -----------------------------------------------------------------------------*/ static void createConfirmPopup(Widget parent, struct ConfirmationDialog **out) { Widget form, button_box; struct ConfirmationDialog *d; d = (struct ConfirmationDialog*)XtMalloc(sizeof(struct ConfirmationDialog)); /* create shell */ shell_args[1].value = (XtArgVal) parent; d->shell = XtCreatePopupShell("confirm", transientShellWidgetClass, parent, shell_args, XtNumber(shell_args)); /* create outer form */ form = XtCreateManagedWidget("form", formWidgetClass, d->shell, form_args, XtNumber(form_args) ); /* create label 1 */ label_args[4].value = (XtArgVal) resources.label_font; d->label1 = XtCreateManagedWidget("label1",labelWidgetClass, form, label_args, XtNumber(label_args) ); /* create label 2 */ label_args[1].value = (XtArgVal) d->label1; d->label2 = XtCreateManagedWidget("label2",labelWidgetClass, form, label_args, XtNumber(label_args) ); /* create label 3 */ label_args[1].value = (XtArgVal) d->label2; d->label3 = XtCreateManagedWidget("label3",labelWidgetClass, form, label_args, XtNumber(label_args) ); /* create button box */ button_box_args[1].value = (XtArgVal) d->label3; button_box = XtCreateManagedWidget("button box", boxWidgetClass, form, button_box_args, XtNumber(button_box_args) ); createButtons(confirm_buttons, XtNumber(confirm_buttons), button_box, d); #ifdef ENHANCE_POP_ACCEL XtInstallAllAccelerators(form, form); XtInstallAllAccelerators(d->shell, form); #endif XtRealizeWidget(d->shell); setWMProps(d->shell); *out = d; } /*---------------------------------------------------------------------------*/ static int confirm(struct ConfirmationDialog *d, const char *s1, const char *s2, const char *s3, Boolean *aborted) { XEvent e; XtVaSetValues(d->label1, XtNlabel, s1, NULL); XtVaSetValues(d->label2, XtNlabel, s2, NULL); XtVaSetValues(d->label3, XtNlabel, s3, NULL); popupByCursor(d->shell, XtGrabExclusive); d->confirm_flag = DontKnow; do { XtAppNextEvent(app_context, &e); XtDispatchEvent(&e); } while (d->confirm_flag == DontKnow); if (aborted != NULL) *aborted = (d->confirm_flag == Abort); return (d->confirm_flag == Ok); } int fwConfirm(FileWindowRec *fw, const char *s1, const char *s2, const char *s3, Boolean *aborted) { if (fw->confirmationDialog == NULL) createConfirmPopup(fw->shell, &fw->confirmationDialog); return confirm(fw->confirmationDialog, s1, s2, s3, aborted); } static struct ConfirmationDialog *amConfirmDialog = NULL; int amConfirm(const char *s1, const char *s2, const char *s3, Boolean *aborted) { if (amConfirmDialog == NULL) createConfirmPopup(aw.shell, &amConfirmDialog); return confirm(amConfirmDialog, s1, s2, s3, aborted); } xfm-1.5.4/src/FmFwCb.c0000644000175000017500000003104010657577236011313 00000000000000/* * This file is part of X-File Manager XFM * ---------------------------------------------------------------------- FmFwCb.c (c) Simon Marlow 1990-92 (c) Albert Graef 1994 modified 7-1997 by strauman@sun6hft.ee.tu-berlin.de to add different enhancements (see README-1.4). modified 2004,2005,2006,2007 by Bernhard R. Link (see Changelog) Callback routines for widgets in a file window * ---------------------------------------------------------------------- * 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 of the License, 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include #include #include "FileList.h" #include "TextFileList.h" #include #include #include "global.h" #include "Fm.h" #ifdef ENHANCE_SELECTION #include "FmSelection.h" #endif /*----------------------------------------------------------------------------- This function is also used in FmFwActions when a directory is pulled onto the root window. In this case, w will be zero and we use this to popup the new window by the cursor. -----------------------------------------------------------------------------*/ void fileOpenCb(Widget w, FileWindowRec *fw, UNUSED(XtPointer call_data)) { int i; assert( fw != NULL ); for (i=0; in_files; i++) { if (fw->files[i]->selected && S_ISDIR(fw->files[i]->stats.st_mode)) { char *pathname; pathname = dirConcat(fw->directory, fw->files[i]->name); newFileWindow(pathname,resources.default_display_type, w ? False : True); XTFREE(pathname); } } } #ifdef ENHANCE_MENU /*---------------------------------------------------------------------------*/ void fileCloneCb(UNUSED(Widget w), FileWindowRec *fw, UNUSED(XtPointer call_data)) { newFileWindow(fw->directory,fw->display_type,True); /* new file window was created at the beginning of the list */ file_windows[0].showInode=fw->showInode; file_windows[0].showType=fw->showType; file_windows[0].showOwner=fw->showOwner; file_windows[0].showPermissions=fw->showPermissions; file_windows[0].showGroup=fw->showGroup; file_windows[0].showLinks=fw->showLinks; file_windows[0].showLength=fw->showLength; file_windows[0].showDate=fw->showDate; if (fw->display_type==Text) updateTxtOpts(&file_windows[0]); } #endif /*---------------------------------------------------------------------------*/ void fileEditCb(UNUSED(Widget w), FileWindowRec *fw, UNUSED(XtPointer call_data)) { int i; assert( fw != NULL ); for (i=0; in_files; i++) if (fw->files[i]->selected && !S_ISDIR(fw->files[i]->stats.st_mode)) doEdit(fw->directory,fw->files[i]->name); } /*---------------------------------------------------------------------------*/ void fileViewCb(UNUSED(Widget w), FileWindowRec *fw, UNUSED(XtPointer call_data)) { int i; assert( fw != NULL ); for (i=0; in_files; i++) if (fw->files[i]->selected && !S_ISDIR(fw->files[i]->stats.st_mode)) doView(fw->directory,fw->files[i]->name); } /*---------------------------------------------------------------------------*/ void xtermCb(UNUSED(Widget w), FileWindowRec *fw, UNUSED(XtPointer call_data)) { assert( fw != NULL ); doXterm(fw->directory); } /*---------------------------------------------------------------------------*/ void fileTreeCb(UNUSED(Widget w), FileWindowRec *fw, UNUSED(XtPointer call_data)) { #ifdef ENHANCE_SCROLL Boolean keep_position=(fw->display_type==Tree); #endif fw->display_type = Tree; #ifdef ENHANCE_SCROLL updateFileDisplay(fw,keep_position); #else updateFileDisplay(fw); #endif } /*---------------------------------------------------------------------------*/ void fileIconsCb(UNUSED(Widget w), FileWindowRec *fw, UNUSED(XtPointer call_data)) { DisplayType t = fw->display_type; #ifdef ENHANCE_SCROLL Boolean keep_position= (t==Icons); #endif fw->display_type = Icons; if (t == Text) reDisplayFileWindow(fw); else #ifdef ENHANCE_SCROLL updateFileDisplay(fw,keep_position); #else updateFileDisplay(fw); #endif } /*---------------------------------------------------------------------------*/ void fileTextCb(UNUSED(Widget w), FileWindowRec *fw, UNUSED(XtPointer call_data)) { DisplayType t = fw->display_type; #ifdef ENHANCE_SCROLL Boolean keep_position= (t==Text); #endif fw->display_type = Text; if (t == Icons) reDisplayFileWindow(fw); else #ifdef ENHANCE_SCROLL updateFileDisplay(fw,keep_position); #else updateFileDisplay(fw); #endif } /*---------------------------------------------------------------------------*/ void fileSelectAllCb(UNUSED(Widget w), FileWindowRec *fw, UNUSED(XtPointer call_data)) { int i; Pixel pix; int onewid=(fw->icon_box && XtIsSubclass(fw->icon_box,fileListWidgetClass)); fw->n_selections = 0; fw->n_bytes_selected = 0; for (i=0; i < fw->n_files; i++) { if ( (onewid || fw->files[i]->icon.toggle) && strcmp(fw->files[i]->name, ".") && strcmp(fw->files[i]->name, "..")) { fw->files[i]->selected = True; fw->n_selections++; fw->n_bytes_selected += fw->files[i]->stats.st_size; } else fw->files[i]->selected = False; if ( !onewid && fw->files[i]->icon.toggle) { XtVaGetValues(fw->files[i]->icon.toggle, fw->files[i]->selected?XtNforeground:XtNbackground, &pix, NULL); XtVaSetValues(fw->files[i]->icon.toggle, XtNborder, (XtArgVal) pix, NULL); } } updateStatus(fw); /* normally the mayority of files is not selected, so we just force * a redraw of everything. */ if (onewid) XClearArea(XtDisplay(fw->icon_box),XtWindow(fw->icon_box),0,0,0,0,True); #ifdef ENHANCE_SELECTION FmOwnSelection(fw,CurrentTime); #endif } /*---------------------------------------------------------------------------*/ void fileDeselectCb(UNUSED(Widget w), FileWindowRec *fw, UNUSED(XtPointer call_data)) { int i; Pixel pix; int onewid=(fw->icon_box && XtIsSubclass(fw->icon_box,fileListWidgetClass)); for (i=0; i < fw->n_files; i++) if (fw->files[i]->selected && (onewid || fw->files[i]->icon.toggle)) { fw->files[i]->selected = False; if (!onewid) { XtVaGetValues(fw->files[i]->icon.toggle, XtNbackground, &pix, NULL); XtVaSetValues(fw->files[i]->icon.toggle, XtNborder, (XtArgVal) pix, NULL); } else FileListRefreshItem((FileListWidget)fw->icon_box,i); } fw->n_selections = 0; fw->n_bytes_selected = 0; updateStatus(fw); #ifdef ENHANCE_SELECTION FmDisownSelection(fw); #endif } #ifdef ENHANCE_SELECTION /*---------------------------------------------------------------------------*/ void selectionOwnCb(UNUSED(Widget w), FileWindowRec *fw, UNUSED(XtPointer call_data)) { FmOwnSelection(fw,CurrentTime); } #endif /*---------------------------------------------------------------------------*/ void fileSortNameCb(UNUSED(Widget w), FileWindowRec *fw, UNUSED(XtPointer call_data)) { fw->sort_type = SortByName; reSortFileDisplay(fw); } /*---------------------------------------------------------------------------*/ void fileSortSizeCb(UNUSED(Widget w), FileWindowRec *fw, UNUSED(XtPointer call_data)) { fw->sort_type = SortBySize; reSortFileDisplay(fw); } /*---------------------------------------------------------------------------*/ void fileSortMTimeCb(UNUSED(Widget w), FileWindowRec *fw, UNUSED(XtPointer call_data)) { fw->sort_type = SortByMTime; reSortFileDisplay(fw); } /*---------------------------------------------------------------------------*/ void fileCloseCb(UNUSED(Widget w), FileWindowRec *fw, UNUSED(XtPointer call_data)) { if (fw == file_windows && fw->next == NULL && !resources.appmgr) { if (!resources.confirm_quit || fwConfirm(fw, "", "Exit file manager?", "", NULL)) quit(0); else return; } XtDestroyWidget(fw->shell); } /*---------------------------------------------------------------------------*/ void fileHomeCb(UNUSED(Widget w), FileWindowRec *fw, UNUSED(XtPointer call_data)) { #ifdef ENHANCE_SCROLL Boolean keep_position=True; #endif freeze = True; if (chdir(user.home)) sysError("Can't open folder:"); else if (!getwd(fw->directory)) sysError("System error:"); #ifdef ENHANCE_SCROLL else keep_position=(!strcmp(fw->directory,user.home)); updateFileDisplay(fw,keep_position); #else updateFileDisplay(fw); #endif freeze = False; } /*---------------------------------------------------------------------------*/ void fileUpCb(UNUSED(Widget w), FileWindowRec *fw, UNUSED(XtPointer call_data)) { #ifdef ENHANCE_SCROLL Boolean keep_position=True; #endif freeze = True; if (chdir(fw->directory) || chdir("..")) sysError("Can't open folder:"); else if (!getwd(fw->directory)) sysError("System error:"); #ifdef ENHANCE_SCROLL else keep_position=False; updateFileDisplay(fw,keep_position); #else updateFileDisplay(fw); #endif freeze = False; } /*---------------------------------------------------------------------------*/ void mainArrowCb(Widget w, FileWindowRec *fw, UNUSED(XtPointer call_data)) { int i; freeze = True; for (i=0; in_files; i++) if (fw->files[i]->icon.arrow == w) { if (chdir(fw->directory) || chdir(fw->files[i]->name)) sysError("Can't open folder:"); else if (!getwd(fw->directory)) sysError("System error:"); break; } #ifdef ENHANCE_SCROLL updateFileDisplay(fw,False); #else updateFileDisplay(fw); #endif freeze = False; } /*---------------------------------------------------------------------------*/ void fileShowDirsCb(UNUSED(Widget w), FileWindowRec *fw, UNUSED(XtPointer call_data)) { fw->show_dirs = !fw->show_dirs; #ifdef ENHANCE_SCROLL updateFileDisplay(fw,True); #else updateFileDisplay(fw); #endif } /*---------------------------------------------------------------------------*/ void fileDirsFirstCb(UNUSED(Widget w), FileWindowRec *fw, UNUSED(XtPointer call_data)) { fw->dirs_first = !fw->dirs_first; reSortFileDisplay(fw); } /*---------------------------------------------------------------------------*/ void fileShowHiddenCb(UNUSED(Widget w), FileWindowRec *fw, UNUSED(XtPointer call_data)) { fw->show_hidden = !fw->show_hidden; #ifdef ENHANCE_SCROLL updateFileDisplay(fw,True); #else updateFileDisplay(fw); #endif } /*---------------------------------------------------------------------------*/ void timeoutCb(UNUSED(XtPointer data), UNUSED(XtIntervalId *id)) { if (!freeze) intUpdate(); XtAppAddTimeOut(app_context, resources.update_interval, timeoutCb, NULL); } /*---------------------------------------------------------------------------*/ void showTxtOptsCb(Widget w, FileWindowRec *fw, UNUSED(XtPointer cad)) { int i; Boolean state,*fw_state=0; Widget tw=fw->icon_box; String resource=0; i=0; while(i<8 && w!=fw->option_items[i])i++; if (i>=8) return; /* not found */ switch(i) { case 0: resource=XtNshowInode; fw_state=&fw->showInode; break; case 1: resource=XtNshowType; fw_state=&fw->showType; break; case 2: resource=XtNshowPermissions; fw_state=&fw->showPermissions; break; case 3: resource=XtNshowLinks; fw_state=&fw->showLinks; break; case 4: resource=XtNshowOwner; fw_state=&fw->showOwner; break; case 5: resource=XtNshowGroup; fw_state=&fw->showGroup; break; case 6: resource=XtNshowLength;fw_state=&fw->showLength; break; case 7: resource=XtNshowDate; fw_state=&fw->showDate; break; } XtVaGetValues(tw,resource,&state,NULL); state=!state; if (state) tick(w); else noTick(w); XtVaSetValues(tw,resource,state,NULL); /* update the state in the FileWindowRec as well */ *fw_state=state; } /*---------------------------------------------------------------------------*/ void fileQuitCb(UNUSED(Widget w), FileWindowRec *fw, UNUSED(XtPointer call_data)) { if (resources.confirm_quit && !fwConfirm(fw, "", "Exit file manager?", "", NULL)) return; quit(0); } /*---------------------------------------------------------------------------*/ void fileAboutCb(UNUSED(Widget w), FileWindowRec *fw, UNUSED(XtPointer call_data)) { aboutPopup(fw->shell); } xfm-1.5.4/src/FmSelection.c0000644000175000017500000001272210421716351012403 00000000000000/* * This file is part of X-File Manager XFM * ---------------------------------------------------------------------- FmSelection.c Copyright (C) 1997 by T. Straumann, modified 2004,2005,2006 by Bernhard R. Link (see Changelog) X selection handling * ---------------------------------------------------------------------- * 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 of the License, 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include #include #include #include #include #define FMSEL XA_PRIMARY #include "global.h" #include "Fm.h" #include "FmSelection.h" static void actOwnSelection(Widget w, UNUSED(XEvent *ev), UNUSED(String *args), UNUSED(Cardinal *nargs)) { FileWindowRec *fw; while (w && !XtIsShell(w)) w=XtParent(w); if (w==0) return; for (fw=file_windows; fw; fw=fw->next) if (fw->shell==w) break; if (fw) FmOwnSelection(fw,CurrentTime); } static XtActionsRec actions[]={ { "OwnSelection", actOwnSelection }, }; static FileWindowRec *selection_owner=0; /* since there can be only one selection owner * we can save its colors in global vars */ Pixel saved_fg; Pixel saved_bg; static void unhighlight(FileWindowRec *fw) { XtVaSetValues(fw->status, XtNbackground,saved_bg, XtNforeground,saved_fg, (char*)0); } static Boolean ConvertSelection( Widget w, Atom *selection, Atom *target, Atom *type, XtPointer *valp, unsigned long *length, int *format) { char **value=(char**)valp; const char *dir; Display* d = XtDisplay(w); XSelectionRequestEvent* req = XtGetSelectionRequest(w, *selection, (XtRequestId)NULL); FileWindowRec *fw; FileRec *file; int i; size_t len; if (*target == XA_TARGETS(d)) { Atom* targetP; XPointer std_targets; unsigned long std_length; XmuConvertStandardSelection(w, req->time, selection, target, type, &std_targets, &std_length, format); *value = (XtPointer)XtMalloc(sizeof(Atom)*((unsigned)std_length + 5)); targetP = *(Atom**)value; *targetP++ = XA_STRING; *targetP++ = XA_TEXT(d); *length = std_length + (targetP - (*(Atom **) value)); (void)memcpy( targetP, std_targets, (size_t)(sizeof(Atom)*std_length)); XtFree(std_targets); *type = XA_ATOM; *format = 32; return True; } if (*target == XA_STRING || *target == XA_TEXT(d)) { *type = XA_STRING; /* find our file window pointer */ fw=file_windows; while(fw && fw->shell!=w) fw=fw->next; if (!fw) return False; dir=fw->directory; len=1; if (strcmp(dir,"/")) len+=strlen(dir); else dir=""; len+=strlen(resources.selection_paths_separator); len*=fw->n_selections; for (i=0; in_files; i++) { if ((file=fw->files[i])->selected) len+=strlen(file->name); } *length= len; { register char *dest; const char *src; *value = (XtPointer)(dest=XtMalloc(len)); for (i=0; in_files; i++) { if ((file=fw->files[i])->selected) { for (src=dir; *src; src++) *dest++=*src; *dest++=(char)'/'; for (src=file->name; *src; src++) *dest++=*src; for(src=resources.selection_paths_separator; *src; src++) *dest++=*src; } } } *format = 8; return True; } if (XmuConvertStandardSelection(w, req->time, selection, target, type, (XPointer *)value, length, format)) return True; return False; } static void LoseSelection(Widget w, Atom* selection) { FileWindowRec *fw; if (*selection != FMSEL) return; fw=file_windows; while(fw && fw->shell!=w) fw=fw->next; if (fw) { unhighlight (fw); selection_owner=0; } } Boolean FmOwnSelection(FileWindowRec *fw,Time t) { Boolean rval=False; if (!fw->shell) return False; if (fw->n_selections == 0) { FmDisownSelection(fw); return False; } else { if (fw == selection_owner) return True; /* are already owner */ if ((rval = XtOwnSelection( fw->shell, FMSEL, t, ConvertSelection, LoseSelection, (XtSelectionDoneProc)0))) { XtVaGetValues(fw->status, XtNbackground,&saved_bg, XtNforeground,&saved_fg, (char*)0); XtVaSetValues(fw->status, XtNbackground,resources.highlight_pixel, XtNforeground,saved_bg, (char*)0); selection_owner=fw; } else { unhighlight(fw); selection_owner=0; } } return rval; } void FmDisownSelection(FileWindowRec *fw) { if (fw->shell==0) return; if (fw==selection_owner) { unhighlight(fw); XtDisownSelection(fw->shell,FMSEL,CurrentTime); selection_owner=0; } } void FmSelectionInit(Display *di) { (void)XmuInternAtom(di,XmuMakeAtom("NULL")); XtAppAddActions(XtDisplayToApplicationContext(di),actions,XtNumber(actions)); } Boolean FmIsSelectionOwner(FileWindowRec *fw) { return fw && (fw==selection_owner); } xfm-1.5.4/src/TextFileList.c0000644000175000017500000004736210735462747012602 00000000000000/* * This file is part of X-File Manager XFM * ---------------------------------------------------------------------- * Enhancements to the X-File Manager XFM-1.3.2 (The TextFileList Widget) * Copyright (C) 1997 by Till Straumann * * modified 2005,2006 by Bernhard R. Link (see Changelog for details) * ---------------------------------------------------------------------- * 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 of the License, 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include #include #include #include #include #include #include #include #include "global.h" #include "TextFileListP.h" #include static XtResource tl_resources[] = { #define offset(field) XtOffsetOf(TextFileListRec, textFileList.field) /* {name, class, type, size, offset, default_type, default_addr}, */ { XtNentrySep, XtCEntrySep, XtRInt, sizeof(int), offset(entry_sep), XtRImmediate, (XtPointer)2}, { XtNtopSep, XtCTopSep, XtRInt, sizeof(int), offset(top), XtRImmediate, (XtPointer)2}, { XtNleftSep, XtCLeftSep, XtRInt, sizeof(int), offset(left), XtRImmediate, (XtPointer)2}, { XtNtabSep, XtCTabSep, XtRInt, sizeof(int), offset(tabsep), XtRImmediate, (XtPointer)4}, { XtNshowInode, XtCShowInode, XtRBoolean, sizeof(Boolean), offset(ino_s), XtRImmediate, (XtPointer)False}, { XtNshowType, XtCShowType, XtRBoolean, sizeof(Boolean), offset(dev_s), XtRImmediate, (XtPointer)True}, { XtNshowLinks, XtCShowLinks, XtRBoolean, sizeof(Boolean), offset(nlink_s), XtRImmediate, (XtPointer)True}, { XtNshowPermissions, XtCShowPermissions, XtRBoolean, sizeof(Boolean), offset(umode_s), XtRImmediate, (XtPointer)True}, { XtNshowOwner, XtCShowOwner, XtRBoolean, sizeof(Boolean), offset(uid_s), XtRImmediate, (XtPointer)True}, { XtNshowGroup, XtCShowGroup, XtRBoolean, sizeof(Boolean), offset(gid_s), XtRImmediate, (XtPointer)True}, { XtNshowLength, XtCShowLength, XtRBoolean, sizeof(Boolean), offset(size_s), XtRImmediate, (XtPointer)True}, { XtNshowDate, XtCShowDate, XtRBoolean, sizeof(Boolean), offset(time_s), XtRImmediate, (XtPointer)True}, #undef offset }; /* Methods */ static void tlInitialize(Widget,Widget,ArgList,Cardinal*); static void tlExpose(Widget,XEvent*,Region); static Boolean tlSetValues(Widget,Widget,Widget,ArgList,Cardinal*); static XtGeometryResult tlQueryGeometry(Widget,XtWidgetGeometry*,XtWidgetGeometry*); static int tlFindEntry(FileListWidget,int,int,XEvent*); static void tlEntryPosition(FileListWidget,int,Position*,Position*,Dimension*,Dimension*); #ifdef VIEWPORT_HACK static void tlSetValuesAlmost(Widget,Widget,XtWidgetGeometry*,XtWidgetGeometry*); #endif /* private procedures */ static void drawPart(TextFileListWidget,int,int); static int CalcWidth(TextFileListWidget); static int GetUidWidth(TextFileListWidget); static int GetGidWidth(TextFileListWidget); static int GetTimeWidth(TextFileListWidget); static int GetSizeWidth(TextFileListWidget); static int GetInodeWidth(TextFileListWidget); /* Actions */ static void highlight(Widget, XEvent*, String*, Cardinal*); static void unhighlight(Widget, XEvent*, String*, Cardinal*); static XtActionsRec actions[] = { /* {name, procedure}, */ {"highlight", highlight}, {"unhighlight", unhighlight}, }; static char translations[] = " : dispatchDirFile(fileHighlight,fileMaybeHighlight,\"\")\n" " : resetCursor()\n" "Shift , : fileToggle()\n" "(2) : dispatchDirFile(fileOpenDir,fileExecAction,\"\")\n" ", : fileSelect()\n" ", : fileBeginDrag(1,move)\n" ", : fileToggle()\n" ", : fileBeginDrag(2,copy)\n" "Any : grabMouseForPopup(dispatchDirFile,dirPopup,filePopup,\"\")\n" "Any : ViewportScroll(-0.1,V)\n" "Any : ViewportScroll(+0.1,V)\n" "Shift n : notify(*folder*new)\n" "Shift g : notify(*folder*goto)\n" "Shift h : notify(*folder*home)\n" "Shift u : notify(*folder*up)\n" "Shift c : notify(*folder*clone)\n" "Shift q : notify(*folder*close)\n" "Ctrl r : notify(*view*tree)\n" "Ctrl i : notify(*view*icons)\n" "Ctrl t : notify(*view*text)\n" "Ctrl n : notify(\"*view*sort by name\")\n" "Ctrl s : notify(\"*view*sort by size\")\n" "Ctrl d : notify(\"*view*sort by mtime\")\n" "Ctrl f : notify(*view*filter)\n" "Ctrl h : notify(\"*view*hide folders\")\n" "Ctrl m : notify(\"*view*mix folders/files\")\n" "Ctrl u : notify(\"*view*show hidden files\")\n" #ifdef ENHANCE_LOG "Ctrl l : notify(\"*view*show log\")\n" #endif "n : notify(*file*new)\n" "m : notify(*file*move)\n" "c : notify(*file*copy)\n" "l : notify(*file*link)\n" "d : notify(*file*delete)\n" "Delete : notify(*file*delete)\n" "BackSpace : notify(*file*delete)\n" "s : notify(*file*select)\n" "a : notify(\"*file*select all\")\n" "u : notify(\"*file*deselect all\")\n" "o : notify(\"*file*own Selection\")\n" "x : notify(*file*xterm)\n" "q : notify(*file*quit)\n"; TextFileListClassRec textFileListClassRec = { { /* core fields */ /* superclass */ (WidgetClass) &fileListClassRec, /* class_name */ "TextFileList", /* widget_size */ sizeof(TextFileListRec), /* class_initialize */ XawInitializeWidgetSet, /* class_part_initialize */ NULL, /* class_inited */ FALSE, /* initialize */ tlInitialize, /* initialize_hook */ NULL, /* realize */ XtInheritRealize, /* actions */ actions, /* num_actions */ XtNumber(actions), /* resources */ tl_resources, /* num_resources */ XtNumber(tl_resources), /* xrm_class */ NULLQUARK, /* compress_motion */ TRUE, /* compress_exposure */ XtExposeCompressMultiple, /* compress_enterleave */ TRUE, /* visible_interest */ FALSE, /* destroy */ NULL, /* resize */ NULL, /* expose */ tlExpose, /* set_values */ tlSetValues, /* set_values_hook */ NULL, #ifdef VIEWPORT_HACK /* set_values_almost */ tlSetValuesAlmost, #else /* set_values_almost */ XtInheritSetValuesAlmost, #endif /* get_values_hook */ NULL, /* accept_focus */ NULL, /* version */ XtVersion, /* callback_private */ NULL, /* tm_table */ translations, /* query_geometry */ tlQueryGeometry, /* display_accelerator */ XtInheritDisplayAccelerator, /* extension */ NULL }, { /* FileList fields */ /* findEntry */ tlFindEntry, /* entryPosition */ tlEntryPosition }, { /* textFileList fields */ /* empty */ 0 } }; WidgetClass textFileListWidgetClass = (WidgetClass)&textFileListClassRec; #define TL (tlw->textFileList) #define FL (tlw->fileList) static void tlInitialize(UNUSED(Widget treq), Widget tnew, UNUSED(ArgList args), UNUSED(Cardinal *n_args)) { int width,height,tmp; TextFileListWidget tlw=(TextFileListWidget)tnew; TL.hil_entry=-1; height=FL.font->max_bounds.ascent+FL.font->max_bounds.descent+ 2*FL.border_width+TL.entry_sep; TL.entry_height=height; tmp=XTextWidth(FL.font,"m",1); TL.ino_w=-1; TL.dev_w=tmp; TL.nlink_w=2*tmp; TL.umode_w=-1; TL.uid_w=-1; TL.gid_w=-1; TL.size_w=-1; TL.time_w=-1; #ifdef VIEWPORT_HACK TL.hack=1; #endif width=CalcWidth(tlw); height*=FL.n_files; height+=TL.top-TL.entry_sep; if ((int)tlw->core.widthcore.width=width; if ((int)tlw->core.heightcore.height=height; } static void tlExpose(Widget w, XEvent *ev, UNUSED(Region reg)) { TextFileListWidget tlw=(TextFileListWidget)w; int imin,imax; if (ev->xexpose.count>0) return; imin=(ev->xexpose.y-TL.top)/TL.entry_height; imax=(ev->xexpose.y+ev->xexpose.height-TL.top)/TL.entry_height; drawPart(tlw,imin,imax); } static void drawPart(TextFileListWidget tlw, int imin, int imax) { int i,j,h,left,leftbr,len,cur; int ino_x,dev_x,nlink_x,umode_x,uid_x,gid_x,size_x,time_x,fill; unsigned int rectw, recth; FileRec *file; int liney,recty,rectx; Display *di=XtDisplay((Widget)tlw); Window win=XtWindow((Widget)tlw); GC gc,gcnorm=FL.gc_norm; char buf[BUFSIZ]; const char *chpt; struct passwd *pw; struct group *gr; if (!XtIsRealized((Widget)tlw)) return; ino_x=dev_x=nlink_x=umode_x=uid_x=gid_x=size_x=time_x=0; rectx=TL.left+FL.border_width/2; recty=TL.top+FL.border_width/2 + imin*TL.entry_height; rectw=FL.name_w-FL.border_width; /* name_w contains 2*bw */ recth=TL.entry_height-FL.border_width-TL.entry_sep; liney=TL.top+FL.font->max_bounds.ascent+FL.border_width + imin*TL.entry_height; h=TL.entry_height; left=TL.left+FL.border_width; leftbr=left+XTextWidth(FL.font,"[",1); /* calculate the position of the other fields */ cur=TL.left+TL.tabsep+FL.name_w; if (TL.ino_s) { ino_x=cur; cur+=TL.ino_w+TL.tabsep; } if (TL.dev_s) { dev_x=cur; cur+=TL.dev_w+TL.tabsep; } if (TL.umode_s) { umode_x=cur; cur+=TL.umode_w+TL.tabsep; } if (TL.nlink_s) { nlink_x=cur; cur+=TL.nlink_w+TL.tabsep; } if (TL.uid_s) { uid_x=cur; cur+=TL.uid_w+TL.tabsep; } if (TL.gid_s) { gid_x=cur; cur+=TL.gid_w+TL.tabsep; } if (TL.size_s) { size_x=cur; cur+=TL.size_w+TL.tabsep; } if (TL.time_s) { time_x=cur; cur+=TL.time_w+TL.tabsep; } if (imin<0) imin=0; if (imax>=FL.n_files) imax=FL.n_files-1; if (TL.hil_entry>=imin && TL.hil_entry<=imax) { XFillRectangle(di,win, FL.gc_highlight, TL.left+FL.border_width/2, TL.top+FL.border_width/2+TL.hil_entry*h, rectw,recth); } for (i=imin; i<=imax; i++) { file=FL.files[i]; gc= (i==TL.hil_entry?FL.gc_invert:FL.gc_highlight); len=strlen(file->name); if (S_ISDIR(file->stats.st_mode)) { XDrawString(di,win, gc, left, liney, "[", 1); file->name[len]=(char)']'; XDrawString(di,win, gc, leftbr, liney, file->name, len+1); } else { XDrawString(di,win, gc, left, liney, file->name, len); } file->name[len]=(char)0; if (file->selected) XDrawRectangle(di,win,FL.gc_highlight, rectx,recty, rectw,recth); if (TL.ino_s) { sprintf(buf,"%lu",(unsigned long)file->stats.st_ino); fill=TL.ino_w-XTextWidth(FL.font,buf,len=strlen(buf)); XDrawString(di,win,gcnorm,ino_x+fill,liney,buf,len); } if (TL.dev_s) { if(file->info.symlink) { if (S_ISDIR(file->stats.st_mode)) chpt="ld"; else if (S_ISCHR(file->stats.st_mode)) chpt="lc"; else if (S_ISBLK(file->stats.st_mode)) chpt="lb"; else if (S_ISFIFO(file->stats.st_mode)) chpt="lp"; else if (S_ISSOCK(file->stats.st_mode)) chpt="ls"; else chpt="l"; } else if (S_ISDIR(file->stats.st_mode)) chpt="d"; else if (S_ISCHR(file->stats.st_mode)) chpt="c"; else if (S_ISBLK(file->stats.st_mode)) chpt="b"; else if (S_ISFIFO(file->stats.st_mode)) chpt="p"; else if (S_ISSOCK(file->stats.st_mode)) chpt="s"; else chpt="-"; fill=TL.dev_w-XTextWidth(FL.font,chpt,len=strlen(chpt)); XDrawString(di,win,gcnorm,dev_x+fill,liney,chpt,len); } if (TL.umode_s) { makePermissionsString(buf,file->stats.st_mode); fill=0; for (j=0;j<9;j++) { XDrawString( di,win,gcnorm, umode_x+fill+((TL.perm_w[j]-XTextWidth(FL.font,buf+j,1))/2), liney,buf+j,1); fill+=TL.perm_w[j]; } } if (TL.nlink_s) { sprintf(buf,"%lu",(unsigned long)file->stats.st_nlink); fill=TL.nlink_w-XTextWidth(FL.font,buf,len=strlen(buf)); XDrawString(di,win,gcnorm,nlink_x+fill,liney,buf,len); } if (TL.uid_s) { if ((pw=getpwuid(file->stats.st_uid))==0) { sprintf(buf,"%lu",(unsigned long)file->stats.st_uid); chpt=buf; } else chpt=pw->pw_name; XDrawString(di,win,gcnorm,uid_x,liney,chpt,strlen(chpt)); } if (TL.gid_s) { if ((gr=getgrgid(file->stats.st_gid))==0) { sprintf(buf,"%lu",(unsigned long)file->stats.st_gid); chpt=buf; } else chpt=gr->gr_name; XDrawString(di,win,gcnorm,gid_x,liney,chpt,strlen(chpt)); } if (TL.size_s) { sprintf(buf,"%lu",(unsigned long)file->stats.st_size); fill=TL.size_w-XTextWidth(FL.font,buf,len=strlen(buf)); XDrawString(di,win,gcnorm,size_x+fill,liney,buf,len); } if (TL.time_s) { len=strlen(chpt=ctime(&file->stats.st_mtime)); if (*(chpt+len-1)==(char)'\n') len--; XDrawString(di,win,gcnorm,time_x,liney,chpt,len); } recty+=h; liney+=h; } } #define TN (new->textFileList) #define TC (current->textFileList) static Boolean tlSetValues(Widget c, UNUSED(Widget r), Widget super, UNUSED(ArgList args), UNUSED(Cardinal *nargs)) { int rval=False; TextFileListWidget current=(TextFileListWidget)c; TextFileListWidget new=(TextFileListWidget)super; TN.entry_sep=TC.entry_sep; TN.top=TC.top; TN.left=TC.left; TN.tabsep=TC.tabsep; if ( TN.ino_s != TC.ino_s || TN.dev_s != TC.dev_s || TN.nlink_s != TC.nlink_s || TN.umode_s != TC.umode_s || TN.uid_s != TC.uid_s || TN.gid_s != TC.gid_s || TN.size_s != TC.size_s || TN.time_s != TC.time_s ) { super->core.width=CalcWidth(new); #ifdef VIEWPORT_HACK super->core.height+=TN.hack; TN.hack=-TN.hack; /* This is a hack to force the viewport parent to change the height * (workaround a bug) */ #endif rval=True; } return rval; } #undef TN #undef TC #ifdef VIEWPORT_HACK /* The viewport computes wrong the layout if not both, a height as well as a * width change is requested. So we use this method to reset the * height modified by tlSetValues. */ static void tlSetValuesAlmost( Widget old, Widget new, XtWidgetGeometry *request, XtWidgetGeometry *compr) { /* This is a hack to workaround a bug in the viewport parent */ *request =*compr; request->height=old->core.height; } #endif static XtGeometryResult tlQueryGeometry(Widget w, XtWidgetGeometry* intended,XtWidgetGeometry* preferred) { TextFileListWidget tlw=(TextFileListWidget)w; preferred->request_mode = CWWidth | CWHeight; preferred->width = CalcWidth(tlw); preferred->height = TL.entry_height*FL.n_files-TL.entry_sep+2*TL.top; if ( ((intended->request_mode & (CWWidth | CWHeight)) == (CWWidth | CWHeight)) && intended->width >= preferred->width && intended->height >= preferred->height) { return XtGeometryYes; } else if (preferred->width == w->core.width && preferred->height == w->core.height) return XtGeometryNo; else return XtGeometryAlmost; } static void highlight(Widget w, XEvent* ev, String* args, Cardinal* nargs) { TextFileListWidget tlw=(TextFileListWidget)w; int i,x,y; FileListEventPosition(ev,&x,&y); /* this excludes the case of being an event other * than Motion, Button- Enter-/Leave or Key- event * (x == -1 in this case). */ i=tlFindEntry((FileListWidget)w,x,y,ev); if (i==TL.hil_entry) return; /* is already highlighted */ if (TL.hil_entry>=0) unhighlight(w,ev,args,nargs); TL.hil_entry=i; if (i>=0) drawPart(tlw,i,i); } static void unhighlight(Widget w, UNUSED(XEvent* ev), UNUSED(String* args), UNUSED(Cardinal* nargs)) { TextFileListWidget tlw=(TextFileListWidget)w; int i=TL.hil_entry; int rectx,recty; unsigned int rectw,recth; if (TL.hil_entry<0) return; rectx=TL.left; recty=TL.top + i*TL.entry_height; rectw=FL.name_w+2*FL.border_width; recth=TL.entry_height-TL.entry_sep; XFillRectangle(XtDisplay(w),XtWindow(w), FL.gc_invert, rectx,recty, rectw,recth); TL.hil_entry=-1; drawPart(tlw,i,i); } /* private procedures */ static int tlFindEntry(FileListWidget flw, int x, int y, UNUSED(XEvent *ev)) { TextFileListWidget tlw=(TextFileListWidget)flw; int i; if (x TL.left+FL.name_w) return -1; i=(y-TL.top)/TL.entry_height; if (i<0 || i>=FL.n_files) return -1; else return i; } static void tlEntryPosition( FileListWidget flw, int entry, Position *x, Position *y, Dimension *width, Dimension *height) { TextFileListWidget tlw=(TextFileListWidget)flw; *x=(Position)TL.left; *y=(Position)(TL.top+TL.entry_height*entry); *width=(Dimension)CalcWidth(tlw); *height=(Dimension)(TL.entry_height-TL.entry_sep); } static int GetUidWidth(TextFileListWidget tlw) { int i,width=0,tmp; uid_t uid=0,tmpuid=0; char buf[128], *chpt=0; struct passwd *pw; for (i=0;istats.st_uid)) continue; pw=getpwuid(uid=tmpuid); if (!pw) { sprintf(buf,"%lu",(unsigned long)tmpuid); chpt=buf; } else chpt=pw->pw_name; if ((tmp=XTextWidth(FL.font,chpt,strlen(chpt)))>width) width=tmp; } return width; } static int GetGidWidth(TextFileListWidget tlw) { int i,width=0,tmp; gid_t gid=0,tmpgid=0; char buf[128], *chpt=0; struct group *grp; for (i=0;istats.st_gid) && chpt) continue; grp=getgrgid(gid=tmpgid); if (!grp) { sprintf(buf,"%lu",(unsigned long)tmpgid); chpt=buf; } else chpt=grp->gr_name; if ((tmp=XTextWidth(FL.font,chpt,strlen(chpt)))>width) width=tmp; } return width; } static int GetSizeWidth(TextFileListWidget tlw) { int i,width=0,tmp; char buf[128]; for (i=0;istats.st_size); if ((tmp=XTextWidth(FL.font,buf,strlen(buf)))>width) width=tmp; } return width; } static int GetInodeWidth(TextFileListWidget tlw) { int i,width=0,tmp; char buf[128]; for (i=0;istats.st_ino); if ((tmp=XTextWidth(FL.font,buf,strlen(buf)))>width) width=tmp; } return width; } static int GetTimeWidth(TextFileListWidget tlw) { int i,width=0,tmp,len; char *chpt; for (i=0;istats.st_mtime)); if (*(chpt+len-1)==(char)'\n') len--; if ((tmp=XTextWidth(FL.font,chpt,len))>width) width=tmp; } return width; } static int CalcWidth(TextFileListWidget tlw) { int width, tmp,tmp1,tmp2; width=TL.left+FL.name_w; if (TL.ino_s) { if (TL.ino_w==-1) TL.ino_w=GetInodeWidth(tlw); width+=TL.tabsep+TL.ino_w; } if (TL.dev_s) width+=TL.tabsep+TL.dev_w; if (TL.nlink_s) width+=TL.tabsep+TL.nlink_w; if (TL.umode_s) { /* calculate width of the characters of the permission string * (do this for every char to make it look nice :-) */ if (TL.umode_w==-1) { tmp=XTextWidth(FL.font,"-",1); tmp2=((tmp1=XTextWidth(FL.font,"r",1))>tmp? tmp1:tmp); TL.perm_w[0]=TL.perm_w[3]=TL.perm_w[6]=tmp2; TL.umode_w=3*tmp2; tmp2=((tmp1=XTextWidth(FL.font,"w",1))>tmp? tmp1:tmp); TL.perm_w[1]=TL.perm_w[4]=TL.perm_w[7]=tmp2; TL.umode_w+=3*tmp2; if ((tmp1=XTextWidth(FL.font,"x",1))>tmp) tmp=tmp1; tmp2=( (tmp1=XTextWidth(FL.font,"s",1)) > tmp? tmp1:tmp); if ((tmp1=XTextWidth(FL.font,"S",1))>tmp2) tmp2=tmp1; TL.perm_w[2]=TL.perm_w[5]=tmp2; TL.umode_w+=2*tmp2; if ((tmp1=XTextWidth(FL.font,"t",1))>tmp) tmp=tmp1; if ((tmp1=XTextWidth(FL.font,"T",1))>tmp) tmp=tmp1; TL.umode_w+=(TL.perm_w[8]=tmp); } width+=TL.tabsep+TL.umode_w; } if (TL.uid_s) { if (TL.uid_w==-1) TL.uid_w=GetUidWidth(tlw); width+=TL.tabsep+TL.uid_w; } if (TL.gid_s) { if (TL.gid_w==-1) TL.gid_w=GetGidWidth(tlw); width+=TL.tabsep+TL.gid_w; } if (TL.size_s) { if (TL.size_w==-1) TL.size_w=GetSizeWidth(tlw); width+=TL.tabsep+TL.size_w; } if (TL.time_s) { if (TL.time_w==-1) TL.time_w=GetTimeWidth(tlw); width+=TL.tabsep+TL.time_w; } width+=TL.left; return width; } xfm-1.5.4/src/FmAw.c0000644000175000017500000005305410422434206011025 00000000000000/* * This file is part of X-File Manager XFM * ---------------------------------------------------------------------- FmAw.c (c) Simon Marlow 1990-1993 (c) Albert Graef 1994 modified 7-1997 by strauman@sun6hft.ee.tu-berlin.de to add different enhancements (see README-1.4). modified 2003,2005,2006 by Bernhard R. Link (see Changelog) Functions & data for creating & maintaining the application window * ---------------------------------------------------------------------- * 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 of the License, 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include "global.h" #include "Am.h" #define APPWIDTH 300 #ifdef ENHANCE_TRANSLATIONS #undef XtNtranslations #define XtNtranslations "" #endif /*----------------------------------------------------------------------------- PUBLIC DATA -----------------------------------------------------------------------------*/ AppWindowRec aw; Widget *aw_button_items, app_popup_widget, *app_popup_items, app_popup_widget1, *app_popup_items1; int n_appst = 0; char **appst = NULL; /*----------------------------------------------------------------------------- STATIC DATA -----------------------------------------------------------------------------*/ static const MenuItemRec app_popup_menu[] = { { "install app", "Install...", appInstallAppCb }, { "install group", "Install group...", appInstallGroupCb }, { "line1", NULL, NULL }, { "cut", "Cut", appCutCb }, { "copy", "Copy", appCopyCb }, { "paste", "Paste", appPasteCb }, { "line2", NULL, NULL }, { "delete", "Delete", appRemoveCb }, { "line3", NULL, NULL }, { "select all", "Select all", appSelectAllCb }, { "deselect all", "Deselect all", appDeselectCb }, { "line4", NULL, NULL }, { "about", "About xfm...", aboutCb }, { "line5", NULL, NULL }, { "quit", "Quit", appCloseCb }, }; static const MenuItemRec app_popup_menu1[] = { { "edit", "Edit...", appEditCb }, { "line1", NULL, NULL }, { "cut", "Cut", appCutCb }, { "copy", "Copy", appCopyCb }, { "line2", NULL, NULL }, { "delete", "Delete", appRemoveCb }, }; /*----------------------------------------------------------------------------- Widget Argument lists -----------------------------------------------------------------------------*/ static Arg form_args[] = { { XtNdefaultDistance, 0 } }; static Arg viewport_args[] = { { XtNfromVert, (XtArgVal) NULL }, { XtNwidth, APPWIDTH }, { XtNtop, XtChainTop }, { XtNbottom, XtChainBottom }, { XtNleft, XtChainLeft }, { XtNright, XtChainRight }, { XtNallowVert, (XtArgVal) True }, }; static Arg button_box_args[] = { { XtNfromVert, (XtArgVal) NULL }, { XtNtop, XtChainBottom }, { XtNbottom, XtChainBottom }, { XtNleft, XtChainLeft }, { XtNright, XtChainLeft }, }; static Arg icon_box_args[] = { { XtNwidth, 0 }, { XtNtranslations, (XtArgVal) NULL } }; static Arg icon_form_args[] = { { XtNdefaultDistance, 0 }, { XtNwidth, 0 } }; static Arg icon_toggle_args[] = { { XtNfromHoriz, (XtArgVal) NULL }, { XtNfromVert, (XtArgVal) NULL }, { XtNbitmap, (XtArgVal) NULL }, { XtNtranslations, (XtArgVal) NULL }, { XtNwidth, 0 }, { XtNheight, 0 }, { XtNforeground, (XtArgVal) 0 }, }; static Arg icon_label_args[] = { { XtNfromHoriz, (XtArgVal) NULL }, { XtNfromVert, (XtArgVal) NULL }, { XtNlabel, (XtArgVal) NULL }, { XtNfont, (XtArgVal) NULL }, { XtNwidth, 0 }, { XtNinternalWidth, 0 }, { XtNinternalHeight, 0 } }; /*----------------------------------------------------------------------------- Translation tables -----------------------------------------------------------------------------*/ #ifndef ENHANCE_TRANSLATIONS static char app_translations[] = "\ : appMaybeHighlight()\n\ : unhighlight()\n\ (2) : runApp()\n\ , : appSelect()\n\ , : appBeginDrag(1,move)\n\ , : appToggle()\n\ , : appBeginDrag(2,copy)\n"; static char iconbox_translations[] = "\ : dummy()\n\ : dummy()\n\ Any : appPopup()\n\ : appTrackCursor()\n\ : appTrackCursor()\n"; #endif /*----------------------------------------------------------------------------- Action tables -----------------------------------------------------------------------------*/ static void CatchEntryLeave2(Widget,XtPointer,XEvent*,Boolean *ctd); static void dummy(UNUSED(Widget w), UNUSED(XEvent *event), UNUSED(String *params), UNUSED(Cardinal *num_params)) { } static XtActionsRec app_actions[] = { { "appMaybeHighlight", appMaybeHighlight }, { "runApp", runApp }, { "appSelect", appSelect }, { "appToggle", appToggle }, { "appPopup", appPopup }, { "appBeginDrag", appBeginDrag }, { "appTrackCursor", appTrackCursor }, { "dummy", dummy } }; /*----------------------------------------------------------------------------- Button Data -----------------------------------------------------------------------------*/ static const ButtonRec aw_buttons[] = { { "back", "Back", appBackCb }, { "main", "Main", appMainCb }, { "reload", "Reload", appLoadCb }, { "open", "File window", appOpenCb }, }; /*----------------------------------------------------------------------------- PRIVATE FUNCTIONS -----------------------------------------------------------------------------*/ static int longestName(void) { int l, longest = 0; Cardinal i; for (i=0; i longest) longest = l; return longest; } /*---------------------------------------------------------------------------*/ static int parseAppI(FILE *fp, char **name, char **directory, char **fname, char **icon, char **push_action, char **drop_action) { static char s[MAXAPPSTRINGLEN]; int l; start: if (feof(fp)||!fgets(s, MAXAPPSTRINGLEN, fp)) return 0; l = strlen(s); /* TODO: check for overlong lines */ if (s[l-1] == '\n') s[--l] = '\0'; if (!l || *s == '#') goto start; if (!(*name = split(s, ':'))) return -1; if (!(*directory = split(NULL, ':'))) return -1; if (!(*fname = split(NULL, ':'))) return -1; if (!(*icon = split(NULL, ':'))) return -1; if (!(*push_action = split(NULL, ':'))) return -1; if (!(*drop_action = split(NULL, ':'))) return -1; return l; } /*---------------------------------------------------------------------------*/ /* determine the icon of an application */ static void readApplicationBitmap(AppRec *app, Boolean interactive) { app->icon_bm = None; if( app->icon[0] != '\0' ) { app->icon_bm = loadIcon(app->icon,NULL,NULL); if( app->icon_bm == None ) { if( interactive ) error("Can't read icon for", app->name); else fprintf(stderr, "%s: can't read icon for application %s\n", progname, app->name); } } if( app->icon_bm == None ) { /* choose a default icon, no longer on file type but * on what happens with that */ if( strcmp(app->push_action,"LOAD") == 0 ) { app->icon_bm = bm_appmgr; } else if( strcmp(app->push_action,"OPEN") == 0 ) { app->icon_bm = bm[DIR_BM]; } else app->icon_bm = bm[FILE_BM]; } } /*---------------------------------------------------------------------------*/ static void generateDeviceApp(DevRec *dev) { char *name; name = strrchr(dev->name,'/'); if (name == NULL) name = dev->name; else name++; aw.apps = (AppList) XTREALLOC(aw.apps, (aw.n_apps+1)*sizeof(AppRec) ); aw.apps[aw.n_apps].name = XtNewString(name); aw.apps[aw.n_apps].directory = XtNewString(dev->name); aw.apps[aw.n_apps].icon = XtNewString(dev->type); aw.apps[aw.n_apps].push_action = XtNewString("OPEN"); aw.apps[aw.n_apps].drop_action = XtNewString(""); aw.n_apps++; } /*----------------------------------------------------------------------------- PUBLIC FUNCTIONS -----------------------------------------------------------------------------*/ int parseApp(FILE *fp, Boolean loadicons) { char *name, *directory, *fname, *icon, *push_action, *drop_action; char s[MAXAPPSTRINGLEN]; int p; p = parseAppI(fp, &name, &directory, &fname, &icon, &push_action, &drop_action); if( p <= 0 ) return p; aw.apps = (AppList) XTREALLOC(aw.apps, (aw.n_apps+1)*sizeof(AppRec) ); aw.apps[aw.n_apps].name = XtNewString(strparse(s, name, "\\:")); aw.apps[aw.n_apps].directory = XtNewString(strparse(s, directory, "\\:")); aw.apps[aw.n_apps].icon = XtNewString(strparse(s, icon, "\\:")); aw.apps[aw.n_apps].push_action = XtNewString(strparse(s, push_action, "\\:")); aw.apps[aw.n_apps].drop_action = XtNewString(strparse(s, drop_action, "\\:")); /* look if it is old-format and try to fix it */ fname = strparse(s, fname, "\\:"); push_action = aw.apps[aw.n_apps].push_action; if( fname[0] != '\0' ) { if( strcmp(push_action,"LOAD") == 0 ) { char *appfile = dirConcat( aw.apps[aw.n_apps].directory, fname); XtFree(aw.apps[aw.n_apps].directory); aw.apps[aw.n_apps].directory = appfile; } else if( strcmp(push_action,"OPEN") == 0 ) { if( strcmp(fname,".") == 0 ) { /* everything already OK */ } else if( aw.apps[aw.n_apps].directory[0] == '\0' ) { char *dir = dirConcat("~",fname); XtFree(aw.apps[aw.n_apps].directory); aw.apps[aw.n_apps].directory = dir; } else { char *dir = dirConcat( aw.apps[aw.n_apps].directory, fname); XtFree(aw.apps[aw.n_apps].directory); aw.apps[aw.n_apps].directory = dir; } } else if( push_action[0] != '\0' ) { aw.apps[aw.n_apps].push_action = spaceConcat( push_action, fname); XtFree(push_action); } if( drop_action[0] != '\0' ) { char *action = spaceConcat( aw.apps[aw.n_apps].drop_action, fname); XtFree(aw.apps[aw.n_apps].drop_action); aw.apps[aw.n_apps].drop_action = action; } } if( loadicons ) readApplicationBitmap(&aw.apps[aw.n_apps],False); aw.n_apps++; return p; } /*-------------------------------------------------------------------------*/ void createApplicationWindow(void) { #ifndef ENHANCE_TRANSLATIONS XtTranslations t; #endif /* Add new actions and parse the translation tables */ XtAppAddActions(app_context, app_actions, XtNumber(app_actions)); #ifndef ENHANCE_TRANSLATIONS t = XtParseTranslationTable(app_translations); icon_toggle_args[3].value = (XtArgVal) t; t = XtParseTranslationTable(iconbox_translations); icon_box_args[1].value = (XtArgVal) t; #endif icon_label_args[3].value = (XtArgVal) resources.icon_font; /* create the install popups */ createInstallPopups(); /* create the menus */ app_popup_items = createFloatingMenu("app popup", app_popup_menu, XtNumber(app_popup_menu), 4, aw.shell, NULL, &app_popup_widget); app_popup_items1 = createFloatingMenu("app popup 1", app_popup_menu1, XtNumber(app_popup_menu1), 4, aw.shell, NULL, &app_popup_widget1); XtRegisterGrabAction(appPopup, True, ButtonPressMask | ButtonReleaseMask, GrabModeAsync, GrabModeAsync); /* create the form */ #ifndef ENHANCE_TRANSLATIONS aw.form = XtCreateManagedWidget("awform", formWidgetClass, aw.shell, #else aw.form = XtCreateManagedWidget("awform", formWidgetClass, aw.shell, #endif form_args, XtNumber(form_args) ); /* create the viewport */ aw.viewport = XtCreateManagedWidget("viewport", viewportWidgetClass, aw.form, viewport_args, XtNumber(viewport_args) ); /* create button box */ button_box_args[0].value = (XtArgVal) aw.viewport; aw.button_box = XtCreateManagedWidget("button box", boxWidgetClass, aw.form, button_box_args, XtNumber(button_box_args) ); aw_button_items = createButtons(aw_buttons, XtNumber(aw_buttons), aw.button_box, NULL); aw.n_selections = 0; } /*---------------------------------------------------------------------------*/ void createApplicationDisplay(void) { Cardinal i; Dimension width; for (i=0; i 0) fillIn(aw_button_items[0]); else grayOut(aw_button_items[0]); XtManageChild(aw.icon_box); } /*---------------------------------------------------------------------------*/ void updateApplicationDisplay(void) { XtDestroyWidget(aw.icon_box); createApplicationDisplay(); setApplicationWindowName(); } /*---------------------------------------------------------------------------*/ void setApplicationWindowName(void) { char *p; if ((p = strrchr(aw.app_file, '/'))) p++; else p = aw.app_file; XSetIconName(XtDisplay(aw.shell), XtWindow(aw.shell), p); XStoreName(XtDisplay(aw.shell), XtWindow(aw.shell), p); } /*---------------------------------------------------------------------------*/ void readApplicationData(void) { FILE *fp; int p; Cardinal i; aw.n_apps = 0; aw.apps = NULL; if (strcmp(aw.app_file,"XFM-DEVICES") == 0) { for (i=0; i 0 ); if (p == -1) error("Error in applications file", ""); if (fclose(fp)) sysError("Error reading applications file:"); aw.readonly = False; for (i=0; i 0 && strcasecmp(resources.app_dir,"none") != 0) { size_t len_basename; const char *p;char *n; if ((p = strrchr(aw.app_file, '/'))) p++; else p = aw.app_file; len_basename = strlen(p); n = XtMalloc(app_dir_len+len_basename+2); memcpy(n, resources.app_dir, app_dir_len); n[app_dir_len] = '/'; memcpy(n+app_dir_len+1, p, len_basename+1); if (!exists(resources.app_dir)){ mkdir(resources.app_dir,0777); } if ((fp = fopen(n, "w") )) { XTFREE(aw.app_file); aw.app_file = n; } else { XTFREE(n); } } #endif } if (! fp ) { sysError("Error writing applications file:"); return -1; } fprintf(fp, "#XFM\n"); for (i=0; i < aw.n_apps; i++) { fprintexpand(fp, aw.apps[i].name, "\\:"); fputc(':',fp); fprintexpand(fp, aw.apps[i].directory, "\\:"); fputc(':',fp); fputc(':',fp); fprintexpand(fp, aw.apps[i].icon, "\\:"); fputc(':',fp); fprintexpand(fp, aw.apps[i].push_action, "\\:"); fputc(':',fp); fprintexpand(fp, aw.apps[i].drop_action, "\\:"); fputc('\n',fp); } if (fclose(fp)) { sysError("Error writing applications file:"); return -1; } return 0; } /*---------------------------------------------------------------------------*/ void freeApplicationResources(AppRec *app) { XTFREE(app->name); XTFREE(app->directory); XTFREE(app->icon); XTFREE(app->push_action); XTFREE(app->drop_action); } /*---------------------------------------------------------------------------*/ void installApplication(const char *name, const char *directory, const char *icon, const char *push_action, const char *drop_action) { aw.apps = (AppList) XTREALLOC(aw.apps, (aw.n_apps+1) * sizeof(AppRec)); aw.apps[aw.n_apps].name = XtNewString(name); aw.apps[aw.n_apps].directory = XtNewString(directory); aw.apps[aw.n_apps].icon = XtNewString(icon); aw.apps[aw.n_apps].push_action = XtNewString(push_action); aw.apps[aw.n_apps].drop_action = XtNewString(drop_action); aw.apps[aw.n_apps].form = aw.apps[aw.n_apps].toggle = aw.apps[aw.n_apps].label = NULL; readApplicationBitmap(&aw.apps[aw.n_apps],True); /* only increment here so that readApplicationBitmap can show error * messages without this part already visible */ aw.n_apps++; } /*---------------------------------------------------------------------------*/ void replaceApplication(AppRec *app, const char *name, const char *directory, const char *icon, const char *push_action, const char *drop_action) { /* This is not the nicest way, but it works, as * freeApplicationResources no longer frees or unsets app->icon_bm, * readApplicationBitmap can be called interactive even afterwards, * as the old icon will still be visible - brl */ freeApplicationResources(app); app->name = XtNewString(name); app->directory = XtNewString(directory); app->icon = XtNewString(icon); app->push_action = XtNewString(push_action); app->drop_action = XtNewString(drop_action); app->form = app->toggle = app->label = NULL; readApplicationBitmap(app,True); } /*---------------------------------------------------------------------------*/ static void pushApplicationsFile(const char *filename) { int i = n_appst++; appst = (char **) XTREALLOC(appst, n_appst * sizeof(char *)); appst[i] = aw.app_file; if (filename[0] != '/' && strcmp(filename,"XFM-DEVICES") != 0) { char *fn = dirConcat(resources.app_dir, filename); if (exists(fn)) aw.app_file = fn; else { XtFree(fn); aw.app_file = dirConcat(resources.system_app_dir, filename); } } else aw.app_file = XtNewString(filename); } /*---------------------------------------------------------------------------*/ void popApplicationsFile(void) { if (n_appst <= 0) return; XTFREE(aw.app_file); aw.app_file = appst[--n_appst]; appst = (char **) XTREALLOC(appst, n_appst * sizeof(char *)); } /*---------------------------------------------------------------------------*/ void clearApplicationsStack(void) { int i; for (i = 0; i < n_appst; i++) XTFREE(appst[i]); XTFREE(appst); appst = NULL; n_appst = 0; } /* RBW Test stuff... */ static void CatchEntryLeave2(UNUSED(Widget w), UNUSED(XtPointer cld), XEvent* ev, Boolean *ctd) { /* RBW - eat extraneous LeaveNotify/EnterNotify events caused by some window managers when a ButtonPress happens, so that the Xt translation mechanism for double-clicks doesn't get confused. */ if (ev->xcrossing.mode == NotifyGrab || ev->xcrossing.mode == NotifyUngrab) { *ctd = False; /* Eat this event */ } else { *ctd = True; /* Don't eat this event */ } return; } void AmReadUpdate(void) { Cardinal i; for(i=0; i #include #include #include "global.h" #include "Fm.h" void deleteItems(UNUSED(Widget w), FileWindowRec *fw, UNUSED(XtPointer call_data)) { char error_string[0xff]; int i, n_deleted = 0; Boolean aborted; assert( fw != NULL ); if (!fw->n_selections) return; if (chdir(fw->directory)) { sysError("System error:"); return; } freeze = True; if (resources.confirm_deletes) { sprintf(error_string, "Deleting %d item%s from", fw->n_selections, fw->n_selections > 1 ? "s" : "" ); if (!fwConfirm(fw, error_string, fw->directory, "", NULL)) goto out; } for (i=0; i < fw->n_files; i++) if (fw->files[i]->selected) { if (!fw->files[i]->info.symlink && S_ISDIR(fw->files[i]->stats.st_mode)) { if (!strcmp(fw->files[i]->name, ".") || !strcmp(fw->files[i]->name, "..")) { error("Cannot delete . or ..", ""); continue; } /* first try to only delete the folder, do not delete recursively * or even ask for that if it is already empty */ if (rmdir(fw->files[i]->name)==0) { n_deleted++; continue; } if (resources.confirm_delete_folder && !fwConfirm(fw, "Do you REALLY wish to delete folder", fw->files[i]->name, "and ALL items contained in it?", &aborted)) { if (aborted) break; else continue; } } if (rdel(fw->files[i]->name)) { sysErrorFmt("Error deleting %s:", fw->files[i]->name); } else n_deleted++; } if (n_deleted) { markForUpdate(fw->directory); intUpdate(); } out: freeze = False; } /*---------------------------------------------------------------------------*/ void emptyDir(UNUSED(Widget w), FileWindowRec *fw, UNUSED(XtPointer call_data)) { char error_string[0xff]; int i, n_deleted = 0; Boolean aborted; if (chdir(fw->directory)) { sysError("System error:"); return; } freeze = True; if (resources.confirm_deletes) { int n_files = fw->display_type == Tree?fw->n_files-2:fw->n_files-1; sprintf(error_string, "Deleting %d item%s from", n_files, n_files > 1 ? "s" : "" ); if (!fwConfirm(fw, error_string, fw->directory, "", NULL)) goto out; } for (i=0; i < fw->n_files; i++) if (strcmp(fw->files[i]->name, ".") && strcmp(fw->files[i]->name, "..")) { if (!fw->files[i]->info.symlink && S_ISDIR(fw->files[i]->stats.st_mode) && resources.confirm_delete_folder && !fwConfirm(fw, "Do you REALLY wish to delete folder", fw->files[i]->name, "and ALL items contained in it?", &aborted)) { if (aborted) break; else continue; } if (rdel(fw->files[i]->name)) { sysErrorFmt("Error deleting %s:", fw->files[i]->name); } else n_deleted++; } if (n_deleted) { markForUpdate(fw->directory); intUpdate(); } out: freeze = False; } xfm-1.5.4/src/FmHistory.c0000644000175000017500000002524010657112102012111 00000000000000/* * This file is part of X-File Manager XFM * ---------------------------------------------------------------------- * Enhancements to the X-File Manager XFM-1.3.2 (Path History) * Copyright (C) 1997 by Till Straumann * * modified 2004,2005,2006,2007 by Bernhard R. Link (see Changelog) * ---------------------------------------------------------------------- * 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 of the License, 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include #include "FmHistory.h" #include #include #include #include "global.h" #include "TextField.h" #include "Fm.h" struct HistoryList_s { Widget menu,emanate; FileWindowRec *fw; HistoryList next; }; static Cardinal InsertAfterLine(Widget w); static void HistoryCB(Widget w,XtPointer cld,XtPointer cad); static void UpdateHistory(Widget w, XEvent *ev, String *args, Cardinal *nargs); static XtActionsRec actions[]={ {"FmUpdateHistory",UpdateHistory}, }; /* linked list of all historiy menus */ static HistoryList histories=0; HistoryList FmCreateHistoryList(const char* name, Widget parent, char *fixed_paths[]) { Widget menu; int i,j,found; Arg args[10]; Cardinal nargs; HistoryList hl; String str; hl=(HistoryList) XtMalloc(sizeof(struct HistoryList_s)); hl->emanate=0; hl->fw=0; menu=XtVaCreatePopupShell( name?name:"fm_history", simpleMenuWidgetClass, parent, (char*)0); /* does the menu have a label? */ XtSetArg(args[0],XtNlabel,&str); str=0; XtGetValues(menu,args,1); if (str) XtVaSetValues( XtNameToWidget(menu,"menuLabel"), XtNfont,resources.bold_font, (char*)0); nargs=0; XtSetArg(args[nargs],XtNlineWidth,0); nargs++; if (fixed_paths) for (i=0; fixed_paths[i]; i++) { /* eliminate redundant paths */ found=0; for (j=0; jmenu=menu; if (!histories) { /* invoked for the first time */ XtAppAddActions( XtWidgetToApplicationContext(parent), actions, XtNumber(actions)); } hl->next=histories; histories=hl; return hl; } void FmInsertHistoryPath(HistoryList hl, const char *path) { Widget *chlds; Widget history_menu=hl->menu; Cardinal num_children; int i; String str; Arg arg; /* retrieve the list */ XtVaGetValues( history_menu, XtNchildren,&chlds, XtNnumChildren,&num_children, (char*)0); XtSetArg(arg,XtNlabel,&str); /* omit the menu label */ str=0; XtGetValues(hl->menu,&arg,1); // i=(str?1:0); i = 1; /* is it an existing fixed entry ? */ while ( !XtIsSubclass(chlds[i],smeLineObjectClass) ) { XtGetValues(chlds[i],&arg,1); if (!strcmp(str,path)) return; i++; } i++; /* skip line */ /* remove old list entry */ while (i<(int)num_children) { XtGetValues(chlds[i],&arg,1); if (!strcmp(str,path)) { /* found it, delete */ XtDestroyWidget(chlds[i]); chlds=0; /* has changed! */ break; } i++; } /* insert new entry */ XtAddCallback( XtVaCreateManagedWidget( path, smeBSBObjectClass, history_menu, XtNfont,resources.menu_font, (char*)0), XtNcallback, HistoryCB, (XtPointer)hl); } void FmDeleteHistoryPath(HistoryList hl, const char *path) { Arg arg; Widget *chlds,found; Widget history_menu=hl->menu; Cardinal num_children; int i,haslabel; String str; XtVaGetValues( history_menu, XtNchildren,&chlds, XtNnumChildren,&num_children, (char*)0); XtSetArg(arg,XtNlabel,&str); /* look in the fixed entries omitting opt. label*/ str=0; XtGetValues(history_menu,&arg,1); haslabel=(str?1:0); i=haslabel; found=0; while ( !XtIsSubclass(chlds[i],smeLineObjectClass) ) { XtGetValues(chlds[i],&arg,1); /* keep on looking for the line */ if (!strcmp(str,path)) found=chlds[i]; i++; } if (found) { /* if this is the last fixed path, set the line width to zero */ if (i-haslabel==1) XtVaSetValues( chlds[i], XtNlineWidth,0, (char*)0); XtDestroyWidget(found); return; } i++; /* skip line */ while (i<(int)num_children) { XtGetValues(chlds[i],&arg,1); if (!strcmp(str,path)) { /* found it, delete */ XtDestroyWidget(chlds[i]); return; } i++; } } /* chop the list to n entries */ void FmChopHistoryList(HistoryList hl, int n) { Widget *chlds,*copy; Widget history_menu=hl->menu; Cardinal num_children,i; if (n<0) return; XtVaGetValues( history_menu, XtNchildren,&chlds, XtNnumChildren,&num_children, (char*)0); i=0; while (!XtIsSubclass(chlds[i],smeLineObjectClass)) i++; i++; num_children-=i; chlds+=i; if (n>=(int)num_children) return; num_children-=(Cardinal)n; chlds+=n; /* while destroying the children the list *chlds may change, * we better get a private copy. */ copy=(Widget*)(XtMalloc(sizeof(Widget)*(num_children))); for (i=0; inext); hlp=hlp->next;} if(hlp==0) XtError("FmHistory: tried to destroy invalid path history"); *last=hl->next; XtDestroyWidget(hl->menu); XtFree((char*) hl); } static Cardinal InsertAfterLine(Widget w) { Widget cw=XtParent(w), *chlds; Cardinal pos; XtVaGetValues(cw,XtNchildren,&chlds,(char*)0); pos=0; while(!XtIsSubclass(chlds[pos],smeLineObjectClass)) pos++; return pos+1; } static void cb_error(void) { XtWarning( "HistoryCB: something messed up, probably a translation\ table error (was the 'UpdateHistory'\n\ action called before popping up the menu?"); } static void HistoryCB(Widget w, XtPointer cld, UNUSED(XtPointer cad)) { char path[MAXPATHLEN]; char *dir; const char *str; HistoryList hl=(HistoryList)cld; Widget p; #ifdef ENHANCE_SCROLL Boolean keep_position=True; #endif XtVaGetValues(w, XtNlabel, &str, (char*)0); dir = dyn_fnexpand(str); /* was the history list set up correctly ? */ if (hl==0 || hl->menu != XtParent(w)) { cb_error(); XtFree(dir); return; } /* if the widget that popped up the menu is a text field, * then paste the selected path there. */ if (XtIsSubclass(hl->emanate,textFieldWidgetClass)) { const char *args[2]; args[0]="All"; XtCallActionProc(hl->emanate,"Delete",0,(char **)args,1); /* Suppress parsing of the string for special character * sequences (\t etc), take it 'as is' */ args[0]=dir; args[1]="F"; XtCallActionProc(hl->emanate,"InsertChar",0,(char **)args,2); XtFree(dir); return; } /* is there a File Manager? */ p=hl->emanate; if (!hl->fw) p=0; while(p && p != hl->fw->shell) p=XtParent(p); if (!p) { cb_error(); XtFree(dir); return; } if (chdir(str=dir)) { sysErrorFmt("Can't open folder %s:", dir); FmDeleteHistoryPath(hl, dir); if (chdir(str=hl->fw->directory)) { sysErrorFmt("Can't open folder %s:", str); FmDeleteHistoryPath(hl, str); } } else if (!getwd(path)) sysError("System error:"); else { #ifdef ENHANCE_SCROLL if (!(keep_position=(!strcmp(hl->fw->directory,path)))) #endif strcpy(hl->fw->directory, path); #ifdef ENHANCE_SCROLL updateFileDisplay(hl->fw,keep_position); #else updateFileDisplay(hl->fw); #endif } XtFree(dir); } static void UpdateHistory(Widget w, XEvent *ev, String *args, Cardinal *nargs) { Widget parent; FileWindowRec *fw; HistoryList hl; String str; WidgetList chlds,destroy; int i,line_i; Cardinal num_children; int n_dest, fixed, haslabel; Arg arg; struct stat buf; if (*nargs != 1) { XtAppWarning(XtWidgetToApplicationContext(w), "UpdateHistory: expects only one parameter which is the name of the menu."); return; } /* get the history list, for which this action was invoked */ hl=histories; while(hl && strcmp(XtName(hl->menu),args[0])) hl=hl->next; if (!hl) { XtAppWarningFmt(XtWidgetToApplicationContext(w), "UpdateHistory: menu '%s' not found in history list", args[0]); return; } /* update the history, eliminate invalid entries */ XtVaGetValues( hl->menu, XtNchildren,&chlds, XtNnumChildren,&num_children, (char*)0); destroy=(WidgetList)XtMalloc(sizeof(Widget) *num_children); n_dest=0; XtSetArg(arg,XtNlabel,&str); /* omit menu label */ str=0; XtGetValues(hl->menu,&arg,1); haslabel=(str?1:0); line_i=-1; fixed=0; for (i=(int)num_children-1; i>=haslabel ; i--) { str=0; XtGetValues(chlds[i],&arg,1); if ( XtIsSubclass(chlds[i],smeLineObjectClass)) { line_i=i; fixed=i-haslabel; } /* look for invalid path */ if (str && ( stat(str,&buf) || !S_ISDIR(buf.st_mode) )) { /* The list of children should not be tampered, * so we copy the death candidates and destroy * them later. */ destroy[n_dest++]=chlds[i]; if (inext) { parent=w; while (parent!=NULL && parent!=fw->shell) parent=XtParent(parent); if (parent) break; } hl->fw=fw; hl->emanate=w; XtCallActionProc(w,"XawPositionSimpleMenu",ev,args,*nargs); } xfm-1.5.4/src/FmStringDefs.c0000644000175000017500000000222210323730065012517 00000000000000/* * This file is part of X-File Manager XFM * ---------------------------------------------------------------------- * Copyright (C) 1997 by Till Straumann String definitions for the FileList, IconFileList and TextFileList widgets. * ---------------------------------------------------------------------- * 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 of the License, 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include "Fm_res_c" #include "Fm_class_c" #include "Fm_type_c" xfm-1.5.4/src/FmAwCb.c0000644000175000017500000002033610657577236011314 00000000000000/* * This file is part of X-File Manager XFM * ---------------------------------------------------------------------- FmAwCb.c (c) S.Marlow 1990-92 (c) A.Graef 1994 modified 2003,2005,2006,2007 by Bernhard R. Link (see Changelog) Callback routines for widgets in the application window * ---------------------------------------------------------------------- * 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 of the License, 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include #include #include "global.h" #include "Am.h" /*--------------------------------------------------------------------------- PUBLIC FUNCTIONS ---------------------------------------------------------------------------*/ void appInstallAppCb(UNUSED(Widget w), UNUSED(void *fw), UNUSED(void *call_data)) { installNewAppPopup(); } /*---------------------------------------------------------------------------*/ void appInstallGroupCb(UNUSED(Widget w), UNUSED(void *client_data), UNUSED(void *call_data)) { installGroupPopup(); } /*---------------------------------------------------------------------------*/ void appEditCb(UNUSED(Widget w), UNUSED(void *client_data), UNUSED(void *call_data)) { installExistingAppPopup(); } /*---------------------------------------------------------------------------*/ void appCutCb(UNUSED(Widget w), UNUSED(void *client_data), UNUSED(void *call_data)) { char s[0xff]; FILE *fp; Cardinal i, j; if (resources.confirm_moves) { sprintf(s, "Cutting %d item%s from", aw.n_selections, aw.n_selections > 1 ? "s" : "" ); if (!amConfirm(s, "the application window", "", NULL)) return; } if (! (fp = fopen(resources.app_clip, "w") )) { sysError("Error writing clip file:"); return; } fprintf(fp, "#XFM\n"); for (i=j=0; j 1 ? "s" : "" ); if (!amConfirm(s, "the application window", "", NULL)) return; } if (! (fp = fopen(resources.app_clip, "w") )) { sysError("Error writing clip file:"); return; } fprintf(fp, "#XFM\n"); for (i=0; i < aw.n_apps; i++) if (aw.apps[i].selected) { fprintexpand(fp, aw.apps[i].name, "\\:"); fputc(':',fp); fprintexpand(fp, aw.apps[i].directory, "\\:"); fputc(':',fp); fputc(':',fp); fprintexpand(fp, aw.apps[i].icon, "\\:"); fputc(':',fp); fprintexpand(fp, aw.apps[i].push_action, "\\:"); fputc(':',fp); fprintexpand(fp, aw.apps[i].drop_action, "\\:"); fputc('\n',fp); } if (fclose(fp)) sysError("Error writing clip file:"); } /*---------------------------------------------------------------------------*/ void appPasteCb(UNUSED(Widget w), UNUSED(void *client_data), UNUSED(void *call_data)) { FILE *fp; int p; if (!(fp = fopen(resources.app_clip, "r"))) return; do{ p = parseApp(fp,True); } while( p > 0 ); if (p == -1) error("Error in clip file", ""); if (fclose(fp)) sysError("Error reading clip file:"); updateApplicationDisplay(); writeApplicationData(); } /*---------------------------------------------------------------------------*/ void appRemoveCb(UNUSED(Widget w), UNUSED(void *client_data), UNUSED(void *call_data)) { char s[0xff]; Cardinal i, j; if (resources.confirm_deletes) { sprintf(s, "Deleting %d item%s from", aw.n_selections, aw.n_selections > 1 ? "s" : "" ); if (!amConfirm(s, "the application window", "", NULL)) return; } for (i=j=0; j 0) { popApplicationsFile(); AmReadUpdate(); } } /*---------------------------------------------------------------------------*/ void appOpenCb(UNUSED(Widget w), UNUSED(void *client_data), UNUSED(void *call_data)) { newFileWindow(user.home,resources.initial_display_type,False); } /*---------------------------------------------------------------------------*/ void appCloseCb(UNUSED(Widget w), UNUSED(void *client_data), UNUSED(void *call_data)) { if (resources.confirm_quit && !amConfirm("", "Exit file manager?", "", NULL)) return; quit(0); } /*---------------------------------------------------------------------------*/ void aboutCb(UNUSED(Widget w), UNUSED(void *client_data), UNUSED(void *call_data)) { aboutPopup(aw.shell); } xfm-1.5.4/src/FmDirs.c0000644000175000017500000002064410656605307011371 00000000000000/* * This file is part of X-File Manager XFM * ---------------------------------------------------------------------- FmDirs.c (c) Simon Marlow 1990-1993 (c) Albert Graef 1994 modified 1-29-95 by rodgers@lvs-emh.lvs.loral.com (Kevin M. Rodgers) to add filtering of icon/text directory displays by a filename filter. modified 7-1997 by strauman@sun6hft.ee.tu-berlin.de to add different enhancements (see README-1.4). modified 2004,2005 by Bernhard R. Link (see Changelog) functions for manipulating directory lists, and some other utilities related to the file system. * ---------------------------------------------------------------------- * 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 of the License, 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include #include #include #include "Fm.h" #ifdef ENHANCE_SELECTION #include "FmSelection.h" #endif /*----------------------------------------------------------------------------- STATIC DATA -----------------------------------------------------------------------------*/ static SortType sort_type; static Boolean dirs_first; /*----------------------------------------------------------------------------- PRIVATE FUNCTIONS -----------------------------------------------------------------------------*/ static int comp(FileRec **fr1, FileRec **fr2) { FileRec *fl1 = *fr1, *fl2 = *fr2; if (dirs_first) { if (S_ISDIR(fl1->stats.st_mode)) { if (!S_ISDIR(fl2->stats.st_mode)) return -1; } else if (S_ISDIR(fl2->stats.st_mode)) return 1; } switch (sort_type) { case SortByName: return strcmp(fl1->name, fl2->name); case SortBySize: return (int)(fl2->stats.st_size - fl1->stats.st_size); case SortByMTime: return (int)(fl2->stats.st_mtime - fl1->stats.st_mtime); } return 0; } /*----------------------------------------------------------------------------- PUBLIC FUNCTIONS -----------------------------------------------------------------------------*/ /* Read in the directory for the file window specified. Note that since we have the stats available for the directory, we could simply check the modification time, and only read in the directory if necessay. This isn't worth it though- the time taken to stat all the files (which still needs to be done) far outweighs the time to read in the dir */ Boolean readDirectory(FileWindowRec *fw) { FileList fl = NULL; DIR *dir; struct dirent *entry; int d, i, m; if ((d = findDev(fw->directory)) != -1) if( !mountDev(d) ) d = -1; fw->dev = d; if (stat(fw->directory, &fw->stats)) goto error2; if (chdir(fw->directory)) goto error2; if (!(dir = opendir("."))) goto error2; fw->n_bytes = 0; for(i = 0; (entry = readdir(dir)); i++) { fl = (FileRec **) XTREALLOC(fl, (i+1)*sizeof(FileRec *)); fl[i] = (FileRec *) XtMalloc(sizeof(FileRec)); fl[i]->width = 0; fl[i]->name = xstrdup(entry->d_name); fl[i]->reducedname = NULL; fl[i]->reducedlen = 0; fl[i]->mime_type = NULL; magic_get_type(entry->d_name, &fl[i]->magic_type, &fl[i]->mime_type,&fl[i]->info,&fl[i]->stats); fl[i]->selected = False; fw->n_bytes += fl[i]->stats.st_size; } if (closedir(dir)) goto error1; fw->files = fl; fw->n_files = i; return True; error1: for(m = 0; m <= i; m++) { XTFREE(fl[m]->name); XTFREE(fl[m]->reducedname); XTFREE(fl[m]); } XTFREE(fl); error2: return False; } /*----------------------------------------------------------------------------- Remove either files or directories from a FileList -----------------------------------------------------------------------------*/ void filterDirectory(FileWindowRec *fw, FilterType type) { FileList fl = NULL, oldfl = fw->files; int n = 0, m = 0; #ifdef DEBUG_MALLOC fprintf(stderr,"entering filterDirectory: %lu\n",malloc_inuse(NULL)); #endif fw->n_bytes = 0; for (; m < fw->n_files; m++) { if ( ( !strcmp(oldfl[m]->name,".") && (type == Directories) ) || ( strcmp(oldfl[m]->name,".") && ( !strcmp(oldfl[m]->name,"..") || ( (fw->show_hidden || (oldfl[m]->name[0] != '.')) && ( (S_ISDIR(oldfl[m]->stats.st_mode) && (type != Files)) || (!S_ISDIR(oldfl[m]->stats.st_mode) && type != Directories) ) ) ) ) ) { /* KMR now filter on dirFilter (I wouldn't dare mess with the above!) */ /* AG modified to exclude folders from filtering */ if ((type == Directories) || !fw->do_filter || S_ISDIR(oldfl[m]->stats.st_mode) || fnmatch(fw->dirFilter, oldfl[m]->name)) { fl = (FileList) XTREALLOC(fl, (n+1)*sizeof(FileRec *)); fl[n] = oldfl[m]; n++; fw->n_bytes += oldfl[m]->stats.st_size; } else { XTFREE(oldfl[m]->name); XTFREE(oldfl[m]->reducedname); XTFREE(oldfl[m]); } } else { XTFREE(oldfl[m]->name); XTFREE(oldfl[m]->reducedname); XTFREE(oldfl[m]); } } XTFREE(oldfl); #ifdef DEBUG_MALLOC fprintf(stderr,"exiting filterDirectory: %lu\n",malloc_inuse(NULL)); #endif fw->n_files = n; fw->files = fl; } /*----------------------------------------------------------------------------- Sort a directory according to the sort type and dfirst flag -----------------------------------------------------------------------------*/ void sortDirectory(FileList fl, int n, SortType type, Boolean dfirst) { sort_type = type; dirs_first = dfirst; qsort(fl, n, sizeof(FileRec *), (int (*)(const void *, const void *))comp); } /*----------------------------------------------------------------------------- Check permission for an operation, equivalent to UNIX access() -----------------------------------------------------------------------------*/ int permission(struct stat *stats, int perms) { int mode = stats->st_mode; int result = 0; if (user.uid == 0 || user.uid == stats->st_uid) { if (mode & S_IRUSR) result |= P_READ; if (mode & S_IWUSR) result |= P_WRITE; if (mode & S_IXUSR) result |= P_EXECUTE; } else if (user.uid == 0 || user.gid == stats->st_gid) { if (mode & S_IRGRP) result |= P_READ; if (mode & S_IWGRP) result |= P_WRITE; if (mode & S_IXGRP) result |= P_EXECUTE; } else { if (mode & S_IROTH) result |= P_READ; if (mode & S_IWOTH) result |= P_WRITE; if (mode & S_IXOTH) result |= P_EXECUTE; } return (result & perms) == perms; } void makePermissionsString(char *s, unsigned int perms) { #ifdef ENHANCE_PERMS const char *xprm1="-xSs"; const char *xprm2="-xTt"; int idx; #endif s[0] = perms & S_IRUSR ? 'r' : '-'; s[1] = perms & S_IWUSR ? 'w' : '-'; #ifdef ENHANCE_PERMS idx = perms & S_IXUSR ? 1:0; idx+= perms & S_ISUID ? 2:0; s[2]= xprm1[idx]; #else s[2] = perms & S_IXUSR ? 'x' : '-'; #endif s[3] = perms & S_IRGRP ? 'r' : '-'; s[4] = perms & S_IWGRP ? 'w' : '-'; #ifdef ENHANCE_PERMS idx = perms & S_IXGRP ? 1:0; idx+= perms & S_ISGID ? 2:0; s[5]= xprm1[idx]; #else s[5] = perms & S_IXGRP ? 'x' : '-'; #endif s[6] = perms & S_IROTH ? 'r' : '-'; s[7] = perms & S_IWOTH ? 'w' : '-'; #ifdef ENHANCE_PERMS idx = perms & S_IXOTH ? 1:0; idx+= perms & S_ISVTX ? 2:0; s[8]= xprm2[idx]; #else s[8] = perms & S_IXOTH ? 'x' : '-'; #endif s[9] = '\0'; } /*---------------------------------------------------------------------------*/ void freeFileList(FileWindowRec *fw) { int i; #ifdef ENHANCE_SELECTION FmDisownSelection(fw); #endif if (fw->files) { for (i = 0; i < fw->n_files; i++) { XTFREE(fw->files[i]->name); XTFREE(fw->files[i]->reducedname); XTFREE(fw->files[i]); } XTFREE(fw->files); fw->files = NULL; } fw->n_files = 0; fw->n_bytes = 0; } xfm-1.5.4/src/FmInfo.c0000644000175000017500000002170610657627271011370 00000000000000/* * This file is part of X-File Manager XFM * ---------------------------------------------------------------------- FmInfo.c (c) Simon Marlow 1990-92 (c) Albert Graef 1994 modified 2004,2005,2006,2007 by Bernhard R. Link (see Changelog) Routines for creating and initialising the info window. * ---------------------------------------------------------------------- * 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 of the License, 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include #include #include #include #include #include #include #include #include "global.h" #include "Am.h" #include "Fm.h" #define LABEL_WIDTH 200 #define PADDING 30 #define I_NAME 0 #define I_LENGTH 1 #define I_OWNER 2 #define I_GROUP 3 #define I_ACCESS 4 #define I_TYPE 5 #define I_CONTENT 6 #define I_LINK 7 #define I_MODIFY_T 8 #define I_STATUS_T 9 #define N_ITEMS 10 /*--------------------------------------------------------------------------- DATA ---------------------------------------------------------------------------*/ typedef struct InfoData { Widget shell; Widget items[N_ITEMS]; } InfoData; /*--------------------------------------------------------------------------- Strings to go in labels ---------------------------------------------------------------------------*/ static const char *labels[] = { "Name", "Length", "Owner", "Group", "Access Permissions", "Type", "Content-Type", "Symbolic Link To", "Last Modification", "Last Status Change" }; /*--------------------------------------------------------------------------- Widget argument lists ---------------------------------------------------------------------------*/ static Arg *form_args = NULL; static Arg left_args[] = { { XtNfromHoriz, (XtArgVal) NULL }, { XtNfromVert, (XtArgVal) NULL }, { XtNlabel, (XtArgVal) NULL }, { XtNwidth, (XtArgVal) 0 }, { XtNjustify, XtJustifyRight }, { XtNfont, (XtArgVal) NULL }, { XtNresize, False }, { XtNinternalWidth, (XtArgVal) 0 }, { XtNhorizDistance, (XtArgVal) PADDING }, { XtNtop, XtChainTop }, { XtNbottom, XtChainTop }, { XtNleft, XtChainLeft }, { XtNright, XtChainLeft } }; static Arg right_args[] = { { XtNfromHoriz, (XtArgVal) NULL }, { XtNfromVert, (XtArgVal) NULL }, { XtNlabel, (XtArgVal) NULL }, { XtNwidth, (XtArgVal) LABEL_WIDTH }, { XtNjustify, XtJustifyLeft }, { XtNfont, (XtArgVal) NULL }, { XtNresize, False }, { XtNinternalWidth, (XtArgVal) 0 }, { XtNhorizDistance, (XtArgVal) PADDING }, { XtNtop, XtChainTop }, { XtNbottom, XtChainTop }, { XtNleft, XtChainLeft }, { XtNright, XtChainRight } }; static Arg button_box_args[] = { { XtNfromHoriz, (XtArgVal) NULL }, { XtNfromVert, (XtArgVal) NULL }, { XtNtop, XtChainTop }, { XtNbottom, XtChainTop }, { XtNleft, XtChainLeft }, { XtNright, XtChainLeft } }; static Arg shell_args[] = { { XtNtitle, (XtArgVal) "File Information" }, { XtNtransientFor, (XtArgVal) NULL }, }; /*--------------------------------------------------------------------------- PRIVATE FUNCTIONS ---------------------------------------------------------------------------*/ static void infoOkCb(UNUSED(Widget w), void *client_data, UNUSED(void *call_data)) { freeze = False; XtPopdown((Widget)client_data); } static void infoDestroyedCb(UNUSED(Widget w), void *client_data, UNUSED(void *call_data)) { XtFree(client_data); } /*--------------------------------------------------------------------------- Button data ---------------------------------------------------------------------------*/ static const ButtonRec info_buttons[] = { { "cancel", "Cancel", infoOkCb } }; /*--------------------------------------------------------------------------- PUBLIC FUNCTIONS ---------------------------------------------------------------------------*/ static void createInfoPopup(InfoData **out, FileWindowRec *fw) { int i; Widget form, w; Dimension left_width = 0; InfoData *info; info = (InfoData*)XtMalloc(sizeof(InfoData)); /* create shell */ shell_args[1].value = (XtArgVal) fw->shell; info->shell = XtCreatePopupShell("info", transientShellWidgetClass, aw.shell, shell_args, XtNumber(shell_args)); /* create outer form */ form = XtCreateManagedWidget("form", formWidgetClass, info->shell, form_args, XtNumber(form_args) ); left_args[5].value = (XtArgVal) resources.bold_font; right_args[5].value = (XtArgVal) resources.label_font; for (i=0; i left_width) left_width = l; } left_args[3].value = (XtArgVal) left_width; /* create all the smaller labels */ w = NULL; for (i=0; iitems[i] = XtCreateManagedWidget("rightlabel", labelWidgetClass, form, right_args, XtNumber(right_args)); } button_box_args[1].value = (XtArgVal) w; w = XtCreateManagedWidget("button box", boxWidgetClass, form, button_box_args, XtNumber(button_box_args)); createButtons(info_buttons, XtNumber(info_buttons), w, info->shell); #ifdef ENHANCE_POP_ACCEL XtInstallAllAccelerators(form, form); XtInstallAllAccelerators(info->shell, form); #endif XtRealizeWidget(info->shell); setWMProps(info->shell); XtAddCallback(info->shell, XtNdestroyCallback, infoDestroyedCb, info); *out = info; } /*---------------------------------------------------------------------------*/ void infoPopup(UNUSED(Widget w), FileWindowRec *fw, UNUSED(void *call_data)) { char s[11], link[MAXPATHLEN]; const char *type; struct passwd *pw; struct group *gp; const FileRec *file = NULL; int i; assert( fw != NULL ); if (!fw->n_selections) return; if (fw->info == NULL) createInfoPopup(&fw->info, fw); for (i=0;; i++) if (fw->files[i]->selected) { file = fw->files[i]; break; } assert( file != NULL ); XtVaSetValues(fw->info->items[I_NAME], XtNlabel, (XtArgVal) file->name, NULL); sprintf(s, "%lu", (unsigned long) file->stats.st_size); XtVaSetValues(fw->info->items[I_LENGTH], XtNlabel, (XtArgVal) s, NULL); if (!(pw = getpwuid(file->stats.st_uid))) sprintf(s, "%lu", (unsigned long) file->stats.st_uid); XtVaSetValues(fw->info->items[I_OWNER], XtNlabel, (XtArgVal) (pw?pw->pw_name:s), NULL); if (!(gp = getgrgid(file->stats.st_gid))) sprintf(s, "%lu", (unsigned long) file->stats.st_gid); XtVaSetValues(fw->info->items[I_GROUP], XtNlabel, (XtArgVal) (gp?gp->gr_name:s), NULL); makePermissionsString(s, file->stats.st_mode); XtVaSetValues(fw->info->items[I_ACCESS], XtNlabel, (XtArgVal) s, NULL); if(file->info.symlink) { type = "Symbolic link"; if (chdir(fw->directory)) { sysError("System error:"); return; } i = readlink(file->name, link, MAXPATHLEN); if (i == -1) { sysError("Error reading link:"); return; } link[i] = '\0'; XtVaSetValues(fw->info->items[I_LINK], XtNlabel, (XtArgVal) link, NULL); } else { mode_t mode = file->stats.st_mode; /* TODO: how often is this implemented? Look if this can be removed here*/ if (S_ISDIR(mode)) type = "Directory"; else if (S_ISCHR(mode)) type = "Character special file"; else if(S_ISBLK(mode)) type = "Block special file"; else if(S_ISSOCK(mode)) type = "Socket"; else if(S_ISFIFO(mode)) type = "Pipe or FIFO special file"; else type = "Ordinary file"; XtVaSetValues(fw->info->items[I_LINK], XtNlabel, (XtArgVal) "-", NULL); } XtVaSetValues(fw->info->items[I_TYPE], XtNlabel, (XtArgVal) type, NULL); type = file->magic_type; XtVaSetValues(fw->info->items[I_CONTENT], XtNlabel, (XtArgVal) type, NULL); XtVaSetValues(fw->info->items[I_MODIFY_T], XtNlabel, (XtArgVal) ctime(&file->stats.st_mtime), NULL); XtVaSetValues(fw->info->items[I_STATUS_T], XtNlabel, (XtArgVal) ctime(&file->stats.st_ctime), NULL); freeze = True; popupByCursor(fw->info->shell, XtGrabExclusive); } xfm-1.5.4/src/FmUtils.c0000644000175000017500000007340110657377707011602 00000000000000/* * This file is part of X-File Manager XFM * ---------------------------------------------------------------------- FmUtils.c (c) Simon Marlow 1990-1993 (c) Albert Graef 1994 - default values for parameters added in varPopup() by Brian King (ender@ee.WPI.EDU), integrated Mar 24 1995, AG modified 7-1997 by strauman@sun6hft.ee.tu-berlin.de to add different enhancements (see README-1.4). modified 2004,2005,2006,2007 by Bernhard R. Link (see Changelog) General utility functions for creating menus, buttons, questions, and functions for desensetising and 'ticking' menu entries. * ---------------------------------------------------------------------- * 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 of the License, 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include "TextField.h" #include "FocusForm.h" #include "FmVersion.h" #include "global.h" #include "Am.h" #include "Fm.h" #define PADDING 20 #define TEXT_WIDTH 350 #define kDefaultValueMarker "--" /* Marker to denote default value */ #define kDefaultValue "" /* Default Value to use if none specified */ /*----------------------------------------------------------------------------- STATIC DATA -----------------------------------------------------------------------------*/ /*----------------------------------------------------------------------------- Widget Argument Lists -----------------------------------------------------------------------------*/ static Arg shell_args[] = { { XtNtitle, (XtArgVal) NULL }, { XtNtransientFor, (XtArgVal) NULL } }; static Arg form_args[] = { { XtNdefaultDistance, PADDING } }; static Arg bitmap_args[] = { { XtNfromHoriz, (XtArgVal) NULL }, { XtNfromVert, (XtArgVal) NULL }, { XtNbitmap, (XtArgVal) NULL }, { XtNtop, (XtArgVal) XtChainTop }, { XtNbottom, (XtArgVal) XtChainTop }, { XtNleft, (XtArgVal) XtChainLeft }, { XtNright, (XtArgVal) XtChainLeft } }; static Arg label_args[] = { { XtNfromHoriz, (XtArgVal) NULL }, { XtNfromVert, (XtArgVal) NULL }, { XtNlabel, (XtArgVal) NULL }, { XtNwidth, (XtArgVal) 0 }, { XtNfont, (XtArgVal) NULL }, { XtNjustify, XtJustifyRight }, { XtNinternalWidth, (XtArgVal) 0 }, { XtNinternalHeight, (XtArgVal) 0 }, { XtNtop, XtChainTop }, { XtNbottom, XtChainTop }, { XtNleft, XtChainLeft }, { XtNright, XtChainLeft } }; static Arg text_args[] = { { XtNfromHoriz, (XtArgVal) NULL }, { XtNfromVert, (XtArgVal) NULL }, { XtNstring, (XtArgVal) NULL }, { XtNlength, (XtArgVal) NULL }, { XtNwidth, (XtArgVal) TEXT_WIDTH }, { XtNfont, (XtArgVal) NULL }, { XtNtop, XtChainTop }, { XtNbottom, XtChainTop }, { XtNleft, XtChainLeft }, { XtNright, XtChainRight }, { XtNfocusInterest, True }, { XtNuseStringInPlace, (XtArgVal) True }, }; static Arg button_box_args[] = { { XtNfromHoriz, (XtArgVal) NULL }, { XtNfromVert, (XtArgVal) NULL }, { XtNtop, XtChainTop }, { XtNbottom, XtChainTop }, { XtNleft, XtChainLeft }, { XtNright, XtChainLeft } }; static Arg button_args[] = { { XtNlabel, (XtArgVal) NULL }, { XtNfont, (XtArgVal) NULL } }; static Arg menu_button_args[] = { { XtNlabel, (XtArgVal) NULL }, { XtNfont, (XtArgVal) NULL } }; static Arg menu_item_args[] = { { XtNlabel, (XtArgVal) NULL }, { XtNfont, (XtArgVal) NULL }, { XtNleftMargin , (XtArgVal) 0 } }; /*----------------------------------------------------------------------------- PUBLIC FUNCTIONS -----------------------------------------------------------------------------*/ void initUtils() { button_args[1].value = (XtArgVal) resources.button_font; menu_button_args[1].value = (XtArgVal) resources.button_font; menu_item_args[1].value = (XtArgVal) resources.menu_font; label_args[4].value = (XtArgVal) resources.label_font; text_args[5].value = (XtArgVal) resources.cell_font; } /*****************************************************************************/ /* Function: createFloatingMenu */ /* Arguments: menu_name : The menu widget name */ /* items : Items to put in menu */ /* n_items : Number of items */ /* left_margin : left_margin in pixels (in case ticks are needed */ /* parent : The parent widget to use */ /* client_data : Client data to be returned by any callback */ /* menu_widget : returns the menu widget */ /* */ /* Create a popup menu with the specified attributes and place in it the */ /* specifed items; return the list of item widgets */ /*****************************************************************************/ Widget *createFloatingMenu(const char *menu_name, const MenuItemRec *items, Cardinal n_items, Dimension left_margin, Widget parent, XtPointer client_data, Widget *menu_widget) { Cardinal i; Widget *item_widgets; item_widgets = (Widget *) XtMalloc(n_items * sizeof(Widget)); *menu_widget = XtCreatePopupShell(menu_name, simpleMenuWidgetClass, parent, NULL, 0 ); menu_item_args[2].value = (XtArgVal) left_margin; for (i = 0; i < n_items; i++) { if (items[i].callback == NULL) XtCreateManagedWidget(items[i].item_name, smeLineObjectClass, *menu_widget, NULL, 0 ); else { menu_item_args[0].value = (XtArgVal) items[i].item_label; item_widgets[i] = XtCreateManagedWidget(items[i].item_name, smeBSBObjectClass, *menu_widget, menu_item_args, XtNumber(menu_item_args)); XtAddCallback(item_widgets[i], XtNcallback, (XtCallbackProc) items[i].callback, client_data ); } } return item_widgets; } /*****************************************************************************/ /* Function: createMenu */ /* Arguments: menu_name : The menu widget name */ /* menu_label : The label for the menu button */ /* items : Items to put in menu */ /* n_items : Number of items */ /* left_margin : left_margin in pixels (in case ticks are needed */ /* parent : The parent widget to use */ /* client_data : Client data to be returned by any callback */ /* */ /* Create a menu with the specified attributes and place in it the */ /* specifed items */ /*****************************************************************************/ Widget *createMenu(const char *menu_name, const char *menu_label, const MenuItemRec *items, Cardinal n_items, Dimension left_margin, Widget parent, XtPointer client_data) { Cardinal i; Widget menu_widget, button_widget, *item_widgets; item_widgets = (Widget *) XtMalloc(n_items * sizeof(Widget)); menu_button_args[0].value = (XtArgVal) menu_label; button_widget = XtCreateManagedWidget(menu_name, menuButtonWidgetClass, parent, menu_button_args, XtNumber(menu_button_args)); menu_widget = XtCreatePopupShell( "menu", simpleMenuWidgetClass, button_widget, NULL, 0 ); menu_item_args[2].value = (XtArgVal) left_margin; for (i = 0; i < n_items; i++) { if (items[i].callback == NULL) XtCreateManagedWidget(items[i].item_name, smeLineObjectClass, menu_widget, NULL, 0 ); else { menu_item_args[0].value = (XtArgVal) items[i].item_label; item_widgets[i] = XtCreateManagedWidget(items[i].item_name, smeBSBObjectClass, menu_widget, menu_item_args, XtNumber(menu_item_args)); XtAddCallback(item_widgets[i], XtNcallback, (XtCallbackProc) items[i].callback, client_data ); } } return item_widgets; } /*****************************************************************************/ /* Function: createButtons */ /* Arguments: buttons : The list of buttons to create */ /* n_buttons : Number of buttons */ /* parent : The parent widget to use */ /* client data : Client data returned by all buttons */ /* */ /* Create a set of buttons (usually in a box) with the attributes specified */ /*****************************************************************************/ Widget *createButtons(const ButtonRec *buttons, Cardinal n_buttons, Widget parent, XtPointer client_data) { Cardinal i; Widget *button_widgets; button_widgets = (Widget *) XtMalloc(n_buttons * sizeof(Widget)); for (i = 0; i < n_buttons; i++) { button_args[0].value = (XtArgVal) buttons[i].button_label; button_widgets[i] = XtCreateManagedWidget(buttons[i].button_name, commandWidgetClass, parent, button_args, XtNumber(button_args)); XtAddCallback(button_widgets[i], XtNcallback, (XtCallbackProc) buttons[i].callback, client_data ); } return button_widgets; } void popdownPopup(struct PopupDialog *p) { XtPopdown(p->shell); } void reloadPopupData(struct PopupDialog *p) { Cardinal i; for (i=0; icount; i++) { XtVaSetValues(p->fields[i].widget, XtNstring, (XtArgVal)p->fields[i].answer, XtNinsertPosition, (XtArgVal)0, NULL); } } bool setPopupData(struct PopupDialog *p, Cardinal i, const char *value) { size_t l,m; struct PopupDialogField *f; assert(i < p->count); assert(value != NULL); l = strlen(value); m = p->questions[i].length; f = p->fields + i; if (l>=m) { memcpy(f->answer,value,m-1); f->answer[m-1] = '\0'; XtVaSetValues(f->widget, XtNstring, (XtArgVal)f->answer, XtNinsertPosition, (XtArgVal)0, NULL); return true; } else { memcpy(p->fields[i].answer,value,l+1); XtVaSetValues(f->widget, XtNstring, (XtArgVal)f->answer, NULL); return false; } } void popupPopupByCursor(struct PopupDialog *p, void *data) { p->data = data; popupByCursor(p->shell, XtGrabExclusive); } static void popupDialogDestroyed(UNUSED(Widget w), XtPointer client_data, UNUSED(XtPointer call_data)) { Cardinal i; struct PopupDialog *p = client_data; p->shell = NULL; if( p->clear_ptr != NULL ) *p->clear_ptr = NULL; for (i=0; i < p->count ; i++) { XTFREE(p->fields[i].answer); } XTFREE(p); } /*****************************************************************************/ /* Function: createPopupQuestions */ /* Arguments: out : Variable to set and remember for clearing */ /* parent : The widget's parent */ /* name : The widget name for the shell */ /* title : The title of the popup window */ /* bitmap : A bitmap to display to the left of the box */ /* questions : A list of questions to use */ /* n_questions : Number of questions */ /* buttons : A set of buttons to put at the bottom */ /* n_buttons : Number of buttons */ /* dflt_button : Default button to use when the popup is closed */ /* (WM_DELETE_WINDOW message) */ /* */ /* Create a popup questionaire with a bitmap to the left (or none), several */ /* questions (each consisting of a label and a text area) to the right of */ /* the bitmap, and a set of buttons underneath all this. */ /*****************************************************************************/ void createPopupQuestions(struct PopupDialog **out, Widget parent, const char *name, const char *title, Pixmap bitmap, const QuestionRec *questions, Cardinal n_questions, const PDButtonRec *buttons, Cardinal n_buttons, Cardinal dflt_button) { Cardinal i; int l; struct PopupDialog *popup; Widget form_widget, box_widget, bitmap_widget = NULL, vert = NULL, horiz = NULL; Widget *button_widgets; #ifdef ENHANCE_POP_ACCEL #ifndef ENHANCE_TRANSLATIONS int flag; #endif #endif popup = (void*)XtMalloc(sizeof(struct PopupDialog)+n_questions*sizeof(struct PopupDialogField)); popup->clear_ptr = NULL; popup->questions = questions; popup->count = n_questions; for (i = 0; i < n_questions ; i++) { popup->fields[i].answer = XtCalloc(1,questions[i].length+1); } /* create popup shell */ shell_args[0].value = (XtArgVal) title; shell_args[1].value = (XtArgVal) parent; popup->shell = XtCreatePopupShell(name, transientShellWidgetClass, parent, shell_args, XtNumber(shell_args) ); /* create form */ form_args[0].value = PADDING; form_widget = XtCreateManagedWidget("popup form", focusFormWidgetClass, popup->shell, form_args, XtNumber(form_args) ); /* create bitmap */ if (bitmap != None) { bitmap_args[2].value = (XtArgVal) bitmap; bitmap_widget = XtCreateManagedWidget("bitmap", labelWidgetClass, form_widget, bitmap_args, XtNumber(bitmap_args)); } label_args[5].value = XtJustifyRight; /* Find width of label */ label_args[3].value = (XtArgVal) 0; for (i=0; i label_args[3].value) label_args[3].value = l; } for (i = 0; ifields[i].answer; text_args[3].value = (XtArgVal) questions[i].length; vert = popup->fields[i].widget = XtCreateManagedWidget("text", textFieldWidgetClass, form_widget, text_args, XtNumber(text_args)); } if (buttons != NULL) { button_box_args[0].value = (XtArgVal) NULL; button_box_args[1].value = (XtArgVal) vert; box_widget = XtCreateManagedWidget("button box", boxWidgetClass, form_widget, button_box_args, XtNumber(button_box_args)); button_widgets = createButtons((const ButtonRec*)buttons, n_buttons, box_widget, popup); #ifdef ENHANCE_POP_ACCEL for (i = 0; ifields[i].widget,form_widget); } XtInstallAllAccelerators(form_widget,form_widget); XtInstallAllAccelerators(popup->shell,form_widget); #ifndef ENHANCE_TRANSLATIONS for (i=0;iReturn:set()notify()unset()\n Linefeed:set()notify()unset()\n": "WM_PROTOCOLS:set()notify()unset()\nEscape:set()notify()unset()\n"), NULL); } } #endif #endif XTFREE(button_widgets); } popup->clear_ptr = out; XtAddCallback(popup->shell, XtNdestroyCallback, popupDialogDestroyed, popup); XtRealizeWidget(popup->shell); setWMProps(popup->shell); *out = popup; } /*****************************************************************************/ /* Function: fillIn */ /* Arguments: w : The widget to fill in */ /* */ /* sensitize a menu entry */ /*****************************************************************************/ void fillIn(Widget w) { XtVaSetValues(w, XtNsensitive, (XtArgVal) True, NULL); } /*****************************************************************************/ /* Function: grayOut */ /* Arguments: w : the widget to gray out */ /* */ /* desensitises a menu entry */ /*****************************************************************************/ void grayOut(Widget w) { XtVaSetValues(w, XtNsensitive, (XtArgVal) False, NULL); } /*****************************************************************************/ /* Function: tick */ /* Arguments: w : the widget to tick */ /* */ /* place a tick to the left of the specifed menu entry */ /*****************************************************************************/ void tick(Widget w) { XtVaSetValues(w, XtNleftBitmap, (XtArgVal) bm[TICK_BM], NULL); } /*****************************************************************************/ /* Function: notick */ /* Arguments: w : the widget */ /* */ /* remove a tick from a menu entry */ /*****************************************************************************/ void noTick(Widget w) { XtVaSetValues(w, XtNleftBitmap, (XtArgVal) bm[NOTICK_BM], NULL); } /*****************************************************************************/ /* Function: popupByCursor */ /* Arguments: shell : the shell to popup */ /* grab_kind : parameter passed to XtPopup */ /* */ /* Try to popup a shell by the cursor, make sure it fits on the screen */ /*****************************************************************************/ void popupByCursor(Widget shell, XtGrabKind grab_kind) { char *geom; Display *dpy; Screen *scr; Window root, child; int x, y, x_win, y_win, scr_width, scr_height; Dimension width, height; unsigned int mask; XtVaGetValues(shell, XtNgeometry, &geom, NULL); if (!geom || !(strchr(geom, '+') || strchr(geom, '-'))) { dpy = XtDisplay(aw.shell); scr = XtScreen(aw.shell); scr_width = WidthOfScreen(scr); scr_height = HeightOfScreen(scr); XQueryPointer(dpy, DefaultRootWindow(dpy), &root, &child, &x, &y, &x_win, &y_win, &mask); XtVaGetValues(shell, XtNwidth, &width, XtNheight, &height, NULL); x -= width/2; y -= height/2; if (x + width > scr_width) x = scr_width - width; else if (x < 0) x = 0; if (y + height > scr_height) y = scr_height - height; else if (y < 0) y = 0; XtVaSetValues(shell, XtNx, (XtArgVal) x, XtNy, (XtArgVal) y, NULL); } XtPopup(shell, grab_kind); } /*---------------------------------------------------------------------------*/ void zzz(void) { FileWindowRec *fw; Display *dpy = XtDisplay(aw.shell); for (fw = file_windows; fw; fw = fw->next) XDefineCursor(dpy, XtWindow(fw->viewport), curs[WATCH_CUR]); if (resources.appmgr) XDefineCursor(dpy, XtWindow(aw.shell), curs[WATCH_CUR]); XFlush(dpy); } /*---------------------------------------------------------------------------*/ void wakeUp(void) { FileWindowRec *fw; Display *dpy = XtDisplay(aw.shell); for (fw = file_windows; fw; fw = fw->next) XUndefineCursor(dpy, XtWindow(fw->viewport)); if (resources.appmgr) XUndefineCursor(dpy, XtWindow(aw.shell)); } /*---------------------------------------------------------------------------*/ #define MAXVARSTRINGLEN MAXPATHLEN enum dialog_flag { DontKnow, Ok, Cancel }; static void dialogOkCb(UNUSED(Widget w), struct PopupDialog *p, UNUSED(void *call_data)) { popdownPopup(p); *(enum dialog_flag*)p->data = Ok; } /*---------------------------------------------------------------------------*/ static void dialogCancelCb(UNUSED(Widget w), struct PopupDialog *p, UNUSED(void *call_data)) { popdownPopup(p); *(enum dialog_flag*)p->data = Cancel; } /*---------------------------------------------------------------------------*/ static const PDButtonRec dialog_buttons[] = { { "ok", "Ok", dialogOkCb }, { "cancel", "Cancel", dialogCancelCb } }; char *varPopup(Widget parent, Pixmap icon_bm, char *action) { char *act = NULL; char *act1 = (char *)alloca(strlen(action)+1), *s, *t; char *str = (char *)alloca(strlen(action)+1); char **acts = NULL, **vars = NULL; int n_acts = 0, n_vars = 0; char *def_val; const char **default_vals = NULL; struct PopupDialog *dialog; enum dialog_flag dialog_flag; strcpy(act1, action); for (s = split(act1, '%'); s; s = split(NULL, '%')) { acts = (char **)XTREALLOC(acts, (n_acts+1)*sizeof(char *)); acts[n_acts++] = XtNewString(strparse(str, s, "\\%")); if ((t = split(NULL, '%'))) { vars = (char **)XTREALLOC(vars, (n_vars+1)*sizeof(char *)); vars[n_vars] = XtNewString(strparse(str, t, "\\%")); /* Check string for default value character */ default_vals = (const char **)XTREALLOC(default_vals, (n_vars+1)*sizeof(char *)); if ((def_val = strstr(vars[n_vars], kDefaultValueMarker)) == NULL) { default_vals[n_vars] = kDefaultValue; } else { def_val[0] = '\0'; /* Separate label and default value */ default_vals[n_vars] = def_val + strlen(kDefaultValueMarker); } n_vars++; } else break; } if (n_vars) { QuestionRec *dialog_questions; int i, l; XEvent e; dialog_questions = (QuestionRec *)XtMalloc(n_vars*sizeof(QuestionRec)); for (i = 0; i < n_vars; i++) { dialog_questions[i].label = vars[i]; dialog_questions[i].length = MAXVARSTRINGLEN; } createPopupQuestions(&dialog, parent, "dialog", "Parameter Dialog", icon_bm, dialog_questions, n_vars, dialog_buttons, XtNumber(dialog_buttons), XtNumber(dialog_buttons)-1); /* local variable, do not write to after this function is gone: */ dialog->clear_ptr = NULL; for (i = 0; i < n_vars; i++) { setPopupData(dialog, i, default_vals[i]); } popupPopupByCursor(dialog, &dialog_flag); dialog_flag = DontKnow; do { XtAppNextEvent(app_context, &e); XtDispatchEvent(&e); } while (dialog_flag == DontKnow); if (dialog_flag == Ok) for (l = i = 0; i < n_acts; i++) { size_t l1 = strlen(acts[i]), l2 = ishell); return act; } else { if (n_acts) XTFREE(acts); return XtNewString(action); } } /*---------------------------------------------------------------------------*/ /* variant of createPopupQuestions which shows some lines of left-justified text below a pixmap */ static Widget createPopupText(Widget parent, String name, String title, Pixmap bitmap, const char **lines, Cardinal n_lines, const ButtonRec *buttons, Cardinal n_buttons, Cardinal dflt_button) { Cardinal i; int l; Widget form_widget, box_widget, bitmap_widget = NULL, shell, vert = NULL; #ifdef ENHANCE_POP_ACCEL Widget *button_widgets; #ifndef ENHANCE_TRANSLATIONS int flag; #endif #endif /* create popup shell */ shell_args[0].value = (XtArgVal) title; shell_args[1].value = (XtArgVal) parent; shell = XtCreatePopupShell(name, transientShellWidgetClass, parent, shell_args, XtNumber(shell_args) ); /* create form */ form_args[0].value = 5; form_widget = XtCreateManagedWidget("popup form", focusFormWidgetClass, shell, form_args, XtNumber(form_args) ); /* create bitmap */ if (bitmap != None) { bitmap_args[2].value = (XtArgVal) bitmap; vert = bitmap_widget = XtCreateManagedWidget("bitmap", labelWidgetClass, form_widget, bitmap_args, XtNumber(bitmap_args)); } label_args[5].value = XtJustifyLeft; /* Find width of label */ label_args[3].value = (XtArgVal) 0; for (i=0; i label_args[3].value) label_args[3].value = l; } for (i = 0; iReturn:set()notify()unset()\n Linefeed:set()notify()unset()\n": "Escape:set()notify()unset()\n"), NULL); } } #endif #endif } XtRealizeWidget(shell); setWMProps(shell); return shell; } /*---------------------------------------------------------------------------*/ static void aboutOkCb(UNUSED(Widget w), XtPointer client_data, UNUSED(XtPointer call_data)) { Widget about = client_data; XtDestroyWidget(about); } /*---------------------------------------------------------------------------*/ static const ButtonRec about_buttons[] = { { "ok", "Ok", aboutOkCb }, }; static const char *about_text[] = { "This is xfm version " XFMVERSION "." XFMMINORVERSION , "Written by Simon Marlow, Albert Graef, Till Straumann, et al", "Copying policy: GPL Version 2 or later", }; #include "FmVersion.h" void aboutPopup(Widget parent) { Widget about = None; Pixmap logo_bm; logo_bm = loadIcon("XfmLogo.xpm", NULL, NULL); about = createPopupText(parent, "about", "About xfm", logo_bm, about_text, XtNumber(about_text), about_buttons, XtNumber(about_buttons), XtNumber(about_buttons)-1); if (!XtIsManaged(about)) popupByCursor(about, XtGrabNone); } /* set the neccessary WM properties */ void setWMProps(Widget shell) { if (!XtIsShell(shell) || !XtIsRealized(shell)) { String msg=XtMalloc(100+strlen(XtName(shell))); sprintf(msg,"setWMProps(%s): need a realized shell",XtName(shell)); abortXfm(msg); XtFree(msg); /* not really needed */ } if (!XtIsApplicationShell(shell)) { char *empty=""; XSetWMProtocols(XtDisplay(shell), XtWindow(shell), &wm_delete_window, 1); /* clear the WM_COMMAND property; work around some kwm problems */ XSetCommand(XtDisplay(shell),XtWindow(shell),&empty,1); } else { Atom atoms[2]; /* set the SAVE_YOURSELF protocol as well */ atoms[0]=wm_delete_window; atoms[1]=wm_save_yourself; XSetWMProtocols(XtDisplay(shell), XtWindow(shell), atoms, XtNumber(atoms)); /* is the KWM_SAVE_YOURSELF atom known ? */ if (None != kwm_save_yourself) { long val=0x1; /* seems that kwm is running; if we set KWM_SAVE_YOURSELF to 0x1, * our session will also be restored if we ran `xfm -filemgr' :-) */ XChangeProperty(XtDisplay(shell),XtWindow(shell), kwm_save_yourself, kwm_save_yourself, 32, PropModeReplace, (unsigned char *)&val,1); } } } xfm-1.5.4/src/XtHelper.c0000644000175000017500000000250510323730065011723 00000000000000/* * This file is part of X-File Manager XFM * ---------------------------------------------------------------------- * Enhancements to the X-File Manager XFM-1.3.2 (Xt Helper functions) * Copyright (C) 1997 by Till Straumann * ---------------------------------------------------------------------- * 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 of the License, 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include /* Xt Helper Functions */ #include "XtHelper.h" #include /* Xt doesn't export a function/macro to find out whether a * widget is being destroyed :-( */ Boolean XtIsBeingDestroyed(Widget w) { return w->core.being_destroyed; } xfm-1.5.4/src/FmAwPopup.c0000644000175000017500000001410510657377707012071 00000000000000/* * This file is part of X-File Manager XFM * ---------------------------------------------------------------------- FmAwPopup.c (c) Simon Marlow 1990-92 (c) Albert Graef 1994 modified 2005,2006,2007 by Bernhard R. Link (see Changelog) Functions & data for creating the popup 'install application' window * ---------------------------------------------------------------------- * 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 of the License, 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include #include #include #include "global.h" #include "Am.h" /*--------------------------------------------------------------------------- STATIC DATA ---------------------------------------------------------------------------*/ static struct PopupDialog *install_app_popup, *install_group_popup; static int app_number; /*--------------------------------------------------------------------------- PRIVATE FUNCTIONS ---------------------------------------------------------------------------*/ static PDCallbackProc installAppOkCb, installAppCancelCb, installGroupOkCb, installGroupCancelCb; static void installAppOkCb(UNUSED(Widget w), struct PopupDialog *p, UNUSED(void *call_data)) { popdownPopup(p); if (aw.readonly) return; if (app_number != -1) replaceApplication(aw.apps+app_number, getPopupAnswer(p, 0), getPopupAnswer(p, 1), getPopupAnswer(p, 2), getPopupAnswer(p, 3), getPopupAnswer(p, 4)); else installApplication( getPopupAnswer(p, 0), getPopupAnswer(p, 1), getPopupAnswer(p, 2), getPopupAnswer(p, 3), getPopupAnswer(p, 4)); updateApplicationDisplay(); writeApplicationData(); } /*---------------------------------------------------------------------------*/ static void installAppCancelCb(UNUSED(Widget w), struct PopupDialog *p, UNUSED(void *call_data)) { popdownPopup(p); } /*---------------------------------------------------------------------------*/ static void installGroupOkCb(UNUSED(Widget w), struct PopupDialog *p, UNUSED(void *call_data)) { char *appfile; popdownPopup(p); if (aw.readonly) return; appfile = suffixConcat(getPopupAnswer(p, 0),"xfm"); installApplication(getPopupAnswer(p, 0), appfile, getPopupAnswer(p, 1), "LOAD", ""); XtFree(appfile); updateApplicationDisplay(); writeApplicationData(); } /*---------------------------------------------------------------------------*/ static void installGroupCancelCb(UNUSED(Widget w), struct PopupDialog *p, UNUSED(void *call_data)) { popdownPopup(p); } /*--------------------------------------------------------------------------- Question and button data ---------------------------------------------------------------------------*/ static const QuestionRec install_app_questions[5] = { { "Name:", MAXAPPSTRINGLEN }, { "Directory:", MAXAPPSTRINGLEN }, { "Icon:", MAXAPPSTRINGLEN }, { "Push action:", MAXAPPSTRINGLEN }, { "Drop action:", MAXAPPSTRINGLEN } }; static const PDButtonRec install_app_buttons[] = { { "install", "Install", installAppOkCb }, { "cancel", "Cancel", installAppCancelCb } }; static const QuestionRec install_group_questions[2] = { { "Name:", MAXAPPSTRINGLEN }, { "Icon:", MAXAPPSTRINGLEN } }; static const PDButtonRec install_group_buttons[] = { { "install", "Install", installGroupOkCb }, { "cancel", "Cancel", installGroupCancelCb } }; /*--------------------------------------------------------------------------- PUBLIC FUNCTIONS ---------------------------------------------------------------------------*/ void createInstallPopups(void) { createPopupQuestions(&install_app_popup, aw.shell, "install app", "Install Application", None, install_app_questions, XtNumber(install_app_questions), install_app_buttons, XtNumber(install_app_buttons), XtNumber(install_app_buttons)-1); createPopupQuestions(&install_group_popup, aw.shell, "install group", "Install Group", None, install_group_questions, XtNumber(install_group_questions), install_group_buttons, XtNumber(install_group_buttons), XtNumber(install_group_buttons)-1); } /*----------------------------------------------------------------------------*/ void installNewAppPopup(void) { Cardinal i; for (i=0; i < XtNumber(install_app_questions); i++) { setPopupData(install_app_popup, i, ""); } app_number = -1; popupPopupByCursor(install_app_popup, NULL); } /*----------------------------------------------------------------------------*/ void installExistingAppPopup(void) { Cardinal i; if (aw.readonly) return; for (i=0; i #include #include #include #include #include #include #include #include #include #include "global.h" #include "Am.h" #include "Fm.h" #define LABEL_WIDTH 300 /*----------------------------------------------------------------------------- STAIC DATA -----------------------------------------------------------------------------*/ typedef struct { Widget shell, label1, label2; } ErrorPopupRec; static ErrorPopupRec errors; static Boolean error_flag = True; /*----------------------------------------------------------------------------- Widget Argument Lists -----------------------------------------------------------------------------*/ static Arg shell_args[] = { { XtNtitle, (XtArgVal) "Error" }, }; static Arg *form_args = NULL; static Arg label_args[] = { { XtNfromHoriz, (XtArgVal) NULL }, { XtNfromVert, (XtArgVal) NULL }, { XtNlabel, (XtArgVal) NULL }, { XtNwidth, (XtArgVal) LABEL_WIDTH }, { XtNfont, (XtArgVal) NULL }, { XtNresize, False }, { XtNtop, XtChainTop }, { XtNbottom, XtChainTop }, { XtNleft, XtChainLeft }, { XtNright, XtChainRight } }; static Arg bitmap_args[] = { { XtNfromHoriz, (XtArgVal) NULL }, { XtNfromVert, (XtArgVal) NULL }, { XtNbitmap, (XtArgVal) NULL }, { XtNtop, XtChainTop }, { XtNbottom, XtChainTop }, { XtNleft, XtChainLeft }, { XtNright, XtChainLeft } }; static Arg button_box_args[] = { { XtNfromHoriz, (XtArgVal) NULL }, { XtNfromVert, (XtArgVal) NULL }, { XtNtop, XtChainTop }, { XtNbottom, XtChainTop }, { XtNleft, XtChainLeft }, { XtNright, XtChainLeft } }; /*----------------------------------------------------------------------------- PRIVATE FUNCTIONS -----------------------------------------------------------------------------*/ static void errorOkCb(UNUSED(Widget w), UNUSED(void *client_data), UNUSED(void *call_data)) { XtPopdown(errors.shell); error_flag = True; } /*----------------------------------------------------------------------------- Button Data -----------------------------------------------------------------------------*/ static const ButtonRec error_buttons[] = { { "cancel", "Cancel", errorOkCb } }; /*----------------------------------------------------------------------------- PUBLIC FUNCTIONS -----------------------------------------------------------------------------*/ void createErrorPopup(void) { Widget form, bitmap, button_box; /* create shell */ errors.shell = XtCreatePopupShell("error", transientShellWidgetClass, aw.shell, shell_args, XtNumber(shell_args)); /* create outer form */ form = XtCreateManagedWidget("form", formWidgetClass, errors.shell, form_args, XtNumber(form_args) ); /* create bitmap */ bitmap_args[2].value = (XtArgVal) bm[EXCL_BM]; bitmap = XtCreateManagedWidget("bitmap", labelWidgetClass, form, bitmap_args, XtNumber(bitmap_args) ); /* create label 1 */ label_args[0].value = (XtArgVal) bitmap; label_args[4].value = (XtArgVal) resources.label_font; errors.label1 = XtCreateManagedWidget("label1",labelWidgetClass, form, label_args, XtNumber(label_args) ); /* create label 2 */ label_args[1].value = (XtArgVal) errors.label1; errors.label2 = XtCreateManagedWidget("label2",labelWidgetClass, form, label_args, XtNumber(label_args) ); /* create button box */ button_box_args[1].value = (XtArgVal) bitmap; button_box = XtCreateManagedWidget("button box", boxWidgetClass, form, button_box_args, XtNumber(button_box_args) ); createButtons(error_buttons, XtNumber(error_buttons), button_box, NULL); #ifdef ENHANCE_POP_ACCEL XtInstallAllAccelerators(form,form); XtInstallAllAccelerators(errors.shell,form); #endif XtRealizeWidget(errors.shell); setWMProps(errors.shell); } /*---------------------------------------------------------------------------*/ static void untilOk(void) { XEvent e; error_flag = False; do { XtAppNextEvent(app_context, &e); XtDispatchEvent(&e); } while (!error_flag); } /*---------------------------------------------------------------------------*/ void sysError(const char *string1) { if (!error_flag) /* recursive errors are possible - we just ignore them */ return; XtVaSetValues(errors.label1, XtNlabel, string1, NULL); XtVaSetValues(errors.label2, XtNlabel, strerror(errno), NULL); popupByCursor(errors.shell, XtGrabExclusive); untilOk(); } void sysErrorFmt(const char *format, ...) { char *buffer; int r, e; va_list ap; e = errno; va_start(ap, format); r = vasprintf(&buffer, format, ap); va_end(ap); errno = e; if( r < 0 || buffer == NULL ) sysError(format); else { sysError(buffer); free(buffer); } } /*---------------------------------------------------------------------------*/ void error(const char *string1, const char *string2) { if (!error_flag) return; XtVaSetValues(errors.label1, XtNlabel, string1, NULL); XtVaSetValues(errors.label2, XtNlabel, string2, NULL); popupByCursor(errors.shell, XtGrabExclusive); untilOk(); } /*---------------------------------------------------------------------------*/ void abortXfm(const char *message) { fprintf(stderr,"%s: %s -- abort\n", progname, message); exit(1); } /*---------------------------------------------------------------------------*/ void XtAppWarningFmt(XtAppContext app, const char *format, ...) { char *buffer; int r; va_list ap; va_start(ap, format); r = vasprintf(&buffer, format, ap); va_end(ap); if( r < 0 || buffer == NULL ) XtAppWarning(app, format); else { XtAppWarning(app, buffer); free(buffer); } } xfm-1.5.4/src/FmLog.c0000644000175000017500000001621610421716351011201 00000000000000/* * This file is part of X-File Manager XFM * ---------------------------------------------------------------------- FmLog.c Copyright (C) 1997 by T. Straumann, modified 2006 by Bernhard R. Link (see Changelog) A logging window has been added to show output of child processes sent to stdout / stderr. * ---------------------------------------------------------------------- * 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 of the License, 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "global.h" #include "Fm.h" #include "FmLog.h" #include "execute.h" typedef struct LogData_ { Widget shell,text,auto_flag; XtInputId inp_id; } LogData; Widget fmLogPopupShell=0; static int peipd[2]; static XawTextPosition pos=(XawTextPosition)0; static void get_pipe_input(XtPointer cld, int *fid, UNUSED(XtInputId *id)) { XawTextBlock block; int nbytes; char buf[BUFSIZ]; Boolean auto_popup; LogData *ldp=(LogData*)cld; if ((nbytes=read(*fid,buf,BUFSIZ))==-1) fprintf(stderr,"\nread error %i in 'get_pipe_input()'\n",errno); if (nbytes>0) { XtVaSetValues(ldp->text,XtNeditType,XawtextEdit,(char*)0); block.format=FMT8BIT; block.length=nbytes; block.ptr=buf; block.firstPos=0; buf[nbytes]=0; XawTextReplace(ldp->text,pos,pos,&block); pos+=block.length; /* Setting the insertPosition scrolls the text to the bottom */ XtVaSetValues(ldp->text, XtNeditType,XawtextRead, XtNinsertPosition,pos, (char*)0); XtVaGetValues(ldp->auto_flag,XtNstate,&auto_popup,(char*)0); if (auto_popup) popupByCursor(ldp->shell,XtGrabNone); } } static void update_tick_cb(Widget w, XtPointer cld, UNUSED(XtPointer cad)) { Boolean flag; Pixel bg=(Pixel)cld,fg; XtVaGetValues(w,XtNstate,&flag,XtNforeground,&fg,(char*)0); XtVaSetValues(w,XtNbackground,(flag?bg:fg),(char*)0); } static void hide_log_cb(UNUSED(Widget w), XtPointer cld, UNUSED(XtPointer cad)) { Widget shell=(Widget)cld; XtPopdown(shell); } static void clear_log_cb(UNUSED(Widget w), XtPointer cld, UNUSED(XtPointer cad)) { Widget text=(Widget)cld; XawTextBlock block; XtVaSetValues(text,XtNeditType,XawtextEdit,(char*)0); block.firstPos=0; block.length=0; block.ptr=0; block.format=FMT8BIT; XawTextReplace(text,0,pos,&block); XtVaSetValues(text,XtNeditType,XawtextRead,(char*)0); pos=0; } static void destroy_log_cb(UNUSED(Widget w), XtPointer cld, UNUSED(XtPointer cad)) { LogData *ldp=(LogData*)cld; XtRemoveInput(ldp->inp_id); /* try to restore stdout/stderr, hope the buffering doesn't * get mixed up :-0 */ child_stdout = -1; child_stderr = -1; /* let's hope there is not child left to choke on its stdout vanishing */ close(peipd[0]); close(peipd[1]); fmLogPopupShell=0; XtFree((char*)ldp); } #define FROM_HORIZ 0 #define FONT 1 #define BITMAP 6 #define N_BUTTON_ARGS BITMAP static Arg button_args[]={ {XtNfromHoriz,0}, {XtNfont,0}, {XtNleft,XtChainLeft}, {XtNright,XtChainLeft}, {XtNtop,XtChainTop}, {XtNbottom,XtChainTop}, {XtNbitmap,0}, {XtNinternalHeight,0}, {XtNinternalWidth,0}, }; Widget FmCreateLog(Widget parent,XFontStruct *font) { Widget form,cmd; XtAppContext app=XtWidgetToApplicationContext(parent); LogData *ldp=(LogData*)XtMalloc(sizeof(LogData)); Pixel fg,bg; Window win; Boolean flag; Dimension vdist,h1,h2,bw; if (fmLogPopupShell) { XtAppError(app, "FmCreateLog: only one log allowed"); } ldp->shell=XtVaCreatePopupShell( "fmLog", transientShellWidgetClass, parent, NULL); form=XtVaCreateManagedWidget( "form", formWidgetClass, ldp->shell, NULL); XtVaGetValues(form,XtNdefaultDistance,&vdist,(char*)0); button_args[FONT].value=(XtArgVal)font; button_args[BITMAP].value=(XtArgVal)bm[TICK_BM]; cmd =XtCreateManagedWidget( "Hide", commandWidgetClass, form, button_args,N_BUTTON_ARGS); XtAddCallback(cmd,XtNcallback,hide_log_cb,(XtPointer)ldp->shell); ldp->text=XtVaCreateManagedWidget( "log_text", asciiTextWidgetClass, form, XtNscrollVertical, XawtextScrollWhenNeeded, XtNdisplayCaret,False, XtNfromVert,cmd, XtNleft,XtChainLeft, XtNright, XtChainRight, XtNtop, XtChainTop, XtNbottom,XtChainBottom, NULL); /* this is another hack: realize now, so the width * of the text is calculated better. We need the * shell's window anyway just down a few lines... */ XtRealizeWidget(ldp->shell); win=XtWindow(ldp->shell); button_args[FROM_HORIZ].value=(XtArgVal)cmd; cmd =XtCreateManagedWidget( "Clear Log", commandWidgetClass, form, button_args,N_BUTTON_ARGS); XtAddCallback(cmd,XtNcallback,clear_log_cb,(XtPointer)ldp->text); XtVaGetValues(cmd,XtNheight,&h1, XtNborderWidth,&bw, (char*)0); button_args[FROM_HORIZ].value=(XtArgVal)cmd; cmd =XtVaCreateManagedWidget("Auto Popup", labelWidgetClass, form, XtNborderWidth,0, XtNresize,False, XtNfromHoriz,cmd, XtNleft,XtChainLeft, XtNright,XtChainLeft, XtNtop,XtChainTop, XtNbottom,XtChainTop, XtNfont,font, XtNheight,h1+2*bw, (char*)0); button_args[FROM_HORIZ].value=(XtArgVal)cmd; ldp->auto_flag =XtCreateManagedWidget( "Auto Flag", toggleWidgetClass, form, button_args,XtNumber(button_args)); /* get what the user thinks are the colours and flip them */ XtVaGetValues(ldp->auto_flag, XtNforeground,&fg,XtNbackground,&bg,XtNstate,&flag, XtNheight,&h2, (char*)0); vdist+=(h1-h2)/2; XtVaSetValues(ldp->auto_flag, XtNvertDistance,vdist, XtNforeground,bg, XtNbackground,(flag?fg:bg), (char*)0); XtAddCallback(ldp->auto_flag,XtNcallback,update_tick_cb,(XtPointer)fg); pipe(peipd); child_stderr = peipd[1]; child_stdout = peipd[1]; ldp->inp_id=XtAppAddInput( app, peipd[0], (XtPointer)XtInputReadMask, get_pipe_input,(XtPointer)ldp); XtAddCallback(ldp->shell,XtNdestroyCallback,destroy_log_cb,(XtPointer)ldp); fmLogPopupShell=ldp->shell; setWMProps(ldp->shell); #ifdef ENHANCE_POP_ACCEL XtInstallAllAccelerators(ldp->shell,form); XtInstallAllAccelerators(form,form); XtInstallAllAccelerators(ldp->text,form); #endif return ldp->shell; } void logPopup(UNUSED(Widget w), UNUSED(FileWindowRec *fw), UNUSED(XtPointer cad)) { if (fmLogPopupShell) popupByCursor(fmLogPopupShell,XtGrabNone); } xfm-1.5.4/src/FocusForm.c0000644000175000017500000003656610657105530012114 00000000000000/* * This file is part of X-File Manager XFM * ---------------------------------------------------------------------- * The FocusForm Widget * * Copyright (C) 1997 by Till Straumann * * modified 2005,2006,2007 by Bernhard R. Link (see Changelog) * ---------------------------------------------------------------------- * 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 of the License, 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* This is a subclass of the athena 'Form' widget */ /* Copyright (c) 1987, 1988, 1994 X Consortium Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. */ #include #include #include #include #include #include #include #include #include #include "global.h" #include "FocusFormP.h" #include "FmErrors.h" /* Macros */ #define TAKES_FOCUS(widget) \ (((FocusFormConstraints)((Widget)(widget)->core.constraints))->focusForm.focus_interest &&\ XtIsSensitive(widget) && \ XtIsManaged(widget)) /* Methods */ static void Initialize(Widget treq,Widget tnew,ArgList args,Cardinal *narg); static Boolean ConstraintSetVals(Widget current,Widget request,Widget new,ArgList args,Cardinal *narg); static void ConstraintInitialize(Widget treq,Widget tnew,ArgList args,Cardinal *narg); static void ChangeManaged(Widget w); static void Realize(Widget w,XtValueMask *vm,XSetWindowAttributes *wa); static void Destroy(Widget w); /* Actions */ static void FocusTraverse(Widget w,XEvent *ev,String *args,Cardinal *nargs); static void FocusSet(Widget w,XEvent *ev,String *args,Cardinal *nargs); static void Detail_NotifyAncestor(Widget w,XEvent *ev,String *args,Cardinal *nargs); /* Event Handlers */ static void RevertFocus(Widget wid,XtPointer cld,XEvent *ev,Boolean *ctd); /* private Procedures */ static int FindCompositeChild(Widget parent,Widget wid); static Widget FindFocusFormAncestor(Widget widget); static Boolean CanSetFocus(Widget w); #ifdef DEBUG static void dummy(Widget w, XEvent *ev, String *a, Cardinal *na) { fprintf(stderr,"'%s' incoked dummy action\n",XtName(w)); } #endif static XtActionsRec actions[]={ {"FocusTraverse",FocusTraverse}, {"FocusSet",FocusSet}, {"Detail_NotifyAncestor",Detail_NotifyAncestor}, #ifdef DEBUG {"dummy",dummy}, #endif }; static char default_translations[]= #ifdef DEBUG "Shift Tab:FocusTraverse(b)\n\ Tab:FocusTraverse()\n\ :Detail_NotifyAncestor(dammi)\n\ :Detail_NotifyAncestor(dammi)\n\ :FocusSet()\n\ :FocusSet()"; #else "Shift Tab:FocusTraverse(b)\n\ Tab:FocusTraverse()\n\ :FocusSet()\n\ :FocusSet()"; #endif #ifndef SEPARATE_STRINGS /* include the automatically generated strings of resource names */ #ifdef __VMS #include "FocusForm_res_c." #include "FocusForm_class_c." #include "FocusForm_type_c." #else #include "FocusForm_res_c" #include "FocusForm_class_c" #include "FocusForm_type_c" #endif /* __VMS */ #endif static XtResource focusFormConstraintResources[]={ {XtNfocusInterest, XtCFocusInterest, XtRBoolean, sizeof(Boolean), XtOffsetOf(FocusFormConstraintsRec, focusForm.focus_interest), XtRImmediate, (XtPointer)False}, {XtNsensitive, XtCSensitive, XtRBoolean, sizeof(Boolean), XtOffsetOf(FocusFormConstraintsRec, focusForm.sensitive), XtRImmediate, (XtPointer)True}, }; static XtResource focusFormResources[]={ {XtNfocusInitChild, XtCFocusInitChild, XtRString, sizeof(String), XtOffsetOf(FocusFormRec, focusForm.focus_init_child),XtRImmediate,(XtPointer)NULL}, }; FocusFormClassRec focusFormClassRec = { { /* core_class fields */ /* superclass */ (WidgetClass) &formClassRec, /* class_name */ "FocusForm", /* widget_size */ sizeof(FocusFormRec), /* class_initialize */ XawInitializeWidgetSet, /* class_part_init */ NULL, /* class_inited */ FALSE, /* initialize */ Initialize, /* initialize_hook */ NULL, /* realize */ Realize, /* actions */ actions, /* num_actions */ XtNumber(actions), /* resources */ focusFormResources, /* num_resources */ XtNumber(focusFormResources), /* xrm_class */ NULLQUARK, /* compress_motion */ TRUE, /* compress_exposure */ TRUE, /* compress_enterleave*/ TRUE, /* visible_interest */ FALSE, /* destroy */ Destroy, /* resize */ XtInheritResize, /* expose */ XtInheritExpose, /* set_values */ NULL, /* set_values_hook */ NULL, /* set_values_almost */ XtInheritSetValuesAlmost, /* get_values_hook */ NULL, /* accept_focus */ NULL, /* version */ XtVersion, /* callback_private */ NULL, /* tm_table */ default_translations, /* query_geometry */ XtInheritQueryGeometry, /* display_accelerator*/ XtInheritDisplayAccelerator, /* extension */ NULL }, { /* composite_class fields */ /* geometry_manager */ XtInheritGeometryManager, /* change_managed */ ChangeManaged, /* insert_child */ XtInheritInsertChild, /* delete_child */ XtInheritDeleteChild, /* extension */ NULL }, { /* constraint_class fields */ /* subresourses */ focusFormConstraintResources, /* subresource_count */ XtNumber(focusFormConstraintResources), /* constraint_size */ sizeof(FocusFormConstraintsRec), /* initialize */ ConstraintInitialize, /* destroy */ NULL, /* set_values */ ConstraintSetVals, /* extension */ NULL }, { /* form_class fields */ /* layout */ XtInheritLayout, } }; WidgetClass focusFormWidgetClass = (WidgetClass)&focusFormClassRec; static void Initialize(UNUSED(Widget treq), Widget tnew, UNUSED(ArgList args), UNUSED(Cardinal *narg)) { FocusFormWidget ffw=(FocusFormWidget)tnew; ffw->focusForm.focus_child=(Widget)0; ffw->focusForm.initialized=False; if (!XtIsSubclass(XtParent(tnew),focusFormWidgetClass)) XtAddEventHandler(tnew,LeaveWindowMask,False,RevertFocus,0); } static void ConstraintInitialize(UNUSED(Widget treq), Widget tnew, UNUSED(ArgList args), UNUSED(Cardinal *narg)) { tnew->core.sensitive=((FocusFormConstraints)(tnew->core.constraints))->focusForm.sensitive; } static Boolean ConstraintSetVals(Widget current, UNUSED(Widget request), Widget new, UNUSED(ArgList args), UNUSED(Cardinal *narg)) { Boolean loose_focus; Cardinal dummy=0; FocusFormConstraintsPart *new_data; new_data=&(((FocusFormConstraints)(new->core.constraints))->focusForm); new->core.sensitive=new_data->sensitive; loose_focus= !new->core.sensitive || ! new_data->focus_interest; if (XtIsSubclass(XtParent(current),focusFormWidgetClass)) { if ( ((FocusFormWidget)XtParent(current))->focusForm.focus_child==new && loose_focus ) FocusTraverse(XtParent(current),0,0,&dummy); } else { XtAppWarningFmt(XtWidgetToApplicationContext(current), "FocusForm Action: %s is not managed by a FocusForm", XtName(current)); } return True; } static void Destroy(Widget w) { XtRemoveEventHandler(w,LeaveWindowMask,False,RevertFocus,0); } static void Realize(Widget w,XtValueMask *vm,XSetWindowAttributes *wa) { register Widget wtmp; /* Do what must be done */ focusFormWidgetClass->core_class.superclass->core_class.realize(w,(XtPointer)vm,wa); /* The topmost FocusForm sets the Focus finally */ if (!FindFocusFormAncestor(w)) { wtmp=w; while((wtmp=((FocusFormWidget)wtmp)->focusForm.focus_child) && XtIsSubclass(wtmp,focusFormWidgetClass)); XtSetKeyboardFocus(w,wtmp); } } static void ChangeManaged(Widget w) { FocusFormWidget ffw=(FocusFormWidget)w; int focus_num; Cardinal i; Cardinal narg; register Widget top,wtmp; Widget winit; char *name; /* Do what must be done */ ((CompositeWidgetClass)(focusFormWidgetClass->core_class.superclass))->composite_class.change_managed(w); if (! ffw->focusForm.initialized) { name=ffw->focusForm.focus_init_child; top=wtmp=w; while (!XtIsShell(top=XtParent(top))); winit=0; if (! (name && (winit=XtNameToWidget(top,name)) && w==XtParent(winit) && TAKES_FOCUS(winit)) ) { /* no initial widget?, take first */ for (i=0;icomposite.num_children;i++) { if (TAKES_FOCUS(ffw->composite.children[i])) { winit=ffw->composite.children[i]; break; } } } ffw->focusForm.focus_child=winit; ffw->focusForm.initialized=True; } /* will the focus widget become unmanaged ? */ focus_num=FindCompositeChild(w,ffw->focusForm.focus_child); if (focus_num>=0 && !XtIsManaged(ffw->focusForm.focus_child)) { narg=0; FocusTraverse(w,0,0,&narg); } } /* This action is needed because the translation manager * does not allow to specify the detail of focusIn/Out events. * * If children of FocusForm need to perform some action as * a response to Focus in/out (eg. TextField cursor state * must be set) they should do so only if they really get * the focus from us. * * If the pointer enters a child of FFW from outside the * toplevel window (overlapping windows), the child * receives a FocusIn event with detail 'NotifyPointer'. * * This action simply calls the action proc. with the name * given in args[0] and arguments args[1]...args[nargs]. * This 'forwarding' is suppressed however, if the detail * of a FocusIn/Out event is not NotifyAncestor. */ static void Detail_NotifyAncestor(Widget w,XEvent *ev,String *args,Cardinal *nargs) { if (*nargs<1) { XtAppWarning(XtWidgetToApplicationContext(w), "Action 'DetailAncestor()' needs min. one argument"); return; } if ( (ev->type==FocusIn || ev->type==FocusOut) ){ #ifdef DEBUG fprintf(stderr,"%s: %c - Mode: %i Detail: %i\n", XtName(w), (ev->type==FocusIn?(char)'i':(char)'o'), (int)(ev->xfocus.mode), (int)(ev->xfocus.detail)); #endif if (ev->xfocus.detail!=NotifyAncestor) return; } XtCallActionProc(w,args[0],ev,args+1,*nargs+1); } static void FocusSet(Widget w,XEvent *ev,String *args,Cardinal *nargs) { Widget top,tmpw,new_focus_widget,tmpw1; FocusFormWidget ffw; top=tmpw=w; while(!XtIsShell(top=XtParent(top))); if (ev->type==ButtonPress || ev->type==ButtonRelease){ tmpw1=top; } new_focus_widget=0; if (*nargs>0) new_focus_widget=XtNameToWidget(top,args[0]); if (new_focus_widget==0) new_focus_widget=w; if (!CanSetFocus(new_focus_widget)) return; tmpw=new_focus_widget; /* if the focus is set to a focusForm Widget, look recursively for a child, * to accept the focus */ while (XtIsSubclass(new_focus_widget,focusFormWidgetClass) && (new_focus_widget=(ffw=(FocusFormWidget)new_focus_widget)->focusForm.focus_child)); if (new_focus_widget && TAKES_FOCUS(new_focus_widget)) { /* adjust the parents recursively */ while (0!=(tmpw1=FindFocusFormAncestor(tmpw) )) { ((FocusFormWidget)tmpw1)->focusForm.focus_child=tmpw; tmpw=tmpw1; } XtSetKeyboardFocus(top,new_focus_widget); #ifdef DEBUG fprintf(stderr,"FocusSet for tree: %s, widget %s\n", XtName(top),XtName(new_focus_widget)); #endif } } static void FocusTraverse(Widget w, UNUSED(XEvent *ev), String *args, Cardinal *nargs) { Widget new_focus_widget,old_focus_widget; register Widget top,wtmp; FocusFormWidget comp; Widget *children; int num_children,new_focus; Boolean forward=True; if (!CanSetFocus(w)) return; if (*nargs>0) switch (toupper((int)*args[0])) { case 'F': case 'V': break; case 'B': case 'R': forward=False; break; default: XtWarning("FocusTraverse(): invalid Parameter\n"); break; } /* If w is not a FocusForm, look for the closest ancestor which is */ top=wtmp=w; while( !XtIsShell(top=XtParent(top)) ); wtmp=w; while (wtmp && !XtIsSubclass(wtmp,focusFormWidgetClass)) wtmp=XtParent(wtmp); if (!(comp=(FocusFormWidget)wtmp)) goto errorret; children=comp->composite.children; num_children=comp->composite.num_children; if (num_children==0) { XtWarning("FocusTraverse (FocusTraverse()): FocusForm has no children"); return; } old_focus_widget=comp->focusForm.focus_child; new_focus=FindCompositeChild((Widget)comp,old_focus_widget); if (new_focus<0) { /* lost track */ comp->focusForm.focus_child=0; XtSetKeyboardFocus(top,top); goto errorret; } do { if (forward) new_focus++; else new_focus--; if (new_focus>=num_children) new_focus=0; if (new_focus<0) new_focus+=num_children; new_focus_widget=children[new_focus]; if (!TAKES_FOCUS(new_focus_widget)) continue; XtSetKeyboardFocus(top,new_focus_widget); comp->focusForm.focus_child=new_focus_widget; XSync(XtDisplay(comp),False); return; } while (new_focus_widget!=old_focus_widget); /* no one wants the focus */ comp->focusForm.focus_child=0; XtSetKeyboardFocus(top,top); return; errorret: XtWarning("FocusForm (FocusTraverse()): Focus could not be changed"); } /* finds widget in composite's children-list. * returns -1 if nothing found */ static int FindCompositeChild(Widget parent,Widget wid) { CompositeWidget comp=(CompositeWidget)parent; int n; n=comp->composite.num_children; do { n--; } while (n>=0 && comp->composite.children[n]!=wid); return n; } #ifdef notused static int FindCompositeNamedChild(parent,name) Widget parent; String name; { CompositeWidget comp=(CompositeWidget)parent; int n; if (name==NULL) return -1; n=comp->composite.num_children; do { n--; } while (n>=0 && !strcmp(XtName(comp->composite.children[n]),name)); return n; } #endif static Widget FindFocusFormAncestor(Widget widget) { do { if ( XtIsShell(widget=XtParent(widget)) ) return 0; } while (widget && !XtIsSubclass(widget,focusFormWidgetClass)); return widget; } static Boolean CanSetFocus(Widget w) { if (! (XtIsSubclass(w,focusFormWidgetClass) || XtIsSubclass(XtParent(w),focusFormWidgetClass)) ) { XtAppWarningFmt(XtWidgetToApplicationContext(w), "FocusForm Action: %s is not managed by a FocusForm", XtName(w)); return False; } else return True; } /* if we leave the topmost focusForm, we are outside the * scope of what ffw can do. Therefore we set the focus * to the parent. */ static void RevertFocus(Widget wid, UNUSED(XtPointer cld), XEvent *ev, UNUSED(Boolean *ctd)) { if (ev->xcrossing.detail!=NotifyInferior) XtSetKeyboardFocus(XtParent(wid),XtParent(wid)); } xfm-1.5.4/src/FmBitmaps.c0000644000175000017500000003631410421716351012060 00000000000000/* * This file is part of X-File Manager XFM * ---------------------------------------------------------------------- FmBitmaps.c (c) Simon Marlow 1990-92 (c) Albert Graef 1994 modified 7-1997 by strauman@sun6hft.ee.tu-berlin.de to add different enhancements (see README-1.4). modified 2004,2005,2006 by Bernhard R. Link (see Changelog) Functions & data for handling the bitmaps and cursors. * ---------------------------------------------------------------------- * 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 of the License, 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include #include /* Large cursors */ #include "../images/xfm_file.xbm" #include "../images/xfm_filemsk.xbm" #include "../images/xfm_files.xbm" #include "../images/xfm_filesmsk.xbm" #include "../images/xfm_noentry32.xbm" #include "../images/xfm_noentrymsk32.xbm" #include "../images/xfm_dir.xbm" #include "../images/xfm_dirmsk.xbm" #include "../images/xfm_exec.xbm" #include "../images/xfm_execmsk.xbm" #include "../images/xfm_watch.xbm" #include "../images/xfm_watchmsk.xbm" /* small cursors */ #include "../images/xfm_file_s.xbm" #include "../images/xfm_filemsk_s.xbm" #include "../images/xfm_files_s.xbm" #include "../images/xfm_filesmsk_s.xbm" #include "../images/xfm_noentry_s.xbm" #include "../images/xfm_noentrymsk_s.xbm" #include "../images/xfm_dir_s.xbm" #include "../images/xfm_dirmsk_s.xbm" #include "../images/xfm_exec_s.xbm" #include "../images/xfm_execmsk_s.xbm" /* different stuff */ #include "../images/xfm_lline.xbm" #include "../images/xfm_tline.xbm" #include "../images/xfm_fline.xbm" #include "../images/xfm_cline.xbm" #include "../images/xfm_larrow.xbm" #include "../images/xfm_rarrow.xbm" #include "../images/xfm_wavy_arrow.xbm" #include "../images/xfm_tick.xbm" #include "../images/xfm_notick.xbm" #include "../images/xfm_excl.xbm" #ifdef ENHANCE_PERMS #include "../images/xfm_suid.xbm" #include "../images/xfm_Suid.xbm" #include "../images/xfm_sticky.xbm" #include "../images/xfm_Sticky.xbm" #endif /* pixmaps for some popup windows */ #include "../images/xfm_file.xpm" #include "../images/xfm_dir.xpm" #include "../images/xfm_files.xpm" #include "../images/xfm_symlnk.xpm" /* default icons for built in file types */ #include "../icons/inode/directory.xpm" #include "../icons/inode/x-parent-directory.xpm" #include "../icons/default.xpm" #include "../icons/inode/default.xpm" #include "../icons/inode/x-bad-link.xpm" /* The icons for the application and file window */ #include "../images/xfm_icon.xpm" #include "../images/xfm_appmgr.xpm" /* symbols to express special states of a file */ #include "../images/xfm_linksymbol.xpm" #include "../images/xfm_gzipsymbol.xpm" #include "../images/xfm_bzipsymbol.xpm" #include "global.h" #include "Am.h" #include "Fm.h" #include "mime.h" /*----------------------------------------------------------------------------- STATIC DATA -----------------------------------------------------------------------------*/ typedef struct { char *bits; int width, height; } BitmapRec; #ifdef __STDC__ #define ICON(x) { (char*)x##_bits, x##_width, x##_height } #else #define ICON(x) { x/**/_bits, x/**/_width, x/**/_height } #endif static BitmapRec bitmaps[] = { ICON(xfm_noentry), /* helper images: */ ICON(xfm_lline), ICON(xfm_tline), ICON(xfm_fline), ICON(xfm_cline), ICON(xfm_larrow), ICON(xfm_rarrow), ICON(xfm_wavy_arrow), ICON(xfm_tick), ICON(xfm_notick), ICON(xfm_excl), #ifdef ENHANCE_PERMS ICON(xfm_suid),ICON(xfm_Suid),ICON(xfm_sticky),ICON(xfm_Sticky), #endif }; static char **pixmaps[] = { xfm_files_xpm, xfm_dir_xpm, xfm_file_xpm, xfm_symlnk_xpm, }; static char **icons[TYPE_COUNT] = { directory_xpm, x_parent_directory_xpm, default_xpm, inode_default_xpm, x_bad_link_xpm, }; static char **modifier_pixmaps[FILE_MODIFIER_COUNT] = { xfm_linksymbol_xpm, xfm_gzipsymbol_xpm, xfm_bzipsymbol_xpm }; typedef struct { int source, mask; } CursorRec; /* large cursor images */ static BitmapRec cursor_bitmaps[ 2*CURSOR_COUNT ] = { ICON(xfm_file), ICON(xfm_filemsk), ICON(xfm_files), ICON(xfm_filesmsk), ICON(xfm_noentry), ICON(xfm_noentrymsk), ICON(xfm_dir), ICON(xfm_dirmsk), ICON(xfm_exec), ICON(xfm_execmsk), ICON(xfm_watch), ICON(xfm_watchmsk), }; /* small fallback cursor images */ static BitmapRec safe_cursor_bitmaps[ 2*CURSOR_COUNT ] = { ICON(xfm_file_s), ICON(xfm_filemsk_s), ICON(xfm_files_s), ICON(xfm_filesmsk_s), ICON(xfm_noentry_s), ICON(xfm_noentrymsk_s), ICON(xfm_dir_s), ICON(xfm_dirmsk_s), ICON(xfm_exec_s), ICON(xfm_execmsk_s), ICON(xfm_watch), ICON(xfm_watchmsk), }; /*----------------------------------------------------------------------------- PUBLIC DATA -----------------------------------------------------------------------------*/ Pixmap bm[BM_COUNT]; struct dimensionedpixmap file_modifiers[FILE_MODIFIER_COUNT]; Pixmap bm_icon,bm_iconmsk,bm_appmgr,bm_appmgrmsk; Cursor curs[CURSOR_COUNT]; static const char * const mimetypes[TYPE_COUNT]={ "inode/directory", "inode/x-parent-directory", "*", "inode/*", "inode/x-bad-link.xpm", }; /* PRIVATE FUNCTIONS */ static int readPixmapFromFile(Display *dpy, Window win, Widget top, String searchpath, Pixmap *pm, Pixmap *msk, XpmAttributes *atts); static int readPixmapFromData(Display *dpy, Window win, Widget top, char **data, Pixmap *pm, Pixmap *msk, XpmAttributes *atts); #ifdef ENHANCE_CMAP static Boolean switchColormap(Widget wid); #endif /*----------------------------------------------------------------------------- PUBLIC FUNCTIONS -----------------------------------------------------------------------------*/ void readBitmaps(void) { Cardinal i; int j; Display *dpy; int scrn; Colormap cmp; Window win; XColor black, white; BitmapRec *cb; unsigned int w,h,rw,rh; XpmAttributes xpm_attr; static XpmColorSymbol none_color = { NULL, "None", (Pixel)0 }; dpy = XtDisplay(aw.shell); win = DefaultRootWindow(dpy); scrn = DefaultScreen(dpy); cmp = DefaultColormap(dpy, scrn); black.pixel = BlackPixel(dpy, scrn); XQueryColor(dpy, cmp, &black); white.pixel = WhitePixel(dpy, scrn); XQueryColor(dpy, cmp, &white); /* create the hardcoded bitmaps */ for (i=0; iw) w=rw; if ((rh=cursor_bitmaps[2*i].height)>h) h=rh; } XQueryBestCursor(dpy,win,w,h,&rw,&rh); if ( rwbits, cb->width, cb->height); cb++; mask = XCreateBitmapFromData(dpy, win, cb->bits, cb->width, cb->height); cb--; curs[i] = XCreatePixmapCursor(dpy, source,mask, &black, &white, cb->width/2, cb->height/2); cb += 2; } /* create the application icons */ readPixmapFromData(dpy,win,aw.shell,xfm_icon_xpm,&bm_icon,&bm_iconmsk,&xpm_attr); readPixmapFromData(dpy,win,aw.shell,xfm_appmgr_xpm,&bm_appmgr,&bm_appmgrmsk,&xpm_attr); for (j=0; jdata = (struct filetype_data*)XtCalloc(1,sizeof(struct filetype_data)); readPixmapFromData(dpy,win,aw.shell,icons[j],&type->data->icon_bm,NULL,&xpm_attr); type->data->bm_width = xpm_attr.width; type->data->bm_height = xpm_attr.height; type->data->builtin = true; } } Pixmap loadFileIcon(const char *name, Cardinal *pm_width, Cardinal *pm_height) { Display *dpy = XtDisplay(aw.shell); Window win = DefaultRootWindow(dpy); Pixmap icon_bm; char fullname[MAXPATHLEN]; XpmAttributes xpm_attr; static XpmColorSymbol none_color = { NULL, "None", (Pixel)0 }; /* first search for xpm icons: */ #ifdef ENHANCE_CMAP xpm_attr.valuemask = XpmColormap|XpmColorSymbols|XpmSize|XpmCloseness; #else xpm_attr.valuemask = XpmReturnPixels|XpmColorSymbols|XpmSize; #endif xpm_attr.colorsymbols = &none_color; xpm_attr.numsymbols = 1; #ifdef ENHANCE_CMAP xpm_attr.closeness = (unsigned int) resources.color_closeness; XtVaGetValues(aw.shell, XtNbackground, &none_color.pixel, XtNcolormap, &xpm_attr.colormap, NULL); #else XtVaGetValues(aw.shell, XtNbackground, &none_color.pixel, NULL); #endif if (NULL==searchPathWithSuffix(fullname, resources.icon_path, name, ".xpm")) return None; if (XpmSuccess==readPixmapFromFile(dpy,win,aw.shell,fullname,&icon_bm,NULL,&xpm_attr)) { if (pm_width) *pm_width=(unsigned int)xpm_attr.width; if (pm_height) *pm_height=(unsigned int)xpm_attr.height; return icon_bm; } return None; } static Pixmap actualReadIcon(const char *name, Cardinal *pm_width, Cardinal *pm_height) { Display *dpy = XtDisplay(aw.shell); Window win = DefaultRootWindow(dpy); Screen *scrn = XtScreen(aw.shell); Pixmap icon_bm; char fullname[MAXPATHLEN]; unsigned int w, h; int x, y; XpmAttributes xpm_attr; static XpmColorSymbol none_color = { NULL, "None", (Pixel)0 }; /* first search for xpm icons: */ #ifdef ENHANCE_CMAP xpm_attr.valuemask = XpmColormap|XpmColorSymbols|XpmSize|XpmCloseness; #else xpm_attr.valuemask = XpmReturnPixels|XpmColorSymbols|XpmSize; #endif xpm_attr.colorsymbols = &none_color; xpm_attr.numsymbols = 1; #ifdef ENHANCE_CMAP xpm_attr.closeness = (unsigned int) resources.color_closeness; XtVaGetValues(aw.shell, XtNbackground, &none_color.pixel, XtNcolormap, &xpm_attr.colormap, NULL); #else XtVaGetValues(aw.shell, XtNbackground, &none_color.pixel, NULL); #endif (void) searchPath(fullname, resources.pixmap_path, name); if (XpmSuccess==readPixmapFromFile(dpy,win,aw.shell,fullname,&icon_bm,NULL,&xpm_attr)) { if (pm_width) *pm_width=(unsigned int)xpm_attr.width; if (pm_height) *pm_height=(unsigned int)xpm_attr.height; return icon_bm; } /* now search bitmap in standard locations (*bitmapFilePath): */ icon_bm = XmuLocateBitmapFile(scrn, name, NULL, 0, (int *)&w, (int *)&h, &x, &y); if (icon_bm != None) { if (pm_width) *pm_width=w; if (pm_height) *pm_height=h; return icon_bm; } /* finally search along *bitmapPath: */ if (XReadBitmapFile(dpy, win, searchPath(fullname, resources.bitmap_path, name), &w, &h, &icon_bm, &x, &y) == BitmapSuccess) { if (pm_width) *pm_width=w; if (pm_height) *pm_height=h; return icon_bm; } if (pm_width) *pm_width=(unsigned int)0; if (pm_height) *pm_height=(unsigned int)0; return None; } /* This introduces some caching mechanism, as any icon needed will * most likely needed soon again, do not free them but keep them in * a list and look for each name if we have loaded it already before. - brl */ static struct iconMemory { struct { String name; Pixmap icon; unsigned int width,height; } icons[100]; struct iconMemory *next; } *iconRoot = NULL; Pixmap loadIcon(const char *name, Cardinal *pm_width, Cardinal *pm_height) { struct iconMemory *m; int i; for( m = iconRoot; m != NULL ; m = m->next ) { for( i = 0 ; i < 100 ; i++ ) { if( m->icons[i].name == NULL ) break; if( strcmp(m->icons[i].name,name) == 0 ) break; } if( i < 100 ) break; } if( m == NULL ) { m = (struct iconMemory*)XtCalloc(1,sizeof(struct iconMemory)); m->next = iconRoot; iconRoot = m; i = 0; } if( m->icons[i].name == NULL ) { m->icons[i].icon = actualReadIcon(name,&m->icons[i].width, &m->icons[i].height); if( m->icons[i].icon == None ) { if (pm_width) *pm_width=(unsigned int)0; if (pm_height) *pm_height=(unsigned int)0; return None; } m->icons[i].name = XtNewString(name); } if (pm_width) *pm_width=m->icons[i].width; if (pm_height) *pm_height=m->icons[i].height; return m->icons[i].icon; } #ifdef ENHANCE_CMAP static Boolean switchColormap(Widget wid) { static Boolean has_private_cm=False; XtAppContext app=XtWidgetToApplicationContext(wid); Colormap new,old; Display *di=XtDisplay(wid); Widget top,wtmp; if (has_private_cm) { XtAppWarning(app,"switchColormap failed: have private colormap already"); return False; } top=wid; while((wtmp=XtParent(top))) top=wtmp; XtVaGetValues(top,XtNcolormap,&old,(char*)0); if (0==(new=XCopyColormapAndFree(di,old))) { XtAppWarning(app,"switchColormap failed: cannot allocate new colormap"); return False; } has_private_cm=True; XtVaSetValues(top,XtNcolormap,new,(char*)0); XtSetWMColormapWindows(top,&top,1); XtAppWarning(app,"switching to private colormap..."); return True; } #endif /*ENHANCE_CMAP*/ static int readPixmapFromFile(Display *dpy, Window win, Widget top, String searchpath, Pixmap *pm, Pixmap *msk, XpmAttributes *atts) { int rval; rval=XpmReadFileToPixmap(dpy,win,searchpath,pm,msk,atts); #ifdef ENHANCE_CMAP if (rval==XpmColorFailed && switchColormap(top)) { /* get the new colormap */ XtVaGetValues(top,XtNcolormap,&atts->colormap,(char*)0); /* and repeat */ return XpmReadFileToPixmap(dpy,win,searchpath,pm,msk,atts); } else #endif return rval; } static int readPixmapFromData(Display *dpy, Window win, Widget top, char **data, Pixmap *pm, Pixmap *msk, XpmAttributes *atts) { int rval; rval=XpmCreatePixmapFromData(dpy,win,data,pm,msk,atts); #ifdef ENHANCE_CMAP if (rval==XpmColorFailed && switchColormap(top)) { /* get the new colormap */ XtVaGetValues(top,XtNcolormap,&atts->colormap,(char*)0); /* and repeat */ return XpmCreatePixmapFromData(dpy,win,data,pm,msk,atts); } else #endif return rval; } xfm-1.5.4/src/FmMain.c0000644000175000017500000005663010735452244011356 00000000000000/* * This file is part of X-File Manager XFM * ---------------------------------------------------------------------- FmMain.c (c) S.Marlow 1990-92 (c) A.Graef 1994 (c) R.Vogelgesang 1994 (`Xfm.BourneShells' stuff) modified 7-1997 by strauman@sun6hft.ee.tu-berlin.de to add different enhancements (see README-1.4). modified 2003,2004,2005,2006,2007 by Bernhard R. Link (see Changelog) main module for file manager * ---------------------------------------------------------------------- * 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 of the License, 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include "FmVersion.h" #include #include #include #include #include #include #ifdef ENHANCE_USERINFO #include #include #endif #ifdef ENHANCE_TRANSLATIONS #include #endif #ifdef _AIX #include #endif #include #include #include #include #include #include "global.h" #include "Am.h" #include "Fm.h" #include "mime.h" #include "mime_start.h" #ifdef ENHANCE_HISTORY #include "FmHistory.h" #endif #ifdef ENHANCE_SELECTION #include "FmSelection.h" #endif #ifdef ENHANCE_LOG #include "FmLog.h" #endif #include "execute.h" #define XtRDisplayType "DisplayType" #define XtRSortType "SortType" #define XtRExpandedString "ExpandedString" #ifdef TESTRESOURCES #define XFM_APP_CLASS "TestXfm" #else #define XFM_APP_CLASS "Xfm" #endif #define XFM_BITMAP_PATH PKGDATADIR "/bitmaps:/usr/include/X11/bitmaps" #define XFM_PIXMAP_PATH PKGDATADIR "/pixmaps:/usr/include/X11/pixmaps:/usr/share/pixmaps" #define XFM_ICON_PATH PKGDATADIR "/icons" /*--------------------------------------------------------------------------- Public variables ---------------------------------------------------------------------------*/ /* program name */ char *progname; /* information about the user */ UserInfo user; /* application resource values */ Resources resources; /* application context */ XtAppContext app_context; /* Update semaphor */ int freeze = False; #ifdef ENHANCE_HISTORY HistoryList path_history; #endif /*--------------------------------------------------------------------------- Command line options ---------------------------------------------------------------------------*/ static XrmOptionDescRec options[] = { { "-appmgr", ".appmgr", XrmoptionNoArg, "True" }, { "-filemgr", ".filemgr", XrmoptionNoArg, "True" }, { "-version", ".version", XrmoptionNoArg, "True" } }; /*--------------------------------------------------------------------------- Application Resources ---------------------------------------------------------------------------*/ static XtResource resource_list[] = { { "appmgr", "Appmgr", XtRBoolean, sizeof(Boolean), XtOffsetOf(Resources, appmgr), XtRImmediate, (XtPointer) False }, { "filemgr", "Filemgr", XtRBoolean, sizeof(Boolean), XtOffsetOf(Resources, filemgr), XtRImmediate, (XtPointer) False }, { "version", "Version", XtRBoolean, sizeof(Boolean), XtOffsetOf(Resources, version), XtRImmediate, (XtPointer) False }, { "initGeometry", "InitGeometry", XtRString, sizeof(String), XtOffsetOf(Resources, init_geometry), XtRString, NULL }, { "iconFont", XtCFont, XtRFontStruct, sizeof(XFontStruct *), XtOffsetOf(Resources, icon_font), XtRString, XtDefaultFont }, { "buttonFont", XtCFont, XtRFontStruct, sizeof(XFontStruct *), XtOffsetOf(Resources, button_font), XtRString, XtDefaultFont }, { "menuFont", XtCFont, XtRFontStruct, sizeof(XFontStruct *), XtOffsetOf(Resources, menu_font), XtRString, XtDefaultFont }, { "labelFont", XtCFont, XtRFontStruct, sizeof(XFontStruct *), XtOffsetOf(Resources, label_font), XtRString, XtDefaultFont }, { "statusFont", XtCFont, XtRFontStruct, sizeof(XFontStruct *), XtOffsetOf(Resources, status_font), XtRString, XtDefaultFont }, { "boldFont", XtCFont, XtRFontStruct, sizeof(XFontStruct *), XtOffsetOf(Resources, bold_font), XtRString, XtDefaultFont }, { "cellFont", XtCFont, XtRFontStruct, sizeof(XFontStruct *), XtOffsetOf(Resources, cell_font), XtRString, XtDefaultFont }, { "appIconWidth", "Width", XtRInt, sizeof(int), XtOffsetOf(Resources, app_icon_width), XtRImmediate, (XtPointer) 48 }, { "appIconHeight", "Height", XtRInt, sizeof(int), XtOffsetOf(Resources, app_icon_height), XtRImmediate, (XtPointer) 40 }, { "fileIconWidth", "Width", XtRInt, sizeof(int), XtOffsetOf(Resources, file_icon_width), XtRImmediate, (XtPointer) 48 }, { "fileIconHeight", "Height", XtRInt, sizeof(int), XtOffsetOf(Resources, file_icon_height), XtRImmediate, (XtPointer) 40 }, { "treeIconWidth", "Width", XtRInt, sizeof(int), XtOffsetOf(Resources, tree_icon_width), XtRImmediate, (XtPointer) 48 }, { "treeIconHeight", "Height", XtRInt, sizeof(int), XtOffsetOf(Resources, tree_icon_height), XtRImmediate, (XtPointer) 32 }, { "bitmapPath", "Path", XtRExpandedString, sizeof(String), XtOffsetOf(Resources, bitmap_path), XtRString, XFM_BITMAP_PATH }, { "pixmapPath", "Path", XtRExpandedString, sizeof(String), XtOffsetOf(Resources, pixmap_path), XtRString, XFM_PIXMAP_PATH }, { "iconPath", "Path", XtRExpandedString, sizeof(String), XtOffsetOf(Resources, icon_path), XtRString, XFM_ICON_PATH }, { "symlinkDir", "ConfigDir", XtRExpandedString, sizeof(String), XtOffsetOf(Resources, symlinkdir), XtRString, "/tmp/xfm-${USER}-${PID}" }, { "alwaysSymlink", "Safety", XtRBoolean, sizeof(Boolean), XtOffsetOf(Resources, alwaysSymlink), XtRImmediate, (XtPointer)False }, { "applicationDataFile", "ConfigFile", XtRExpandedString, sizeof(String), XtOffsetOf(Resources, main_app_file), XtRString, "~/.xfm/Apps.xfm" }, { "applicationDataDir", "ConfigDir", XtRExpandedString, sizeof(String), XtOffsetOf(Resources, app_dir), XtRString, "~/.xfm" }, { "applicationDataClip", "File", XtRExpandedString, sizeof(String), XtOffsetOf(Resources, app_clip), XtRString, "~/.xfm/.XfmClip" }, { "devFile", "ConfigFile", XtRExpandedString, sizeof(String), XtOffsetOf(Resources, dev_file), XtRString, "~/.xfm/xfm_dev" }, { "mailcapFile", "ConfigFile", XtRExpandedString, sizeof(String), XtOffsetOf(Resources, mailcap_file), XtRString, "~/.xfm/xfm_mailcap" }, { "mimeTypesFile", "ConfigFile", XtRExpandedString, sizeof(String), XtOffsetOf(Resources, mimetypes_file), XtRString, "~/.xfm/xfm_mime.types" }, #ifdef SYSTEMWIDE_DEFAULTS { "systemwideApplicationDataFile", "ConfigFile", XtRExpandedString, sizeof(String), XtOffsetOf(Resources, system_main_app_file), XtRString, XFM_APPDIR "/Apps.xfm" }, { "systemwideApplicationDataDir", "ConfigFile", XtRExpandedString, sizeof(String), XtOffsetOf(Resources, system_app_dir), XtRString, XFM_APPDIR }, { "systemwideDevFile", "ConfigFile", XtRExpandedString, sizeof(String), XtOffsetOf(Resources, system_dev_file), XtRString, XFM_CONFDIR "/xfm_dev" }, { "systemwideMailcapFile", "ConfigFile", XtRExpandedString, sizeof(String), XtOffsetOf(Resources, system_mailcap_file), XtRString, XFM_CONFDIR "/xfm_mailcap" }, { "systemwideMagicFile", "ConfigFile", XtRExpandedString, sizeof(String), XtOffsetOf(Resources, system_magic_file), XtRString, XFM_CONFDIR "/xfm_magic" }, { "systemwideMimeTypesFile", "ConfigFile", XtRString, sizeof(String), XtOffsetOf(Resources, system_mimetypes_file), XtRString, XFM_CONFDIR "/xfm_mime.types" }, #endif { "magicFile", "ConfigFile", XtRExpandedString, sizeof(String), XtOffsetOf(Resources, magic_file), XtRString, "~/.xfm/xfm_magic" }, { "maxMagicRead", XtCValue, XtRCardinal, sizeof(Cardinal), XtOffsetOf(Resources, maxMagicRead), XtRImmediate, (XtPointer) 1024 }, { "confirmDeletes", "Confirm", XtRBoolean, sizeof(Boolean), XtOffsetOf(Resources, confirm_deletes), XtRImmediate, (XtPointer) True }, { "confirmDeleteFolder", "Confirm", XtRBoolean, sizeof(Boolean), XtOffsetOf(Resources, confirm_delete_folder), XtRImmediate, (XtPointer) True }, { "confirmMoves", "Confirm", XtRBoolean, sizeof(Boolean), XtOffsetOf(Resources, confirm_moves), XtRImmediate, (XtPointer) True }, { "confirmCopies", "Confirm", XtRBoolean, sizeof(Boolean), XtOffsetOf(Resources, confirm_copies), XtRImmediate, (XtPointer) True }, { "confirmOverwrite", "Confirm", XtRBoolean, sizeof(Boolean), XtOffsetOf(Resources, confirm_overwrite), XtRImmediate, (XtPointer) True }, { "confirmQuit", "Confirm", XtRBoolean, sizeof(Boolean), XtOffsetOf(Resources, confirm_quit), XtRImmediate, (XtPointer) True }, { "echoActions", "Echo", XtRBoolean, sizeof(Boolean), XtOffsetOf(Resources, echo_actions), XtRImmediate, (XtPointer) False }, { "echoMimeSearch", "Echo", XtRBoolean, sizeof(Boolean), XtOffsetOf(Resources, echo_mime_search), XtRImmediate, (XtPointer) False }, { "showOwner", "ShowOwner", XtRBoolean, sizeof(Boolean), XtOffsetOf(Resources, show_owner), XtRImmediate, (XtPointer) True }, { "showDate", "ShowDate", XtRBoolean, sizeof(Boolean), XtOffsetOf(Resources, show_date), XtRImmediate, (XtPointer) True }, { "showPermissions", "ShowPermissions", XtRBoolean, sizeof(Boolean), XtOffsetOf(Resources, show_perms), XtRImmediate, (XtPointer) True }, { "showLength", "ShowLength", XtRBoolean, sizeof(Boolean), XtOffsetOf(Resources, show_length), XtRImmediate, (XtPointer) True }, { "showInode", "ShowInode", XtRBoolean, sizeof(Boolean), XtOffsetOf(Resources, show_inode), XtRImmediate, (XtPointer) True }, { "showType", "ShowType", XtRBoolean, sizeof(Boolean), XtOffsetOf(Resources, show_type), XtRImmediate, (XtPointer) True }, { "showGroup", "ShowGroup", XtRBoolean, sizeof(Boolean), XtOffsetOf(Resources, show_group), XtRImmediate, (XtPointer) True }, { "showLinks", "ShowLinks", XtRBoolean, sizeof(Boolean), XtOffsetOf(Resources, show_links), XtRImmediate, (XtPointer) True }, { "defaultDisplayType", "DefaultDisplayType", XtRDisplayType, sizeof(DisplayType), XtOffsetOf(Resources, default_display_type), XtRImmediate, (XtPointer) Icons }, { "initialDisplayType", "InitialDisplayType", XtRDisplayType, sizeof(DisplayType), XtOffsetOf(Resources, initial_display_type), XtRImmediate, (XtPointer) Icons }, { "defaultSortType", "DefaultSortType", XtRSortType, sizeof(SortType), XtOffsetOf(Resources, default_sort_type), XtRImmediate, (XtPointer) SortByName }, { "doubleClickTime", "DoubleClickTime", XtRInt, sizeof(int), XtOffsetOf(Resources, double_click_time), XtRImmediate, (XtPointer) 300 }, { "updateInterval", "UpdateInterval", XtRInt, sizeof(int), XtOffsetOf(Resources, update_interval), XtRImmediate, (XtPointer) 10000 }, #ifdef ENHANCE_PERMS { "hardUpdateTicks", "HardUpdateTicks", XtRInt, sizeof(int), XtOffsetOf(Resources, hard_update_ticks), XtRImmediate, (XtPointer)0 }, #endif { "editor", "Editor", XtRCommandArgArray, sizeof(String), XtOffsetOf(Resources, editor), XtRString, NULL }, { "viewer", "Viewer", XtRCommandArgArray, sizeof(String), XtOffsetOf(Resources, viewer), XtRString, NULL }, { "xTerminal", "XTerminal", XtRCommandArgArray, sizeof(String*), XtOffsetOf(Resources, xterminal), XtRString, "x-terminal-emulator -e" }, { "xTerminalAlone", "XTerminalAlone", XtRCommandArgArray, sizeof(String*), XtOffsetOf(Resources, xtermalone), XtRString, "x-terminal-emulator" }, { "shell", "Shell", XtRCommandArgArray, sizeof(String), XtOffsetOf(Resources, shell), XtRString, NULL }, #ifdef ENHANCE_HISTORY { "historyMaxN", "HistoryMaxN", XtRInt, sizeof(int), XtOffsetOf(Resources, history_max_n), XtRImmediate, (XtPointer)30 }, #endif #ifdef ENHANCE_TRANSLATIONS { "appDefsVersion","AppDefsVersion",XtRString,sizeof(String), XtOffsetOf(Resources, app_defs_version), XtRString, (XtPointer)"NOT SET"}, #endif #ifdef ENHANCE_CMAP { "colorCloseness","ColorCloseness",XtRInt,sizeof(int), XtOffsetOf(Resources, color_closeness), XtRImmediate, (XtPointer)40000}, #endif #ifdef ENHANCE_SELECTION { "highlightColor","HighlightColor",XtRPixel,sizeof(Pixel), XtOffsetOf(Resources, highlight_pixel), XtRString, (XtPointer)XtDefaultForeground}, { "selectionPathsSeparator","SelectionPathsSeparator",XtRString,sizeof(String), XtOffsetOf(Resources, selection_paths_separator), XtRString, (XtPointer)" "}, #endif }; /*--------------------------------------------------------------------------- Fallback resources ---------------------------------------------------------------------------*/ static String fallback_resources[] = { #include "../defaults/fallback.res" NULL, }; /*--------------------------------------------------------------------------- Widget argument lists ---------------------------------------------------------------------------*/ static Arg shell_args[] = { { XtNtitle, (XtArgVal) "Applications" } }; static struct sigaction sigterm; /*--------------------------------------------------------------------------- Resource converter functions ---------------------------------------------------------------------------*/ static Boolean CvtStringToDisplayType(UNUSED(Display *display), UNUSED(XrmValue *args), UNUSED(Cardinal *n_args), XrmValue *fromVal, XrmValue *toVal, UNUSED(XtPointer *priv_data)) { static DisplayType d; if( strcmp(fromVal->addr, "Tree") == 0) d = Tree; else if( strcmp(fromVal->addr, "Icons") == 0) d = Icons; else if( strcmp(fromVal->addr, "Text") == 0) d = Text; else { XtStringConversionWarning(fromVal->addr, XtRDisplayType); return False; } if( sizeof(DisplayType) > toVal->size ) { toVal->addr = (caddr_t) &d; } else { *(DisplayType*)toVal->addr = d; } toVal->size = sizeof(DisplayType); return True; } /*---------------------------------------------------------------------------*/ static Boolean CvtStringToSortType(UNUSED(Display *display), UNUSED(XrmValue *args), UNUSED(Cardinal *n_args), XrmValue *fromVal, XrmValue *toVal, UNUSED(XtPointer *priv_data)) { static SortType d; if (strcmp(fromVal->addr, "SortByName") == 0) d = SortByName; else if (strcmp(fromVal->addr, "SortBySize") == 0) d = SortBySize; else if (strcmp(fromVal->addr, "SortByDate") == 0) d = SortByMTime; else { XtStringConversionWarning(fromVal->addr, XtRSortType); return False; } if( sizeof(SortType) > toVal->size ) { toVal->addr = (caddr_t) &d; } else { *(SortType*)toVal->addr = d; } toVal->size = sizeof(SortType); return True; } /*---------------------------------------------------------------------------*/ static Boolean CvtStringToExpandedString( UNUSED(Display *dpy), UNUSED(XrmValue *args), UNUSED(Cardinal *n_args), XrmValue *fromVal, XrmValue *toVal, XtPointer *data) { char *n; if( fromVal->size > 0 && fromVal->addr[fromVal->size-1] == '\0' && toVal->size == sizeof(String)) { n = home_and_env_expand(fromVal->addr); if( n != NULL ) { *data = NULL; *(String*)toVal->addr = n; return True; } } *data = NULL; XtStringConversionWarning(fromVal->addr, XtRExpandedString); return False; } static void CvtFreeExpandedString( UNUSED(XtAppContext app), UNUSED(XrmValue *to), XtPointer data, UNUSED(XrmValue *args), UNUSED(Cardinal *n_args)) { XtFree(data); } /*--------------------------------------------------------------------------- Main function ---------------------------------------------------------------------------*/ static void noWarnings(UNUSED(String msg)) { } int main(int argc, char *argv[]) { int r; char *s; const char *xfmversion = XFMVERSION; progname = argv[0]; /* get some information about the user */ user.uid = getuid(); user.gid = getgid(); if ((s = getenv("HOME"))) strcpy(user.home,s); else getwd(user.home); getwd(user.cwd); #ifndef ENHANCE_USERINFO /* read app-resources first */ if ((s = getenv("SHELL"))) strcpy(user.shell,s); else strcpy(user.shell,"/bin/sh"); #endif user.umask = umask(0); umask(user.umask); user.umask = 0777777 ^ user.umask; /* initialise the application and create the application shell */ aw.shell = XtAppInitialize(&app_context, XFM_APP_CLASS, options, XtNumber(options), &argc, argv, fallback_resources, shell_args, XtNumber(shell_args) ); /* First, initialize the atoms */ /* initialise the communications module */ initComms(); initViewportScroll(app_context); /* make sure we can close-on-exec the display connection */ if (fcntl(ConnectionNumber(XtDisplay(aw.shell)), F_SETFD, 1) == -1) abortXfm("Couldn't mark display connection as close-on-exec"); /* register resource converters */ XtSetTypeConverter(XtRString, XtRDisplayType, CvtStringToDisplayType, NULL, ZERO, XtCacheAll, NULL); XtSetTypeConverter(XtRString, XtRSortType, CvtStringToSortType, NULL, ZERO, XtCacheAll, NULL); XtSetTypeConverter(XtRString, XtRExpandedString, CvtStringToExpandedString, NULL, ZERO, XtCacheAll|XtCacheRefCount,CvtFreeExpandedString); /* get the application resources */ XtGetApplicationResources(aw.shell, &resources, resource_list, XtNumber(resource_list), NULL, ZERO); /* -version: print version number and exit: */ if (resources.version) { printf("xfm version %s.%s\n", xfmversion,XFMMINORVERSION); exit(0); } /* initialise the utilities module */ initUtils(); resources.symlinkdir = home_and_env_expand(resources.symlinkdir); if( !mime_start_init(resources.symlinkdir) ) abortXfm("error creating start directory"); #ifdef ENHANCE_USERINFO if (resources.shell == NULL || resources.shell[0] == NULL || resources.shell[0][0] == '\0') { const char *shell = getenv("SHELL"); resources.shell = (const char **)XtMalloc(3*sizeof(char*)); if (shell != NULL) resources.shell[0] = (String)shell; else resources.shell[0] = "/bin/sh"; resources.shell[1] = "-c"; resources.shell[2] = NULL; } #endif r = mime_init(); if( r <= -2 ) abortXfm("Out of Memory"); readBitmaps(); #ifdef ENHANCE_LOG (void)FmCreateLog(aw.shell,resources.button_font); #endif /* default is to launch both application and file manager */ if (!resources.appmgr && !resources.filemgr) resources.appmgr = resources.filemgr = True; /* set the multi-click time */ XtSetMultiClickTime(XtDisplay(aw.shell), resources.double_click_time); /* set up signal handlers */ sigterm.sa_handler = quit; sigemptyset(&sigterm.sa_mask); sigterm.sa_flags = 0; sigaction(SIGTERM,&sigterm,NULL); if( !execute_init(app_context) ) { exit(EXIT_FAILURE); } /* Set the icon for the application manager */ XtVaSetValues(aw.shell, XtNiconPixmap, bm_appmgr, NULL); XtVaSetValues(aw.shell, XtNiconMask, bm_appmgrmsk, NULL); /* Create Path History menu, must be before any file window is created */ #ifdef ENHANCE_HISTORY char *fixed[5]; int nfixed; /* Path History menu is initialized * (need to do this first because the history feature * provides an additional action that must be added to the action table * so the different popups can use it :-) */ nfixed=0; fixed[nfixed++]=user.home; #ifdef ENHANCE_USERINFO fixed[nfixed++]=user.cwd; #endif fixed[nfixed++]=0; path_history=FmCreateHistoryList( 0, /* let the menu's name be "fm_history" */ aw.shell, fixed); #endif /* some additional Popup Windows to initialize (move them into their windows?) */ /* Errors */ createErrorPopup(); #ifdef ENHANCE_TRANSLATIONS if (strcmp(resources.app_defs_version, XFMVERSION)) { if (resources.app_defs_version[0] == '\0') error("Sorry: Xfm.appDefsVersion was not defined!\n","perhaps Appl. Defaults are broken or too old!\n"); else error("Appl. Defaults: wrong version number (need " XFMVERSION "): ",resources.app_defs_version); exit(1); } #endif #ifdef SYSTEMWIDE_DEFAULTS /* check if config-dir is missing but should contain clipfile */ if (!exists(resources.app_dir)) { if (strncmp(resources.app_dir,resources.app_clip, strlen(resources.app_dir))==0 && ( resources.app_clip[strlen(resources.app_dir)] =='/' || (strlen(resources.app_dir)>0 && resources.app_clip[strlen(resources.app_dir)-1] == '/'))) { mkdir(resources.app_dir,0777); } } #else /* check for config dir and run xfm.install if appropriate */ if (!exists(resources.app_dir)) { Boolean aborted; if (amConfirm("It appears that you are running xfm for the first time.", "Would you like me to run the xfm.install script now", "to create your personal setup?", &aborted)) system("xfm.install -n"); else if (aborted) exit(1); } #endif #ifdef SYSTEMWIDE_DEFAULTS /* if the main_app_file is not found, use the system_main_app_file * instead. (Only change app_file and not main_app_file, to * allow adding a user-file while running). */ if (!exists(resources.main_app_file)) aw.app_file = XtNewString(resources.system_main_app_file); else #endif aw.app_file = XtNewString(resources.main_app_file); /* initialise the applications module & create the window */ if (resources.appmgr) { readApplicationData(); createApplicationWindow(); createApplicationDisplay(); } else { /* create a dummy window to store the WM_COMMAND property */ XtVaSetValues(aw.shell, XtNmappedWhenManaged,False, (char*)0); } /* still realize and set the WM properties. the WM needs * a window around and kwm is even able to restart an app * without a mapped toplevel window. */ XtRealizeWidget(aw.shell); setApplicationWindowName(); setWMProps(aw.shell); XtAddEventHandler(aw.shell, (EventMask)0L, True, (XtEventHandler)clientMessageHandler, (XtPointer)NULL); #ifdef ENHANCE_SELECTION /* initialize the selection ICCM */ FmSelectionInit(XtDisplay(aw.shell)); #endif /* initialise the file windows module & create a file window */ initFileWindows(); if (resources.filemgr) #ifdef ENHANCE_USERINFO newFileWindow(user.cwd,resources.initial_display_type,False); #else newFileWindow(user.home,resources.initial_display_type,False); #endif resources.init_geometry = NULL; /* start up window refresh timer */ if (resources.update_interval > 0) XtAppAddTimeOut(app_context, resources.update_interval, timeoutCb, NULL); /* those 'text cursor out of range' messages from the TextField widget kept annoying me, so I switch Xt warnings off here --AG */ XtAppSetWarningHandler(app_context, noWarnings); /* collect & process events */ XtAppMainLoop(app_context); mime_start_done(resources.symlinkdir); return 0; } /*---------------------------------------------------------------------------*/ void quit(UNUSED(int unused)) { unsigned int d; for (d = 0; d < n_devices; d++) if (devs[d].mounted) { devs[d].mounted = 1; umountDev(d); } mime_start_done(resources.symlinkdir); XtDestroyApplicationContext(app_context); exit(0); } xfm-1.5.4/src/IconFileList.c0000644000175000017500000004062710735452244012532 00000000000000/* * This file is part of X-File Manager XFM * ---------------------------------------------------------------------- * Enhancements to the X-File Manager XFM-1.3.2 (The IconFileList Widget) * Copyright (C) 1997 by Till Straumann * * modified 2005,2006,2007 by Bernhard R. Link (see Changelog) * ---------------------------------------------------------------------- * 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 of the License, 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include #include #include #include #include #include #include #include #include "global.h" #include "IconFileListP.h" #include "mime.h" /* more than 0xFFFF can not be put into 16 bit heights, * more than 0x7ff0 crashes some graphic drivers */ #define MAXDIMENSION 0x7f00 #define WIDENTOLONG 1 /* #undef WIDENTOLONG */ static XtResource il_resources[] = { #define offset(field) XtOffsetOf(IconFileListRec, iconFileList.field) /* {name, class, type, size, offset, default_type, default_addr}, */ { XtNentrySep, XtCEntrySep, XtRInt, sizeof(int), offset(entry_sep), XtRImmediate, (XtPointer)2}, { XtNtopSep, XtCTopSep, XtRInt, sizeof(int), offset(top), XtRImmediate, (XtPointer)2}, { XtNleftSep, XtCLeftSep, XtRInt, sizeof(int), offset(left), XtRImmediate, (XtPointer)2}, { XtNlabelSep, XtCLabelSep, XtRInt, sizeof(int), offset(labelsep), XtRImmediate, (XtPointer)2}, { XtNnHoriz, XtCNHoriz, XtRInt, sizeof(int), offset(user_n_horiz), XtRImmediate, (XtPointer)0}, { XtNminIconWidth, XtCMinIconWidth, XtRInt, sizeof(int), offset(min_icon_width), XtRImmediate, (XtPointer)0}, { XtNminIconHeight, XtCMinIconHeight, XtRInt, sizeof(int), offset(min_icon_height), XtRImmediate, (XtPointer)0}, { XtNmaxLabelWidth, XtCMaxLabelWidth, XtRInt, sizeof(int), offset(max_label_width), XtRImmediate, (XtPointer)100}, #undef offset }; /* Methods */ static void ilInitialize(Widget,Widget,ArgList,Cardinal*); static void ilExpose(Widget,XEvent*,Region); static void ilResize(Widget); static Boolean ilSetValues(Widget,Widget,Widget,ArgList,Cardinal*); static XtGeometryResult ilQueryGeometry(Widget,XtWidgetGeometry*,XtWidgetGeometry*); static int ilFindEntry(FileListWidget,int,int,XEvent*); static void ilEntryPosition(FileListWidget,int,Position*,Position*,Dimension*,Dimension*); /* private procedures */ static void drawPart(IconFileListWidget,int,int,int,int); /* Actions */ static void highlight(Widget, XEvent*, String*, Cardinal*); static void unhighlight(Widget, XEvent*, String*, Cardinal*); static XtActionsRec actions[] = { /* {name, procedure}, */ {"highlight", highlight}, {"unhighlight", unhighlight}, }; static char translations[] = " : dispatchDirFile(fileHighlight,fileMaybeHighlight,\"\")\n" " : resetCursor()\n" "Shift , : fileToggle()\n" "(2) : dispatchDirFile(fileOpenDir,fileExecAction,\"\")\n" ", : fileSelect()\n" ", : fileBeginDrag(1,move)\n" ", : fileToggle()\n" ", : fileBeginDrag(2,copy)\n" "Any : grabMouseForPopup(dispatchDirFile,dirPopup,filePopup,\"\")\n" "Any : ViewportScroll(-0.1,V)\n" "Any : ViewportScroll(+0.1,V)\n" "Shift n : notify(*folder*new)\n" "Shift g : notify(*folder*goto)\n" "Shift h : notify(*folder*home)\n" "Shift u : notify(*folder*up)\n" "Shift c : notify(*folder*clone)\n" "Shift q : notify(*folder*close)\n" "Ctrl r : notify(*view*tree)\n" "Ctrl i : notify(*view*icons)\n" "Ctrl t : notify(*view*text)\n" "Ctrl n : notify(\"*view*sort by name\")\n" "Ctrl s : notify(\"*view*sort by size\")\n" "Ctrl d : notify(\"*view*sort by mtime\")\n" "Ctrl f : notify(*view*filter)\n" "Ctrl h : notify(\"*view*hide folders\")\n" "Ctrl m : notify(\"*view*mix folders/files\")\n" "Ctrl u : notify(\"*view*show hidden files\")\n" #ifdef ENHANCE_LOG "Ctrl l : notify(\"*view*show log\")\n" #endif "n : notify(*file*new)\n" "m : notify(*file*move)\n" "c : notify(*file*copy)\n" "l : notify(*file*link)\n" "d : notify(*file*delete)\n" "Delete : notify(*file*delete)\n" "BackSpace : notify(*file*delete)\n" "s : notify(*file*select)\n" "a : notify(\"*file*select all\")\n" "u : notify(\"*file*deselect all\")\n" "o : notify(\"*file*own Selection\")\n" "x : notify(*file*xterm)\n" "q : notify(*file*quit)\n"; IconFileListClassRec iconFileListClassRec = { { /* core fields */ /* superclass */ (WidgetClass) &fileListClassRec, /* class_name */ "IconFileList", /* widget_size */ sizeof(IconFileListRec), /* class_initialize */ NULL, /* class_part_initialize */ NULL, /* class_inited */ FALSE, /* initialize */ ilInitialize, /* initialize_hook */ NULL, /* realize */ XtInheritRealize, /* actions */ actions, /* num_actions */ XtNumber(actions), /* resources */ il_resources, /* num_resources */ XtNumber(il_resources), /* xrm_class */ NULLQUARK, /* compress_motion */ TRUE, /* compress_exposure */ XtExposeCompressMultiple, /* compress_enterleave */ TRUE, /* visible_interest */ FALSE, /* destroy */ NULL, /* resize */ ilResize, /* expose */ ilExpose, /* set_values */ ilSetValues, /* set_values_hook */ NULL, /* set_values_almost */ XtInheritSetValuesAlmost, /* get_values_hook */ NULL, /* accept_focus */ NULL, /* version */ XtVersion, /* callback_private */ NULL, /* tm_table */ translations, /* query_geometry */ ilQueryGeometry, /* display_accelerator */ XtInheritDisplayAccelerator, /* extension */ NULL }, { /* FileList fields */ /* findEntry */ ilFindEntry, /* entryPosition */ ilEntryPosition }, { /* iconFileList fields */ /* empty */ 0 } }; WidgetClass iconFileListWidgetClass = (WidgetClass)&iconFileListClassRec; #define IL (ilw->iconFileList) #define FL (ilw->fileList) #define max(a,b) ({int _a=a;int _b=b;(_a>_b)?_a:_b;}) #define min(a,b) ({int _a=a;int _b=b;(_a>_b)?_b:_a;}) static void ilInitialize(UNUSED(Widget treq), Widget tnew, UNUSED(ArgList args), UNUSED(Cardinal *n_args)) { int i,width,height,tmp; Cardinal bm_wmax,bm_hmax; IconFileListWidget ilw=(IconFileListWidget)tnew; IL.hil_entry=-1; bm_wmax=IL.min_icon_width; bm_hmax=IL.min_icon_height; for (i=0; imime_type->data; if( type != NULL ) { if( type->bm_width > bm_wmax) bm_wmax=type->bm_width; if( type->bm_height > bm_hmax) bm_hmax=type->bm_height; } } bm_wmax+=2*FL.border_width; IL.entry_width = IL.entry_sep + max(bm_wmax, min(FL.name_w, IL.max_label_width)); /* Must be called as it initialized width, reducedname and reducedlen */ FileListReduceFilenames((FileListWidget)ilw, IL.entry_width - IL.entry_sep); IL.liney=bm_hmax+IL.labelsep+FL.font->max_bounds.ascent+FL.border_width; IL.entry_height=IL.liney+FL.font->max_bounds.descent+ FL.border_width+IL.entry_sep; if (IL.user_n_horiz==0) { if (ilw->core.width==0) { if (ilw->core.height==0) { IL.n_horiz=3; XtAppWarning(XtWidgetToApplicationContext(tnew), "IconFileListWidget: width, height and nHoriz==0 (set to 3)"); } else { int tmp2=((int)ilw->core.height-2*IL.top+IL.entry_sep)/IL.entry_height; if (tmp2==0) tmp2=1; IL.n_horiz=FL.n_files/tmp2; } } else { IL.n_horiz=((int)ilw->core.width-2*IL.left+IL.entry_sep)/IL.entry_width; if (IL.n_horiz==0) IL.n_horiz=1; } } else { IL.n_horiz=IL.user_n_horiz; } tmp=FL.n_files/IL.n_horiz +1; #ifdef WIDENTOLONG while (tmp*IL.entry_height > MAXDIMENSION ) { IL.n_horiz += 3; tmp=FL.n_files/IL.n_horiz +1; } #endif width=2*IL.left+IL.entry_width*IL.n_horiz-IL.entry_sep; height=2*IL.top+tmp*IL.entry_height-IL.entry_sep; if (width > MAXDIMENSION) width = MAXDIMENSION; if (height > 0x7000) height = MAXDIMENSION; if ((int)ilw->core.widthcore.width=width; if ((int)ilw->core.heightcore.height=height; } static void ilResize(Widget w) { IconFileListWidget ilw=(IconFileListWidget)w; if (IL.user_n_horiz==0) { IL.n_horiz=((int)ilw->core.width-2*IL.left+IL.entry_sep)/IL.entry_width; if (IL.n_horiz==0) IL.n_horiz=1; #ifdef WIDENTOLONG while ((FL.n_files/IL.n_horiz +1)*(int)IL.entry_height > MAXDIMENSION ) { IL.n_horiz += 3; } #endif } } static void ilExpose(Widget w, XEvent *ev, UNUSED(Region reg)) { IconFileListWidget ilw=(IconFileListWidget)w; int xmin,ymin,xmax,ymax; if (ev->xexpose.count>0) return; xmin=(ev->xexpose.x-IL.left)/IL.entry_width; if (xmin<0) xmin=0; if (xmin>=IL.n_horiz) xmin=IL.n_horiz-1; ymin=(ev->xexpose.y-IL.top)/IL.entry_height; if (ymin<0) ymin=0; xmax=(ev->xexpose.x+ev->xexpose.width-IL.top)/IL.entry_width; if (xmax>=IL.n_horiz) xmax=IL.n_horiz-1; if (xmax<0) xmax=0; ymax=(ev->xexpose.y+ev->xexpose.height-IL.top)/IL.entry_height; if (ymax<0) ymax=0; drawPart(ilw,xmin,xmax,ymin,ymax); } static void drawPart(IconFileListWidget ilw, int xmin, int xmax, int ymin, int ymax) { int indexx,i,j,left,ulx,uly,x,y,bm_h,bm_w; unsigned int rectw, recth,w,h; FileRec *file; int recty,rectx; Display *di=XtDisplay((Widget)ilw); Window win=XtWindow((Widget)ilw); GC gc; if (!XtIsRealized((Widget)ilw)) return; rectx=FL.border_width/2; recty=FL.border_width/2; rectw=IL.entry_width-FL.border_width-IL.entry_sep; recth=IL.entry_height-FL.border_width-IL.entry_sep; bm_w=IL.entry_width-IL.entry_sep; bm_h=IL.liney-FL.font->max_bounds.ascent-IL.labelsep+FL.border_width; indexx=ymin*IL.n_horiz+xmin; left=IL.left+xmin*IL.entry_width; uly=IL.top +ymin*IL.entry_height; for (i=ymin; i<=ymax; i++) { ulx=left; for (j=xmin; j<=xmax; j++) { if (indexx>=FL.n_files) { indexx=-2; return; } /* Draw one element here */ file=FL.files[indexx]; gc=FL.gc_norm; if (IL.hil_entry==indexx) { XFillRectangle(di,win, FL.gc_highlight, ulx+rectx,uly+recty, rectw,recth); gc=FL.gc_invert; } XDrawString(di,win, gc, ulx+(bm_w-file->width)/2, uly+IL.liney, file->reducedname, file->reducedlen); w = file->mime_type->data->bm_width; h = file->mime_type->data->bm_height; x = ulx+(bm_w-(int)w)/2; y = uly+(bm_h-(int)h)/2; XCopyArea(di,file->mime_type->data->icon_bm,win,FL.gc_highlight, 0,0,w,h, x,y); if (file->info.symlink) XCopyArea(di,file_modifiers[LINK_SYMBOL].pm, win,FL.gc_highlight, 0,0, file_modifiers[LINK_SYMBOL].width, file_modifiers[LINK_SYMBOL].height, x,y+h-file_modifiers[LINK_SYMBOL].height); if (file->info.gzipped) XCopyArea(di,file_modifiers[GZIP_SYMBOL].pm, win,FL.gc_highlight, 0,0, file_modifiers[GZIP_SYMBOL].width, file_modifiers[GZIP_SYMBOL].height, x+w-file_modifiers[LINK_SYMBOL].width, y+h-file_modifiers[LINK_SYMBOL].height); if (file->info.bzipped) XCopyArea(di,file_modifiers[BZIP_SYMBOL].pm, win,FL.gc_highlight, 0,0, file_modifiers[BZIP_SYMBOL].width, file_modifiers[BZIP_SYMBOL].height, x+w-file_modifiers[LINK_SYMBOL].width, y+h-file_modifiers[LINK_SYMBOL].height); if (file->selected) XDrawRectangle(di,win,FL.gc_highlight, ulx+rectx,uly+recty, rectw,recth); /* end drawing */ ulx+=IL.entry_width; indexx++; } uly+=IL.entry_height; indexx+=IL.n_horiz-1-(xmax-xmin); } } #define IN (new->iconFileList) #define IC (current->iconFileList) static Boolean ilSetValues(Widget c, UNUSED(Widget r), Widget super, UNUSED(ArgList args), UNUSED(Cardinal *nargs)) { int rval=False,tmp; IconFileListWidget current=(IconFileListWidget)c; IconFileListWidget new=(IconFileListWidget)super; IN.entry_sep=IC.entry_sep; IN.top=IC.top; IN.left=IC.left; IN.labelsep=IC.labelsep; IN.min_icon_width=IC.min_icon_width; IN.min_icon_height=IC.min_icon_height; IN.max_label_width=IC.max_label_width; if (IN.user_n_horiz != IC.user_n_horiz) { if (IN.user_n_horiz<=0) { IN.user_n_horiz=0; IN.n_horiz=((int)new->core.width-2*IN.left+IN.entry_sep)/IN.entry_width; if (IN.n_horiz==0) IN.n_horiz=1; } else { IN.n_horiz=IN.user_n_horiz; tmp=new->fileList.n_files/IN.n_horiz+1; #ifdef WIDENTOLONG while (tmp*IN.entry_height > 0x7000 ) { IN.n_horiz += 3; tmp=new->fileList.n_files/IN.n_horiz+1; } #endif new->core.width=2*IN.left+IN.entry_width*IN.n_horiz-IN.entry_sep; new->core.height=2*IN.top+tmp*IN.entry_height-IN.entry_sep; } } return rval; } #undef IN #undef IC static XtGeometryResult ilQueryGeometry(Widget w, XtWidgetGeometry* intended,XtWidgetGeometry* preferred) { IconFileListWidget ilw=(IconFileListWidget)w; int n_vert,new_nhoriz,width,height; preferred->request_mode = CWWidth | CWHeight; if (IL.user_n_horiz>0) { preferred->width=w->core.width; preferred->height=w->core.height; return XtGeometryNo; } if (intended->width > MAXDIMENSION) width = MAXDIMENSION; else width = intended->width; new_nhoriz=(width-2*IL.left+IL.entry_sep)/IL.entry_width; if (new_nhoriz==0) new_nhoriz=1; n_vert=FL.n_files/new_nhoriz+1; #ifdef WIDENTOLONG while (n_vert*IL.entry_height > MAXDIMENSION ) { new_nhoriz += 3; n_vert=FL.n_files/new_nhoriz +1; } #endif width = new_nhoriz*IL.entry_width +2*IL.left-IL.entry_sep; if (width > MAXDIMENSION) preferred->width = MAXDIMENSION; else preferred->width = width; height = IL.entry_height*n_vert-IL.entry_sep+2*IL.top; if (height > MAXDIMENSION) preferred->height = MAXDIMENSION; else preferred->height = height; if ( ((intended->request_mode & (CWWidth | CWHeight)) == (CWWidth | CWHeight)) && intended->height >= preferred->height) return XtGeometryYes; else if (preferred->width == w->core.width && preferred->height == w->core.height) return XtGeometryNo; else return XtGeometryAlmost; } static void highlight(Widget w, XEvent* ev, String* args, Cardinal* nargs) { IconFileListWidget ilw=(IconFileListWidget)w; int i,x,y; FileListEventPosition(ev,&x,&y); /* this excludes the case of being an event other * than Motion, Button- Enter-/Leave or Key- event * (x == -1 in this case). */ i=ilFindEntry((FileListWidget)w,x,y,ev); if (i==IL.hil_entry) return; /* is already highlighted */ if (IL.hil_entry>=0) unhighlight(w,ev,args,nargs); IL.hil_entry=i; x=i%IL.n_horiz; y=i/IL.n_horiz; if (i>=0) drawPart(ilw,x,x,y,y); } static void unhighlight(Widget w, UNUSED(XEvent* ev), UNUSED(String* args), UNUSED(Cardinal* nargs)) { IconFileListWidget ilw=(IconFileListWidget)w; int i=IL.hil_entry,x,y; int rectx,recty; unsigned int rectw,recth; if (IL.hil_entry<0) return; x=i%IL.n_horiz; y=i/IL.n_horiz; rectx=IL.left+ x*IL.entry_width; recty=IL.top + y*IL.entry_height; rectw=IL.entry_width-IL.entry_sep; recth=IL.entry_height-IL.entry_sep; XFillRectangle(XtDisplay(w),XtWindow(w), FL.gc_invert, rectx,recty, rectw,recth); IL.hil_entry=-1; drawPart(ilw,x,x,y,y); } static int ilFindEntry(FileListWidget flw, int x, int y, UNUSED(XEvent *ev)) { IconFileListWidget ilw=(IconFileListWidget)flw; int i,nx,ny; if (x= IL.left+IL.n_horiz*IL.entry_width) return -1; nx=(x-IL.left)/IL.entry_width; ny=(y-IL.top)/IL.entry_height; i=ny*IL.n_horiz+nx; if (i<0 || i>=FL.n_files) return -1; else return i; } static void ilEntryPosition( FileListWidget flw, int entry, Position *x, Position *y, Dimension *width, Dimension *height) { IconFileListWidget ilw=(IconFileListWidget)flw; *x=(Position)(IL.left+IL.entry_width*(entry%IL.n_horiz)); *y=(Position)(IL.top+IL.entry_height*(entry/IL.n_horiz)); *width=(Dimension)(IL.entry_width-IL.entry_sep); *height=(Dimension)(IL.entry_height-IL.entry_sep); } xfm-1.5.4/src/FmChmod.c0000644000175000017500000003464010657576540011532 00000000000000/* * This file is part of X-File Manager XFM * ---------------------------------------------------------------------- FmChmod.c (c) Simon Marlow 1990-92 (c) Albert Graef 1994 modified 7-1997 by strauman@sun6hft.ee.tu-berlin.de to add different enhancements (see README-1.4). modified 2005,2006,2007 by Bernhard R. Link (see Changelog) Functions & data for handling the chmod feature * ---------------------------------------------------------------------- * 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 of the License, 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include #include #include #include #include #include #include #include "global.h" #include "Am.h" #include "Fm.h" #define FORM_WIDTH 96 #define OWNER 0 #define GROUP 1 #define OTHERS 2 #define READ 0 #define WRITE 1 #define EXECUTE 2 /*--------------------------------------------------------------------------- STATIC DATA ---------------------------------------------------------------------------*/ typedef struct { Widget w; int value; } ChmodItem; typedef struct ChmodPopupData{ Widget shell; Widget label; FileWindowRec *fw; int file; ChmodItem items[3][3]; } ChmodData; /*--------------------------------------------------------------------------- Widget Argument lists ---------------------------------------------------------------------------*/ static Arg shell_args[] = { { XtNtitle, (XtArgVal) "Change Permissions" }, { XtNtransientFor, (XtArgVal) NULL } }; static Arg label_args[] = { { XtNfromHoriz, (XtArgVal) NULL }, { XtNfromVert, (XtArgVal) NULL }, { XtNlabel, (XtArgVal) NULL }, { XtNwidth, (XtArgVal) 0 }, { XtNfont, (XtArgVal) NULL }, { XtNjustify, XtJustifyLeft }, { XtNtop, XtChainTop }, { XtNbottom, XtChainTop }, { XtNleft, XtChainLeft }, { XtNright, XtChainRight } }; static Arg tickbox_args[] = { { XtNfromHoriz, (XtArgVal) NULL }, { XtNfromVert, (XtArgVal) NULL }, { XtNbitmap, (XtArgVal) None }, { XtNwidth, (XtArgVal) 0 }, { XtNresize, (XtArgVal) False }, { XtNtop, XtChainTop }, { XtNbottom, XtChainTop }, { XtNleft, XtChainLeft }, { XtNright, XtChainRight } }; static Arg *form_args = NULL; static Arg form2_args[] = { { XtNfromHoriz, (XtArgVal) NULL }, { XtNfromVert, (XtArgVal) NULL }, { XtNwidth, (XtArgVal) FORM_WIDTH }, { XtNdefaultDistance, (XtArgVal) 0 }, { XtNtop, XtChainTop }, { XtNbottom, XtChainTop }, { XtNleft, XtChainLeft }, { XtNright, XtChainLeft } }; static Arg button_box_args[] = { { XtNfromHoriz, (XtArgVal) NULL }, { XtNfromVert, (XtArgVal) NULL }, { XtNtop, XtChainTop }, { XtNbottom, XtChainTop }, { XtNleft, XtChainLeft }, { XtNright, XtChainLeft } }; /*--------------------------------------------------------------------------- Strings to display in labels ---------------------------------------------------------------------------*/ static const char *big_labels[] = { "Owner", "Group", "Others" }; static const char *small_labels[] = { "r", "w", "x" }; /*-------------------------------------------------------------------------- PRIVATE FUNCTIONS ---------------------------------------------------------------------------*/ static CallbackProc chmodRestoreCb, chmodOkCb, chmodCancelCb; static void setupTicks(ChmodData *chmode) { register int i,j; struct stat *stats; Pixmap picts=0; stats = &chmode->fw->files[chmode->file]->stats; chmode->items[OWNER][READ].value = (stats->st_mode) & S_IRUSR; chmode->items[OWNER][WRITE].value = (stats->st_mode) & S_IWUSR; chmode->items[OWNER][EXECUTE].value = (stats->st_mode) & S_IXUSR; #ifdef ENHANCE_PERMS chmode->items[OWNER][EXECUTE].value |= (stats->st_mode) & S_ISUID; #endif chmode->items[GROUP][READ].value = (stats->st_mode) & S_IRGRP; chmode->items[GROUP][WRITE].value = (stats->st_mode) & S_IWGRP; chmode->items[GROUP][EXECUTE].value = (stats->st_mode) & S_IXGRP; #ifdef ENHANCE_PERMS chmode->items[GROUP][EXECUTE].value |= (stats->st_mode) & S_ISGID; #endif chmode->items[OTHERS][READ].value = (stats->st_mode) & S_IROTH; chmode->items[OTHERS][WRITE].value = (stats->st_mode) & S_IWOTH; chmode->items[OTHERS][EXECUTE].value = (stats->st_mode) & S_IXOTH; #ifdef ENHANCE_PERMS chmode->items[OTHERS][EXECUTE].value |= (stats->st_mode) & S_ISVTX; for (i=0; i<3; i++) { for (j=0; j<2; j++) { XtVaSetValues(chmode->items[i][j].w, XtNbitmap, chmode->items[i][j].value ? bm[TICK_BM] : bm[NOTICK_BM], NULL); } } j=(chmode->items[0][2].value & S_IXUSR ? 1:0); j+=(chmode->items[0][2].value & S_ISUID ? 2:0); switch(j) { case 0: picts=bm[NOTICK_BM]; break; case 1: picts=bm[TICK_BM]; break; case 2: picts=bm[SUID_BM]; break; case 3: picts=bm[sUID_BM]; break; } chmode->items[0][2].value=j; XtVaSetValues(chmode->items[0][2].w, XtNbitmap, picts, (char*)0); j=(chmode->items[1][2].value & S_IXGRP ? 1:0); j+=(chmode->items[1][2].value & S_ISGID ? 2:0); switch(j) { case 0: picts=bm[NOTICK_BM]; break; case 1: picts=bm[TICK_BM]; break; case 2: picts=bm[SUID_BM]; break; case 3: picts=bm[sUID_BM]; break; } chmode->items[1][2].value=j; XtVaSetValues(chmode->items[1][2].w, XtNbitmap, picts, (char*)0); j=(chmode->items[2][2].value & S_IXOTH ? 1:0); j+=(chmode->items[2][2].value & S_ISVTX ? 2:0); switch(j) { case 0: picts=bm[NOTICK_BM]; break; case 1: picts=bm[TICK_BM]; break; case 2: picts=bm[STICKY_BM]; break; case 3: picts=bm[StICKY_BM]; break; } chmode->items[2][2].value=j; XtVaSetValues(chmode->items[2][2].w, XtNbitmap, picts, (char*)0); #else for (i=0; i<3; i++) { for (j=0; j<3; j++) { XtVaSetValues(chmode->items[i][j].w, XtNbitmap, chmode->items[i][j].value ? bm[TICK_BM] : bm[NOTICK_BM], NULL); } } #endif } /*---------------------------------------------------------------------------*/ static void chmodRestoreCb(UNUSED(Widget w), void *client_data, UNUSED(XtPointer call_data)) { ChmodData *chmode = client_data; setupTicks(chmode); } /*---------------------------------------------------------------------------*/ static void tickBoxCb(Widget w, XtPointer client_data, UNUSED(XtPointer call_data)) { register int i,j; ChmodData *chmode = client_data; #ifdef ENHANCE_PERMS register int k; Pixmap picts=0; #endif for (i=0; i<3; i++) { for (j=0; j<3; j++) if (w == chmode->items[i][j].w) break; if (j < 3 ) break; } #ifdef ENHANCE_PERMS if (j<2) { #endif if (chmode->items[i][j].value) chmode->items[i][j].value = False; else chmode->items[i][j].value = True; XtVaSetValues(chmode->items[i][j].w, XtNbitmap, chmode->items[i][j].value ? bm[TICK_BM] : bm[NOTICK_BM], NULL); #ifdef ENHANCE_PERMS } else { k=chmode->items[i][j].value=(chmode->items[i][j].value+1)%4; if (i<2) switch(k) { case 0: picts=bm[NOTICK_BM]; break; case 1: picts=bm[TICK_BM]; break; case 2: picts=bm[SUID_BM]; break; case 3: picts=bm[sUID_BM]; break; } else switch(k) { case 0: picts=bm[NOTICK_BM]; break; case 1: picts=bm[TICK_BM]; break; case 2: picts=bm[STICKY_BM]; break; case 3: picts=bm[StICKY_BM]; break; } XtVaSetValues(chmode->items[i][j].w, XtNbitmap, picts, (char*)0); } #endif } /*---------------------------------------------------------------------------*/ static void chmodOkCb(UNUSED(Widget w), void *client_data, UNUSED(XtPointer call_data)) { mode_t mode; ChmodData *chmode = client_data; XtPopdown(chmode->shell); mode = chmode->fw->files[chmode->file]->stats.st_mode; mode &= ~(S_IRUSR | S_IWUSR | S_IXUSR | S_IRGRP | S_IWGRP | S_IXGRP | #ifdef ENHANCE_PERMS S_ISUID | S_ISGID | S_ISVTX | #endif S_IROTH | S_IWOTH | S_IXOTH); mode |= chmode->items[OWNER][READ].value ? S_IRUSR : 0; mode |= chmode->items[OWNER][WRITE].value ? S_IWUSR : 0; #ifdef ENHANCE_PERMS mode |= chmode->items[OWNER][EXECUTE].value & 1 ? S_IXUSR : 0; mode |= chmode->items[OWNER][EXECUTE].value & 2 ? S_ISUID : 0; #else mode |= chmode->items[OWNER][EXECUTE].value ? S_IXUSR : 0; #endif mode |= chmode->items[GROUP][READ].value ? S_IRGRP : 0; mode |= chmode->items[GROUP][WRITE].value ? S_IWGRP : 0; #ifdef ENHANCE_PERMS mode |= chmode->items[GROUP][EXECUTE].value & 1 ? S_IXGRP : 0; mode |= chmode->items[GROUP][EXECUTE].value & 2 ? S_ISGID : 0; #else mode |= chmode->items[GROUP][EXECUTE].value ? S_IXGRP : 0; #endif mode |= chmode->items[OTHERS][READ].value ? S_IROTH : 0; mode |= chmode->items[OTHERS][WRITE].value ? S_IWOTH : 0; #ifdef ENHANCE_PERMS mode |= chmode->items[OTHERS][EXECUTE].value & 1 ? S_IXOTH : 0; mode |= chmode->items[OTHERS][EXECUTE].value & 2 ? S_ISVTX : 0; #else mode |= chmode->items[OTHERS][EXECUTE].value ? S_IXOTH : 0; #endif if (chdir(chmode->fw->directory)) { sysError("System error:"); goto out; } if (chmod(chmode->fw->files[chmode->file]->name, mode)) { sysErrorFmt("Can't change modes for %s:", chmode->fw->files[chmode->file]->name); } else { markForUpdate(chmode->fw->directory); intUpdate(); } out: freeze = False; } /*---------------------------------------------------------------------------*/ static void chmodCancelCb(UNUSED(Widget w), void *client_data, UNUSED(XtPointer call_data)) { ChmodData *chmode = client_data; XtPopdown(chmode->shell); freeze = False; } static void chmodDestroy(UNUSED(Widget w), void *client_data, UNUSED(XtPointer call_data)) { ChmodData *chmode = client_data; if( XtIsBeingDestroyed(XtParent(chmode->shell))) return; chmode->fw->chmode = NULL; } /*--------------------------------------------------------------------------- Button Information ---------------------------------------------------------------------------*/ static const ButtonRec chmod_buttons[] = { { "ok", "Ok", chmodOkCb }, { "restore", "Restore", chmodRestoreCb }, { "cancel", "Cancel", chmodCancelCb } }; /*--------------------------------------------------------------------------- PUBLIC FUNCTIONS ---------------------------------------------------------------------------*/ static void createChmodPopup(FileWindowRec *fw) { ChmodData *chmode; Widget form, form2, blabel, w; register int i,j; chmode = (void*)XtCalloc(1, sizeof(ChmodData)); chmode->fw = fw; /* create shell */ shell_args[1].value = (XtArgVal)fw->shell; chmode->shell = XtCreatePopupShell("chmod", transientShellWidgetClass, aw.shell, shell_args, XtNumber(shell_args)); /* create outer form */ form = XtCreateManagedWidget("form", formWidgetClass, chmode->shell, form_args, XtNumber(form_args) ); /* create two labels for message */ label_args[0].value = (XtArgVal) NULL; label_args[1].value = (XtArgVal) NULL; label_args[3].value = (XtArgVal) FORM_WIDTH*3 + 30; label_args[4].value = (XtArgVal) resources.label_font; chmode->label = XtCreateManagedWidget("label1", labelWidgetClass, form, label_args, XtNumber(label_args) ); form2_args[1].value = (XtArgVal) chmode->label; label_args[5].value = (XtArgVal) XtJustifyCenter; form2 = NULL; /* create smaller forms */ for (i=0; i<3; i++) { form2_args[0].value = (XtArgVal) form2; form2 = XtCreateManagedWidget(big_labels[i], formWidgetClass, form, form2_args, XtNumber(form2_args) ); label_args[0].value = label_args[1].value = (XtArgVal) NULL; label_args[2].value = (XtArgVal) big_labels[i]; label_args[3].value = (XtArgVal) FORM_WIDTH; blabel = XtCreateManagedWidget("label", labelWidgetClass, form2, label_args, XtNumber(label_args) ); w = NULL; for (j=0; j<3; j++) { label_args[0].value = tickbox_args[0].value = (XtArgVal) w; label_args[1].value = (XtArgVal) blabel; label_args[2].value = (XtArgVal) small_labels[j]; label_args[3].value = (XtArgVal) FORM_WIDTH/3; w = XtCreateManagedWidget(small_labels[j], labelWidgetClass, form2, label_args, XtNumber(label_args) ); tickbox_args[1].value = (XtArgVal) w; tickbox_args[2].value = (XtArgVal) NULL; tickbox_args[3].value = (XtArgVal) FORM_WIDTH/3; w = XtCreateManagedWidget(small_labels[j], commandWidgetClass, form2, tickbox_args, XtNumber(tickbox_args) ); XtAddCallback(w, XtNcallback, (XtCallbackProc) tickBoxCb, chmode); chmode->items[i][j].w = w; } } /* create button box & buttons */ button_box_args[1].value = (XtArgVal) form2; w = XtCreateManagedWidget("button box", boxWidgetClass, form, button_box_args, XtNumber(button_box_args) ); createButtons(chmod_buttons, XtNumber(chmod_buttons), w, chmode); #ifdef ENHANCE_POP_ACCEL XtInstallAllAccelerators(form,form); XtInstallAllAccelerators(chmode->shell,form); #endif XtAddCallback(chmode->shell, XtNdestroyCallback, chmodDestroy, chmode); fw->chmode = chmode; XtRealizeWidget(chmode->shell); setWMProps(chmode->shell); } /*---------------------------------------------------------------------------*/ void chmodPopup(UNUSED(Widget w), FileWindowRec *fw, UNUSED(void *call_data)) { char *message; size_t l; register int i; assert( fw != NULL ); if (!fw->n_selections) return; if( fw->chmode == NULL ) createChmodPopup(fw); for (i=0;; i++) if (fw->files[i]->selected) { fw->chmode->file = i; break; } l = strlen(fw->files[fw->chmode->file]->name); #define msg "Changing access permissions for " #define msgsize sizeof(msg) message = XtMalloc(msgsize+l); memcpy(message, msg, msgsize); memcpy(message+msgsize-1, fw->files[fw->chmode->file]->name, l+1); #undef msgsize #undef msg XtVaSetValues(fw->chmode->label, XtNlabel, (XtArgVal) message, NULL); XtFree(message); setupTicks(fw->chmode); freeze = True; popupByCursor(fw->chmode->shell, XtGrabExclusive); } xfm-1.5.4/src/FmFwActions.c0000644000175000017500000005625110657577236012402 00000000000000/* * This file is part of X-File Manager XFM * ---------------------------------------------------------------------- FmFwActions.c (c) Simon Marlow 1990-92 (c) Albert Graef 1994 modified 7-1997 by strauman@sun6hft.ee.tu-berlin.de to add different enhancements (see README-1.4). modified 2004,2005,2006,2007 by Bernhard R. Link (see Changelog) Action procedures for widgets in a file window * ---------------------------------------------------------------------- * 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 of the License, 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include #include #include #include #include "FileList.h" #include "global.h" #include "Am.h" #include "Fm.h" #include "execute.h" #ifdef ENHANCE_SELECTION #include "FmSelection.h" #endif #include "mime.h" #include "mime_start.h" /*--------------------------------------------------------------------------- PUBLIC DATA ---------------------------------------------------------------------------*/ MoveInfo move_info; Boolean dragging = False; /*--------------------------------------------------------------------------- STATIC DATA ---------------------------------------------------------------------------*/ static Cursor drag_cursor; static Boolean was_dropable; /*--------------------------------------------------------------------------- PRIVATE FUNCTIONS ---------------------------------------------------------------------------*/ static int findWidget(Widget w, FileWindowRec **fw_ret, XEvent *ev) { int i; FileWindowRec *fw; for (fw = file_windows; fw; fw = fw->next) { if (fw->icon_box == w || fw->label == w) { *fw_ret = fw; if (XtIsSubclass(w,fileListWidgetClass)) { return FileListFindEntry((FileListWidget)w,ev) ; } return -1; } for (i = 0; i < fw->n_files; i++) if (fw->files[i]->icon.toggle == w) { *fw_ret = fw; return i; } } *fw_ret = NULL; return 0; } /*---------------------------------------------------------------------------*/ static int moveFiles(FileWindowRec *fw, const char *fromdir, const char *todir) { int i, n_moved = 0; char *from, *to; Boolean aborted; for (i=0; i < move_info.fw->n_files; i++) if (move_info.fw->files[i]->selected) { if (!strcmp(move_info.fw->files[i]->name, ".") || !strcmp(move_info.fw->files[i]->name, "..")) { error("Cannot move . or ..", ""); continue; } from = dirConcat(fromdir, move_info.fw->files[i]->name); to = dirConcat(todir, move_info.fw->files[i]->name); if (exists(to) && resources.confirm_overwrite) { if (!fwConfirm(fw, "Move: file already exists at destination", move_info.fw->files[i]->name, "Overwrite?", &aborted)) { XTFREE(from); XTFREE(to); if (aborted) break; else continue; } } if (rmove(from,to)) { sysErrorFmt("Error moving %s:", move_info.fw->files[i]->name); } else n_moved++; XTFREE(from); XTFREE(to); } return n_moved; } /*---------------------------------------------------------------------------*/ static int copyFiles(FileWindowRec *fw, const char *fromdir, const char *todir) { int i, n_copied = 0; char *from, *to; Boolean aborted; for (i=0; i < move_info.fw->n_files; i++) if (move_info.fw->files[i]->selected) { if (!strcmp(move_info.fw->files[i]->name, ".") || !strcmp(move_info.fw->files[i]->name, "..")) { error("Cannot copy . or ..", ""); continue; } from = dirConcat(fromdir, move_info.fw->files[i]->name); to = dirConcat(todir, move_info.fw->files[i]->name); if (exists(to) && resources.confirm_overwrite) { if (!fwConfirm(fw, "Copy: file already exists at destination", move_info.fw->files[i]->name, "Overwrite?", &aborted)) { XTFREE(from); XTFREE(to); if (aborted) break; else continue; } } if (rcopy(from,to)) { sysErrorFmt("Error copying %s:", move_info.fw->files[i]->name); } else n_copied++; XTFREE(from); XTFREE(to); } return n_copied; } /*---------------------------------------------------------------------------*/ static int setupMoveCopy(FileWindowRec *fw, int i, char **todir_buf, const char **todir) { *todir_buf = NULL; if (i != -1 && S_ISDIR(fw->files[i]->stats.st_mode) && strcmp(fw->files[i]->name, ".")) { if (chdir(fw->directory) || chdir(fw->files[i]->name) || (*todir_buf = get_current_dir_name()) == NULL) { sysError("System error:"); return 0; } *todir = *todir_buf; } else *todir = fw->directory; return 1; } /*---------------------------------------------------------------------------*/ static void fileEndMove(FileWindowRec *fw, int i) { const char *destdir, *srcdir; char *buffer; srcdir = move_info.fw->directory; if (!setupMoveCopy(fw, i, &buffer, &destdir)) return; if (cmpCanonical(srcdir, destdir)) { error("Move:", "Source and destination are identical"); XTFREE(buffer); return; } if (access(destdir, W_OK)) { error("No write access to this directory",""); XTFREE(buffer); return; } freeze = True; if (resources.confirm_moves) { char s1[0xff], s2[0xff], s3[0xff]; sprintf(s1, "Moving %d item%c", move_info.fw->n_selections, move_info.fw->n_selections > 1 ? 's' : ' '); sprintf(s2, "from: %s", srcdir); sprintf(s3, "to: %s", destdir); if (!fwConfirm(fw, s1, s2, s3, NULL)) goto out; } if (moveFiles(fw, srcdir, destdir)) { markForUpdate(srcdir); markForUpdate(destdir); intUpdate(); } out: XTFREE(buffer); freeze = False; } /*---------------------------------------------------------------------------*/ static void fileEndCopy(FileWindowRec *fw, int i) { char *buffer; const char *srcdir, *destdir; srcdir = move_info.fw->directory; if (!setupMoveCopy(fw, i, &buffer, &destdir)) return; if (cmpCanonical(srcdir, destdir)) { error("Copy:", "Source and destination are identical"); XTFREE(buffer); return; } if (access(destdir, W_OK)) { error("No write access to this directory",""); XTFREE(buffer); return; } freeze = True; if (resources.confirm_copies) { char s1[0xff], s2[0xff], s3[0xff]; sprintf(s1, "Copying %d item%c", move_info.fw->n_selections, move_info.fw->n_selections > 1 ? 's' : ' '); sprintf(s2, "from: %s", srcdir); sprintf(s3, "to: %s", destdir); if (!fwConfirm(fw, s1, s2, s3, NULL)) goto out; } if (copyFiles(fw, srcdir, destdir)) { markForUpdate(destdir); intUpdate(); } out: XTFREE(buffer); freeze = False; } /*-------------------------------------------------------------------------*/ static const char **fileGetSelected(void) { FileList files = move_info.fw->files; int i, l, j; const char **argv; l = 0; for (j=0; jn_files; j++) { if (files[j]->selected) { l++; } } l += 2; argv = (const char**)XtMalloc(l*sizeof(char *)); i = 0; for (j=0; jn_files; j++) { if (files[j]->selected) { argv[i++] = files[j]->name; } } argv[i++] = NULL; assert(i+1 == l); return argv; } /*---------------------------------------------------------------------------*/ void fileCallWithSelected(const char *action) { const char **argv; argv = fileGetSelected(); argv = makeShellArgs(action, argv); execute_external_program(argv[0], move_info.fw->directory, argv, NULL, NULL); XTFREE(argv); } /*---------------------------------------------------------------------------*/ // there was an fileEndExec before here, too. // If readding this feature, make it check // for the action EXEC and let it use the // program itself then.... // // TODO: re-add this one: /* static void fileEndAction(FileWindowRec *fw, int i) { int l; char *path; char **argv; char *action = varPopup(fw->files[i]->type->icon_bm, fw->files[i]->type->drop_action); if (!action) return; l = strlen(fw->directory); path = (char *)alloca(l+strlen(fw->files[i]->name)+2); strcpy(path, fw->directory); if (path[l-1] != '/') path[l++] = '/'; strcpy(path+l, fw->files[i]->name); argv = makeArgv2(action, path); argv = expandArgv(argv); executeApplication(user.shell, move_info.fw->directory, argv); freeArgv(argv); } */ /*---------------------------------------------------------------------------*/ /* perform a click-drag, returning the widget that the user released the button on */ static Widget drag(Widget w, unsigned int button, FileWindowRec *fw, Boolean *on_root_return, XEvent *event_return) { Cursor c; int i, x, y; Window child; move_info.fw = fw; if (fw->n_selections == 1) { for (i=0; !fw->files[i]->selected && in_files; i++); if (S_ISDIR(fw->files[i]->stats.st_mode)) { move_info.type = Directory; c = curs[DIR_CUR]; } else if (S_ISLNK(fw->files[i]->stats.st_mode)) { move_info.type = SingleFile; c = curs[FILE_CUR]; } else if (fw->files[i]->stats.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH)) { move_info.type = Executable; c = curs[EXEC_CUR]; } else { move_info.type = SingleFile; c = curs[FILE_CUR]; } } else { move_info.type = MultipleFiles; c = curs[FILES_CUR]; } drag_cursor = c; was_dropable = true; XGrabPointer(XtDisplay(w), XtWindow(w), True, EnterWindowMask | LeaveWindowMask | ButtonReleaseMask, GrabModeAsync, GrabModeAsync, None, c, CurrentTime); move_info.dragged_from = w; freeze = dragging = True; for (;;) { XtAppNextEvent(app_context, event_return); switch (event_return->type) { case ButtonPress: /* Ignore button presses */ continue; case ButtonRelease: /* Ignore button releases except 2 */ if (event_return->xbutton.button != button) continue; break; default: XtDispatchEvent(event_return); continue; } break; } XUngrabPointer(XtDisplay(aw.shell),CurrentTime); XtDispatchEvent(event_return); freeze = dragging = False; /* Find out if the drag was released on the root window (child = None) */ XTranslateCoordinates(XtDisplay(w), event_return->xbutton.window, event_return->xbutton.root, event_return->xbutton.x, event_return->xbutton.y, &x,&y,&child); if (child == None) *on_root_return = True; else *on_root_return = False; return XtWindowToWidget(XtDisplay(w),event_return->xbutton.window); } /*--------------------------------------------------------------------------- PUBLIC FUNCTIONS ---------------------------------------------------------------------------*/ void drag_set_dropable(Display *d, bool dropable) { if (was_dropable != dropable) { XChangeActivePointerGrab(d, EnterWindowMask | LeaveWindowMask | ButtonReleaseMask, dropable?drag_cursor:curs[NOENTRY_CUR], CurrentTime); was_dropable = dropable; } } void filePopup(Widget w, XEvent *event, String *params, Cardinal *num_params) { int i; FileWindowRec *fw; Display *dpy; Window root, child; int x, y, x_win, y_win; unsigned int mask; i = findWidget(w, &fw, event); if (i==-1 || !fw) { /* error("Internal error:", "widget not found in filePopup"); */ return; } fileSelect(w, event, params, num_params); if (S_ISLNK(fw->files[i]->stats.st_mode)) { grayOut(fw->file_popup_items[0]); grayOut(fw->file_popup_items[1]); } else { fillIn(fw->file_popup_items[0]); fillIn(fw->file_popup_items[1]); } dpy = XtDisplay(aw.shell); XQueryPointer(dpy, DefaultRootWindow(dpy), &root, &child, &x, &y, &x_win, &y_win, &mask); XtVaSetValues(fw->file_popup_widget, XtNx, (XtArgVal) x, XtNy, (XtArgVal) y, NULL); XtPopupSpringLoaded(fw->file_popup_widget); } /*---------------------------------------------------------------------------*/ void dirPopup(Widget w, XEvent *event, String *params, Cardinal *num_params) { int i; FileWindowRec *fw; Display *dpy; Window root, child; int x, y, x_win, y_win; unsigned int mask; i = findWidget(w, &fw, event); if (i==-1 || !fw) { /* error("Internal error:", "widget not found in dirPopup"); */ return; } fileSelect(w, event, params, num_params); if (!strcmp(fw->files[i]->name, ".") || !strcmp(fw->files[i]->name, "..")) { grayOut(fw->dir_popup_items[2]); grayOut(fw->dir_popup_items[4]); grayOut(fw->dir_popup_items[5]); grayOut(fw->dir_popup_items[8]); } else { fillIn(fw->dir_popup_items[2]); fillIn(fw->dir_popup_items[4]); fillIn(fw->dir_popup_items[5]); fillIn(fw->dir_popup_items[8]); } dpy = XtDisplay(aw.shell); XQueryPointer(dpy, DefaultRootWindow(dpy), &root, &child, &x, &y, &x_win, &y_win, &mask); XtVaSetValues(fw->dir_popup_widget, XtNx, (XtArgVal) x, XtNy, (XtArgVal) y, NULL); XtPopupSpringLoaded(fw->dir_popup_widget); } /*---------------------------------------------------------------------------*/ void fileToggle(Widget w, XEvent *event, UNUSED(String *params), UNUSED(Cardinal *num_params)) { int i; FileWindowRec *fw; Pixel pix; int onewid; i = findWidget(w, &fw, event); if (i==-1 || !fw) { /* error("Internal error:", "widget not found in fileToggle"); */ return; } if (!(onewid=XtIsSubclass(w,fileListWidgetClass))) { XtVaGetValues(w, fw->files[i]->selected?XtNbackground:XtNforeground, &pix, NULL); XtVaSetValues(w, XtNborder, (XtArgVal) pix, NULL); } if (fw->files[i]->selected) { fw->files[i]->selected = False; fw->n_selections--; fw->n_bytes_selected -= fw->files[i]->stats.st_size; } else { fw->files[i]->selected = True; fw->n_selections++; fw->n_bytes_selected += fw->files[i]->stats.st_size; } if (onewid) FileListRefreshItem((FileListWidget)w,i); updateStatus(fw); #ifdef ENHANCE_SELECTION FmOwnSelection(fw,CurrentTime); #endif } /*---------------------------------------------------------------------------*/ void fileSelect(Widget w, XEvent *event, UNUSED(String *params), UNUSED(Cardinal *num_params)) { int i, j; int onewid=XtIsSubclass(w,fileListWidgetClass); FileWindowRec *fw; Pixel back, fore; j = findWidget(w, &fw, event); if (j==-1 || !fw) { /* error("Internal error:", "widget not found in fileSelect"); */ return; } for (i=0; in_files; i++) if (fw->files[i]->selected) { fw->files[i]->selected = False; if(!onewid) { XtCallActionProc(fw->files[i]->icon.toggle, "unset", event, NULL, 0); XtVaGetValues(fw->files[i]->icon.toggle, XtNbackground, &back, NULL); XtVaSetValues(fw->files[i]->icon.toggle, XtNborder, (XtArgVal) back, NULL); } else FileListRefreshItem((FileListWidget)w,i); } if (!onewid) { XtVaGetValues(w, XtNforeground, &fore, NULL); XtVaSetValues(w, XtNborder, (XtArgVal) fore, NULL); } fw->files[j]->selected = True; fw->n_selections = 1; fw->n_bytes_selected = fw->files[j]->stats.st_size; updateStatus(fw); if (onewid) FileListRefreshItem((FileListWidget)w,j); #ifdef ENHANCE_SELECTION FmOwnSelection(fw,CurrentTime); #endif } /*---------------------------------------------------------------------------*/ void fileHighlight(Widget w, XEvent *event, UNUSED(String *params), UNUSED(Cardinal *num_params)) { int i; FileWindowRec *fw; if (!dragging) return; i = findWidget(w,&fw, event); if (!fw) { /* error("Internal error:","Widget not found in fileHighlight"); */ return; } if ((i == -1 && !permission(&fw->stats,W_OK)) || (i != -1 && S_ISDIR(fw->files[i]->stats.st_mode) && !permission(&fw->files[i]->stats, W_OK))) drag_set_dropable(XtDisplay(w),False); else drag_set_dropable(XtDisplay(w),True); if ( i != -1 && (fw != move_info.fw || !fw->files[i]->selected)) XtCallActionProc(w, "highlight", event, NULL, 0); } /*---------------------------------------------------------------------------*/ void trackCursor(Widget w, XEvent *event, UNUSED(String *params), UNUSED(Cardinal *num_params)) { FileWindowRec *fw; if (!dragging) return; for (fw = file_windows ; fw != NULL ; fw = fw->next) { if (w != fw->viewport) continue; if (event->type==LeaveNotify) drag_set_dropable(XtDisplay(w), False); else if (!permission(&fw->stats,W_OK)) drag_set_dropable(XtDisplay(w), False); else drag_set_dropable(XtDisplay(w), True); return; } } /*---------------------------------------------------------------------------*/ void fileMaybeHighlight(Widget w, XEvent *event, UNUSED(String *params), UNUSED(Cardinal *num_params)) { int i; FileWindowRec *fw; if (!dragging) return; i = findWidget(w,&fw, event); if (!fw) { return; } /* if (i != -1 && (fw != move_info.fw || !fw->files[i]->selected) && fw->files[i]->mime_type && *fw->files[i]->mime_type->action->drop_action) { if (cache_cursor!=drag_cursor) { XChangeActivePointerGrab(XtDisplay(w), EnterWindowMask | LeaveWindowMask | ButtonReleaseMask, drag_cursor, CurrentTime); cache_cursor=drag_cursor; } XtCallActionProc(w, "highlight", event, NULL, 0); } */ } /*---------------------------------------------------------------------------*/ void resetCursor(Widget w, XEvent *event, UNUSED(String *params), UNUSED(Cardinal *num_params)) { int i; FileWindowRec *fw; i = findWidget(w,&fw, event); if (!fw) { return; } if (i != -1) XtCallActionProc(w, "unhighlight", event, NULL, 0); if (!dragging) return; if (event->type != LeaveNotify) abortXfm("resetCursor called with event not of type LeaveNotify"); if (!event->xcrossing.send_event ) /* real leave event, so the cursor is outside the window */ drag_set_dropable(XtDisplay(w), False); else if (!permission(&fw->stats,W_OK)) /* the current directory is not writeable */ drag_set_dropable(XtDisplay(w), False); else drag_set_dropable(XtDisplay(w), True); } /*---------------------------------------------------------------------------*/ void fileRefresh(Widget w, XEvent *event, UNUSED(String *params), UNUSED(Cardinal *num_params)) { FileWindowRec *fw; findWidget(w, &fw, event); if (fw) #ifdef ENHANCE_SCROLL updateFileDisplay(fw,True); #else updateFileDisplay(fw); #endif } /*---------------------------------------------------------------------------*/ void fileOpenDir(Widget w, XEvent *event, UNUSED(String *params), UNUSED(Cardinal *num_params)) { FileWindowRec *fw; int i; char path[MAXPATHLEN]; #ifdef ENHANCE_SCROLL Boolean keep_position; #endif i = findWidget(w, &fw, event); if (i==-1 || !fw) return; if (chdir(fw->directory) || chdir(fw->files[i]->name)) sysError("Can't open folder:"); else if (!getwd(path)) sysError("System error:"); else { #ifdef ENHANCE_SCROLL if (!(keep_position=(!strcmp(fw->directory,path)))) #endif strcpy(fw->directory, path); #ifdef ENHANCE_SCROLL updateFileDisplay(fw,keep_position); #else updateFileDisplay(fw); #endif } } /*---------------------------------------------------------------------------*/ void fileBeginDrag(Widget w, XEvent *event, String *params, Cardinal *num_params) { XEvent drag_end_event; int i, button; FileWindowRec *fw; Boolean root, move = True; if (*num_params != 2) { error("Internal error:","wrong number of parameters to fileBeginDrag"); return; } button = *params[0] - '0'; if (!strcmp(params[1],"copy")) move = False; i = findWidget(w, &fw, event); if (!fw) { /* error("Internal error:","widget not found in fileBeginDrag"); */ return; } if (i != -1) { if (!fw->files[i]->selected) fileSelect(w, event, params, num_params); } else return; if (!(w = drag(w,button,fw,&root,&drag_end_event))) return; /* Open directories if dragged onto the root window */ if (root && move_info.type == Directory) { fileOpenCb(NULL,move_info.fw,NULL); return; } i = findWidget(w,&fw, &drag_end_event); /* First see whether the target is the application window */ if (!fw) { if (w == aw.icon_box) appEndDragInBox(); else if ((i = findAppWidget(w)) != -1) appEndDrag(i); } /* Otherwise, if we didn't go anywhere, don't do anything */ else if (fw == move_info.fw && (i == -1 || fw->files[i]->selected || (!S_ISDIR(fw->files[i]->stats.st_mode) ))) ; /* Otherwise, if dragged onto a window or a directory, do the move */ else if (i == -1 || S_ISDIR(fw->files[i]->stats.st_mode)) if (move) fileEndMove(fw,i); else fileEndCopy(fw,i); /* Otherwise, if the file has a drop action, invoke the action */ /* else if (fw->files[i]->type && *fw->files[i]->type->drop_action) fileEndAction(fw,i); */ /* Otherwise, it must be a normal file so just do the move */ else if (move) fileEndMove(fw,i); else fileEndCopy(fw,i); } /*---------------------------------------------------------------------------*/ void fileExecAction(Widget w, XEvent *event, UNUSED(String *params), UNUSED(Cardinal *num_params)) { int i; FileWindowRec *fw; i = findWidget(w, &fw, event); if (i == -1 || !fw) { /* error("Internal error:","widget not found in fileExecAction"); */ return; } if (fw->files[i]->mime_type) { if (!mime_start(fw->files[i]->mime_type, fw->directory, fw->files[i]->name, MIME_START_ANY)) { /* TODO: show some selection dialog here instead */ error("No action found for type:",fw->files[i]->mime_type->fulltypename); } } else error("Internal error:","missing file type"); } /*---------------------------------------------------------------------------*/ void doEdit(const char *directory, const char *fname) { if (resources.editor && resources.editor[0] && resources.editor[0][0]) { const char **args; args = appendArgs(resources.editor, 1, fname, NULL); execute_external_program(args[0],directory, args, NULL, NULL); XTFREE(args); } else error("No default editor", ""); } /*---------------------------------------------------------------------------*/ void doView(const char *directory, const char *fname) { if (resources.viewer && resources.viewer[0] && resources.viewer[0][0]) { const char **args; args = appendArgs(resources.viewer, 1, fname, NULL); execute_external_program(args[0],directory, args, NULL, NULL); XTFREE(args); } else error("No default viewer", ""); } /*---------------------------------------------------------------------------*/ void doXterm(const char *directory) { if (resources.xtermalone && resources.xtermalone[0] && resources.xtermalone[0][0]) { execute_external_program(resources.xtermalone[0], directory, resources.xtermalone, NULL, NULL); } else error("No default xterm", ""); } xfm-1.5.4/src/FmOps.c0000644000175000017500000003722110657112102011213 00000000000000/* * This file is part of X-File Manager XFM * ---------------------------------------------------------------------- FmOps.c (c) Simon Marlow 1990-92 (c) Albert Graef 1994 modified 2004,2005,2007 by Bernhard R. Link (see Changelog) Various file manipulation operations and other useful routines * ---------------------------------------------------------------------- * 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 of the License, 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include #include #include #include #include #include #include #include "Fm.h" /* split a string into substrings delimited by a given character */ char *split(char *s, char c) { static char *t; if (!s) s = t; t = s; if (t) while ((t = strchr(t, c)) && t>s && t[-1]=='\\') t++; if (t) *t++ = '\0'; return s; } /*-------------------------------------------------------------------------*/ /* expand escapes in a string */ char *expand(char *s, char *t, char *c) { char *s0 = s; for (; *t; t++) { if (strchr(c, *t)) *s++ = '\\'; *s++ = *t; } *s = '\0'; return s0; } void fprintexpand(FILE *f, const char *t, const char *c) { for (; *t; t++) { if (strchr(c, *t)) fputc('\\',f); fputc(*t,f); } } /*-------------------------------------------------------------------------*/ /* remove escapes from a string */ char *strparse(char *s, const char *t, const char *c) { char *s0 = s; for (; *t; t++) if (*t != '\\') *s++ = *t; else if (*++t) { if (!strchr(c, *t)) *s++ = '\\'; *s++ = *t; } else break; *s = '\0'; return s0; } /*-------------------------------------------------------------------------*/ /* expand filename */ char *dyn_fnexpand(const char *fn) { char *n; size_t l_fn,l_home; if( fn == NULL ) return NULL; if( fn[0] != '~' || (fn[1] != '\0' && fn[1] != '/') ) return xstrdup(fn); l_home = strlen(user.home); l_fn = strlen(fn); if( l_home >= SIZE_MAX - l_fn ) { abort(); } #ifdef MAXPATHLEN if( l_fn+l_home-1 >= MAXPATHLEN ) { fprintf(stderr,"Error: '%s' cannot be expanded within MAXPATHLEN=%ld\n",fn,(long)MAXPATHLEN); exit(EXIT_FAILURE); } #endif n = XtMalloc(l_fn+l_home+1); memcpy(n, user.home, l_home); memcpy(n+l_home, fn+1, l_fn /*-1+1*/ ); return n; } char *expanddirectory(const char *dir) { if( *dir ) return dyn_fnexpand(dir); else return xstrdup(user.home); } char *home_and_env_expand(const char *fn) { char *n,*r; size_t l,l_home; const char *envs[20]; size_t envlen[20]; size_t envskip[20]; int envnum = 0; int i; const char *p; char pid[5]; if( fn == NULL ) return NULL; if( fn[0] != '~' || (fn[1] != '\0' && fn[1] != '/') ) l_home = 0; else { l_home = strlen(user.home); fn++; } l = l_home; p = fn; while( *p != '\0' ) { const char *envstart,*envend; if( p[0] != '$' || p[1] != '{' || envnum >= 20 ) { if( l == SIZE_MAX ) abortXfm("overlong string\n"); l++; p++; continue; } envstart = p+2; envend = strchr(envstart,'}'); if( envend == NULL ) { if( l == SIZE_MAX ) abortXfm("overlong string\n"); if( envnum < 20 ) { envlen[envnum] = 0; envskip[envnum] = 0; envnum++; } l++; p++; continue; } if( envend-envstart == 3 && envstart[0] == 'P' && envstart[1] == 'I' && envstart[2] == 'D' ) { pid_t pidn = getpid(); pid[0] = 'a'+(pidn & 0xF); pid[1] = 'a'+((pidn>>4) & 0xF); pid[2] = 'a'+((pidn>>8) & 0xF); pid[3] = 'a'+((pidn>>12) & 0xF); pid[4] = '\0'; envs[envnum] = pid; } else { char *envname; envname = XtMalloc(envend-envstart+1); memcpy(envname,envstart,envend-envstart); envname[envend-envstart] = '\0'; envs[envnum] = getenv(envname); free(envname); } if( envs[envnum] == NULL ) envlen[envnum] = 0; else { size_t le = strlen(envs[envnum]); if( l >= SIZE_MAX-le ) abortXfm("overlong string\n"); l += le; envlen[envnum] = le; } envend++; envskip[envnum] = envend-p; envnum++; p = envend; } r = XtMalloc(l+1); n = r; if( l_home > 0 ) { memcpy(n, user.home, l_home); n += l_home; } p = fn; i = 0; while( *p != '\0' ) { if( p[0] != '$' || p[1] != '{' || i >= 20 ) { *(n++) = *(p++); } else { if( envlen[i] > 0 ) { memcpy(n,envs[i],envlen[i]); n += envlen[i]; } p += envskip[i]; i++; } } *n = '\0'; assert( (size_t)(n-r) == l ); return r; } /*---------------------------------------------------------------------------*/ /* match a pattern with a filename, returning nonzero if the match was correct */ /* Currently only *, ? and [...] (character classes) are recognized, no curly braces. An escape mechanism for metacharacters is also missing. This could be implemented more efficiently, but the present simple backtracking routine does reasonably well for the usual kinds of patterns. -ag */ int fnmatch(char *pattern, char *fn) { char *start; for (;; fn++, pattern++) { switch (*pattern) { case '?': if (!*fn) return 0; break; case '*': pattern++; do if (fnmatch(pattern,fn)) return 1; while (*fn++); return 0; case '[': start = pattern+1; do { next: pattern++; if (*pattern == ']') return 0; else if (pattern[0] == '-' && pattern > start && pattern[1] != ']') { if (pattern[-1] <= *fn && *fn <= pattern[1]) break; else { start = (++pattern)+1; goto next; } } } while (*fn != *pattern); while (*pattern != ']') if (!*pattern++) return 0; break; default: if (*fn != *pattern) return 0; } if (!*fn) return 1; }; } /*-------------------------------------------------------------------------*/ /* check whether one path is the prefix of another */ int prefix(const char *s, const char *t) { int l = strlen(s); return !strncmp(s, t, l) && (s[l-1] == '/' || t[l] == '\0' || t[l] == '/'); } /*-------------------------------------------------------------------------*/ /* check whether a file exists */ int exists(const char *path) { struct stat stats; return (!lstat(path, &stats)); } /*-------------------------------------------------------------------------*/ /* find file on given search path */ char *searchPath(char *s1, char *p, const char *s2) { char *s, *t; size_t s2len = strlen(s2); /* TODO: rewrite this or at least check for maximum lengths */ if (*s2 == '/' || !p) return memcpy(s1, s2, s2len+1); for (s = p; *s; s = t) { size_t l; if (!(t = strchr(s, ':'))) t = strchr(s, 0); if (s == t) goto next; if (s[0] == '.') { if ((t = s+1)) s = t; else if (s[1] == '/') s += 2; } l = t-s; memcpy(s1, s, l); if (l > 0 && s1[l - 1] != '/') s1[l] = '/', l++; memcpy(s1+l, s2, s2len+1); if (exists(s1)) return s1; next: if (*t) t++; } return (strcpy(s1, s2)); } char *searchPathWithSuffix(char *s1, char *p, const char *s2, const char *suffix) { char *s, *t; size_t s2len = strlen(s2); size_t sufflen = suffix?strlen(suffix):0; /* TODO: rewrite this or at least check for maximum lengths */ if (*s2 == '/' || !p) { if ( suffix == NULL ) return memcpy(s1, s2, s2len+1); else { memcpy(s1, s2, s2len); memcpy(s1+s2len, suffix, sufflen+1); return s1; } } for (s = p; *s; s = t) { size_t l; if (!(t = strchr(s, ':'))) t = strchr(s, 0); if (s == t) goto next; if (s[0] == '.') { if ((t = s+1)) s = t; else if (s[1] == '/') s += 2; } l = t-s; memcpy(s1, s, l); if (l > 0 && s1[l - 1] != '/') s1[l] = '/', l++; memcpy(s1+l, s2, s2len+1); if (sufflen > 0 ) memcpy(s1+l+s2len,suffix,sufflen+1); if (exists(s1)) return s1; next: if (*t) t++; } return NULL; } /* The following operations return zero on success and -1 on error, with errno set appropriately */ /*-------------------------------------------------------------------------*/ /* create a new file */ int create(const char *path, mode_t mode) { int file = open(path, O_WRONLY|O_CREAT|O_EXCL, mode); if (file == -1 || close(file)) return -1; else return 0; } /*-------------------------------------------------------------------------*/ /* recursive copy operation */ static ino_t *inodes; static int copyfile(const char *oldpath, const char *newpath); static int copydir(int n_inodes, struct stat *oldstats, const char *oldpath, const char *newpath); static int copy(int n_inodes, const char *oldpath, const char *newpath); int rcopy(const char *oldpath, const char *newpath) { inodes = NULL; return copy(0, oldpath, newpath); } static int copyfile(const char *oldpath, const char *newpath) { struct stat stats; int src = -1, dest = -1, n, errno_ret; char buf[BUFSIZ]; if ((src = open(oldpath, O_RDONLY)) == -1 || stat(oldpath, &stats)) goto err; else if ((dest = creat(newpath, stats.st_mode)) == -1) goto err; while ( (n = read(src, buf, BUFSIZ)) != 0) if ( n == -1 || write(dest, buf, n) != n ) goto err; if (close(src)) { src = -1; goto err; } else return close(dest); err: errno_ret = errno; if (src != -1) close(src); if (dest != -1) close(dest); errno = errno_ret; return -1; } static int copydir(int n_inodes, struct stat *oldstats, const char *oldpath, const char *newpath) { DIR *dir; struct dirent *entry; int i, ol = strlen(oldpath), nl = strlen(newpath); struct stat newstats; for (i = n_inodes-1; i >= 0; i--) if (inodes[i] == oldstats->st_ino) { errno = EINVAL; return -1; } if ((mkdir(newpath, user.umask & 0777) < 0 && errno != EEXIST) || lstat(newpath, &newstats) || !(dir = opendir(oldpath))) return -1; inodes = (ino_t *) XTREALLOC(inodes, (n_inodes+1)*sizeof(ino_t)); inodes[n_inodes++] = newstats.st_ino; for(i = 0; (entry = readdir(dir)); i++) if (entry->d_name[0] != '.' || (entry->d_name[1] != '\0' && (entry->d_name[1] != '.' || entry->d_name[2] != '\0'))) { int ol1 = ol, nl1 = nl, l = strlen(entry->d_name); char *oldpath1 = alloca(ol1+l+2); char *newpath1 = alloca(nl1+l+2); strcpy(oldpath1, oldpath); strcpy(newpath1, newpath); if (oldpath1[ol1-1] != '/') oldpath1[ol1++] = '/'; if (newpath1[nl1-1] != '/') newpath1[nl1++] = '/'; strcpy(oldpath1+ol1, entry->d_name); strcpy(newpath1+nl1, entry->d_name); if (copy(n_inodes, oldpath1, newpath1)) { /* take care of recursive errors */ sysErrorFmt("Error copying %s:", oldpath1); } } /* bug fixed by Walt Killjoy (ngogn@clark.net) */ if (n_inodes > 1) inodes = (ino_t *) XTREALLOC(inodes, (n_inodes-1)*sizeof(ino_t)); else XTFREE(inodes); return closedir(dir); } static int copy(int n_inodes, const char *oldpath, const char *newpath) { struct stat stats, stats2; if (lstat(oldpath, &stats)) return -1; else if (!lstat(newpath, &stats2) && !S_ISDIR(stats2.st_mode)) unlink(newpath); /* Directory: copy recursively */ if (S_ISDIR(stats.st_mode)) return copydir(n_inodes, &stats, oldpath, newpath); /* Regular file: copy block by block */ else if (S_ISREG(stats.st_mode)) return copyfile(oldpath, newpath); /* Fifo: make a new one */ else if (S_ISFIFO(stats.st_mode)) return mkfifo(newpath, user.umask & 0666); /* Device: make a new one */ else if (S_ISBLK(stats.st_mode) || S_ISCHR(stats.st_mode) || S_ISSOCK(stats.st_mode)) return mknod(newpath, user.umask & 0666, stats.st_rdev); /* Symbolic link: make a new one */ else if (S_ISLNK(stats.st_mode)) { char lnk[MAXPATHLEN+1]; int l = readlink(oldpath, lnk, MAXPATHLEN); if (l<0) return -1; lnk[l] = '\0'; return(symlink(lnk, newpath)); } /* This shouldn't happen */ else { error("Unrecognized file type:", oldpath); return 0; } } /*-------------------------------------------------------------------------*/ /* move files (by copy/del across file systems) */ int rmove(const char *oldpath, const char *newpath) { struct stat stats; if (lstat(oldpath, &stats)) return -1; else if (unlink(newpath) && errno != ENOENT) return -1; if (rename(oldpath, newpath)) if (errno == EXDEV) if (rcopy(oldpath, newpath)) return -1; else if (stat(oldpath, &stats)) return -1; else if (S_ISDIR(stats.st_mode)) return rdel(oldpath); else return unlink(oldpath); else return -1; else return 0; } /*-------------------------------------------------------------------------*/ /* recursive delete */ int rdel(const char *path) { struct stat stats; if (lstat(path, &stats)) return -1; if (S_ISDIR(stats.st_mode)) { DIR *dir; struct dirent *entry; int i, pl = strlen(path); if (!(dir = opendir(path))) return -1; for(i = 0; (entry = readdir(dir)); i++) if (entry->d_name[0] != '.' || (entry->d_name[1] != '\0' && (entry->d_name[1] != '.' || entry->d_name[2] != '\0'))) { int pl1 = pl, l = strlen(entry->d_name); char *path1 = (char *)alloca(pl1+l+2); strcpy(path1, path); if (path1[pl1-1] != '/') path1[pl1++] = '/'; strcpy(path1+pl1, entry->d_name); if (rdel(path1)) { /* take care of recursive errors */ sysErrorFmt("Error deleting %s:", path); } } if (closedir(dir)) return -1; else return rmdir(path); } else return unlink(path); } /*-------------------------------------------------------------------------*/ /* like strdup, but with error */ char *xstrdup(const char *str) { char *r; r = strdup(str); if (r == NULL) abortXfm("Out of Memory"); return r; } /* concat Directory and filename */ char *dirConcat(const char *directory,const char *name) { size_t dlen,nlen; char *r; dlen = (directory!=NULL)?strlen(directory):0; nlen = strlen(name); if( dlen == 0 ) return xstrdup(name); if( dlen > 0 && directory[dlen-1] == '/' ) dlen--; r = XtMalloc(dlen+nlen+2); if( r == NULL ) return r; memcpy(r,directory,dlen); r[dlen] = '/'; memcpy(r+dlen+1,name,nlen+1); return r; } char *spaceConcat(const char *str1, const char *str2) { size_t l1=strlen(str1), l2=strlen(str2); char *r = XtMalloc(l1+l2+2); memcpy(r,str1,l1); r[l1] = ' '; memcpy(r+l1+1,str2,l2); r[l1+1+l2] = '\0'; return r; } char *suffixConcat(const char *str1, const char *str2) { size_t l1=strlen(str1), l2=strlen(str2); char *r = XtMalloc(l1+l2+2); memcpy(r,str1,l1); r[l1] = '.'; memcpy(r+l1+1,str2,l2); r[l1+1+l2] = '\0'; return r; } Boolean cmpCanonical(const char *dir1, const char *dir2) { char *realdir1, *realdir2; size_t l1, l2; Boolean result; realdir1 = canonicalize_file_name(dir1); l1 = strlen(realdir1); if( l1 > 0 && realdir1[l1-1] == '/' ) l1--; realdir2 = canonicalize_file_name(dir2); l2 = strlen(realdir2); if( l2 > 0 && realdir2[l2-1] == '/' ) l2--; if( l1 != l2 ) result = False; else result = memcmp(realdir1, realdir2, l1) == 0; free(realdir1); free(realdir2); return result; } xfm-1.5.4/src/magic.c0000644000175000017500000005200110655642237011257 00000000000000/* * This file is part of X-File Manager XFM * ---------------------------------------------------------------------- magic.c (c) Juan D. Martin 1995 (c) CNM-US 1995 modified 2004,2005,2006 by Bernhard R. Link (see Changelog) magic headers related code. * ---------------------------------------------------------------------- * 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 of the License, 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include #include #include #include #include #include #include #include #include "magic.h" #include "suffix.h" #ifdef HAVE_ZLIB #include "zlib.h" #endif #ifdef HAVE_LIBBZ2 #include "bzlib.h" #endif #include #define M_LONG 0x0 #define M_SHORT 0x1 #define M_BYTE 0x2 #define M_STRING 0x3 #define M_MODE 0x4 #define M_LMODE 0x5 #define M_BUILTIN 0x6 /* no longer supported */ #define M_REGEXP 0x7 #define M_LELONG 0x8 #define M_LESHORT 0x9 #define M_TYPE 0xF /* Mask for all types. */ #define M_MASKED 0x10 /* Value is masked. */ #define M_EQ (0x0<<5) #define M_LT (0x1<<5) #define M_GT (0x2<<5) #define M_SET (0x3<<5) #define M_CLEAR (0x4<<5) #define M_ANY (0x5<<5) #define M_OP (0x7<<5) /* Mask for operations. */ typedef union { long number; char *string; regex_t *expr; } m_un; typedef struct { off_t offset; m_un value; long mask; int flags; char *message; struct mime_filetype *mime; int subtypes; } hmagic; /* ULTRIX apparently doesn't define these */ #ifdef ultrix #define S_ISLNK(mode) (mode & S_IFMT) == S_IFLNK #define S_ISSOCK(mode) (mode & S_IFMT) == S_IFSOCK #endif #define MAXLIN 1024 #define ASCLEN 512 #define REGLEN 256 static char linebuf[MAXLIN]; static hmagic *mtypes = 0; /* Array of file-types. */ static int count = 0; /* Number of types registered. */ static int allocated = 0; /* Room in the array. */ static int top = 0; /* Current top for sub-types. */ static size_t maxhdr = ASCLEN; /* Maximum header size required. */ #ifdef HAVE_ZLIB #if ASCLEN < 21 #error "ASCLEN too short for .gz header" #endif #endif static char *hdrbuf = 0; /* Header buffer allocated. */ static size_t hdrbufsiz = 0; /* Size of header buffer. */ static struct stat stbuf; /* Stat buffer. */ static struct stat lstbuf; /* Lstat buffer. */ static int bytes; /* Bytes read from the file. */ static const char *namep; /* pointer to filename */ static bool mmatch(int,const char **,struct mime_filetype **); static const char *builtin_test(struct mime_filetype **mimep); static char *parse_string(char **s, long *size); void magic_parse_singlefile(char *name, typeinitfunc *initfunc, size_t maxlen) { FILE *fh; size_t hsiz; if(!hdrbuf) { hdrbuf = (char *) malloc(maxhdr + 1); hdrbufsiz = maxhdr; } if(!name || !(fh = fopen(name, "r"))) return; while(fgets(linebuf, MAXLIN, fh)) { char *cptr, *sptr; int cnt = 0; int l; l = strlen(linebuf); while(l < MAXLIN && linebuf[--l] == '\n' && linebuf[--l] == '\\') { if(!fgets(linebuf + l, MAXLIN - l, fh)) break; l = strlen(linebuf); } if(count >= allocated) { if(!mtypes) { allocated = 25; mtypes = (hmagic *) malloc(allocated * sizeof(hmagic)); } else { allocated += 25; mtypes = (hmagic *) realloc((char *) mtypes, allocated * sizeof(hmagic)); } } cptr = linebuf; if(cptr[0] == '>') /* Sub-type */ { while( cptr[0] == '>' ) cptr++; mtypes[top].subtypes++; } else if(cptr[0] == '#' || cptr[0] == '\n' || cptr[0] == '\r') { continue; } else if(strncmp("include:",cptr,8) == 0) { size_t cl; cptr += 8; while(isspace(*cptr)) cptr++; cl = strlen(cptr); while( cl>0 && isspace(cptr[cl-1])) { cptr[--cl]=(char)0; } magic_parse_singlefile(cptr, initfunc, maxlen); continue; } else { top = count; mtypes[top].subtypes = 0; } mtypes[count].offset = strtol(cptr, &cptr, 0); while(isspace(*cptr)) cptr++; while(islower(cptr[cnt])) cnt++; if(!strncmp("string", cptr, cnt)) { char *s; mtypes[count].flags = M_STRING; cptr += cnt; /* allow string/{bcB} now, implement that later */ if( cptr[0] == '/' ) { cptr++; while(cptr[0] != '\0' && !isspace(cptr[0])) cptr++; } sptr = parse_string(&cptr,&mtypes[count].mask); hsiz = mtypes[count].offset + mtypes[count].mask; /* ignore if too long */ if(hsiz >= maxlen) // TODO: print warning? continue; if(hsiz > maxhdr) maxhdr = hsiz; /* here it gets a bit ugly, as there can be \000 in * those strings, that are already unescaped into '\0', * so strcpy is not the way to go. - brl */ s = malloc(mtypes[count].mask + 1); if( s == NULL ) abort(); memcpy(s,sptr,mtypes[count].mask); s[mtypes[count].mask] = '\0'; mtypes[count].value.string = s; } else if(!strncmp("builtin", cptr, cnt)) { // TODO: report errors continue; } else if(!strncmp("regexp", cptr, cnt)) { mtypes[count].flags = M_REGEXP; cptr += cnt; if(*cptr == '&') { cptr++; mtypes[count].mask = strtol(cptr, &cptr, 0); } else mtypes[count].mask = REGLEN; hsiz = mtypes[count].offset + mtypes[count].mask; if(hsiz > maxhdr) maxhdr = hsiz; sptr = parse_string(&cptr,NULL); mtypes[count].value.expr = calloc(1,sizeof(regex_t)); if( mtypes[count].value.expr == NULL ) // TODO: report errors continue; // TODO: decice what other flags to give: if( regcomp(mtypes[count].value.expr,sptr,REG_NOSUB|REG_EXTENDED) != 0 ) { free(mtypes[count].value.expr); // TODO: report errors continue; } } else { long vmask; if(!strncmp("byte", cptr, cnt)) { mtypes[count].flags = M_BYTE; hsiz = mtypes[count].offset + 1; if(hsiz > maxhdr) maxhdr = hsiz; vmask = 0xFF; } else if(!strncmp("short", cptr, cnt) || !strncmp("beshort", cptr, cnt)) { mtypes[count].flags = M_SHORT; hsiz = mtypes[count].offset + 2; if(hsiz > maxhdr) maxhdr = hsiz; vmask = 0xFFFF; } else if(!strncmp("long", cptr, cnt) || !strncmp("belong", cptr, cnt)) { mtypes[count].flags = M_LONG; hsiz = mtypes[count].offset + 4; if(hsiz > maxhdr) maxhdr = hsiz; vmask = 0xFFFFFFFF; } else if( strncmp("leshort", cptr, cnt) == 0 ) { mtypes[count].flags = M_LESHORT; hsiz = mtypes[count].offset + 2; if(hsiz > maxhdr) maxhdr = hsiz; vmask = 0xFFFF; } else if( strncmp("lelong", cptr, cnt) == 0 ) { mtypes[count].flags = M_LELONG; hsiz = mtypes[count].offset + 4; if(hsiz > maxhdr) maxhdr = hsiz; vmask = 0xFFFFFFFF; } else if(!strncmp("mode", cptr, cnt)) { mtypes[count].flags = M_MODE; vmask = 0xFFFFFFFF; } else if(!strncmp("lmode", cptr, cnt)) { mtypes[count].flags = M_LMODE; vmask = 0xFFFFFFFF; } else continue; /* Error. Skip line. */ cptr += cnt; if(*cptr == '&') { mtypes[count].flags |= M_MASKED; cptr++; mtypes[count].mask = strtol(cptr, &cptr, 0); } while(isspace(*cptr)) cptr++; switch(*cptr) { case '=': mtypes[count].flags |= M_EQ; cptr++; break; case '<': mtypes[count].flags |= M_LT; cptr++; break; case '>': mtypes[count].flags |= M_GT; cptr++; break; case '&': mtypes[count].flags |= M_SET; cptr++; break; case '^': mtypes[count].flags |= M_CLEAR; cptr++; break; case 'x': mtypes[count].flags |= M_ANY; cptr++; break; default: mtypes[count].flags |= M_EQ; } mtypes[count].value.number = strtol(cptr, &cptr, 0) & vmask; } while(isspace(*cptr)) cptr++; sptr = cptr; while(*cptr != '\n' && *cptr != '\r' && *cptr != ' ' && *cptr != '\t' && *cptr != '\0') cptr++; *cptr = '\0'; mtypes[count].message = strdup(sptr); if( initfunc == NULL ) mtypes[count].mime = NULL; else mtypes[count].mime = initfunc(mtypes[count].message); count++; } fclose(fh); if(maxhdr > hdrbufsiz) { free(hdrbuf); hdrbuf = (char *) malloc(maxhdr + 1); hdrbufsiz = maxhdr; } } #ifdef HAVE_ZLIB // TODO: add resource to not look into those // (for too slow computers) static char *ungzip(int fd, unsigned char *inbuf, size_t maxhdr, int *bytes) { z_stream z; unsigned char *outbuf; unsigned char flags = hdrbuf[3]; size_t len; int err; if( *bytes <= 12 ) return NULL; if( inbuf[0] != 0x1f || inbuf[1] != 0x8b || inbuf[2] != Z_DEFLATED || (inbuf[3] & 0xE0) != 0) return NULL; outbuf = malloc(maxhdr+1); if( outbuf == NULL ) return NULL; z.zalloc = NULL; z.zfree = NULL; z.opaque = NULL; z.next_out = outbuf; z.avail_out = maxhdr; z.next_in = inbuf + 10; z.avail_in = *bytes - 10; /* skip optional fields */ if( (flags & 0x04 )!= 0 ){ z.avail_in -= 2; len = *(z.next_in++); len += ((size_t)(*(z.next_in++)))<<8; /* TODO: reload instead */ if( z.avail_in-2 < len ) { free(outbuf); return NULL; } z.avail_in -= len; z.next_in += len; } if( (flags & 0x08 )!= 0 ){ /* perhaps use that as filename instead for * suffix checking? */ while( z.avail_in > 2 && *z.next_in != '\0' ) { z.avail_in--; z.next_in++; } if( *z.next_in != '\0' ) { free(outbuf); return NULL; } z.avail_in--; z.next_in++; } if( (flags & 0x10 )!= 0 ){ while( z.avail_in > 2 && *z.next_in != '\0' ) { z.avail_in--; z.next_in++; } if( *z.next_in != '\0' ) { free(outbuf); return NULL; } z.avail_in--; z.next_in++; } if( (flags & 0x02 )!= 0 ){ if( z.avail_in <= 2 ) { free(outbuf); return NULL; } z.avail_in -= 2; z.next_in += 2; } err = inflateInit2(&z,-15); if( err != Z_OK ) { free(outbuf); return NULL; } while( err == Z_OK ) { err = inflate(&z,Z_SYNC_FLUSH); if( err == Z_OK ) { if( z.avail_out == 0 ) { /* all produced */ break; } else { /* needs more data */ // TODO: read from file instead fprintf(stderr,"Warning: not looking into .gz file as too bad compressed!\n"); err = Z_STREAM_ERROR; break; } } } if( err == Z_OK || err == Z_STREAM_END) { *bytes = z.next_out - outbuf; } else { free(outbuf); outbuf = NULL; } inflateEnd(&z); return (char*)outbuf; } #endif #ifdef HAVE_LIBBZ2 static char *unbzip2(int fd, unsigned char *inbuf, size_t maxhdr, int *bytes) { bz_stream bz; char *outbuf; char *extrabuf = NULL; int err; if( *bytes < 10 ) return NULL; if( inbuf[0] != 'B' || inbuf[1] != 'Z' || inbuf[2] != 'h' ) return NULL; bz.bzalloc = NULL; bz.bzfree = NULL; bz.opaque = NULL; err = BZ2_bzDecompressInit(&bz, 0, 0); if( err != BZ_OK ) return NULL; outbuf = malloc(maxhdr+1); if( outbuf == NULL ) { BZ2_bzDecompressEnd(&bz); return NULL; } bz.next_out = outbuf; bz.avail_out = maxhdr; bz.next_in = inbuf; bz.avail_in = *bytes; while( err == BZ_OK ) { err = BZ2_bzDecompress(&bz); if( err == BZ_OK ) { if( bz.avail_out == 0 ) { /* we got all we need */ err = BZ_STREAM_END; break; } else if( bz.avail_in == 0) { if( extrabuf == NULL) extrabuf = malloc(4096); if( extrabuf == NULL ) break; bz.avail_in = read(fd, extrabuf, 4096); bz.next_in = extrabuf; fprintf(stderr,"reading extradata for .bz2 (%u was not enough)!\n",bz.total_in_lo32); } else { assert(42==7*8); } } } free(extrabuf); if( err == BZ_STREAM_END ) { *bytes = bz.next_out - outbuf; } else { free(outbuf); outbuf = NULL; } BZ2_bzDecompressEnd(&bz); return outbuf; } #endif void magic_get_type(const char *name, const char **messagep, struct mime_filetype **mimep,struct magic_modifiers *modifiers,struct stat *statp) { int i; int fd; modifiers->symlink = false; modifiers->gzipped = false; modifiers->bzipped = false; namep = name; /* added hdrbuf initialization in case magic_get_type() is invoked before magic_parse_file() - AG */ if(!hdrbuf) { hdrbuf = (char *) malloc(maxhdr + 1); hdrbufsiz = maxhdr; } if(lstat(name, &lstbuf) < 0) { stbuf.st_mode = 0; lstbuf.st_mode = 0; statp->st_mode = 0; bytes = -1; } else { if(S_ISLNK(lstbuf.st_mode)) { modifiers->symlink = true; if(stat(name, &stbuf) < 0) { stbuf.st_mode = 0; *statp = lstbuf; bytes = -1; } else *statp = stbuf; } else { stbuf = lstbuf; *statp = lstbuf; } if(S_ISREG(stbuf.st_mode)) { if(stbuf.st_size == 0) bytes = 0; /* don't open zero-size files (causes hang on /proc) -- AG */ else if((fd = open(name, O_RDONLY, 0)) < 0) bytes = -1; else { char *newbuffer; bytes = read(fd, hdrbuf, maxhdr); #ifdef HAVE_ZLIB /* special treatment to look inside .gz files */ newbuffer = ungzip(fd,(unsigned char*)hdrbuf,maxhdr,&bytes); if( newbuffer != NULL ) { size_t l; free(hdrbuf); hdrbuf = newbuffer; modifiers->gzipped = true; l = strlen(namep); if( l > 3 && strcmp(namep+l-3,".gz") == 0 ) { char *n = alloca(l-2); memcpy(n, namep, l-3); n[l-3] = '\0'; namep = n; } } else { #endif #ifdef HAVE_LIBBZ2 newbuffer = unbzip2(fd,hdrbuf,maxhdr,&bytes); if( newbuffer != NULL ) { size_t l; free(hdrbuf); hdrbuf = newbuffer; modifiers->bzipped = true; l = strlen(namep); if( l > 4 && strcmp(namep+l-4,".bz2") == 0 ) { char *n = alloca(l-3); memcpy(n, namep, l-4); n[l-4] = '\0'; namep = n; } } #endif #ifdef HAVE_ZLIB } #endif close(fd); /* Make sure it is nul-terminated. */ if(bytes >= 0) hdrbuf[bytes] = '\0'; } } else bytes = 0; } /* TODO: check for gzip, bzip here and give them * special treatment to look inside */ for(i = 0; i < count; i++) { const char *message = NULL; struct mime_filetype *mime = NULL; if(mmatch(i, &message, &mime)) { if(mtypes[i].subtypes != 0) { int n; n = i + mtypes[i].subtypes + 1; for(++i; i < n; i++) { const char *nmessage = NULL; struct mime_filetype *nmime = NULL; if(mmatch(i, &nmessage, &nmime) ) { message = nmessage; mime = nmime; } } } if( message != NULL ) { if( messagep != NULL) *messagep = message; if( mimep != NULL ) *mimep = mime; return; } } else i += mtypes[i].subtypes; } *messagep = builtin_test(mimep); } static bool mmatch(int i,const char **message,struct mime_filetype **mime) { int t; int o; long v; unsigned char *h; h = (unsigned char *) (hdrbuf + mtypes[i].offset); t = mtypes[i].flags & M_TYPE; switch(t) { case M_STRING: if(bytes >= mtypes[i].offset + mtypes[i].mask && memcmp(hdrbuf + mtypes[i].offset, mtypes[i].value.string, mtypes[i].mask) == 0 ) { *message = mtypes[i].message; *mime = mtypes[i].mime; return 1; } return 0; case M_BUILTIN: return 0; case M_REGEXP: { #ifdef STUPIDCC char sav='\0'; #else char sav; #endif int len; regex_t *prog = mtypes[i].value.expr; if(bytes <= mtypes[i].offset || !prog) return 0; if(bytes > mtypes[i].offset + mtypes[i].mask) { len = mtypes[i].mask; sav = h[len]; h[len] = '\0'; } else len = -1; if(regexec(prog , (char*)h, 0, NULL, REG_NOTEOL) == 0) { *message = mtypes[i].message; *mime = mtypes[i].mime; if(len >= 0) h[len] = sav; return 1; } if(len >= 0) h[len] = sav; } return 0; case M_BYTE: if(bytes < mtypes[i].offset + 1) return 0; else v = h[0]; break; case M_LESHORT: if(bytes < mtypes[i].offset + 2) return 0; else v = ((long) h[1] << 8) | h[0]; break; case M_SHORT: if(bytes < mtypes[i].offset + 2) return 0; else v = ((long) h[0] << 8) | h[1]; break; case M_LONG: if(bytes < mtypes[i].offset + 4) return 0; else v = ((long) h[0] << 24) | ((long) h[1] << 16) | ((long) h[2] << 8) | h[3]; break; case M_LELONG: if(bytes < mtypes[i].offset + 4) return 0; else v = ((long) h[3] << 24) | ((long) h[2] << 16) | ((long) h[1] << 8) | h[0]; break; case M_MODE: v = stbuf.st_mode; break; case M_LMODE: v = lstbuf.st_mode; break; default: return 0; /* Should never happen. */ } if (mtypes[i].flags & M_MASKED) v &= mtypes[i].mask; o = mtypes[i].flags & M_OP; switch(o) { case M_EQ: if(v == mtypes[i].value.number) { *message = mtypes[i].message; *mime = mtypes[i].mime; return 1; } else return 0; case M_LT: if(v < mtypes[i].value.number) { *message = mtypes[i].message; *mime = mtypes[i].mime; return 1; } else return 0; case M_GT: if(v > mtypes[i].value.number) { *message = mtypes[i].message; *mime = mtypes[i].mime; return 1; } else return 0; case M_SET: if((v & mtypes[i].value.number) == mtypes[i].value.number) { *message = mtypes[i].message; *mime = mtypes[i].mime; return 1; } else return 0; case M_CLEAR: /* AG fix: this must be "any clear" instead of "or" */ if((~v & mtypes[i].value.number) != 0) { *message = mtypes[i].message; *mime = mtypes[i].mime; return 1; } else return 0; case M_ANY: *message = mtypes[i].message; *mime = mtypes[i].mime; return 1; } return 0; } static struct { const char *message; struct mime_filetype *mime; } builtins[] = { { "application/octet-stream", NULL }, { "text/plain", NULL }, { "inode/x-empty", NULL }, { "inode/directory", NULL }, { "inode/chardevice", NULL }, { "inode/blockdevice", NULL }, { "inode/pipe", NULL }, { "inode/socket", NULL }, { "inode/default", NULL }, { "inode/x-unreadable", NULL }, { "inode/x-parent-directory", NULL }, }; static const char *builtin_test(struct mime_filetype **mimep) { #define RETURN(j) {\ if(mimep!=NULL)\ *mimep=builtins[j].mime;\ return builtins[j].message;\ } int i; if(bytes > 0) { const char *message = suffix_search(namep,mimep); if(message != NULL) return message; if(bytes > ASCLEN) bytes = ASCLEN; for(i = 0; i < bytes; i++) if( hdrbuf[i] == '\0' || !isascii(hdrbuf[i])) RETURN(0); RETURN(1); } if (bytes == 0) { if(S_ISREG(stbuf.st_mode)) RETURN(2) else if(S_ISDIR(stbuf.st_mode)) { if( strcmp(namep,"..") == 0 ) RETURN(10) else RETURN(3) } else if(S_ISCHR(stbuf.st_mode)) RETURN(4) else if(S_ISBLK(stbuf.st_mode)) RETURN(5) else if(S_ISFIFO(stbuf.st_mode)) RETURN(6) #ifdef S_ISSOCK else if(S_ISSOCK(stbuf.st_mode)) RETURN(7) #endif /* S_ISSOCK */ else RETURN(8) } RETURN(9); } static char *parse_string(char **s, long *size) { char cbuf[4]; int i; char *vptr, *sptr, *cptr; cptr = *s; while(isspace(*cptr)) cptr++; vptr = sptr = cptr; while(!isspace(*cptr)) { if(*cptr != '\\') { *vptr++ = *cptr++; continue; } cptr++; switch(*cptr) { case '\\': *vptr++ = '\\'; cptr++; break; case 'n': *vptr++ = '\n'; cptr++; break; case 'r': *vptr++ = '\r'; cptr++; break; case 't': *vptr++ = '\t'; cptr++; break; case 'v': *vptr++ = '\v'; cptr++; break; case 'b': *vptr++ = '\b'; cptr++; break; case 'f': *vptr++ = '\f'; cptr++; break; case 'x': cptr++; for(i = 0; i < 3 && isxdigit(*cptr); i++, cptr++) cbuf[i] = *cptr; cbuf[i] = '\0'; *vptr++ = (char) strtol(cbuf, 0, 16); break; case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': for(i = 0; i < 3 && *cptr >= '0' && *cptr <= '7'; i++, cptr++) cbuf[i] = *cptr; cbuf[i] = '\0'; *vptr++ = (char) strtol(cbuf, 0, 8); break; default: *vptr++ = *cptr++; } } if( size != NULL ) *size = vptr-sptr; *vptr = '\0'; cptr++; *s = cptr; return sptr; } void magic_parse_init(typeinitfunc *initfunc) { size_t i; count = 0; /* Added by O. Mai to allow reparsing of magic file */ if( initfunc == NULL ) return; for( i = 0 ; i < sizeof(builtins)/sizeof(builtins[0]) ; i ++ ) { builtins[i].mime = initfunc(builtins[i].message); } } void magic_parse_file(char *name, typeinitfunc *initfunc, size_t maxlen) { magic_parse_init(initfunc); magic_parse_singlefile(name,initfunc,maxlen); } xfm-1.5.4/src/mime.c0000644000175000017500000005203310656575537011144 00000000000000/* * This file is part of X-File Manager XFM * ---------------------------------------------------------------------- mime.c (c) 2005,2006 Bernhard R. Link mime-type related code * ---------------------------------------------------------------------- * 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 of the License, 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include "mime.h" #include "suffix.h" static bool mime_savememory; static struct mime_major_type { struct mime_major_type *smaller,*larger; char *typename; struct mime_filetype *catchall; size_t childcount; struct mime_filetype **children; } *mime_root = NULL; struct mime_filetype *catchallall = NULL; static int mailcap_parse(const char *filename); static struct mime_filetype *newfiletype(char *identifier,const char *subtypename,struct mime_filetype *fallback) { struct mime_filetype *f; f = calloc(1,sizeof(struct mime_filetype)); if( f == NULL ) return f; f->fulltypename = identifier; f->subtypename = subtypename; f->fallback = fallback; return f; } static inline struct mime_major_type *mime_newtype(const char *typename,size_t len) { struct mime_major_type *n = calloc(1,sizeof(*n)); char *ca; if( n == NULL ) return NULL; n->typename = strndup(typename,len); if( n->typename == NULL ) { free(n); return NULL; } ca = malloc(len+9); if( ca == NULL ) { free(n->typename); free(n); return NULL; } memcpy(ca,typename,len); memcpy(ca+len,"/default",8); ca[len+8] = '\0'; n->catchall = newfiletype(ca,"default",catchallall); if( n->catchall == NULL ) { free(n->typename); free(n); return NULL; } return n; } static inline int lcmp(const char *s1,const char *s2,size_t len2) { int cmp; cmp = strncmp(s1,s2,len2); if( cmp != 0 ) return cmp; if( s1[len2] == '\0' ) return 0; return 1; } static struct mime_major_type *mime_get_type(const char *typename, size_t len, bool generate) { struct mime_major_type *p; int cmp; if( mime_root == NULL ) { if( generate ) { mime_root = mime_newtype(typename,len); return mime_root; } else return NULL; } p = mime_root; while( (cmp = lcmp(p->typename,typename,len)) != 0 ) { if( cmp < 0 ) { if( p->larger == NULL ) { if( generate ) { p->larger = mime_newtype(typename,len); return p->larger; } return NULL; } p = p->larger; } else { if( p->smaller == NULL ) { if( generate ) { p->smaller = mime_newtype(typename,len); return p->smaller; } return NULL; } p = p->smaller; } } return p; } struct mime_filetype *mime_get_filetype(const char *mimetype) { char *separator = strchr(mimetype,'/'); char *subtypename; size_t l; struct mime_major_type *type; assert(catchallall != NULL); if( mimetype[0] == '*' && mimetype[1] == '\0' ) return catchallall; if( separator != NULL) l = separator-mimetype; else l = strlen(mimetype); type = mime_get_type(mimetype,l,true); if( type == NULL ) { /* OOM*/ return NULL; } if( separator == NULL || separator[1] == '\0' || separator[1] == '*' ) { return type->catchall; } subtypename = separator + 1; if( type->children == NULL ) { char *newmimetype; type->children = calloc(8,sizeof(struct mime_filetype*)); if( type->children == NULL ) return NULL; newmimetype = strdup(mimetype); if( newmimetype == NULL ) { free(type->children); type->children = NULL; type->childcount = 0; return NULL; } subtypename = newmimetype + (subtypename - mimetype); type->children[0] = newfiletype(newmimetype,subtypename,type->catchall); if( type->children[0] == NULL ) { free(type->children); type->children = NULL; type->childcount = 0; return NULL; } type->childcount = 1; return type->children[0]; } else { char *newmimetype; struct mime_filetype *nft; size_t i = 0; size_t j; int c; c = strcmp(type->children[type->childcount-1]->subtypename,subtypename); if( c == 0 ) return type->children[type->childcount - 1]; if( c < 0 ) { i = type->childcount; } else if( type->childcount > 1 ) { int cc; j = type->childcount - 2; while( i <= j ) { size_t m = (i+j)/2; cc = strcmp(type->children[m]->subtypename,subtypename); if( cc == 0 ) return type->children[m]; if( cc > 0 ) { if( m == 0 ) break; j = m-1; } else i = m+1; } } /* now i is the new place for subtypename */ if( ((type->childcount+1) & 7) == 0 ) { struct mime_filetype **n; n = realloc(type->children, (type->childcount+8)*sizeof(struct mime_filetype*)); if( n == NULL ) return NULL; type->children = n; } newmimetype = strdup(mimetype); if( newmimetype == NULL ) return NULL; subtypename = newmimetype + (subtypename - mimetype); nft = newfiletype(newmimetype,subtypename,type->catchall); if( nft == NULL ) return NULL; for( j = type->childcount; j > i ; j-- ) { type->children[j] = type->children[j-1]; } type->children[i] = nft; type->childcount++; return nft; } } static inline void mime_free(struct mime_action *action) { assert(action != NULL); free(action->view); free(action->compose); free(action->edit); free(action->print); free(action->drop); free(action->nameprefix); free(action->test); free(action->notes); free(action->description); free(action->test); free(action->x11bitmap); free(action); } static int mime_read_charskipspace(int *linenr,int *columnnr, FILE *f); static inline int mime_read_char(int *linenr,int *columnnr, FILE *f) { int c; c = fgetc(f); *columnnr += 1; if( c != '\\' ) { return c; } else { c = fgetc(f); if( c == EOF) return c; else if( c != '\n') { ungetc(c,f); return '\\'; } else { *linenr += 1; *columnnr=0; return mime_read_charskipspace(linenr,columnnr,f); } } } static int mime_read_charskipspace(int *linenr,int *columnnr, FILE *f) { int c; do { c = mime_read_char(linenr,columnnr,f); } while( c > 0 && c != '\n' && isspace(c) ); return c; } static inline void mime_read_skipline(int *linenr,int *columnnr, FILE *f) { while( 1 ) { int c = mime_read_char(linenr,columnnr,f); if( c == EOF || c == '\n' ) return; } } static inline int mime_read_statement(int *linenr,int *colnr, char *buffer, size_t buflen, FILE *f) { int c; size_t i = 0; bool escaped = false; c = mime_read_charskipspace(linenr,colnr,f); while(1) { if( c == EOF ) c = '\n'; /* ignore files not properly ending */ if( i+1 >= buflen ) return -2; if( c == '\\' && !escaped ) escaped = true; else { if( c == ';' || c == '=' || c == '\n' ) { while( i > 0 && isspace(buffer[i-1])) i--; buffer[i] = '\0'; return c; } escaped = false; buffer[i++] = c; } c = mime_read_char(linenr,colnr,f); } } static inline int mime_read_filename(int *linenr,int *colnr, char **bufptr, size_t *buflen, FILE *f) { int c; size_t i = 0; bool escaped = false; char *buffer = *bufptr; c = mime_read_charskipspace(linenr,colnr,f); while(1) { if( c == EOF ) c = '\n'; /* ignore files not properly ending */ if( i+1 >= *buflen ) { char *nb; if( i >= SIZE_MAX - 1029 ) return -2; nb = realloc(buffer,i+1024); if( nb == NULL ) return -2; *bufptr = nb; buffer = nb; *buflen = i+1023; } if( c == '\\' && !escaped ) escaped = true; else { char *homedir; if( c == '\n' ) { while( i > 0 && isspace(buffer[i-1])) i--; buffer[i] = '\0'; return c; } if( !escaped && c == '~' && (homedir = getenv("HOME")) != NULL ) { size_t l = strlen(homedir); if( i+l >= *buflen ) { char *nb; if( i >= SIZE_MAX -1 - l ) return -2; nb = realloc(buffer,i+l+1); if( nb == NULL ) return -2; *bufptr = nb; buffer = nb; *buflen = i+l+1; } memcpy(buffer+i,homedir,l); i+=l; } else { buffer[i++] = c; } escaped = false; } c = mime_read_char(linenr,colnr,f); } } static inline int mime_read_data(int *linenr,int *colnr, char **buffer_p, FILE *f) { int c; size_t i = 0; bool escaped = false; size_t buflen = 1000; char *buffer = malloc(buflen); if( buffer == NULL ) return -2; c = mime_read_charskipspace(linenr,colnr,f); while(1) { if( c == EOF ) c = '\n'; /* ignore files not properly ending */ if( i+1 >= buflen ) { char *h; buflen += 128; h = realloc(buffer,buflen); if( h == NULL ) return -2; buffer = h; } if( c == '\\' && !escaped ) { escaped = true; buffer[i++] = c; } else { if( c == ';' || c == '\n' ) { char *h; while( i > 0 && isspace(buffer[i-1])) i--; buffer[i++] = '\0'; h = realloc(buffer,i); *buffer_p = (h==NULL)?buffer:h; return c; } escaped = false; buffer[i++] = c; } c = mime_read_char(linenr,colnr,f); } } static bool runtest(const char *command) { /* we are an X program, we have a display */ if( strcmp(command,"test -n \"$DISPLAY\"") == 0 || strcmp(command,"test \"$DISPLAY\"") == 0 || strcmp(command,"test \"$DISPLAY\" != \"\"") == 0 ) { return true; } else { int r; r = system(command); if( r != -1 && WIFEXITED(r) ) { return WEXITSTATUS(r)==0; } else { fprintf(stderr,"Error starting '%s'\n",command); return false; } } } /* unescape the given string, overwriting the existing content */ static void mime_unescape_simple(char *v) { char *n = v; bool escaped = false; char c; while( (c = *(v++)) != '\0' ) { if( c == '\\' && !escaped ) escaped = true; else { escaped = false; *(n++) = c; } } } /* unsecape the given string, splitting it in two parts seperated by * a '%s'. */ static bool mime_split_by_placeholder(char *v, const char **snd) { char *n = v; bool escaped = false; char c; *snd = NULL; while( (c = *(v++)) != '\0' ) { if( escaped ) { escaped = false; *(n++) = c; } else if( c == '\\' ) escaped = true; else if( c != '%' ) { escaped = false; *(n++) = c; } else if( *v == '%' ) { escaped = false; *(n++) = c; v++; } else if( *v != 's' ) { escaped = false; *(n++) = c; } else { if( *snd != NULL ) { return false; } else { *(n++) = '\0'; *snd = n; v++; } } } *n = '\0'; return *snd != NULL; } static bool checkCallable(const char *v) { bool escaped = false; char c; if( strcmp(v,"false") == 0 ) return false; if( strcmp(v,"LOAD") == 0 ) return true; if( strcmp(v,"OPEN") == 0 ) return true; while( (c = *(v++)) != '\0' ) { if( c == '\\' && !escaped ) escaped = true; else { escaped = false; if( c == '%' && *v == 's' ) return true; } } return false; } static int mime_parse_line(const char *filename,int *linenr,FILE *f) { int colnr=0; char mime_subtype[100]; int e; struct mime_action *type; struct mime_filetype *typep; char *p; *linenr += 1; e = mime_read_statement(linenr,&colnr,mime_subtype,sizeof(mime_subtype),f); if( mime_subtype[0] == '#' || mime_subtype[0] == '\0' ) { /* ignore comments and empty lines */ if( e != '\n' ) mime_read_skipline(linenr,&colnr,f); return 0; } if( e != ';' ) { fprintf(stderr,"%s:%d:%d: Malformed mailcap: expecting ';' after type\n", filename,*linenr,colnr); if( e != '\n' ) mime_read_skipline(linenr,&colnr,f); return 0; } if( strcmp(mime_subtype,"include") == 0 || strcmp(mime_subtype,"!include") == 0) { char *fn; size_t buflen = #ifdef PATH_MAX PATH_MAX; #else #ifdef MAXPATHLEN MAXPATHLEN; #else 4094; #endif #endif fn = malloc(buflen); if( filename == NULL ) return -2; e = mime_read_filename(linenr,&colnr,&fn,&buflen,f); if( e != '\n' ) { fprintf(stderr,"%s:%d:%d: Malformed include line (too long?)\n", filename,*linenr,colnr); mime_read_skipline(linenr,&colnr,f); } else { mailcap_parse(fn); } free(fn); return 0; } p = strchr(mime_subtype,'/'); if( p == NULL ) { fprintf(stderr,"%s:%d:%d: Malformed mailcap: expecting '/' within type\n", filename,*linenr,colnr); } type = calloc(1,sizeof(struct mime_action)); if( type == NULL ) return -2; /* no test means all tests worked */ type->testOK = true; e = mime_read_data(linenr,&colnr,&type->view,f); if( e < 0 ) { mime_free(type); return e; } type->viewOK = checkCallable(type->view); while( e != '\n' ) { char var[100]; int oldlinenr = *linenr; e = mime_read_statement(linenr,&colnr,var,sizeof(var),f); if( e < 0 ) { fprintf(stderr,"%s:%d:%d: overlong mailcap attribute-name (starting in line %d)\n", filename,*linenr,colnr,oldlinenr); mime_read_skipline(linenr,&colnr,f); mime_free(type); return 0; } if( e == '=' ) { char *v; e = mime_read_data(linenr,&colnr,&v,f); if( e < 0 ) { fputs("Out of memory!\n", stderr); mime_read_skipline(linenr,&colnr,f); mime_free(type); return 0; } if( strcmp(var,"notes") == 0 ) { if( mime_savememory ) free(v); else { mime_unescape_simple(v); type->notes = v; } } else if( strcmp(var,"test") == 0 ) { mime_unescape_simple(v); type->testOK = runtest(v); if( mime_savememory ) free(v); else type->test = v; } else if( strcmp(var,"print") == 0 ) { type->print = v; } else if( strcmp(var,"compose") == 0 ) { type->compose = v; } else if( strcmp(var,"description") == 0 ) { if( mime_savememory ) free(v); else { mime_unescape_simple(v); type->description = v; } } else if( strcmp(var,"nametemplate") == 0 ) { const char *snd; if( mime_split_by_placeholder(v, &snd)) { type->nameprefix = v; type->namesuffix = snd; } else { fprintf(stderr, "%s:%d:%d: too few or too many %%s in nametamplate! Ignoring it.\n", filename,*linenr,colnr); free(v); } } else if( strcmp(var,"x11-bitmap") == 0 ) { mime_unescape_simple(v); type->x11bitmap = v; } else if( strcmp(var,"edit") == 0 ) { type->edit = v; type->editOK |= checkCallable(type->edit); } else if( strcmp(var,"textualnewlines") == 0 ) { /* not yet supported */ free(v); } else if( strcmp(var,"composetyped") == 0 || strcmp(var,"composedtype") == 0) { free(v); } else if( strcmp(var,"priority") == 0 ) { mime_unescape_simple(v); type->priority = atoi(v); free(v); } else if( strcmp(var,"x-xfm-drop") == 0 ) { type->drop = v; } else { if( var[0] != 'x' || var[1] != '-' || strncmp(var,"x-xfm-",6) == 0 ) fprintf(stderr,"%s:%d:%d: unknown mailcap entry %s\n",filename,*linenr,colnr,var); free(v); } } else { if( var[0] == '\0' ) { ; /* ignore trailing ';' */ } else if( strcmp(var,"needsterminal") == 0 ) { type->needsterminal = true; } else if( strcmp(var,"copiousoutput") == 0 ) { type->copiosoutput = true; } else fprintf(stderr,"%s:%d:%d: unknown mailcap flag %s\n",filename,*linenr,colnr,var); } } if( !type->testOK && mime_savememory ) free(type); else { typep = mime_get_filetype(mime_subtype); if( typep == NULL ) { free(type); return -2; } type->type = typep; if( typep->actions == NULL ) { typep->actions = type; } else if( mime_savememory ) { free(type); return 1; } else { struct mime_action *a; for( a = typep->actions ; a->next != NULL ; a = a->next) ; a->next = type; } } return 1; } static int mailcap_parse(const char *filename) { int linenr = 0; FILE *f; int e; f = fopen(filename,"r"); if( f == NULL ) return 0; while( !feof(f) ) { e = mime_parse_line(filename,&linenr,f); if( e < 0 ) { fclose(f); return e; } } if( ferror(f) ) { fprintf(stderr,"Error reading from '%s'\n",filename); } if( fclose(f) ) { e = errno; fprintf(stderr,"Error reading from '%s': %d=%s\n", filename,e,strerror(e)); } return 1; } int mime_init(void) { assert(catchallall == NULL); mime_root = NULL; catchallall = newfiletype((char*)"default","default",NULL); if( catchallall == NULL ) return -2; return 1; } int mime_parse_mailcap(const char *filename) { assert(catchallall != NULL); return mailcap_parse(filename); } static int types_parse(const char *filename, initfunc func) { FILE *f; char buffer[2000]; f = fopen(filename,"r"); if( f == NULL ) return 0; while( fgets(buffer,sizeof(buffer),f) != NULL ) { char *s,*e; size_t l; struct mime_filetype *type; bool added; l = strlen(buffer); if( l == 0 ) continue; if( l>= sizeof(buffer)-1 && buffer[l-1] != '\n' ) { /* overlong line */ do { if( fgets(buffer,sizeof(buffer),f) == NULL ) break; } while( buffer[strlen(buffer)-1] != '\n'); continue; } /* Only overwrite newline when it is a proper text * file and has one. (corrupt ones miss one in the last line) */ if( buffer[l-1] == '\n' ) buffer[--l] = '\0'; s = buffer; while( *s == ' ' || *s == '\t' ) s++; if( *s == '#' ) continue; e = s; while( *e != '\0' && *e != ' ' && *e != '\t' ) e++; if( *e != '\0' ) { *(e++) = '\0'; } if( strcmp(s,"!include") == 0 || strcmp(s,"include") == 0 ) { while( *e == ' ' || *e == '\t' ) e++; if( *e == '\0' ) { fprintf(stderr,"%s: unexpected end of line!\n",filename); continue; } if( e[0] == '~' && e[1] == '/' ) { const char *homedir = getenv("HOME"); size_t homelen = strlen(homedir); size_t elen = strlen(e); char *n = malloc(homelen+elen); if( n == NULL ) { fclose(f); return -2; } memcpy(n,homedir,homelen); memcpy(n+homelen,e+1,elen); types_parse(n,func); free(n); } else types_parse(e,func); continue; } type = mime_get_filetype(s); if( type == NULL ) { fclose(f); return -2; } /* prior ones overwrite later ones */ if( type->official ) continue; added = false; while( *e != '\0' ) { s = e; while( *s == ' ' || *s == '\t' ) s++; while( *e != '\0' && *e != ' ' && *e != '\t' ) e++; if( *e != '\0' ) { *(e++) = '\0'; } if( *s != '\0' ) { added = added || suffix_add(s,e-s,type); } } type->official = true; if( added ) func(type); } if( ferror(f) ) { fprintf(stderr,"Error reading from '%s'\n",filename); } if( fclose(f) ) { int e = errno; fprintf(stderr,"Error reading from '%s': %d=%s\n", filename,e,strerror(e)); } return 1; } int mime_parse_types(const char *filename, initfunc func) { assert(catchallall != NULL); return types_parse(filename,func); } bool mime_best_action(struct mime_filetype *mime_type,const char *directory,const char *filename,enum mime_start_type how, mime_action_func *start, bool echo) { bool r; static const char * const typestring[3] = {"edit or view","edit","view"}; assert(mime_type != NULL); if( echo ) { fprintf(stderr,"Searching how to %s the file '%s' in '%s' of type '%s'\n",typestring[how],filename,directory,mime_type->fulltypename); } if( how != MIME_START_VIEW ) { struct mime_filetype *type = mime_type; for( type = mime_type ; type!=NULL ; type = type->fallback ) { struct mime_action *action = type->actions; for( action = type->actions ; action != NULL ; action = action->next) { if( action->edit == NULL ) continue; if( echo ) { fprintf(stderr,"possible action %s (edit for type %s):",action->edit,action->type->fulltypename); } if( !action->testOK ) { if( echo ) fprintf(stderr," test negative\n"); continue; } if( !action->editOK ) { if( echo ) fprintf(stderr," not suitable (missing %%s)\n"); continue; } if( echo ) fprintf(stderr," trying...\n"); r = start(action,action->edit,directory,filename); if( r ) return r; } } } if( how != MIME_START_EDIT ) { struct mime_filetype *type = mime_type; for( type = mime_type ; type!=NULL ; type = type->fallback ) { struct mime_action *action = type->actions; for( action = type->actions ; action != NULL ; action = action->next) { if( action->view == NULL ) continue; if( echo ) { fprintf(stderr,"possible action %s (view for type %s):",action->view,action->type->fulltypename); } if( !action->testOK ) { if( echo ) fprintf(stderr," test negative\n"); continue; } if( !action->viewOK ) { if( echo ) fprintf(stderr," not suitable (missing %%s)\n"); continue; } if( echo ) fprintf(stderr," trying...\n"); r = start(action,action->view,directory,filename); if( r ) return r; } } } if( echo ) { fprintf(stderr,"nothing found\n"); } return false; } xfm-1.5.4/src/suffix.c0000644000175000017500000000513210421732206011471 00000000000000/* * This file is part of X-File Manager XFM * ---------------------------------------------------------------------- suffix.c (c) 2005,2006 Bernhard R. Link fast fallback suffix finding code * ---------------------------------------------------------------------- * 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 of the License, 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include #include #include #include #include #include #include "mime.h" #include "suffix.h" struct suffix { struct suffix *smaller,*larger; char *data; struct mime_filetype *type; } *suffixes[7] = {NULL, NULL, NULL, NULL, NULL, NULL, NULL}; const char *suffix_search(const char *name,struct mime_filetype **typep) { size_t len = strlen(name); int i; struct suffix *s; i = 6; /* make sure the name is long enough to hold this with * the dot not the first character */ if( len < (size_t)i+3 ) i = len-3; /* then search for this extension */ for( ; i >= 0 ; i-- ) { if( name[len-i-2] != '.' ) continue; s = suffixes[i]; while( s != NULL ) { int c = memcmp(s->data,name+len-i-1,i+1); if( c == 0 ) { *typep = s->type; return s->type->fulltypename; } if( c < 0 ) s = s->smaller; else s = s->larger; } } return NULL; } bool suffix_add(const char *suffix,size_t len, struct mime_filetype *type) { struct suffix **s; struct suffix *n; if( len <= 0 || len > sizeof(suffixes)/sizeof(suffixes[0]) ) return false; s = &suffixes[len-1]; while( *s != NULL ) { int c = memcmp((*s)->data,suffix,len); if( c == 0 ) return false; if( c < 0 ) s = &(*s)->smaller; else s = &(*s)->larger; }; n = malloc(sizeof(struct suffix)); if( n == NULL ) return false; n->data = malloc(len); if( n->data == NULL ) { free(n); return false; } memcpy(n->data,suffix,len); n->type = type; n->smaller = NULL; n->larger = NULL; *s = n; return true; } xfm-1.5.4/src/mime_start.c0000644000175000017500000002763010744135466012355 00000000000000/* * This file is part of X-File Manager XFM * ---------------------------------------------------------------------- mime_start.c (c) 2005,2006,2008 Bernhard R. Link call edit/view commands from mime types * ---------------------------------------------------------------------- * 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 of the License, 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include "global.h" #include "Fm.h" #include "Am.h" #include "mime.h" #include "mime_start.h" #include "execute.h" static char symlinknumber[11] = "XXXXXXXXXX"; static char *symlinkdirectory = NULL; static char *concat(const char *directory,const char *name) { size_t dlen,nlen; char *r; dlen = (directory!=NULL)?strlen(directory):0; nlen = strlen(name); if( dlen == 0 ) return strdup(name); if( dlen > 0 && directory[dlen-1] == '/' ) dlen--; r = malloc(dlen+nlen+2); if( r == NULL ) return r; memcpy(r,directory,dlen); r[dlen] = '/'; memcpy(r+dlen+1,name,nlen+1); return r; } bool mime_start_init(const char *symlinkdir) { int r; strcpy(symlinknumber,"0000000000"); symlinkdirectory = strdup(symlinkdir); if( symlinkdirectory == NULL ) { abortXfm("Out of Memory"); return false; } /* what is not yet checked and therefore is the * task of the user, is to make sure noone can * hijack the directory by deleting it or moving * it out of the way. I do not know if it is worthwile * to check this (i.e. are all parent directories * owned by us, or by root, and are sticky when they * are writeable by all.) here, as at least group * writeability should then also be warned but give * false positives if it is a user-specific group, * so just not set your resources wrong and LART your * sysadm if /tmp is not sticky */ r = mkdir(symlinkdir,0700); if( r != 0 ) { int e = errno; if( e == EEXIST ) { /* check if this is a directory and save */ struct stat s; r = lstat(symlinkdir,&s); if( r == 0 && S_ISDIR(s.st_mode) ) { /* a directory it is */ if( s.st_uid != getuid() ) { fprintf(stderr,"start directory %s is owned by someone else!\n",symlinkdir); return false; } r = chmod(symlinkdir,0700); if( r != 0 ) { e = errno; fprintf(stderr,"Error setting rights for %s: %d=%s\n",symlinkdir,e,strerror(e)); return false; } return true; } } fprintf(stderr,"Error creating %s: %d=%s\n",symlinkdir,e,strerror(e)); return false; } else return true; } void mime_start_done(const char *symlinkdir) { if( 0 != rmdir(symlinkdir) ) { int e = errno; fprintf(stderr,"while removing '%s': %d=%s\n",symlinkdir,e,strerror(e)); } } static void program_finished(UNUSED(int status),void *data) { char *linkname = data; if( linkname != NULL) { unlink(linkname); free(linkname); } } static void nextsymlinkname(void) { int i = 9; assert( symlinknumber[i] != '\0' && symlinknumber[i+1] == '\0' ); while( symlinknumber[i] == 'z' ) { symlinknumber[i] = '0'; i--; if( i < 0 ) return; } if( symlinknumber[i] == '9' ) symlinknumber[i] = 'a'; else symlinknumber[i]++; } static char *unescape_insert(const char *template,const char *name) { bool inserted = false; char *r,*n; const char *t; size_t t_len,n_len; bool escaped = false; char c; if( template == NULL ) return NULL; t_len = strlen(template); n_len = strlen(name); r = XtMalloc(t_len+n_len+1); n = r; t = template; while( (c=*(t++)) != '\0' ) { if( escaped ) { *(n++) = c; escaped = false; } else { if( c == '\\') escaped = true; else if( c != '%' || *t != 's' ) { *(n++) = c; } else if( inserted ) { fprintf(stderr,"Malformed nametemplate with two %%s: '%s'!\n",template); free(r); return NULL; } else { memcpy(n,name,n_len); n+=n_len; inserted = true; /* over 's', too */ t++; } } } *(n++) = '\0'; assert( (size_t)(n-r) <= n_len + t_len+1 ); if( !inserted ) { fprintf(stderr,"Malformed nametemplate without %%s: '%s'!\n",template); /* do not return a constant string */ free(r); return NULL; } return r; } /* Test if a command template has %s within "'"s, so more characters can be allowed */ static bool isUnescaped(const char *template) { const char *t; bool escaped = false, singlequoted = false; char c; t = template; while( (c=*(t++)) != '\0' ) { if( escaped ) { escaped = false; } else if( c == '\\') escaped = true; else if( c == '\'' ) singlequoted = !singlequoted; else if( c == '%' && *t == 's' ) { if( !singlequoted ) return true; } } return false; } static char *calc_linkname(const char *prefix, const char *suffix) { size_t dlen,plen,nlen,slen; char *n; dlen = strlen(symlinkdirectory); if( dlen > 0 && symlinkdirectory[dlen-1] == '/' ) dlen--; plen = prefix?strlen(prefix):0; nlen = strlen(symlinknumber); slen = suffix?strlen(suffix):0; n = malloc(dlen+1+plen+nlen+slen+1); if( n == NULL ) return NULL; memcpy(n, symlinkdirectory, dlen); n[dlen] = '/'; if( plen > 0 ) memcpy(n+dlen+1, prefix, plen); memcpy(n+dlen+1+plen, symlinknumber, nlen); if( slen > 0 ) memcpy(n+dlen+1+plen+nlen, suffix, slen); n[dlen+1+plen+nlen+slen] = '\0'; return n; } static char *allocateLink(const char *filename,const char *prefix, const char *suffix) { while(1) { char *linkname; int err; nextsymlinkname(); linkname = calc_linkname(prefix,suffix); if( linkname == NULL ) { abortXfm("Out of Memory"); return NULL; } err = symlink(filename,linkname); if( err == 0 ) { //TODO: check here if the link //is the correct one in case of //NFS-race conditions? return linkname; } if( err != EEXIST ) { int e = errno; fprintf(stderr,"Error creating symlink %s->%s: %d=%s\n", linkname,filename,e,strerror(e)); return NULL; } } } /* check for filenames too dangerous to give even to * normal programs */ static bool veryDangerous(const char *filename) { /* check if it could be confused with an option, * this is not dangerous by itself, but too * many programs are ill written */ if( filename[0] == '-' ) return true; /* otherwise it is save */ return false; } /* check for filenames too dangerous to give enclosed * in '' to a shell. */ static bool couldDangerous(const char *filename) { unsigned char c; while( (c=*filename) != '\0' ) { if( c == '\'' ) return true; if( c == '\\' ) return true; if( c == '!' ) return true; filename++; } return false; } /* check for filenames too dangerous to give * to a shell unenclosed and unescaped */ static bool shellDangerous(const char *filename) { unsigned char c; while( (c=*filename) != '\0' ) { /* this is the other way around: * only allow save characters */ if( ( c < 'a' || c > 'z' ) && ( c < 'A' || c > 'Z' ) && ( c < '0' || c > '9' ) && ( c != '/' ) && ( c != '.' ) && ( c != '_' ) && ( c != '-' ) && ( c != ',' ) && ( c != ':' )) return true; filename++; } return false; } static size_t getArgCount(const char **l) { size_t c = 0; assert( l != NULL ); while( *l != NULL ) { l++; c--; } return c; } static bool match(const char *fn, const char *prefix, const char *suffix) { size_t fnlen = strlen(fn),plen,slen; if( prefix == NULL ) return true; assert(suffix != NULL); plen = strlen(prefix); slen = strlen(suffix); if( fnlen <= plen + slen ) return false; if( slen > 0 && strcmp(fn+fnlen-slen,suffix) != 0 ) return false; if( plen > 0 && strncmp(fn,prefix,plen) != 0 ) return false; return true; } static const char *chooselinksuffix(const char *namesuffix, const char *filename) { const char *test; if( namesuffix != NULL ) return namesuffix; namesuffix = strrchr(filename, '.'); if( namesuffix == NULL ) return namesuffix; /* if there is no namesuffix of the type, and the filename has a * safe suffix, use that one: */ for( test = namesuffix + 1 ; *test != '\0' ; test++ ) { if( *test < 'a' && *test > 'z' ) { namesuffix = NULL; break; } } return namesuffix; } static bool start(const struct mime_action *action,const char *command,const char *directory,const char *filename) { size_t l; char *unescaped,*fullfilename,*linkname; char *shellcommand = NULL; const char **args,**progargs; if( strcmp(command,"OPEN") == 0 ) { //TODO tell the file window to open this return false; } else if( strcmp(command,"LOAD") == 0 ) { Boolean b; fullfilename = concat(directory,filename); b = AmPushLoadFile(fullfilename,True); XtFree(fullfilename); return b?true:false; } else if( strcmp(command,"EXEC") == 0 ) { const char *argv[2]; fullfilename = concat(directory,filename); if( fullfilename == NULL ) abortXfm("Out of Memory"); argv[0] = filename; argv[1] = NULL; execute_external_program(fullfilename,directory, argv, NULL, NULL); free(fullfilename); return true; } /* assume unescaping only shortens and there cannot be more arguments than characters */ l = strlen(command); args = malloc((l+3+getArgCount(resources.xterminal)+getArgCount(resources.shell))*sizeof(char*)); if( args == NULL ) abortXfm("Out of Memory"); if( action->needsterminal ) { int i; for( i = 0 ; resources.xterminal[i]!=NULL ; i++ ) { args[i] = resources.xterminal[i]; } progargs = args + i; } else progargs = args; fullfilename = concat(directory,filename); if( fullfilename == NULL ) abortXfm("Out of Memory"); // TODO: look for a way to check normal files to // match nametemplates if( resources.alwaysSymlink || !match(fullfilename, action->nameprefix, action->namesuffix) || veryDangerous(fullfilename) ) { linkname = allocateLink(fullfilename, action->nameprefix, chooselinksuffix(action->namesuffix, filename)); if( linkname == NULL ) return false; } else linkname = NULL; /* first try if we can get it working without a shell */ unescaped = malloc(l+1); if( unescaped == NULL ) abortXfm("Out of Memory"); // TODO: implement this one... free(unescaped); /* if this does not work try with a shell */ if( 1 ) { int i; if( linkname == NULL && ( couldDangerous(fullfilename) || ( shellDangerous(fullfilename) && isUnescaped(command) ) ) ) { linkname = allocateLink(fullfilename, action->nameprefix, chooselinksuffix(action->namesuffix, filename)); if( linkname == NULL ) { free(args); free(fullfilename); return false; } } if( linkname == NULL ) shellcommand = unescape_insert(command,fullfilename); else shellcommand = unescape_insert(command,linkname); if( shellcommand == NULL ) { free(args); free(fullfilename); free(linkname); return false; } for( i = 0 ; resources.shell[i] ; i++ ) { progargs[i] = resources.shell[i]; } progargs[i] = shellcommand; progargs[i+1] = NULL; } /* actually call it */ execute_external_program(args[0],directory, args, (linkname==NULL)?NULL:program_finished, linkname); free(args); free(fullfilename); // DO NOT free(linkname); free(shellcommand); return true; } bool mime_start(struct mime_filetype *mime_type,const char *directory,const char *filename,enum mime_start_type how ) { return mime_best_action(mime_type, directory, filename, how, start, resources.echo_mime_search); } xfm-1.5.4/src/execute.c0000644000175000017500000001323310420453027011630 00000000000000/* * This file is part of X-File Manager XFM * ---------------------------------------------------------------------- execute.c (c) 2005,2006 Bernhard R. Link call to external programs * ---------------------------------------------------------------------- * 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 of the License, 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include #include #include #include #include #include #include #include #include #include "global.h" #include "Fm.h" #include "Am.h" #include "execute.h" int child_stdout = -1; int child_stderr = -1; static struct pidwaitedfor { struct pidwaitedfor *next; pid_t pid; external_done_proc *done; void *data; } *waitedfor = NULL; static void save_sigchld_handler(UNUSED(XtPointer closure), UNUSED(XtSignalId* id)) { pid_t pid;int status; struct pidwaitedfor **p; while( (pid = waitpid(-1,&status,WNOHANG)) > 0 ) { for( p = &waitedfor ; *p != NULL ; p = &(*p)->next ) { struct pidwaitedfor *w = *p; if( w->pid == pid ) { w->done(status,w->data); *p = w->next; free(w); return; } } } } static XtSignalId sigid; static void sigchld_handler(UNUSED(int i)) { XtNoticeSignal(sigid); } bool execute_init(XtAppContext app) { struct sigaction newaction; sigid = XtAppAddSignal(app,save_sigchld_handler,NULL); newaction.sa_handler = sigchld_handler; newaction.sa_flags = SA_NOCLDSTOP; sigemptyset(&newaction.sa_mask); if( sigaction(SIGCHLD,&newaction,NULL) < 0 ) { sysError("Could not set SIGCHLD signal handler: "); return false; } return true; } static pid_t execute(const char *program,const char *directory, const char **argv) { pid_t pid; // TODO: move this into the exec? if( chdir(directory) != 0 ) { sysError("Can't chdir:"); return -1; } if (resources.echo_actions) { const char **arg; fprintf(stderr, "[%s] %s", directory, argv[0]); for (arg = argv+1; *arg != NULL ; arg++) fprintf(stderr," '%s'",*arg); fprintf(stderr, "\n"); } pid = fork(); if( pid < 0 ) { sysError("Can't fork:"); return -1; } if( pid == 0 ) { int fd,e; /* child: */ fd = open("/dev/null",O_RDONLY|O_NOCTTY); if( fd >= 0 ) { (void)dup2(fd,STDIN_FILENO); if( fd != STDIN_FILENO ) close(fd); } if( child_stdout >= 0 ) dup2(child_stdout,STDOUT_FILENO); if( child_stderr >= 0 ) dup2(child_stderr,STDERR_FILENO); if( child_stderr >= 3 && child_stdout != child_stderr ) close(child_stderr); if( child_stdout >= 3 ) close(child_stdout); /* hope the rest of the fds is close on exec */ execvp(program,(char**)argv); e = errno; fprintf(stderr,"Error executing '%s' in directory '%s': %d=%s\n",argv[0],directory,e,strerror(e)); raise(SIGUSR2); exit(EXIT_FAILURE); } return pid; } bool execute_and_wait(const char *program,const char *directory, const char **argv) { pid_t pid,w; int status; pid = execute(program,directory,argv); if( pid < 0 ) { return false; } w = waitpid(pid, &status, 0); return w > 0 && WIFEXITED(status) && WEXITSTATUS(status) == 0; } void execute_external_program(const char *program,const char *directory, const char **argv, external_done_proc *done, void *priv_data) { pid_t pid,w; int status; zzz(); XFlush(XtDisplay(aw.shell)); pid = execute(program,directory,argv); if( pid < 0 ) { wakeUp(); return; } /* parent */ sleep(1); w = waitpid(pid,&status,WNOHANG); if( w > 0 ) { if( WIFSIGNALED(status) && WSTOPSIG(status) == SIGUSR2 ) { fprintf(stderr,"Error executing '%s' in directory '%s'\n",argv[0],directory); } if( done != NULL ) done(status,priv_data); } else if( done != NULL ) { struct pidwaitedfor *wf; wf = (struct pidwaitedfor*)XtMalloc(sizeof(struct pidwaitedfor)); wf->next = waitedfor; wf->pid = pid; wf->done = done; wf->data = priv_data; waitedfor = wf; } wakeUp(); } const char **appendArgs(const char **old, int number, ...) { const char **args,**p; va_list ap; int c; c = 0; if( old != NULL) for( p = old ; *p != NULL ; p++ ) c++; args = (const char **)XtMalloc((c+number+1)*sizeof(const char*)); p = args; while( c > 0 ) { *p = old[p-args]; p++; c--; } va_start(ap,number); while( number > 0 ) { const char *argument = va_arg(ap,const char*); assert(argument != NULL); *(p++) = argument; number--; } assert( va_arg(ap,const char*) == NULL ); va_end(ap); *(p++) = NULL; return args; } const char **makeShellArgs(const char *action, const char **arguments) { const char **args,**p; int c,ac; c = 0; for( p = resources.shell ; *p != NULL ; p++ ) c++; if( arguments != NULL ) { ac = 1; for( p = arguments ; *p != NULL ; p++ ) ac++; } else ac = 0; args = (const char **)XtMalloc((c+ac+3)*sizeof(const char*)); p = args; while( c > 0 ) { *p = resources.shell[p-args]; p++; c--; } *(p++) = action; if( ac > 0 ) { *(p++) = "sh"; ac--; while( ac-- > 0 ) { *(p++) = *(arguments++); } } *(p++) = NULL; return args; } xfm-1.5.4/src/FmViewportScroll.c0000644000175000017500000000475610735452244013472 00000000000000/* * This file is part of X-File Manager XFM * ---------------------------------------------------------------------- FmViewportScroll.c (c) Bernhard R. Libk 2007 Action procedures to easily scroll viewports * ---------------------------------------------------------------------- * 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 of the License, 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include #include #include #include #include #include #include #include "global.h" static void ViewportScroll(Widget widget, XEvent *event, String *params, Cardinal *num_params) { ViewportWidget viewport; float f; char *e; Position x, y; while( widget != NULL && !XtIsSubclass(widget, viewportWidgetClass) ) widget = widget->core.parent; if( widget == NULL ) { XtWarning("ViewportScroll called from something not a Viewport"); return; } viewport = (ViewportWidget)widget; if( *num_params <= 1 ) { XtWarning("Wrong number of arguments to ViewportScroll"); return; } f = strtof(params[0], &e); if( e == NULL || *e != '\0' ) { XtWarning("cannot parse 1st argument to ViewportScroll"); return; } x = -viewport->viewport.child->core.x; y = -viewport->viewport.child->core.y; switch( params[1][0] ) { case 'v': case 'V': case 'y': case 'Y': y += f*(float)viewport->core.height; break; case 'h': case 'H': case 'x': case 'X': x += f*(float)viewport->core.width; break; default: XtWarning("unrecognized 2nd argument to ViewportScroll"); return; } XawViewportSetCoordinates(widget, x, y); } void initViewportScroll(XtAppContext context) { static XtActionsRec const actions[1] = { { "ViewportScroll", ViewportScroll } }; XtAppAddActions(context, (XtActionsRec*)actions, 1); } xfm-1.5.4/src/xfmmailcap.c0000644000175000017500000001044310656575537012335 00000000000000#include #include #include #include #include #include "global.h" #include "mime.h" static char *filename = NULL; static void showtype(struct mime_action *type) { printf("view: %s\n",type->view); if( !type->testOK ) { printf("test failed, not using this one\n"); } if( type->compose != NULL ) { printf("compose: %s\n",type->compose); } if( type->edit != NULL ) { printf("edit: %s\n",type->edit); } if( type->print != NULL ) { printf("print: %s\n",type->print); } if( type->description != NULL ) { printf("description: %s\n",type->description); } if( type->test != NULL ) { printf("test: %s\n",type->test); } if( type->notes != NULL ) { printf("notes: %s\n",type->notes); } if( type->x11bitmap != NULL ) { printf("x11bitmap: %s\n",type->x11bitmap); } if( type->needsterminal ) { printf("needsterminal\n"); } if( type->copiosoutput ) { printf("copiosoutput\n"); } } static bool show_action(const struct mime_action *type,const char *command,UNUSED(const char *a),UNUSED(const char *b)) { printf("action to execute: %s\n", command); if( type->test != NULL ) { printf("successfull test was: %s\n",type->test); } if( type->needsterminal ) { printf("needsterminal\n"); } if( type->copiosoutput ) { printf("copiosoutput\n"); } return true; } int main(int argc,char *argv[]) { char *buffer; mime_init(); if( asprintf(&buffer,"%s/.xfm/xfm_mailcap",getenv("HOME")) >= 0 && buffer != NULL ) { if( mime_parse_mailcap(buffer) == 0 ) mime_parse_mailcap(XFM_CONFDIR "/xfm_mailcap"); free(buffer); } else { mime_parse_mailcap(XFM_CONFDIR "/xfm_mailcap"); } if( argc < 2 ) { fprintf(stderr,"%s: too few arguments\n",argv[0]); return EXIT_FAILURE; } if( argc > 4 ) { fprintf(stderr,"%s: too many arguments\n",argv[0]); return EXIT_FAILURE; } if( argc == 4 ) filename = argv[3]; if( strncmp(argv[1],"--h",2) == 0 || strncmp(argv[1],"-h",2) == 0 || strcmp(argv[1],"-?") == 0 ) { puts( "xfmmailcap: show what mailcap information xfm would get for a given type"); puts( "Syntax: xfmmailcap [(default|all|view|edit) []]"); return EXIT_SUCCESS; } if( argc == 2 || strcmp(argv[2],"default") == 0 ) { struct mime_filetype *type; bool found; type = mime_get_filetype(argv[1]); if( type == NULL ) abort(); // enum mime_start_type { MIME_START_ANY, MIME_START_EDIT, MIME_START_VIEW }; found = mime_best_action(type, "dummy", "dummy", MIME_START_ANY, show_action, true); if( !found ) { fprintf(stderr,"%s: Could not find any mailcap entry for '%s'\n",argv[0],argv[1]); return EXIT_FAILURE; } } else if( strcmp(argv[2],"edit") == 0 ) { struct mime_filetype *type; bool found; type = mime_get_filetype(argv[1]); if( type == NULL ) abort(); // enum mime_start_type { MIME_START_ANY, MIME_START_EDIT, MIME_START_VIEW }; found = mime_best_action(type, "dummy", "dummy", MIME_START_ANY, show_action, true); if( !found ) { fprintf(stderr,"%s: Could not find any mailcap entry for '%s'\n",argv[0],argv[1]); return EXIT_FAILURE; } } else if( strcmp(argv[2],"view") == 0 ) { struct mime_filetype *type; bool found; type = mime_get_filetype(argv[1]); if( type == NULL ) abort(); // enum mime_start_type { MIME_START_ANY, MIME_START_EDIT, MIME_START_VIEW }; found = mime_best_action(type, "dummy", "dummy", MIME_START_ANY, show_action, true); if( !found ) { fprintf(stderr,"%s: Could not find any mailcap entry for '%s'\n",argv[0],argv[1]); return EXIT_FAILURE; } } else if( strcmp(argv[2],"all") == 0 ) { struct mime_filetype *type; struct mime_action *action; type = mime_get_filetype(argv[1]); if( type == NULL ) { abort(); } while( type != NULL ) { if( type->actions == NULL ) { fprintf(stderr,"Could not find any specific mailcap entry for '%s'\n",type->fulltypename); return EXIT_FAILURE; } for( action = type->actions ; action != NULL; action = action->next ) { showtype(action); if( action->next != NULL ) { printf("\nalternate:\n"); } } type = type->fallback; if( type != NULL ) { fprintf(stderr, "\nfallback type is %s:\n",type->fulltypename); } } } else { fprintf(stderr,"%s: unknown command '%s'!\n",argv[0],argv[2]); return EXIT_FAILURE; } return EXIT_SUCCESS; } xfm-1.5.4/src/xfmtype.c0000644000175000017500000000477610421242562011677 00000000000000/* * This file is part of X-File Manager XFM * ---------------------------------------------------------------------- xfmtype.c (c) Juan D. Martin 1995 modified 2005,2006 by Bernhard R. Link (see Changelog) seperate program to determine the xfm magic type of a file * ---------------------------------------------------------------------- * 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 of the License, 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include #include #include #include "magic.h" static void usage(const char *prog) { fprintf(stderr, "Usage: %s [-m magic_file ] [-f] file ...\n", prog); } int main(int argc, char **argv) { int i; const char *message; struct magic_modifiers modifiers; struct stat s; magic_parse_init(NULL); for(i = 1; i < argc; i++) { if(argv[i][0] == '-') { switch (argv[i][1]) { case 'm': i++; if(i < argc) magic_parse_singlefile(argv[i],NULL,65536); else { fprintf(stderr, "Missing argument: magic file\n"); usage(argv[0]); exit(1); } break; case 'f': i++; if(i < argc) { magic_get_type(argv[i], &message, NULL, &modifiers,&s); printf("%s: %s%s%s%s\n", argv[i], modifiers.symlink?"symlink to ":"", modifiers.gzipped?"gzipped ":"", modifiers.bzipped?"bzipped ":"", message); } else { fprintf(stderr, "Missing argument: file\n"); usage(argv[0]); exit(1); } break; default: fprintf(stderr, "Bad option %s\n", argv[i]); usage(argv[0]); exit(1); } continue; } magic_get_type(argv[i], &message, NULL, &modifiers, &s); printf("%s: %s%s%s%s\n", argv[i], modifiers.symlink?"symlink to ":"", modifiers.gzipped?"gzipped ":"", modifiers.bzipped?"bzipped ":"", message); } return 0; } xfm-1.5.4/icons/0000777000175000017500000000000010744136017010436 500000000000000xfm-1.5.4/icons/README0000644000175000017500000000116610330661276011237 00000000000000 This directory contains some icons for file types used by the new xfm. It is based on some of the 3DICONS set from Albert Graef described as: | This directory contains an alternative xfm setup featuring additional file | types and a collection of 3d-look 32x32 icons taken from the xplore file | manager at http://www.musikwissenschaft.uni-mainz.de/~ag/xplore/ (these, in | turn, are based on icons in the Cica archive and Juan D. Martin's fileicons | collection from previous xfm releases). I think that the new setup looks a lot | better than the original xfm setup from previous releases, see screen.gif for | a screenshot. xfm-1.5.4/icons/Makefile.am0000644000175000017500000000431010655636576012424 00000000000000MAINTAINERCLEANFILES = Makefile.in EXTRA_DIST = README iconbasedir = $(pkgdatadir)/icons icondirs = inode application text image audio inode_ICONS = default directory blockdevice chardevice pipe socket \ x-parent-directory x-bad-link x-empty x-unreadable text_ICONS = default html x-chdr x-csrc x-c++src x-diff x-makefile \ x-tex x-xfm application_ICONS = default postscript vnd.framemaker x-archive x-core \ x-dvi x-executable x-font x-object x-sharedlib \ x-shellscript x-iso9660 \ x-tar x-texinfo x-troff-man x-uuencoded x-xfig x-zoo \ x-xfm \ vnd.sun.xml.calc vnd.sun.xml.draw \ vnd.sun.xml.impress vnd.sun.xml.math \ vnd.sun.xml.writer vnd.sun.xml.writer.global image_ICONS = gif jpeg png tiff x-cmu-raster x-portable-bitmap \ x-portable-graymap x-portable-pixmap x-xbitmap \ x-xpm default audio_ICONS = default ICONS = default $(foreach dir,$(icondirs),$(patsubst %,$(dir)/%,$($(dir)_ICONS))) install-data-local: for icon in $(ICONS) ; do \ $(INSTALL) -m 644 -D $(srcdir)/$$icon.xpm $(DESTDIR)$(iconbasedir)/$$icon.xpm ; \ done ln -sf vnd.sun.xml.writer.xpm $(DESTDIR)$(iconbasedir)/application/vnd.oasis.opendocument.text.xpm ln -sf vnd.sun.xml.writer.global.xpm $(DESTDIR)$(iconbasedir)/application/vnd.oasis.opendocument.text-master.xpm ln -sf vnd.sun.xml.draw.xpm $(DESTDIR)$(iconbasedir)/application/vnd.oasis.opendocument.graphics.xpm ln -sf vnd.sun.xml.impress.xpm $(DESTDIR)$(iconbasedir)/application/vnd.oasis.opendocument.presentation.xpm ln -sf vnd.sun.xml.calc.xpm $(DESTDIR)$(iconbasedir)/application/vnd.oasis.opendocument.spreadsheet.xpm ln -sf vnd.sun.xml.math.xpm $(DESTDIR)$(iconbasedir)/application/vnd.oasis.opendocument.formula.xpm ln -sf x-iso9660.xpm $(DESTDIR)$(iconbasedir)/application/x-iso9660-image.xpm dist-hook: for icon in $(ICONS) ; do \ $(INSTALL) -m 644 -D $(srcdir)/$$icon.xpm $(distdir)/$$icon.xpm ; \ done check: for icon in $(ICONS) ; do \ echo ./$$icon.xpm ; \ done | sort > check.xpm.expected find . -name "*.xpm" |sort > check.xpm.found diff check.xpm.expected check.xpm.found && echo "no differences found" -rm check.xpm.expected check.xpm.found MOSTLYCLEANFILES = check.xpm.expected check.xpm.found xfm-1.5.4/icons/Makefile.in0000644000175000017500000002456110744135557012437 00000000000000# Makefile.in generated by automake 1.10 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = icons DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/xfmconfig.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COMPRESSIONLIBS = @COMPRESSIONLIBS@ CONFIG_VARIANT = @CONFIG_VARIANT@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ MAINTAINERCLEANFILES = Makefile.in EXTRA_DIST = README iconbasedir = $(pkgdatadir)/icons icondirs = inode application text image audio inode_ICONS = default directory blockdevice chardevice pipe socket \ x-parent-directory x-bad-link x-empty x-unreadable text_ICONS = default html x-chdr x-csrc x-c++src x-diff x-makefile \ x-tex x-xfm application_ICONS = default postscript vnd.framemaker x-archive x-core \ x-dvi x-executable x-font x-object x-sharedlib \ x-shellscript x-iso9660 \ x-tar x-texinfo x-troff-man x-uuencoded x-xfig x-zoo \ x-xfm \ vnd.sun.xml.calc vnd.sun.xml.draw \ vnd.sun.xml.impress vnd.sun.xml.math \ vnd.sun.xml.writer vnd.sun.xml.writer.global image_ICONS = gif jpeg png tiff x-cmu-raster x-portable-bitmap \ x-portable-graymap x-portable-pixmap x-xbitmap \ x-xpm default audio_ICONS = default ICONS = default $(foreach dir,$(icondirs),$(patsubst %,$(dir)/%,$($(dir)_ICONS))) MOSTLYCLEANFILES = check.xpm.expected check.xpm.found all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu icons/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu icons/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-hook check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-data-local install-dvi: install-dvi-am install-exec-am: install-html: install-html-am install-info: install-info-am install-man: install-pdf: install-pdf-am install-ps: install-ps-am installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic dist-hook \ distclean distclean-generic distdir dvi dvi-am html html-am \ info info-am install install-am install-data install-data-am \ install-data-local install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am uninstall uninstall-am install-data-local: for icon in $(ICONS) ; do \ $(INSTALL) -m 644 -D $(srcdir)/$$icon.xpm $(DESTDIR)$(iconbasedir)/$$icon.xpm ; \ done ln -sf vnd.sun.xml.writer.xpm $(DESTDIR)$(iconbasedir)/application/vnd.oasis.opendocument.text.xpm ln -sf vnd.sun.xml.writer.global.xpm $(DESTDIR)$(iconbasedir)/application/vnd.oasis.opendocument.text-master.xpm ln -sf vnd.sun.xml.draw.xpm $(DESTDIR)$(iconbasedir)/application/vnd.oasis.opendocument.graphics.xpm ln -sf vnd.sun.xml.impress.xpm $(DESTDIR)$(iconbasedir)/application/vnd.oasis.opendocument.presentation.xpm ln -sf vnd.sun.xml.calc.xpm $(DESTDIR)$(iconbasedir)/application/vnd.oasis.opendocument.spreadsheet.xpm ln -sf vnd.sun.xml.math.xpm $(DESTDIR)$(iconbasedir)/application/vnd.oasis.opendocument.formula.xpm ln -sf x-iso9660.xpm $(DESTDIR)$(iconbasedir)/application/x-iso9660-image.xpm dist-hook: for icon in $(ICONS) ; do \ $(INSTALL) -m 644 -D $(srcdir)/$$icon.xpm $(distdir)/$$icon.xpm ; \ done check: for icon in $(ICONS) ; do \ echo ./$$icon.xpm ; \ done | sort > check.xpm.expected find . -name "*.xpm" |sort > check.xpm.found diff check.xpm.expected check.xpm.found && echo "no differences found" -rm check.xpm.expected check.xpm.found # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xfm-1.5.4/icons/default.xpm0000644000175000017500000000240510744136017012525 00000000000000/* XPM */ static char * default_xpm[] = { "32 32 5 1", " s background c None", ". c gray50", "X c white", "o c black", "O c grey", " .................. ", " .XXXXXXXXXXXXXXXX.o ", " .XXXXXXXXXXXXXXXX..o ", " .XXXXXXXXXXXXXXXX.O.o ", " .XXXXXXXXXXXXXXXX.OO.o ", " .XXXXXXXXXXXXXXXX.XOO.o ", " .XXXXXXXXXXXXXXXX.XXOO.o ", " .XXXXXXXXXXXXXXXX.ooooooo ", " .XXXXXXXXXXXXXXXXXOOOOOOo ", " .XXXXXXXXXXXXXXXXXOOOOOOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .OOOOOOOOOOOOOOOOOOOOOOOo ", " ooooooooooooooooooooooooo "}; xfm-1.5.4/icons/inode/0000777000175000017500000000000010744136017011534 500000000000000xfm-1.5.4/icons/inode/default.xpm0000644000175000017500000000240410744136017013622 00000000000000/* XPM */ static char * inode_default_xpm[] = { "32 32 4 1", " s background c None", ". c #757575", "+ c #000000", "@ c #B09B25", " ", " ", " ", " ", " ", " .......................... ", " .+++@++++@++++@++++@+++++. ", " .+++@++++@++++@++++@+++++. ", " .++++++++++++++++++++++++. ", " .++++++++++++++++++++++++. ", " .++++++++++++++++++++++++. ", " .++++++++++++++++++++++++. ", " .++++++++++++++++++++++++. ", " .++++++++++++++++++++++++. ", " .++++++++++++++++++++++++. ", " .++++++++++++++++++++++++. ", " .++++++++++++++++++++++++. ", " .++++++++++++++++++++++++. ", " .........++++++++......... ", " .++++++++. ", " .++++++++. ", " .++++++++. ", " .......... ", " ", " ", " ", " ", " ", " ", " ", " ", " "}; xfm-1.5.4/icons/inode/directory.xpm0000644000175000017500000000252010744136017014201 00000000000000/* XPM */ static char * directory_xpm[] = { /* width height ncolors chars_per_pixel */ "32 32 5 1", /* colors */ " s background c None", ". c black", "X c #CECEFF", "o c white", "O c #9C9CFF", /* pixels */ " ", " ", " ", " ", " ", " ", " ", " ....... ", " .XXXXXXX. ", " .XXXXXXXXX. ", " .XXXXXXXXXXX. ", " .XXXXXXXXXXXXX............... ", ".XXXXXXXXXXXXXXXXXXXXXXXXXXXXX. ", ".ooooooooooooooooooooooooooooo. ", ".oXoXoXoXoXoXoXoXoXoXoXoXoXoXO. ", ".XoXoXoXoXoXoXoXoXoXoXoXoXoXoO. ", ".oXoXoXoXoXoXoXoXoXoXoXoXoXoXO. ", ".XoXoXoXoXoXoXoXoXoXoXoXoXoXoO. ", ".oXoXoXoXoXoXoXoXoXoXoXoXoXoXO. ", ".XoXoXoXoXoXoXoXoXoXoXoXoXoXoO. ", ".oXoXoXoXoXoXoXoXoXoXoXoXoXoXO. ", ".XoXoXoXoXoXoXoXoXoXoXoXoXoXoO. ", ".oXoXoXoXoXoXoXoXoXoXoXoXoXoXO. ", ".XoXoXoXoXoXoXoXoXoXoXoXoXoXoO. ", ".oXoXoXoXoXoXoXoXoXoXoXoXoXoXO. ", ".XoXoXoXoXoXoXoXoXoXoXoXoXoXoO. ", ".oXoXoXoXoXoXoXoXoXoXoXoXoXoXO. ", ".XoXoXoXoXoXoXoXoXoXoXoXoXoXoO. ", ".oXoXoXoXoXoXoXoXoXoXoXoXoXoXO. ", ".XoXoXoXoXoXoXoXoXoXoXoXoXoXoO. ", ".oXoXoXoXoXoXoXoXoXoXoXoXoXoXO. ", "............................... "}; xfm-1.5.4/icons/inode/blockdevice.xpm0000644000175000017500000000244010744136017014450 00000000000000/* XPM */ static char * blockdevice_xpm[] = { "32 32 6 1", " s background c None", ". c #757575", "+ c #000000", "@ c #B09B25", "# c #0000E6", "$ c #000009", " ", " ", " ", " ", " ", " .......................... ", " .+++@++++@++++@++++@+++++. ", " .+++@++++@++++@++++@+++++. ", " .++++++++++++++++++++++++. ", " .++++++++++++++++++++++++. ", " .++++++++++++++++++++++++. ", " .++++++++++#+++++++++++++. ", " .++++++++++#+++++++++++++. ", " .++++++++++#+++++++++++++. ", " .++++++++++####++++++++++. ", " .++++++++++#+$+#+++++++++. ", " .++++++++++#+++#+++++++++. ", " .++++++++++#+++#+++++++++. ", " .........++####++......... ", " .++++++++. ", " .++++++++. ", " .++++++++. ", " .......... ", " ", " ", " ", " ", " ", " ", " ", " ", " "}; xfm-1.5.4/icons/inode/chardevice.xpm0000644000175000017500000000242010744136017014271 00000000000000/* XPM */ static char * chardevice_xpm[] = { "32 32 5 1", " s background c None", ". c #757575", "+ c #000000", "@ c #B09B25", "# c #0000E6", " ", " ", " ", " ", " ", " .......................... ", " .+++@++++@++++@++++@+++++. ", " .+++@++++@++++@++++@+++++. ", " .++++++++++++++++++++++++. ", " .++++++++++++++++++++++++. ", " .++++++++++++++++++++++++. ", " .++++++++++++++++++++++++. ", " .++++++++++++++++++++++++. ", " .+++++++++++###++++++++++. ", " .++++++++++#+++++++++++++. ", " .++++++++++#+++++++++++++. ", " .++++++++++#+++++++++++++. ", " .+++++++++++###++++++++++. ", " .........++++++++......... ", " .++++++++. ", " .++++++++. ", " .++++++++. ", " .......... ", " ", " ", " ", " ", " ", " ", " ", " ", " "}; xfm-1.5.4/icons/inode/pipe.xpm0000644000175000017500000000243110744136017013133 00000000000000/* XPM */ static char * pipe_xpm[] = { "32 32 6 1", " s background c None", ". c #757575", "+ c #000000", "@ c #B09B25", "# c #0000E6", "$ c #000009", " ", " ", " ", " ", " ", " .......................... ", " .+++@++++@++++@++++@+++++. ", " .+++@++++@++++@++++@+++++. ", " .++++++++++++++++++++++++. ", " .++++++++++++++++++++++++. ", " .++++++++++++++++++++++++. ", " .++++++++++####++++++++++. ", " .++++++++++#+$+#+++++++++. ", " .++++++++++#+++#+++++++++. ", " .++++++++++#+++#+++++++++. ", " .++++++++++####++++++++++. ", " .++++++++++#+++++++++++++. ", " .++++++++++#+++++++++++++. ", " .........++#+++++......... ", " .++++++++. ", " .++++++++. ", " .++++++++. ", " .......... ", " ", " ", " ", " ", " ", " ", " ", " ", " "}; xfm-1.5.4/icons/inode/socket.xpm0000644000175000017500000000241410744136017013467 00000000000000/* XPM */ static char * socket_xpm[] = { "32 32 5 1", " s background c None", ". c #757575", "+ c #000000", "@ c #B09B25", "# c #0000E6", " ", " ", " ", " ", " ", " .......................... ", " .+++@++++@++++@++++@+++++. ", " .+++@++++@++++@++++@+++++. ", " .++++++++++++++++++++++++. ", " .++++++++++++++++++++++++. ", " .++++++++++++++++++++++++. ", " .++++++++++++++++++++++++. ", " .++++++++++++++++++++++++. ", " .+++++++++++###++++++++++. ", " .++++++++++#+++++++++++++. ", " .+++++++++++##+++++++++++. ", " .+++++++++++++#++++++++++. ", " .++++++++++###+++++++++++. ", " .........++++++++......... ", " .++++++++. ", " .++++++++. ", " .++++++++. ", " .......... ", " ", " ", " ", " ", " ", " ", " ", " ", " "}; xfm-1.5.4/icons/inode/x-parent-directory.xpm0000644000175000017500000000253110744136017015737 00000000000000/* XPM */ static char * x_parent_directory_xpm[] = { /* width height ncolors chars_per_pixel */ "32 32 5 1", /* colors */ " s background c None", ". c black", "X c #CECEFF", "o c white", "O c #9C9CFF", /* pixels */ " ", " ", " ", " ", " ", " ", " ", " ....... ", " .XXXXXXX. ", " .XXXXXXXXX. ", " .XXXXXXXXXXX. ", " .XXXXXXXXXXXXX............... ", ".XXXXXXXXXXXXXXXXXXXXXXXXXXXXX. ", ".ooooooooooooooooooooooooooooo. ", ".oXoXoXoXoXoXoXoXoXoXoXoXoXoXO. ", ".XoXoXoXoXoXoXoXoXoXoXoXoXoXoO. ", ".oXoXoXoXoXoXoXoXoXoXoXoXoXoXO. ", ".XoXoXoXoXoXoX.XoXoXoXoXoXoXoO. ", ".oXoXoXoXoXoX...XoXoXoXoXoXoXO. ", ".XoXoXoXoXoX..o..XoXoXoXoXoXoO. ", ".oXoXoXoXoX..oXo..XoXoXoXoXoXO. ", ".XoXoXoXoX..oX.Xo..XoXoXoXoXoO. ", ".oXoXoXoXo.oX...Xo.oXoXoXoXoXO. ", ".XoXoXoXoXoX..o..XoXoXoXoXoXoO. ", ".oXoXoXoXoX..oXo..XoXoXoXoXoXO. ", ".XoXoXoXoX..oXoXo..XoXoXoXoXoO. ", ".oXoXoXoXo.oXoXoXo.oXoXoXoXoXO. ", ".XoXoXoXoXoXoXoXoXoXoXoXoXoXoO. ", ".oXoXoXoXoXoXoXoXoXoXoXoXoXoXO. ", ".XoXoXoXoXoXoXoXoXoXoXoXoXoXoO. ", ".oXoXoXoXoXoXoXoXoXoXoXoXoXoXO. ", "............................... "}; xfm-1.5.4/icons/inode/x-bad-link.xpm0000644000175000017500000000245510744136017014132 00000000000000/* XPM */ static char * x_bad_link_xpm[] = { "32 32 6 1", " s background c None", ". c #7DF77DF77DF7", "X c white", "o c black", "O c #BEFBBEFBBEFB", "+ c #820782078207", " .X.X.X.X.X.X.X.X.. ", " XXXXXXXXXXXXXXXXX.o ", " .XXXXXXXXXXXXXXXX... ", " XXXXXXXXXXXXXXXXX.O.o ", " .XXXXXXXXXXXXXXXX.OO.. ", " XXXXXXXXXXXXXXXXX.XOO.o ", " .XXXXXXXXXXXXXXXX.XXOO.. ", " XXXXXXXXXXXXXXXXX.ooooooo ", " .XXXXXXXXXXXXXXXXXOOOOOO. ", " XXXXXXXXXXXXXXXXXXOOOOOOo ", " .XXXXXXXXXXXXXXXXXXXXXXO. ", " XXXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXO. ", " XXXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXO. ", " XXXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXO. ", " XXXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXO. ", " XXXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXO. ", "+X+X+X+X+XoXXXXXXXXXXXXXXXXOo ", "XXXXXXXXXXXXXXXXXXXXXXXXXXXO. ", "+XXXoXoXXXoXXXXXXXXXXXXXXXXOo ", "XXXXXoXoXXXXXXXXXXXXXXXXXXXO. ", "+XXXoXoXXXoXXXXXXXXXXXXXXXXOo ", "XXXoXoXoXXXXXXXXXXXXXXXXXXXO. ", "+XXXoXXXXXoXXXXXXXXXXXXXXXXOo ", "XXXoXXXXXXXXXXXXXXXXXXXXXXXO. ", "+XXXoXXXXXoXXXXXXXXXXXXXXXXOo ", "XXXXXXXXXXXOOOOOOOOOOOOOOOOO. ", "oXoXoXoXoXo.o.o.o.o.o.o.o.o.o "}; xfm-1.5.4/icons/inode/x-empty.xpm0000644000175000017500000000245010744136017013602 00000000000000/* XPM */ static char * empty_xpm[] = { "32 32 6 1", " s background c None", ". c #7DF77DF77DF7", "X c white", "o c black", "O c #BEFBBEFBBEFB", "+ c #CF3CCF3CFFFF", " .................. ", " .XXXXXXXXXXXXXXXX.o ", " .XXXXXXXXXXXXXXXX..o ", " .XXXXXXXXXXXXXXXX.O.o ", " .XXXXXXXXXXXXXXXX.OO.o ", " .XXXXXXXXXXXXXXXX.XOO.o ", " .XXXXXXXXXXXXXXXX.XXOO.o ", " .XXXXXXXXXXXXXXXX.ooooooo ", " .XXXXXoooooooooooXOOOOOOo ", " .XXXooooooooooooooOOOOOOo ", " .XXXoXoXXoooooXXoXoXXXXOo ", " .XXXoooooXXXXXoooooXXXXOo ", " .XXXoooooooooooooooXXXXOo ", " .XXXoo+++++++++++ooXXXXOo ", " .XXXo+++++++++++++oXXXXOo ", " .XXXo+++++++++++++oXXXXOo ", " .XXXo+++++++++++++oXXXXOo ", " .XXXo+++++++++++++oXXXXOo ", " .XXXo+++++++++++++oXXXXOo ", " .XXXo+++++++++++++oXXXXOo ", " .XXXo+++++++++++++oXXXXOo ", " .XXXo+++++++++++++oXXXXOo ", " .XXXo++ooooooooo++oXXXXOo ", " .XXXo+o+++++++++o+oXXXXOo ", " .XXXo+++++++++++++oXXXXOo ", " .XXXXooo+++++++oooXXXXXOo ", " .XXXXXXXoooooooXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .OOOOOOOOOOOOOOOOOOOOOOOo ", " ooooooooooooooooooooooooo "}; xfm-1.5.4/icons/inode/x-unreadable.xpm0000644000175000017500000000241210744136017014544 00000000000000/* XPM */ static char * x_unreadable_xpm[] = { "32 32 5 1", " s background c None", ". c gray50", "X c white", "o c black", "O c grey", " .X.X.X.X.X.X.X.X.. ", " XXXXXXXXXXXXXXXXX.o ", " .XXXXXXXXXXXXXXXX... ", " XXXXXXXXXXXXXXXXX.O.o ", " .XXXXXXXXXXXXXXXX.OO.. ", " XXXXXXXXXXXXXXXXX.XOO.o ", " .XXXXXXXXXXXXXXXX.XXOO.. ", " XXXXXXXXXXXXXXXXX.ooooooo ", " .XXXXXXXXXXXXXXXXXOOOOOO. ", " XXXXXXXXXXXXXXXXXXOOOOOOo ", " .XXXXXXXXXXXXXXXXXXXXXXO. ", " XXXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXO. ", " XXXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXO. ", " XXXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXO. ", " XXXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXO. ", " XXXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXO. ", " XXXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXO. ", " XXXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXO. ", " XXXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXO. ", " XXXXXXXXXXXXXXXXXXXXXXXOo ", " XX.XXXXXXXXXXXXXXXXXXXXXXO. ", " XXXXXXXXXXXXXXXXXXXXXXXOo ", " .OOOOOOOOOOOOOOOOOOOOOOO. ", " o.o.o.o.o.o.o.o.o.o.o.o.o "}; xfm-1.5.4/icons/application/0000777000175000017500000000000010744136017012741 500000000000000xfm-1.5.4/icons/application/default.xpm0000644000175000017500000000247310744136017015035 00000000000000/* XPM */ static char * hex_xpm[] = { "32 32 7 1", " s background c None", ". c #7DF77DF77DF7", "X c #000082078207", "o c #FFFFFFFF0000", "O c white", "+ c black", "@ c #BEFBBEFBBEFB", " .................. ", " .XoXXOoOXXoOXXoXX.+ ", " .XOXXoOoXXOoXXOXX..+ ", " .XoXXOoOXXoOXXoXX.@.+ ", " .XOXXoOoXXOoXXOXX.@@.+ ", " .XoXXOoOXXoOXXoXX.O@@.+ ", " .XXXOoOXXXXoOXXXO.OO@@.+ ", " .OoOoOoOoOoOoOoOo.+++++++ ", " .oXXOoOXXXOoOoXXOo@@@@@@+ ", " .XXXoOXXoXXOoXXXoO@@@@@@+ ", " .oXXOoXXOXXoOoXXOoXXOXX@+ ", " .OXXoOXXoXXOoOXXoOXXoXX@+ ", " .oXXOoXXOXXoOoXXOoXXOXX@+ ", " .OXXoOXXoXXOoOXXoOXXoXX@+ ", " .oXXOoXXOXXoOoXXOoXXOXX@+ ", " .OXXoOXXoXXOoOXXoOXXoXX@+ ", " .XXXXoOXXXOoOXXXXoOXXXO@+ ", " .OoOoOoOoOoOoOoOoOoOoOo@+ ", " .oOoOoOoOoOoOoOoOoOoOoO@+ ", " .OXXoOoXXXoOoOXXoOoOXXo@+ ", " .XXXOoXXOXXoOXXXOoOXXXO@+ ", " .OXXoOXXoXXOoOXXoOoOXXo@+ ", " .oXXOoXXOXXoOoXXOoOoXXO@+ ", " .OXXoOXXoXXOoOXXoOoOXXo@+ ", " .oXXOoXXOXXoOoXXOoOoXXO@+ ", " .OXXoOXXoXXOoOXXoOoOXXo@+ ", " .oXXOoXXOXXoOoXXOoOoXXO@+ ", " .XXXXOoXXXoOoXXXXOoXXXX@+ ", " .oOoOoOoOoOoOoOoOoOoOoO@+ ", " .OoOoOoOoOoOoOoOoOoOoOo@+ ", " .@@@@@@@@@@@@@@@@@@@@@@@+ ", " +++++++++++++++++++++++++ "}; xfm-1.5.4/icons/application/postscript.xpm0000644000175000017500000000242110744136017015614 00000000000000/* XPM */ static char * ps2_xpm[] = { "32 32 5 1", " s background c None", ". c #7DF77DF77DF7", "X c white", "o c black", "O c #BEFBBEFBBEFB", " .................. ", " .XXXXXXXXXXXXXXXX.o ", " .XXXXXoXXXXXXXXXX..o ", " .XXXXXoXXXXXXXXXX.O.o ", " .XXXXXXXXXXXXXXXX.OO.o ", " .XXXXXoXXXXXXXXXX.XOO.o ", " .XooXoXoXooooooXX.XXOO.o ", " .XXXXXoXXXXXXXXXX.ooooooo ", " .XXXXXXXXXXXXXXXXXOOOOOOo ", " .XXXXXoXXXXXXXXXXXOOOOOOo ", " .XXXXXoXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXoooooooXXoooooXXXXOo ", " .XXXXXooXXoooooXXoooXXXOo ", " .XXXXXooXXXoooXXXXooXXXOo ", " .XXXXXooXXXoooXXXXXXXXXOo ", " .XXXXXooXXoooooXXXXXXXXOo ", " .XXXXXoooooXXooooooXXXXOo ", " .XXXXXooXXXXXXXXXoooXXXOo ", " .XXXXXooXXXXXXXXXXooXXXOo ", " .XXXXXooXXXXooXXXXooXXXOo ", " .XXXXXooXXXXoooXXoooXXXOo ", " .XXXXooooXXXXoooooXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XooooooooooooooooooooXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXoXXXXXXXXXXXXXXXXOo ", " .XXXXXoXXXXXXXXXXXXXXXXOo ", " .XXXXXoXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .OOOOOOOOOOOOOOOOOOOOOOOo ", " ooooooooooooooooooooooooo "}; xfm-1.5.4/icons/application/vnd.framemaker.xpm0000644000175000017500000000243010744136017016302 00000000000000/* XPM */ static char * framemaker_xpm[] = { "32 32 5 1", " s background c None", ". c #7DF77DF77DF7", "X c white", "o c black", "O c #BEFBBEFBBEFB", " .................. ", " .XXXXXXXXXXXXXXXX.o ", " .XXXXXXXXXXXXXXXX..o ", " .XXXXXXXXXXXXXXXX.O.o ", " .XXXXXXXXXXXXXXXX.OO.o ", " .XXXXXXXXXXXXXXXX.XOO.o ", " .XXXXXXXXXXXXXXXX.XXOO.o ", " .XXXXXXXXXXooXXXX.ooooooo ", " .XXXXXXXXXooooXXXXOOOOOOo ", " .XXXXXXXXooXXooXXXOOOOOOo ", " .XXXXXXXooXooXooXXXXXXXOo ", " .XXXXXXooXooooXooXXXXXXOo ", " .XXXXXooXooXXooXooXXXXXOo ", " .XXXXooXooXooXooXooXXXXOo ", " .XXXooXooXooooXooXooXXXOo ", " .XXXoXooXooXXooXoooXXXXOo ", " .XXXXooXooXXXXooooXoXXXOo ", " .XXXooXooXXXXXXooXooXXXOo ", " .XXXoXooooXXXXooXooXXXXOo ", " .XXXXoooXooXXooXooXoXXXOo ", " .XXXooXooXooooXooXooXXXOo ", " .XXXXooXooXooXooXooXXXXOo ", " .XXXXXooXooXXooXooXXXXXOo ", " .XXXXXXooXooooXooXXXXXXOo ", " .XXXXXXXooXooXooXXXXXXXOo ", " .XXXXXXXXooXXooXXXXXXXXOo ", " .XXXXXXXXXooooXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .OOOOOOOOOOOOOOOOOOOOOOOo ", " ooooooooooooooooooooooooo "}; xfm-1.5.4/icons/application/x-archive.xpm0000644000175000017500000000245010744136017015272 00000000000000/* XPM */ static char * dot_a_xpm[] = { "32 32 6 1", " s background c None", ". c #7DF77DF77DF7", "X c white", "o c black", "O c #BEFBBEFBBEFB", "+ c #820782078207", " .................. ", " .XXXXXXXXXXXXXXXX.o ", " .XXXXXXXXXXXXXXXX..o ", " .XXXXXXXXXXXXXXXX.O.o ", " .X.X.X.X.X.X.X.X..OO.o ", " .XX.X.X.X.X.X.X.X.XOO.o ", " .X.X.X.X.X.X.X.X..XXOO.o ", " .XX.X.X.X.X.X.X.X.ooooooo ", " .X.X.X.X.X.X.X.X.XOOOOOOo ", " .XX.X.X.X.X.X.X.X.OOOOOOo ", " .X.X.X.X.X.X.X.X.X+X.XXOo ", " .XX.X.X.X.X.X.X.X.X.XXXOo ", " .X.X.X.X.X.X.X.X.X+X.XXOo ", " .XX.X.X.X.X.X.X.X.X.XXXOo ", " .X.X.X.X.X.X.X.X.X.X.XXOo ", " .XX.X.X.X.X.X.X.X.X.XXXOo ", " .X.X.X.X.X.X.X.X.X.X.XXOo ", " .XX.X.X.X.X.X.XXXXX.XXXOo ", " .X.X.X.X.X.X.XXXXXXX.XXOo ", " .XX.X.X.X.X.XXooooXXXXXOo ", " .X.X.X.X.X.XXooooooXXXXOo ", " .XX.X.X.X.XXoooXXoooXXXOo ", " .X.X.X.X.X.XXXXXXoooXXXOo ", " .XX.X.X.X.XXXoooooooXXXOo ", " .X.X.X.X.X.XooooXoooXXXOo ", " .XX.X.X.XXXXoooXXoooXXXOo ", " .X.X.X.XXooXoooXooooXXXOo ", " .XXXXXXXXooXooooooooXXXOo ", " .XXXXXXXXooXXooooXooXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .OOOOOOOOOOOOOOOOOOOOOOOo ", " ooooooooooooooooooooooooo "}; xfm-1.5.4/icons/application/x-core.xpm0000644000175000017500000000242110744136017014577 00000000000000/* XPM */ static char * bug_xpm[] = { "32 32 5 1", " s background c None", ". c #7DF77DF77DF7", "X c white", "o c black", "O c #BEFBBEFBBEFB", " .................. ", " .XXXXXXXXXXXXXXXX.o ", " .XXXXXXXXXXXXXXXX..o ", " .XXXXXXXXXXXXXXXX.O.o ", " .XXXXXXXXXXXXXXXX.OO.o ", " .XXXXXXXXXXXXXXXX.XOO.o ", " .XXXXXXXXXXXXXXXX.XXOO.o ", " .XXXXXXXXXXXXXXXX.ooooooo ", " .XXXXXXXXXXXXXXXXXOOOOOOo ", " .XXXXXXXXXXXXXXXXXOOOOOOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXoXXooXXXXXXXXXOo ", " .XXXXXoXXoXooooXXXXXXXXOo ", " .XXXXXXoXooXoooXXXXXXXXOo ", " .XXXXXXXooooooXXXXXXXXXOo ", " .XXXoooXoooooXXXXXXXXXXOo ", " .XXXXXooXooooooXXXXXXXXOo ", " .XXXXoXoooooXXXXXXXXXXXOo ", " .XXXooooooXXoXXXXXXXXXXOo ", " .XXXooooooXXXoXXXXXXXXXOo ", " .XXXoooooooXXXXXXXXXXXXOo ", " .XXXoooooXoXXXXXXXXXXXXOo ", " .XXXXoooXXoXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .OOOOOOOOOOOOOOOOOOOOOOOo ", " ooooooooooooooooooooooooo "}; xfm-1.5.4/icons/application/x-dvi.xpm0000644000175000017500000000242110744136017014431 00000000000000/* XPM */ static char * dvi_xpm[] = { "32 32 5 1", " s background c None", ". c #7DF77DF77DF7", "X c white", "o c black", "O c #BEFBBEFBBEFB", " .................. ", " .XXXXXXXXXXXXXXXX.o ", " .XXXXoXXXXXXXXXoX..o ", " .XXXXoXXXXXXXXXXX.O.o ", " .XooXoXoXXXoXXooX.OO.o ", " .oXXooXoXXXoXXXoX.XOO.o ", " .oXXXoXXoXoXXXXoX.XXOO.o ", " .oXXooXXoXoXXXXoX.ooooooo ", " .XooXoXXXoXXXXoooXOOOOOOo ", " .XXXXXXXXXXXXXXXXXOOOOOOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXoXXXooXXooXXXXXXXXXXOo ", " .XXXXoXXXooooooXooXXXXXOo ", " .XoXXooooooXXXXXoXXXoXXOo ", " .XXooXoooXXooXoooXXXXXXOo ", " .XXooXXooooooooooooooXXOo ", " .oooooooooooooXoooooooXOo ", " .ooooooXooooooXXXXXXXoXOo ", " .XXoooXoooooooXXXXXXXXXOo ", " .XXooXXXooXooXooooXXXXXOo ", " .XooXXXXooooooooooXXXXXOo ", " .XoooXXXXooXooooooXXXXXOo ", " .XXooXXXXXXooXXooXXXXXXOo ", " .XoXoXXoXXXooXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .OOOOOOOOOOOOOOOOOOOOOOOo ", " ooooooooooooooooooooooooo "}; xfm-1.5.4/icons/application/x-executable.xpm0000644000175000017500000000244410744136017015775 00000000000000/* XPM */ static char *xfm_exec_xpm[] = { "32 32 7 1", " s background c None", ". c black", "X c white", "o c gray", "O c black", "+ c skyblue", "@ c lightgray", " .................. ", " .XXXXXXXXXXXXXXXX.. ", " .XXXXXXXXXXXXXXXX.o. ", " .XXXXXXXXXXXXXXXX.oo. ", " .XXXXXXXXXXXXXXXX.ooo. ", " .XXXXXXXXXXXXXXXX.oooo. ", " .XXXXXXXXXXXXXXXX.ooooo. ", " .XXXXXXXXXXXXXXXX.......O ", " .XXXXXXXXXXXXXXXXXXoooo.O ", " .XX..................oo.O ", " .XX.+..+++++++++++++.OX.O ", " .XX.+..+++++++++++++.OX.O ", " .XX..................OX.O ", " .XX.@@@@@@@@@@@@@@@@.OX.O ", " .XX.@@@@@@@@@@@@@@@@.OX.O ", " .XX.@@@@@@@@@@@@@@@@.OX.O ", " .XX.@@@@@@@@@@@@@@@@.OX.O ", " .XX.@@@@@@@@@@@@@@@@.OX.O ", " .XX.@@@@@@@@@@@@@@@@.OX.O ", " .XX.@@@@@@@@@@@@@@@@.OX.O ", " .XX.@@@@@@@@@@@@@@@@.OX.O ", " .XX.@@@@@@@@@@@@@@@@.OX.O ", " .XX.@@@@@@@@@@@@@@@@.OX.O ", " .XX.@@@@@@@@@@@@@@@@.OX.O ", " .XX.@@@@@@@@@@@@@@@@.OX.O ", " .XX..................OX.O ", " .XXXOOOOOOOOOOOOOOOOOOX.O ", " .XXXXXXXXXXXXXXXXXXXXXX.O ", " .XXXXXXXXXXXXXXXXXXXXXX.O ", " .XXXXXXXXXXXXXXXXXXXXXX.O ", " ........................O ", " OOOOOOOOOOOOOOOOOOOOOOOO "}; xfm-1.5.4/icons/application/x-font.xpm0000644000175000017500000000244710744136017014625 00000000000000/* XPM */ static char * font_xpm[] = { "32 32 6 1", " s background c None", ". c #7DF77DF77DF7", "X c white", "o c black", "O c #71C682079248", "+ c #BEFBBEFBBEFB", " .................. ", " .XXXXXXXXXXXXXXXX.o ", " .XXXX.OOOOOOOOOO...o ", " .XXXXXXOOOOO.XX.O.+.o ", " .XXXXXX.OOO.XXXXX.++.o ", " .XXXXXXOOOOXXXXXX.X++.o ", " .XXXXXXOOOOXXXXXX.XX++.o ", " .XXXXXXOOO.XXXXXX.ooooooo ", " .XXXXX.OOO.XXXXXXX++++++o ", " .XXXXX.OOOXXXXXXXX++++++o ", " .XXXXXOOOOXXXXXXXXXOOO.+o ", " .XXXXXOOOOXXXXXXXX.OOOX+o ", " .XXXX.OOO.XXXXXXXXOOO.X+o ", " .XXXX.OOO.XXXXXXX.OO.XX+o ", " .XXXXOOOOXXXXXXX.OO.XXX+o ", " .XXXXOOOOXXXXX.OOXXXXXX+o ", " .XXX.OOOOOOOOO.XXXXXXXX+o ", " .XXX.OOOXXOOOOXXXXXXXXX+o ", " .XXXOOOOXXXOOO.XXXXXXXX+o ", " .XXXOOO.XXXOOOOXXXXXXXX+o ", " .XX.OOO.XXXXOOOOXXXXXXX+o ", " .XX.OOOXXXXXOOOOXXXXXXX+o ", " .XXOOOOXXXXXXOOOOXXXXXX+o ", " .X.OOO.XXXXXXOOOOXXXXXX+o ", " .X.OOO.XXXXXXXOOOOXXXXX+o ", " .XOOOOXXXXXXXX.OOO.XXXX+o ", " .XOOOOXXXXXXXXXOOOO.XXX+o ", " .OOOO.XXXXXXXXX.OOOOXXX+o ", " .OOOOOO.XXXXXX.OOOOOO.X+o ", " .XXXXXXXXXXXXXXXXXXXXXX+o ", " .+++++++++++++++++++++++o ", " ooooooooooooooooooooooooo "}; xfm-1.5.4/icons/application/x-object.xpm0000644000175000017500000000245010744136017015117 00000000000000/* XPM */ static char * dot_o_xpm[] = { "32 32 6 1", " s background c None", ". c #7DF77DF77DF7", "X c white", "o c black", "O c #BEFBBEFBBEFB", "+ c #820782078207", " .................. ", " .XXXXXXXXXXXXXXXX.o ", " .XXXXXXXXXXXXXXXX..o ", " .XXXXXXXXXXXXXXXX.O.o ", " .X.X.X.X.X.X.X.X..OO.o ", " .XX.X.X.X.X.X.X.X.XOO.o ", " .X.X.X.X.X.X.X.X..XXOO.o ", " .XX.X.X.X.X.X.X.X.ooooooo ", " .X.X.X.X.X.X.X.X.XOOOOOOo ", " .XX.X.X.X.X.X.X.X.OOOOOOo ", " .X.X.X.X.X.X.X.X.X+X.XXOo ", " .XX.X.X.X.X.X.X.X.X.XXXOo ", " .X.X.X.X.X.X.X.X.X+X.XXOo ", " .XX.X.X.X.X.X.X.X.X.XXXOo ", " .X.X.X.X.X.X.X.X.X.X.XXOo ", " .XX.X.X.X.X.X.X.X.X.XXXOo ", " .X.X.X.X.X.X.X.X.X.X.XXOo ", " .XX.X.X.X.X.X.X.X.X.XXXOo ", " .X.X.X.X.X.X.XXXXXXX.XXOo ", " .XX.X.X.X.X.XXooooXXXXXOo ", " .X.X.X.X.X.XooooooooXXXOo ", " .XX.X.X.X.XXoooXXoooXXXOo ", " .X.X.X.X.XXoooXXXXoooXXOo ", " .XX.X.X.X.XoooXXXXoooXXOo ", " .X.X.X.X.XXoooXXXXoooXXOo ", " .XX.X.X.X.XoooXXXXoooXXOo ", " .X.X.X.XXooXoooXXoooXXXOo ", " .XXXXXXXXooXooooooooXXXOo ", " .XXXXXXXXooXXXooooXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .OOOOOOOOOOOOOOOOOOOOOOOo ", " ooooooooooooooooooooooooo "}; xfm-1.5.4/icons/application/x-sharedlib.xpm0000644000175000017500000000245110744136017015607 00000000000000/* XPM */ static char * dot_so_xpm[] = { "32 32 6 1", " s background c None", ". c #7DF77DF77DF7", "X c white", "o c black", "O c #BEFBBEFBBEFB", "+ c #820782078207", " .................. ", " .XXXXXXXXXXXXXXXX.o ", " .XXXXXXXXXXXXXXXX..o ", " .XXXXXXXXXXXXXXXX.O.o ", " .X.X.X.X.X.X.X.X..OO.o ", " .XX.X.X.X.X.X.X.X.XOO.o ", " .X.X.X.X.X.X.X.X..XXOO.o ", " .XX.X.X.X.X.X.X.X.ooooooo ", " .X.X.X.X.X.X.X.X.XOOOOOOo ", " .XX.X.X.X.X.X.X.X.OOOOOOo ", " .X.X.X.X.X.X.X.X.X+X.XXOo ", " .XX.X.X.X.X.X.X.X.X.XXXOo ", " .X.X.X.X.X.X.X.X.X+X.XXOo ", " .XX.X.X.X.X.X.X.X.X.XXXOo ", " .X.X.X.X.X.X.X.X.X.X.XXOo ", " .XX.X.X.X.X.X.X.X.X.XXXOo ", " .X.X.X.X.X.X.X.X.X.X.XXOo ", " .XX.X.X.X.X.X.XXXXX.XXXOo ", " .X.X.XXXXXXX.XXXXXXX.XXOo ", " .XX.XXoooooXXXXooooXXXXOo ", " .XXXXoooooooXXooooooXXXOo ", " .XXXXoooXXooXoooXXoooXXOo ", " .XXXXooooXXXXoooXXoooXXOo ", " .XXXXXooooXXXoooXXoooXXOo ", " .XXXXXXooooXXoooXXoooXXOo ", " .XXXXXXXooooXoooXXoooXXOo ", " .XooXooXXoooXoooXXoooXXOo ", " .XooXoooooooXXooooooXXXOo ", " .XooXXoooooXXXXooooXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .OOOOOOOOOOOOOOOOOOOOOOOo ", " ooooooooooooooooooooooooo "}; xfm-1.5.4/icons/application/x-shellscript.xpm0000644000175000017500000000245610744136017016213 00000000000000/* XPM */ static char * script_file_xpm[] = { "32 32 6 1", " s background c None", ". c #7DF77DF77DF7", "X c white", "o c black", "O c #BEFBBEFBBEFB", "+ c #FFFFCF3C9A69", " .................. ", " .XXXXXXXXXXXXXXXX.o ", " .XXXXXXXXXXXXXXXX..o ", " .XXXXXXXXXXXXXXXX.O.o ", " .XXXXXXXXXXXXXXXX.OO.o ", " .XXXXXXXXXXXXXXXX.XOO.o ", " .XXXXXXXXXXXXXXXX.XXOO.o ", " .XXXXXXXXXXXXXXXX.ooooooo ", " .XXXXXXXXXXXXXXXXXOOOOOOo ", " .XXXXXXXXXXXXXXXXXOOOOOOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXoooXXXoooXXXXXXOo ", " .XXXXXXo+++ooo+++oXXXXXOo ", " .XXXooo+++++o+++++oooXXOo ", " .XXo++o+++++o+++++o++oXOo ", " .Xo++++o++++o++++o++++oOo ", " .Xo++++o++++o++++o++++oOo ", " .XXo++++o+++o+++o++++oXOo ", " .XXXo+++o+++o+++o+++oXXOo ", " .XXXXo+++o++o++o+++oXXXOo ", " .XXXXXo++o++o++o++oXXXXOo ", " .XXXXXXo+oo+o+oo+oXXXXXOo ", " .XXXXXXoo+++++++ooXXXXXOo ", " .XXXXXXo+++++++++oXXXXXOo ", " .XXXXXXoooooooooooXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .OOOOOOOOOOOOOOOOOOOOOOOo ", " ooooooooooooooooooooooooo "}; xfm-1.5.4/icons/application/x-iso9660.xpm0000644000175000017500000000254110744136017014771 00000000000000/* XPM */ static char * x_iso9660_xpm[] = { "32 32 10 1", " s background c None", ". c gray50", "X c white", "O c grey", "g c #808080", "Y c #ffff00", "G c #c0c0c0", "C c #00ffff", "+ c black", "@ c #00ff00", " .................. ", " .XXXXXXXXXXXXXXXX.+ ", " .XXX+XXXXXXXXXXXX..+ ", " .XXXXXXXXXXXXXXXX.O.+ ", " .XX++XXX+++XX++XX.OO.+ ", " .XXX+XX+XXXX+XX+X.XOO.+ ", " .XXX+XXX++XX+XX+X.XXOO.+ ", " .XXX+XXXXX+X+XX+X.+++++++ ", " .XX+++X+++XXX++XXXOOOOOO+ ", " .XXXXXXXXXXXXXXXXXOOOOOO+ ", " .XXXXXXXXXXXXXXXXXXXXXXO+ ", " .XXXXXXXXXXXXXXXXXXXXXXO+ ", " .XXXXXXXXXXXXXXXXXXXXXXO+ ", " .XXXXXXXXXXXXXXXXXXXXXXO+ ", " .XXXXXXXXXXXXXXXXXXXXXXO+ ", " .XXXXXXXXXXgggXXXXXXXXXO+ ", " .XXXXXXXXggYYGggXXXXXXXO+ ", " .XXXXXXXgCCYYGGG+XXXXXXO+ ", " .XXXXXXg@@CYYGGXG+XXXXXO+ ", " .XXXXXXgG@@g+gXGG+XXXXXO+ ", " .XXXXXXgGG@+X+GGG+XXXXXO+ ", " .XXXXXXgGGGg+gCGG+XXXXXO+ ", " .XXXXXXgGGGXGGYCC+XXXXXO+ ", " .XXXXXXXgGXGGG@Y+XXXXXXO+ ", " .XXXXXXXXggGGG++XXXXXXXO+ ", " .XXXXXXXXX+++++XXXXXXXXO+ ", " .XXXXXXXXXXXXXXXXXXXXXXO+ ", " .XXXXXXXXXXXXXXXXXXXXXXO+ ", " .XXXXXXXXXXXXXXXXXXXXXXO+ ", " .XXXXXXXXXXXXXXXXXXXXXXO+ ", " .OOOOOOOOOOOOOOOOOOOOOOO+ ", " +++++++++++++++++++++++++ "}; ; xfm-1.5.4/icons/application/x-tar.xpm0000644000175000017500000000241710744136017014442 00000000000000/* XPM */ static char *xfm_tar_xpm[] = { "32 32 6 1", " s background c None", ". c black", "X c white", "o c gray", "O c gray", "+ c black", " .................. ", " .XXXXXXXXXXXXXXXX.. ", " .XXXXXXXXXXXXXXXX.o. ", " .X.....X..XX...XX.oo. ", " .XXX.XX.XX.X.XX.X.ooo. ", " .XXX.XX.XX.X.XX.X.oooo. ", " .XXX.XX....X...XX.ooooo. ", " .XXX.XX.XX.X.X.XX.......+ ", " .XXX.XX.XX.X.XX.XXooooo.+ ", " .XXXXXXXXXXXXXXXXXXoooo.+ ", " .XXXXXXXXXXXXXXXXXXXXXX.+ ", " .X....................X.+ ", " .X.OOOOOOOOOOOOOOOOOO.X.+ ", " .X.OOOOOO........OOOO.X.+ ", " .X.OOOOO.OOOOOOOO.OOO.X.+ ", " .X.OOOO.OOOOOOOOO.OOO.X.+ ", " .X.OOOO.OOOOOOOOOO.OO.X.+ ", " .X.OOO.OOOOOOOOOOO.OO.X.+ ", " .X.OOO.OOOOOO.....O.O.X.+ ", " .X.OO.OOOOOO........O.X.+ ", " .X.OO.OOOOO.........O.X.+ ", " .X.O....OOO.........O.X.+ ", " .X.O.....OO....O....O.X.+ ", " .X.O..O..OO.........O.X.+ ", " .X.O.....OO.........O.X.+ ", " .X.OO...OOOO.......OO.X.+ ", " .X.OOOOOOOOOO.....OOO.X.+ ", " .X.OOOOOOOOOOOOOOOOOO.X.+ ", " .X....................X.+ ", " .XXXXXXXXXXXXXXXXXXXXXX.+ ", " ........................+ ", " ++++++++++++++++++++++++ "}; xfm-1.5.4/icons/application/x-texinfo.xpm0000644000175000017500000000244710744136017015333 00000000000000/* XPM */ static char * info_xpm[] = { "32 32 6 1", " s background c None", ". c #7DF77DF77DF7", "X c white", "o c black", "O c #BEFBBEFBBEFB", "+ c #00000000FFFF", " .................. ", " .XXXXXXXXXXXXXXXX.o ", " .XXXXXXXXXXXXXXXX..o ", " .XXXXXXXXXXXXXXXX.O.o ", " .XXXXXXXXXXXXXXXX.OO.o ", " .XXXXXXXXXXXXXXXX.XOO.o ", " .XXXXXXXXXXXXXXXX.XXOO.o ", " .XXXXXXXXXXXXXXXX.ooooooo ", " .XXXXXXXX++++++XXXOOOOOOo ", " .XXXXXX++++++++++XOOOOOOo ", " .XXXXX+++++XX+++++XXXXXOo ", " .XXXX+++++XXXX+++++XXXXOo ", " .XXX++++++XXXX++++++XXXOo ", " .XXX+++++++XX+++++++XXXOo ", " .XX++++++++++++++++++XXOo ", " .XX++++++XXXXX+++++++XXOo ", " .XX+++++++XXXX+++++++XXOo ", " .XX+++++++XXXX+++++++XXOo ", " .XX+++++++XXXX+++++++XXOo ", " .XX+++++++XXXX+++++++XXOo ", " .XXX++++++XXXX++++++XXXOo ", " .XXX+++++XXXXXX+++++XXXOo ", " .XXXX++++++++++++++XXXXOo ", " .XXXXX++++++++++++XXXXXOo ", " .XXXXXX++++++++++XXXXXXOo ", " .XXXXXXXX++++++XXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .OOOOOOOOOOOOOOOOOOOOOOOo ", " ooooooooooooooooooooooooo "}; xfm-1.5.4/icons/application/x-troff-man.xpm0000644000175000017500000000242510744136017015544 00000000000000/* XPM */ static char * manpage_xpm[] = { "32 32 5 1", " s background c None", ". c #7DF77DF77DF7", "X c white", "o c black", "O c #BEFBBEFBBEFB", " .................. ", " .XXXXXXXXXXXXXXXX.o ", " .XXXXXXXXXXXXXXXX..o ", " .XoooXXXXXXoooXXX.O.o ", " .XXXXXXXXXXXXXXXX.OO.o ", " .XXoooooXXXXXXXXX.XOO.o ", " .XXXXXXXXXXXXXXXX.XXOO.o ", " .XXXXooXoooXooooo.ooooooo ", " .XXXXXXXXXXXXXXXXXOOOOOOo ", " .XXooooXXXXXXXXXXXOOOOOOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXoooXoXoooXooXoooXXOo ", " .XXXXoXooXooXooXoXoooXXOo ", " .XXXXoooooXoXooXooXoXXXOo ", " .XXXXooXooXooXoXooXooXXOo ", " .XXXXoooooXoXooXooXooXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXoooooXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXooXoooXoooXoooXoXXOo ", " .XXXXoXooXoooXoooooooXXOo ", " .XXXXoooXooXoooXooXooXXOo ", " .XXXXooXoooXoooooooooXXOo ", " .XXXXooXooXoooXooXooXXXOo ", " .XXXXoooXooooXoooXoooXXOo ", " .XXXXoXoooXooXoooXoooXXOo ", " .XXXXoooXoooXooXooXoXXXOo ", " .XXXXooXoooooXooXooooXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .OOOOOOOOOOOOOOOOOOOOOOOo ", " ooooooooooooooooooooooooo "}; xfm-1.5.4/icons/application/x-uuencoded.xpm0000644000175000017500000000242010744136017015621 00000000000000/* XPM */ static char * uu_xpm[] = { "32 32 5 1", " s background c None", ". c #7DF77DF77DF7", "X c white", "o c black", "O c #BEFBBEFBBEFB", " .................. ", " .XXXXXXXXXXXXXXXX.o ", " .XXXXXXXXXXXXXXXX..o ", " .XXXXXXXXXXXXXXXX.O.o ", " .XXXXXXXXXXXXXXXX.OO.o ", " .XXXXXXXXXXXXXXXX.XOO.o ", " .XXXXXXXXXXXXXXXX.XXOO.o ", " .XXXXXXXXXXXXXXXX.ooooooo ", " .XXXXXXXXXXXXXXXXXOOOOOOo ", " .XXXXXXXXXXXXXXXXXOOOOOOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXooooXXoooooooXXoooXXOo ", " .XXXooXXXXoXXooXXXXoXXXOo ", " .XXXooXXXXoXXooXXXXoXXXOo ", " .XXXooXXXXoXXooXXXXoXXXOo ", " .XXXooXXXXoXXooXXXXoXXXOo ", " .XXXooXXXXoXXooXXXXoXXXOo ", " .XXXooXXXXoXXooXXXXoXXXOo ", " .XXXooXXXXoXXooXXXXoXXXOo ", " .XXXoooXXooXXoooXXooXXXOo ", " .XXXXoooooXXXXoooooXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .OOOOOOOOOOOOOOOOOOOOOOOo ", " ooooooooooooooooooooooooo "}; xfm-1.5.4/icons/application/x-xfig.xpm0000644000175000017500000000262010744136017014605 00000000000000/* XPM */ static char * fig_xpm[] = { "32 32 11 1", " s background c None", ". c #7DF77DF77DF7", "X c white", "o c black", "O c #FFFFFBEECF3C", "+ c #BEFBBEFBBEFB", "@ c #2CB28A285555", "# c #0000FFFF0000", "$ c #CF3C86173CF3", "% c #A28951442CB2", "& c #30C2CF3C30C2", " .................. ", " .XXXXXXXXXXXXXXXX.o ", " .ooooOoooOOooOOOO..o ", " .OoOOOOoOOoOOOOOO.+.o ", " .OoooOOoOOoOooOOO.++.o ", " .OoOOOOoOOoOOoOOO.X++.o ", " .ooOOOoooOOooOOOO.XX++.o ", " .OOOOOOOOOOOOOOOO.ooooooo ", " .OOOOOOOOOOOOOOOOO++++++o ", " .OOOOOOOOOOOOOOOOO++++++o ", " .OoooOOOOOOOOOOOOo@###X+o ", " .o$$$ooOOOOOOOOOoo####X+o ", " .o%%$$$oOOoooooo$$####X+o ", " .Oooo%%%oo$$$%%%%###ooX+o ", " .OOOOoo%%%%%%ooo###o##X+o ", " .OOOOOoooooOo@##o#o###X+o ", " .OOOOOOo&oOo@#oo######X+o ", " .OOOOOOo&&Oo#o####o#o#X+o ", " .OOOOOOo&oOo##ooo#o##oX+o ", " .OOOOOo&&oOo#oOOo#o###X+o ", " .OOOOo@&&oOoooOo##o###X+o ", " .OOOo@@&&oOOOOOo#o####X+o ", " .OOo@@@&&&oOOOo###ooo#X+o ", " .Oo@@@&&&&oOOo###oOOo#X+o ", " .Oo@@&&&&&oOOo###oOOo#X+o ", " .o@@ooo&&&&oOo###oOo##X+o ", " .o@@@&&&o&&oOo##oOOo##X+o ", " .o@@@&&&&&&oOoooOOOo##X+o ", " .o@oooo&&&&oOOOOOOOo##X+o ", " .o@@@&&o&&&&oOOOOOOo##X+o ", " .+++++++++++++++++++++++o ", " ooooooooooooooooooooooooo "}; xfm-1.5.4/icons/application/x-zoo.xpm0000644000175000017500000000252010744136017014456 00000000000000/* XPM */ static char * zoo_xpm[] = { "32 32 8 1", " s background c None", ". c #7DF77DF77DF7", "X c white", "o c black", "O c #BEFBBEFBBEFB", "+ c #8617CF3CEBAD", "@ c #0000FFFF0000", "# c #D34CB6DA8E38", " .................. ", " .XXXXXXXXXXXXXXXX.o ", " .oooooXXooXXXooXX..o ", " .XXXooXoXXoXoXXoX.O.o ", " .XXooXXoXXoXoXXoX.OO.o ", " .XooXXXoXXoXoXXoX.XOO.o ", " .ooXXXXoXXoXoXXoX.XXOO.o ", " .oooooXXooXXXooXX.ooooooo ", " .XXXXXXXXXXXXXXXXXOOOOOOo ", " .XXXXXXXXXXXXXXXXXOOOOOOo ", " .XXXXXXXooooXXXXXXXXXXXOo ", " .XXXXXXXXo++oXXooXXXXXXOo ", " .XXXXXXXXXo++ooo+oXXXXXOo ", " .XXXXXoooooo+++++ooXXXXOo ", " .XXXXXXo+++++++ooXXXXXXOo ", " .XXXXXXXoooo+ooXXXXXXXXOo ", " .XXXXXXXXXXXooXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXoXXXXXXoooXXXXOo ", " .oXXXXXXXoXXXXoo@ooooXXOo ", " .ooXXXXXooXXXXo@@oo@ooXOo ", " .XooXXXooXXXXoo@@@@oooXOo ", " .XoooXoooXXXXo@@oooooXXOo ", " .XXoooooXXXXXo@@oXXXXXXOo ", " .XXoooooXXXXXo@@oXXXXXXOo ", " .XXXo###oooXXo@@oXXXXXXOo ", " .oooo##o###oXo@@oXXXXXXOo ", " .#########ooXo@@oXXXXXXOo ", " .######oooXXXo@@oXXXXXXOo ", " .######oXXXXXo@@oXXXXXXOo ", " .OOOOOOOOOOOOOOOOOOOOOOOo ", " ooooooooooooooooooooooooo "}; xfm-1.5.4/icons/application/x-xfm.xpm0000644000175000017500000000247210744136017014447 00000000000000/* XPM */ static char * x_xfm_xpm[] = { "32 32 9 1", " c None", ". c #7F7F7F", "+ c #FFFFFF", "@ c #000000", "# c #BEBEBE", "$ c #808000", "% c #C0C0C0", "& c #808080", "* c #FFFF00", " .................. ", " .++++++++++++++++.@ ", " .++++++++++++++++..@ ", " .++++++++++++++++.#.@ ", " .++++++++$$$$@+++.##.@ ", " .+++++++$%$$$$@++.+##.@ ", " .++++++$%@@@@$&@+$$$$$$@ ", " .++++++$%@+++$&@$@*+*$$@@ ", " .++++++$%@$$$$&@%$@$@@@@@ ", " .$$$$$$$%@*++*@@@%$@$@$@@ ", " $$$$@&%%+$$@$@@@@@&@%$@$@$@@ ", " @$$*%$@$$@@@@@&@&@&@&@%$@$@$@@ ", "$$@$@@%$@@&@&@&@&@&@&@&@%$@$@$$@", "$+$@$@@%$@@&@&@&@&@&@&$&@%$@$$$@", "$+%$@$@@%$@@&@&@&$&$&$&$&@%%@$$@", "$+$%$@$@@%$@@&$&$&$&$&$%$%+%@$$@", "$+%$%$@&&@%$@$&$&$%$%$%$%$+%@$$@", "$+$%$%+$&$@%$@$%$%$%$%$%$%+%@&$@", "$+%$%$+&$&$+%@%$%$%$%$%$%$+%@$$@", "$+$%$%+$%$%+%@$%$%$%$&$&$&+%@&$@", "$+%$%$+%$%$+%@%$&$&$&$&$&$+%@$$@", "$+$%$%+$%$%+%@$&$&$&$&$&$&+%@&$@", "$+%$%$+%$&$+%@&$&$&$&$&$&$&%$@$@", "$+$%$%+$&$&+%@$&$&$&$&$&$&$@@@$@", "$+%$%$+&$&$+%@&$&$&$&$&$&$+%@$$@", "$+$%$%+$&$&$+$@&$&$&$&$&$&+%@$@@", "$$%$%$+&$&$$@@@$&$&$&$$$$$@@@@ ", " @$%$%+$&$&+%@$&$$$$$$@@@@+#@ ", " @$%$+&$&$+%@$$$@@@@@+++++#@ ", " @$%+$&$&+%@@@@++++++++++#@ ", " @$$$@@@@@###############@ ", " @@@@@@@@@@@@@@@@@@@@@@@@@ "}; xfm-1.5.4/icons/application/vnd.sun.xml.calc.xpm0000644000175000017500000000243610744136017016503 00000000000000/* XPM */ static char * vnd_sun_xml_calc_xpm[] = { "32 32 5 1", " s background c None", ". c #7DF77DF77DF7", "X c white", "o c black", "O c #BEFBBEFBBEFB", " .................. ", " .XXXXXXXXXXXXXXXX.o ", " .XXXXXXXXXXXXXXXX..o ", " .XXXXXXXXXXXXXXXX.O.o ", " .XXXXXXXXXXXXXXXX.OO.o ", " .XXXXXXXXXXXooXXX.XOO.o ", " .XXXXXXXXXXooXXXX.XXOO.o ", " .XXXXXXXXooooXXXX.ooooooo ", " .XXXXXXoooooXXXXXXOOOOOOo ", " .XXXXXooXXXXXXXXXXOOOOOOo ", " .XXXXXXXXXXoooXXXXXXXXXOo ", " .XXXXXXXXXoooXXXXXXXXXXOo ", " .XXXXXXXXoooXXXXXXXXXXXOo ", " .XXXXXXXoooXXXXXXXXXXXXOo ", " .XXXXXoOooXXXXXXXXXXXXXOo ", " .XXXooooooXXXXXXXXXXXXXOo ", " .XXoooXXXXXXXXXXXXXXXXXOo ", " .XooXXXXXXXXXXXXXXXXXXXOo ", " .XoXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXoooooooooooooooXXOo ", " .XXXXXo.....o.....o..XXOo ", " .XXXXXo.....o.....o..XXOo ", " .XXXXXoooooooooooooooXXOo ", " .XXXXXoXXXXXoXXXXXoXXXXOo ", " .XXXXXoXXXXXoXXXXXoXXXXOo ", " .XXXXXoooooooooooooooXXOo ", " .XXXXXoXXXXXoXXXXXoXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .OOOOOOOOOOOOOOOOOOOOOOOo ", " ooooooooooooooooooooooooo "}; xfm-1.5.4/icons/application/vnd.sun.xml.draw.xpm0000644000175000017500000000247610744136017016542 00000000000000/* XPM */ static char * vnd_sun_xml_draw_xpm[] = { "32 32 7 1", " s background c None", ". c #7DF77DF77DF7", "X c white", "o c black", "O c #BEFBBEFBBEFB", "+ c skyblue", "@ c lightgray", " .................. ", " .XXXXXXXXXXXXXXXX.o ", " .XXXXXXXXXXXXXXXX..o ", " .XXXXXXXXXXXXXXXX.O.o ", " .XXXXXXXXXXXXXXXX.OO.o ", " .XXXXXXXXXXXooXXX.XOO.o ", " .XXXXXXXXXXooXXXX.XXOO.o ", " .XXXXXXXXooooXXXX.ooooooo ", " .XXXXXXoooooXXXXXXOOOOOOo ", " .XXXXXooXXXXXXXXXXOOOOOOo ", " .XXXXXXXXXXoooXXXXXXXXXOo ", " .XXXXXXXXXoooXXXXXXXXXXOo ", " .XXXXXXXXoooXXXXXXXXXXXOo ", " .XXXXXXXoooXXXXXXXXXXXXOo ", " .XXXXXoOooXXXoooooooXXXOo ", " .XXXooooooXXXo+++++oXXXOo ", " .XXoooXXXXXXXo+++++oXXXOo ", " .XooXXXXXXXXXo+++++oXXXOo ", " .XoXXXXXXXXXXoooooooXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXoXXXXXXOo ", " .XXXXXXXXXXXXXXoooXXXXXOo ", " .XXXXXXXXXXXXXoooooXXXXOo ", " .XXXXXXXXXXXXXXXoXXXXXXOo ", " .XXXoooooXXXXXXXoXXXXXXOo ", " .XXXo@@@oXoooooooXXXXXXOo ", " .XXXo@@@oXXXXXXXXXXXXXXOo ", " .XXXoooooXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .OOOOOOOOOOOOOOOOOOOOOOOo ", " ooooooooooooooooooooooooo "}; xfm-1.5.4/icons/application/vnd.sun.xml.impress.xpm0000644000175000017500000000244710744136017017265 00000000000000/* XPM */ static char * vnd_sun_xml_writer_global_xpm[] = { "32 32 5 1", " s background c None", ". c #7DF77DF77DF7", "X c white", "o c black", "O c #BEFBBEFBBEFB", " .................. ", " .XXXXXXXXXXXXXXXX.o ", " .XXXXXXXXXXXXXXXX..o ", " .XXXXXXXXXXXXXXXX.O.o ", " .XXXXXXXXXXXXXXXX.OO.o ", " .XXXXXXXXXXXooXXX.XOO.o ", " .XXXXXXXXXXooXXXX.XXOO.o ", " .XXXXXXXXooooXXXX.ooooooo ", " .XXXXXXoooooXXXXXXOOOOOOo ", " .XXXXXooXXXXXXXXXXOOOOOOo ", " .XXXXXXXXXXoooXXXXXXXXXOo ", " .XXXXXXXXXoooXXXXXXXXXXOo ", " .XXXXXXXXoooXXXXXXXXXXXOo ", " .XXXXXXXoooXXXXXXXXXXXXOo ", " .XXXXXoOooXXXXXXXXXXXXXOo ", " .XXXooooooXXXXXXXXXXXXXOo ", " .XXoooXXXXXXXXXXXXXXXXXOo ", " .XooXXXXXXXXXXXXXXXXXXXOo ", " .XoXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .OOOOOOOOOOOOOOOOOOOOOOOo ", " ooooooooooooooooooooooooo "}; xfm-1.5.4/icons/application/vnd.sun.xml.math.xpm0000644000175000017500000000243610744136017016532 00000000000000/* XPM */ static char * vnd_sun_xml_math_xpm[] = { "32 32 5 1", " s background c None", ". c #7DF77DF77DF7", "X c white", "o c black", "O c #BEFBBEFBBEFB", " .................. ", " .XXXXXXXXXXXXXXXX.o ", " .XXXXXXXXXXXXXXXX..o ", " .XXXXXXXXXXXXXXXX.O.o ", " .XXXXXXXXXXXXXXXX.OO.o ", " .XXXXXXXXXXXooXXX.XOO.o ", " .XXXXXXXXXXooXXXX.XXOO.o ", " .XXXXXXXXooooXXXX.ooooooo ", " .XXXXXXoooooXXXXXXOOOOOOo ", " .XXXXXooXXXXXXXXXXOOOOOOo ", " .XXXXXXXXXXoooXXXXXXXXXOo ", " .XXXXXXXXXoooXXXXXXXXXXOo ", " .XXXXXXXXoooXXXXXXXXXXXOo ", " .XXXXXXXoooXXXXXXXXXXXXOo ", " .XXXXXoOooXXXXXXXXXXXXXOo ", " .XXXooooooXXXXXXXXXXXXXOo ", " .XXoooXXXXXXXXXXXXXXXXXOo ", " .XooXXXXXXXXXXXXXXXXXXXOo ", " .XoXXXXXooooooooooXXXXXOo ", " .XXXXXXXXooXXXXXooXXXXXOo ", " .XXXXXXXXXooXXXXXXXXXXXOo ", " .XXXXXXXXXXooXXXXXXXXXXOo ", " .XXXXXXXXXXXooXXXXXXXXXOo ", " .XXXXXXXXXXooXXXXXXXXXXOo ", " .XXXXXXXXXooXXXXXXXXXXXOo ", " .XXXXXXXXooXXXXXooXXXXXOo ", " .XXXXXXXooooooooooXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .OOOOOOOOOOOOOOOOOOOOOOOo ", " ooooooooooooooooooooooooo "}; xfm-1.5.4/icons/application/vnd.sun.xml.writer.xpm0000644000175000017500000000244010744136017017110 00000000000000/* XPM */ static char * vnd_sun_xml_writer_xpm[] = { "32 32 5 1", " s background c None", ". c #7DF77DF77DF7", "X c white", "o c black", "O c #BEFBBEFBBEFB", " .................. ", " .XXXXXXXXXXXXXXXX.o ", " .XXXXXXXXXXXXXXXX..o ", " .XXXXXXXXXXXXXXXX.O.o ", " .XXXXXXXXXXXXXXXX.OO.o ", " .XXXXXXXXXXXooXXX.XOO.o ", " .XXXXXXXXXXooXXXX.XXOO.o ", " .XXXXXXXXooooXXXX.ooooooo ", " .XXXXXXoooooXXXXXXOOOOOOo ", " .XXXXXooXXXXXXXXXXOOOOOOo ", " .XXXXXXXXXXoooXXXXXXXXXOo ", " .XXXXXXXXXoooXXXXXXXXXXOo ", " .XXXXXXXXoooXXoXoooXoXXOo ", " .XXXXXXXoooXXXXXXXXXXXXOo ", " .XXXXXoOooXXXooooXoooXXOo ", " .XXXooooooXXXXXXXXXXXXXOo ", " .XXoooXXXXXXoooXXooooXXOo ", " .XooXXXXXXXXXXXXXXXXXXXOo ", " .XoXXXooooXoooXooXoooXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXooooXoooooXooooXoXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXooooXoooXooXoooXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXooooXoooXoooXooooXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXoooXoooooXooooXooXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .OOOOOOOOOOOOOOOOOOOOOOOo ", " ooooooooooooooooooooooooo "}; xfm-1.5.4/icons/application/vnd.sun.xml.writer.global.xpm0000644000175000017500000000244710744136017020356 00000000000000/* XPM */ static char * vnd_sun_xml_writer_global_xpm[] = { "32 32 5 1", " s background c None", ". c #7DF77DF77DF7", "X c white", "o c black", "O c #BEFBBEFBBEFB", " .................. ", " .XXXXXXXXXXXXXXXX.o ", " .XXXXXXXXXXXXXXXX..o ", " .XXXXXXXXXXXXXXXX.O.o ", " .XXXXXXXXXXXXXXXX.OO.o ", " .XXXXXXXXXXXooXXX.XOO.o ", " .XXXXXXXXXXooXXXX.XXOO.o ", " .XXXXXXXXooooXXXX.ooooooo ", " .XXXXXXoooooXXXXXXOOOOOOo ", " .XXXXXooXXXXXXXXXXOOOOOOo ", " .XXXXXXXXXXoooXXXXXXXXXOo ", " .XXXXXXXXXoooXXXXXXXXXXOo ", " .XXXXXXXXoooXXXXXXXXXXXOo ", " .XXXXXXXoooXXXXXXXXXXXXOo ", " .XXXXXoOooXXXXXXXXXXXXXOo ", " .XXXooooooXXXXXXXXXXXXXOo ", " .XXoooXXXXXXXXXXXXXXXXXOo ", " .XooXXXXXXXXXXXXXXXXXXXOo ", " .XoXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .OOOOOOOOOOOOOOOOOOOOOOOo ", " ooooooooooooooooooooooooo "}; xfm-1.5.4/icons/text/0000777000175000017500000000000010744136017011422 500000000000000xfm-1.5.4/icons/text/default.xpm0000644000175000017500000000243010744136017013507 00000000000000/* XPM */ static char * paragraphs_xpm[] = { "32 32 5 1", " s background c None", ". c #7DF77DF77DF7", "X c white", "o c black", "O c #BEFBBEFBBEFB", " .................. ", " .XXXXXXXXXXXXXXXX.o ", " .XXXXXXXXXXXXXXXX..o ", " .XXXXXXXXXXXXXXXX.O.o ", " .XXXXXXXXXXXXXXXX.OO.o ", " .XXXXXoooXooooXoo.XOO.o ", " .XXXXXXXXXXXXXXXX.XXOO.o ", " .XXXoooXoooXooooo.ooooooo ", " .XXXXXXXXXXXXXXXXXOOOOOOo ", " .XXXoooooXooooooXoOOOOOOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXoooXoooXoooXooooXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXooooXooooXoooooXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXooooXooooXooooXooXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXooXooooXooooXooooXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXooooXoooooXooooXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXooooXoooXooXoooXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXooooXoooXoooXooooXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXoooXoooooXooooXooXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .OOOOOOOOOOOOOOOOOOOOOOOo ", " ooooooooooooooooooooooooo "}; xfm-1.5.4/icons/text/html.xpm0000644000175000017500000000247410744136017013037 00000000000000/* XPM */ static char * html_xpm[] = { "32 32 7 1", " s background c None", ". c #7DF77DF77DF7", "X c white", "o c black", "O c #BEFBBEFBBEFB", "+ c #00000000FFFF", "@ c #D34CB6DA8E38", " .................. ", " .XXXXXXXXXXXXXXXX.o ", " .XXXXXXXXXXXXXXXX..o ", " .XXXXXXXXXXXXXXoX.O.o ", " .XXXXXooooooooooX.OO.o ", " .XXXXoooooooooooX.XOO.o ", " .XXXoooXXXXXXXXoX.XXOO.o ", " .XXXooXXXXXXXXXXX.ooooooo ", " .XXXooXXXXXXXXXXXXOOOOOOo ", " .XXXoooXXXooooXXXXOOOOOOo ", " .XXXXooXoo+@@+ooXXXXXXXOo ", " .XXXXXXo@@@+@@++oXXXXXXOo ", " .XXXXXo+@@@@@+@++oXXXXXOo ", " .XXXXXo++@@@+@@++oXXXXXOo ", " .XXXXo+++@@@@@++++oXXXXOo ", " .XXXXo+++@@@@@++++oXXXXOo ", " .XXXXo++++@@@@++++oXXXXOo ", " .XXXXo+++++@@+++++oXXXXOo ", " .XXXXXo+++++@@@@+oXXXXXOo ", " .XXXXXo+++++@@@@+oXXXXXOo ", " .XXXXXXo+++++@@+oXXXXXXOo ", " .XXXXXXXoo+++@@oXooXXXXOo ", " .XXXXXXXXXoooooXXoooXXXOo ", " .XXXXXXXXXXXXXXXXXooXXXOo ", " .XXXXXXXXXXXXXXXXXooXXXOo ", " .XXXXooXXXXXXXXXXoooXXXOo ", " .XXXoooooooooooooooXXXXOo ", " .XXXooooooooooooooXXXXXOo ", " .XXXXooXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .OOOOOOOOOOOOOOOOOOOOOOOo ", " ooooooooooooooooooooooooo "}; xfm-1.5.4/icons/text/x-chdr.xpm0000644000175000017500000000245010744136017013252 00000000000000/* XPM */ static char * dot_h_xpm[] = { "32 32 6 1", " s background c None", ". c #7DF77DF77DF7", "X c white", "o c black", "O c #BEFBBEFBBEFB", "+ c #71C682079248", " .................. ", " .XXXXXXXXXXXXXXXX.o ", " .XXXXXXXXXXXXXXXX..o ", " .XXXXXXXXXXXXXXXX.O.o ", " .X++++++++++++XXX.OO.o ", " .XXXXXXXXXXXXXXXX.XOO.o ", " .X++++++++++++XXX.XXOO.o ", " .XXXXXXXXXXXXXXXX.ooooooo ", " .XXXXX++++++XXXXXXOOOOOOo ", " .XXXXXXXXXXXXXXXXXOOOOOOo ", " .XXXXX++++++++XXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXX+++++++XXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXX+++++++++XXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXX++++++XoooXXXXXXXOo ", " .XXXXXXXXXXXXoooXXXXXXXOo ", " .XXXXX++++++XoooXXXXXXXOo ", " .XXXXXXXXXXXXoooooooXXXOo ", " .XXXXXXXXX++XooooooooXXOo ", " .XXXXXXXXXXXXooooXooooXOo ", " .X+++++++++XXoooXXXoooXOo ", " .XXXXXXXXXXXXoooXXXoooXOo ", " .XXXXX+++++XXoooXXXoooXOo ", " .XXXXXXXXXXXXoooXXXoooXOo ", " .XXXXX+++XooXoooXXXoooXOo ", " .XXXXXXXXXooXoooXXXoooXOo ", " .XXXXXXXXXooXoooXXXoooXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .OOOOOOOOOOOOOOOOOOOOOOOo ", " ooooooooooooooooooooooooo "}; xfm-1.5.4/icons/text/x-csrc.xpm0000644000175000017500000000245010744136017013264 00000000000000/* XPM */ static char * dot_c_xpm[] = { "32 32 6 1", " s background c None", ". c #7DF77DF77DF7", "X c white", "o c black", "O c #BEFBBEFBBEFB", "+ c #71C682079248", " .................. ", " .XXXXXXXXXXXXXXXX.o ", " .XXXXXXXXXXXXXXXX..o ", " .XXXXXXXXXXXXXXXX.O.o ", " .X++++++++++++XXX.OO.o ", " .XXXXXXXXXXXXXXXX.XOO.o ", " .X++++++++++++XXX.XXOO.o ", " .XXXXXXXXXXXXXXXX.ooooooo ", " .XXXXX++++++XXXXXXOOOOOOo ", " .XXXXXXXXXXXXXXXXXOOOOOOo ", " .XXXXX++++++++XXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXX+++++++XXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXX+++++++++XXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXX+++++++++XXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXX++++++++XXXXXXXXXOo ", " .XXXXXXXXXXXXXXooooXXXXOo ", " .XXXXXXXXX++XooooooooXXOo ", " .XXXXXXXXXXXXoooXXoooXXOo ", " .X+++++++++XoooXXXXXXXXOo ", " .XXXXXXXXXXXoooXXXXXXXXOo ", " .XXXXX+++++XoooXXXXXXXXOo ", " .XXXXXXXXXXXoooXXXXXXXXOo ", " .XXXXX+++XooXoooXXoooXXOo ", " .XXXXXXXXXooXooooooooXXOo ", " .XXXXXXXXXooXXXooooXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .OOOOOOOOOOOOOOOOOOOOOOOo ", " ooooooooooooooooooooooooo "}; xfm-1.5.4/icons/text/x-c++src.xpm0000644000175000017500000000245110744136017013413 00000000000000/* XPM */ static char * dot_cc_xpm[] = { "32 32 6 1", " s background c None", ". c #7DF77DF77DF7", "X c white", "o c black", "O c #BEFBBEFBBEFB", "+ c #71C682079248", " .................. ", " .XXXXXXXXXXXXXXXX.o ", " .XXXXXXXXXXXXXXXX..o ", " .XXXXXXXXXXXXXXXX.O.o ", " .X++++++++++++XXX.OO.o ", " .XXXXXXXXXXXXXXXX.XOO.o ", " .X++++++++++++XXX.XXOO.o ", " .XXXXXXXXXXXXXXXX.ooooooo ", " .XXXXX++++++XXXXXXOOOOOOo ", " .XXXXXXXXXXXXXXXXXOOOOOOo ", " .XXXXX++++++++XXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXX+++++++XXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXX+++++++++XXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXX+++++++++XXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXX++++++++XXXXXXXXXOo ", " .XXXXXXooooXXXXXooooXXXOo ", " .XXXXooooooooXooooooooXOo ", " .XXXXoooXXoooXoooXXoooXOo ", " .XXXoooXXXXXXoooXXXXXXXOo ", " .XXXoooXXXXXXoooXXXXXXXOo ", " .XXXoooXXXXXXoooXXXXXXXOo ", " .XXXoooXXXXXXoooXXXXXXXOo ", " .XooXoooXXoooXoooXXoooXOo ", " .XooXooooooooXooooooooXOo ", " .XooXXXooooXXXXXooooXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .OOOOOOOOOOOOOOOOOOOOOOOo ", " ooooooooooooooooooooooooo "}; xfm-1.5.4/icons/text/x-diff.xpm0000644000175000017500000000247410744136017013250 00000000000000/* XPM */ static char * diff_xpm[] = { "32 32 7 1", " s background c None", ". c #7DF77DF77DF7", "X c white", "o c black", "O c #BEFBBEFBBEFB", "+ c #000000008207", "@ c #FFFF00000000", " .................. ", " .XXXXXXXXXXXXXXXX.o ", " .XXXXXXXXXXXXXXXX..o ", " .XXXXXXXXXXXXXXXX.O.o ", " .XXXXXXXXXXXXXXXX.OO.o ", " .XXXXXXXXXXXXXXXX.XOO.o ", " .XXXXXXXXXXXXXXXX.XXOO.o ", " .XX+++++XXoXX++@X.ooooooo ", " .XXXXXXXXXoXXXXXXXOOOOOOo ", " .XX+++X++XoXX+X@+XOOOOOOo ", " .XXXXXXXXXoXXXXXXXXXXXXOo ", " .XX++X++XXoXX+@@X++XXXXOo ", " .XXXXXXXXXoXXXXXXXXXXXXOo ", " .XX+++XXXXoXX@@@XXXXXXXOo ", " .XXXXXXXXXoXXXXXXXXXXXXOo ", " .XX++++X+XoXX+@@XX++XXXOo ", " .XXXXXXXXXoXXXXXXXXXXXXOo ", " .XX+++XX+XoXX++XX@@@XXXOo ", " .XXXXXXXXXoXXXXXXXXXXXXOo ", " .XXXXXXXXXoXXXXXXXXXXXXOo ", " .XXXXXXXXXoXXXXXXXXXXXXOo ", " .XXXXXXXXXoXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXX+++XX+X+++X+++XXXXOo ", " .XXXX+XX+X+X+XXX+XXXXXXOo ", " .XXXX+XX+X+X++XX++XXXXXOo ", " .XXXX+XX+X+X+XXX+XXXXXXOo ", " .XXXX@@@XX@X@XXX@XXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .OOOOOOOOOOOOOOOOOOOOOOOo ", " ooooooooooooooooooooooooo "}; xfm-1.5.4/icons/text/x-makefile.xpm0000644000175000017500000000243710744136017014114 00000000000000/* XPM */ static char *xfm_make_xpm[] = { "32 32 7 1", " s background c None", ". c black", "X c white", "o c gray", "O c gray", "+ c #5f9ea0", "# c black", " .................. ", " .XXXXXXXXXXXXXXXX.. ", " .XXXXXX...XXXXXXX.o. ", " .XXXX... ...XXXXX.oo. ", " .XXXX.OO.OO.XXXXX.ooo. ", " .XXX..O...O..XXXX.oooo. ", " .XXX.OO.OOOO.XXXX.ooooo. ", " .XXX..OO.OO..XXXX.......# ", " .XXXX.OOOOO....XXXooooo.# ", " .XXXX...O....+.XX.Xoooo.# ", " .XXXXXX...+.+++..+.XXXX.# ", " .XXXXXX.++++++++++..XXX.# ", " .XXXXXXX.+++...+++.XXXX.# ", " .XXXXXXX.++.+.X.++.XXXX.# ", " .XXXXX..++.+.XXX.++..XX.# ", " .XXXXX.+++..XXXX.+++.XX.# ", " .XXXXX...+.+.XXX.+...XX.# ", " .XXXXXXX.++.+.X.++.XXXX.# ", " .XXXXXXX.+++...+++.XXXX.# ", " .XXXXXX.+++++++++++.XXX.# ", " .XXXXXX..+..++.....XXXX.# ", " .XXXX...O...++.XX.XXXXX.# ", " .XXXX.OO.OO....XXXXXXXX.# ", " .XXX..O...O..XXXXXXXXXX.# ", " .XXX.OO.OOOO.XXXXXXXXXX.# ", " .XXX..OO.OO..XXXXXXXXXX.# ", " .XXXX.OOOOO.XXXXXXXXXXX.# ", " .XXXX...O...XXXXXXXXXXX.# ", " .XXXXXX...XXXXXXXXXXXXX.# ", " .XXXXXXXXXXXXXXXXXXXXXX.# ", " ........................# ", " ######################## "}; xfm-1.5.4/icons/text/x-tex.xpm0000644000175000017500000000241610744136017013134 00000000000000/* XPM */ static char *x_tex_xpm[] = { "32 32 6 1", " s background c None", ". c black", "X c white", "o c gray", "O c black", "+ c black", " .................. ", " .XXXXXXXXXXXXXXXX.. ", " .XXXXXXXXXXXXXXXX.o. ", " .XXXXXXXXXXXXXXXX.oo. ", " .XXOOOXOOOOXOOXXX.ooo. ", " .XXXXXXXXXXXXXXXX.oooo. ", " .XXOXOOOOOOXOOXXX.ooooo. ", " .XXXXXXXXXXXXXXXX.......+ ", " .XXXXXXXOOOXOOOOXXooooo.+ ", " .XXXXXXXXXXXXXXXXXXoooo.+ ", " .XXXXXXXOOXOOOOOXOOOXXX.+ ", " .XXXXXXXXXXXXXXXXXXXXXX.+ ", " .XXOOOXOOOOOOOXXOOOOXXX.+ ", " .XXXXXXXXXXXXXXXXXXXXXX.+ ", " .XXOOOOXOOOOOOXXOOOOXXX.+ ", " .XXXXXXXXXXXXXXXXXXXXXX.+ ", " .XXXXXXXOOOXOOOXOOOOXXX.+ ", " .XXXXXXXXXXXXXXXXXXXXXX.+ ", " .XXXXXXXOOOOOOXXXXXXXXX.+ ", " .XXXXXXXXXXXXXXXXXXXXXX.+ ", " .XX.......XXXXX...X...X.+ ", " .XX.XX.XX.XXXXXX.XXX.XX.+ ", " .XXXXX.XXX.....XX.X.XXX.+ ", " .XXXXX.XXX.XXX.XXX.XXXX.+ ", " .XXXXX.XXX.XXXXXX.X.XXX.+ ", " .XXXXX.XXX....XX.XXX.XX.+ ", " .XXXX...XX.XXXX...X...X.+ ", " .XXXXXXXXX.XXX.XXXXXXXX.+ ", " .XXXXXXXXX.....XXXXXXXX.+ ", " .XXXXXXXXXXXXXXXXXXXXXX.+ ", " ........................+ ", " ++++++++++++++++++++++++ "}; xfm-1.5.4/icons/text/x-xfm.xpm0000644000175000017500000000256210744136017013130 00000000000000/* XPM */ static char * xfm_appmgr_xpm[] = { /* width height num_colors chars_per_pixel */ "32 32 7 1", /* colors */ " s background c None", ". c #808000", "X c black", "o c #c0c0c0", "O c #808080", "+ c #ffff00", "@ c white", /* pixels */ " ", " ", " ....X ", " .o....X ", " .oXXXX.OX ......X ", " .oX .OX.X+@+..X ", " .oX....OXo.X.XXXX ", " .......oX+@@+XXXo.X.X.XX ", " ....XOoo@..X.XXXXXOXo.X.X.XX ", " X..+o.X..XXXXXOXOXOXOXo.X.X.XX ", "..X.XXo.XXOXOXOXOXOXOXOXo.X.X..X", ".@.X.XXo.XXOXOXOXOXOXO.OXo.X...X", ".@o.X.XXo.XXOXOXO.O.O.O.OXooX..X", ".@.o.X.XXo.XXO.O.O.O.O.o.o@oX..X", ".@o.o.XOOXo.X.O.O.o.o.o.o.@oX..X", ".@.o.o@.O.Xo.X.o.o.o.o.o.o@oXO.X", ".@o.o.@O.O.@oXo.o.o.o.o.o.@oX..X", ".@.o.o@.o.o@oX.o.o.o.O.O.O@oXO.X", ".@o.o.@o.o.@oXo.O.O.O.O.O.@oX..X", ".@.o.o@.o.o@oX.O.O.O.O.O.O@oXO.X", ".@o.o.@o.O.@oXO.O.O.O.O.O.Oo.X.X", ".@.o.o@.O.O@oX.O.O.O.O.O.O.XXX.X", ".@o.o.@O.O.@oXO.O.O.O.O.O.@oX..X", ".@.o.o@.O.O.@.XO.O.O.O.O.O@oX.XX", "..o.o.@O.O..XXX.O.O.O.....XXXX ", " X.o.o@.O.O@oX.O......XXXX ", " X.o.@O.O.@oX...XXXXX ", " X.o@.O.O@oXXXX ", " X...XXXXX ", " XXX ", " ", " "}; xfm-1.5.4/icons/image/0000777000175000017500000000000010744136017011520 500000000000000xfm-1.5.4/icons/image/gif.xpm0000644000175000017500000000267210744136017012736 00000000000000/* XPM */ static char * gif_xpm[] = { "32 32 13 1", " s background c None", ". c #7DF77DF77DF7", "X c white", "o c black", "O c #0000FFFFFFFF", "+ c #BEFBBEFBBEFB", "@ c #2CB28A285555", "# c #30C2CF3C30C2", "$ c #FFFF00000000", "% c #9A69FBEE9A69", "& c #DF7DDF7DDF7D", "* c #A28951442CB2", "= c #FFFFA6990000", " .................. ", " .XXXXXXXXXXXXXXXX.o ", " .OOOOOOOOOOOOOOOO..o ", " .OOOoooOOoOooooOO.+.o ", " .OOoOOOoOoOoOOOOO.++.o ", " .OOoOOOOOoOoooOOO.X++.o ", " .OOoOOooOoOoOOOOO.XX++.o ", " .OOoOOOoOoOoOOOOO.ooooooo ", " .OOOoooOOoOoOOOOOO++++++o ", " .OOOOOOOOOOOOOOOOO++++++o ", " .OOOOOOOOOOOOOOOOOOOOOX+o ", " .OOOOOOOOOOOOOOooOOOOOX+o ", " .oOOOOOOOOOOOOo.oOOOOOX+o ", " ..oOOOOoOOOOOoo..oOOOOX+o ", " ...oOOo.oOOOo.....oOOOX+o ", " ...Xoo...oOo......oOooX+o ", " .X.XX.....o....@@@#o..X+o ", " .XX.X.....XX.@@@#@@#..X+o ", " .X...X.....X@@@@@#@#@.X+o ", " .......X....@#@@@@@@@@X+o ", " .ooooo$$$$.@@@@#@@#@@.X+o ", " .%%%%$&$$$o@@@@@@@@@@oX+o ", " .%%%$&&&$$$%@@%@*@@@%%X+o ", " .%%$&&&&&$$$%@%*=*%@%%X+o ", " .%$.&&&&&.$$%%%*=*%%%%X+o ", " .%%.&..&&.&$%%%*=*%%%%X+o ", " .%%.&..&&.&.%%%*=*%%%%X+o ", " .%%.&..&&..%%%%*=*%%%%X+o ", " .%%.......%%%%%***%%%%X+o ", " .%%%%%%%%%%%%%%%%%%%%%X+o ", " .+++++++++++++++++++++++o ", " ooooooooooooooooooooooooo "}; xfm-1.5.4/icons/image/jpeg.xpm0000644000175000017500000000242210744136017013107 00000000000000/* XPM */ static char * jpeg_xpm[] = { "32 32 5 1", " s background c None", ". c #7DF77DF77DF7", "X c white", "o c black", "O c #BEFBBEFBBEFB", " .................. ", " .XXXXXXXXXXXXXXXX.o ", " .XXXXXXXXXXXXXXXX..o ", " .XXoooXoooXXXooXX.O.o ", " .XXXXoXoXXoXoXXoX.OO.o ", " .XXXXoXoXXoXoXXXX.XOO.o ", " .XXXXoXoooXXoXooX.XXOO.o ", " .XoXXoXoXXXXoXXoX.ooooooo ", " .XXooXXoXXXXXooXXXOOOOOOo ", " .XXXXXXXXXXXXXXXXXOOOOOOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXooooooooooooooooXXXOo ", " .XXXooooXXooooXXooooXXXOo ", " .XXXooooXXooooXXooooXXXOo ", " .XXXooooooooooooooooXXXOo ", " .XXXoXXoXXooooXXoXXoXXXOo ", " .XXXoXXoXXooooXXoXXoXXXOo ", " .XXXooooooooooooooooXXXOo ", " .XXXoXXooooXXooooXXoXXXOo ", " .XXXoXXooooXXooooXXoXXXOo ", " .XXXooooooooooooooooXXXOo ", " .XXXooooXXoXXooooXXoXXXOo ", " .XXXooooXXoXXooooXXoXXXOo ", " .XXXooooooooooooooooXXXOo ", " .XXXoXXoooooooXXooooXXXOo ", " .XXXoXXoooooooXXooooXXXOo ", " .XXXooooooooooooooooXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .OOOOOOOOOOOOOOOOOOOOOOOo ", " ooooooooooooooooooooooooo "}; xfm-1.5.4/icons/image/png.xpm0000644000175000017500000000260610744136017012752 00000000000000/* XPM */ static char * img_png_xpm[] = { "32 32 13 1", " s background c None", ". c #7D7D7D", "+ c #FFFFFF", "@ c #000000", "# c #00FFFF", "$ c #BEBEBE", "% c #2C8A55", "& c #30CF30", "* c #FF0000", "= c #9AFB9A", "- c #DFDFDF", "; c #A2512C", "> c #FFA600", " .................. ", " .++++++++++++++++.@ ", " .################..@ ", " .################.$.@ ", " .#@@##@##@##@@@##.$$.@ ", " .#@#@#@@#@#@###@#.+$$.@ ", " .#@@##@@#@#@#####.++$$.@ ", " .#@###@#@@#@##@@#.@@@@@@@ ", " .#@###@#@@#@###@##$$$$$$@ ", " .#@###@##@##@@@###$$$$$$@ ", " .#####################+$@ ", " .##############@@#####+$@ ", " .@############@.@#####+$@ ", " ..@####@#####@@..@####+$@ ", " ...@##@.@###@.....@###+$@ ", " ...+@@...@#@......@#@@+$@ ", " .+.++.....@....%%%&@..+$@ ", " .++.+.....++.%%%&%%&..+$@ ", " .+...+.....+%%%%%&%&%.+$@ ", " .......+....%&%%%%%%%%+$@ ", " .@@@@@****.%%%%&%%&%%.+$@ ", " .====*-***@%%%%%%%%%%@+$@ ", " .===*---***=%%=%;%%%==+$@ ", " .==*-----***=%=;>;=%==+$@ ", " .=*.-----.**===;>;====+$@ ", " .==.-..--.-*===;>;====+$@ ", " .==.-..--.-.===;>;====+$@ ", " .==.-..--..====;>;====+$@ ", " .==.......=====;;;====+$@ ", " .=====================+$@ ", " .$$$$$$$$$$$$$$$$$$$$$$$@ ", " @@@@@@@@@@@@@@@@@@@@@@@@@ "}; xfm-1.5.4/icons/image/tiff.xpm0000644000175000017500000000267310744136017013122 00000000000000/* XPM */ static char * tiff_xpm[] = { "32 32 13 1", " s background c None", ". c #7DF77DF77DF7", "X c white", "o c black", "O c #FFFFFBEECF3C", "+ c #2CB24D344D34", "@ c #BEFBBEFBBEFB", "# c #FFFF00000000", "$ c #D34CB6DA8E38", "% c #F7DEDF7DB2CA", "& c #A28951442CB2", "* c #FFFFA6990000", "= c #000000008207", " .................. ", " .XXXXXXXXXXXXXXXX.o ", " .XOOOOOOOOOO+oOOO..o ", " .XOOOOOOOOOO+oOOO.@.o ", " .XO#OOOOOOOO+o$$O.@@.o ", " .X##OOOOOOOO+o$$O.X@@.o ", " .X##O$OOOOO+++o$O.XX@@.o ", " .X###$OOOO++OO+oO.ooooooo ", " .X##ooOOOO+OO$$o$O@@@@@@o ", " .X#oXooOOO+O$$%o$$@@@@@@o ", " .X#oooo$OO++$%ooO$OOOOX@o ", " .X#ooooX$OO++++OO$OOOOX@o ", " .XOoooXXXOO++++O$$OOOOX@o ", " .XOO$o+XXXo+O$++$OOOOOX@o ", " .XOOO$o+Xo&oO$++$OOOOOX@o ", " .XOOOOOoo*&&$$++$$OOOOX@o ", " .XOOOOOOo&*&&$+++$OOOOX@o ", " .XOOOOOOOo&*&&O++$OOOOX@o ", " .XOOOOOOOoo&*&&o+$$OOOX@o ", " .XOOOOOO++oo&*&&o+$OOOX@o ", " .XOOOOOO++O$o&*&&o$OOOX@o ", " .XOOOOOO++$$oo&*&&$$OOX@o ", " .XOOOOOOOO$$$O$$$$$$OOX@o ", " .XOOOOOOOO$$OO$$$$$$OOX@o ", " .XOOOO===O=O===O===OOOX@o ", " .XOOOOO=OO=O=OOO=OOOOOX@o ", " .XOOOOO=OO=O==OO==OOOOX@o ", " .XOOOOO=OO=O=OOO=OOOOOX@o ", " .XOOOOOoOOoOoOOOoOOOOOX@o ", " .XXXXXXXXXXXXXXXXXXXXXX@o ", " .@@@@@@@@@@@@@@@@@@@@@@@o ", " ooooooooooooooooooooooooo "}; xfm-1.5.4/icons/image/x-cmu-raster.xpm0000644000175000017500000000242410744136017014513 00000000000000/* XPM */ static char * raster_xpm[] = { "32 32 5 1", " s background c None", ". c #7DF77DF77DF7", "X c white", "o c black", "O c #BEFBBEFBBEFB", " .................. ", " .XXXXXXXXXXXXXXXX.o ", " .XoooXXXooXXXoooX..o ", " .XoXXoXoXXoXoXXXX.O.o ", " .XoooXXooooXXooXX.OO.o ", " .XoXoXXoXXoXXXXoX.XOO.o ", " .XoXXoXoXXoXoooXX.XXOO.o ", " .XXXXXXXXXXXXXXXX.ooooooo ", " .XXXXXXXXXXXoXXXXXOOOOOOo ", " .XXXXXXXXXXoooXXXXOOOOOOo ", " .XXXXXXXXXoooooXXXXXXXXOo ", " .XXXXXXXXoXoooXoXXXXXXXOo ", " .XXXXXXXoXXXoXXXoXXXXXXOo ", " .XXXXXXoooXoXoXoXoXXXXXOo ", " .XXXXXoooooXXXoXXXoXXXXOo ", " .XXXXoXoooooXoooXoXoXXXOo ", " .XXXoXXXoooooooooXXXoXXOo ", " .XXoooXoXoooXoooooXoooXOo ", " .XoooooXXXoXXXoooooooooOo ", " .XXoooXoXoooXoXoooXoooXOo ", " .XXXoXXXoooooXXXoXXXoXXOo ", " .XXXXoXoXoooXoXoooXoXXXOo ", " .XXXXXoXXXoXXXoooooXXXXOo ", " .XXXXXXoXoooXoooooXXXXXOo ", " .XXXXXXXoooooooooXXXXXXOo ", " .XXXXXXXXoooXoooXXXXXXXOo ", " .XXXXXXXXXoXXXoXXXXXXXXOo ", " .XXXXXXXXXXoXoXXXXXXXXXOo ", " .XXXXXXXXXXXoXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .OOOOOOOOOOOOOOOOOOOOOOOo ", " ooooooooooooooooooooooooo "}; xfm-1.5.4/icons/image/x-portable-bitmap.xpm0000644000175000017500000000242110744136017015510 00000000000000/* XPM */ static char * pbm_xpm[] = { "32 32 5 1", " s background c None", ". c #7DF77DF77DF7", "X c white", "o c black", "O c #BEFBBEFBBEFB", " .................. ", " .XXXXXXXXXXXXXXXX.o ", " .XXXXXXXXXXXXXXXX..o ", " .XoooXXoooXXoXXoX.O.o ", " .XoXXoXoXXoXooooX.OO.o ", " .XoXXoXoooXXoXXoX.XOO.o ", " .XoooXXoXXoXoXXoX.XXOO.o ", " .XoXXXXoXXoXoXXoX.ooooooo ", " .XoXXXXoooXXoXXoXXOOOOOOo ", " .XXXXXXXXXXXXXXXXXOOOOOOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXooooooooooooooooXXXOo ", " .XXXooooXXooooXXooooXXXOo ", " .XXXooooXXooooXXooooXXXOo ", " .XXXooooooooooooooooXXXOo ", " .XXXoXXoXXooooXXoXXoXXXOo ", " .XXXoXXoXXooooXXoXXoXXXOo ", " .XXXooooooooooooooooXXXOo ", " .XXXoXXooooXXooooXXoXXXOo ", " .XXXoXXooooXXooooXXoXXXOo ", " .XXXooooooooooooooooXXXOo ", " .XXXooooXXoXXooooXXoXXXOo ", " .XXXooooXXoXXooooXXoXXXOo ", " .XXXooooooooooooooooXXXOo ", " .XXXoXXoooooooXXooooXXXOo ", " .XXXoXXoooooooXXooooXXXOo ", " .XXXooooooooooooooooXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .OOOOOOOOOOOOOOOOOOOOOOOo ", " ooooooooooooooooooooooooo "}; xfm-1.5.4/icons/image/x-portable-graymap.xpm0000644000175000017500000000242110744136017015674 00000000000000/* XPM */ static char * pgm_xpm[] = { "32 32 5 1", " s background c None", ". c #7DF77DF77DF7", "X c white", "o c black", "O c #BEFBBEFBBEFB", " .................. ", " .XXXXXXXXXXXXXXXX.o ", " .XXXXXXXXXXXXXXXX..o ", " .XoooXXXooXXoXXoX.O.o ", " .XoXXoXoXXoXooooX.OO.o ", " .XoXXoXoXXXXoXXoX.XOO.o ", " .XoooXXoXooXoXXoX.XXOO.o ", " .XoXXXXoXXoXoXXoX.ooooooo ", " .XoXXXXXooXXoXXoXXOOOOOOo ", " .XXXXXXXXXXXXXXXXXOOOOOOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXooooooooooooooooXXXOo ", " .XXXooooXXooooXXooooXXXOo ", " .XXXooooXXooooXXooooXXXOo ", " .XXXooooooooooooooooXXXOo ", " .XXXoXXoXXooooXXoXXoXXXOo ", " .XXXoXXoXXooooXXoXXoXXXOo ", " .XXXooooooooooooooooXXXOo ", " .XXXoXXooooXXooooXXoXXXOo ", " .XXXoXXooooXXooooXXoXXXOo ", " .XXXooooooooooooooooXXXOo ", " .XXXooooXXoXXooooXXoXXXOo ", " .XXXooooXXoXXooooXXoXXXOo ", " .XXXooooooooooooooooXXXOo ", " .XXXoXXoooooooXXooooXXXOo ", " .XXXoXXoooooooXXooooXXXOo ", " .XXXooooooooooooooooXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .OOOOOOOOOOOOOOOOOOOOOOOo ", " ooooooooooooooooooooooooo "}; xfm-1.5.4/icons/image/x-portable-pixmap.xpm0000644000175000017500000000242110744136017015532 00000000000000/* XPM */ static char * ppm_xpm[] = { "32 32 5 1", " s background c None", ". c #7DF77DF77DF7", "X c white", "o c black", "O c #BEFBBEFBBEFB", " .................. ", " .XXXXXXXXXXXXXXXX.o ", " .XXXXXXXXXXXXXXXX..o ", " .XoooXXoooXXoXXoX.O.o ", " .XoXXoXoXXoXooooX.OO.o ", " .XoXXoXoXXoXoXXoX.XOO.o ", " .XoooXXoooXXoXXoX.XXOO.o ", " .XoXXXXoXXXXoXXoX.ooooooo ", " .XoXXXXoXXXXoXXoXXOOOOOOo ", " .XXXXXXXXXXXXXXXXXOOOOOOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXooooooooooooooooXXXOo ", " .XXXooooXXooooXXooooXXXOo ", " .XXXooooXXooooXXooooXXXOo ", " .XXXooooooooooooooooXXXOo ", " .XXXoXXoXXooooXXoXXoXXXOo ", " .XXXoXXoXXooooXXoXXoXXXOo ", " .XXXooooooooooooooooXXXOo ", " .XXXoXXooooXXooooXXoXXXOo ", " .XXXoXXooooXXooooXXoXXXOo ", " .XXXooooooooooooooooXXXOo ", " .XXXooooXXoXXooooXXoXXXOo ", " .XXXooooXXoXXooooXXoXXXOo ", " .XXXooooooooooooooooXXXOo ", " .XXXoXXoooooooXXooooXXXOo ", " .XXXoXXoooooooXXooooXXXOo ", " .XXXooooooooooooooooXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .OOOOOOOOOOOOOOOOOOOOOOOo ", " ooooooooooooooooooooooooo "}; xfm-1.5.4/icons/image/x-xbitmap.xpm0000644000175000017500000000242110744136017014072 00000000000000/* XPM */ static char * xbm_xpm[] = { "32 32 5 1", " s background c None", ". c #7DF77DF77DF7", "X c white", "o c black", "O c #BEFBBEFBBEFB", " .................. ", " .XXXXXXXXXXXXXXXX.o ", " .XXXoooXXXooXXXXX..o ", " .XXXoooXXXoXXXXXX.O.o ", " .XXXXoooXooXXXXXX.OO.o ", " .XXXXoooXoXXXXXXX.XOO.o ", " .XXXXXoXoooXXXXXX.XXOO.o ", " .XXXXooXoooXXXXXX.ooooooo ", " .XXXXoXXXoooXXXXXXOOOOOOo ", " .XXXooXXXoooXXXXXXOOOOOOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXooooooooooooooooXXXOo ", " .XXXooooXXooooXXooooXXXOo ", " .XXXooooXXooooXXooooXXXOo ", " .XXXooooooooooooooooXXXOo ", " .XXXoXXoXXooooXXoXXoXXXOo ", " .XXXoXXoXXooooXXoXXoXXXOo ", " .XXXooooooooooooooooXXXOo ", " .XXXoXXooooXXooooXXoXXXOo ", " .XXXoXXooooXXooooXXoXXXOo ", " .XXXooooooooooooooooXXXOo ", " .XXXooooXXoXXooooXXoXXXOo ", " .XXXooooXXoXXooooXXoXXXOo ", " .XXXooooooooooooooooXXXOo ", " .XXXoXXoooooooXXooooXXXOo ", " .XXXoXXoooooooXXooooXXXOo ", " .XXXooooooooooooooooXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .OOOOOOOOOOOOOOOOOOOOOOOo ", " ooooooooooooooooooooooooo "}; xfm-1.5.4/icons/image/x-xpm.xpm0000644000175000017500000000242310744136017013234 00000000000000/* XPM */ static char * x_xpm_xpm[] = { "32 32 5 1", " s background c None", ". c #7DF77DF77DF7", "X c white", "o c black", "O c #BEFBBEFBBEFB", " .................. ", " .XXXXXXXXXXXXXXXX.o ", " .XXXXXXXXXXXXXXXX..o ", " .XoXXoXoooXXoXXoX.O.o ", " .XoXXoXoXXoXooooX.OO.o ", " .XXooXXoXXoXoXXoX.XOO.o ", " .XXooXXoooXXoXXoX.XXOO.o ", " .XoXXoXoXXXXoXXoX.ooooooo ", " .XoXXoXoXXXXoXXoXXOOOOOOo ", " .XXXXXXXXXXXXXXXXXOOOOOOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXooooooooooooooooXXXOo ", " .XXXooooXXooooXXooooXXXOo ", " .XXXooooXXooooXXooooXXXOo ", " .XXXooooooooooooooooXXXOo ", " .XXXoXXoXXooooXXoXXoXXXOo ", " .XXXoXXoXXooooXXoXXoXXXOo ", " .XXXooooooooooooooooXXXOo ", " .XXXoXXooooXXooooXXoXXXOo ", " .XXXoXXooooXXooooXXoXXXOo ", " .XXXooooooooooooooooXXXOo ", " .XXXooooXXoXXooooXXoXXXOo ", " .XXXooooXXoXXooooXXoXXXOo ", " .XXXooooooooooooooooXXXOo ", " .XXXoXXoooooooXXooooXXXOo ", " .XXXoXXoooooooXXooooXXXOo ", " .XXXooooooooooooooooXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .OOOOOOOOOOOOOOOOOOOOOOOo ", " ooooooooooooooooooooooooo "}; xfm-1.5.4/icons/image/default.xpm0000644000175000017500000000242510744136017013611 00000000000000/* XPM */ static char * default_xpm[] = { "32 32 5 1", " s background c None", ". c #7DF77DF77DF7", "X c white", "o c black", "O c #BEFBBEFBBEFB", " .................. ", " .XXXXXXXXXXXXXXXX.o ", " .XXXXXXXXXXXXXXXX..o ", " .XXXXXXXXXXXXXXXX.O.o ", " .XXXXXXXXXXXXXXXX.OO.o ", " .XXXXXXXXXXXXXXXX.XOO.o ", " .XXXXXXXXXXXXXXXX.XXOO.o ", " .XXXXXXXXXXXXXXXX.ooooooo ", " .XXXXXXXXXXXXXXXXXOOOOOOo ", " .XXXXXXXXXXXXXXXXXOOOOOOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXooooooooooooooooXXXOo ", " .XXXooooXXooooXXooooXXXOo ", " .XXXooooXXooooXXooooXXXOo ", " .XXXooooooooooooooooXXXOo ", " .XXXoXXoXXooooXXoXXoXXXOo ", " .XXXoXXoXXooooXXoXXoXXXOo ", " .XXXooooooooooooooooXXXOo ", " .XXXoXXooooXXooooXXoXXXOo ", " .XXXoXXooooXXooooXXoXXXOo ", " .XXXooooooooooooooooXXXOo ", " .XXXooooXXoXXooooXXoXXXOo ", " .XXXooooXXoXXooooXXoXXXOo ", " .XXXooooooooooooooooXXXOo ", " .XXXoXXoooooooXXooooXXXOo ", " .XXXoXXoooooooXXooooXXXOo ", " .XXXooooooooooooooooXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .OOOOOOOOOOOOOOOOOOOOOOOo ", " ooooooooooooooooooooooooo "}; xfm-1.5.4/icons/audio/0000777000175000017500000000000010744136017011537 500000000000000xfm-1.5.4/icons/audio/default.xpm0000644000175000017500000000245010744136017013626 00000000000000/* XPM */ static char * sound_xpm[] = { "32 32 6 1", " s background c None", ". c #7DF77DF77DF7", "X c white", "o c black", "O c #00000000FFFF", "+ c #BEFBBEFBBEFB", " .................. ", " .XXXXXXXXXXXXXXXX.o ", " .XXXXXXXXXXXXXXXX..o ", " .XXXXXXXXOXXXXXXX.+.o ", " .XXXXXXXXOXXXXXXX.++.o ", " .XXXXXXXXOXXXXXXX.X++.o ", " .XXXXXXXXOXXXXXXX.XX++.o ", " .XXXXXXXOOOXXXXXX.ooooooo ", " .XXXXXXXOOOXXXXXXX++++++o ", " .XXXXXXXOOOXXXXXXX++++++o ", " .XXXOXXXOOOXXOXXXXXXXXX+o ", " .XXXOXXXOOOXXOXXXOXXXXX+o ", " .XXXOXXOOOOXOOOXXOXXXXX+o ", " .XXXOOXOOOOXOOOXXOXXXXX+o ", " .XXXOOXOOOOXOOOXXOOXXXX+o ", " .XXOOOXOOOOXOOOXOOOOXXX+o ", " .OOOOOOOOOOXOOOXOOOOOOO+o ", " .XXOXOOOOXOXOOOOOOXOXXX+o ", " .XXXXOOOXXOOOOOOOOXXXXX+o ", " .XXXXOOOXXOOOOXOOXXXXXX+o ", " .XXXXOOOXXOOOOXOOXXXXXX+o ", " .XXXXOOOXXOOOOXXOXXXXXX+o ", " .XXXXXOXXXXOXOXXXXXXXXX+o ", " .XXXXXOXXXXOXOXXXXXXXXX+o ", " .XXXXXOXXXXOXXXXXXXXXXX+o ", " .XXXXXXXXXXOXXXXXXXXXXX+o ", " .XXXXXXXXXXOXXXXXXXXXXX+o ", " .XXXXXXXXXXXXXXXXXXXXXX+o ", " .XXXXXXXXXXXXXXXXXXXXXX+o ", " .XXXXXXXXXXXXXXXXXXXXXX+o ", " .+++++++++++++++++++++++o ", " ooooooooooooooooooooooooo "}; xfm-1.5.4/images/0000777000175000017500000000000010744136021010563 500000000000000xfm-1.5.4/images/xfm_file.xbm0000644000175000017500000000160010420717344013001 00000000000000#define xfm_file_width 32 #define xfm_file_height 32 static unsigned char xfm_file_bits[] = { 0xf0, 0xff, 0x3f, 0x00, 0x10, 0x00, 0x60, 0x00, 0x10, 0x00, 0xa0, 0x00, 0x10, 0x00, 0x20, 0x01, 0x10, 0x00, 0x20, 0x02, 0x10, 0x00, 0x20, 0x04, 0x10, 0x00, 0x20, 0x08, 0x10, 0x00, 0xe0, 0x1f, 0x10, 0x00, 0x00, 0x18, 0x10, 0x00, 0x00, 0x18, 0x10, 0x00, 0x00, 0x18, 0x10, 0x00, 0x00, 0x18, 0x10, 0x00, 0x00, 0x18, 0x10, 0x00, 0x00, 0x18, 0x10, 0x00, 0x00, 0x18, 0x10, 0x00, 0x00, 0x18, 0x10, 0x00, 0x00, 0x18, 0x10, 0x00, 0x00, 0x18, 0x10, 0x00, 0x00, 0x18, 0x10, 0x00, 0x00, 0x18, 0x10, 0x00, 0x00, 0x18, 0x10, 0x00, 0x00, 0x18, 0x10, 0x00, 0x00, 0x18, 0x10, 0x00, 0x00, 0x18, 0x10, 0x00, 0x00, 0x18, 0x10, 0x00, 0x00, 0x18, 0x10, 0x00, 0x00, 0x18, 0x10, 0x00, 0x00, 0x18, 0x10, 0x00, 0x00, 0x18, 0x10, 0x00, 0x00, 0x18, 0xf0, 0xff, 0xff, 0x1f, 0xe0, 0xff, 0xff, 0x1f}; xfm-1.5.4/images/xfm_files.xbm0000644000175000017500000000160310420717344013167 00000000000000#define xfm_files_width 32 #define xfm_files_height 32 static unsigned char xfm_files_bits[] = { 0xfe, 0xff, 0x0f, 0x00, 0x02, 0x00, 0x18, 0x00, 0x02, 0x00, 0x28, 0x00, 0x02, 0x00, 0x48, 0x00, 0x02, 0x00, 0x88, 0x00, 0x02, 0x00, 0x08, 0x01, 0x02, 0x00, 0x08, 0x02, 0x02, 0x00, 0xf8, 0x07, 0x02, 0x00, 0x00, 0x0a, 0x02, 0x00, 0x00, 0x1a, 0x02, 0x00, 0x00, 0x2a, 0x02, 0x00, 0x00, 0x2a, 0x02, 0x00, 0x00, 0x2a, 0x02, 0x00, 0x00, 0x2a, 0x02, 0x00, 0x00, 0x2a, 0x02, 0x00, 0x00, 0x2a, 0x02, 0x00, 0x00, 0x2a, 0x02, 0x00, 0x00, 0x2a, 0x02, 0x00, 0x00, 0x2a, 0x02, 0x00, 0x00, 0x2a, 0x02, 0x00, 0x00, 0x2a, 0x02, 0x00, 0x00, 0x2a, 0x02, 0x00, 0x00, 0x2a, 0x02, 0x00, 0x00, 0x2a, 0x02, 0x00, 0x00, 0x2a, 0x02, 0x00, 0x00, 0x2a, 0x02, 0x00, 0x00, 0x2a, 0xfe, 0xff, 0xff, 0x2b, 0x04, 0x00, 0x00, 0x28, 0xfc, 0xff, 0xff, 0x2f, 0x08, 0x00, 0x00, 0x20, 0xf8, 0xff, 0xff, 0x3f}; xfm-1.5.4/images/xfm_noentry32.xbm0000644000175000017500000000161110420717344013727 00000000000000#define xfm_noentry_width 32 #define xfm_noentry_height 32 static unsigned char xfm_noentry_bits[] = { 0x00, 0xf0, 0x0f, 0x00, 0x00, 0x0e, 0x70, 0x00, 0x80, 0x01, 0x80, 0x01, 0x40, 0x00, 0x00, 0x02, 0x20, 0x00, 0x00, 0x04, 0x10, 0xe0, 0x07, 0x08, 0x08, 0x18, 0x18, 0x10, 0x04, 0x06, 0x60, 0x20, 0x04, 0x01, 0x80, 0x20, 0x82, 0x00, 0x00, 0x41, 0x82, 0x00, 0x00, 0x41, 0x42, 0x00, 0x00, 0x42, 0x41, 0x00, 0x00, 0x82, 0x21, 0xfe, 0x7f, 0x84, 0x21, 0x01, 0x80, 0x84, 0xa1, 0x00, 0x00, 0x85, 0xa1, 0x00, 0x00, 0x85, 0x21, 0x01, 0x80, 0x84, 0x21, 0xfe, 0x7f, 0xc6, 0x41, 0x00, 0x00, 0xc2, 0x42, 0x00, 0x00, 0x43, 0x82, 0x00, 0x00, 0x61, 0x82, 0x00, 0x80, 0x61, 0x04, 0x01, 0xc0, 0x30, 0x04, 0x06, 0x70, 0x30, 0x08, 0x18, 0x1c, 0x18, 0x10, 0xe0, 0x07, 0x0c, 0x20, 0x00, 0x00, 0x06, 0x40, 0x00, 0x80, 0x03, 0x80, 0x01, 0xe0, 0x01, 0x00, 0x0e, 0x7c, 0x00, 0x00, 0xf0, 0x0f, 0x00}; xfm-1.5.4/images/xfm_dir.xbm0000644000175000017500000000157510420717344012653 00000000000000#define xfm_dir_width 32 #define xfm_dir_height 32 static unsigned char xfm_dir_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x01, 0x00, 0x00, 0x02, 0x02, 0x00, 0x00, 0x01, 0x04, 0xfe, 0xff, 0xff, 0x1f, 0x01, 0x00, 0x00, 0x20, 0x01, 0x00, 0x00, 0x60, 0x01, 0x00, 0x00, 0x60, 0x01, 0x00, 0x00, 0x60, 0x01, 0x00, 0x00, 0x60, 0x01, 0x00, 0x00, 0x60, 0x01, 0x00, 0x00, 0x60, 0x01, 0x00, 0x00, 0x60, 0x01, 0x00, 0x00, 0x60, 0x01, 0x00, 0x00, 0x60, 0x01, 0x00, 0x00, 0x60, 0x01, 0x00, 0x00, 0x60, 0x01, 0x00, 0x00, 0x60, 0x01, 0x00, 0x00, 0x60, 0x01, 0x00, 0x00, 0x60, 0x01, 0x00, 0x00, 0x60, 0x01, 0x00, 0x00, 0x60, 0x01, 0x00, 0x00, 0x60, 0x01, 0x00, 0x00, 0x60, 0x01, 0x00, 0x00, 0x60, 0xff, 0xff, 0xff, 0x7f, 0xfe, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; xfm-1.5.4/images/xfm_exec.xbm0000644000175000017500000000160010420717344013006 00000000000000#define xfm_exec_width 32 #define xfm_exec_height 32 static unsigned char xfm_exec_bits[] = { 0xf0, 0xff, 0x3f, 0x00, 0x10, 0x00, 0x60, 0x00, 0x10, 0x00, 0xa0, 0x00, 0x10, 0x00, 0x20, 0x01, 0x10, 0x00, 0x20, 0x02, 0x10, 0x00, 0x20, 0x04, 0x10, 0x00, 0x20, 0x08, 0x10, 0x00, 0xe0, 0x1f, 0x10, 0x00, 0x00, 0x18, 0x90, 0xff, 0xff, 0x19, 0x90, 0x06, 0x00, 0x1b, 0x90, 0x06, 0x00, 0x1b, 0x90, 0xff, 0xff, 0x1b, 0x90, 0x00, 0x00, 0x1b, 0x90, 0x00, 0x00, 0x1b, 0x90, 0x00, 0x00, 0x1b, 0x90, 0x00, 0x00, 0x1b, 0x90, 0x00, 0x00, 0x1b, 0x90, 0x00, 0x00, 0x1b, 0x90, 0x00, 0x00, 0x1b, 0x90, 0x00, 0x00, 0x1b, 0x90, 0x00, 0x00, 0x1b, 0x90, 0x00, 0x00, 0x1b, 0x90, 0x00, 0x00, 0x1b, 0x90, 0x00, 0x00, 0x1b, 0x90, 0xff, 0xff, 0x1b, 0x10, 0xff, 0xff, 0x1b, 0x10, 0x00, 0x00, 0x18, 0x10, 0x00, 0x00, 0x18, 0x10, 0x00, 0x00, 0x18, 0xf0, 0xff, 0xff, 0x1f, 0xe0, 0xff, 0xff, 0x1f}; xfm-1.5.4/images/xfm_watch.xbm0000644000175000017500000000045310420717344013175 00000000000000#define xfm_watch_width 16 #define xfm_watch_height 16 static unsigned char xfm_watch_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x40, 0xe0, 0x21, 0x00, 0x11, 0x8e, 0x08, 0x48, 0x04, 0x24, 0x7c, 0xe2, 0x01, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; xfm-1.5.4/images/xfm_filemsk.xbm0000644000175000017500000000161110420717344013516 00000000000000#define xfm_filemsk_width 32 #define xfm_filemsk_height 32 static unsigned char xfm_filemsk_bits[] = { 0xf0, 0xff, 0x3f, 0x00, 0xf0, 0xff, 0x7f, 0x00, 0xf0, 0xff, 0xff, 0x00, 0xf0, 0xff, 0xff, 0x01, 0xf0, 0xff, 0xff, 0x03, 0xf0, 0xff, 0xff, 0x07, 0xf0, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0x1f, 0xf0, 0xff, 0xff, 0x1f, 0xf0, 0xff, 0xff, 0x1f, 0xf0, 0xff, 0xff, 0x1f, 0xf0, 0xff, 0xff, 0x1f, 0xf0, 0xff, 0xff, 0x1f, 0xf0, 0xff, 0xff, 0x1f, 0xf0, 0xff, 0xff, 0x1f, 0xf0, 0xff, 0xff, 0x1f, 0xf0, 0xff, 0xff, 0x1f, 0xf0, 0xff, 0xff, 0x1f, 0xf0, 0xff, 0xff, 0x1f, 0xf0, 0xff, 0xff, 0x1f, 0xf0, 0xff, 0xff, 0x1f, 0xf0, 0xff, 0xff, 0x1f, 0xf0, 0xff, 0xff, 0x1f, 0xf0, 0xff, 0xff, 0x1f, 0xf0, 0xff, 0xff, 0x1f, 0xf0, 0xff, 0xff, 0x1f, 0xf0, 0xff, 0xff, 0x1f, 0xf0, 0xff, 0xff, 0x1f, 0xf0, 0xff, 0xff, 0x1f, 0xf0, 0xff, 0xff, 0x1f, 0xf0, 0xff, 0xff, 0x1f, 0xe0, 0xff, 0xff, 0x1f}; xfm-1.5.4/images/xfm_filesmsk.xbm0000644000175000017500000000161410420717344013704 00000000000000#define xfm_filesmsk_width 32 #define xfm_filesmsk_height 32 static unsigned char xfm_filesmsk_bits[] = { 0xfe, 0xff, 0x0f, 0x00, 0xfe, 0xff, 0x1f, 0x00, 0xfe, 0xff, 0x3f, 0x00, 0xfe, 0xff, 0x7f, 0x00, 0xfe, 0xff, 0xff, 0x00, 0xfe, 0xff, 0xff, 0x01, 0xfe, 0xff, 0xff, 0x03, 0xfe, 0xff, 0xff, 0x07, 0xfe, 0xff, 0xff, 0x0f, 0xfe, 0xff, 0xff, 0x1f, 0xfe, 0xff, 0xff, 0x3f, 0xfe, 0xff, 0xff, 0x3f, 0xfe, 0xff, 0xff, 0x3f, 0xfe, 0xff, 0xff, 0x3f, 0xfe, 0xff, 0xff, 0x3f, 0xfe, 0xff, 0xff, 0x3f, 0xfe, 0xff, 0xff, 0x3f, 0xfe, 0xff, 0xff, 0x3f, 0xfe, 0xff, 0xff, 0x3f, 0xfe, 0xff, 0xff, 0x3f, 0xfe, 0xff, 0xff, 0x3f, 0xfe, 0xff, 0xff, 0x3f, 0xfe, 0xff, 0xff, 0x3f, 0xfe, 0xff, 0xff, 0x3f, 0xfe, 0xff, 0xff, 0x3f, 0xfe, 0xff, 0xff, 0x3f, 0xfe, 0xff, 0xff, 0x3f, 0xfe, 0xff, 0xff, 0x3f, 0xfc, 0xff, 0xff, 0x3f, 0xfc, 0xff, 0xff, 0x3f, 0xf8, 0xff, 0xff, 0x3f, 0xf8, 0xff, 0xff, 0x3f}; xfm-1.5.4/images/xfm_noentrymsk32.xbm0000644000175000017500000000162210420717344014444 00000000000000#define xfm_noentrymsk_width 32 #define xfm_noentrymsk_height 32 static unsigned char xfm_noentrymsk_bits[] = { 0x00, 0xf0, 0x0f, 0x00, 0x00, 0xfe, 0x7f, 0x00, 0x80, 0xff, 0xff, 0x01, 0xc0, 0xff, 0xff, 0x03, 0xe0, 0xff, 0xff, 0x07, 0xf0, 0xff, 0xff, 0x0f, 0xf8, 0x1f, 0xf8, 0x1f, 0xfc, 0x07, 0xe0, 0x3f, 0xfc, 0x01, 0x80, 0x3f, 0xfe, 0x00, 0x00, 0x7f, 0xfe, 0x00, 0x00, 0x7f, 0x7e, 0x00, 0x00, 0x7e, 0x7f, 0x00, 0x00, 0xfe, 0x3f, 0xfe, 0x7f, 0xfc, 0x3f, 0xff, 0xff, 0xfc, 0xbf, 0xff, 0xff, 0xfd, 0xbf, 0xff, 0xff, 0xfd, 0x3f, 0xff, 0xff, 0xfc, 0x3f, 0xfe, 0x7f, 0xfe, 0x7f, 0x00, 0x00, 0xfe, 0x7e, 0x00, 0x00, 0x7f, 0xfe, 0x00, 0x00, 0x7f, 0xfe, 0x00, 0x80, 0x7f, 0xfc, 0x01, 0xc0, 0x3f, 0xfc, 0x07, 0xf0, 0x3f, 0xf8, 0x1f, 0xfc, 0x1f, 0xf0, 0xff, 0xff, 0x0f, 0xe0, 0xff, 0xff, 0x07, 0xc0, 0xff, 0xff, 0x03, 0x80, 0xff, 0xff, 0x01, 0x00, 0xfe, 0x7f, 0x00, 0x00, 0xf0, 0x0f, 0x00}; xfm-1.5.4/images/xfm_dirmsk.xbm0000644000175000017500000000160610420717344013361 00000000000000#define xfm_dirmsk_width 32 #define xfm_dirmsk_height 32 static unsigned char xfm_dirmsk_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x01, 0x00, 0x00, 0xfe, 0x03, 0x00, 0x00, 0xff, 0x07, 0xfe, 0xff, 0xff, 0x1f, 0xff, 0xff, 0xff, 0x3f, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0x7f, 0xfe, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; xfm-1.5.4/images/xfm_execmsk.xbm0000644000175000017500000000161110420717344013523 00000000000000#define xfm_execmsk_width 32 #define xfm_execmsk_height 32 static unsigned char xfm_execmsk_bits[] = { 0xf0, 0xff, 0x3f, 0x00, 0xf0, 0xff, 0x7f, 0x00, 0xf0, 0xff, 0xff, 0x00, 0xf0, 0xff, 0xff, 0x01, 0xf0, 0xff, 0xff, 0x03, 0xf0, 0xff, 0xff, 0x07, 0xf0, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0x1f, 0xf0, 0xff, 0xff, 0x1f, 0xf0, 0xff, 0xff, 0x1f, 0xf0, 0xff, 0xff, 0x1f, 0xf0, 0xff, 0xff, 0x1f, 0xf0, 0xff, 0xff, 0x1f, 0xf0, 0xff, 0xff, 0x1f, 0xf0, 0xff, 0xff, 0x1f, 0xf0, 0xff, 0xff, 0x1f, 0xf0, 0xff, 0xff, 0x1f, 0xf0, 0xff, 0xff, 0x1f, 0xf0, 0xff, 0xff, 0x1f, 0xf0, 0xff, 0xff, 0x1f, 0xf0, 0xff, 0xff, 0x1f, 0xf0, 0xff, 0xff, 0x1f, 0xf0, 0xff, 0xff, 0x1f, 0xf0, 0xff, 0xff, 0x1f, 0xf0, 0xff, 0xff, 0x1f, 0xf0, 0xff, 0xff, 0x1f, 0xf0, 0xff, 0xff, 0x1f, 0xf0, 0xff, 0xff, 0x1f, 0xf0, 0xff, 0xff, 0x1f, 0xf0, 0xff, 0xff, 0x1f, 0xf0, 0xff, 0xff, 0x1f, 0xe0, 0xff, 0xff, 0x1f}; xfm-1.5.4/images/xfm_watchmsk.xbm0000644000175000017500000000046410420717344013712 00000000000000#define xfm_watchmsk_width 16 #define xfm_watchmsk_height 16 static unsigned char xfm_watchmsk_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x00, 0xfe, 0xf0, 0xff, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x03, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00}; xfm-1.5.4/images/xfm_file_s.xbm0000644000175000017500000000045610420717344013333 00000000000000#define xfm_file_s_width 16 #define xfm_file_s_height 16 static unsigned char xfm_file_s_bits[] = { 0xfc, 0x03, 0x04, 0x05, 0x04, 0x09, 0x04, 0x11, 0x04, 0x21, 0x04, 0x3f, 0x04, 0x60, 0x04, 0x60, 0x04, 0x60, 0x04, 0x60, 0x04, 0x60, 0x04, 0x60, 0x04, 0x60, 0x04, 0x60, 0xfc, 0x7f, 0xf8, 0x7f}; xfm-1.5.4/images/xfm_files_s.xbm0000644000175000017500000000046110420717344013512 00000000000000#define xfm_files_s_width 16 #define xfm_files_s_height 16 static unsigned char xfm_files_s_bits[] = { 0xff, 0x00, 0x41, 0x01, 0x41, 0x02, 0xc1, 0x07, 0x01, 0x0a, 0x01, 0x1e, 0x01, 0x2a, 0x01, 0x3a, 0x01, 0x2a, 0x01, 0x2a, 0x01, 0x2a, 0xff, 0x2b, 0x02, 0x28, 0xfe, 0x2f, 0x04, 0x20, 0xfc, 0x3f}; xfm-1.5.4/images/xfm_noentry_s.xbm0000644000175000017500000000046710420717344014114 00000000000000#define xfm_noentry_s_width 16 #define xfm_noentry_s_height 16 static unsigned char xfm_noentry_s_bits[] = { 0xe0, 0x07, 0x18, 0x18, 0xc4, 0x23, 0x32, 0x4c, 0x0a, 0x50, 0x09, 0x90, 0xe5, 0xa7, 0xf5, 0xaf, 0xf5, 0xaf, 0xe5, 0xa7, 0x09, 0x90, 0x0a, 0x50, 0x32, 0x4c, 0xc4, 0x23, 0x18, 0x18, 0xe0, 0x07}; xfm-1.5.4/images/xfm_dir_s.xbm0000644000175000017500000000045310420717344013167 00000000000000#define xfm_dir_s_width 16 #define xfm_dir_s_height 16 static unsigned char xfm_dir_s_bits[] = { 0x00, 0x0f, 0x80, 0x10, 0x80, 0x10, 0xfe, 0x3f, 0x01, 0x40, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0xff, 0xff, 0xfe, 0xff}; xfm-1.5.4/images/xfm_exec_s.xbm0000644000175000017500000000045610420717344013340 00000000000000#define xfm_exec_s_width 16 #define xfm_exec_s_height 16 static unsigned char xfm_exec_s_bits[] = { 0xfc, 0x0f, 0x04, 0x14, 0x04, 0x24, 0x04, 0x44, 0x04, 0x7c, 0x04, 0xc0, 0xf4, 0xdf, 0xd4, 0xd1, 0xd4, 0xd1, 0xf4, 0xdf, 0x14, 0xd0, 0x14, 0xd0, 0xf4, 0xdf, 0x04, 0xc0, 0xfc, 0xff, 0xf8, 0xff}; xfm-1.5.4/images/xfm_filemsk_s.xbm0000644000175000017500000000046710420717344014050 00000000000000#define xfm_filemsk_s_width 16 #define xfm_filemsk_s_height 16 static unsigned char xfm_filemsk_s_bits[] = { 0xfc, 0x03, 0xfc, 0x07, 0xfc, 0x0f, 0xfc, 0x1f, 0xfc, 0x3f, 0xfc, 0x3f, 0xfc, 0x7f, 0xfc, 0x7f, 0xfc, 0x7f, 0xfc, 0x7f, 0xfc, 0x7f, 0xfc, 0x7f, 0xfc, 0x7f, 0xfc, 0x7f, 0xfc, 0x7f, 0xf8, 0x7f}; xfm-1.5.4/images/xfm_filesmsk_s.xbm0000644000175000017500000000047210420717344014227 00000000000000#define xfm_filesmsk_s_width 16 #define xfm_filesmsk_s_height 16 static unsigned char xfm_filesmsk_s_bits[] = { 0xff, 0x00, 0xff, 0x01, 0xff, 0x03, 0xff, 0x07, 0xff, 0x0f, 0xff, 0x1f, 0xff, 0x3f, 0xff, 0x3f, 0xff, 0x3f, 0xff, 0x3f, 0xff, 0x3f, 0xff, 0x3f, 0xfe, 0x3f, 0xfe, 0x3f, 0xfc, 0x3f, 0xfc, 0x3f}; xfm-1.5.4/images/xfm_noentrymsk_s.xbm0000644000175000017500000000050010420717344014613 00000000000000#define xfm_noentrymsk_s_width 16 #define xfm_noentrymsk_s_height 16 static unsigned char xfm_noentrymsk_s_bits[] = { 0xe0, 0x07, 0xf8, 0x1f, 0xfc, 0x3f, 0xfe, 0x7f, 0xfe, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x7f, 0xfe, 0x7f, 0xfc, 0x3f, 0xf8, 0x1f, 0xe0, 0x07}; xfm-1.5.4/images/xfm_dirmsk_s.xbm0000644000175000017500000000046410420717344013704 00000000000000#define xfm_dirmsk_s_width 16 #define xfm_dirmsk_s_height 16 static unsigned char xfm_dirmsk_s_bits[] = { 0x00, 0x0f, 0x80, 0x1f, 0x80, 0x1f, 0xfe, 0x3f, 0xff, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xff}; xfm-1.5.4/images/xfm_execmsk_s.xbm0000644000175000017500000000046710420717344014055 00000000000000#define xfm_execmsk_s_width 16 #define xfm_execmsk_s_height 16 static unsigned char xfm_execmsk_s_bits[] = { 0xfc, 0x0f, 0xfc, 0x1f, 0xfc, 0x3f, 0xfc, 0x7f, 0xfc, 0x7f, 0xfc, 0xff, 0xfc, 0xff, 0xfc, 0xff, 0xfc, 0xff, 0xfc, 0xff, 0xfc, 0xff, 0xfc, 0xff, 0xfc, 0xff, 0xfc, 0xff, 0xfc, 0xff, 0xf8, 0xff}; xfm-1.5.4/images/xfm_lline.xbm0000644000175000017500000000355210420717344013175 00000000000000#define xfm_lline_width 48 #define xfm_lline_height 48 static unsigned char xfm_lline_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; xfm-1.5.4/images/xfm_tline.xbm0000644000175000017500000000355210420717344013205 00000000000000#define xfm_tline_width 48 #define xfm_tline_height 48 static unsigned char xfm_tline_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x07, 0xe0, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0x00, 0x00, 0x08, 0x30, 0x00, 0x00, 0x00, 0x00, 0x08, 0x30, 0x00, 0x00, 0x00, 0x00, 0x08, 0x30, 0x00, 0x00, 0x00, 0x00, 0x08, 0x30, 0x00, 0x00, 0x00, 0x00, 0x08, 0x30, 0x00, 0x00, 0x00, 0x00, 0x08, 0x30, 0x00, 0x00, 0x00, 0x00, 0x08, 0x30, 0x00, 0x00, 0x00, 0x00, 0x08, 0x30, 0x00, 0x00, 0x00, 0x00, 0x08, 0x30, 0x00, 0x00, 0x00, 0x00, 0x08, 0x30, 0x00, 0x00, 0x00, 0x00, 0x08, 0x30, 0x00, 0x00, 0x00, 0x00, 0x08, 0x30, 0x00, 0x00, 0x00, 0x00, 0x08, 0x30, 0x00, 0x00, 0x00, 0x00, 0x08, 0x30, 0x00, 0x00, 0x00, 0x00, 0x08, 0x30, 0x00, 0x00, 0x00, 0x00, 0x08, 0x30, 0x00, 0x00, 0x00, 0x00, 0x08, 0x30, 0x00, 0x00, 0x00, 0x00, 0x08, 0x30, 0x00, 0x00, 0x00, 0x00, 0x08, 0x30, 0x00, 0x00, 0x00, 0x00, 0x08, 0x30, 0x00, 0x00, 0x00, 0x00, 0x08, 0x30, 0x00, 0x00}; xfm-1.5.4/images/xfm_fline.xbm0000644000175000017500000000355210420717344013167 00000000000000#define xfm_fline_width 48 #define xfm_fline_height 48 static unsigned char xfm_fline_bits[] = { 0x00, 0x00, 0x08, 0x30, 0x00, 0x00, 0x00, 0x00, 0x08, 0x30, 0x00, 0x00, 0x00, 0x00, 0x08, 0x30, 0x00, 0x00, 0x00, 0x00, 0x08, 0x30, 0x00, 0x00, 0x00, 0x00, 0x08, 0x30, 0x00, 0x00, 0x00, 0x00, 0x08, 0x30, 0x00, 0x00, 0x00, 0x00, 0x08, 0x30, 0x00, 0x00, 0x00, 0x00, 0x08, 0x30, 0x00, 0x00, 0x00, 0x00, 0x08, 0x30, 0x00, 0x00, 0x00, 0x00, 0x08, 0x30, 0x00, 0x00, 0x00, 0x00, 0x08, 0x30, 0x00, 0x00, 0x00, 0x00, 0x08, 0x30, 0x00, 0x00, 0x00, 0x00, 0x08, 0x30, 0x00, 0x00, 0x00, 0x00, 0x08, 0x30, 0x00, 0x00, 0x00, 0x00, 0x08, 0x30, 0x00, 0x00, 0x00, 0x00, 0x08, 0x30, 0x00, 0x00, 0x00, 0x00, 0x08, 0x30, 0x00, 0x00, 0x00, 0x00, 0x08, 0x30, 0x00, 0x00, 0x00, 0x00, 0x08, 0xe0, 0xff, 0xff, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0xe0, 0xff, 0xff, 0x00, 0x00, 0x08, 0xf0, 0xff, 0xff, 0x00, 0x00, 0x08, 0x30, 0x00, 0x00, 0x00, 0x00, 0x08, 0x30, 0x00, 0x00, 0x00, 0x00, 0x08, 0x30, 0x00, 0x00, 0x00, 0x00, 0x08, 0x30, 0x00, 0x00, 0x00, 0x00, 0x08, 0x30, 0x00, 0x00, 0x00, 0x00, 0x08, 0x30, 0x00, 0x00, 0x00, 0x00, 0x08, 0x30, 0x00, 0x00, 0x00, 0x00, 0x08, 0x30, 0x00, 0x00, 0x00, 0x00, 0x08, 0x30, 0x00, 0x00, 0x00, 0x00, 0x08, 0x30, 0x00, 0x00, 0x00, 0x00, 0x08, 0x30, 0x00, 0x00, 0x00, 0x00, 0x08, 0x30, 0x00, 0x00, 0x00, 0x00, 0x08, 0x30, 0x00, 0x00, 0x00, 0x00, 0x08, 0x30, 0x00, 0x00, 0x00, 0x00, 0x08, 0x30, 0x00, 0x00, 0x00, 0x00, 0x08, 0x30, 0x00, 0x00, 0x00, 0x00, 0x08, 0x30, 0x00, 0x00, 0x00, 0x00, 0x08, 0x30, 0x00, 0x00}; xfm-1.5.4/images/xfm_cline.xbm0000644000175000017500000000355210420717344013164 00000000000000#define xfm_cline_width 48 #define xfm_cline_height 48 static unsigned char xfm_cline_bits[] = { 0x00, 0x00, 0x08, 0x30, 0x00, 0x00, 0x00, 0x00, 0x08, 0x30, 0x00, 0x00, 0x00, 0x00, 0x08, 0x30, 0x00, 0x00, 0x00, 0x00, 0x08, 0x30, 0x00, 0x00, 0x00, 0x00, 0x08, 0x30, 0x00, 0x00, 0x00, 0x00, 0x08, 0x30, 0x00, 0x00, 0x00, 0x00, 0x08, 0x30, 0x00, 0x00, 0x00, 0x00, 0x08, 0x30, 0x00, 0x00, 0x00, 0x00, 0x08, 0x30, 0x00, 0x00, 0x00, 0x00, 0x08, 0x30, 0x00, 0x00, 0x00, 0x00, 0x08, 0x30, 0x00, 0x00, 0x00, 0x00, 0x08, 0x30, 0x00, 0x00, 0x00, 0x00, 0x08, 0x30, 0x00, 0x00, 0x00, 0x00, 0x08, 0x30, 0x00, 0x00, 0x00, 0x00, 0x08, 0x30, 0x00, 0x00, 0x00, 0x00, 0x08, 0x30, 0x00, 0x00, 0x00, 0x00, 0x08, 0x30, 0x00, 0x00, 0x00, 0x00, 0x08, 0x30, 0x00, 0x00, 0x00, 0x00, 0x08, 0x30, 0x00, 0x00, 0x00, 0x00, 0x08, 0xe0, 0xff, 0xff, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, 0x00, 0x00, 0xc0, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; xfm-1.5.4/images/xfm_larrow.xbm0000644000175000017500000000355510420717344013403 00000000000000#define xfm_larrow_width 48 #define xfm_larrow_height 48 static unsigned char xfm_larrow_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x80, 0x06, 0x00, 0x00, 0x00, 0x00, 0x40, 0x06, 0x00, 0x00, 0x00, 0x00, 0x20, 0xfe, 0xff, 0xff, 0xff, 0xff, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0xfe, 0xff, 0xff, 0xff, 0xff, 0x40, 0xfe, 0xff, 0xff, 0xff, 0xff, 0x80, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; xfm-1.5.4/images/xfm_rarrow.xbm0000644000175000017500000000355510420717344013411 00000000000000#define xfm_rarrow_width 48 #define xfm_rarrow_height 48 static unsigned char xfm_rarrow_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 0x00, 0x00, 0x40, 0x02, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x0c, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x06, 0x00, 0x00, 0x00, 0x00, 0x40, 0x03, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; xfm-1.5.4/images/xfm_wavy_arrow.xbm0000644000175000017500000000357110420717344014273 00000000000000#define xfm_wavy_arrow_width 48 #define xfm_wavy_arrow_height 48 static unsigned char xfm_wavy_arrow_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0x00, 0x00, 0x60, 0x18, 0x00, 0x00, 0x40, 0x00, 0x18, 0x60, 0x00, 0x00, 0xc0, 0x00, 0x04, 0x80, 0x00, 0x00, 0x40, 0x01, 0x02, 0x00, 0x01, 0x00, 0x40, 0x02, 0x01, 0x00, 0x02, 0x00, 0x60, 0x04, 0x00, 0x00, 0x04, 0x00, 0x18, 0x08, 0x00, 0x00, 0x08, 0x00, 0x04, 0x10, 0x00, 0x00, 0x10, 0x00, 0x02, 0x20, 0x00, 0x00, 0x60, 0x80, 0x01, 0x40, 0x80, 0x07, 0x80, 0x61, 0x00, 0x80, 0xe0, 0x1f, 0x00, 0x1e, 0x00, 0xc0, 0x78, 0x70, 0x00, 0x00, 0x00, 0x60, 0x1c, 0xc0, 0x00, 0x00, 0x00, 0x30, 0x06, 0x00, 0x01, 0x00, 0x00, 0x18, 0x03, 0x00, 0x02, 0x00, 0x60, 0x0c, 0x01, 0x00, 0x04, 0x00, 0x78, 0x06, 0x00, 0x00, 0x08, 0x00, 0x5c, 0x03, 0x00, 0x00, 0x10, 0x00, 0xc6, 0x01, 0x00, 0x00, 0x60, 0x80, 0xc3, 0x00, 0x00, 0x00, 0x80, 0xe1, 0x01, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; xfm-1.5.4/images/xfm_tick.xbm0000644000175000017500000000045010420717344013016 00000000000000#define xfm_tick_width 16 #define xfm_tick_height 16 static unsigned char xfm_tick_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x1c, 0x04, 0x06, 0x8c, 0x03, 0xc8, 0x00, 0x78, 0x00, 0x30, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00}; xfm-1.5.4/images/xfm_notick.xbm0000644000175000017500000000045610420717344013361 00000000000000#define xfm_notick_width 16 #define xfm_notick_height 16 static unsigned char xfm_notick_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; xfm-1.5.4/images/xfm_excl.xbm0000644000175000017500000000354710420717344013031 00000000000000#define xfm_excl_width 48 #define xfm_excl_height 48 static unsigned char xfm_excl_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x20, 0x3a, 0x00, 0x00, 0x00, 0x00, 0x10, 0x74, 0x00, 0x00, 0x00, 0x00, 0x10, 0x68, 0x00, 0x00, 0x00, 0x00, 0x08, 0xd4, 0x00, 0x00, 0x00, 0x00, 0x08, 0xe8, 0x00, 0x00, 0x00, 0x00, 0x08, 0xd0, 0x00, 0x00, 0x00, 0x00, 0x08, 0xe8, 0x00, 0x00, 0x00, 0x00, 0x08, 0xd0, 0x00, 0x00, 0x00, 0x00, 0x08, 0xe8, 0x00, 0x00, 0x00, 0x00, 0x08, 0xd0, 0x00, 0x00, 0x00, 0x00, 0x08, 0xe8, 0x00, 0x00, 0x00, 0x00, 0x08, 0xd0, 0x00, 0x00, 0x00, 0x00, 0x08, 0xe8, 0x00, 0x00, 0x00, 0x00, 0x08, 0xd0, 0x00, 0x00, 0x00, 0x00, 0x08, 0xe8, 0x00, 0x00, 0x00, 0x00, 0x18, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x10, 0x68, 0x00, 0x00, 0x00, 0x00, 0x10, 0x74, 0x00, 0x00, 0x00, 0x00, 0x10, 0x68, 0x00, 0x00, 0x00, 0x00, 0x10, 0x74, 0x00, 0x00, 0x00, 0x00, 0x30, 0x78, 0x00, 0x00, 0x00, 0x00, 0x20, 0x34, 0x00, 0x00, 0x00, 0x00, 0x20, 0x38, 0x00, 0x00, 0x00, 0x00, 0x20, 0x34, 0x00, 0x00, 0x00, 0x00, 0x20, 0x3a, 0x00, 0x00, 0x00, 0x00, 0x40, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x40, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x80, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x80, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x80, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x40, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x20, 0x3a, 0x00, 0x00, 0x00, 0x00, 0x20, 0x34, 0x00, 0x00, 0x00, 0x00, 0x20, 0x3a, 0x00, 0x00, 0x00, 0x00, 0x20, 0x34, 0x00, 0x00, 0x00, 0x00, 0x20, 0x3a, 0x00, 0x00, 0x00, 0x00, 0x40, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x80, 0x0f, 0x00, 0x00}; xfm-1.5.4/images/xfm_suid.xbm0000644000175000017500000000045010420717344013030 00000000000000#define xfm_suid_width 16 #define xfm_suid_height 16 static unsigned char xfm_suid_bits[] = { 0x00, 0x00, 0x00, 0x5c, 0x00, 0x66, 0x00, 0x43, 0x00, 0x03, 0x00, 0x67, 0x00, 0x3e, 0x00, 0x3c, 0x04, 0x76, 0x8c, 0xe3, 0xc8, 0xc0, 0x78, 0xc1, 0x30, 0x63, 0x10, 0x3d, 0x00, 0x00, 0x00, 0x00}; xfm-1.5.4/images/xfm_Suid.xbm0000644000175000017500000000045010420717344012770 00000000000000#define xfm_Suid_width 16 #define xfm_Suid_height 16 static unsigned char xfm_Suid_bits[] = { 0x00, 0x00, 0x00, 0x5c, 0x00, 0x66, 0x00, 0x43, 0x00, 0x03, 0x00, 0x07, 0x00, 0x1e, 0x00, 0x3c, 0x00, 0x70, 0x00, 0xe0, 0x00, 0xc0, 0x00, 0xc1, 0x00, 0x63, 0x00, 0x3d, 0x00, 0x00, 0x00, 0x00}; xfm-1.5.4/images/xfm_sticky.xbm0000644000175000017500000000045610420717344013400 00000000000000#define xfm_sticky_width 16 #define xfm_sticky_height 16 static unsigned char xfm_sticky_bits[] = { 0x00, 0x00, 0x80, 0xff, 0x80, 0xcd, 0x80, 0x8c, 0x00, 0x0c, 0x00, 0x0c, 0x00, 0x7c, 0x00, 0x1c, 0x04, 0x0e, 0x8c, 0x0d, 0xc8, 0x0c, 0x78, 0x0c, 0x30, 0x0c, 0x10, 0x1e, 0x00, 0x00, 0x00, 0x00}; xfm-1.5.4/images/xfm_Sticky.xbm0000644000175000017500000000045610420717344013340 00000000000000#define xfm_Sticky_width 16 #define xfm_Sticky_height 16 static unsigned char xfm_Sticky_bits[] = { 0x00, 0x00, 0x80, 0xff, 0x80, 0xcd, 0x80, 0x8c, 0x00, 0x0c, 0x00, 0x0c, 0x00, 0x0c, 0x00, 0x0c, 0x00, 0x0c, 0x00, 0x0c, 0x00, 0x0c, 0x00, 0x0c, 0x00, 0x0c, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00}; xfm-1.5.4/images/xfm_file.xpm0000644000175000017500000000240610420717344013024 00000000000000/* XPM */ static char * xfm_file_xpm[] = { "32 32 5 1", " s background c None", ". c gray50", "X c white", "o c black", "O c grey", " .................. ", " .XXXXXXXXXXXXXXXX.o ", " .XXXXXXXXXXXXXXXX..o ", " .XXXXXXXXXXXXXXXX.O.o ", " .XXXXXXXXXXXXXXXX.OO.o ", " .XXXXXXXXXXXXXXXX.XOO.o ", " .XXXXXXXXXXXXXXXX.XXOO.o ", " .XXXXXXXXXXXXXXXX.ooooooo ", " .XXXXXXXXXXXXXXXXXOOOOOOo ", " .XXXXXXXXXXXXXXXXXOOOOOOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .OOOOOOOOOOOOOOOOOOOOOOOo ", " ooooooooooooooooooooooooo "}; xfm-1.5.4/images/xfm_dir.xpm0000644000175000017500000000251610420717344012665 00000000000000/* XPM */ static char * xfm_dir_xpm[] = { /* width height ncolors chars_per_pixel */ "32 32 5 1", /* colors */ " s background c None", ". c black", "X c #CECEFF", "o c white", "O c #9C9CFF", /* pixels */ " ", " ", " ", " ", " ", " ", " ", " ....... ", " .XXXXXXX. ", " .XXXXXXXXX. ", " .XXXXXXXXXXX. ", " .XXXXXXXXXXXXX............... ", ".XXXXXXXXXXXXXXXXXXXXXXXXXXXXX. ", ".ooooooooooooooooooooooooooooo. ", ".oXoXoXoXoXoXoXoXoXoXoXoXoXoXO. ", ".XoXoXoXoXoXoXoXoXoXoXoXoXoXoO. ", ".oXoXoXoXoXoXoXoXoXoXoXoXoXoXO. ", ".XoXoXoXoXoXoXoXoXoXoXoXoXoXoO. ", ".oXoXoXoXoXoXoXoXoXoXoXoXoXoXO. ", ".XoXoXoXoXoXoXoXoXoXoXoXoXoXoO. ", ".oXoXoXoXoXoXoXoXoXoXoXoXoXoXO. ", ".XoXoXoXoXoXoXoXoXoXoXoXoXoXoO. ", ".oXoXoXoXoXoXoXoXoXoXoXoXoXoXO. ", ".XoXoXoXoXoXoXoXoXoXoXoXoXoXoO. ", ".oXoXoXoXoXoXoXoXoXoXoXoXoXoXO. ", ".XoXoXoXoXoXoXoXoXoXoXoXoXoXoO. ", ".oXoXoXoXoXoXoXoXoXoXoXoXoXoXO. ", ".XoXoXoXoXoXoXoXoXoXoXoXoXoXoO. ", ".oXoXoXoXoXoXoXoXoXoXoXoXoXoXO. ", ".XoXoXoXoXoXoXoXoXoXoXoXoXoXoO. ", ".oXoXoXoXoXoXoXoXoXoXoXoXoXoXO. ", "............................... "}; xfm-1.5.4/images/xfm_files.xpm0000644000175000017500000000240710420717344013210 00000000000000/* XPM */ static char * xfm_files_xpm[] = { "32 32 5 1", " s background c None", ". c gray50", "X c white", "o c black", "O c grey", " ................ ", " .XXXXXXXXXXXXXX.o ", " ................X..o ", " .XXXXXXXXXXXXXX.o.O.o ", " ................X..oOO.o ", " .XXXXXXXXXXXXXX.o.O.oOO.o ", " .XXXXXXXXXXXXXX..oOO.oOO.o ", " .XXXXXXXXXXXXXX.O.oOO.ooooo ", " .XXXXXXXXXXXXXX.OO.oOO.oOOo ", " .XXXXXXXXXXXXXX.XOO.oooooOo ", " .XXXXXXXXXXXXXX.XXOO.oOOoOo ", " .XXXXXXXXXXXXXX.oooooooOoOo ", " .XXXXXXXXXXXXXXXOOOOOOoOoOo ", " .XXXXXXXXXXXXXXXOOOOOOoOoOo ", " .XXXXXXXXXXXXXXXXXXXXOoOoOo ", " .XXXXXXXXXXXXXXXXXXXXOoOoOo ", " .XXXXXXXXXXXXXXXXXXXXOoOoOo ", " .XXXXXXXXXXXXXXXXXXXXOoOoOo ", " .XXXXXXXXXXXXXXXXXXXXOoOoOo ", " .XXXXXXXXXXXXXXXXXXXXOoOoOo ", " .XXXXXXXXXXXXXXXXXXXXOoOoOo ", " .XXXXXXXXXXXXXXXXXXXXOoOoOo ", " .XXXXXXXXXXXXXXXXXXXXOoOoOo ", " .XXXXXXXXXXXXXXXXXXXXOoOoOo ", " .XXXXXXXXXXXXXXXXXXXXOoOoOo ", " .XXXXXXXXXXXXXXXXXXXXOoOoOo ", " .XXXXXXXXXXXXXXXXXXXXOoOoOo ", " .XXXXXXXXXXXXXXXXXXXXOoOooo ", " .XXXXXXXXXXXXXXXXXXXXOoOo ", " .XXXXXXXXXXXXXXXXXXXXOooo ", " .OOOOOOOOOOOOOOOOOOOOOo ", " ooooooooooooooooooooooo "}; xfm-1.5.4/images/xfm_symlnk.xpm0000644000175000017500000000245510420717344013426 00000000000000/* XPM */ static char * xfm_symlnk_xpm[] = { "32 32 6 1", " s background c None", ". c #7DF77DF77DF7", "X c white", "o c black", "O c #BEFBBEFBBEFB", "+ c #820782078207", " .................. ", " .XXXXXXXXXXXXXXXX.o ", " .XXXXXXXXXXXXXXXX..o ", " .XXXXXXXXXXXXXXXX.O.o ", " .XXXXXXXXXXXXXXXX.OO.o ", " .XXXXXXXXXXXXXXXX.XOO.o ", " .XXXXXXXXXXXXXXXX.XXOO.o ", " .XXXXXXXXXXXXXXXX.ooooooo ", " .XXXXXXXXXXXXXXXXXOOOOOOo ", " .XXXXXXXXXXXXXXXXXOOOOOOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", " .XXXXXXXXXXXXXXXXXXXXXXOo ", "++++++++++oXXXXXXXXXXXXXXXXOo ", "+XXXXXXXXXoXXXXXXXXXXXXXXXXOo ", "+XXXooooXXoXXXXXXXXXXXXXXXXOo ", "+XXXXoooXXoXXXXXXXXXXXXXXXXOo ", "+XXXooooXXoXXXXXXXXXXXXXXXXOo ", "+XXoooXoXXoXXXXXXXXXXXXXXXXOo ", "+XXooXXXXXoXXXXXXXXXXXXXXXXOo ", "+XXoXXXXXXoXXXXXXXXXXXXXXXXOo ", "+XXXoXXXXXoXXXXXXXXXXXXXXXXOo ", "+XXXXXXXXXoOOOOOOOOOOOOOOOOOo ", "ooooooooooooooooooooooooooooo "}; xfm-1.5.4/images/xfm_icon.xpm0000644000175000017500000000251710420717344013040 00000000000000/* XPM */ static char * xfm_icon_xpm[] = { /* width height ncolors chars_per_pixel */ "32 32 5 1", /* colors */ " s background c None", ". c black", "X c #CECEFF", "o c white", "O c #9C9CFF", /* pixels */ " ", " ", " ", " ", " ", " ", " ", " ....... ", " .XXXXXXX. ", " .XXXXXXXXX. ", " .XXXXXXXXXXX. ", " .XXXXXXXXXXXXX............... ", ".XXXXXXXXXXXXXXXXXXXXXXXXXXXXX. ", ".ooooooooooooooooooooooooooooo. ", ".oXoXoXoXoXoXoXoXoXoXoXoXoXoXO. ", ".XoXoXoXoXoXoXoXoXoXoXoXoXoXoO. ", ".oXoXoXoXoXoXoXoXoXoXoXoXoXoXO. ", ".XoXoXoXoXoXoXoXoXoXoXoXoXoXoO. ", ".oXoXoXoXoXoXoXoXoXoXoXoXoXoXO. ", ".XoXoXoXoXoXoXoXoXoXoXoXoXoXoO. ", ".oXoXoXoXoXoXoXoXoXoXoXoXoXoXO. ", ".XoXoXoXoXoXoXoXoXoXoXoXoXoXoO. ", ".oXoXoXoXoXoXoXoXoXoXoXoXoXoXO. ", ".XoXoXoXoXoXoXoXoXoXoXoXoXoXoO. ", ".oXoXoXoXoXoXoXoXoXoXoXoXoXoXO. ", ".XoXoXoXoXoXoXoXoXoXoXoXoXoXoO. ", ".oXoXoXoXoXoXoXoXoXoXoXoXoXoXO. ", ".XoXoXoXoXoXoXoXoXoXoXoXoXoXoO. ", ".oXoXoXoXoXoXoXoXoXoXoXoXoXoXO. ", ".XoXoXoXoXoXoXoXoXoXoXoXoXoXoO. ", ".oXoXoXoXoXoXoXoXoXoXoXoXoXoXO. ", "............................... "}; xfm-1.5.4/images/xfm_appmgr.xpm0000644000175000017500000000256210420717344013376 00000000000000/* XPM */ static char * xfm_appmgr_xpm[] = { /* width height num_colors chars_per_pixel */ "32 32 7 1", /* colors */ " s background c None", ". c #808000", "X c black", "o c #c0c0c0", "O c #808080", "+ c #ffff00", "@ c white", /* pixels */ " ", " ", " ....X ", " .o....X ", " .oXXXX.OX ......X ", " .oX .OX.X+@+..X ", " .oX....OXo.X.XXXX ", " .......oX+@@+XXXo.X.X.XX ", " ....XOoo@..X.XXXXXOXo.X.X.XX ", " X..+o.X..XXXXXOXOXOXOXo.X.X.XX ", "..X.XXo.XXOXOXOXOXOXOXOXo.X.X..X", ".@.X.XXo.XXOXOXOXOXOXO.OXo.X...X", ".@o.X.XXo.XXOXOXO.O.O.O.OXooX..X", ".@.o.X.XXo.XXO.O.O.O.O.o.o@oX..X", ".@o.o.XOOXo.X.O.O.o.o.o.o.@oX..X", ".@.o.o@.O.Xo.X.o.o.o.o.o.o@oXO.X", ".@o.o.@O.O.@oXo.o.o.o.o.o.@oX..X", ".@.o.o@.o.o@oX.o.o.o.O.O.O@oXO.X", ".@o.o.@o.o.@oXo.O.O.O.O.O.@oX..X", ".@.o.o@.o.o@oX.O.O.O.O.O.O@oXO.X", ".@o.o.@o.O.@oXO.O.O.O.O.O.Oo.X.X", ".@.o.o@.O.O@oX.O.O.O.O.O.O.XXX.X", ".@o.o.@O.O.@oXO.O.O.O.O.O.@oX..X", ".@.o.o@.O.O.@.XO.O.O.O.O.O@oX.XX", "..o.o.@O.O..XXX.O.O.O.....XXXX ", " X.o.o@.O.O@oX.O......XXXX ", " X.o.@O.O.@oX...XXXXX ", " X.o@.O.O@oXXXX ", " X...XXXXX ", " XXX ", " ", " "}; xfm-1.5.4/images/xfm_linksymbol.xpm0000644000175000017500000000055310420717344014271 00000000000000/* XPM */ static char * xfm_linksymbol_xpm[] = { /* width height ncolors chars_per_pixel */ "11 11 4 1", /* colors */ " s background c None", ". c #808080", "X c black", "o c white", /* pixels */ "..........X", ".oooooooooX", ".oooXXXXooX", ".ooooXXXooX", ".oooXXXXooX", ".ooXXXoXooX", ".ooXXoooooX", ".ooXooooooX", ".oooXoooooX", ".oooooooooX", "XXXXXXXXXXX"}; xfm-1.5.4/images/xfm_gzipsymbol.xpm0000644000175000017500000000067410420717344014311 00000000000000/* XPM */ static char *xfm_gzipsymbol_xpm[] = { /* width height ncolors chars_per_pixel */ "15 15 2 1", /* colors */ " c black", "f c white", /* pixels */ " ", " fffffffffffff ", " fff ff ", " ff ffff ff ", " ff ffff f ", " ff ffffffffff ", " ff ffffffffff ", " ff ffff f ", " ff ffffff fff ", " ff fffff fff ", " fff f ", " fffffffff fff ", " ffffffff ff ", " fffffffffffff ", " " }; xfm-1.5.4/images/xfm_bzipsymbol.xpm0000644000175000017500000000067310420717344014303 00000000000000/* XPM */ static char *xfm_bzipsymbol_xpm[] = { /* width height ncolors chars_per_pixel */ "15 15 2 1", /* colors */ " c black", "f c white", /* pixels */ " ", " fffffffffffff ", " fff fffffff ", " ffff ffffffff ", " fff ff ", " ffff fffff f ", " ffff ffffff f ", " ff ffff f ", " fffffffffff f ", " fffffffffff f ", " ff ffff f ", " fff ffff f ", " fff ff ", " fffffffffffff ", " " }; xfm-1.5.4/images/Makefile.am0000644000175000017500000000323610422432260012534 00000000000000MAINTAINERCLEANFILES = Makefile.in noinst_HEADERS = \ xfm_file.xbm xfm_files.xbm xfm_noentry32.xbm xfm_dir.xbm xfm_exec.xbm xfm_watch.xbm \ xfm_filemsk.xbm xfm_filesmsk.xbm xfm_noentrymsk32.xbm xfm_dirmsk.xbm xfm_execmsk.xbm xfm_watchmsk.xbm \ xfm_file_s.xbm xfm_files_s.xbm xfm_noentry_s.xbm xfm_dir_s.xbm xfm_exec_s.xbm \ xfm_filemsk_s.xbm xfm_filesmsk_s.xbm xfm_noentrymsk_s.xbm xfm_dirmsk_s.xbm xfm_execmsk_s.xbm \ xfm_lline.xbm xfm_tline.xbm xfm_fline.xbm xfm_cline.xbm \ xfm_larrow.xbm xfm_rarrow.xbm xfm_wavy_arrow.xbm \ xfm_tick.xbm xfm_notick.xbm xfm_excl.xbm \ xfm_suid.xbm xfm_Suid.xbm xfm_sticky.xbm xfm_Sticky.xbm \ \ xfm_file.xpm xfm_dir.xpm xfm_files.xpm xfm_symlnk.xpm \ xfm_icon.xpm xfm_appmgr.xpm \ xfm_linksymbol.xpm xfm_gzipsymbol.xpm xfm_bzipsymbol.xpm #bitmapsdir = $(pkgdatadir)/bitmaps pixmapsdir = $(pkgdatadir)/pixmaps CONTRIB_PIXMAPS = bluelogo.xpm bookshelf.xpm book.xpm calc2.xpm calc.xpm camera.xpm chess2.xpm chess3.xpm chess.xpm clip.xpm compress.xpm cycle.xpm editres.xpm emacs.xpm fileserver.xpm files.xpm find.xpm floppy.xpm games.xpm ghostview.xpm ghost.xpm hammer.xpm harddrive.xpm helpme.xpm home.xpm mag_glass.xpm magic.xpm mailfolder.xpm mail.xpm modem.xpm movies.xpm music.xpm news.xpm paintings.xpm pictures.xpm printer2.xpm printer3.xpm printer.xpm rc.xpm readme.xpm recycle.xpm sounds2.xpm sounds.xpm stuff.xpm tape_net.xpm tape.xpm term.xpm tools.xpm trash_empty.xpm trash_full.xpm video.xpm winzip.xpm writings.xpm xfig.xpm xlogo.xpm xmcd.xpm xplate.xpm xrolodex.xpm xterm.xpm devices.xpm #bitmaps_DATA = pixmaps_DATA = XfmLogo.xpm \ dev_disk.xpm dev_floppy.xpm dev_cdrom.xpm \ $(CONTRIB_PIXMAPS) EXTRA_DIST = $(pixmaps_DATA) xfm-1.5.4/images/Makefile.in0000644000175000017500000003054610744135557012571 00000000000000# Makefile.in generated by automake 1.10 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = images DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/xfmconfig.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(pixmapsdir)" pixmapsDATA_INSTALL = $(INSTALL_DATA) DATA = $(pixmaps_DATA) HEADERS = $(noinst_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COMPRESSIONLIBS = @COMPRESSIONLIBS@ CONFIG_VARIANT = @CONFIG_VARIANT@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ MAINTAINERCLEANFILES = Makefile.in noinst_HEADERS = \ xfm_file.xbm xfm_files.xbm xfm_noentry32.xbm xfm_dir.xbm xfm_exec.xbm xfm_watch.xbm \ xfm_filemsk.xbm xfm_filesmsk.xbm xfm_noentrymsk32.xbm xfm_dirmsk.xbm xfm_execmsk.xbm xfm_watchmsk.xbm \ xfm_file_s.xbm xfm_files_s.xbm xfm_noentry_s.xbm xfm_dir_s.xbm xfm_exec_s.xbm \ xfm_filemsk_s.xbm xfm_filesmsk_s.xbm xfm_noentrymsk_s.xbm xfm_dirmsk_s.xbm xfm_execmsk_s.xbm \ xfm_lline.xbm xfm_tline.xbm xfm_fline.xbm xfm_cline.xbm \ xfm_larrow.xbm xfm_rarrow.xbm xfm_wavy_arrow.xbm \ xfm_tick.xbm xfm_notick.xbm xfm_excl.xbm \ xfm_suid.xbm xfm_Suid.xbm xfm_sticky.xbm xfm_Sticky.xbm \ \ xfm_file.xpm xfm_dir.xpm xfm_files.xpm xfm_symlnk.xpm \ xfm_icon.xpm xfm_appmgr.xpm \ xfm_linksymbol.xpm xfm_gzipsymbol.xpm xfm_bzipsymbol.xpm #bitmapsdir = $(pkgdatadir)/bitmaps pixmapsdir = $(pkgdatadir)/pixmaps CONTRIB_PIXMAPS = bluelogo.xpm bookshelf.xpm book.xpm calc2.xpm calc.xpm camera.xpm chess2.xpm chess3.xpm chess.xpm clip.xpm compress.xpm cycle.xpm editres.xpm emacs.xpm fileserver.xpm files.xpm find.xpm floppy.xpm games.xpm ghostview.xpm ghost.xpm hammer.xpm harddrive.xpm helpme.xpm home.xpm mag_glass.xpm magic.xpm mailfolder.xpm mail.xpm modem.xpm movies.xpm music.xpm news.xpm paintings.xpm pictures.xpm printer2.xpm printer3.xpm printer.xpm rc.xpm readme.xpm recycle.xpm sounds2.xpm sounds.xpm stuff.xpm tape_net.xpm tape.xpm term.xpm tools.xpm trash_empty.xpm trash_full.xpm video.xpm winzip.xpm writings.xpm xfig.xpm xlogo.xpm xmcd.xpm xplate.xpm xrolodex.xpm xterm.xpm devices.xpm #bitmaps_DATA = pixmaps_DATA = XfmLogo.xpm \ dev_disk.xpm dev_floppy.xpm dev_cdrom.xpm \ $(CONTRIB_PIXMAPS) EXTRA_DIST = $(pixmaps_DATA) all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu images/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu images/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-pixmapsDATA: $(pixmaps_DATA) @$(NORMAL_INSTALL) test -z "$(pixmapsdir)" || $(MKDIR_P) "$(DESTDIR)$(pixmapsdir)" @list='$(pixmaps_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ echo " $(pixmapsDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pixmapsdir)/$$f'"; \ $(pixmapsDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pixmapsdir)/$$f"; \ done uninstall-pixmapsDATA: @$(NORMAL_UNINSTALL) @list='$(pixmaps_DATA)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(pixmapsdir)/$$f'"; \ rm -f "$(DESTDIR)$(pixmapsdir)/$$f"; \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(DATA) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(pixmapsdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-pixmapsDATA install-dvi: install-dvi-am install-exec-am: install-html: install-html-am install-info: install-info-am install-man: install-pdf: install-pdf-am install-ps: install-ps-am installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-pixmapsDATA .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ ctags distclean distclean-generic distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-pixmapsDATA install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ uninstall-am uninstall-pixmapsDATA # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xfm-1.5.4/images/XfmLogo.xpm0000644000175000017500000015611710420717344012617 00000000000000/* XPM */ static char *XfmLogo[] = { /* width height num_colors chars_per_pixel */ " 326 168 54 1", /* colors */ ". c #ffffff", "# c #ffffcc", "a c #ffccff", "b c #ffcccc", "c c #ffcc99", "d c #ff99cc", "e c #ff9999", "f c #ccffff", "g c #ccffcc", "h c #ccccff", "i c #cccccc", "j c #cccc99", "k c #cc99cc", "l c #cc9999", "m c #cc9966", "n c #cc6699", "o c #cc6666", "p c #cc6633", "q c #cc3366", "r c #cc3333", "s c #cc3300", "t c #cc0033", "u c #cc0000", "v c #99cccc", "w c #99cc99", "x c #9999cc", "y c #999999", "z c #999966", "A c #996699", "B c #996666", "C c #996633", "D c #993366", "E c #993333", "F c #993300", "G c #990033", "H c #990000", "I c #669999", "J c #669966", "K c #666699", "L c #666666", "M c #666633", "N c #663366", "O c #663333", "P c #660000", "Q c #336666", "R c #336633", "S c #333366", "T c #333333", "U c #333300", "V c #330000", "W c #003333", "X c #003300", "Y c #000033", "Z c #000000", /* pixels */ "........................LLTZZZZZZ.....................................................................................................................................................................................................................................................................................................", "........................LLTZZZZZZ.....................................................................................................................................................................................................................................................................................................", "........................LMZZZZZZZZTLLLTTZ.............................................................................................................................................................................................................................................................................................", "........................STZZZZZZZZTyLLTYUh#h#.........................................................................................................................................................................................................................................................................................", "........................TZZZZZZZZZLLzLZZZTLLLLTTZ.....................................................................................................................................................................................................................................................................................", "........................ZZZZZZZZZZZZZZZZZZTLLTTZTii#i.................................................................................................................................................................................................................................................................................", "........................ZZZZZZZZZZZZZTZTZTTTTZZZZTSLTTZ...............................................................................................................................................................................................................................................................................", "..........................iiZZZZZZZZZZZZZZZZZZZZZZTTTZZii#i...........................................................................................................................................................................................................................................................................", "...........................iZZZZZZZZZZZZZZZZZZZZZZZZZZZTLLKMTTZ.......................................................................................................................................................................................................................................................................", ".........................#.iyyyLLTLTZZZZZZZZZZZZZZZZZZZZTLLTTZTii#i...................................................................................................................................................................................................................................................................", "...........................iiiyyyLLLZZZZZZZZZZZZZZZZZZZZTTYZZZZTSLLLLLTTZ.............................................................................................................................................................................................................................................................", ".............................iiiyyyLTZZZZZZZZZZZZZZZZZZZZZZZZZZZTLLyLTTTZii#i.........................................................................................................................................................................................................................................................", "...............................iiixjYZZZZZZZZZZZZZZZZZZZZZZZZZZZZTLLLTZZZZZZZi........................................................................................................................................................................................................................................................", ".................................i.i#iTZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZiiii.....................................................................................................................................................................................................................................................", "......................................TTZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZyyii#h.......ZZZ.........................................................................................................................................................................................................................................", "......................................MTZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZLyyxi#.......ZZZ.i.i.....................................................................................................................................................................................................................................", "......................................TYZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZLMLyih.......ZZTTTLLyLyLyLLTTZ...........................................................................................................................................................................................................................", "......................................TZZZZZZZZZZZZZZZZZZZZZZZZZZTTTLTZZZZZZZTSLzii.......ZZYTzxiiyyyyLLTZTii#i.......................................................................................................................................................................................................................", "......................................ZUZZZZZZZZZZZZZZZZZZZZZZZZZLTTLTZZZZZZZTLLKii.......ZUTTyiiiiyyyLTZZZTLKLLLLLLLLLTTZZ.....................................................ZZZZZTTLLLMTZ.........................................................................................................................................", "........................................ZZZZZZZZZZZZZZZZZZZZZZZZZTLTLLyLyLLLSMTLzii.......ZZYTLLTZZZZZZZZZZZTLLLLLyyyKMTZZZii.i.................................................ZZZZTTyiiyLTYii#i.....................................................................................................................................", "........................................YZZZZZZZZZZZZZZZZZZZZZZZZZZLLyyyxyLLLLLLyi#.......ZZUZTZZZZZZZZZZZZZUTTTLMLLLLTZZZZiiiii..........................................ZZZZZZZZZZTTy.ixTZZZTYZi....................................................................................................................................", "........................................UZZZZZZZZZZZZZZZZZZZZZZZZZZMLyiiiiyyyLyyxih.........iiZZZZZZZZZZZZZZZZZZZZZZZZZZZZZyLyiii.........................................TZTZZZZZZZTLyxMZZZZZZZZiiii.................................................................................................................................", "........................................ZYZZZZZZZZZZZZZZZZZZZZZZZZZSLyii#iiixijii#...........iZZZZZZZZZZZZZZZZZZZZZZZZZZZZZLLLyi......................................TLLLTZZZZZZZZZZTyyyZZZZZZZZZZiii................................................................................................................................", ".........................................#TZZZZZZZZZZZZZZZZZZZZZZZZMLLyih#.i#hi.i..........#.iyyyLLLZZZZZZZZZZZZZZZZZZZZZZZMTLzxi.....................................yxiLTZZZZZZLyLLMLLLZZZZZZZZZZyyiii..............................................................................................................................", "..........................................LTTZZZZZZZZZZZZZZZZZZZZZZZZLyii....................iiiyyLLTTTZZZZZZZZZZZZZZZZZZZZTLLKi#.................................TLyi#iiTZZZZZZZLLLSLLLTZZZZZZZZZZZZyi#..............................................................................................................................", "..........................................LLTZZZZZZZZZZZZZZZZZZZZZZZZLLiii.....................#iixyLLTZZZZZZZZZZMTTTSTMTSMSTLzxi.................................xi.iiiLZZZZLLLLTTMLLKLMZZZZZZZZZZZZKyiii............................................................................................................................", "..........................................LLTZZZZZZZZZZZZZZZZZZZZZZZZLLyii.......................iiiyLTZZZZZZZZZZSTLMLLLLLLLLLyi#...............................Ly..iiyMZZZZZLTTTLLLLyyySZZZZZZZZZZZZLLyi.............................................................................................................................", "..........................................yLTZZZZZZZZZZZZZZZZZZZZZZZZTLyyii.......................#iyLTZZZZZZTTTTMSTLLLLKzKzyyxih...............................x#..LZZZZZZZZLTLLLKyyiiyLZZZZZZZZZZZZLLKyii...........................................................................................................................", "..........................................LLTZZZZZZZZZZZZZZZZZZZZZZZZTLLyi#.......................SyyyZZZZZZZLTLTLLLLyiijxiyiii#..............................Lj..iLTZZZZZZZZTTLLyyiTy#iyZZZZZZZZZZZZZZLyii...........................................................................................................................", "..........................................LTZZZZZZZZZZZZZZZZZZZZZZZZZTTLyxi.......................ziiyZZZZZTTTLTLLLyyiii#i.ii.i...............................x...LZZZZZZZZTLTTLzyi.LiiiLZZZZZZZZZZZZZZLLiii..........................................................................................................................", "..........................................TTZZZZZZZZZZZZZZZZZZZZZZZZZTLMKjh.....................TLiiiTZZZZZMSTMLKyiiii......................................Ly..iLTZZZZZZZZTTLTLyii.yiiLZZZZZZZZZZZZZZZMLyi#..........................................................................................................................", "..........................................TZZZZZZZZZZZZZZZZZZZZZZZZZZTTLzii#....................LiiiTZZZZMSTMSLzyyi.i.......................................x#..LZZZZZZZZTLTTLLKyii.yiyZZZZZZZZZZZZZZZZSLLxii.........................................................................................................................", "..........................................ZTZZZZZZZZZZZZZZZZZZZZZZZZZZZLKy.h....................Ki.LZZZZZSTMSLLyii........................................Ty..iLTZZZZZZZZTTLTLLyi...yyLZZZZZZZZZZZZZZZZTLLyi..........................................................................................................................", "............................................TZZZZZZZZZZZZZZZZZZZZZZZZZZMyyi#....................yiiZZZZSMTSMLKyi.i........................................Li..LZZZZZZZZZZMTTLzyiii..yLLZZZZZZZZZZZZZZZZTTLzxi.........................................................................................................................", "............................................TTZZZZZZZZZZZZZZZZZZZZZZZZZSLyii..................TyyiLZZZZMTLTLLyii..........................................y.iLZZZZZZZZZZZSMLLyii....LLTZZZZZZZZZZZZZZZZMSLLii.........................................................................................................................", "............................................MTZZZZZZZZZZZZZZZZZZZZZZZZZMLKyii.................zyiyZZZZZSTTLyyi#i..........................................i#iZZZZZZZZZZZZTTLKyi.....LTZZZZZZZZZZZZZZZZZTTLyii.........................................................................................................................", "............................................TTZZZZZZZZZZZZZZZZZZZZZZZZZTLLyi#...............TKyiyTZZZZZTMLLyii..........................................Li.ixZZZZZZZZZZZZTLMKii.....TTZZZZZZZZZZZZZZZZZMSMKjh#........................................................................................................................", "............................................TZZZZZZZZZZZZZZZZZZZZZZZZZZTTLyxi...............ziiyTZZZZSMSTLLyih..........................................y..iLZZZZZZZZZZMTSTLzii#....TZZZZZZZZZZZZZZZZTSTTLyii.........................................................................................................................", "............................................ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZLLii.............TLiiiTZZZZZTTMSLyi#.........................................Ty..izYZZZZZZZZZZSTMSLyih.....ZZZZZZZZZZZZZZZZZMTLMLyii.........................................................................................................................", "..............................................ZZZZZZZZZZZZZZZZZZZZZZZZZZZMyyii............LyiiTZZZZMLTSMLyyii.........................................Li.hLZZZZZZZZZZZZTTMLKyii.......ZZZZZZZZZZZZZZZTTSLLyi..........................................................................................................................", "..............................................TZZZZZZZZZZZZZZZZZZZZZZZZZZSLyii............LyiLZZZZZTTLTLLyih..........................................y.iLUZZZZZZZZZZZZMSLLyi#........ZZZZZZZZZZZZZZZSMLLyii..........................................................................................................................", "..............................................ZZZZZZZZZZZZZZZZZZZZZZZZZZZMLyyii...........LLLZZZZSLTSMLKyii#..........................................i#iZZZZZZZZZZZZZZTTSzyih.........iZZZZZZZZZTSTMTTLLiii..........................................................................................................................", "..............................................ZTZZZZZZZZZZZZZZZZZZZZZZZZZZZLyii.........ZYTTZZZZZMTTLLLyii..........................................Tx#ixZZZZZZZZZZZZZZTMLKii.........#hZZZZZZZZZMTLTLLLyii...........................................................................................................................", "...............................................#TZZZZZZZZZZZZZZZZZZZZZZZZZZLLiii........ZUZZZZZZZSMTLzyii...........................................Li.iLZZZZZZZZZZZZSMSTLzii#..........iiyLLLTLTSMSLLzyxi............................................................................................................................", "...............................................hLTTZZZZZZZZZZZZZZZZZZZZZZZZLLyii......ZTYTZZZZZZZTSLLyii............................................y.iLZZZZZZZZZZZZZTTMLLyih............iiyyLLLLLLLLyxii#h...........................................................................................................................", "................................................LLTZZZZZZZZZZZZZZZZZZZZZZZZTLyyii.....TTTZZZZLLLTMTLzxii............................................iiiZZZZZZZZZZZZZZSTTLKyii.............iiyyyLyLyyyiii.#............................................................................................................................", "................................................LLTZZZZZZZZZZZZZZZZZZZZZZZZTLLyi....TTLLTZZZZLTSMSLLyi#...........................................Li.ixZZZZZZZZZZZZZZMSMLyi#...............iiiyixjiii#................................................................................................................................", "................................................yLTZZZZZZZZZZZZZZZZZZZZZZZZTTLzxi...TLzLTZZLLLTLLLLyxii...........................................y..#LZZZZZZZZZZZZZZTTLyyih................#h#i.iih#h................................................................................................................................", "................................................LLTZZZZZZZZZZZZZZZZZZZZZZZZTLLKji...TLLYZZZLLTLLLyiii...........................................Ty..iLTZZZZZZZZZZZZZZTLTyy#...........................................................................................................................................................", "................................................LTZZZZZZZZZZZZZZZZZZZZZZZZZTTMyii...TTTZZZZSMTLLyiii.i..........................................Li#hLZZZZZZZZZZZZZZZZTTLyxh#..........................................................................................................................................................", "................................................TTZZZZZZZZZZZZZZZZZZZZZZZZZZZLKy#hZZZZZZZZZTSMLyii..............................................yihLUZZZZZZZZZZZZZZZZMSMyji...........................................................................................................................................................", "................................................TZZZZZZZZZZZZZZZZZZZZZZZZZZZZLzxi.ZTZZZZZLTMSLzxii..............................................yiyZZZZZZZZZZZZZZZZTSTTLKii...........................................................................................................................................................", "................................................ZTZZZZZZZZZZZZZZZZZZZZZZZZZZZSLyZZZZZZZZZLTLTLyi#...............................................yyLZZZZZZZZZZZZZZZZMTLLLyii...........................................................................................................................................................", "..................................................ZZZZZZZZZZZZZZZZZZZZZZZZZZZMLzZZTZZZZLLMSMLKyii...............................................yyLZZZZZZZZZZZZZZZZTTTLLyii...........................................................................................................................................................", "..................................................ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZLZZZZZZZLSTLLLyih................................................yyLZZZZZZZZZZZZZZZZSMLLyi.............................................................................................................................................................", "..................................................TZZZZZZZZZZZZZZZZZZZZZZZZZZZZLTZZZZLLLMTLyyii#................................................iyLZZZZZZZZZZZZZZZZTSTyyii............................................................................................................................................................", "..................................................ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZLLTSLLyii................................................TyiiyZZZZZZZZZZZZZZZZMTLyx#.............................................................................................................................................................", "....................................................TZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZMSMLzyii.................................................LiiiLZZZZZZZZZZZZZZZZTTLLii.............................................................................................................................................................", "....................................................MTTZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZLTLLyx#..................................................yiiLZZZZZZZZZZZZZZZZZLTLyx#.............................................................................................................................................................", "....................................................LLTZZZZZZZZZZZZZZZZZZZZZZZZZZZZSMSTLzxii..................................................yiyZZZZZZZZZZZZZZZZTTTTLzxh#............................................................................................................................................................", "....................................................LLTZZZZZZZZZZZZZZZZZZZZZZZZZZZZMSMSLyii...................................................yiyZZZZZZZZZZZZZZZZLTLMLyi#.......................................ZZZ.................TLyyyLyLLLTTZ...........................TLyyyLyLyLLLTTZ...........................................", "....................................................LTZZZZZZZZZZZZZZZZZZZZZZZZZZZTSTMTLyyii...................................................iyyZZZZZZZZZZZZZZZZTTSLLyii.......................................TZZ.i.i.............yiiiyLyLLTTZZii#i.......................yiiiyyLLLLLTTZZii#i.......................................", "....................................................TTZZZZZZZZZZZZZZZZZZZZZZZZZZZMTSLLLyi...................................ZTZTZZZZZZZZZTTLx#.iyZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZTTLyyLyLLyLyLyLyLLTTZZiiii#h.....TLLyyii.iyLLTTTZZZZZZiii................TTLyyii.iyLLTLTTTZZZZZZiii......................................", "....................................................TZZZZZZZZZZZZZZZZZZZZZZZZZZZZTMTLLyiii..................................TTTTTZZZZZZYUTyii...LZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZYTLiiiyLyLLLLLLLLLMZZZZiiyxi#.....LyiiiiiiLZZZZZZZZZZZZyyii#..............TLiiiiiiLZZZZZZZZZZZZZZyyii#....................................", "....................................................ZTZZZZZZZZZZZZZZZZZZZZZZZZZZZZZLLyii....................................ZTTTZZZZZZZZTLy..ixLUZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZULx#.iyLTMSMSMSMTTZZZZZyLyyih...ZTyi.iiiiyZZZZZZZZZZZZZZZyii..............Ly#..iiyZZZZZZZZZZZZZZZZZyii....................................", "......................................................TZZZZZZZZZZZZZZZZZZZZZZZZZZZZLLyii....................................TTTZZZZZZZZZZLyyTZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZLyxTZZZZZZZZZZZZZZZZZZLLLzii...TMyyLZZZZZZZZZZZZZZZZZZZZKyiii............SyyZZZZZZZZZZZZZZZZZZZZZZKyiii..................................", "......................................................TTZZZZZZZZZZZZZZZZZZZZZZZZZZZMLyii....................................ZZZZZZZZZZZZZTyyLZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZMyyLZZZZZZZZZZZZZZZZZZLMLKii.ZZZTTTZZZZZZZZZZZZZZZZZZZZZZZyii........ZZZUTTYZZZZZZZZZZZZZZZZZZZZZZLLyi...................................", "......................................................LTZZZZZZZZZZZZZZZZZZZZZZZZZZZTLKyii...................................ZZZZZLMLTLTLLTLLMZZZZZZZZZZZZZZZZZZZZSTMSMSLMSLTLMSMLTLMSLMSLMLSLTLLLZZZZZZZZZZZZZZZZZZSTLzii.ZZZYZZZZZZZZZZZZZZZZZZZZZZZZZyyii#......ZZYZUZZZZZZZZZZZZZZZZZZZZZZZZLLKyii.................................", "......................................................TTZZZZZZZZZZZZZZZZZZZZZZZZZZZZZLyii...................................ZZZZZLSTLMLSLLLLTZZZZZZZZZZZZZZZZZZZZMTSMSMLLLLLLLLLLLLLLLLLLSLMLLyLMZZZZZZZZZZZZZZZZZZTMLZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZLLyih....ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZLyii.................................", "......................................................TZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZLLiii....................................#xyLMSLLLzLyLLTZZZZZZZZZZZZZZZZZZZZSMTLLLLyLyLKzKLKzKLyLzKzyLyKzxyLZZZZZZZZZZZZZZZZMTTSLZZZZZZZiyzLLSMZZZZZZZZZZZZZZZZZZZSLyyii...ZZZZZZZyyLLLZZZZZZZZZZZZZZZZZZZZZLLiii................................", "......................................................ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZMLyii....................................hiyLLLLyxiixzLSZZZZZZZZZZZZZZZZZZZZTTLLyxjxjxijxijixjixixjxiiyTyiiyZZZZZZZZZZZZZZZZSTLTLZZZZZZZyKLLMLLTTTZZZZZZZZZZZZZZZZMTLyi#...ZZZZZZZLLTLTZZZZZZZZZZZZZZZZZZZZZMLyi#................................", "........................................................ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZTLyyii...................................#iyyyyyiii#iyLTZZZZZZZZZZZZZZZZZZZZSTLzyiih#i.i#h#i.i#i#h#ii#.LiiiLZZZZZZZZZZZZZZZZTTMLyZZZZZZZLLSLLLyLLTZZZZZZZZZZZZZZZZSTLyxi...ZZZZZLLLTLLLLyZZZZZZZZZZZZZZZZZZZSLLxii...............................", "........................................................TZZZZZZZZZZZZZZZZZZZZZZZZZZZZSMLyi#....................................hiiiii#....KzSZZZZZZZZZZZZZZZZZZZZMTLKii.....................yiiLZZZZZZZZZZZZZZZZZMSLZZZZZZZZZMLMLyyxzLTZZZZZZZZZZZZZZZZZZLLiZTZTZZZZZLLTLLLyiyLTTZZZZZZZZZZZZZZZZTLLyi................................", "........................................................ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZTTLyxi......................................i#h#h....yLMZZZZZZZZZZZZZZZZZZTTSTLyjh#....................yiyZZZZZZZZZZZZZZZZZZTTLZZZZZjKLMSTLyyihzKTZZZZZZZZZZZZZZZZZZLzyTTTTZZZiLLLTLLyii#KLTZZZZZZZZZZZZZZZZTTLzxi...............................", "........................................................ZTZZZZZZZZZZZZZZZZZZZZZZZZZZZSMLLii...............................................yyLZZZZZZZZZZZZZZZZZZMTMLLyii.....................yyLZZZZZZZZZZZZZZZZZZTZZZZZZZyLLSMLLyii.LLLZZZZZZZZZZZZZZZZZZSLyYTTTZZZyLLTLyyii..yzLZZZZZZZZZZZZZZZZMSLLii...............................", "..........................................................TZZZZZZZZZZZZZZZZZZZZZZZZZZTTLzih#..............................................iyLZZZZZZZZZZZZZZZZZZTSTLLyih.....................zKLZZZZZZZZZZZZZZZZZZTZZZZZiyLLLLLKyyi..yLTZZZZZZZZZZZZZZZZZZMLLUTTZZZZLLLLLyihi..iyLZZZZZZZZZZZZZZZZTTLyii...............................", ".........................................................iLTTZZZZZZZZZZZZZZZZZZZZZZZZZZLKy#h............................................TyiiyZZZZZZZZZZZZZZZZZZTLTLyi#......................KzTZZZZZZZZZZZZZZZZZZZZZZZZyKLLLLyjii#..yLLZZZZZZZZZZZZZZZZZZTLLZZZZZZZMSMLyii..TyiiyZZZZZZZZZZZZZZZZMSMKjh#..............................", "..........................................................LLTZZZZZZZZZZZZZZZZZZZZZZZZZZLzxi#............................................LiiiLZZZZZZZZZZZZZZZZZZTTLzxii......................yLLZZZZZZZZZZZZZZZZZZZZZZzyLLMLKyiii.h..zKTZZZZZZZZZZZZZZZZZZTTLZZZZZLMSTLyyi#..LiiiLZZZZZZZZZZZZZZZZTTLzii...............................", "..........................................................LLTZZZZZZZZZZZZZZZZZZZZZZZZZZTLyii............................................yiiLZZZZZZZZZZZZZZZZZZZLTLKjh.......................yySZZZZZZZZZZZZZZZZZZZZZZLLLLLLyii......yyLZZZZZZZZZZZZZZZZZZSZZZZZZZLTLTLyii...yiiLZZZZZZZZZZZZZZZZZSMLKii...............................", "..........................................................yKMZZZZZZZZZZZZZZZZZZZZZZZZZZLLKyii...........................................yiyZZZZZZZZZZZZZZZZZZZZTTLzii#......................iyLZZZZZZZZZZZZZZZZZZZZZZLLTLyyihi......iyLZZZZZZZZZZZZZZZZZZMZZZZZyLLLTLyyih...yiyZZZZZZZZZZZZZZZZZZTTLLii...............................", "..........................................................LLTZZZZZZZZZZZZZZZZZZZZZZZZZZZZLyii...........................................yyLZZZZZZZZZZZZZZZZZZZZLTLKii.....................TyiiyZZZZZZZZZZZZZZZZZZZZZZTTLLyii......TyiiyZZZZZZZZZZZZZZZZZZZZZZZZyLLTLLyi#....yyLZZZZZZZZZZZZZZZZZZTLLyx#...............................", "..........................................................yzSZZZZZZZZZZZZZZZZZZZZZZZZZZZZLLiii..........................................yyLZZZZZZZZZZZZZZZZZZTTTTLzii.....................LiiiLZZZZZZZZZZZZZZZZZZZZTTLTLzyi#......LiiiLZZZZZZZZZZZZZZZZZZZZZZKyLLLLyyihi....zKLZZZZZZZZZZZZZZZZZZTTLLii...............................", "..........................................................KLMZZZZZZZZZZZZZZZZZZZZZZZZZZZZLLyii..........................................yyLZZZZZZZZZZZZZZZZZZLTLLLyii.....................yiiLZZZZZZZZZZZZZZZZZZZZZLTTLLyii.......yiiLZZZZZZZZZZZZZZZZZZZZZZZLLLLLLyii......KzTZZZZZZZZZZZZZZZZZZTLLLii...............................", "..........................................................yLTZZZZZZZZZZZZZZZZZZZZZZZZZZZZTLyyii.........................................xyLZZZZZZZZZZZZZZZZZZTTTLLxii.....................yiyZZZZZZZZZZZZZZZZZZZZTTTLTLLxii.......yiyZZZZZZZZZZZZZZZZZZZZZZZZMLTLKyii#......zKTZZZZZZZZZZZZZZZZZZTTLyii...............................", "..........................................................LSUZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZLyii.......................................Ty#iyZZZZZZZZZZZZZZZZZZTLTLyi#......................yiyZZZZZZZZZZZZZZZZZZZZLTTLLLyi#........yyLZZZZZZZZZZZZZZZZZZZZZZZZTSMLyii........KLMZZZZZZZZZZZZZZZZZZTLTyy................................", "..........................................................MTZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZLLiii......................................LiiiLZZZZZZZZZZZZZZZZZZTTLyyih......................ixLZZZZZZZZZZZZZZZZZZZZLTTLyyiih........KzLZZZZZZZZZZZZZZZZZZZZZZTMSMLKjih........yLSZZZZZZZZZZZZZZZZZZTTLzxi...............................", "........................................................ZTTZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZLLyii......................................yiiLZZZZZZZZZZZZZZZZZZZLTLLii.....................Ty#iyZZZZZZZZZZZZZZZZZZZZTMSLyii..........yLTZZZZZZZZZZZZZZZZZZZZZZSTTLLyii.........yLMZZZZZZZZZZZZZZZZZZLTLKii...............................", "........................................................ZZTZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZTLyyii.....................................yiyZZZZZZZZZZZZZZZZZZTTMTLyii#....................LiiiLZZZZZZZZZZZZZZZZZZZZSTLLyi#..........zKTZZZZZZZZZZZZZZZZZZZZZZTMTLLyi#.........yzSZZZZZZZZZZZZZZZZZZTTLzii...............................", "......................................................TTTYZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZTLLyi#.....................................yyLZZZZZZZZZZZZZZZZZZSTSLLyih.....................yiiLZZZZZZZZZZZZZZZZZZZZZTMLyii...........KzTZZZZZZZZZZZZZZZZZZZZZZTSLLyii..........yKMZZZZZZZZZZZZZZZZZZMSLLii...............................", "......................................................TMTUZZZKZZZZZZZZZZZZZZZZZZZZZZZZZZZZZTTLyxi.....................................zKLZZZZZZZZZZZZZZZZZZTMTLLyii.....................yiyZZZZZZZZZZZZZZZZZZZZTMTSMKii...........yLLZZZZZZZZZZZZZZZZZZZZLTMTLLiih..........ixLZZZZZZZZZZZZZZZZZZTTLKii...............................", "....................................................TLyyTZZZZLZZZZZZZZZZZZZZZZZZZZZZZZZZZZZTLMKii.....................................KzTZZZZZZZZZZZZZZZZZZTLTLyi#......................yiyZZZZZZZZZZZZZZZZZZZZSTLTLyii...........yLTZZZZZZZZZZZZZZZZZZZZTTSMLyii.........TyiiyZZZZZZZZZZZZZZZZZZMSMyjh...............................", "....................................................LyiyTZZLLMSMYZZZZZZZZZZZZZZZZZZZZZZZZZZTTLzii.....................................zKTZZZZZZZZZZZZZZZZZZTTLyyih......................ixLZZZZZZZZZZZZZZZZZZZZTMTLyyii...........yLLZZZZZZZZZZZZZZZZZZMSTMSLyyi.#........LiiiLZZZZZZZZZZZZZZZZZZTTLLii...............................", "....................................................LxiLZZZLLTLLMTTZZZZZZZZZZZZZZZZZZZZZZZZZZLLx#h....................................KLMZZZZZZZZZZZZZZZZZZLTLLii.....................Ty#iyZZZZZZZZZZZZZZZZZZZZTSLLyi#............yyMZZZZZZZZZZZZZZZZZZTTLTLLyii..........yiiLZZZZZZZZZZZZZZZZZZZLTLyy#...............................", "....................................................LyyZZZZLTTLLLLTZZZZZZZZZZZZZZZZZZZZZZZZZZLyyi#....................................yLSZZZZZZZZZZZZZZZZZZTTLyjh#....................LiiiLZZZZZZZZZZZZZZZZZZSMTTLyyih............yxLZZZZZZZZZZZZZZZZZZTTMLLyi#h..........yiyZZZZZZZZZZZZZZZZZZTTTTLyii...............................", "....................................................LLTZZZZTLSLyLLTZZZZZZZZZZZZZZZZZZZZZZZZZZTLyii....................................yLMZZZZZZZZZZZZZZZZZZMSLLii.....................yiiLZZZZZZZZZZZZZZZZZZZTTLTLyii...........Ty#iyZZZZZZZZZZZZZZZZZZLTLLyii............yiyZZZZZZZZZZZZZZZZZZLTLLLyx#...............................", "....................................................TTZZZZZTTMyyLTZZZZZZZZZZZZZZZZZZZZZZZZZZZTLyyii...................................yzSZZZZZZZZZZZZZZZZZZTTLKii.....................yiyZZZZZZZZZZZZZZZZZZZZSTMLLyi#...........LiiiLZZZZZZZZZZZZZZZZZZTTLLxii............ixLZZZZZZZZZZZZZZZZZZTTTLLyih...............................", "..................................................ZTTZZZZZZMSLKjTTZZZZZZZZZZZZZZZZZZZZZZZZZZZZZLyii...................................yKMZZZZZZZZZZZZZZZZZZTLMyy......................yyLZZZZZZZZZZZZZZZZZZZZMTLLyii............yiiLZZZZZZZZZZZZZZZZZZZSMLyjh...........Ty#iyZZZZZZZZZZZZZZZZZZTLTLyi#................................", "..................................................TTTZZZZLLTTLyxTZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZLLiii..................................jxLZZZZZZZZZZZZZZZZZZTTLzxi#....................zKLZZZZZZZZZZZZZZZZZZZZSTSzxii............yiyZZZZZZZZZZZZZZZZZZZZTTLLii#..........LiiiLZZZZZZZZZZZZZZZZZZTTLzxii................................", "................................................TTLLTZZZZTTLMLyiZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZLLyii................................TyiiyZZZZZZZZZZZZZZZZZZSMSyii.....................yLTZZZZZZZZZZZZZZZZZZZZTMLyy..............yiyZZZZZZZZZZZZZZZZZZZZTLLKii...........yiiLZZZZZZZZZZZZZZZZZZZLTLKjh.................................", "................................................TLyLZZZLLLTSLLyi..ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZTLyyii...............................LiiiLZZZZZZZZZZZZZZZZZZTTLLii.....................zKMZZZZZZZZZZZZZZZZZZZZSTLLii.............ixLZZZZZZZZZZZZZZZZZZLTTTLzii...........yiyZZZZZZZZZZZZZZZZZZZZTTLzii.................................", "................................................TLLTZZZLMSMLLyi#h.TZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZLyii...............................yiiLZZZZZZZZZZZZZZZZZZZMSLyx#.....................yLTZZZZZZZZZZZZZZZZZZZZMTLyx#...........Ty#iyZZZZZZZZZZZZZZZZZZTTLMLyii...........yyLZZZZZZZZZZZZZZZZZZZZLTLKii.................................", "................................................TTTZZZZMSTLyyii..#YZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZLLiii..............................yiyZZZZZZZZZZZZZZZZZZSTMTLLii.....................yKLZZZZZZZZZZZZZZZZZZTTSTLyyh#..........LiiiLZZZZZZZZZZZZZZZZZZTTSLLxii...........yyLZZZZZZZZZZZZZZZZZZTTTTLzii.................................", "................................................ZZZZZZZSMLLyii....ZUZZZZZZZZZZZZZZZZZZZZZZZZZZZZZLLyii..............................yyLZZZZZZZZZZZZZZZZZZMTSMLyii.....................yzLZZZZZZZZZZZZZZZZZZMTMLLyii...........yiiLZZZZZZZZZZZZZZZZZZZLTLLyi#............yyLZZZZZZZZZZZZZZZZZZLTLLLyx#.................................", "................................................TZZZZLMTTLLxii......TZZZZZZZZZZZZZZZZZZZZZZZZZZZZTLyyii.............................yyLZZZZZZZZZZZZZZZZZZTLTLyyii.....................xyLZZZZZZZZZZZZZZZZZZTSTLLyih...........yiyZZZZZZZZZZZZZZZZZZZZTTMyyih............xyLZZZZZZZZZZZZZZZZZZTTTSzyii.................................", "..............................................ZZZZZZZLSTLLyi#......hMTTZZZZZZZZZZZZZZZZZZZZZZZZZZTLLyi..............................yyLZZZZZZZZZZZZZZZZZZTTLLyi.....................Ty#iyZZZZZZZZZZZZZZZZZZTMLLyi#............yyLZZZZZZZZZZZZZZZZZZZZTLSzx#...........Ty#iyZZZZZZZZZZZZZZZZZZTLMLyih..................................", "..............................................UYZZZZZMLTLLyih.......LLTZZZZZZZZZZZZZZZZZZZZZZZZZZTTLzxi#............................iyLZZZZZZZZZZZZZZZZZZSTMKyii....................LiiiLZZZZZZZZZZZZZZZZZZSTLzxii............yyLZZZZZZZZZZZZZZZZZZTLTTLLih#..........LiiiLZZZZZZZZZZZZZZZZZZTTLyyi#..................................", "............................................TYUZZZZZZSMLLyii........LLTZZZZZZZZZZZZZZZZZZZZZZZZZZZZLKjh...........................TyiiyZZZZZZZZZZZZZZZZZZMSLzx#.....................yiiLZZZZZZZZZZZZZZZZZZZTMSyy..............yyLZZZZZZZZZZZZZZZZZZTTLLLyii...........yiiLZZZZZZZZZZZZZZZZZZZSMSzx#h..................................", "............................................TLTTZZZLLSTLLii#........LTZZZZZZZZZZZZZZZZZZZZZZZZZZZZZMyyii..........................LiiiLZZZZZZZZZZZZZZZZTTTTLKii.....................yiyZZZZZZZZZZZZZZZZZZMTSTLzii#............xyLZZZZZZZZZZZZZZZZZZTTTLyyii...........yiyZZZZZZZZZZZZZZZZZZZZTTLKii...................................", "..........................................TLyyTZZZZLMSMLyii.........TTZZZZZZZZZZZZZZZZZZZZZZZZZZZZZSLyii..........................yiiLZZZZZZZZZZZZZZZZZLTLMLyii.....................yyLZZZZZZZZZZZZZZZZZZSTMLLyx............Ty#iyZZZZZZZZZZZZZZZZZZLTLLyii............yyLZZZZZZZZZZZZZZZZZZZZMSLzii...................................", "..........................................LyiyTZZzLSMSLyyii.........TZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZTLyyii.........................yiyZZZZZZZZZZZZZZZZZZTTSLzyii.....................yyLZZZZZZZZZZZZZZZZZZTTTLKyii...........LiiiLZZZZZZZZZZZZZZZZZZTTLLyi.............zKLZZZZZZZZZZZZZZZZZZZZTTLLii...................................", "..........................................Lx#SZZZLSMSLLyi...........ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZLyii.........................yyLZZZZZZZZZZZZZZZZZZTMSLyih......................yKLZZZZZZZZZZZZZZZZZZMSLLyi#............yiiLZZZZZZZZZZZZZZZZZZZTLLyx#.............KzTZZZZZZZZZZZZZZZZZZZZMSLyx#...................................", "..........................................LyyZZZZLTMLzyiii............ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZLLiii........................yyLZZZZZZZZZZZZZZZZZZTTLyyi#......................iyLZZZZZZZZZZZZZZZZZZTTLzxii............yiyZZZZZZZZZZZZZZZZZZZZTTLzxi#............zKTZZZZZZZZZZZZZZZZZZZZTTLLii...................................", "..........................................LLMZZZZTSMLyx#..............TZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZLLyii........................yyLZZZZZZZZZZZZZZZZZZLTLLii.....................Ty#iyZZZZZZZZZZZZZZZZZZTMSzx#.............yyLZZZZZZZZZZZZZZZZZZZZTMSyii.............KLMZZZZZZZZZZZZZZZZZZZZMSLzx#...................................", "..........................................LLZZZZZMTSyyih..............ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZTLyyii.......................xyLZZZZZZZZZZZZZZZZZZTTLKii.....................LiiiLZZZZZZZZZZZZZZZZSTLTLKii.............yLLZZZZZZZZZZZZZZZZZZZZSTLLii.............yLSZZZZZZZZZZZZZZZZZZZZTTLyxi...................................", "........................................TTLLZZZZZSMLLii...............ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZLyii.....................Ty#iyZZZZZZZZZZZZZZZZZZMSMyy.#....................yiiLZZZZZZZZZZZZZZZZZMTTLLyii.............KzTZZZZZZZZZZZZZZZZZZZZMTLyx#.............yLMZZZZZZZZZZZZZZZZZZZZTLMKji...................................", "........................................TLKLZZZLLTTLyih#................ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZLLiii....................LiiiLZZZZZZZZZZZZZZZZZZTTLyxi.....................yiyZZZZZZZZZZZZZZZZZZTLTLzyii.............yKTZZZZZZZZZZZZZZZZZZZZTTLzxi.............yzSZZZZZZZZZZZZZZZZZZZZTTLyii...................................", "........................................TLLZZZZTTLSLyjh.................ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZLLyii....................yiiLZZZZZZZZZZZZZZZZZZZTLMKjh.....................yxyZZZZZZZZZZZZZZZZZZTTLLyi...............zLLZZZZZZZZZZZZZZZZZZZZSMLKii.............yKMZZZZZZZZZZZZZZZZZZZZTLTyx#...................................", "........................................TTTZZZZLTMLLyii.................TZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZTLyyii...................yiyZZZZZZZZZZZZZZZZZZZZTTLzii.....................ijLZZZZZZZZZZZZZZZZZZTSMKyii..............yKTZZZZZZZZZZZZZZZZZZZZTTLzii.............jxLZZZZZZZZZZZZZZZZZZTSMTLLii...................................", "......................................TTTUZZZZZTSMLyi#..................ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZTLLyi#...................yyLZZZZZZZZZZZZZZZZZZZZSMSyx#...................TyiiyZZZZZZZZZZZZZZZZZZMTLyy................yzLZZZZZZZZZZZZZZZZZZZZTLSzx#...........TyiiyZZZZZZZZZZZZZZZZZZMTSLLyii...................................", "......................................TLTYZZZLTMSLzxih....................TZZZZZZZZZZZZZZZZZZZZZZZZZZZZTTLyxi...................zKLZZZZZZZZZZZZZZZZZZMTMTLLii...................LiiyLZZZZZZZZZZZZZZZZZZSTLzxi#..............iyLZZZZZZZZZZZZZZZZZZLTMTLKii...........LiiiLZZZZZZZZZZZZZZZZZZTMTLyyih...................................", "....................................TLyyTZZZZLTSMLyi#.....................MTTZZZZZZZZZZZZZZZZZZZZZZZZZZZZLLii...................yLMZZZZZZZZZZZZZZZZZZSTSLLyii...................LyxMZZZZZZZZZZZZZZZZZZZTMLKii.............TyiiyZZZZZZZZZZZZZZZZZZTTSMLyii...........yiiLZZZZZZZZZZZZZZZZZZZSTLLyi#....................................", "....................................MyiyTZZLLMLTLKyii.....................LLTZZZZZZZZZZZZZZZZZZZZZZZZZZZZMyyii..................yLSZZZZZZZZZZZZZZZZZZTMTLzyii...................LLTZZZZZZZZZZZZZZZZZZZZSTLzii.............LiiiLZZZZZZZZZZZZZZZZZZTMSLzyii...........yiyZZZZZZZZZZZZZZZZZZZZTTLLyii....................................", "....................................Lx#LZZZLSTLLLyih......................LLTZZZZZZZZZZZZZZZZZZZZZZZZZZZZSLyiiTTLTTZZ...........yyLZZZZZZZZZZZZZZZZZZTSMKyih....................TTZZZZZZZZZZZZZZZZZZZZZTMSyx#.............yiiLZZZZZZZZZZZZZZZZZZZSTLLyih............yyLZZZZZZZZZZZZZZZZZZZZMSLyx#.....................................", "....................................LyyZZZZSMTLzyii#......................LTZZZZZZZZZZZZZZZZZZZZZZZZZZZZZTLyyiLyyLTZZiiii.......iyLZZZZZZZZZZZZZZZZSMTSMyyi#....................ZZZZZZZZZZZZZZZZZZZZZZZSTLzxi.............yiyZZZZZZZZZZZZZZZZZZZZTTMKyi#............KyLZZZZZZZZZZZZZZZZZZZZTTLzxi.....................................", "....................................LLTZZZZMSLLyii........................TTZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZTTyxjLZZZiiiii....TyiiyZZZZZZZZZZZZZZZZTTLTLyii.....................ZZZZZZZZZZZZZZZZZZZZZZZMTLKii.............yxyZZZZZZZZZZZZZZZZZZZZMSLyjh.............zLTZZZZZZZZZZZZZZZZZZZZTMLKii.....................................", "....................................TZZZZZZTTLLxii........................TZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZTTyyTZZZZLyyiii...LiiiLZZZZZZZZZZZZZZZZSTMLKyii.......................iiyLZZZZZZZZZZZZZZZTTSTLzii.............yyLZZZZZZZZZZZZZZZZZZMSTTMKii#............yLLZZZZZZZZZZZZZZZZZZZZSTLzii.....................................", "..................................ZZTZZZZZZTLLLi#.........................ZTZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZTTTZZZZZLLLyi....yiiLZZZZZZZZZZZZZZZZZMTLLyi#.........................iyLZZZZZZZZZZZZZZZMTLMLyii...........TLyyMZZZZZZZZZZZZZZZZZZTTLLLyii.............LLTZZZZZZZZZZZZZZZZZZZZTMSyy.#....ZZZZZ...........................", "..................................ZZZZZZZLLTTLyxi...........................TZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZMTLzxi...yiyZZZZZZZZZZZZZZZZTTSTLyyih........................iixyyLyLLLTLTLTLTLTSMSLLxii...........ULKMYZZZZZZZZZZZZZZZZZZMTTLLyih.............KzSZZZZZZZZZZZZZZZZZZTTLTLKii.....ZZZZZii.i.......................", "..................................ZTZZZZZTTLTLyi#...........................LLTZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZSMLKi#...yyLZZZZZZZZZZZZZZZZMTMSLyii..........................#iiixyyLLLLLLLLLLLLLLyyi#............YTTZZZZZZZZZZZZZZZZZZZZSTLLyi#..............yLTZZZZZZZZZZZZZZZZZZLTTLLyii.....ZZZZZiiiii......................", "..................................TZZZZKLMSMLyyii...........................iyLZZZZZZZZZZZZZZZZZZZZZZZZZZZZTTTLTLTLTLTSLzxi...yyLZZZZZZZZZZZZZZZZTSMLLyi#...........................h#i#iiyyKzKLyLLyLyLyyiih............ZTZZZZZZZZZZZZZZZZZZZZZMTLzxii..............yLMZZZZZZZZZZZZZZZZZZTMTLzyih.....TZZZZyyyiii.....................", "................................ZTZTZZZLLTLLLyih........................TLyi.iyZZZZZZZZZZZZZZZZZZZZZZZZZZZZMSMTLLLLLLLLLyi#...yyLZZZZZZZZZZZZZZZZTTLLyih.................................iiiiyijxiiyiixii#..............ZZZZZZZZZZZZZZZZZZZZZZZTSLLii...............LKTZZZZZZZZZZZZZZZZZZTSLLyi#....ZZZZZZZLLLyi......................", "................................TTTZZZZLLTLLyii#........................yii..iLZZZZZZZZZZZZZZZZZZTTTMTSMTLTSMSLLLLLKLzyyxii...xyLZZZZZZZZZZZZZZZZTSMyyii...................................#h#h#ii.i#i#h#h................#iZZZZZZZZZZZZZZZZZZZTTLyii...............yLLZZZZZZZZZZZZZZZZZZTTLLxii....TZTZZZZLLLzxi.....................", "..............................TTLLTZZZZTTLLyii....................TLLyyyii.iiLZZZZZZZZZZZZZZZZZZZLTLSMLLLLLLLLLyiiijixjii...Ty#iyZZZZZZZZZZZZZZZZMSLLi#...................................................................hiZZZZZZZZZZZZZZZZZZZMSMKjh...............LLTZZZZZZZZZZZZZZZZZZMSMyjh.....ZTZZZZZTSLyji.....................", "..............................TLyLUZZLLLTLLiii....................LxiiyyiiKZZZZZZZZZZZZZZMTTTMSMTSMTLLLLKLyLyyyiiihi#hi.i...LiiiLZZZZZZZZZZZZZZSTTTLyxi..................................................................#.iyyyLLMSMSMZZZZZZZTSTTLyii#..............yLTZZZZZZZZZZZZZZZZTTSTLLii.....TTTZZyLMTLKii.....................", "..............................TLLYZZZLLTLLyii...................TLi#hiyyLTZZZZZZZZZZZZZZZSTLSMLLLLLLKyijijxijiii............yiiLZZZZZZZZZZZZZZZMTLMLyii....................................................................iiiyyKLLLLLZZZZZZZMTLLLyx#...............LLTZZZZZZZZZZZZZZZZLTMLLyii...TTLLTZZLSMSLyi#.....................", "..............................TTTZZZZTLTLLyiblrl................TLiiLZZZZZZZZZZZZTTMTTLTMSMTLLLLyLyyyiiihi#ihi.#............yiyZZZZZZZZZZZZZZZZTOGELyii.....................................................................#.iiyyzKzKyLyLLLTLTTLzyih...............LMZZZZZZZZZZZZZZZZZTTTLKyi#...TLyLZZZLSMLzyih.....................", "..............................TTZZZZZTLTBBruuuuo................TLLTZZZZZZZZZZZZZLTSLMSLLLLLKyxjxijiii......................yxyZZZZZZVuuPZZZPHHuuuuyi.........................................................................i.iixiyijxyyLLLLLLKyi#................TTZZZZZZZZZZZZZZZZZTLLLyii....TLLTZZZMTLLyii......................", "......................lekcldleOOOVVEOOOOBruHuHue................TTUZZZZZZZZNRTNRTNROODCBEBBByiiilllllel..........bleleleleldmoBVVZZZVHstuVZZPtuuuuEyii.........................elelelelb.........blelelelb.....................#h#i#h#h#iiyyyLyyyihi................TZZZZZZZZZZZZZZZZZZTTLLjih....LyTZZZZLTLLxi#......................", "......................uuuuusuuuuuuutuuuEyvbouru.................ZZZZZZZZZZZTOQTLLLLDuHuuHuuulb.#uuuuuuu..........ouuuEuurusHuuuuHZZZVuuuuVZZZROHruCi...........................utsutFuui.........luruuusuo...............................iiixijii#..................ZYZZZZZZZZZZZZZZZZZTLLKii...TLyLTZZZZTSLzx#h......................", ".....................bHuobldCuHuFVVOEuuryifruuH.................ZZZZZLLTMTLTQOLLLLIzAmtuuumli...lltuoil............ouuHsdlDllBuuHZZZZHtFHZZOTTEuuuBii..........................jlouutuur.........ruHuGulb..................................i#ihi.i....................ZZZZZZZZZZZZZZZZZTTLLii...LyyLZZZLSMTLyii.......................", ".....................luui.TyoutuPZZLOHuBibWuuHH..#..............ZZZZZLTSMSLLLLIyliiiiiosGul......ruo...............buuto..yiiErHVZZZZZVVZZZQTNFHtuk#.............................ououHuo........lurrsuu...............................................................ZZZZZZZZZZZZZZZZZTMLyy#.TLiiyTZZZMTSMLyii.......................", ".....................our..LiruuuVZZMOuuBi.OuuuPihi.i..............iiyLRLLLLIByyiiiii..buuuu.....ourb...............oHuul..yiyZuuVZZZZZZZZZZTRNFuuuhi.............................ruoruuu........ruluuHr...............................................................TZZZZZZZZZZZZZZZZTSMKii.yyxyTZZZZTLTLKyi#.......................", ".....................rul..x#tHsuVZZZOuuIBIBHuuViiii...............#kyLLLLyliviii.......ouuHd...purTLyyAJLTTZZ.#....ouuul..yyLZurZZZZZZZZZZZTNRuuHr...............................uuiouHu.......lur.uuto...............................................................ZZZZZZZZZZZZZZZZZZTLyLyyyiyTZZZZZSMSLyii........................", "..........................iiuuGuZZZZTLLLLLEtsuZyyBuHul..........boHutCAyyiiibi.........iusur..lurbyiiiyKTTZZZhihi..uHsu...yyLZZZZZZVPHuHZZZRSOtuup........boruuob...............iuubluuul.....bruidHuul........eouHurllrul.....eorH...brHuo.........blrHuuoeouu.......louuHPVZZZZZZZZZZZOEuuuEyzTZZZVOFGRLBrurb.......................", "........................Li#luuuHZZZZYTTTTTHuHuZMuHuuuub.......bouuoruuriig..............ruHubluuOv#.iyLMZZZZZiiii#ituur...yBOVZZZHuuuruHZZZOREuFtl.......luurrHuui..............esH.euEud.....our.muuul......bruHuoruuuuH...boHuuuu.bruuuuul.......lruuroruuHuo.....bruuHHGuuHHPHHZZZZVPuuEHuuHZZVPHuuuGMOrHuHr.......................", "........................x..oHsuPZZZZZZZZZZuuuHVtuEFtuHo......brurb.iruuo.a..............iuuurtuex..iLZZZZZZZZKzyxiluHuo...iEuVZZZPHHuuHPZTTNTEuuui......ouHb..ouur..............ouo.luuuo.....uub.oFuu.......ruuob.brHuur...lruuHuodHrouHuur......duuul..luruul....bHuurbiVuFtusGuZZZVHuHZZZGuuPZPHtusuGLuruuuu.......................", "......................Ll..iEutuPZZZZZZZZZVuGuuHOOLEuuuo.....#rHr....puHo.................rHuuHMi#.hzYZZZZZZZZZZLyiouuul.TyiuuZZZZZZPutsVZQTRLGuuu......puub...eHuu..............ruo..uHso....our..tuuu.....brHuo....euuto......uuurul..lutuH.....luHub....ruHue....ruuH..gZuuuHZZZZZZHtHZZZZHsHHZZZRHuuEFDirHur.......................", "......................w..#KuuHuVZZZZZZZZZVuurHOQTLBHuuo.....ruul....ruup.................lsuurxa.#LZZZZZZZZZZZZLBvpGuuroErruEZZZZZZPuHuOOTNTLsuHu.....otHr....mtHu..............tue..uuur....uHb..uHuo.....ouurb....ksHue.....bHuHr#....Fuuo....#ruup.....ouuu....eHuur...fuuHuZZZZZHsuPZZZZHtuPZQOTtHuuBigkurb.......................", "....................Lx..iLTuustZZZZZZZZZZPsHuOTOLLBuuul....ouHu....ouuHb.................btHus..iKUZZZZZZZZZZZZLLytsuuuuuuuuHZZZZZZsutuRSRLLBHutp....buuub...euuso.............bHsi..ouHu...our..estuo....bHuul.....euuui.....ouuuk.....uuuo....ouuGb.....ruEr....ouuHe...iutsuZZZZPuuuZZZZHuHuVZTTOsutEii..l.........................", "....................i#..LZVuHuHZZZZZZZZZZGuuuSRSLJnFuub....uuuo..erHtuo.................#ruuHul#LZZZZZZZZZZZZZZTLJuuHu..iirHPZZZZZZuHuETOTLLBuuul....ouuH..bmGuut#.............duu...ouuHb.but#..kuuHe....ouuub.....oHuu......osuub....iuHue....tsur......uuuo....oruul...eHuuEyyLZutsPZZVHusuETNRNOuuuli#............................", "................TLyi..iKUZPuuuPZZZZZZZZZZuusGMLLAyouuH....luturouHuuul.................brurtuurLYZZZZZZZZZZZZZZTLEtusrSy.iruVZZZZZVuuuETLLLxpuHul....uHurotuuuuo...............pur...luuul.rHo...ousub....uHrH......ruur......ruHs.....euuui...luHuo.....bHuuo....ouHud...rstuliyyVuHuHHusHtuOTRNRLEuHug..............................", "................yi.ii.LZZZHGsuPZZZZZZOTROHuuELJyyiruuo....osHuuuurol...................rHr#rHuuVZZZZZZZZZZZZZZZSROuHuoLifiEuZZZZZZPuHuOSLzyiqstub...buuuuuHuolb................ruo...jtuulbuu#...rGuH....buuuo......uHuo......utur.....oEuu....mtuue.....buHue.....uuup..kuHuog.iiBsuutuHtFOROSMLLLruuoa..............................", "..............Ty..#iiLTZZZHuutVZZZZZZRSOOutuEykiiguGuo....ouuui.......................ourb.buuuHZZZZZZZZZZZZZZZOSEuuueyiiLZZZZZZZZHruuOLLyiiuuHs....ksHuo......................uHd...buFuorun....uuur....luuuo.....buuul.....luHuo.....uuuo....ouuFd.....ouru......lrHurruuuo...agrtHsBLLLNLLLLLKyluHuo...............................", "..............Lia.KZZZZZZZsHuuVRTTMSTLTLEHsuBii#hbusue....ouHue......................ouub...EFuuVZZZZZZZZZZZZZZORutFuiyiyZZZZZZZZTuHuuLIyihguuuo....duuuo.....................buub....uuuruu#...#Huuo....bHuuo.....eEuue.....luuue.....Huuo....ouuul.....ouuH.......amtuupo.......ouuuByyLyLyLyyyiluuul...............................", "..............LiiLXZZZZZZVuuuFZSOQTLLLLLEuuuii...luuG#....ouuul.......b.............ouHb....BuuGHZZZZZZZZZZZZZZTQuuuu.yyLZZZZZZZZOustFByii.eHtuo....juHur.......b.............ksH.....rtHuun....dusHe....euHur.....ouuH......ouFtl....eutsk....ouHue.....ruHr........oul..........ruHuoiyivlixliigluHue...............................", "..............LyLZZZZZZZZPGuuGMTQOLLLIByuuHu.f...ouuu.....erHur......lo............duul.....yHsuuZZZZZZZZZZZZSMTOuuHt#yLTZZZZZZZZOHuuEyii..esHue.....uuuub.....ir.............our.....osuHr#....nuuul....#ruuub...bruuu......ruuu.....mHuue....lruHr....luuuo........uurb.........jtuHr.i#hgbmoga.ourHb...............................", "..............MSZZZZZZZZZPusuETLLLLylvklHutp.....ruHub.....ruuuob.blruo...........lsHe......KEuuuPZZZZZZZZZZZTTQEHsuETKMZZZZZZZZZOuuuulg.b.ouuso...b.orHurl..erur.............ruo.....ouuul.....puGu......rHuHrlerHruHul..b..uuHu.....ouuHe....buuuurlerruuurb..b...eHsuHrb........ruuuob.blruo...tuuu................................", "..............TZZZZZZZVEEuuHuuGELyyiiiglsuuo.....oruuroro..luHuuHuuuue..........oouuurol...eErHruuPHZZZZZZZZZTGFtuHuuEETZZZZZRSRTOtHuGurul.oGuHurrHd.brHuuuuHuuob..........bopuuuoo...iuur...boouuuurob...ctuuuHsueouruuuuo.jtuuo.....osuuropo..ouHuuHuu.HuHuuuHe..lrutuuuurb......luuHuHuuuul....uHur................................", "..............ZZZZZZZZVuuHtuuFuuiiig...quHud.....luHuuoeb...bruuuurlb...........uuuHtuuo...puuuuHusuZZZZZZZZZMuuHuuuuuuZZZZZZOTNRLHsuurol..bruuuroc...bruHruulb............lutHuuuo...buHe...luuuFuuHul....lruuuoa.#rHuuolb.eHuuo.....btHuurnb...oruuro..dsuurob.lruoborHuHuHo......iruuuurlb....lusto................................", "..............ZZZZZLLTTTLRLLAyyiii.a...............i..........ack#..........................LTZZZZZZZZZZZZZTTSTLywYZWZZZZZZMSTQOLLzABia......dib.........elb.................................................bk......b..................b..........ib......k....buur....eruuuuo.......#dib............................................", "..............ZZZZZLTMSLMLKywiii............................................................TTZZZZZZZZZZZZZZZUYZZZZZZZZZZZZSMTLLLyxii#f.........................................................................................................................ruHd......ouuuu.......................................................", "................#xyLSMLLLyyii#h#............................................................TZZZZZZZZZZZZZZZZZZZZZZZZZZLLLTTLTLKyiifb...........................................................................................................................uusl.......GuHu.......................................................", "................iiyLLLKyiiii................................................................ZZZZZZZZZZZZZZZZZZZZZZZZZZZLLTLMLLzyii#.............................................................................................................................rHur......#uusn.......................................................", ".................iyyyyyiii.h..................................................................ZZZZZZZZZZZZZZZZZZZZZZZLLMSTLLKyyiga..............................................................................................................................nuuuob...boutp........................................................", ".................#iiiiii......................................................................ZZZZZZZZZZZZZZZZZZZZZZZLTSMLKyyiib.................................................................................................................................ouuuHroouuHo.........................................................", "...................ibga#.......................................................................iWZZZZZZZZZZZZZZQOQOQOQOQLByiigaf..................................................................................................................................boruuuroe...........................................................", "..............................................................................................aiLTTZZZZZZZZZZZZTORNRLLLLLyii..........................................................................................................................................................................................................", "................................................................................................LTTZZZZZZZZZZZZTSTLLLLyyyifb.........................................................................................................................................................................................................." }; xfm-1.5.4/images/dev_disk.xpm0000644000175000017500000000104110420743507013015 00000000000000/* XPM */ static char * dev_disk_xpm[] = { /* width height num_colors chars_per_pixel */ "16 16 6 1", /* colors */ " s background c None", ". c #808080", "X c #c0c0c0", "o c black", "O c white", "+ c #008000", /* pixels */ " ", " ", " ", " ", " ", " ", " ............. ", " .XXXXXXXXXXXX.o", ".OOOOOOOOOOOO..o", ".XXXXXXXXXX+X..o", ".XXXXXXXXXXXX..o", ".X..........X..o", ".XOOOOOOOOOOX..o", "..............o ", " ooooooooooooo ", " "}; xfm-1.5.4/images/dev_floppy.xpm0000644000175000017500000000104310420743507013376 00000000000000/* XPM */ static char * dev_floppy_xpm[] = { /* width height num_colors chars_per_pixel */ "16 16 6 1", /* colors */ " s background c None", ". c #808080", "X c #c0c0c0", "o c black", "O c white", "+ c #ff0000", /* pixels */ " ", " ", " ", " ", " ", " ", " ............. ", " .XXXXXXXXXXXX.o", ".OOOOOOOOOOOO..o", ".XXXXXXXXXX+X..o", ".XXXX....XXXX..o", ".X...oooo...X..o", ".XXXXOOOOXXXX..o", "..............o ", " ooooooooooooo ", " "}; xfm-1.5.4/images/dev_cdrom.xpm0000644000175000017500000000111710420743507013173 00000000000000/* XPM */ static char * dev_cdrom_xpm[] = { /* width height num_colors chars_per_pixel */ "16 16 9 1", /* colors */ " s background c None", ". c #808080", "X c #ffff00", "o c #c0c0c0", "O c #00ffff", "+ c black", "@ c #00ff00", "# c white", "$ c #008000", /* pixels */ " ", " ... ", " ..XXo.. ", " .OOXXooo+ ", " .@@OXXoo#o+", " .o@@.+.#oo+", " .oo@+#+ooo+", " .ooo.+.Ooo+", " .....ooo#ooXOO+", ".#####.o#ooo@X+ ", ".#ooooo..ooo+++ ", ".#@$++++++++o.+ ", ".#oo#####oooo.+ ", "..............+ ", " +++++++++++++ ", " "}; xfm-1.5.4/images/bluelogo.xpm0000644000175000017500000000261310422406556013045 00000000000000/* XPM */ static char * icl8_26562_xpm[] = { /* width height ncolors chars_per_pixel */ "32 32 9 1", /* colors */ " s None c None", ". c #0098FE", "X c #0000EF", "o c #0066FE", "O c #000089", "+ c #0000BA", "@ c #000077", "# c #000055", "$ c #000044", /* pixels */ " ", " ", " . ", " XoX ", " O+X+O ", " O+O ", " . O o ", " XoX +X+ ", " O+X+O @O+O@ ", " O+O @O@ ", " . O o @ X ", " XoX +X+ O+O ", " O+X+O @O+O@ #@O@# ", " O+O @O@ #@# ", " . O o @ X # + ", " XoX +X+ O+O @O@ ", " O+X+O @O+O@ #@O@# $#@#$ ", " O+O @O@ #@# $## ", " O o @ X # + $ ", " +X+ O+O @O@ ", " @O+O@ #@O@# $#@#$ ", " @O@ #@# $#$ ", " @ X # + $ ", " O+O @O@ ", " #@O@# $#@#$ ", " #@# $#$ ", " # + $ ", " @O@ ", " $#@#$ ", " $#$ ", " $ ", " "}; xfm-1.5.4/images/bookshelf.xpm0000644000175000017500000000542510422406556013215 00000000000000/* XPM */ static char * bookshelf_xpm[] = { "32 32 78 1", " s background c None", ". c #FFFFCF3C9A69", "X c #208120812081", "o c white", "O c #A289A289A699", "+ c #9A6965956595", "@ c #CF3CCF3CCF3C", "# c #104010401040", "$ c black", "% c #75D675D675D6", "& c #9A699A69CF3C", "* c #555555555555", "= c #FFFFFFFFCF3C", "- c #FFFF9A699A69", "; c #CF3C9A696595", ": c #555500000000", "> c #0000000030C2", ", c #451445144514", "< c #DF7DDF7DDF7D", "1 c #FFFFCF3CCF3C", "2 c #CF3C65956595", "3 c #CF3C659530C2", "4 c #CF3C30C26595", "5 c #30C230C20000", "6 c #CF3CFFFFFFFF", "7 c #FFFFCF3CFFFF", "8 c #659530C230C2", "9 c #9A6930C230C2", "0 c #208100000000", "q c #9A6965959A69", "w c #30C29A696595", "e c #6595CF3C6595", "r c #9A69CF3CFFFF", "t c #9A699A69FFFF", "y c #9A69659530C2", "u c #000030C230C2", "i c #30C265956595", "p c #659565956595", "a c #65959A696595", "s c #CF3C9A699A69", "d c #659565959A69", "f c #30C200000000", "g c #659530C26595", "h c #30C2659530C2", "j c #CF3C9A69FFFF", "k c #65959A69FFFF", "l c #65959A699A69", "z c #9A699A696595", "x c #659530C20000", "c c #30C2000030C2", "v c #000000002081", "b c #CF3C65959A69", "n c #FFFF9A696595", "m c #30C230C230C2", "M c #6595CF3CCF3C", "N c #9A699A699A69", "B c #6595659530C2", "V c #30C230C26595", "C c #CF3CCF3C9A69", "Z c #FFFFFBEEF3CE", "A c #6595000030C2", "S c #6595CF3CFFFF", "D c #FFFF65956595", "F c #9A69CF3C9A69", "G c #CF3CCF3CFFFF", "H c #65959A69CF3C", "J c #9A696595CF3C", "K c #9A69CF3CCF3C", "L c #9A69000030C2", "P c #000020810000", "I c #CF3C9A69CF3C", "U c #FFFF65959A69", "Y c #9A6930C26595", "T c #C30BC30BC30B", "R c #000030C20000", "E c #CF3CCF3C6595", "W c #CF3C9A6930C2", "Q c #659530C29A69", " ", " ", " ", " ", " .XooO ", " +oo@O ", " Ooo@#$oooo% ", " &*oo=--;:>$oooo, ", " OX.+9+f$g*i*h$ ", " jkkj07382fXilll%# ", " zxuxcv=bcnmXi%MNp# ", " zBxxxXo2bb8$Vgi,m$ ", " CqpdqvZ2As:Xil%lp# ", " aaS&01;;D50pO8Fp# ", " Z aGt&cZb+b5vplgOiXm ", " s iGHJ0Z2928viF+M*#0O ", " 8 aGJK>obb28m*KKOp5$X ", " .m atdJXZ2g2f#iOMlp#$X ", " .5 &tt&v1n8D5#%lLFpXPf ", " 15 OrtIvZby+:u*Fqli#vm ", " ., lGGJco2b;8#i&iKp#$m ", " 157%%dp#ZUYU5XpO+FpX$5 ", " ...5ojttj01;;;fviPmv$#$c5f5 ", " 1.z.Xj5xx,cZ9BY5XiNlO*X$X#m5O ", " ..s%1Bt*pxVvoY228upTKTiR$m,f8, ", "1..E+.X7%dd+XZyY880Vh*,m0$X0m5Xs", "F8B8B85oattj01bW-5vp*iip#PfBB88B", "ONqOqOOOipiQXz888#XmmhmmmON%%%N%", " "}; xfm-1.5.4/images/book.xpm0000644000175000017500000000251310422406556012166 00000000000000/* XPM */ static char * book_xpm[] = { /* width height ncolors chars_per_pixel */ "32 32 5 1", /* colors */ " s background c None", ". c black", "X c white", "o c #C0C0C0", "O c #808080", /* pixels */ " . ", " ... ", " . .XX.. ", " ... .XXXo.. ", " .Xo..XXoXoo. ", "...XoO.XXXoXoO..................", ".O.XoO.XXoXooO.OooXXXXXXXXXXo.o.", ".O.XoO.XXXoXoO.OoXoXXXXXXXXXo.o.", ".O.XoO.XXoXooO.OooXXXXXXXXXXo.o.", ".O.XoO.XXXoXoO.OoXoXXXXXXXXXo.o.", ".O.XoO.XXoXooO.OooXXXXXXXXXXo.o.", ".O.XoO.XXXoXoO.OoXoXXXXXXXXXo.o.", ".O.XoO.XXoXooO.OooXXXXXXXXXXo.o.", ".O.XoO.XXXoXoO.OoXoXXXXXXXXXo.o.", ".O.XoO.XXoXooO.OooXXXXXXXXXXo.o.", ".O.XoO.XXXoXoO.OoXoXXXXXXXXXo.o.", ".O.XoO.XXoXooO.OooXXXXXXXXXXo.o.", ".O.XoO.XXXoXoO.OoXoXXXXXXXXXo.o.", ".O.XoO.XXoXooO.OooXXXXXXXXXXo.o.", ".O.XoO.XXXoXoO.OoXoXXXXXXXXXo.o.", ".O.XoO.XXoXooO.OooXXXXXXXXXXo.o.", ".O.XoO.XXXoXoO.OoXoXXXXXXXXXo.o.", ".O.XoO.XXoXooO.OooXXXXXXXXXXo.o.", ".O.XoO.XXXoXoO.OoXoXXXXXXXXXo.o.", ".O.XoO.XXoXooO.OooXXXXXXXXXXo.o.", ".O.XoO.XXXoXoO.OoXoXXXXXXXXXo.o.", ".O.XXoO..oXooO.OooXXXXXXXXXXo.o.", ".O...XoOO..XoO.OoXoXXXXXXXXXo.o.", ".oOOO..ooOO..O.OooXXXXXXXXXXo.o.", ".ooooOO....OO.................o.", "................................", " "}; xfm-1.5.4/images/calc2.xpm0000644000175000017500000000253210422406556012221 00000000000000/* XPM */ static char * calc2_xpm[] = { /* width height num_colors chars_per_pixel */ "32 32 6 1", /* colors */ " s background c None", ". c #808080", "X c #c0c0c0", "o c white", "O c black", "+ c red", /* pixels */ " ..................... ", " .XoooooooooooooooooX.O ", " .o.XXXXXXXXXXXXXXX.o.O ", " .oXOOOOOOOOOOOOOOOXo.O ", " .oXOO++OOOO+O++O+OXo.O ", " .oXOO+OO+O++O+OO+OXo.O ", " .oXOOOOOOOOOOOOOOOXo.O ", " .oXXoooooooooooooXXo.O ", " .oXXXXXXXXXXXXXXXXXo.O ", " .oX...X...X...X...Xo.O ", " .oX.OOX.OOX.OOX.OOXo.O ", " .oXXXXXXXXXXXXXXXXXo.O ", " .oX...X...X...X...Xo.O ", " .oX.OOX.OOX.OOX.OOXo.O ", " .oXXXXXXXXXXXXXXXXXo.O ", " .oX...X...X...X...Xo.O ", " .oX.OOX.OOX.OOX.OOXo.O ", " .oXXXXXXXXXXXXXXXXXo.O ", " .oX...XoOXoOXoOXoOXo.O ", " .oX.OOX.OX.OX.OX.OXo.O ", " .oXXXXXXXXXXXXXXXXXo.O ", " .oX...XoOXoOXoOXoOXo.O ", " .oX.OOX.OX.OX.OX.OXo.O ", " .oXXXXXXXXXXXXXXXXXo.O ", " .oX...XoOXoOXoOXoOXo.O ", " .oX.OOX.OX.OX.OX.OXo.O ", " .oXXXXXXXXXXXXXXXXXo.O ", " .oX...XoOXoOXoOXoOXo.O ", " .oX.OOX.OX.OX.OX.OXo.O ", " .Xoooooooooooooooooo.O ", " .....................O ", " OOOOOOOOOOOOOOOOOOOO "}; xfm-1.5.4/images/calc.xpm0000644000175000017500000000255110422406556012140 00000000000000/* XPM */ static char * calc_xpm[] = { /* width height num_colors chars_per_pixel */ "32 32 7 1", /* colors */ " s background c None", ". c black", "X c white", "o c gray50", "O c gray60", "+ c #c0c0c0", "@ c gray90", /* pixels */ " ", " ", " ", " ", " ", " ............................. ", " .XXXXXXXXXXXXXXXXXXXXXXXXXXXXo.", " .XOO...............OOOOOOOOOOo.", " .XOO.+++++++++++++@OOOOOOOOOOo.", " .XOO.XXXXXXXXXXXXX@OOOOOOOOOOo.", " .XOO.@@@@@@@@@@@@@@OOOOOOOOOOo.", " .XOOOOOOOOOOOOOOOOOOOOOOOOOOOo.", " .XOOO+.OX+.OX+.OX+.OX+.OX+.OOo.", " .XOO++.O++.O++.O++.O++.O++.OOo.", " .XOO...O...O...O...O...O...OOo.", " .XOOOOOOOOOOOOOOOOOOOOOOOOOOOo.", " .XOOO+.OX+.OX+.OX+.OX+.OX+.OOo.", " .XOO++.O++.O++.O++.O++.O++.OOo.", " .XOO...O...O...O...O...O...OOo.", " .XOOOOOOOOOOOOOOOOOOOOOOOOOOOo.", " .XOOO+.OX+.OX+.OX+.OXXXXXX.OOo.", " .XOO++.O++.O++.O++.OX+++++.OOo.", " .XOO...O...O...O...O.......OOo.", " .XOOOOOOOOOOOOOOOOOOOOOOOOOOOo.", " .ooooooooooooooooooooooooooooo.", " ............................. ", " ", " ", " ", " ", " ", " "}; xfm-1.5.4/images/camera.xpm0000644000175000017500000000252310422406556012465 00000000000000/* XPM */ static char * camera_xpm[] = { "32 32 8 1", " s background c None", ". c #820782078207", "X c black", "o c #A289A289A699", "O c white", "+ c #FFFFFFFF0000", "@ c #C30BC30BC30B", "# c #820700000000", " ", " ", " ", " ", " ", " .. ", " XXX ..... ", " XXXXX XXXXXXX ", " Xo.XX XO..XXX ", " XXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", "Xoo.XXo.......................X ", "Xoo.XXo...............XXXXXXX.X ", "XXXXXXo...............X++@@@XXX ", "Xoooooo.....XXXXX.....X@.@X.XXX ", "X.........XX.....XX..XX@X..XXXX ", "X........X..XXXXX..X.XXXXXXXXXX ", "X.......X..X#####X..X.XXXXXXXXX ", "X.......X.XX@@XXXXX.X.X......XX ", "X......X.X##@@XXXX#X.X.X.....XX ", "X......X.X#@@XXXXX#X.X.X.....XX ", "X......X.X#@@XXXXX#X.X.X....XXX ", "X......X.XXXXXXXXX#X.X.X....XXX ", "X......X.XXXXXXXX###.X.X....XXX ", "X.......X.X#XXXX##X.X.X.....XXX ", "X.......X..X#####X..X.X.....XXX ", "X........X..XXXXX..X.X......XXX ", "X.........XX.....XX..X....XXXXX ", "X......XXX..XXXXX....XXXXXXXXXX ", "XXXXXXXXXXXX.....XXXXXXXXXXXXXX ", "Xooooooooooooooooo........XXXXX ", " XXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", " "}; xfm-1.5.4/images/chess2.xpm0000644000175000017500000000246010422406556012424 00000000000000/* XPM */ static char *chess2[] = { /* width height ncolors chars_per_pixel */ "32 32 4 1", /* colors */ "` c black", "c c grey", "b c white", "a c slate grey", /* pixels */ "```````bbbbbbbbbbbbbbb`aaa``````", "``````bbb```bbbbbbbbb``bbc``````", "`````bbb`bbc`bbbbbbb````b```````", "bbbb`````bcc````````bbb`b`bbbbbb", "bbb```````c````````bbb`bbc`bbbbb", "bb````````c```````bbb``bcc``bbbb", "b````````bca`````bbbb`bcccc`bbbb", "````````bbcaa```bbbbbb`````bbbbb", "````````bccca``bbbbbbbbbbbbbbbbb", "bbbbbbb`bccca```````````````````", "bbbbbbb`bbcaa``````````````````b", "bbbbbbbb`bca``````````````````bb", "bbbbbbb`b```a````````````````bbb", "bbbbbb`bbbccca``````````````bbbb", "bbbbbb`bbcccaa`````````````bbbbb", "bbbbbbb`bccca`````````````bbbbbb", "bbbbbb```````````````````bbbbbbb", "````````bbcca`bbbbbbbbbb````````", "```````bbcccaa`bbbbbbbb`````````", "``````bbcccccca`bbbbbb``````````", "````b`bccccccca`bbbbb```````````", "```bb`accccccaa`bbbb````````````", "``bbbb`aaaaaaa`bbbb`````````````", "`bbbbbb```````bbbb``````````````", "bbbbbbbbbbbbbbbbb```````````````", "bbbbbbbbbbbbbbbb````````````````", "````````````````bbbbbbbbbbbbbbbb", "```````````````bbbbbbbbbbbbbbbbb", "``````````````bbbbbbbbbbbbbbbbb`", "`````````````bbbbbbbbbbbbbbbbb``", "````````````bbbbbbbbbbbbbbbbb```", "```````````bbbbbbbbbbbbbbbbb````" }; xfm-1.5.4/images/chess3.xpm0000644000175000017500000000252010422406556012422 00000000000000/* XPM */ static char * chess3_xpm[] = { /* width height num_colors chars_per_pixel */ "32 32 5 1", /* colors */ " s background c None", ". c #808080", "X c black", "o c #c0c0c0", "O c white", /* pixels */ " ", " .X. ", " XXX.oo o ", " X.XX..oOo ", " XXX.XoX.X. o ", " XXXX.XOo.X..o ", " .XXXXX.X.O.XXOo ", " XXXXXXXXX.o.XX.o ", " .XXXXXXXXXX.O.XX.o ", " XXXXXXXXXoXX.o.X.o ", " .XXXXXXXXXXoXXO.XXOo ", " XXXXXXXXXXXoX.o.XX.o ", " .XXXXXXXXXX.oXX.o.XXo ", " .XXXXXXXXXXXoXXXXOoXXOo ", " XXXXXXXXXXX..XXX.o.XX.o ", " XXXXX.......XXXXXOo.X.o ", " .XXX ..XXXXXXXX.o.XX. ", " .X .XXXXXXXXXXOo.X.o ", " XXXXXXXXXXX.o.XX.o ", " XXXXXXXXXXX.O.XX.Oo ", " .XXXXXXXXXX.X.oX..o ", " XXXXXXXXXX.XO.XX.Oo ", " X.X.X.X...oO.XX..o ", " .X.X.........X.Oo ", " .XXXXXXXXXXXX.o ", " X.....o...oOo. ", " XXXXXXXXXXXXX ", " ........o...oOoo. ", " XXXXXXXXXXXXXXX ", " .X..X.X.o.X.XoOX. ", " .XXXXXXXXXXXXXXX.X. ", " XXXXXXXXXXXXXXXoXoX "}; xfm-1.5.4/images/chess.xpm0000644000175000017500000001573610422406556012354 00000000000000/* XPM */ static char *chess[] = { /* width height num_colors chars_per_pixel */ " 32 32 5 1", /* colors */ ". c #000000", "# c #800000", "a c #008000", "b c #000080", "c c #ffffff", /* pixels */ "................................", ".aaaaacccccaaaaacccccaaaaaccccc.", ".abbbacbbbcabbbacbbbcabbbacbbbc.", ".abbbacbbbcabbbacbcbcabbbacbbbc.", ".ababaccbbcabbbacbbbcabbaacbcbc.", ".aaaaacccccaaaaacccccaaaaaccccc.", ".cccccaaaaacccccaaaaacccccaaaaa.", ".cbbbcabbbacbbbcabbbacbbbcabbba.", ".cbbbcabbbacbbbcabbbacbbbcabbba.", ".ccbccaabaaccbccaabaaccbccaabaa.", ".cccccaaaaacccccaaaaacccccaaaaa.", ".aaaaacccccaaaaacccccaaaaaccccc.", ".aaaaacccccaaaaacccccaaaaaccccc.", ".aaaaacccccaaaaacccccaaaaaccccc.", ".aaaaacccccaaaaacccccaaaaaccccc.", ".aaaaacccccaaaaacccccaaaaaccccc.", ".cccccaaaaacccccaaaaacccccaaaaa.", ".cccccaaaaacccccaaaaacccccaaaaa.", ".cccccaaaaacccccaaaaacccccaaaaa.", ".cccccaaaaacccccaaaaacccccaaaaa.", ".cccccaaaaacccccaaaaacccccaaaaa.", ".aaaaacccccaaaaacccccaaaaaccccc.", ".aa#aacc#ccaa#aacc#ccaa#aacc#cc.", ".a###ac###ca###ac###ca###ac###c.", ".a###ac###ca###ac###ca###ac###c.", ".aaaaacccccaaaaacccccaaaaaccccc.", ".cccccaaaaacccccaaaaacccccaaaaa.", ".c#c#ca##aac###ca###ac##cca#a#a.", ".c###ca###ac###ca#a#ac###ca###a.", ".c###ca###ac###ca###ac###ca###a.", ".cccccaaaaacccccaaaaacccccaaaaa.", "................................" }; SIMPLE = T BITPIX = 8 NAXIS = 2 NAXIS1 = 32 NAXIS2 = 32 HISTORY Written by XV 3.10 END ÿÿÿÿÿ@@@@@ÿÿÿÿÿ@@@@@ÿÿÿÿÿ@@@@@ÿ,,,ÿ@,,,@ÿ,,,ÿ@,,,@ÿ,,,ÿ@,,,@ÿ,,,ÿ@,,,@ÿ,,,ÿ@,@,@ÿ,,,ÿ@,,,@ÿ,ÿ,ÿ@,,@@ÿ,,,ÿ@,,,@ÿ,,ÿÿ@,@,@ÿÿÿÿÿ@@@@@ÿÿÿÿÿ@@@@@ÿÿÿÿÿ@@@@@@@@@@ÿÿÿÿÿ@@@@@ÿÿÿÿÿ@@@@@ÿÿÿÿÿ@,,,@ÿ,,,ÿ@,,,@ÿ,,,ÿ@,,,@ÿ,,,ÿ@,,,@ÿ,,,ÿ@,,,@ÿ,,,ÿ@,,,@ÿ,,,ÿ@@,@@ÿÿ,ÿÿ@@,@@ÿÿ,ÿÿ@@,@@ÿÿ,ÿÿ@@@@@ÿÿÿÿÿ@@@@@ÿÿÿÿÿ@@@@@ÿÿÿÿÿÿÿÿÿÿ@@@@@ÿÿÿÿÿ@@@@@ÿÿÿÿÿ@@@@@ÿÿÿÿÿ@@@@@ÿÿÿÿÿ@@@@@ÿÿÿÿÿ@@@@@ÿÿÿÿÿ@@@@@ÿÿÿÿÿ@@@@@ÿÿÿÿÿ@@@@@ÿÿÿÿÿ@@@@@ÿÿÿÿÿ@@@@@ÿÿÿÿÿ@@@@@ÿÿÿÿÿ@@@@@ÿÿÿÿÿ@@@@@ÿÿÿÿÿ@@@@@@@@@@ÿÿÿÿÿ@@@@@ÿÿÿÿÿ@@@@@ÿÿÿÿÿ@@@@@ÿÿÿÿÿ@@@@@ÿÿÿÿÿ@@@@@ÿÿÿÿÿ@@@@@ÿÿÿÿÿ@@@@@ÿÿÿÿÿ@@@@@ÿÿÿÿÿ@@@@@ÿÿÿÿÿ@@@@@ÿÿÿÿÿ@@@@@ÿÿÿÿÿ@@@@@ÿÿÿÿÿ@@@@@ÿÿÿÿÿ@@@@@ÿÿÿÿÿÿÿÿÿÿ@@@@@ÿÿÿÿÿ@@@@@ÿÿÿÿÿ@@@@@ÿÿÿÿ@@@@ÿÿÿÿ@@@@ÿÿÿÿ@@@@ÿÿ@@ÿÿ@@ÿÿ@@ÿÿ@@ÿÿ@@ÿÿ@@ÿÿÿÿÿ@@@@@ÿÿÿÿÿ@@@@@ÿÿÿÿÿ@@@@@@@@@@ÿÿÿÿÿ@@@@@ÿÿÿÿÿ@@@@@ÿÿÿÿÿ@@@ÿÿÿ@@ÿÿ@@@ÿÿÿ@@ÿÿ@@ÿÿÿ@@ÿÿ@@ÿÿ@@ÿÿ@@ÿÿ@@@@@ÿÿÿÿÿ@@@@@ÿÿÿÿÿ@@@@@ÿÿÿÿÿxfm-1.5.4/images/clip.xpm0000644000175000017500000000247410422406556012171 00000000000000/* XPM */ static char * clip_xpm[] = { /* width height ncolors chars_per_pixel */ "32 32 4 1", /* colors */ " s background c None", ". c black", "X c #808080", "o c white", /* pixels */ " ", " ", " ..... ", " .XXXXX. ", " .oX...oX. ", " .oX. .oX. ", " .o. ...oX. ", " .o. .ooX.oX. ", " .o. .oo.oX.oX. ", " .o. .o. .oX.oX. ", " .oX..o. .oX.oX. ", " .oX.oX. .oX.oX. ", " .oX.oX. .oX.oX. ", " .oX.oX. .oX.oX. ", " .oX.oX. .oX.oX. ", " .oX.oX. .oX.oX. ", " .oX.oX. .oX.oX. ", " .oX.oX. .oX.. ", " .oX.oX. .oX. ", " .oX.oX. .oX. ", " .oX.oX. .oX. ", " .oX.. .oX. ", " .oX. .oX. ", " .oX. .X. ", " .oX. .X. ", " .oX. .X. ", " .oX...XX. ", " .ooooo. ", " ...................... ", " ........................ ", " ", " "}; xfm-1.5.4/images/compress.xpm0000644000175000017500000000257410422406556013076 00000000000000/* XPM */ static char * compress_xpm[] = { /* width height ncolors chars_per_pixel */ "32 32 8 1", /* colors */ " s background c None", ". c black", "X c #D4D4FF", "o c #8E8EFF", "O c white", "+ c #6B6BFF", "@ c #FFD48E", "# c #FF8F6B", /* pixels */ " ", " ", " ", " ... ", " .XXX. ", " .XXXXX. ", " .XXXXXXX. ", " .XXXXoXXXX........ ", " .XXXXXoXXXoXXXXXXXX. ", " .OOOOOoOOOXOOOOOXOX. ", " ...XOX+XOXoXOXOoOOo. ", " .@@...+OXOoOXOXoOo. ", " .@@@@@@.XOXoXOXoOOo. ", " .#@@@@@#.XO+OXO+Oo. ", " .##@@@#.OXoXOoOOo. ", " .@..####.XO+OX+O..... ", " .@@@.....OX+X+O.@@@@#. ", " .#@@@@@@#.O+O+.@@@@@#. ", " .#@@@@@#.X+X+.@@@@@#. ", " ..######.O+O+.#####. ", " .@@.......X+X+X..... ", " .@@@@@@@@#.+O+OXOo. ", " .#@@@@@@@#.+XO+OXo. ", " .########.+OX+XOXo. ", " .........XoXOXoXOo. ", " .@@@@@#.OXO+OXO+OXOo. ", " .######.XOXoXOXOoOXo. ", " ......oOXOoOXOXoXOo. ", " .XOoOXoXOXoXOXOXoXo. ", " .XOoOXOXOXOXOXOXOXOo. ", " .OXOXO.........OXOXo. ", " ...... ...... "}; xfm-1.5.4/images/cycle.xpm0000644000175000017500000000253310422406556012335 00000000000000/* XPM */ static char * cycle_xpm[] = { /* width height ncolors chars_per_pixel */ "32 32 6 1", /* colors */ " c black", ". s background c None", "X c white", "o c #008080", "O c #C0C0C0", "+ c #808080", /* pixels */ " ... ..... ", ". XXXXXXXXX .. o XXXXXXXXX ... ", ".. OOOOOOOO . Ooo +OOOOOOOX . X ", "... OOOOOOO OoOoo +OOOOOOOX XO ", ".. XOOOOOOO ooOoOoo +OOOOOOOXOO ", ". XOOOOOOOO oOoOoOoo +OOOOOOOOO ", " XOOOOOOOOO ooOoOoO . +OOOOOOOO ", " XOOOOOOOOO OoOoO ... +OOOOOOO ", " XOOOOO+ OO . OoO ..... XOOOOOO ", " XOOOO+ . O .. O ..... XOOOOOOO ", " XOOO+ ... ... ..... XOOOOOOOO ", " XOO+ ..... ........ ", " XO+ o ................. ooo ...", " X+ oOo ............... oOoOo ..", " + oOoOo ............. oOoOoOo .", " oOoOoOo ........... oOoOoOoOo ", " oOoOoOoOO ........... oOoOoOo ", ". oOoOoOo ............. oOoOo X ", ".. oOoOo ............... oOo XO ", "... ooo ................. o XOO ", " ........ ..... XOOO ", " XXXXXXXXX ..... ... ... XOOOO ", " XOOOOOOO ..... O .. X . XOOOOO ", " XOOOOOX ..... OoO . XX XOOOOOO ", " XOOOOOOX ... OoOoO XOXOOOOOOO ", " XOOOOOOOX . OoOoOoo XOOOOOOOO+ ", " XOOOOOOOOX OoOoOoOo XOOOOOOO+ .", " XOOOOOOOOOX ooOoOoo XOOOOOO+ ..", " XO +OOOOOOOX ooOoO XOOOOOX ...", " X . +OOOOOOOX ooO . XOOOOOOX ..", " ... +OOOOOOOX o .. XOOOOOOOX .", " ..... ... "}; xfm-1.5.4/images/editres.xpm0000644000175000017500000000265110422406556012676 00000000000000/* XPM */ static char * editres_xpm[] = { "32 32 12 1", " s background c None", ". c #0000FFFF30C2", "X c black", "o c #000065950000", "O c #451445144514", "+ c #75D675D675D6", "@ c #FFFFCF3C9A69", "# c #30C26595FFFF", "$ c #FFFFFFFFCF3C", "% c #FFFF00000000", "& c #CF3C00000000", "* c white", " .... X ", " ....... XXX ", " ...o.oooOXOO+ ", " .o.o.oo@@@X@@XX ", " .ooooo@@O#@@@X$X ", " o oo@@@@@@@X$$$X ", " oo o@O@%&@@@X$$$X ", " o O@#@%&@%@X$$$$X ", " XXX@@@@@%@XX$$$$X ", " XXO@@@@%%@@X#X$$$$X ", " XXXO@@X@@@@X##%X$$$$X ", " XXXX+XX$XXXX##X%X$$$$$X ", " XXXX+$$$$$$$X#X%%#X$$$$$X ", " XXXX+$$$$$$$$$X%%X#X$$$$$$X ", " XXXX+$$$$$$$$$$$%X##X$$$$$$$X ", "X+XX+$$$$$$$$$$$$X##X%#$$$$$$$X ", " X++$$$$$$$$$$$$$$#X%X#$$$$$$$@X", " X*$$$%%%%%%$$$$$X%%%#$$$$$$@X ", " X*$$%%%%%%$$$$$$%X#$$%%%$@X ", " X*$$%%%%%%$$$$$X#$$%%%%@X ", " X*$$%%%%%%$$$$$$$$%%%@X ", " X*$$%%%%%%$$$$$$%%%@X * ", " X*$$%%%%%%$$$$%%%@X ", " X*$%%%%%%$$$%%%@X ", " X*$%%%%%%$%%%@X ", " X*$%%%%$%%%%% ", " X*%%%$%%%%%%% ", " %%%$$$%%%%%% ", " %%%*$$$@%%%%%% ", " %%% X*$@X %%%%%% ", " %%% X*X %%%%%%% ", " %%% X %%%%%% "}; xfm-1.5.4/images/emacs.xpm0000644000175000017500000000261410422406556012326 00000000000000/* XPM */ static char * emacs_xpm[] = { /* gnu-emacs pixmap * width height ncolors chars_per_pixel */ "32 32 5 1", /*U‰å‹E‹U‹*/ " s background c None", ". m black c darkslategrey", "X m white c orange", "o m black c slate blue", "O m white c white", /* pixels */ " .... ", " .. ... ", " ........... ", " .XXXXXXXX... ", " .XX......... ", " .XX. ... ", " ...... ... ", " ... ", " o o ... ", " oo ... ", " .............................. ", " o............................ ", " o ....OO.................... ", " ..O....OO..O.O.......... ", " ..O.OO.O.O.O.O.......... ", " o ..O..O.O.O.O.O.......... ", " o ...OOO.O.O..OO.......... ", " ........................ ", " ....OOO................. ", " o ....O...O.O..OO..OO..OO. ", " o ....OOO.OOO.O.O.O...O... ", " ....O...O.O.O.O.O.....O. ", " ....OOO.O.O..O.O.OO.OO.. ", " o ...................... ", " o ...................... ", " .X. .... ", " o .X. .XXXX. ", " .X..X...X. ", " o .X..X. .X. ", " o .XX. .X. ", " .. .X. ", " "}; xfm-1.5.4/images/fileserver.xpm0000644000175000017500000000305210422406556013401 00000000000000/* XPM */ static char * fileserver_xpm[] = { "32 32 18 1", " s background c None", ". c black", "X c #451445144514", "o c #9A699A69FFFF", "O c white", "+ c #FFFFFBEEF3CE", "@ c #CF3CCF3CFFFF", "# c #9A699A699A69", "$ c #65956595CF3C", "% c #75D675D675D6", "& c #A289A289A699", "* c #CF3CCF3CCF3C", "= c #C30BC30BC30B", "- c #CF3C9A696595", "; c #555555555555", ": c #FFFFCF3C9A69", "> c #208120812081", ", c #DF7DDF7DDF7D", " ", " .. . ......... ", ".Xoo.. .O. .+++++++.. ", ".@.Xoo.. .. .O+O. .+++++++.O. ", ".@Oo.Xoo..@@..O+++O..+++++++....", ".@@@OoXXoooo@o.++++O.++++++++##.", ".@@@@@OoXXooo$.%++++O.+++++++++.", ".@@@@@@@OoXXo$.%&++++O.++++++++.", ".@@@@@@@@@OoX$.%&+++++O.+++++++.", ".@@@@@@@@@@o.$.%&++++++O.++++++.", ".@@@@@@@@@@o.$.%&+++++++*.+++++.", ".@@@@@@@@@@o.$.%&++++++*.%&++++.", ".@@@@@@@@@@o.$.%&+++++*.%&+++++.", ".$o@@@@@@@@o.$.%&++++*.%&++++++.", "=..$o@@@@@@o.$.%&+++*.%&+++++++.", "==...$o@@@@o.$.%&++*.%&++++++++.", "==.--..$o@@o.$..&+*.............", "=.-----..$oo.$.;.*.;;;;------.==", "=.-------..$.$.;;.;;;---------.=", "X::::::::::...--:::::::::::::::.", "................................", ".##############################.", "................................", " .O. ", " .O. ", " ..... ", " .O*#. ", " .O*#. ", " ..... ", " .*.*. ", "&&##%%;;XX...**.*#...>>>XX;;%%#&", "++,,,,,,,,,,**.O.***************"}; xfm-1.5.4/images/files.xpm0000644000175000017500000000240310422406556012334 00000000000000/* XPM */ static char * files_xpm[] = { "32 32 5 1", " s background c None", ". c gray50", "X c white", "o c black", "O c grey", " ................ ", " .XXXXXXXXXXXXXX.o ", " ................X..o ", " .XXXXXXXXXXXXXX.o.O.o ", " ................X..oOO.o ", " .XXXXXXXXXXXXXX.o.O.oOO.o ", " .XXXXXXXXXXXXXX..oOO.oOO.o ", " .XXXXXXXXXXXXXX.O.oOO.ooooo ", " .XXXXXXXXXXXXXX.OO.oOO.oOOo ", " .XXXXXXXXXXXXXX.XOO.oooooOo ", " .XXXXXXXXXXXXXX.XXOO.oOOoOo ", " .XXXXXXXXXXXXXX.oooooooOoOo ", " .XXXXXXXXXXXXXXXOOOOOOoOoOo ", " .XXXXXXXXXXXXXXXOOOOOOoOoOo ", " .XXXXXXXXXXXXXXXXXXXXOoOoOo ", " .XXXXXXXXXXXXXXXXXXXXOoOoOo ", " .XXXXXXXXXXXXXXXXXXXXOoOoOo ", " .XXXXXXXXXXXXXXXXXXXXOoOoOo ", " .XXXXXXXXXXXXXXXXXXXXOoOoOo ", " .XXXXXXXXXXXXXXXXXXXXOoOoOo ", " .XXXXXXXXXXXXXXXXXXXXOoOoOo ", " .XXXXXXXXXXXXXXXXXXXXOoOoOo ", " .XXXXXXXXXXXXXXXXXXXXOoOoOo ", " .XXXXXXXXXXXXXXXXXXXXOoOoOo ", " .XXXXXXXXXXXXXXXXXXXXOoOoOo ", " .XXXXXXXXXXXXXXXXXXXXOoOoOo ", " .XXXXXXXXXXXXXXXXXXXXOoOoOo ", " .XXXXXXXXXXXXXXXXXXXXOoOooo ", " .XXXXXXXXXXXXXXXXXXXXOoOo ", " .XXXXXXXXXXXXXXXXXXXXOooo ", " .OOOOOOOOOOOOOOOOOOOOOo ", " ooooooooooooooooooooooo "}; xfm-1.5.4/images/find.xpm0000644000175000017500000000300010422406556012144 00000000000000/* XPM */ static char * find_xpm[] = { /* width height ncolors chars_per_pixel */ "32 32 17 1", /* colors */ " s background c None", ". c black", "X c #D4D4FF", "o c #868686", "O c white", "+ c #AAAAAA", "@ c #7A7A7A", "# c #4A4A4A", "$ c #DADADA", "% c #F2F2F2", "& c #8E8EFF", "* c #C0C0C0", "= c #CECECE", "- c #FFFFD4", "; c #FF8F6B", ": c #565656", "> c #FFD48E", /* pixels */ " ....... ", " .XXXXXXX. ", " .XXXXXXXXX. ", " .XXXXXXXXXXX. ", " .XXXXXXXXXXXXX............... ", ".XXXXXXXXXXXooooooXXXXXXXXXXXX. ", ".OOOOOOOO+o@......@@@OOOOOOOOO. ", ".OXOXOXO+..#$$%$$$#..@XOXOXOX&. ", ".XOXOXO+.#$$%O%$$$$*#.@XOXOXO&. ", ".OXOXO+.o$$%OOO%$$$=*o.@XOXOX&. ", ".XOXO+..*$%OOO%$$$$$=*..@XOXO&. ", ".OXOXo.*$%OOO%$$$$$$==*.#OXOX&. ", ".XOXo.o=#+OO+###$$$$==*o.#OXO&. ", ".OXOo.*=#%O%---##$$$==**.#XOX&. ", ".XOXo.*=#%O%---#;#$$==**.#OXO&. ", ".OXOo.*=#-%----####===**.#XOX&. ", ".XOXo.**:---------:==***.#OXO&. ", ".OXOo.o*:>--------:==**o.#XOX&. ", ".XOXO@.*@>>----->>:=***..XOXO&. ", ".OXOX@..@;>>>>>>>>@***...OXOX&. ", ".XOXOX@.o;;;>>>>>;@**o..OXOXO&. ", ".OXOXOX@.#;;;;;;;;o*#..OXOXOX&. ", ".XOXOXOX@..#=;;;;=#...OXOXOXO&. ", ".OXOXOXOX@:..........OXOXOXOX&. ", "...........:................... ", " :..... ", " :... ", " :... ", " :... ", " :... ", " #... ", " #. "}; xfm-1.5.4/images/floppy.xpm0000644000175000017500000000276010422406556012551 00000000000000/* XPM */ static char * floppy_xpm[] = { /* width height ncolors chars_per_pixel */ "32 32 15 1", /* colors */ " s background c None", ". c #777777", "X c black", "o c #C0C0C0", "O c #DDDDDD", "+ c #555555", "@ c #9E799E79FFFF", "# c white", "$ c #CF3CCF3CFFFF", "% c #FFFBF0", "& c #999999", "* c #222222", "= c #007700", "- c #444444", "; c #A0A0A4", /* pixels */ " ", " ", " ", " ", " ", " ", " ", " ", " .X. ", " .XXoXX. ", " .XXOOOO+@X. ", " .XXO#Oo++$$$@X. ", " .XXO#Oo++%%$$$$$@X. ", " .XXO#Ooo+o%%%%%$$$$$@X. ", " XXOOOooooo+&o%%%%%$$$$$@X. ", " *XOooo.+o%Ooo+&o%%%%%$$=ooXX. ", " *Ooo.+%o&.+%Ooo+&o%ooo##**o&X ", " *O.+%o++oo&.+%Ooo+&o##ooo&--X ", " *.%%&+oooo%&&.+%ooo#ooo.----X++", " *.%&%%&&%%&&&&+;%%ooo&----XX+++", " .*%&&&%%&&&&+;;;%oo&----XX*++++", " .XX&&&&%%+;;;%%o&----XX*+++++ ", " .XX&&&+oo%%o&----XX*+++++ ", " .XX&+&&o&----XX*+++++ ", " .XX&&&---XX*+++++ ", " .XX&-XX*+++++ ", " .XX*+++++ ", " ", " ", " ", " ", " "}; xfm-1.5.4/images/games.xpm0000644000175000017500000000270510422406556012333 00000000000000/* XPM */ static char * games_xpm[] = { /* width height ncolors chars_per_pixel */ "32 32 13 1", /* colors */ " s background c None", ". c black", "X c #CCCCFF", "o c white", "O c #9999FF", "+ c #C0C0C0", "@ c #DDDDDD", "# c #A0A0A4", "$ c #FF0000", "% c #770000", "& c #777777", "* c #999999", "= c #CC0000", /* pixels */ " ", " ", " ", " ", " ", " ", " ", " ....... ", " .XXXXXXX. ", " .XXXXXXXXX. ", " .XXXXXXXXXXX. ", " .XXXXXXXXXXXXX............... ", " .XXXXXXXXXXXXXXXXXXXXXXXXXXXXX.", " .ooooooooooooooooooooooooooooo.", " .oXoXoXoXoXoXoXoXoXoXoXoXoXoXO.", " .XoXoXoXoXo...............oXoO.", " .oXoXo.....ooooooooooooooo.oXO.", " .XoXo.+++.o@@@@@@@@@@@@@@@o.oO.", " .oXo.+###.o$$$ooooooooooo@o.XO.", " .XoX.+%%%.o$o$ooooooooooo@o.oO.", " .oXo.+#+%.o$$$ooooooooooo@o.OO.", " .XoX.+#%+.o$o$ooooooooooo@o.OO.", " .oXo.+%%%.o@ooooooooooooo@o.OO.", " .Xo..+#++.o$+$ooooooooooo@o.OO.", " .o.&.+%*%.o$$$o+$$o$$+ooo@o.OO.", " .X.&.+%%%.o@$oo$$$=$$=ooo@o.OO.", " .o.&.+#%+.o@ooo$$$$$$=ooo@o.OO.", " .X.&.+#++.o@ooo$$$$$$=ooo@o.OO.", " .o.&.+#++.o@ooo+$$$$=+ooo@o.OO.", " .X.&.+#++.o@oooo+$$=+oooo@o.OO.", " .o.&.+#++.o@ooooo+=+ooooo@o.OO.", " ..............................."}; xfm-1.5.4/images/ghostview.xpm0000644000175000017500000000254210422406556013255 00000000000000/* XPM */ static char * ghostview_xpm[] = { /* width height num_colors chars_per_pixel */ "32 32 6 1", /* colors */ " s background c None", ". c black", "X c white", "o c #c0c0c0", "O c #0000ff", "+ c #ffff00", /* pixels */ " .. ", " .XX. ", " .XXXX. ", " .XXXX. ", " .XXXX. ", " ..XXXXX. ", " .XX.X.XX. ", " .XXXXXXXX. ", " ...XXXXXXXX. ", " .XX.XXX..XXX. ", " ..XXX.XX..XXX. ", " . .XXXXXXXXXXXX.X. ", " .X.. .XXXXXXXXXXXXXXXX. .. ", " .XXX...XXXXXXXXXXXXXXXXX. .XX.", " ...XXXXXXXXXXXXXXXXXXXXX...XX.o", ".XXXXXXXX.XXXXXXXXXXXXXXXXXXXXX.", " ..XXXXX.XXXXXXXXXXX.XXXXXXXX.. ", " .XX...XX.XXXXXXXXXXX..XXXXXX. ", " .. ...XXXXXXXXXXXX. ....X. ", " .XXXXXXXXXXXX. . ", " .XXXXXXXXXXXX.X.. ", " .XXXXXXXXXXXXXXXXX. ", "OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO", "OOOOOOOOOO+OOOOOOOOOOOOOOOOOOOOO", "OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO", "OOOO+OOO+O+OO+++OO+OOO+OOO+OOOOO", "OOOO+OOO+O+O+OOO+O+OO+O+OO+OOOOO", "OOOOO+O+OO+O+++++OO+O+O+O+OOOOOO", "OOOOO+O+OO+O+OOOOOO+O+O+O+OOOOOO", "OOOOOO+OOO+O+OOO+OOO+OOO+OOOOOOO", "OOOOOO+OOO+OO+++OOOO+OOO+OOOOOOO", "OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO"}; xfm-1.5.4/images/ghost.xpm0000644000175000017500000000235110422406556012360 00000000000000/* XPM */ static char * ghost_xpm[] = { "32 32 3 1", " s background c None", ". c black", "X c white", " ", " ", " ...... ", " ..XXXXXX.. ", " .XXXXXXXXXX. ", " .XXXXXXXXXXXX. ", " .XXXXXXXXXXXX. ", " .XXXXXXXXXXXXXX. ", " .XXX..XXXX..XXX. ", " ....XX....XX....XX. ", " .XXX.XXX..XXXX..XXX.... ", " .XXXXXXXXXXXXXXXXXXX.XXX. ", " .XXXXXXXXXXXXXXXXXXXXXXXX. ", " .XXXXXXXXXXXXXXXXXXXXXXXX. ", " ..XXXXXXXXXXXXXXXXXXXXXX. ", " .XXXXXXXXXXXXXXXXXX... ", " ..XXXXXXXXXXXXXXXX. ", " .XXXXXXXXXXXXXXXX. ", " .XXXXXXXXXXXXXXXX. ", " .XXXXXXXXXXXXXXXXX. ", " .XXXXXXXXXXXXXXXXX. ", " .XXXXXXXXXXXXXXXXXX. ", " .XXXXXXXXXXXXXXXXXXX. ", " .XXXXXXXXXXXXXXXXXXXXX. ", " .XXXXXXXXXXXXXX.XXXXXXX. ", " .XXXXXXX.XXXXXXX.XXXXXXX. ", " .XXXXXXXX.XXXXXXX.XXXXXXX. ", " .XXXXXXX...XXXXX...XXXXX. ", " .XXXXXXX. ..... ..... ", " ..XXXX.. ", " .... ", " "}; xfm-1.5.4/images/hammer.xpm0000644000175000017500000000260510422406556012507 00000000000000/* XPM */ static char * hammer_xpm[] = { /* width height ncolors chars_per_pixel */ "32 32 9 1", /* colors */ " s None c None", ". c #DDDDDD", "X c #AAAAAA", "o c #888888", "O c #444444", "+ c black", "@ c #9A6633", "# c #663300", "$ c #330000", /* pixels */ " ", " ...... ... ", " ..XXXXooOooO ", " .ooXooooooooO ", " .oooXooooo+ooO ", " .oo++Xooooo+OOO ", " .o+ ++o+++ +++ ", " .+ .Xo+ ", " .Xo+ ", " .Xo+ ", " .Xo+ ", " .Xo+ ", " .Xo+ ", " .Xo+ ", " ++++ ", " @##$ ", " @###$+ ", " @###$+ ", " @###$+ ", " @###$+ ", " @###$+ ", " @###$+ ", " @###$+ ", " @###$+ ", " @###$+ ", " @###$+ ", " @###$+ ", " @###$+ ", " @###$+ ", " @###$+ ", " ++++ ", " "}; xfm-1.5.4/images/harddrive.xpm0000644000175000017500000000267210422406556013212 00000000000000/* XPM */ static char * harddrive_xpm[] = { /* width height ncolors chars_per_pixel */ "32 32 12 1", /* colors */ " s background c None", ". c black", "X c white", "o c #DDDDDD", "O c #A0A0A4", "+ c #FFFBF0", "@ c #C0C0C0", "# c #CCCCCC", "$ c #777777", "% c #555555", "& c #222222", "* c #444444", /* pixels */ " ", " ", " ", " ", " ", " ", " ", " ", " ", " .............. ", " .XooooooooooooO. ", " .XXoooooooooooooO. ", " .XXoooooooooooooooO. ", " .XXoooooooooooooooooO. ", " .XXoooooooooooooooooooO. ", " .XXoooooooooooooooooooooO. ", " .XXX+++++@oooo###@########O. ", " .+++ooo##$@@@@@OO$OOOOOOOOO. ", " .+++.oo##$@@@@OOO$OO%..%OOO. ", " .+++Ooo##$@@@@@OO$O......oO.& ", " .++OOOo##$@@@@OOO$OooooooOO.&& ", " .+++ooo##$@@@@@OO$OOOOOOOOO.&&&", " .+++ooo##$@@@@OOO$OOOOOOOOO.&&&", " .$$$$$$$$$$$$$$$$$$$$$$$$$$.&&&", " .************************..& ", " ........................& ", " ", " ", " ", " ", " ", " "}; xfm-1.5.4/images/helpme.xpm0000644000175000017500000000266710422406556012520 00000000000000/* XPM */ static char * helpme_xpm[] = { /* width height ncolors chars_per_pixel */ "32 32 12 1", /* colors */ " s background c None", ". c #DDDDDD", "X c black", "o c #9999CC", "O c white", "+ c #999999", "@ c #444444", "# c #9999FF", "$ c #FF6600", "% c #33CC33", "& c #FF0000", "* c #777777", /* pixels */ " ", " ........ ", " .XXXXXXXX. ", " .XooooooooX. ", " .XoOOXXXXOOoX. ", " ..........XoOOXXOOXXOOoX. ", " .XXXXXXXXXXXoOOXXOOXXOOoX. ", " .X..........XoOOOOOXXOOOoX. ", " .X.+++++++++XoOOOOXXOOOOoX. ", " .X.+@@@@@@@@XoOOOOOOOOOOoX. ", " .X.+@O#######XoOOOXXOOOoX. ", " .X.+@#########XooOoooooX. ", " .X.+@##########XXoXXXXX. ", " .X.+@###########XoX@X.. ", " .X.+@########XXXoXX@X. ", " .X.+@#########XXXX+@X. ", " .X.+@############.+@X. ", " .X.+@############.+@X. ", " .X.+@############.+@X. ", " .X.+@.............+@X. ", " .X.++++++++++++++++@X. ", " .X.@@@@@@@@@@@@@@@@@X. ", " .XXXXXXXXXXXXXXXXXX. ", " .X..................X. ", " .X.$$++++++++++++++@X. ", " .X.%%++++++++++++&&@X. ", " .XXXXXXXXXXXXXXXXXXXXXX. ", " .XX.+.+.+.+.+.+.+.+.+..XX. ", ".XX...+.+.+.+.+.+.+.+.+..XX. ", ".X***********************@X. ", ".XXXXXXXXXXXXXXXXXXXXXXXXXX. ", "............................ "}; xfm-1.5.4/images/home.xpm0000644000175000017500000000334610422406556012171 00000000000000/* XPM */ static char * home_xpm[] = { /* width height num_colors chars_per_pixel */ "32 32 32 1", /* colors */ " s background c None", ". c black", "X c #222222", "o c #111111", "O c #005500", "+ c #007700", "@ c #004400", "# c #002200", "$ c #0033ff", "% c #bb0000", "& c #008800", "* c #3300ff", "= c #aa0000", "- c #dd0000", "; c #00aa00", ": c #0000cc", "> c #0000ff", ", c #770000", "< c #00bb00", "1 c #0066ff", "2 c #990000", "3 c #99ccff", "4 c #6699ff", "5 c #cc3300", "6 c #000099", "7 c #660000", "8 c #ff6600", "9 c #555555", "0 c #999999", "q c #a0a0a4", "w c #777777", "e c #444444", /* pixels */ " ", " . ", " .X. ", " ........ .XoX. ", " ..OOOOOOOO...Xo.oX. ...... ", " .OO++++++OO@#Xo.$.oX..%%%%. ", " .OO++&&&&+++OXo.*$*.oX.=--%. ", ".OO+&;;;;;&++Xo.::>::.oX,=-%. ", ".O+&;<<<<;;&Xo.$12221$.oX,=%. ", "#@+&;;;;;&&Xo.*$23232$*.oX,=. ", "#@O+&&&&&+Xo.::2345342::.oX,. ", "#@OO+++++Xo.$11225552211$.oX. ", "#@@OOOOOXo.*$$$2345342$$$*.oX. ", "#@@@@OOXo.::>>*2222222*>>::.oX. ", "##@@@@Xo.$11111111111111111$.o. ", ".###@@@.6*$$$$$$$$$$$$$$$$$*6.. ", ".#####@@6::>>>>>******>>>>::6. ", " .######6$12222222$11111111$6. ", " ..####6*$2342342*$777777$*6. ", " ..52:::2345342:*722227>::. ", " .52:$12345342$17222271$:. ", " .52:*$2255522*$722227$*:. ", " .;52:::2345342:*722227>::. ", " .&;&2:$12345342$17222871$:. ", " .+&;&+:*$2&&+342*$722227$*:. ", " .@O+&+O@::O&;+O22:*722227:::. ", " .#@+++@#$@O&;&O@$117222271$:. ", " .#@OOO@#*@O+&+O@*$$722227$*:. ", " .#@@@#6:@OOOOO@:*9000qqq06:. ", " .#5#76>>@@@@@>>X99999www96. ", " .277666665666oXXXXXXXeeeX. ", " .......................... "}; xfm-1.5.4/images/mag_glass.xpm0000644000175000017500000000262410422406556013174 00000000000000/* XPM */ static char * image[] = { "32 32 17 1", " c none s none", "a c black", "b c grey", "c c grey", "d c grey", "e c grey", "f c grey", "g c grey", "h c grey75", "i c SlateGrey", "j c blue", "k c green", "l c cyan", "m c red", "n c magenta", "o c yellow", "p c white", " aaaaaaaa ", " aaiaaaaaaiaa ", " aiaaiiiiiiaaia ", " aaaiiiiiiiiiiaaa ", " aaaiiii iiiiaa ", " aiaiii pp iiaia ", " aaii p pp aa ", "aiai p aia ", "aaii pp aa ", "aai p pp aai ", "aai p aai ", "aai aai ", "aai aai ", "aai aai ", "aia i aiai ", " aa aaii ", " aia i aiai ", " aa i aaaii ", " iaaa aaaaa ", " iaiaa aaiaa pa ", " iaaiaaaaaaiaaiai aaa ", " iiaaaaaaaaiiiiaapp a ", " iiiiiiiiiiiiiai p a ", " iiiiii iiaai p a ", " iiaai p a ", " iiaai p a ", " iiaai p a ", " iiaai p a ", " iiaai p a", " iiaai pa", " iiaaiia", " iiaaa "}; xfm-1.5.4/images/magic.xpm0000644000175000017500000000257610422406556012325 00000000000000/* XPM */ static char * magic2_xpm[] = { "32 32 10 1", " s background c None", ". c #0000FFFFFFFF", "X c #00000000FFFF", "o c #FFFFFFFF0000", "O c #000000008207", "+ c black", "@ c white", "# c #FFFF0000FFFF", "$ c #0000FFFF0000", "% c #C30BC30BC30B", " . . ", " XoX ", " O. +o+ .O ", " .o+@+o+@+o. ", " +o++o++o+ # $ . . ", " . @+#.@.#+ @. . $@ ", " X+++.@o@.+++X # # ", " oooo@oXo@oooo . $. . ", " X+++.@o@.+++X @$ ", " . @+#.@.#+ . . ", " +o++o++o.+ $%. . ", " .o+@+o+@.o++ . #. ", " O. +o+ ++XX+ $ # ", " XoX XXXX+ . . . ", " . . OXXXX+ ", " OXX.X+ . #$ ", "$ @ OX@.X+@ . #. ", "%. OX@.X+@.%.$ ", "# . . OX@.X+%@ ", " . # OX@.X+$@#. ", " $%$ $@ $ . . OX@.XO. ", "$%.@ .%.%$%. . OX@.XO ", "%# # $%.%. $#.OX@.XO ", ". . #%@%%$@ $ .%@$ OX@.XO ", " . .@%$@%%.%@ $. OX@.XO ", " #. @$ .# @ . OX@.XO ", " . . . # OX@.XO ", " . # . OX@.XO ", " . OX@.O ", " OXOO ", " OO ", " "}; xfm-1.5.4/images/mailfolder.xpm0000644000175000017500000000271210422406556013353 00000000000000/* XPM */ static char * mailfolder_xpm[] = { /* width height ncolors chars_per_pixel */ "32 32 13 1", /* colors */ " s background c None", ". c black", "X c #D4D4FF", "o c white", "O c #0000DC", "+ c #DC0000", "@ c #FE0000", "# c #0000FE", "$ c #CECECE", "% c #C0C0C0", "& c #F2F2F2", "* c #DADADA", "= c #8E8EFF", /* pixels */ " ", " ", " ", " ", " ", " ", " ", " ....... ", " .XXXXXXX. ", " .XXXXXXXXX. ", " .XXXXXXXXXXX. ", "................................", ".oOOoo+@ooOOoo++ooOOoo@+ooO#oo+.", ".OOoo++ooOOoo++ooOOoo++ooOOoo+@.", ".Oooooooooooooooooooooooooooo+o.", ".oooo$%$ooooooooooooooooooooooo.", ".o+o$&o&$oooooooooooooooooooooO.", ".++o%$**%ooooooooooooooooooooOO.", ".@oo$&&&$o$*oo$o$ooooooooooooOo.", ".oooo$%$ooo$o$oooo$$oo*$$&ooooo.", ".oOooooooo&$$$oo$o$o$o$o$ooooo+.", ".OOoooooo$$oo&$$o$oo$$*$oo$oo++.", ".Oooooooooooooooooooooooooooo+o.", ".oooooooooooooooooooooooooooooo.", ".o+oooooooooooooooooooooooooooO.", ".++ooooooooooooooooooooooooooOO.", ".+ooOOoo++ooOOoo++ooOOoo++ooOOo.", ".ooOOoo++ooOOoo++ooOOoo++ooOOoo.", "................................", ".XoXoXoXoXoXoXoXoXoXoXoXoXoXo=. ", ".oXoXoXoXoXoXoXoXoXoXoXoXoXoX=. ", "............................... "}; xfm-1.5.4/images/mail.xpm0000644000175000017500000000303610422406556012157 00000000000000/* XPM */ static char * mail_xpm[] = { /* width height ncolors chars_per_pixel */ "32 32 19 1", /* colors */ " s background c None", ". c black", "X c #DDDDDD", "o c white", "O c #777777", "+ c #999999", "@ c #DD0000", "# c #444444", "$ c #555555", "% c #A0A0A4", "& c #FFFBF0", "* c #CCCCFF", "= c #222222", "- c #CC6633", "; c #663300", ": c #FFCC99", "> c #FF9966", ", c #C0C0C0", "< c #111111", /* pixels */ " ", " ", " ........................ ", " .XXXXXXXXXXXXXXXXXXXXXX. ", " .XooooooooooooooooooooO. ", " .Xo+++ooooooooooooo@@oO. ", " .Xo++oooooooooooooo@@oO. ", " .XooooooooooooooooooooO. ", " .Xooooooooo++o+++oooooO. ", " .XooooooooooooooooooooO. ", " .Xooooooooo+o+o++oooooO. ", " .Xoooooooooo+o++ooooooO. ", " .XooooooooooooooooooooO. ", " .XooooooooooooooooooooO. ", " ....######OOOO++++OOO#####.... ", ".#$$OO++%%XX&&ooooo&&&**%%++OO$.", " .##$$OO++%%XX&ooo&&XX%%++OO$$. ", " .....=========....=====..... ", " .-;;--;--. .--;. ", " .-;:>;->. .->;. ", " .-;:>;-;>.. ..>>;. ", " .;->-:>;>>.>>>>;. ", " .;->>:>;:>>>>>-. ", " .;-->::-:::--;. ", " .;;-->>>>>:-;. ", " ..;;-->>>>:;. ", " ..;;-->>>-. ", " ..;-->>;. ", " .;;;--;. ", " .,,oo,,,,. ", " .......... ", " .<#$#<<... "}; xfm-1.5.4/images/modem.xpm0000644000175000017500000000263010422406556012335 00000000000000/* XPM */ static char * modem_xpm[] = { /* width height ncolors chars_per_pixel */ "32 32 10 1", /* colors */ " s background c None", ". c black", "X c #CCCCFF", "o c white", "O c #9999FF", "+ c #999999", "@ c #777777", "# c #444444", "$ c #DDDDDD", "% c #C0C0C0", /* pixels */ " ", " ", " ", " ", " ", " ", " ", " ....... ", " .XXXXXXX. ", " .XXXXXXXXX. ", " .XXXXXXXXXXX. ", " .XXXXXXXXXXXXX............... ", " .XXXXXXXXXXXXXXXXXXXXXXXXXXXXX.", " .ooooooooooooooooooooooooooooo.", " .oXoXoXoXoXoXoXoXoXoXoXoXoXoXO.", " .XoXoXoXoXoXoXoXoXoXoXoXoXoXoO.", " .oXoXoXoXoX++++++++++oXoXoXoXO.", " .XoXoXoX++@@########@++#oXoXoO.", " .oXoXoX+@@@#@#XoXo@#@@@@#oXoXO.", " .XoXoX+@@@#o@@@@@@@#o@@@@#oXoO.", " .oXoXo+@@@#X@@oooo@#X@@@@#XoXO.", " .XoXoXo###o+@o$$$$%@#o###XoXoO.", " .oXoXoXoXo+@@@%%%%@@@#XoXoXoXO.", " .XoXoXoXoX+@@@@@@@@@@#oXoXoXoO.", " .oXoXoXoX+@@@@@@@@@@@@#oXoXoXO.", " .XoXoXoXo+@++++++++++@#XoXoXoO.", " .oXoXoXoX+@@@@@@@@@@@@#oXoXoXO.", " .XoXoXoXo+@@########@@#XoXoXoO.", " .oXoXoXoX###XoXoXoXo###oXoXoXO.", " .XoXoXoXoXoXoXoXoXoXoXoXoXoXoO.", " .oXoXoXoXoXoXoXoXoXoXoXoXoXoXO.", " ..............................."}; xfm-1.5.4/images/movies.xpm0000644000175000017500000000257210422406556012543 00000000000000/* XPM */ static char * movies_xpm[] = { /* width height ncolors chars_per_pixel */ "32 32 8 1", /* colors */ " s background c None", ". c black", "X c #CCCCFF", "o c white", "O c #555555", "+ c #DDDDDD", "@ c #9999FF", "# c #FFFFCC", /* pixels */ " ", " ", " ", " ", " ", " ", " ", " ....... ", " .XXXXXXX. ", " .XXXXXXXXX. ", " .XXXXXXXXXXX. ", " .XXXXXXXXXXXXX............... ", " .XXXXXXXXXXXXXXXXXXXXXXXXXXXXX.", " .ooooooooooooooooooooooooooooo.", " .XOXoO++++++..++..++++++OXoOX@.", " .oOooOO+++++++..+++++++OOooOo@.", " .XOOOOOOOOOOOOOOOOOOOOOOOOOOX@.", " .oOOOOOOOOOOOOOOOOOOOOOOOOOOo@.", " .XOOOOO+++++++..+++++++OOOOOX@.", " .oOXoO++++++..##..++++++OXoOo@.", " .XOooO+++++.######.+++++OooOX@.", " .oOOOO++++.###..###.++++OOOOo@.", " .XOOOO+++.###.##.###.+++OOOOX@.", " .oOOOOOOO.####..####.OOOOOOOo@.", " .XOXoOOOO.###.##.###.OOOOXoOX@.", " .oOooO+++.###.##.###.+++OooOo@.", " .XOOOO++++.###..###.++++OOOOX@.", " .oOOOO+++++.######.+++++OOOOo@.", " .XOOOO++++++..##..++++++OOOOX@.", " .oOXoOO+++++++..+++++++OOXoOo@.", " .XOooOOOOOOOOOOOOOOOOOOOOooOX@.", " ..............................."}; xfm-1.5.4/images/music.xpm0000644000175000017500000000263010422406556012354 00000000000000/* XPM */ static char * music_xpm[] = { /* width height ncolors chars_per_pixel */ "32 32 10 1", /* colors */ " s background c None", ". c #0000FF", "X c black", "o c #CCCCFF", "O c #9999FF", "+ c white", "@ c #0066FF", "# c #000099", "$ c #FF99FF", "% c #CC66CC", /* pixels */ " ", " ", " ", " ", " ", " . ", " .. ", " XXXXXXX .... ", " XoooooooX ... ", " XoooooooooX . ", " XoooooooooooX . ", " XoooooooooooooXXXXXX.XXXXXXXX ", " Xoooooooooooooooooooo.oOooooooX", " X++++++++++++++++++++.+O++++++X", " X+o+o+o+o+o+o+o+o+o+o.oOo+o+oOX", " Xo+o+@@@@@@@@@@o+o+o+.+O+o+o+OX", " X+o+o..........+o+o@@.oOo+o+oOX", " Xo+o+.+OOOOOOO.OOo@...#O+o+o+OX", " X+o+$..........OO+@..##Oo+o+oOX", " Xo$$+.+O$o+o+o.oOo+###OOOo+o+OX", " X$o+o.oOO%OOOO.OO+o+OOOOO+o+oOX", " Xo+o+.+O+o$$$o.oOo+o+OOO+o+o+OX", " X+o+$.$%o+o+o$.$O+o+o+o+o+o+oOX", " Xo$$+.+O$o+o+o.o%$$o+o+o+o+o+OX", " X$o+o.oOo$o+o+.+O+o$$+o+o+o+$OX", " Xo+o+.+O+o$$$o.oOo+o+$$$$$$$+OX", " X+o@@.$%o+o+@@.$O+o+o+o+o+o+oOX", " Xo@...#O$o+@...#%$$o+o+o+o+o+OX", " X$@..##Oo$o@..##O+o$$+o+o+o+$OX", " Xo+###OOOo$$###OOO+o+$$$$$$$+OX", " X+o+OOOOO+o+oOO%OOo+o+o+o+o+oOX", " XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"}; xfm-1.5.4/images/news.xpm0000644000175000017500000000237110422406556012212 00000000000000/* XPM */ static char * news_xpm[] = { "32 32 4 1", " c #C30BC30BC30B", ". c white", "X c black", "o c #820782078207", " ", " ..............................X", " ..............................X", " ...X..X.XXXX.X...X.XXXX..X X.X", " ...XX.X.X....X.X.X.X.....XX .X", " ...XXXX.XXX..XXXXX.XXXX.. XX .X", " ...X.XX.X....XX.XX....X.. XX.X", " ...X..X.XXXX.X...X.XXXX..X X.X", " ..............................X", " ooooooooooooooooooooooooooooooX", " ..............................X", " .XX.X.XXX.X.ooooooooooooooooo.X", " ..X.X.X.X.X.oXXXXo.. oXXXXXo.X", " .XXXXX.XX.X.oXXXo. . oXXXXo.X", " ..........X.oXXXXXX XXXXXXXo.X", " .XX.......X.oXXXo. . . oXXXXo.X", " ..........X.oXXXo oX oXXXXo.X", " .XX.XXXXX.X.oXXXo oXXXXo.X", " ..........X.oXXXXo XX oXXXXXo.X", " .X.XXXXX..X.oXXXXoo. ooXXXXXo.X", " ..........X.oXXX oooo XXXXo.X", " .XXXX.X.X.X.ooooooooooooooooo.X", " ..........X...................X", " .XXXXXXXX.X.XX.XXXX.XXX.XXXXXXX", " ..........X...................X", " .XXXXXX.X.X.XXXXX.XXXXXX.XXX.XX", " ..........X...................X", " .XX.XXXXX.X.ooooo.............X", " ..........X...................X", " .XXX.X.XX.X.o.oooo.oo.o.ooooo.X", " ..........X...................X", "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"}; xfm-1.5.4/images/paintings.xpm0000644000175000017500000000273010422406556013231 00000000000000/* XPM */ static char * paintings_xpm[] = { /* width height ncolors chars_per_pixel */ "32 32 14 1", /* colors */ " s background c None", ". c black", "X c #D4D4FF", "o c #DADADA", "O c #7A7A7A", "+ c #CECECE", "@ c #AAAAAA", "# c white", "$ c #960062", "% c #DC0000", "& c #868686", "* c #C0C0C0", "= c #565656", "- c #8E8EFF", /* pixels */ " ", " ", " ", " ", " ", " ", " ", " ....... ... ", " .XXXXXXX. .oo.. ", " .XXXXXXXXX. .Oooo. ", " .XXXXXXXXXXX. .+Oooo.. ", " .XXXXXXXXXXXXX.......O+Ooo@o.. ", ".XXXXXXXXXXXXXXXXXXXXO@@++Oo@oo.", ".###################.@++@++Oo@o.", ".#X#X#X#X#X#X#X#X#X.###o++++O@. ", ".X#X#X#X#X#X#X#X#X.$%%%#oo@@&&. ", ".#X#X#X#X#X#X#X#..$%%%%%#o*@&.. ", ".X#X#X#X#X#X#X#.$%%%%%%%%#@&&.. ", ".#X#X#X#X#X#X#.$%%%%%%%%%%+&=.. ", ".X#X#X#X#X#X#.###%%%%%%%$$+..-. ", ".#X#X#X#X#X#.ooo###%%%%$$$.#X-. ", ".X#X#X#X#X#X.&&O++##%%$$$.#X#-. ", ".#X#X#X#X#X.ooo+&+*#%$$$.#X#X-. ", ".X#X#X#X#X#.O&+**&*@#$$.#X#X#-. ", ".#X#X#X#X#X.ooO***O&o$.#X#X#X-. ", ".X#X%%%%%X#..o+O@&=&@.#X#X#X#-. ", ".#X%##%%%%%%%.*O&O=O.#X#X#X#X-. ", ".X%#%%%%%%%%$.@OO=..#X#X#X#X#-. ", ".#%%%%%%%%$$$.....X#X#X#X#X#X-. ", ".X#$$$$$$$$$#X#X#X#X#X#X#X#X#-. ", ".#X#X#X#X#X#X#X#X#X#X#X#X#X#X-. ", "............................... "}; xfm-1.5.4/images/pictures.xpm0000644000175000017500000000347710422406556013104 00000000000000/* XPM */ static char * pictures_xpm[] = { /* width height ncolors chars_per_pixel */ "32 32 38 1", /* colors */ " s background c None", ". c black", "X c #CCCCFF", "o c white", "O c #CC9999", "+ c #CCCC99", "@ c #FFCC99", "# c #FFCCCC", "$ c #C0C0C0", "% c #FF9999", "& c #999999", "* c #CC9966", "= c #777777", "- c #996666", "; c #666666", ": c #666633", "> c #555555", ", c #444444", "< c #663333", "1 c #996633", "2 c #6666CC", "3 c #999966", "4 c #A0A0A4", "5 c #222222", "6 c #333333", "7 c #993333", "8 c #333300", "9 c #111111", "0 c #220000", "q c #000022", "w c #330000", "e c #CCCCCC", "r c #DDDDDD", "t c #333366", "y c #0000CC", "u c #000033", "i c #FFFBF0", "p c #FFFFCC", /* pixels */ " ", " ", " ", " ", " ", " ", " ", " ....... ", " .XXXXXXX. ", " .XXXXXXXXX. ", " .XXXXXXXXXXX. ", " .XXXXXXXXXXXXX............... ", " .XXXXXXXXXXXXXXXXXXXXXXXXXXXXX.", " .ooooooooooooooooooooooooooooo.", " .OO+O@#+@$%OO&*=-;:>:,<><>:>12.", " .+OO@$@$OOO33-;-:,>,,<,<:<>,>2.", " .@4@$@OOO3<566655<5<6<,,<><7,2.", " .4@OOOO-8,&O1OO-<859968<6<:>:2.", " .%4O+O><#@O&500555585556<,<,,2.", " .++O&:<==:00996555995556,,<:<2.", " .@OO-6@:0.,5,&6q5556w558<<,<,2.", " .#+O=*>0,erty=,.qtt5>9865><>:2.", " .#@&-6<;oo$qy,.9.tyu&;95<<><:2.", " .##%3&3Oooiqytq.5yt644,96::>-2.", " .#p##i@3Ooo;tyyyyt9=4&,99-&-32.", " .##pp#OOOOoo5tyyy9;44;5q-&3OO2.", " .p#####O-3Oio=t.t&4=,56-3O*OO2.", " .###oep4+O>*O@4O&->>--3->&OO+2.", " .po##p@OO&3-;>:-->:<>:<93%+@$2.", " .##p####+--;<-,:6<<,655-+$@$@2.", " .#p##rp#@@&-=:>>:,658<3O%@$#@2.", " ..............................."}; xfm-1.5.4/images/printer2.xpm0000644000175000017500000000245310422406556013004 00000000000000/* XPM */ static char * printer2_xpm[] = { "32 32 6 1", " s background c None", ". c black", "X c #C30BC30BC30B", "o c white", "O c #820782078207", "+ c #FFFF00000000", " ", " ", " ", " ", " ", " ", " ", " ............... ", " .XoooooooooooX. ", " .Ooooooooooooo. ", " .oooO..ooooooO. ", " .OoooO..Oooooo. ", " .....oooo.O..ooooO........ ", " .XXO.OoooO.o..Oooo.OXXXXXO. ", " .XXO..oooo.OoO..ooX....XXoO. ", " .XXO...................XXoOO. ", " .XXXXXXXXXXXXXXXXXXXXXXXXoOOO. ", ".oooooooooooooooooooooooooOOOO. ", ".oXXXXXXXXXXXXXXXXXXXXXXXXOOOO. ", ".oXXXXXXXXXXXXXXXXXXX++.XXOOOO. ", ".oXXXXXXXXXXXXXXXXXXXXoooXOOOO. ", ".oXXXXXXXXXXXXXXXXXXX...XXOOOO. ", ".oXXXXXXXXXXXXXXXXXXXXoooXOOO. ", ".oXX................XXXXXXOO.. ", ".oX.OXXOOXXXOOXXXoO.OXXXXXO.O.OO", ".O.OXXOOOXXOOOXXoOO........O.OOO", " .ooooooooooooooOO.OOXXXXXO.OOO ", " .OOOOOOOOOOOOOOO.OOXXXXXX.OOO ", " .XXXXXXXXXXXXXO..........OOO ", " ...............OOOOOOOOOOO ", " OOOOOOOOOOOOOOOO ", " "}; xfm-1.5.4/images/printer3.xpm0000644000175000017500000000250010422406556012776 00000000000000/* XPM */ static char * printer3_xpm[] = { "32 32 7 1", " s background c None", ". c black", "X c #C30BC30BC30B", "o c white", "O c #820782078207", "+ c #0000FFFFFFFF", "@ c #000000008207", " .................. ", " .XXXXXXXXXXXXXXXXX. ", " .ooXXXoXXXoXoXXXoo. ", " .ooooooooooooooooo. ", " .ooXXoXXXXoXXoXXoo. ", " .ooooooooooooooooo. ", " .ooXXXoXXXoXXoXXoo. ", " .ooooooooooooooooo. ", " .ooXXoXXXoXXoXXXoo. ", " .ooooooooooooooooo. ", " .....ooXXoXoXXXoXXXXoo... ", " .ooOO.oooooooooooooooo.o. ", " .XXOO.XXOXOOOXOOXOOOOoo.. ", " .XXO.XXXXXXXXXXXXXXXXo.o. ", " .XXO.XXOOOOXOOOOXOOOXo.o. ", " .XO.XXXXXXXXXXXXXXXXX.Xo. ", " .X....................Xo. ", " ............................. ", " ..Xoooooooooooooooooooooooooo.", " .O.OXXXXXXXXXXXXXXXXXXXXXXXXXo.", " .O.OXXXXXXXXXX++XXXXXXXXX++XXo.", " .O.OXXXXXXXXXX@@XXXXXXXXX@@XXo.", " .O.OXXXXXXXXXXXXXXXXXXXXXXXXXo.", " .O.OX.X.X.X.X.X.X.X.X.X.X.X.Xo.", " .O.OXXXXXXXXXXXXXXXXXXXXXXXXXo.", "OO.O........................... ", "OOO.O.OOOOOOOOOOOOOOOOOOOOOOO. ", "OOO.O.OXXXXXXXXXXXXXXXXXXXXXX. ", " OO...Xoooooooooooooooooooooo. ", " OO.......................... ", " OOOO..OOOOOOOOOOOOOOOOO..O ", " OOOOOOOOOOOOOOOOOOOOOOO "}; xfm-1.5.4/images/printer.xpm0000644000175000017500000000245210422406556012721 00000000000000/* XPM */ static char * printer_xpm[] = { "32 32 6 1", " s background c None", ". c black", "X c #820782078207", "o c #C30BC30BC30B", "O c white", "+ c #820782070000", " ..X. ", " .X.XoOo. ", " .oX+oOoOo. ", " .oX+oOoOoOo. ", " .oX+oOoOoOoOX. ", " .oX+oOoOoOoOX.o. ", " .oX+oOoOoOoOX.oo. ", " .oX+oOoOoOoOXo.oXX. ", " .oX+oOoOoOoOXoXo.XX. ", " .XX+oOoOoOoOXoXoX.X.. ", " .X+oOoOoOoOXoXoX..Oo.X ", " .XoOoOoOoOXoXoX....Oo.X ", " ..oOoOoOoOXoXoX......Oo.X ", " .XoOOoOoOXoXoX....XX..Oo.X ", " .XXoOOoOXoXoX....XXoo..OX.X ", " .XXXoOOXoXoX....XooOXO..X.XX ", " .XXXXoOoXoX....XoOOXOXO.X.X ", " .XXXXXOooX....XoOOXOXOOO.X ", " .XXXXXoOX..O.XoOOXOXOOoOO. ", " .XXXXXXO...OO.oOXOXOOooOOO. ", " X.XXXXX.o.O.OO.oOXOOooOOoOO. ", " X.XXXXOo.OO.OO.oOOOOOOooOO. ", " X.XXXOo.XOO.Oo.OOoOOooOO. ", " X.XXOo.Xo..oo.ooOOOOOO.X ", " X.XOo.Xo..oo.oOOOoOO.X ", " X.O..Xo..oo..oOoOO.X ", " X.XX.o..o..X.oOO.X ", " XX ..X...XXX.O.X ", " XXX.XX X.X ", " XXX X ", " ", " "}; xfm-1.5.4/images/rc.xpm0000644000175000017500000000270410422406556011642 00000000000000/* XPM */ static char * rc_xpm[] = { /* width height ncolors chars_per_pixel */ "32 32 13 1", /* colors */ " s background c None", ". c black", "X c #555555", "o c #777777", "O c #999999", "+ c #444444", "@ c #A0A0A4", "# c #C0C0C0", "$ c #DDDDDD", "% c #CC9900", "& c #996600", "* c #663300", "= c #222222", /* pixels */ " ........ ....... ...... ", " .XoOOOoo+.OOOOoo+..+XoOOO.. ", " .XOo@@@@@@o@@@@@@@o.o@@@@@Oo. ", ".oO@o@#$$$$O#$$$$$#@O#$$$$$#@o. ", ".oOOo@$$%&$#O*$$$&##%&$$$$&$#@o.", ".XO@o@$%@*$$&#*$&#$%@@*$$&@*$@X.", ".XO@o@$%#*$%#$#*#$$$&#@*$%#*$@X.", ".+O@Oo$&$*$$$$$$$$$$&$#*$%$*$@+.", " .oO@Oo&#*$%%&&&&*$$$&$*$#$*$@+.", ".oO@oo@&**$&@$#@*$$$*@&$*$$*$@=.", ".oO@o@#$#*$$&***$$%*@#$**$$*@==.", ".oO@o@$$$$$$$$$$$$$$$$$$$$#@+.. ", ".oO@o@$$$$$$$$$$$$$$$$$$$$$#@X. ", ".XOOOo##$$$$$$$$$$$$$$$$$$$$#@X.", ".XO@o@$$$$$$$$$$$$$$$$$$$$$$$@X.", ".+O@o@$#%&$$$$&$$$&$$#O*$$$&$@X.", ".+O@o@$%@@*$$&@*$&@*$$&#*$&#$@X.", " .oOo@$$&#@*$%#*$%#*$%#$#*#$$@X.", ".oO@oo@$&$#*$%$*$%$*$$$$$$$$$@+.", ".oO@@Oo$$&$*$#$*$#$*$%%&&&&*$@=.", ".oO@Oo@$*@&$*$$*$$$*$&@$#@*$$@+.", ".XO@o@$*@#$**$$*$$$*$$&***$$@@=.", ".XOOo@$$$$$$$$$$$$$$$$$$$$$@XX=.", ".XO@o@$$$$$$$$@$$$$$$@$$$$$$@@=.", ".XO@o@$$$$@X@X@$$$$$$@$$$$$$$@=.", ".XOO+@$#$$$#X@$$$$$$@o@$$$$$#@=.", ".+O@+@@@@@@@X@@@@@@@o+o@@@@@@@=.", ".+O@+ooooooo=ooooooo+XXoooX+===.", ".+OoXXXXX=XX=XXX=XX=XXX=X=+=+=. ", " .+X++=+=++++=+=++==++=+++=+=. ", " .=====.=============.=====. ", " ..... ............. ..... "}; xfm-1.5.4/images/readme.xpm0000644000175000017500000000353610422406556012477 00000000000000/* XPM */ static char * readme_xpm[] = { /* width height num_colors chars_per_pixel */ "32 32 40 1", /* colors */ " s background c None", ". c #111111", "X c black", "o c #444444", "O c #555555", "+ c #333333", "@ c #fffbf0", "# c #220000", "$ c #cccccc", "% c #777777", "& c #222222", "* c #666666", "= c #a0a0a4", "- c #ffcccc", "; c #dddddd", ": c white", "> c #c0c0c0", ", c #ffffcc", "< c #ccffcc", "1 c #ffccff", "2 c #cccc99", "3 c #cc9999", "4 c #999999", "5 c #002200", "6 c #333300", "7 c #003300", "8 c #663333", "9 c #330033", "0 c #ffcc99", "q c #669966", "w c #330000", "e c #666633", "r c #99cc99", "t c #cc99cc", "y c #cccc66", "u c #999966", "i c #000022", "p c #003333", "a c #996666", "s c #333366", /* pixels */ " .XX ", " oX O+.@## ", " X$X. $%%X&*=-;-@. ", " O;:>oo&+++%% $>$,$+:@<-<-. ", " X>,1,@:,::::::::@:%;23;$;4O ", " .;,X@@=oO,@&+-@>$,X&56-2$& ", " #@@:.o3%X;+:@:+X:4+-%7-$6 ", " O=,@.$@:X>8+O@+OX:&;29$0%* ", " #@@48@=X:&q;,+@X:%%3+2>;X ", " &;-;XXX*:*X:=#XO%2&&3$2wX ", " o=,;X>3+5-oXOX$-.>e3$28$+ ", " X;-.r$-$2>2>2222>223$$2& ", " #$$;->22t2>32t3>3>3>22;#$ ", " *%0$22t2233>323223$2t0$.$ ", " #;2*=2=3=23r3=3323>2>-.; ", " &2-X&32X3=y324*&#$6%;24O ", " X$=X#2.Xu23&i6&u$2X32;%X ", " X$&o&$#=&3r&232>2>#$-;X* ", " X;#$oXX$&23+t2t0$3X-5X% ", " &2.=$wX$.$2+2+u>2%#p. ", " #$-+a2+=;&2-&.e$$-&o$OO&o ", " X;;+%-2-$&=;6+;-;2&o-,$+X ", " &0;u#;;$-%e-+4-$-;&+;;,#* ", " .;->+,;,<3s,.$@,$,4-=-;5 ", " X<-<;,;-;@@u@*6=5=1,=,<:# ", " o$-;;,@@-:@@:...,;;#i-@# ", " *&X2$,@@@@:@@:@::@;@:.#@,X ", " X,@-;3;@,1@::@:,:@@,@@:@@X ", " O4;-;,*;,@@q*@,%%-:,1,@,@$X ", " X>4*+&&&++8+&&.o+p+9&%4=$-X ", " X#== =4*OXX ", " "}; xfm-1.5.4/images/recycle.xpm0000644000175000017500000000337210422406556012666 00000000000000/* XPM */ static char * recycle_xpm[] = { /* width height num_colors chars_per_pixel */ "32 32 34 1", /* colors */ " c none", ". c #085d08", "X c #003400", "o c #101c00", "O c #79e7a6", "+ c #9ee3ae", "@ c #aefbbe", "# c #61e379", "$ c #18b228", "% c #000c00", "& c #183820", "* c #206128", "= c #a6ffa6", "- c #59d361", "; c #59b261", ": c #30ae28", "> c #206d30", ", c #9ebe9e", "< c #30c741", "1 c #289628", "2 c #287d38", "3 c #281c10", "4 c #28c330", "5 c #86b68e", "6 c #518651", "7 c #10a220", "8 c black", "9 c #101000", "0 c #8e8e96", "q c #49cb51", "w c #20fb30", "e c #10fb18", "r c #86ffa6", "t c #59a261", /* pixels */ " ..XXoX ", " O+++@+#$%&&...*X ", " ++=+#-;:&.....>> ", " ++O,-<<1%&..*>>223 .. ", " >+##-;;4$2...>>221X oX. ", " #5;44$6$% X.>>12771$7X ", " .5<4:6$718 3.>>2111:$X ", " .:;4$1111. X>221$:<1 ", " .>:1$777% 21$:4<7$$:<4X ", " .>1X 3XXXX3XX3 .. ", "X++++++-#> .212X ", " 9<++++##o ..7777X ", " 0+###--. .>771717$X ", " ###--q46 @@>. .11221$11: ", " -we<44$:$2X >2.o 7:$$<4:4$1:$X X X .>;<;<6:X", " .4$:$$:> X .4<<47> ", " $$:$$% +% $677>o ", " >:$1*% =% *22.3X ", " 2$18&.*>2123 O=++#q:12..X ", " :$X&.>>271X >@++O#;$12.. ", " :%&.*>227$X r++#-;$$>>.X ", " 2%&.*>21$:3.++O-;;$1>.&3 ", " .9..>>214qX ++#-::1>*.X ", " o..>27:& ", " XX27$:-OX .-;$$2>.X ", " XX3XX3X :%%%%3 ", " $8 ", " t% ", " X "}; xfm-1.5.4/images/sounds2.xpm0000644000175000017500000000276410422406556012641 00000000000000/* XPM */ static char * sounds2_xpm[] = { /* width height ncolors chars_per_pixel */ "32 32 16 1", /* colors */ " s background c None", ". c black", "X c #D4D4FF", "o c #868686", "O c #CECECE", "+ c white", "@ c #565656", "# c #0E0E0E", "$ c #4A4A4A", "% c #8E8EFF", "& c #262626", "* c #7A7A7A", "= c #F2F2F2", "- c #DADADA", "; c #C0C0C0", ": c #AAAAAA", /* pixels */ " ", " ", " ", " ", " ", " ", " ", " ....... ", " .XXXXXXX. ", " .XXXXXXXXX. ", " .XXXXXXXXXXX. ", " .XXXXXXXXXXXXX............... ", ".XXXXXXXXXXXXXXXXXXXXoOXXXXXXX. ", ".+++++++++++++++++++@#@++++++X. ", ".+X+X+X+X+X+X+X+X+@$.@X+X+X+X%. ", ".X+X+X+X+X+X+X+X+@$.&*+X+X+X+%. ", ".+X+X+X+X+X+X+X+@$.+&@*+X+X+X%. ", ".X+X+X+X+X+X+X+@$.+X+$*$+X+X+%. ", ".+X+X+X+X+X+X+X$.+X+X.@=$+X+X%. ", ".X+X+X+X+X+X+X@..X+X+X.*=$+X+%. ", ".+X+X+X+X+X+X+$.X+X+X+.$O@X+X%. ", ".X+X+X+X+X+X+@..+X+X+X+.*-$X+%. ", ".+X+X....+X+X$.+X+X+X+X.*;$+X%. ", ".X+X..@*@$.X+..X+X+X+X+.*:$X+%. ", ".+X.$@*-=*$.X..+X+X+X+X.**$+X%. ", ".X+.$@*o-=*$#..X+X.X+X.$*@.X+%. ", ".+X..$@*o--@&#.+X+X....@@.X+X%. ", ".X+X..$@*o*@&#.X+X+X+....X+X+%. ", ".+X+X..$@@@$&#.+X+X+X+X+X+X+X%. ", ".X+X+X+.......+X+X+X+X+X+X+X+%. ", ".+X+X+X+X+X+X+X+X+X+X+X+X+X+X%. ", "............................... "}; xfm-1.5.4/images/sounds.xpm0000644000175000017500000000261110422406556012546 00000000000000/* XPM */ static char * sounds_xpm[] = { /* width height ncolors chars_per_pixel */ "32 32 9 1", /* colors */ " s background c None", ". c black", "X c #CCCCFF", "o c white", "O c #333366", "+ c #444444", "@ c #9999FF", "# c #6666CC", "$ c #C0C0C0", /* pixels */ " ", " ", " ", " ", " ", " ", " ", " ....... ", " .XXXXXXX. ", " .XXXXXXXXX. ", " .XXXXXXXXXXX. ", " .XXXXXXXXXXXXX............... ", " .XXXXXXXXXXXXXXXXXXXXXXXXXXXXX.", " .oooooooooooOooooo+ooooooooooo.", " .oXoXoXoXoX.OoXoXoX+XoXoXoXoX@.", " .XoXoXoXoX.#OXoX+XoX+XoXoXoXo@.", " .oXoXoXoX.#@#oXoX+XoX+XoXoXoX@.", " .XoXoXoX.#@X#XoXoX+Xo+oXoXoXo@.", " .oXoXoX.#@Xo#oX+Xo+oX+XoXoXoX@.", " .XoX...#@XoX#Xo+oX+XoX+XoXoXo@.", " .oXoO@@$ooXX#oXo+oX+Xo+oXoXoX@.", " .XoX@ooooXX@OXoX+Xo+oX+XoXoXo@.", " .oXoO@@#@@@@OoXo+oX+Xo+oXoXoX@.", " .XoX.###@@@@OXoX+Xo+oX+XoXoXo@.", " .oXo...##@@@OoX+Xo+oXo+oXoXoX@.", " .XoXoXo.##@@OXo+oX+Xo+oXoXoXo@.", " .oXoXoXo.##@OoXoXo+oX+XoXoXoX@.", " .XoXoXoXo.##OXoXo+oXo+oXoXoXo@.", " .oXoXoXoXo.#.oXo+oXo+oXoXoXoX@.", " .XoXoXoXoXo..XoXoXo+oXoXoXoXo@.", " .oXoXoXoXoXo.oXoXo+oXoXoXoXoX@.", " ..............................."}; xfm-1.5.4/images/stuff.xpm0000644000175000017500000000264710422406556012373 00000000000000/* XPM */ static char * stuff_xpm[] = { "32 32 12 1", " s background c None", ". c #9A699A699A69", "X c white", "o c #DF7DDF7DDF7D", "O c #65950000CF3C", "+ c #FFFFFBEEF3CE", "@ c black", "# c #9A699A69CF3C", "$ c #75D675D675D6", "% c #A289A289A699", "& c #CF3CCF3CCF3C", "* c #CF3CCF3CFFFF", " ", " ", " . ", " .X. ", " .ooX. ", " .oOOoX. ", " .ooOOOoX. .. ", " .oooOoOOoX..+X. .. ", " .ooooOoOOO..++X..X. ", " .oo@@@@OooO.o.++X.+X. ", " .o@o@@@@ooOO.+++++X. ", " @@ @oooo@@@@..+++++++X. ", " @@@@@oooooo@@@X++++++... ", " @@X@ooooooooo@@@++++X.. ", " @@@X#@o$$ooooooo@%@++++X.@ ", " @@X@@#@oo$o$$ooooo@%@+++@@X@ ", " @X@@@#@o$o#&o$$oo@%@++@@XX#@ ", " @*XX@@oo$###oo$oo@%@@@XX##@@ ", " @@**XX@@o###o$oo@%@@XX##@@@ ", " @@@**XX@@#oo$oo@@XX##@@##@ ", " @**@@**XX@@$o@@XX##@@####@ ", " @****@@**XX@@XX##@@######@ ", " @******@@**XX##@@########@ ", " @@*******@@*X@@########@@ ", " @@*******@@########@@$ ", " $@@******X######@@$$$$$ ", " $$$$$@@****X####@@$$$$$ ", " $$$$$@@**X##@@$$$$$ ", " $$$$$@@X@@$$$$$ ", " $$$$$@$$$$$ ", " $$$$$$$ ", " $$$ "}; xfm-1.5.4/images/tape_net.xpm0000644000175000017500000000275110422406556013037 00000000000000/* XPM */ static char * tape_net_xpm[] = { /* width height num_colors chars_per_pixel */ "32 32 15 1", /* colors */ " s background c None", ". c black", "X c #a0a0a4", "o c #dddddd", "O c #c0c0c0", "+ c #cccccc", "@ c white", "# c #fffbf0", "$ c #999999", "% c #777777", "& c #555555", "* c #444444", "= c #222222", "- c #ccccff", "; c #111111", /* pixels */ " ............................ ", " .XXXXXXXXXXXXXXXXXXXXXXXXXooo. ", " .XXXXXXXXXXXXXXXXXXXXOO+oo@#o. ", " .XXXXXXXXXXXXXXXXXOO+o##@@#oX. ", " .XXXXX$%&*&%$XXXOO+o##@@#o++X. ", " .XXX$&......*&XO+o##@@@##o++X. ", " .XX$*...&&&...*Xo#O%&*&%$XOOX. ", " .XX&..&%O+O%&..%X$*&%$%&*$XOX. ", " .X$=.&Oo####O&.&$*%O+++X%*$OX. ", " .X%..%oo#*+#o%.=&&O#####O&%XX. ", " .X&.&Oo##o*#oO.=&%++*+##+%&XX. ", " .X&.&+##+*+#o+&.*$+*o*o*+$*XX. ", " .X&.&O##*+##oO.=&%+##+*++%&XX. ", " .X%=.%o#o.#oo%.=&&X#####X&%XX. ", " .X$&.&$+##ooo&.*$*$X+++X$*$XX. ", " .XX$*=..................=*$XX. ", " .XX*----------------------*XX. ", " .XX=----------------------=XX. ", " .XX*----------------------*XX. ", " .XX$*=..................=*$XX. ", " .XXXOOo#@@#ooOOOXXXXXXXXXXXXX. ", " .XO+o##@##o+OOOXXXXX;**#=**&X. ", " .X+oo###oo........XX.;#+;=**X. ", " ......... ....##%.... ", " .+++. ", " .+++. ", " .&&&. ", " .+&+. ", "......................++.++.....", ".#.###ooooooo++++++++++; .+++.+.", "....................... ......", " "}; xfm-1.5.4/images/tape.xpm0000644000175000017500000000272310422406556012170 00000000000000/* XPM */ static char * tape_xpm[] = { /* width height ncolors chars_per_pixel */ "32 32 14 1", /* colors */ " s background c None", ". c black", "X c #A0A0A4", "o c #DDDDDD", "O c #C0C0C0", "+ c #CCCCCC", "@ c white", "# c #FFFBF0", "$ c #999999", "% c #777777", "& c #555555", "* c #444444", "= c #222222", "- c #CCCCFF", /* pixels */ " ", " ", " ", " ", " ", " ", " ............................ ", " .XXXXXXXXXXXXXXXXXXXXXXXXXooo. ", " .XXXXXXXXXXXXXXXXXXXXOO+oo@#o. ", " .XXXXXXXXXXXXXXXXXOO+o##@@#oX. ", " .XXXXX$%&*&%$XXXOO+o##@@#o++X. ", " .XXX$&......*&XO+o##@@@##o++X. ", " .XX$*...&&&...*Xo#O%&*&%$XOOX. ", " .XX&..&%O+O%&..%X$*&%$%&*$XOX. ", " .X$=.&Oo####O&.&$*%O+++X%*$OX. ", " .X%..%oo#*+#o%.=&&O#####O&%XX. ", " .X&.&Oo##o*#oO.=&%++*+##+%&XX. ", " .X&.&+##+*+#o+&.*$+*o*o*+$*XX. ", " .X&.&O##*+##oO.=&%+##+*++%&XX. ", " .X%=.%o#o.#oo%.=&&X#####X&%XX. ", " .X$&.&$+##ooo&.*$*$X+++X$*$XX. ", " .XX$*=..................=*$XX. ", " .XX*----------------------*XX. ", " .XX=----------------------=XX. ", " .XX*----------------------*XX. ", " .XX$*=..................=*$XX. ", " .XXXOOo#@@#ooOOOXXXXXXXXXXXXX. ", " .XO+o##@##o+OOOXXXXX.X*....*X. ", " .X+oo###oo........XX.X......X. ", " ......... ........... ", " ", " "}; xfm-1.5.4/images/term.xpm0000644000175000017500000000274510422406556012212 00000000000000/* XPM */ static char * term_xpm[] = { /* width height num_colors chars_per_pixel */ "32 32 15 1", /* colors */ " s background c None", ". c black", "X c #cccccc", "o c #555555", "O c #444444", "+ c #777777", "@ c #6666cc", "# c #9999ff", "$ c #fffbf0", "% c #ccccff", "& c white", "* c #a0a0a4", "= c #99ff33", "- c #999999", "; c #222222", /* pixels */ " ............................ ", " .XXXXXXXXXXXXXXXXXXXXXXXXXXXX. ", " .XXXXXXXXXXXXXXXXXXXXXXXXXXXX. ", " .XXoOOOOOOOOOOOOOOOOOOOOOO+XX. ", " .XXO@####################@$XX. ", " .XXO#%&&&&%&%%%%%%%%%#%##@$XX. ", " .XXO#&&&%%%%%%%%%%%%%%###@$XX. ", " .XXO#&&%%%%%%%%%%%%%%%%##@$XX. ", " .XXO#&%%%%%%%%%%%%%%%%###@$XX. ", " .XXO#&%%%%%%%%%%%%%%%%%##@$XX. ", " .XXO#%%%%%%%%%%%%%%%%%###@$XX. ", " .XXO#&%%%%%%%%%%%%%%%%%##@$XX. ", " .XXO#%%%%%%%%%%%%%%%%%###@$XX. ", " .XXO#%%%%%%%%%%%%%%%%%%##@$XX. ", " .XXO#%%%%%%%%%%%%%%%%%###@$XX. ", " .XXO#%%%%%%%%%%%%%%%%%%##@$XX. ", " .XXO##%%%%%%%%%%%%%#%###@@$XX. ", " .XX+**X$$$$$$$$$$$$$$$$$$$$XX. ", " .XXXXXXXXXXXXXXXXXXXXXXX==XXX. ", " .XXXXXXXXXXXXXXXXXXXXXXXXXXXX. ", " ............................ ", " .--+++ooooooOOOOOO;;;;;;;;;. ", "O..............................O", ".XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.", ".X----------------------------X.", ".X*XXXXXXXXXXXXXXX..........XXX.", ".X&&&&&&&&&&&&&&&&&&&&&&&&&&&&X.", ".XXXXoooo-ooXXXXXXXXXXXXXXXXXXX.", ".XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.", "O.;;;;;;;;;;;;;;;;;;;;;;;;;;;;.O", " .--++++ooooooOOOOOO;;;;;;;;;;. ", " .............................. "}; xfm-1.5.4/images/tools.xpm0000644000175000017500000000266610422406556012405 00000000000000/* XPM */ static char * tools_xpm[] = { /* width height ncolors chars_per_pixel */ "32 32 12 1", /* colors */ " s background c None", ". c black", "X c #D4D4FF", "o c white", "O c #7A7A7A", "+ c #8E8EFF", "@ c #DC9200", "# c #966200", "$ c #FFAA00", "% c #B97A00", "& c #FFAA25", "* c #262626", /* pixels */ " ", " ", " ", " ", " ", " ", " ", " ....... ", " .XXXXXXX. ", " .XXXXXXXXX. ", " .XXXXXXXXXXX. ", " .XXXXXXXXXXXXX............... ", ".XXXXXXXXXXXXXXXXXXXXXXXXXXXXX. ", ".ooooooooooooooooooooooooooooo. ", ".oXoXoXoXOOOOOOoXoXoXoXoXoXoX+. ", ".XoXoXoOOOOO...XoXoXoXoXoXoXo+. ", ".oXoXoOOOO...oXoXoXoXoXoXoXoX+. ", ".XoXoOOOO......XoXoXoXoXoXoXo+. ", ".oXoOOOO.@..XoXoXoXoXoXoXoXoX+. ", ".XoOOOO.@#@$..oXoXoXoXoXoXoXo+. ", ".oXOOOO.%&$#$&..XoXoXoXoXoXoX+. ", ".XOOOO....&@@%@$..oXoXoXoXoXo+. ", ".oO.....Xo..%$$#$@..XoXoXoXoX+. ", ".X.....XoXoX..@$%@&%..oXoXoXo+. ", ".o.****oXoXoXo..@$%&$%..XoXoX+. ", ".Xo...oXoXoXoXoX..$#@@$#..oXo+. ", ".oXoXoXoXoXoXoXoXo..%#@&#$..X+. ", ".XoXoXoXoXoXoXoXoXoX..%$&@..o+. ", ".oXoXoXoXoXoXoXoXoXoXo..$...X+. ", ".XoXoXoXoXoXoXoXoXoXoXoX...Xo+. ", ".oXoXoXoXoXoXoXoXoXoXoXoXoXoX+. ", "............................... "}; xfm-1.5.4/images/trash_empty.xpm0000644000175000017500000000263010422406556013573 00000000000000/* XPM */ static char * trash_empty_xpm[] = { "32 32 11 1", " s background c None", ". c black", "X c #75D675D675D6", "o c #DF7DDF7DDF7D", "O c #A289A289A699", "+ c #451445144514", "@ c white", "# c #9A699A699A69", "$ c #555555555555", "% c #C30BC30BC30B", "& c #208120812081", " ...... ", " .XooOX+. ", " .................... ", " .+XXOOo@ooOO##XXX$$++. ", " ...................... ", " .XO%ooo%%%OOOOXX$$$. ", " .XO%@@@ooooOOOOOX$$. ", " .XOo@@@XoooO$OOXX$$. ", " .XOOo@XOOoo$XXOX&X$. ", " .XOOo@XOOoo$XXOX&$$. ", " .XOOo@XOOoo$XXOX&$$. ", " .XOOo@XOOoo$XXOX&$$. ", " .XOOo@XOOoo$XXOX&$$. ", " .XOOo@XOOoo$XXOX&$$. ", " .XOOo@XOOoo$XXOX&$$. ", " .XOOo@XOOoo$XXOX&$$. ", " .XOOo@XOOoo$XXOX&$$. ", " .XOOo@XOOoo$XXOX&$$. ", " .XOOo@XOOoo$XXOX&$$. ", " .XOOo@XOOoo$XXOX&$$. ", " .XOOo@XOOoo$XXOX&$$. ", " .XOOo@XOOoo$XXOX&$$. ", " .XOOo@XOOoo$XXOX&$$. ", " .XOOo@XOOoo$XXOX&$$. ", " .XOOo@XOOoo$XXOX&$$. ", " .XOOo@XOOoo$XXOX&$$. ", " .XOOo@XOOoo$XXOX&$$. ", " .XOOo@XOOoo$XXOX&$$. ", " .XOo@@@XoooO$OOX$X$. ", " .XO%@@@oooooOOOXX$$. ", " .XOo@@@oo%%OOXXX$$$. ", " .................. "}; xfm-1.5.4/images/trash_full.xpm0000644000175000017500000000270110422406556013376 00000000000000/* XPM */ static char * trash_full_xpm[] = { "32 32 13 1", " s background c None", ". c black", "X c #75D675D675D6", "o c #DF7DDF7DDF7D", "O c #A289A289A699", "+ c #9A699A699A69", "@ c #451445144514", "# c white", "$ c #555555555555", "% c #C30BC30BC30B", "& c #FFFFFBEEF3CE", "* c #208120812081", "= c #CF3CCF3CCF3C", " ...... ", " .XooO+@. ", " .................... ", " .@XXOOo#ooOO++XXX$$@@. ", " ...................... ", " .XOoooo%%%OOOOXX$@@. ", " .XO&&&&ooooOOOOX$$@. ", " .XOoo&&oXooo$OOX$$X. ", " .XOoOo&&X%%o$XXOX*X$X. ", " .XooOo##XO=o$XXOX*$@X. ", " .XOoOoo#X%==oo$XXOX*$@X. ", " .XooOo##X%o#&o$XXOX*$@X. ", " .XOoOo##+%o##&&o$XXOX*$@X. ", " .XOoOo##+%o###&o$XXOX*$@X. ", " .XOoOo##+%o###&o$XXOX*$@X. ", " .XOoOo##+%o###&o$XXOX*$@X. ", " .XOoOo##+%o###&o$XXOX*$@X. ", " .XOoOo##+%o###&o$XXOX*$@X. ", " .XOoOo##+Oo###&o$XXOX*$@X. ", " .XOoOo##+Oo##&oo$XXOX*$@X. ", " .XOoOo##+O%#&ooo$XXOX*$@X. ", " .XOoOo##+O%&oooo$XXOX*$@X. ", " .XOoO%oo+O%ooooo$XXOX*$@X. ", " .XOoO%oo+O%ooo$XXOO*$@X. ", " .XOoO%oo+O%ooo$XXOX*$@X. ", " .XoO%ooo+O%o$XXOOX*@X. ", " .XOoOooo+O%=$XXOX*$@X. ", " .XOoO=o=+O%=$XXOX*@@X. ", " .X%o%==+O=%$XO+X$@X. ", " .XO##o===%OOO+XX$@X. ", " .XOOOOOOOO++XXX$@@$. ", " .................. "}; xfm-1.5.4/images/video.xpm0000644000175000017500000000300110422406556012333 00000000000000/* XPM */ static char * video_xpm[] = { /* width height ncolors chars_per_pixel */ "32 32 17 1", /* colors */ " s background c None", ". c black", "X c #7A7A7A", "o c #0E0E0E", "O c #4A4A4A", "+ c #868686", "@ c #D4D4FF", "# c white", "$ c #FFFF00", "% c #00B900", "& c #FE0000", "* c #DC0000", "= c #0000DC", "- c #AAAAAA", "; c #8E8EFF", ": c #CECECE", "> c #AAFF00", /* pixels */ " ", " ", " ", " ", " ", " ", " ", " ....................... ", " .XXXXXXXXXXXXXXXXXXXXXXX. ", " .XXXXXXXXXXXXXXXXXXXXXXX. ", " ..XXoOOOOOOOOOOOOOOOOO+XX. ", " .@.XXO##$$$%%%%&**&====-XX... ", ".@@.XXO##$$$%%%%****====-XX.@@. ", ".##.XXO##$$$%%%%****====-XX.#@. ", ".#@.XXO##$$$%%%%****====-XX.@;. ", ".@#.XXO##$$$%%%%****====-XX.#;. ", ".#@.XXO##$$$%%%%****====-XX.@;. ", ".@#.XXO##$$$%%%%****====-XX.#;. ", ".#@.XXO##$$$%%%%****====-XX.@;. ", ".@#.XXO##$$$%%%%****====-XX.#;. ", ".#@.XXO##$$$%%%%****====-XX.@;. ", ".@#.XXO##:::---XXXOOO...-XX.#;. ", ".#@.XXO##:::---XXXOOO...-XX.@;. ", ".@#.XXO##:::---XXXOOO...-XX.#;. ", ".#@.XX+-----------------:XX.@;. ", ".@#.XXXXXXXXXXXXXXXXXXXXXXX.#;. ", ".#@.XXXXXXXXXXXXXXXXXXX>>XX.@;. ", ".@#.XXXXXXXXXXXXXXXXXXXXXXX.#;. ", ".#@.........................@;. ", ".@#@#@#@#@#@#@#@#@#@#@#@#@#@#;. ", ".#@#@#@#@#@#@#@#@#@#@#@#@#@#@;. ", "............................... "}; xfm-1.5.4/images/winzip.xpm0000644000175000017500000000255610422406556012563 00000000000000/* XPM */ static char * winzip_xpm[] = { /* width height num_colors chars_per_pixel */ "32 32 7 1", /* colors */ " s background c None", ". c black", "X c #c0c0c0", "o c #808080", "O c #ffff00", "+ c #808000", "@ c white", /* pixels */ " ", " ................ ", " .XXXXXXXXXXXXXXXX. ", " ..................X....... ", " .XoXoXoX. ", " .............. .XXXXXXX. ", " .OOOOOOOOOOOO.. ....... ", " ..............+. oXo ", " .OOOOOOOOOOOO.+. ..... ", " .O+++++++++.O.+. XoX ", " .O+@@@@@@@@.O.+. ..... ", " .O+@O....OO.O.+. oXo ", " .O+@OOOOOOO.O.+. ..... ", " .O..........O.+. XoX ", " .OOOOOOOOOOOO.+. ..... ", " .O+++++++++.O.+. oXo ", " .O+@@@@@@@@.O.+. ..... ", " .O+@O....OO.O.+. XoX ", " .O+@OOOOOOO.O.+. ..... ", " .O..........O.+. oXo ", " .OOOOOOOOOOOO.. ....... ", " .............. .XoXoXoX. ", " .XXXXXXX. ", " ..................X....... ", " .XXXXXXXXXXXXXXXX. ..... ", " ................ oXo ", " ..... ", " .. .XoXoX. .. ", " ......XXXXX..... ", " .. .XXXXX. .. ", " ..... ", " "}; xfm-1.5.4/images/writings.xpm0000644000175000017500000000276510422406556013113 00000000000000/* XPM */ static char * writings_xpm[] = { /* width height ncolors chars_per_pixel */ "32 32 16 1", /* colors */ " s background c None", ". c black", "X c #FFB848", "o c #FFAA25", "O c #565656", "+ c #D4D4FF", "@ c #868686", "# c #C0C0C0", "$ c #F2F2F2", "% c #4A4A4A", "& c white", "* c #8E8EFF", "= c #AAAAAA", "- c #DC9200", "; c #CECECE", ": c #7A7A7A", /* pixels */ " ", " ", " ", " .. ", " ... ", " X.. ", " ..o ", " ....... ..O ", " .+++++++. ..O. ", " .+++++++++. ..@. ", " .+++++++++++. ..#O ", " .+++++++++++++.......$....... ", ".++++++++++++++++++..$%.++++++. ", ".&&&&&&&&&&&&&&&&&..&O.&&&&&&&. ", ".&+&+&+&+&+&+&+&+..$@.+&+&+&+*. ", ".+&+&+&+&+&+&+&+..$=..&+&+&+&*. ", ".&+&+&+&+&+&+&+..$=..&+&+&+.+*. ", ".+&+&+&+&+&+&+...@..&+&+&..+&*. ", ".&+&+&+&+&+&+-X.....+&+..&+&+*. ", ".+&+&+&+&+&....Xo..+&+..&+&+&*. ", ".&+&+&+&+&......-.+&+&..+&+&+*. ", ".+&+&+&+&.&@;&...+&+&+&...&+&*. ", ".&+&+&+&.&@;&$;..&+&+&+&+..&+*. ", ".+&+&+&..O.&$;@.&+&+&+&+&..+&*. ", ".&+&+&.#$.O$;@O.+&+&+&+&..+&+*. ", ".+&+&.#$.&$;%O.+&+&+&....+&+&*. ", ".&+&.#$.&$;...+&+&....+&+&+&+*. ", ".+&+.$.&$;=.&+&...&+&+&+&+&+&*. ", ".&+&O.&$;=:....&+&+&+&+&+&+&+*. ", ".+&..&$.....&+&+&+&+&+&+&+&+&*. ", ".&+....&+&+&+&+&+&+&+&+&+&+&+*. ", "............................... "}; xfm-1.5.4/images/xfig.xpm0000644000175000017500000000255210422406556012174 00000000000000/* XPM */ static char * xfig_xpm[] = { /* width height ncolors chars_per_pixel */ "32 32 7 1", /* colors */ " s background c None", ". c black", "X c green", "o c peru", "O c sienna", "+ c sea green", "@ c lime green", /* pixels */ " ", " .... ... ... ", " . . . ", " ... . . ... ..", " . . . . ..XX", " .. ... ... .XXXX", " .XXXXX", " .XXXXX", " .XXXXXX", " ... .XXXXXXX", " .ooo... ..OXXXX.XX", " .Ooooo.. ........oo.XXXX.XX", " ....OOOo..ooooOOO.OXXXX..XXX", " ..OOOO..OO....XXX..XXXXX", " ...... .+++XXXX.XXXXXX", " .@. .++XX..XXXX.XXX", " .@@ .++X..XXX.XXX.XX", " .+@@ .+XXXXXXX.XXX..X", " .@@. .++X+....X.XXXXX.", " .@@@. .+XX. ..X.XXXXXX", " .+@@@. ..... .XXX.XXXXXX", " .++@@@. .XXXX.XXXXXX", " .+++@@@@. .XXXX.XXXXXXX", " .++@@@@@@. .XXXXXX..XXXX", " ..++.@@@@@@. .XXXXXX. .XXX", " .++.@.@@@@@. .XXXXXX. .XXX", " .++.@@@@@@@@. .XXXXXX. .XXXX", " .++.@@@@@@@@@. .XXXX.. .XXXX", " .+.+.@@@@@@@@@. ..... .XXXX", " .++++@..@@@@@@. .XXXX", " +++++@@@.@@@@@@. +XXXX", " +++++.@@@@@@@@@@ .XXXX"}; xfm-1.5.4/images/xlogo.xpm0000644000175000017500000000233210422406556012363 00000000000000/* XPM */ static char * xlogo_xpm[] = { "32 32 2 1", " s background c None", ". c red", " ", " ", " ", " ", " ", " .......... ... ", " .......... ... ", " .......... ... ", " .......... ... ", " .......... ... ", " .......... ... ", " .......... ... ", " .......... ... ", " ......... ... ", " ....... ... ", " ..... .... ", " ... ...... ", " ... ........ ", " ... .......... ", " ... .......... ", " ... .......... ", " ... .......... ", " ... .......... ", " ... .......... ", " ... .......... ", " ... .......... ", " ... ..........", " ... ", " ", " ", " ", " "}; xfm-1.5.4/images/xmcd.xpm0000644000175000017500000000246710422406556012177 00000000000000/* XPM */ static char * xmcd_xpm[] = { "32 32 5 1", " c #DB6CDB6CBAEA", ". c #CF3C00000000", "X c #5D7545144514", "o c #6DB69A69A699", "O c #FFFFFFFFFFFF", " . ", " . ", " .. ", " .... ", " ..... ", " . .... ", " . ... ", " . .. ", " . .. ", " . . ", " . . XXXXX ", " . XXoooooXX ", " .... . XXXoooOoOOooXX", " ....... . XooooOoOOOOOOOO", " .......... XooooOoOoOOOOOOO", " ......... XoooOooOoOOoOOOOO", " .......... XooooooooOoOOOOOOO", " .......... XoooooooOooOOOOOOOO", " ......... XooooooooOooOOOOOOO", " ....... XooooooooooOooOOOOOO", " ..... XooooooooOooooOoOOOO", " XooooooooooOOOOOoOOO", " XooOOoooooooOXXOOOOOo", " XoooooOOoOoOX XOOooo", " XoOoOoooooOX XOooO", " XooooOoOooOX XOOoo", " XooOOoooooOX XOooo", " XoOooOOOoOoOX XOoooo", " XooOOoOoOoOOOXXOooooo", " XoOoOOOOOoOOOOOooooo", " XoOOOOOOOOoOOooooooo", " XoOOOOOOOOOOOOOooooo"}; xfm-1.5.4/images/xplate.xpm0000644000175000017500000000310010422406556012522 00000000000000/* XPM */ static char * icl8_14864_xpm[] = { /* width height ncolors chars_per_pixel */ "32 32 21 1", /* colors */ " s None c None", ". c #FFCBCB", "X c #FE0000", "o c #FF9966", "O c #444444", "+ c #555555", "@ c #777777", "# c #888888", "$ c #AAAAAA", "% c #BBBBBB", "& c #DDDDDD", "* c #222222", "= c #111111", "- c #663300", "; c #CCCC99", ": c #983200", "? c #440000", "> c #FFCC9A", ", c #9A6633", "< c #CD6600", "1 c #000077", /* pixels */ " ", " ", " .XXXXXXX. .XXX. ", " .XXXXXXX. .XXX. ", " .XXXXXXo .XXX. ", " .XXXXXX. .XXX. ", " oXXXXXX. .XXX. ", " .XXXXXXX..XXX. ", " .XXXXXX.XXX. ", " .XXXX.XXXXX. ", " .XXX.XXXXXXX. ", " .XXX. .XXXXXXo ", " .XXX. .XXXXXX. ", " .XXX. oXXXXXX. ", " .XXX. .XXXXXXX. ", " .XXX. .XXXXXXX. ", " ", " ", " O+@#$%&&%%$$##@@@+++OOO***=== ", " *+$&%$$##@@++OOO***====== ", " -;;;;:: ::? ", " ::>>>;,, ,;;- ", " ::>>>><< <>>- ", " :>>>>>< <>>- ", " :>>>>><<<>>>- ", " :>>>>>>>>>- ", " ::>>>>>>>>- ", " :>>>>>>>>- ", " ::>>>>>- ", " ::>>>--- ", " 111111 11 ", " 111111111 "}; xfm-1.5.4/images/xrolodex.xpm0000644000175000017500000000265010422406556013102 00000000000000/* XPM */ static char * xrolodex_xpm[] = { /* width height ncolors chars_per_pixel */ "32 32 11 1", /* colors */ " s None c None", ". c #777777", "X c #DDDDDD", "o c #888888", "O c #555555", "+ c #BBBBBB", "@ c #EEEEEE", "# c #AAAAAA", "$ c #444444", "% c #FE0000", "& c #222222", /* pixels */ " ", " ", " ................. ", " .XXXXXXXXXXXXXXX.ooooo ", " OOOOOOOOOOOOOOOO+XX.X@@@o ", " O++++++++++++++++OXX.X@@o ", " O+++++++++++++++O+X.X@@o ", " O++++++++++++++++O+.X@o..... ", " O############+++O+.X@o+XXX. ", "$$$$$%%%%%%$$$$$$#++O+.Xo+XXX. ", " $###%%%%%%%#####$#++O%%%%XX. ", " $###%%%%%%%#####$##%%%%XX.OOOO", " $###%%%%%%#####$oo%%%XX.#+++O", " $##&%%%%%%##&##$%%%XX.#++OO ", " .&..%%%%%%&...%%%XX.#+OOo$ ", " ##&##%%%%%%&##%%%XX.OOOo###$", " ..&...%%%%%%.%%%&$&&&&o#$$$$", " $&$$$$%%%%$%%%%%o$$o#&& ", " #++&+++%%%+%%%%%%%oo$ooo&& ", " #XXXXXX%%%XXX%%%%%%ooo$$ooo& ", " #@@@@@@%%%@@@@@%%%%%%oooo$ooo&", " #@@@@@@%%%@@@@@@#%%%%%%oooo$&&&", "#######%%%#######o%%%%%%%oooo$ ", " o#%%%##########%%%%%%%oooo$ ", " o++++++++++++++++oo...$$$$$$ ", " oXXXXXXXXXXXXXXXooo.###O ", " oXXXXXXXXXXXXXXXXo##.###OO ", " ooooooooooooooooo+++.OOOOO ", " .+++++++++++++++. ", " ................. ", " ", " "}; xfm-1.5.4/images/xterm.xpm0000644000175000017500000000262310422406556012375 00000000000000/* XPM */ static char * xterm_xpm[] = { /* width height num_colors chars_per_pixel */ "32 32 9 1", /* colors */ " s background c None", ". c black", "X c #c0c0c0", "o c #808080", "O c red", "+ c white", "@ c #65959A699A69", "# c #FFFF9A69CF3C", "$ c #00ff00", /* pixels */ " .............................. ", ".XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.", ".Xooooooooooooooooooooooooooooo.", ".Xooooooooooooooooooooooooooooo.", ".Xoo........................ooo.", ".Xoo.OOOOOOO+++++++++++OOO+Xooo.", ".Xoo.+OOOOOOO+++++++++OOO++Xooo.", ".Xoo.++OOOOOO@+++++++OOO+@@Xooo.", ".Xoo.+++OOOOOO#+++++OOO+@@@Xooo.", ".Xoo.+++#OOOOOO++++OOO+@@@+Xooo.", ".Xoo.++++OOOOOOO++OOO+@@@++Xooo.", ".Xoo.+++++OOOOOO@OOO+@@@+++Xooo.", ".Xoo.++++++OOOO@OOOOO@@++++Xooo.", ".Xoo.++++++OOO@OOOOOOO+++++Xooo.", ".Xoo.+++++OOO@@@OOOOOO@++++Xooo.", ".Xoo.++++OOO+@@@+OOOOOO@+++Xooo.", ".Xoo.+++OOO+@@@+++OOOOOO+++Xooo.", ".Xoo.++OOO+@@@++++#OOOOOO++Xooo.", ".Xoo.+OOO+@@@+++++++OOOOOO+Xooo.", ".Xoo.++++@@@+++++++++@@@@@@Xooo.", ".Xoo.XXXXXXXXXXXXXXXXXXXXXXXooo.", ".Xooooooooooooooooooooooooooooo.", ".Xooooooooooooooooooo$oo....ooo.", ".Xooooooooooooooooooo$oo....ooo.", ".Xooooooooooooooooooooooooooooo.", " .............................. ", " .............. ", " .oooooooooooo. ", " .............................. ", "..XXXXXXXXXXXXXXXXXXXXXXXXXXXX..", ".oooooooooooooooooooooooooooooo.", "................................"}; xfm-1.5.4/images/devices.xpm0000644000175000017500000000265110422414423012651 00000000000000/* XPM */ static char * xfm_dir_xpm[] = { /* width height ncolors chars_per_pixel */ "32 32 11 1", /* colors */ " s background c None", ". c #808080", "X c #ffff00", "o c #c0c0c0", "O c #00ffff", "+ c black", "@ c #00ff00", "# c white", "$ c #008000", "Y c #CECEFF", "Q c #9C9CFF", /* pixels */ " ", " ", " ", " ", " ", " ", " ", " +++++++ ", " +YYYYYYY+ ", " +YYYYYYYYY+ ", " +YYYYYYYYYYY+ ", " +YYYYYYYYYYYYY+++++++++++++++ ", "+YYYYYYYYYYYYYYYYYYYYYYYYYYYYY+ ", "+#############################+ ", "+#Y#Y#Y#Y#Y#Y#Y#Y#Y#Y#Y#Y#Y#YQ+ ", "+Y#..............Y#Y#Y#Y#Y#Y#Q+ ", "+#.#############+#Y#Y...Y#Y#YQ+ ", "+Y.#ooooooooooo.+Y#..XXo..#Y#Q+ ", "+#.#@$++++++++o.+#.OOXXooo+#YQ+ ", "+Y.#oo#####oooo.+.@@OXXoo#o+#Q+ ", "+#..............+.o@@.+.#oo+YQ+ ", "+Y#+++++++++++++#.oo@+#+ooo+#Q+ ", "+#Y#Y#Y#Y#Y#Y#Y#Y.ooo.+.Ooo+YQ+ ", "+Y#Y#Y#Y#Y#Y#.....ooo#ooXOO+#Q+ ", "+#Y#Y#Y#Y#Y#.#####.o#ooo@X+#YQ+ ", "+Y#Y#Y#Y#Y#Y.#ooooo..ooo+++Y#Q+ ", "+#Y#Y#Y#Y#Y#.#@$++++++++o.+#YQ+ ", "+Y#Y#Y#Y#Y#Y.#oo#####oooo.+Y#Q+ ", "+#Y#Y#Y#Y#Y#..............+#YQ+ ", "+Y#Y#Y#Y#Y#Y#+++++++++++++#Y#Q+ ", "+#Y#Y#Y#Y#Y#Y#Y#Y#Y#Y#Y#Y#Y#YQ+ ", "+++++++++++++++++++++++++++++++ "}; xfm-1.5.4/doc/0000777000175000017500000000000010744136021010063 500000000000000xfm-1.5.4/doc/Makefile.am0000644000175000017500000000052310421705657012044 00000000000000MAINTAINERCLEANFILES = Makefile.in man_MANS = xfm.1 xfmtype.1 xfm.5 xfm_dev.5 xfmmailcap.1 xfm_mailcap.5 xfm_magic.5 xfm_mime.types.5 %: %.in sed -e s#DATADIR#"$(pkgdatadir)"# -e s#CONFDIR#"$(sysconfdir)"/X11/xfm# -e s#APPDIR#"$(sysconfdir)"/X11/xfm# $< >$@ || rm $@ EXTRA_DIST = $(addsuffix .in,$(man_MANS)) CLEANFILES = $(man_MANS) xfm-1.5.4/doc/Makefile.in0000644000175000017500000002717310744135556012072 00000000000000# Makefile.in generated by automake 1.10 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = doc DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/xfmconfig.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = man1dir = $(mandir)/man1 am__installdirs = "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man5dir)" man5dir = $(mandir)/man5 NROFF = nroff MANS = $(man_MANS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COMPRESSIONLIBS = @COMPRESSIONLIBS@ CONFIG_VARIANT = @CONFIG_VARIANT@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ MAINTAINERCLEANFILES = Makefile.in man_MANS = xfm.1 xfmtype.1 xfm.5 xfm_dev.5 xfmmailcap.1 xfm_mailcap.5 xfm_magic.5 xfm_mime.types.5 EXTRA_DIST = $(addsuffix .in,$(man_MANS)) CLEANFILES = $(man_MANS) all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu doc/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-man1: $(man1_MANS) $(man_MANS) @$(NORMAL_INSTALL) test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)" @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ for i in $$l2; do \ case "$$i" in \ *.1*) list="$$list $$i" ;; \ esac; \ done; \ for i in $$list; do \ if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ else file=$$i; fi; \ ext=`echo $$i | sed -e 's/^.*\\.//'`; \ case "$$ext" in \ 1*) ;; \ *) ext='1' ;; \ esac; \ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ inst=`echo $$inst | sed -e 's/^.*\///'`; \ inst=`echo $$inst | sed '$(transform)'`.$$ext; \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst"; \ done uninstall-man1: @$(NORMAL_UNINSTALL) @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ for i in $$l2; do \ case "$$i" in \ *.1*) list="$$list $$i" ;; \ esac; \ done; \ for i in $$list; do \ ext=`echo $$i | sed -e 's/^.*\\.//'`; \ case "$$ext" in \ 1*) ;; \ *) ext='1' ;; \ esac; \ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ inst=`echo $$inst | sed -e 's/^.*\///'`; \ inst=`echo $$inst | sed '$(transform)'`.$$ext; \ echo " rm -f '$(DESTDIR)$(man1dir)/$$inst'"; \ rm -f "$(DESTDIR)$(man1dir)/$$inst"; \ done install-man5: $(man5_MANS) $(man_MANS) @$(NORMAL_INSTALL) test -z "$(man5dir)" || $(MKDIR_P) "$(DESTDIR)$(man5dir)" @list='$(man5_MANS) $(dist_man5_MANS) $(nodist_man5_MANS)'; \ l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ for i in $$l2; do \ case "$$i" in \ *.5*) list="$$list $$i" ;; \ esac; \ done; \ for i in $$list; do \ if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ else file=$$i; fi; \ ext=`echo $$i | sed -e 's/^.*\\.//'`; \ case "$$ext" in \ 5*) ;; \ *) ext='5' ;; \ esac; \ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ inst=`echo $$inst | sed -e 's/^.*\///'`; \ inst=`echo $$inst | sed '$(transform)'`.$$ext; \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man5dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man5dir)/$$inst"; \ done uninstall-man5: @$(NORMAL_UNINSTALL) @list='$(man5_MANS) $(dist_man5_MANS) $(nodist_man5_MANS)'; \ l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ for i in $$l2; do \ case "$$i" in \ *.5*) list="$$list $$i" ;; \ esac; \ done; \ for i in $$list; do \ ext=`echo $$i | sed -e 's/^.*\\.//'`; \ case "$$ext" in \ 5*) ;; \ *) ext='5' ;; \ esac; \ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ inst=`echo $$inst | sed -e 's/^.*\///'`; \ inst=`echo $$inst | sed '$(transform)'`.$$ext; \ echo " rm -f '$(DESTDIR)$(man5dir)/$$inst'"; \ rm -f "$(DESTDIR)$(man5dir)/$$inst"; \ done tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(MANS) installdirs: for dir in "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man5dir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-man install-dvi: install-dvi-am install-exec-am: install-html: install-html-am install-info: install-info-am install-man: install-man1 install-man5 install-pdf: install-pdf-am install-ps: install-ps-am installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-man uninstall-man: uninstall-man1 uninstall-man5 .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic distclean \ distclean-generic distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-man1 install-man5 install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am uninstall uninstall-am uninstall-man \ uninstall-man1 uninstall-man5 %: %.in sed -e s#DATADIR#"$(pkgdatadir)"# -e s#CONFDIR#"$(sysconfdir)"/X11/xfm# -e s#APPDIR#"$(sysconfdir)"/X11/xfm# $< >$@ || rm $@ # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xfm-1.5.4/doc/xfm.1.in0000644000175000017500000005065710421722131011270 00000000000000.TH XFM 1 "20 April, 2006" "xfm" XFM .SH NAME xfm \- X file and applications manager .SH SYNOPSIS .B xfm [\fIoptions\fP ...] .sp .SH DESCRIPTION \fIXfm\fP is a file and applications manager program for the X window system. It provides virtually all of the features that you would expect in a file manager \- move around your directory tree in multiple windows, move, copy or delete files, and launch programs with simple mouse operations. Directory displays are updated automatically in regular intervals when the contents of the directory changes. The integrated application manager provides a kind of ``shelf'' onto which you can place your favorite applications, as well as the files and directories you are currently working with. It also allows you to access different groups of applications and files. User-definable file types let you specify a command to be executed when double-clicking on a file or dropping other files onto it. Last not least, \fIxfm\fP can automatically mount and unmount special devices like floppies as you open and close the corresponding directories (mount points). .SH "OPTIONS" \fIXfm\fP accepts all the usual toolkit options. Furthermore, the following options let you print \fIxfm\fP's version number and control which windows should be displayed at startup. .TP 4 .B \-version Print the version number and exit. .TP 4 .B \-appmgr Only display the application manager window. .TP 4 .B \-filemgr Only display the file manager window. .PP If both \fI\-appmgr\fP and \fI\-filemgr\fP are specified, then the applications and one file manager window will be displayed, which is also the default. If only \fI\-filemgr\fP is specified, the application manager will not be available in this session. .SH "USAGE" Most of it should be fairly obvious. There is one application window and zero or more file windows in which directories (also termed \fIfolders\fP) are displayed. In order to perform an action, you either select items and then invoke a menu operation, or you drag items from a file window to a second (maybe the same) file window or the application window. You can also double-click on an item to start a corresponding action (like launching an application, editing a file, or changing directories), and press the right menu button on an item to bring up a menu containing operations for a single file or application. Pressing the right button on the background of the application window displays the application menu. File operations are accessed from the file window menu bar as usual. .PP The left-hand mouse button selects an item (and deselects all others in the same window). The second button toggles the selected state of an item. .PP A string containing the paths of the selected file items can be requested by other applications using the standard selection mechanism (PRIMARY selection). To provide visual feedback, the file window that owns the selection paints its status line using a special highlight color. You can then paste the list of selected files in some other window such as an xterm. .PP You can drag with the left-hand button to another window (or another icon, in general a valid destination will be highlighted with a border when the cursor is over it) to move files from one directory to another. The second button used in the same way will copy files. You can also drag around items in the application window; again, the left mouse button moves, and the second button copies the selected items to a new position. Applications can be launched by dropping files on them; and installing files and programs in the application manager can be done by dropping files on the background of the application window. Finally, new file windows can be opened by simply dragging a directory icon to the root window. .PP The action taken when double-clicking on a file depends on the type of the file. If it is a directory, it is displayed in the file window. If it is an executable, the program is started. Other files are opened in the default editor (specified by the \fIeditor\fP resource), unless another action is given in the \fIxfm_mailcap\fP file (see CONFIGURATION below). .PP The output of child processes invoked by \fIxfm\fP is captured in a special log window. This window provides buttons for clearing the window contents and for hiding the window. You can also specify whether you want the window to pop up automagically when new output is available (\fIAuto Popup\fP option, enabled by default), and explicitly show the window using the \fIShow log\fP option of the \fIView\fP menu. .PP Directories can be displayed in three different forms: \fItree\fP (display subdirectories in tree-like form), \fIicon\fP (display directories and files as icons) and \fItext\fP (similar to \fIls \-l\fP). These options are selected from the \fIView\fP menu. In the tree form, clicking on the arrows takes you up or down one level. .PP Directory displays are updated automatically in regular intervals when the contents of the directory changes. You can also explicitly request a folder update by double-clicking on the directory name field of the corresponding file window. .PP A menu of recently visited directories can be popped up by pressing the right mouse button on the directory name field of the file window. .SH "MENU COMMANDS" Many menu operations can also be invoked with corresponding keyboard shortcuts which can be changed by configuring the translations in the applications defaults file accordingly. The default shortcuts, as defined in the distributed application defaults file, are given in parentheses below. .PP FILE MENU .PP File manipulation operations. .TP 4 .IR "New... " "(n)" .br Create a new (and empty) file. .TP 4 .IR "Move... " "(m)" .br Rename a single item (directory or file) or move selected items to another directory. .TP 4 .IR "Copy... " "(c)" .br Create a copy of a single item under a new name or copy selected items to another directory. .TP 4 .IR "Link... " "(l)" .br Like \fICopy\fP, but creates symbolic links rather than copying the selected items. .TP 4 .IR "Delete " "(d, Del, Backspace)" .br Delete the selected items. .TP 4 .IR "Select... " "(s)" .br Select items by pattern. The usual metacharacters are recognized (\fI*\fP, \fI?\fP, \fI[ ]\fP). (Currently there is no provision for escaping these.) .TP 4 .IR "Select all " "(a)" .br Select all items in the current directory (except the parent directory). .TP 4 .IR "Deselect all " "(u)" .br Deselect all items. .TP 4 .IR "Own Selection " "(o)" .br Request ownership of the PRIMARY selection. This is useful if some files had been selected before but the ownership of the X-selection was lost and the user later wants to get the ownership back. .TP 4 .IR "Terminal " "(x)" .br Invokes an \fIx\-terminal\-emulator\fP(1) in the current directory (using the command specified with the \fIdefaultXterm\fP resource). .TP 4 .I "About xfm..." .br Display a box with some information about \fIxfm\fP. .TP 4 .IR "Quit " "(q)" .br Terminate \fIxfm\fP. .PP FOLDER MENU .PP Operations dealing with directories and the file window. .TP 4 .IR "New... " "(Shift+n)" .br Create a new directory. .TP 4 .IR "Go to... " "(Shift+g)" .br Display the specified directory. .TP 4 .IR "Home " "(Shift+h)" .br Display your home directory. .TP 4 .IR "Up " "(Shift+u)" .br Display the parent directory. .TP 4 .I Empty .br Delete all items in the current directory. .TP 4 .IR "Clone " "(Shift+c)" .br Clone this file window (open another file window on the same directory). .TP 4 .IR "Close " "(Shift+q)" .br Close this file window. .PP VIEW MENU .PP Options for the directory display and the log window. .TP 4 .IR "Tree " "(Ctrl+r)" .br Select the tree form display. .TP 4 .IR "Icons " "(Ctrl+i)" .br Select the icons form display. .TP 4 .IR "Text " "(Ctrl+t)" .br Select the text form display. An additional \fIOption\fP menu appears which allows you to select the information to be shown in the text view. .TP 4 .IR "Sort by name " "(Ctrl+n)" .br Sort directory by name. .TP 4 .IR "Sort by size " "(Ctrl+s)" .br Sort directory by size. .TP 4 .IR "Sort by date " "(Ctrl+d)" .br Sort directory by date. .TP 4 .IR "Filter... " "(Ctrl+f)" .br Specify a pattern to determine the files which should be displayed in the file window. (This only affects normal files, i.e. directory items will not be filtered. The \fIClear\fP button in the Filter dialog form reverts to the full display.) .TP 4 .IR "Hide folders " "(Ctrl+h)" .br Suppress directory items. .TP 4 .IR "Mix folders/files " "(Ctrl+m)" .br Mix directories and other files. .TP 4 .IR "Show hidden files " "(Ctrl+u)" .br Show hidden files (files starting with a dot). .TP 4 .I Show log .br Redisplay the log window. .PP FILE POPUP MENU .PP Operations on a single file. This menu pops up when pressing the right mouse button on a directory or file icon. .TP 4 .I Open Open a file window on the selected item. This option is only available if the selected item is a directory. .TP 4 .I Edit .br Edit the selected item using the program specified in the \fIeditor\fP resource (only available if the selected item is not a directory). .TP 4 .I View .br Same as Edit, but invokes a program for viewing the file (\fIdefaultViewer\fP resource). .TP 4 .I Rename... .br Rename the selected item (same as \fIMove\fP, but shows the current filename as the default). .TP 4 .I Move... .br Move the selected item. .TP 4 .I Copy... .br Copy the selected item. .TP 4 .I Link... .br Create a symbolic link. .TP 4 .I Delete .br Delete the selected item. .TP 4 .I Information... .br Display information about the selected item (file size, permissions and such). .TP 4 .I Permissions... .br Change the permissions of the selected item. .PP APPLICATION MENU .PP Operations for managing the application window. .TP 4 .I Install... .br Install a new application in the application window. Pops up a dialog form into which you can enter the necessary information (see APPLICATION FILES for a discussion of the fields in this form). .TP 4 .I Install group... .br Simplified install dialog form for creating a new application group (see APPLICATION FILES). .TP 4 .I Cut .br Move the selected application items into a ``clip'' file (specified by the \fIapplicationDataClip\fP resource). Together with the \fIPaste\fP option, this allows you to move application items between different application groups. .TP 4 .I Copy .br Like \fIMove\fP, but simply copies the selected items instead of removing them from the application window. .TP 4 .I Paste .br Insert the contents of the clip file into the application window. .TP 4 .I Delete .br Delete the selected items from the application window. .TP 4 .I "About xfm..." .br Display a box with some information about \fIxfm\fP. .TP 4 .I Quit .br Terminate \fIxfm\fP. .PP APPLICATION POPUP MENU .PP Operations on a single application item. This menu pops up when pressing the right mouse button on an icon in the application window. .TP 4 .I Edit... .br Edit an application item. Pops up a dialog form which allows you to change the configuration information associated with the selected item (see CONFIGURATION for a discussion of the fields in this form). .TP 4 .I Cut .br Move the selected item to the clip file. .TP 4 .I Copy .br Copy the selected item to the clip file. .TP 4 .I Delete .br Delete the selected item from the application window. .PP APPLICATION WINDOW BUTTONS .PP These buttons at the bottom of the application window allow you to navigate in the application group tree and open new file windows. .TP 4 .I Back .br Return to the previous application group. .TP 4 .I Main .br Return to the main application group (the one loaded at startup time). .TP 4 .I Reload .br Reload the current application file. This option is useful to update the contents of an application window after manual editing of the application file. .TP 4 .I File window .br Open a new file window on the user's home directory. .SH "RESOURCES" Various aspects of \fIxfm\fP can be configured by changing corresponding resource settings in the application defaults file. Some important resources are listed below: .TP 4 .B highlightColor .br The color used for highlighting selected items, as well as the status line of the file window which owns the primary selection (if any). .TP 4 .B bitmapPath .TP 4 .B pixmapPath .br The path on which to search for bitmap and pixmap icons, respectively. .TP 4 .B iconPath The path to look for pixmap icons for the file types. .TP 4 .B applicationDataFile .TP 4 .B devFile .TP 4 .B magicFile .br The names of the application and configuration files used by \fIxfm\fP (see CONFIGURATION). Normally, these files will be located in \fI~/.xfm\fP. .TP 4 .B systemwideApplicationDataFile .TP 4 .B systemwideDevFile .TP 4 .B systemwideMagicFile .br These files are used, if the corresponding described before are not found. This allows changeable system wide defaults while users are still able to overwrite them. .TP 4 .B applicationDataDir .br The directory in which the application files for new application groups are located (see the \fIInstall group\fP option of the application menu), usually \fI~/.xfm\fP. Application groups changed are also copied here, when the original file cannot be written to. .PP If it does not exists, it will be generated when needed. .TP 4 .B applicationDataClip .br The ``clip'' file used in Cut/Copy/Paste operations in the aplication window, usually \fI~/.xfm/.XfmClip\fP. .PP If it begins with \fIapplicationDataDir\fP, this will be generated when xfm starts. .TP 4 .B doubleClickTime .br Set the time interval in milliseconds for which a sequence of two mouse clicks should be interpreted as a double click. Default: 300. .TP 4 .B updateInterval .br Set the time interval in milliseconds in which to perform automatic folder updates. Default: 10000. .TP 4 .B confirmXXX .br Resources to request confirmation for various operations. \fIXXX\fP can be any one of \fIDeletes\fP, \fIDeleteFolder\fP, \fICopies\fP, \fIMoves\fP, \fIOverwrite\fP and \fIQuit\fP. By default these are all enabled. .TP 4 .B editor .br The command and leadings arguments with which \fIxfm\fP invokes your favorite editor. .TP 4 .B viewer .br The command and leading arguments with which \fIxfm\fP invokes your favorite viewer. .TP 4 .B xTerminal .br The command and leading arguments with which \fIxfm\fP starts a command within and xterm. (e.g. xterm \-e) .TP 4 .B xTerminalAlone .br The command with which \fIxfm\fP runs an X terminal emulator. (e.g. xterm) .TP 4 .B shell .br Specifies the shell to use for running commands. (If not set, \fB$SHELL\fP is used instead. If that also does not exists /bin/sh is used.) .PP There are way too many available resources to list them all in this manual page, so please take a look at the application defaults file for more information. .SH "CONFIGURATION" Besides the application resources, \fIxfm\fP can be configured by means of four different files, which are usually named .IR xfm_dev , .IR xfm_magic , .I xfm_mime.types and .IR xfm_mailcap , and are by default searched for in the .IB ~ /.xfm directory or in .IR CONFDIR . Moreover, there is a number of so-called application files, from which \fIxfm\fP determines the contents of the application window, like the \fIApps\fP file which usually describes the contents of the main application group. All these files are plain ASCII files which can be edited using any text editor. (Note that application files are also written by \fIxfm\fP itself whenever the contents of the application window changes.) Any line in these files which starts with a hash sign (\fI#\fP) is interpreted as a comment; empty lines are ignored. .SH "MAGIC HEADERS" \fIxfm\fP can determine file types using the magic numbers contained in the files. .PP The magic numbers are described in a configuration file whose path is obtained from the \fImagicFile\fP or \fIsystemwideMagicFile\fP resource, by default .IB ~ /.xfm/xfm_magic respectively .BR CONFDIR/xfm_magic . The format of the file is the same as that of the \fImagic\fP(5) file, with some extensions described in \fIxfm_magic\fP(1). The program \fIxfmtype\fP(5) can be used to test this. .SH "SUFFIX TYPES" If no file type could be obtained using the magic values, \fIxfm\fP falls back to determine the type of a file by its suffix. The rules it used are described in a configuration file whose path is obtained from the \fImimeTypesFile\fP or \fIsystemwideMimeTypesFile\fP resource, by default .IB ~ /.xfm/xfm_mime.types respectively .BR CONFDIR/xfm_mime.types . The format of the file is described in the \fIxfm_mime.types\fP(5) man page. .SH "OPENING FILES" \fIxfm\fP determines how to open files consulting the file whose path is obtained from the \fImailcapFile\fP or \fIsystemwideMailcapFile\fP resource, by default .IB ~ /.xfm/xfm_mailcap respectively .BR CONFDIR/xfm_mailcap . The format of the file is described in the \fIxfm_mailcap\fP(5) man page. .SH "DEVICE CONFIGURATION" The device configuration file, \fIxfm_dev\fP, lets you specify which mount points \fIxfm\fP should keep track of, and which actions to perform in order to mount and unmount the corresponding file systems. This allows you to access file systems on special devices such as floppies, CD-Roms, etc. in a transparent way. See \fIxfm_dev\fP(5) for the format of this file. .SH "APPLICATION FILES" Application files are used to specify the contents of the application window. Normally, these files are not altered with a text editor, but are updated by \fIxfm\fP whenever the contents of the application window changes. An understanding of the application data is necessary, however, if you want to edit an existing or create a new entry using the \fIInstall\fP, \fIInstall group\fP and \fIEdit\fP options of the application menu. The format of those files is described in the \fIxfm\fP(5) man page. \fIXfm\fP provides a number of operations which let you manipulate application groups in a convenient manner. The items in the application window can be moved and copied using drag and drop as usual. The \fICut\fP, \fICopy\fP and \fIPaste\fP options of the application menu provide a means to move and copy application items between different application files. Moreover, \fIxfm\fP keeps a stack of application files loaded from a file or the application window via a \fILOAD\fP action. The \fIBack\fP button at the bottom of the application window lets you return to the previous group of applications, and the \fIMain\fP button reloads your startup application file (and empties the stack). Finally, the \fIInstall group\fP option of the application menu allows you to create entries for new application groups easily. You only have to specify the name of the group, the name of the corresponding application file, and the name of the icon file. The remaining fields of the entry are filled in by \fIxfm\fP automatically. .SH "FILES" .TP 4 .IB ~ /.xfm Standard location for \fIxfm\fP configuration and application files (see CONFIGURATION above). .TP 4 .B CONFDIR Standard location for system wide configuration files used when no user specific are available. .SH "SEE ALSO" .BR xfm (5), .BR xfmmailcap (1), .BR xfm_mailcap (5), .BR xfmtype (1), .BR X (1), .BR xconsole (1), .BR x\-terminal\-emulator (1), .BR magic (5), Arnaud Le Hors: \fBXPM Manual. The X PixMap Format\fP, Groupe Bull, 1993. .SH "CAVEATS AND BUGS" \fIXfm\fP catches the TERM signal to gracefully terminate the program, unmounting all open file systems which have been mounted by \fIxfm\fP. However, some window and session managers may not send TERM signals to their client applications when terminating an X session. Therefore it might be necessary to explicitly quit \fIxfm\fP or manually close file windows mounted by \fIxfm\fP before exiting X. .PP Do not specify a relative path in the directory field of an application item, because when you execute a push action on the application the current directory might not always be what you expect. This will probably be fixed in a future release. ;-) .PP Due to recent changes, it will propably no longer work with any shell without a minimum of POSIX compatibility. .SH "AUTHORS" Simon Marlow (simonm@dcs.glasgow.ac.uk) from the University of Glasgow, Albert Graef (ag@muwiinfa.geschichte.uni\-mainz.de) from the University of Mainz, and Till Straumann (strauman@sun6hft.ee.tu\-berlin.de) from the Technical University of Berlin, with help from many other people: Dave Safford (dave.safford@edu.tamu.sc; automatic folder updates); Robert Vogelgesang (vogelges@rhrk.uni\-kl.de; shell detection code); Juan D. Martin (juando@cnm.us.es; magic headers); Kevin Rodgers (rodgers@lvs\-emh.lvs.loral.com; Filter option); Scott Heavner (sdh@falstaff.MAE.cwru.edu; View option); Brian King (ender@ee.WPI.EDU; default values in parameter dialogs), Bernhard R. Link (brlink@debian.org; various changes and responsible for the current state you see). xfm-1.5.4/doc/xfmtype.1.in0000644000175000017500000000430110421722131012153 00000000000000.TH XFMTYPE 1 "20 April, 2006" "xfm" XFM .SH NAME xfmtype \- xfm file type tester .sp .SH SYNOPSIS .B xfmtype \-m \fImagic_file\fP \fR[\fP\-f\fR]\fP \fIfilename\fP ... .SH DESCRIPTION The \fIxfmtype\fP program reads a magic configuration file and tests each file in its command line to tell its type according to the configuration file. .PP The format of the configuration file is the similar to \fBmagic\fP(5) with the differences described in \Bxfm_magic\fP(5). .SH OPTIONS .TP 4 .B \-f \fIfile\fP Consider the following argument as a file, even if it begins with `\-'. .TP 4 .B \-m \fIfile\fP Specifies a configuration file. You can specify more than one configuration file with several \fB\-m\fP flags. They are read in the order in which they are found. Configuration files do not have effect until they are encountered in the command line. So, files to test in the command line before that switch will not be affected by it. .SH "BUILT IN TYPES" If no rule matches a specified field or the type cannot be determined because of other reasons, one of the following built in types is returned: .nf .sp \fIinode/x\-unreadable\fP The file could not be read. .sp \fIinode/x\-empty\fP File size is zero. .sp \fItext/plain\fP The file looks like ACSII. \fBxfm\fP will look into \fBxfm_mime.type\fP(5) for more guessing. .sp \fIapplication/octet\-stream\fP Other regular file. \fBxfm\fP will look into \fBxfm_mime.type\fP(5) for more guessing. .sp \fIinode/directory\fP A directory. .sp \fIinode/chardevice\fP A character device. .sp \fIinode/blockdevice\fP A block device. .sp \fIinode/pipe\fP A names pipe (fifo). .sp \fIinode/socket\fP A socket. .sp \fIinode/default\fP None of the above. .sp .fi .SH BUGS Bad configuration lines cause undefined behavior. In general they are silently ignored, but that is not guaranteed. .br There are no warning or error message except for the regular expression syntax. .br There should be a syntax checking mode. .br All of the above apply to \fIxfm\fP too. .SH "SEE ALSO" .BR xfm (1), .BR xfm_magic (5), .BR file (1), .BR magic (5). .SH COPYRIGHT Copyright (c) 1995 CNM-US .br Copyright (c) 1995 Juan D. Martin .SH AUTHOR Juan D. Martin (juando@cnm.us.es) .br (but modified heavily by Bernhard R. Link) xfm-1.5.4/doc/xfm.5.in0000644000175000017500000000721710421722131011266 00000000000000.TH XFM 5 "20 April, 2006" "xfm" XFM .\" Copyright (C) 2006, Bernhard R. Link .\" You may distribute under the terms of the GNU General Public .\" License as specified in the file COPYING that comes with xfm. .SH NAME xfm \- file format for application window contents of xfm .SH DESCRIPTION Xfm - the X file and application manager - has its own format to save the content of the application window, which is described in this file. .SH FORMAT One entry per line. Lines starting with a hash (#) and empty lines are ignored. Each line consists out of six fields, separated by colons (:). Backslashes and colons within those fields have to be escaped using backslashes. .SH FIELDS .SS Label The label printed below the icon in the application window is the first part. .SS Directory Directory The second part is the directory the specified action is executed in. An empty string is treated as the \fI$HOME\fP-directory, which is also substituted for a leading tilde followed by a slash (~/). If this line has the special drop_action \fBLOAD\fP, this is not the directory, but the next xfm file to display. .SS "empty compatibility field" This field is only here for compatibility reasons. It has to be empty. .SS "icon" The 4th field is the icon to show. Unless this field is empty, \fBxfm\fP will search in the \fBpixmapPath\fP and the \fBbitmapPath\fP for this file and use it as icon for this item. The icon has to be in \fBXBM\fP or in the \fBXPM\fP format. .SS "push action" This field (the 5th) contains the action to execute when the specified field is double-clicked or otherwise activated. Unless it is one of the special commands listed below, it is given as a whole to the shell. Any parts encapsulated in percent signs (%) are substituted with user input. Default values can be specified with two hyphens (\-\-) within the token. The special commands are: .IP \fBLOAD\fP The directory field is interpreted as filename of a xfm file which replaces the current contents of the application window. If the directory is the special value \fBXFM-DEVICES\fP, the content of the application window are generated out of the information of the \fBxfm_dev\fP(5) file instead. .IP \fBOPEN\fP The directory specified in the directory field is opened in a new file window. .IP "\fBEDIT\fP \fIfilename\fP" Start the default editor with the specified filename. .SS "drop action" This field (the 6th) contains the action to execute if some files are dragged from the file window and dropped into this item. The command is given to a shell, and the files are given as arguments. .SH EXAMPLES Start a xterm with \fI$HOME\fP-directory as current directory. The icon is xterm.xpm. Nothing can be dragged here. .br \fBXterm:::xterm.xpm:exec term:\fP .br Open the special menu for showing mountable devices: .br \fBDevices:XFM\-DEVICES:::LOAD:\fP .br Open a file window with the home directory: .br \fBHome::::OPEN:\fP .br Open \fB/floppy\fP in a new file window: .br \fBDiskettenlaufwerk:/floppy::dev_floppy.xpm:OPEN:\fP .br Execute an xterm with a user specified command: .br \fBexecute::::xterm \-e %command\-\-watch date%:\fP .br Grab a screenshot when pushed, show drag&dropped images with xli: .br \fBpicture::::import `date +\\%Y\\%m\\%d\\%M\\%H\\%S.png`:xli "$@"\fP .br Process dropped files with transfig: .br \fBtransfig:::app.xpm::transfig \-L %Language\\:\-\-eepic% "$@"\fP .SH FILES .TP .B \fI$HOME\fP/.xfm/Apps Unless otherwise specified in the X resources, this is the file opened when Xfm starts. .TP .B CONFDIR/Apps Unless otherwise specified in the X resources, this file is opened when the previous one fails. .SH "SEE ALSO" .BR xfm (1), .BR xfm_dev (5), .BR xfmtype (1), .BR xbm (5), .BR xpm (5). xfm-1.5.4/doc/xfm_dev.5.in0000644000175000017500000000605710421722131012125 00000000000000.TH XFM_DEV 5 "20 April, 2006" "xfm" XFM .\" Copyright (C) 2006, Bernhard R. Link .\" You may distribute under the terms of the GNU General Public .\" License as specified in the file COPYING that comes with xfm. .SH NAME CONFDIR/xfm_dev \- xfm device configuration .SH DESCRIPTION When starting \fBxfm\fP(1) - the X file and application manager - reads this file to determine mount and umount commands for specific directories. .SH FORMAT One entry per line. Lines starting with a hash (#) and empty lines are ignored. Each line consists out of three or four fields, separated by colons (:). Backslashes and colons within those fields have to be escaped using backslashes. .SH FIELDS .SS directory The first field describes which directory this entry is about. If this this directory or and child directory of this is opened, while no other one is open, the mount command is executed. If the last file window showing this directory or a child thereof, the unmount command is executed. This field can also be the special string \fBGETFSENT\fP, which is described in a special paragraph below. .SS "mount command" The second field is the command to execute for mounting. It is given the shell as one argument after a \fB\-c\fP. .SS "unmount command" The third field is the command to execute for unmounting. It is given the shell as one argument after a \fB\-c\fP. .SS "icon" The fourth field is optional. It is only used to sepcify an icon for the \BXFM\-DEVICES\fP menu. No icon field is equivalent to an icon field containing \fBdev_disk.xpm\fP, which differs from an empty icon field. (See \fBxfm\fP(5)). .SH "automatic configuration via GETFSENT" If the first field of an entry is the special string \fBGETFSENT\fP, and the systen xfm was compiled on had a \fBfstab.h\fP file, the \fBgetfsent\fP(3) function is used to get mount point information. Every mount point which contains a mount option starting with \fBuser\fP. (like \fBuser\fP, or \fBusers\fP) for which no specification does yet exists is added to the list. .SS "mount and unmount command" These commands are expanded with a space and the directory in question and the result is handled a in the normal case. This needs some fixing with directories containing spaces. .SS "icon field" The icon field can in this case be appended by an arbitrary number of rules of the form .br \fB,\fP\fIfstype\fP\fB=\fP\fIiconname\fP .br If the filesystem has type \fIfstype\fP, the icon \fIiconname\fP is used instead. .SH EXAMPLES .br \fB/media/cdrom:mount /media/cdrom:umount /media/cdrom:cdrom.xpm\fP .br \fB/floppy:mount /floppy:umount /floppy\fP .br \fBGETFSENT:mount:umount:dev_disk.xpm,iso9660=dev_cdrom.xpm,ext2=bla.xpm\fP .SH FILES .TP .IB $HOME /.xfm/xfm_dev Unless otherwise specified in the X resources, this is the first location xfm looks for this file. .TP .B CONFDIR/xfm_dev Unless otherwise specified in the X resources, this file is tried when the previous could not be read. .TP .B /etc/fstab This is the file \fBgetfsent\fP most likely gets its information from. .SH "SEE ALSO" .BR xfm (1), .BR mount (8), .BR getfsent (3). xfm-1.5.4/doc/xfmmailcap.1.in0000644000175000017500000000372410421673302012615 00000000000000.TH XFMMAILCAP 1 "20 April, 2006" "xfm" XFM .SH NAME xfmmailcap \- show mailcap information as parsed by xfm .SH SYNOPSIS .B xfmmailcap \-\-help .B xfmmailcap \fImime-type\fP \fR[(\fPdefault\fR|\fBall\fR|\fPedit\fR|\fPview\fR) [\fP\fIfilename\fP\fR]]\fP .SH DESCRIPTION xfmmailcap parses the \fBxfm\fP(1)'s mailcap file (see \fBxfm_mailcap\fP(5) for its format) and prints information about what command xfm would use when told to open a file of the given \fImime-type\fP. If there is no second argument, the default it \fBdefault\fP. If there is a third argument, xfmmailcap will insert this filename into the action. (This is not yet implemented) .SH ACTIONS .SS all Show all information collected about this mime-type. .SS default Show the action \fBxfm\fP(1) would start when confronted with this action, together with all debug output xfm would show when the \fBechoMimeSearch\fP resource represents True. It first tries everything the \fBedit\fP action would show and if nothing is found there, then it tries the \fBview\fP action. .SS edit Find the best (in the sense of highest priority) command to edit this mime type. .SS view Find the best (in the sense of highest priority) command to view this mime type. (There is yet no way to trigger that from within xfm). .SH CAVEAT xfmmailcap has the paths \fI$HOME\fP\fB/.xfm/xfm_mailcap\fP and .B CONFDIR/xfm_mailcap built in statically. This differs from \fBxfm\fP(1), where all of these can be changed by means of X resources. .SH FILES .TP .B \fI$HOME\fP/.xfm/xfm_mailcap If this file exists, it is read and its content used as mailcap database. See \fBxfm_mailcap\fP(5) for its format. .TP .B CONFDIR/xfm_mailcap If the previous file is not found, this one is used instead. Same format. .SH "SEE ALSO" .BR xfm (1), .BR xfm_mailcap (5). .SH COPYRIGHT Copyright \(co 2006 Bernhard R. Link .br This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. xfm-1.5.4/doc/xfm_mailcap.5.in0000644000175000017500000000751210735461417012771 00000000000000.TH XFM_MAILCAP 5 "20 April, 2006" "xfm" XFM .\" Copyright (C) 2006, Bernhard R. Link .\" You may distribute under the terms of the GNU General Public .\" License as specified in the file COPYING that comes with xfm. .SH NAME xfm_mailcap \- mailcap information for usage within xfm or xfmmailcap .SH DESCRIPTION To determine what command to use to open a file with a specific mime type, \fBxfm\fP(1) uses files in a format similar to the mailcap format. The extensions are special actions to open directories or files to load into the application window and to include other mailcap files, so that the default mailcap databases in \fB~/.mailcap\fP, \fB/etc/mailcap\fP, \fB/usr/share/etc/mailcap\fP and \fB/usr/local/etc/mailcap\fP can be included. This man page describes which fields are used and the extensions. For general information of the syntax of these files read the man pages \fBmailcap\fP(5) and \fBupdate\-mime\fP(8). While this files are supposed to be read by \fBxfm\fP(1), there also is the program \fBxfmmailcap\fP(1) to ease debugging. .SH "GENERAL FORMAT" There is one entry per line. Empty lines and lines starting with a hash (#) are ignored. Each line consists of parts separated by semicolons (;). The first part is the mime part or the token \fBinclude\fP. The second part is the \fIview\fP option. This is followed by an arbitrary number of option names, followed by a value after a equal sign, if they have a value. .SH INCLUDES Lines with a mime-type \fBinclude\fP or \fB!include\fP are not treated as mailcap specifiers, but cause the filename described by the second argument to be read at this place. I recommend placing the following line at the end of every \fI$HOME\fP\fB/.xfm/xfm_mailcap\fP file: include; CONFDIR/mailcap .SH "OPTIONS USED BY XFM" .TP .B test The value of this option (after unescaping) is executed using \fBsystem\fP(3). If it fails, the content of the line is not used for anything but increasing the amount of output. Some tests weather a \fIDISPLAY\fP environment variable are set are omitted and considered always true. .TP .B nametemplate If this option has a value, the filename has to match it when a action is executed. Otherwise it is replaced by a symlink matching it. It has to contain exactly one unescaped occurrence of \fB%s\fP, which is used as wild card for any positive number of characters. .TP .B edit This is the preferred action to open a file. Unless it is one of the special actions explained below, it has to contain exactly one unescaped occurance of \fB%s\fP, which is replaced by the filename to open, or the filename of a symlink to the file to open in the case the filename might be dangerous or does not match the nametemplate of this line. .TP .B needsterminal If this option, which normally has no value, is there, the actions specified in this line are executed in an X terminal emulator. .SH "SPECIAL ACTIONS" If the action with the highest priority is one the special strings \fBOPEN\fP or \fBLOAD\fP, no shell is spawned and no command executed. Instead the current file window is changed to the selected directory (\fBOPEN\fP) or the file is supposed to be in the \fBxfm\fP(5) format and loaded into the application window(\fBLOAD\fP). .SH FILES .TP .B \fI$HOME\fP/.xfm/xfm_mailcap Unless \fBxfm\fR(1) is told to look at a different place via X resource \fBXfm.mailcapFile\fP, this is the first place xfm looks for a file with the describes format. \fBxfmmailcap\fP(1) always looks here first. .TP .B CONFDIR/xfm_mailcap If the first file does not exists, \fBxfm\fP(1) (unless it gets told a different place via the X resource \fBXfm.systemwideMailcapFile\fP) and \fBxfmmailcap\fP(1) look for this file. It is recommended that the file in the home directory includes this file to get the system wide defaults. .SH "SEE ALSO" .BR xfm (1), .BR xfmmailcap (1), .BR mailcap (5), .BR update\-mime (8). xfm-1.5.4/doc/xfm_magic.5.in0000644000175000017500000000534710421722131012430 00000000000000.TH XFM_MAGIC 5 "20 April, 2006" "xfm" XFM .SH NAME xfm_magic \- xfm's magic file format .sp .SH DESCRIPTION .BR xfm (1) and .BR xfmtype (1) read files in this format to determine the mime type of a file, which again is used to determine what command to open it with. The format of the configuration file is the same as the \fBmagic\fP(5) with the following additions and differences: .TP 4 \fBinclude:\fP directive If a line starts with \fBinclude:\fP the rest of the line is treated as filename of an other magic file to be read and processed before processing this file continues. Included files can be include files again. Thus a user specific file can .br \fBinclude: CONFDIR/xfm_magic\fP .br to get the system wide xfm defaults and this file again .br \fBinclude: /usr/share/file/magic.mime\fP .br to get the system wide system defaults. .TP 4 \fBmode\fP type field. Similar to \fBlong\fP type, but \fIoffset\fP is ignored. The test is performed against the \fBst_mode\fP field of the \fIstat\fP structure obtained using \fBstat\fP(2) system call. This allows testing for directories, fifos ... as well as for file permissions. .TP 4 \fBlmode\fP type field. Similar to \fBmode\fP type, but using \fIlstat\fP(2) instead of \fBstat\fP(2). This allows testing for symbolic links. .TP 4 \fBregexp\fP type field. The \fIvalue\fP field must be a proper regular expression. The bytes starting at \fIoffset\fP are matched against it. If the match succeeds, then a \fBregsub\fP(3) is performed on \fImessage\fP yielding the final message. If the type field is of the form \fBregexp&nnn\fP where \fBnnn\fP is a positive number, then that number controls the amount of data scanned for the matching, otherwise a compile defined value (currently 256) is used. .TP 4 \fBlong\fP and \fBshort\fP byte order. \fIxfmtype\fP always reads \fBlong\fPs and \fBshort\fPs using MSB-first order. This makes configuration files portable to all architectures, but some entries in original \fBmagic\fP(5) files might be wrong. .TP 4 Continuation lines. If a line ends with a \fIbackslash\fP character (\fI\\\fP), it is continued with the following line. The maximum length of a line is 1024 characters (counting also characters in continuation lines). .PP .SH FILES .TP .IB $HOME /.xfm/xfm_magic Default location \fBxfm\fP(1) looks for a file of this format. (Note that \fBxfmtype\fP(1) only reads files specified with \fB\-m\fP on the command line.) .TP .B CONFDIR/xfm_magic System wide default file if there is no user specific one. .SH "SEE ALSO" .BR xfm (1), .BR xfmtype (1), .BR file (1), .BR magic (5), .BR stat (2), .BR lstat (2). .SH COPYRIGHT Copyright (c) 1995 CNM-US .br Copyright (c) 1995 Juan D. Martin .SH AUTHOR Juan D. Martin (juando@cnm.us.es) .br (but modified heavily by Bernhard R. Link) xfm-1.5.4/doc/xfm_mime.types.5.in0000644000175000017500000000446210421722131013437 00000000000000.TH XFM_MIME.TYPES 5 "20 April, 2006" "xfm" XFM .\" Copyright (C) 2006, Bernhard R. Link .\" You may distribute under the terms of the GNU General Public .\" License as specified in the file COPYING that comes with xfm. .SH NAME xfm_mime.types \- suffix based fall back mime type information .SH DESCRIPTION When \fIxfm\fP(1) cannot determine the type of a file using the values in \fIxfm_magic\fP(5), this file is used to guess a type of a file. The file shipped with \fIxfm\fP by default just tells to include the files .IB ~ /.mime.types and .B /etc/mime.types to get the system wide settings. .SH FORMAT There is one entry per line. Empty lines and lines starting with a hash (#) are ignored. Prior entries overwrite later ones. If a line starts with .B !include or .B include the rest of the line is treated as a filename to process before continuing with the rest of the file. (If the filename starts with a tilde followed by a slash, the tilde is replaced by the content of the .I HOME environment variable.) Other lines contain the name of a \fImime type\fP followed by an arbitrary number of filename \fIsuffixes\fP, seperated by spaces or tabs. A file that got no other type associated by content and whose name ends with a dot followed by the specified \fBsuffix\fP, will be treated as type \fBmime type\fP. \fIXfm\fP only recognizes suffixes with at most 7 characters. .SH EXAMPLES Otherwise unidentified files anding in \fB.c\fP are treated as \fBtext/x\-csrc\fP: .br \fBtext/x\-csrc c\fP .br Same with \fB.c++\fP, \fBcpp\fP, \fBcxx\fP or \fBcc\fP as \fBtext/x\-c++src\fP: .br \fBtext/x\-c++src c++ cpp cxx cc\fP .br .SH FILES .TP .IB $HOME /.xfm/xfm_mime.types Unless \fBxfm\fR(1) is told to look at a different place via X resource \fBXfm.mimeTypesFile\fP, this is the first place xfm looks for a file with the describes format. .TP .B CONFDIR/xfm_mime.types If the first file does not exists, \fBxfm\fP(1) (unless it gets told a different place via the X resource \fBXfm.systemwideMimeTypesFile\fP) looks for this file. .TP .IB $HOME /.mime.types General user settings normaly included from .B CONFDIR/xfm_mime.types .TP .B /etc/mime.types General system wide settings normaly included from .B CONFDIR/xfm_mime.types .SH "SEE ALSO" .BR xfm (1)